Interface: 3D view of the rotor, shaft discretization and probes on the model - #1429
Open
leonardocabr wants to merge 29 commits into
Open
leonardocabr wants to merge 29 commits into
leonardocabr wants to merge 29 commits into
Conversation
… hub on each node
…rt legs with isolators
…k list rows to their parts
…ad, follow the theme, and redraw the shadow only when it changes
…m their list rows
…value, compared in one unit by the server
…t and never sent to ROSS
…honeycomb seals, helical gear and a motor on the bench
…sy state, a computing card, WebGL context restore; bearing housings tangent to their base
… ratio (API RP 684)
…couplings with a split
… or by the convergence of the natural frequencies
…, copy, hide, add at node, delete
…ndows fires contextmenu after mouseup)
…s between bearings, behind one button
…d fill placeholders in one pass
… stopping at nodes unless Shift is held
…with rs.Probe, renumbered with its node and drawn in 3D
…om the model on every run, named in the legend
… y sin of its node, z for an axial one
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1429 +/- ##
==========================================
+ Coverage 82.59% 83.65% +1.06%
==========================================
Files 173 181 +8
Lines 27549 28977 +1428
==========================================
+ Hits 22754 24242 +1488
+ Misses 4795 4735 -60
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
gsabinoo
self-requested a review
October 5, 2026 13:49
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Interface: 3D view of the rotor, shaft discretization and probes on the model
Follow-up to #1419. This branch is 29 commits on top of
main(3a258dc8), oneof them a merge of
main. It touches two places, and they are separable ifyou would rather review them apart:
Rotor.refine_mesh,Rotor.refine_mesh_by_convergenceand
MultiRotor.refine_mesh, with their tests (ross/rotor_assembly.py,ross/multi_rotor/multi_rotor.py,ross/tests/). Nothing existing changesbehaviour.
ross/interface/, 109 files: +18 632 / −358 of our own, of which 9 873 aretests, plus three.js r186 vendored under
frontend/vendor/three/(MIT,licence included, 82 483 lines). It is vendored rather than loaded from a CDN
because the packaged executable runs offline, as the other vendored
libraries do. It is loaded with
import()only the first time the 3D viewis opened.
ROSS: discretizing the shafts
Rotor.refine_mesh(max_ld=0.5, min_ld=0.1, parts=None):max_ldtimes its diameter, the rule API RP 684 §1.5.2.1 gives for theelement length: L/D at most 1.0, with 0.5 preferred.
add_nodes, so every element on a node keeps its place.CouplingElementis left whole.min_lddiameters (0.1) isreported with a warning, because cutting cannot fix it.
parts: cuts every element into equal parts instead.rotor_example()goes from 6 to 60 elements.Rotor.refine_mesh_by_convergence(n_modes=6, rtol=1e-3, speed=0, ...):0.25 and 0.125. Meshes with the same element count are skipped.
n_modesnatural frequencies of each meshagainst the next, finer one.
no longer changes by more than
rtol. If none converges, it warns andreturns the finest.
ConvergenceResults, the classRotor.convergencealready uses.37 s on a 300-element rotor; this order needs one modal analysis per mesh
tried.
MultiRotor.refine_meshrefines both rotors and rebuilds the MultiRotor.Interface
3D view of the rotor.
scene the build returns (
domain/rotor_scene.py: node positions, diametersand colours read from the rotor ROSS built).
drawn as the equivalent steel disk, and says so.
the page's theme.
menu: split here, split, discretize, edit, copy, hide, add at node, delete.
between bearings), and a measuring tape whose ends are dragged along the
shaft line and stop at the nodes.
gears, ...) is only a picture, kept with the element and never sent to ROSS.
A disk or gear can also be described by its dimensions,
DiskElement.from_geometryandGearElement.from_geometry.Modelling.
L/D (API RP 684), in a number of parts, or by the convergence of the natural
frequencies. These are the ROSS methods above.
value, compared in one unit by the server.
Probes on the model.
rotor, since
Rotortakes none. The builder checks each one withrs.Probeand against the rotor's nodes, because a probe on a node the rotor does not
have is accepted by ROSS and then reads nothing.
discretized or concatenated.
instead of typing a node and an angle. The row is filled in from the model on
every run, so a probe moved by a split shaft is still the one read.
tag.MultiRotornumbers that rotor.
reads
cos θ·H_x + sin θ·H_yof its node, which is exact because the systemis linear, and an axial one reads z. The exported Python script carries the
same function, held to the same numbers by a test.
Verification
python check.py: ruff, pytest and the 38 node batteries, 0 of 41failed. Windows, Python 3.12.6, this repository's ROSS (3.1.0.dev0).
ruff check rossandruff format --check rossare clean.ross/tests/pass, and so do the doctestsof the new methods.
test keeps those stored scenes equal to what the current ROSS builds, so
they cannot drift.
Found in ROSS along the way
FrequencyResponseResultshas noprobe=. Unlike the unbalanceresponse, its plots take a degree of freedom as the output. The interface
projects the response itself (above). I would like to propose
probe=therein a separate PR, using the same
ru·cos + rv·sinprojection ascalculate_amplitude.continuepast an axial probe whennumber_dof != 6, so on a 4-dof rotorit is dropped in silence.