Repository navigation
[IGA] Nonlinear isogeometric spatial Bernoulli beam element - #15015
Conversation
…rocess - T_0/N_0 were written to the shared Properties of every element in the model part, and the model-part-only constructor used the parent curve of the first element for all of them. With several beams in one model part, each beam got another beam's frame. For a beam opposite to the first one (T0.T = -1), Lambda(T0,T) divides by zero and the solution is NaN. - Each element now gets the frame of its own parent curve (GetGeometryParent(0)), cached per curve and stored on the element. If a curve is given to the constructor, only its elements are processed. - The tangent was evaluated at local coordinate 0 instead of the start of the curve's parameter domain. It is now evaluated at DomainInterval().GetT0().
…ulli beam - NonLinearBernoulliBeamElement3D: LOCAL_AXIS_ORIENTATION was ignored for straight beams. CalculateDeltaPhi measured the twist Psi as the angle between Lambda(T0,T)*n_requested and n_requested instead of between Lambda(T0,T)*N0 and n_requested (Bauer et al. 2016, Eq. 15). For a straight beam Lambda = I, so Psi was always 0 and the cross section always followed the default N0. N0/V0 are now computed before the twist angle, which depends on them. - Read T_0/N_0 from the element data, falling back to the properties. Check() now requires them instead of dividing by zero when missing. - BernoulliBeamElasticConstitutiveLaw: the torsional stresses were G*I_T*kappa while the tangent was 0.5*G*I_T, so the stress was twice the energetically consistent value. The tangent is now also computed when only COMPUTE_CONSTITUTIVE_TENSOR is requested. - The element now uses the stress returned by the constitutive law instead of recomputing D*strain, which hid the law's bug and discarded initial strain/stress contributions. - Remove the K_geo(0,5) debug accumulators and std::cout output from CalculateAll.
Remove trailing whitespace and add the missing final newlines in the files added or modified by the beam implementation. Whitespace-only changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
- Use the core I22/I33 instead of the IGA I_N/I_V (I22 about the normal n, I33 about v = t x n). Remove the unused IGA HEIGHT, WIDTH and VON_MISES_STRESS, which duplicate variables of other applications. - Add body forces (VOLUME_ACCELERATION, dead load) to the residual, with a self-weight test. - Assemble the internal forces from the single non-zero row of each B matrix instead of building temporary 5-vectors. - Turn the 28 scratch member matrices into locals of ComputeBMatrices and ComputeGMatrices. They were recomputed at every integration point anyway. - Document the formulation and reference paper in the element header, and explain the structure and data layout of ComputeGMatrices. - Use std:: math functions, IGA headers and authors in the constitutive law and its Python bindings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
maxfriedrichs
left a comment
There was a problem hiding this comment.
Looks really good, thank you!!
- NonLinearBernoulliBeamElement3D: consistent mass matrix (rho A for the displacements, rho (I22 + I33) for the rotation about the center line), GetFirstDerivativesVector (VELOCITY, ANGULAR_VELOCITY_X) and GetSecondDerivativesVector (ACCELERATION, ANGULAR_ACCELERATION_X). - BeamBaseElement3D: Rayleigh damping alpha * M + beta * K, sized from the element's equation ids so that it can be reused by other beam elements. - Check the shape of LOCAL_AXIS_ORIENTATION ([parameter, nx, ny, nz], at least two rows), strictly increasing parameters and non-zero normals. - Compute the second variations only when the geometric stiffness is assembled. - Remove the declared but never defined ComputeB*/ComputeG* functions. - Tests: mass matrix, Rayleigh damping, derivatives vectors, natural frequencies against beam theory, free vibration in bending and torsion with the BDF scheme, LOCAL_AXIS_ORIENTATION checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thanks for the review!I took care of your comments, could you please check again? |
The free vibration tests used an absolute residual tolerance of 1e-14, below the round-off level of the residual, so every time step ran into the maximum of 10 Newton iterations and the IGA tests exceeded the 15 minute CI limit in the FullDebug and Custom builds. The vibration is linear, so a tolerance of 1e-6/1e-9 converges in one iteration per step with the same accuracy. Only half a period is integrated, which is all the checks need. The elastica Newton loop hit its 40 iteration cap in some load steps for the same reason; its tolerance is relaxed to 1e-8, still well below the 5e-4 accuracy that is checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LOCAL_CS_N, LOCAL_CS_n, LOCAL_CS_V, LOCAL_CS_v and ROTATIONAL_DOF_ACTIVE were defined and registered but never used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@rickyaristio any comment? |
- I_T defaults to the polar moment I22 + I33 when it is not provided, with a one-time warning since this is only exact for circular cross sections. Tested with a cantilever under torque without I_T. - Use the boolean flags directly instead of comparing them with true/false. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The products of 3x3 matrices and of the variation containers were written as nested loops of up to five levels. They are now prod() calls, plus four documented helpers for the products that are not plain matrix products because of the storage layout of the variations: 24 of the loop nests are replaced and the element goes from 129 to 55 for-loops. The refactor only reorders the same algebra. The stiffness (full, material and geometric), residual and mass of a straight, a curved and a curved and twisted beam at undeformed and deformed states match the previous implementation to 4e-18 relative to their physical scale. A new finite-difference tangent test on a curved and twisted beam at a deformed state exercises the reference curvature, mapping and twist terms that vanish for the straight beam. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The helpers for products with variation containers looped over all dofs explicitly, with up to five nested loops. They now operate on n x n (or n x 3) blocks with uBLAS, so the only remaining loops run over the 3x3 block indices and read like the formulas, e.g. W_ij += A(i, k) * W_kj. Stiffness, residual and mass still match the original implementation to 4e-18 relative to their physical scale. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@maxfriedrichs I think it's ready now. What do you think? |
rickyaristio
left a comment
There was a problem hiding this comment.
Small comments from my side. Nice works, @juancamarotti
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rickyaristio
left a comment
There was a problem hiding this comment.
No more comments from my side. Fingers crossed, @juancamarotti.
|
All ready! I will merge it |
Adds a geometrically nonlinear isogeometric spatial Bernoulli beam with torsion, following Bauer et al., Nonlinear isogeometric spatial Bernoulli beam, CMAME 303 (2016) 101–127. Four DOFs per control point:
DISPLACEMENT_X/Y/Zand the twist about the centre line (ROTATION_X).What's added
BeamBaseElement3D: base class with the NURBS-curve kinematics used by the formulation: the rotation matrix R̄ and mapping matrix Λ (Eqs. 23, 26), with their derivatives and first/second variations, and tangent variations. It also contains helpers (e.g. second derivatives along the curve) kept for future beam formulations.NonLinearBernoulliBeamElement3D: Total Lagrangian element with GL strains for the axial, two bending and two torsional components (Eqs. 41–51) and a consistent tangent (material + geometric stiffness).BernoulliBeamElasticConstitutiveLaw: section law with EA, EI_n, EI_v and G·I_T.ComputeBeamVectorsProcess(C++ and Python): computes the initial frame T₀/N₀ of each beam from its parent curve.T_0,N_0,I_N,I_V,I_T,LOCAL_AXIS_ORIENTATION, …), registrations and Python bindings.Tests (
test_isogeometric_non_linear_bernoulli_beam_element.py, added to the small suite)Known limitations / follow-ups
🤖 Generated with Claude Code