|
FhSim
3.1.0
Marine systems simulation
|
| ID | 0029 |
| Class | BUG |
| Severity | 1 |
| Status | blocked |
Models: —
Found: 2026-11-03, feature coribo-structure, test tests/RingStructure_Test.cpp at e3d5722
Decision needed: is the initial state of RingStructure meant to carry a pre-stress, or is it a defect to fix (physics choice for the owner)
Class choice: BUG, because the initial state of a structure should satisfy its own constraints unless a pre-stress is intended, and nothing in the code says so. RingStructure has no user in any repo, hence severity 1.
The test RingStructureTest.ConstraintForcesAreFiniteAtTheInitialState builds a ring with n = 12, diameter 2, Beta 20, EA 1e5, EI 100. At the initial state of InitialConditionSetup the constraint force has a norm of about 4069 and a maximum entry of about 1175 (measured on this branch; the test itself only asserts that the forces are finite). A ring placed on its own constraints would give about zero.
Suspected causes, unconfirmed (checked in the code at HEAD):
ComputeConstraints uses coupling.nullAngle = Quat::Identity() for the neighbour joints i -> i+1 (src/Structures/RingStructure.cpp:65), and Quat(-1,0,0,0) only for the closing joint (:73). InitialConditionSetup turns each neighbour by 2*pi/n about the ring axis (:80-82). The relative rotation at the start is then 2*pi/n, not the null angle.m_elemLength = RingDiameter*pi/num (:31), and the coupling points are at +-0.5*m_elemLength along the element axis (:57-58). Elements sit on the circle with centres a chord D*sin(pi/n) apart (:83-85), and the elements are straight. The end points of neighbours therefore do not meet.A ring starts with a large constraint force and releases it in the first steps. No model in any repo uses it.
2*pi/n, and place the coupling points so they meet at the chord geometry (or place elements so that arc ends meet). Changes the initial state and the early response of any ring.RingStructure.h and keep the test as a pin.RingStructureTest asserts a constraint force norm below a small tolerance at the initial state, for several n.
Low: no user. A fix changes initial conditions of every ring.