Skip to content

3D beam torsion validation (circular section): mesh generation, SOFA vs FreeFEM vs Saint-Venant analytical comparison - #41

Open
Fimache wants to merge 1 commit into
main-freefem-sofafrom
circular-shaft-torsion
Open

3D beam torsion validation (circular section): mesh generation, SOFA vs FreeFEM vs Saint-Venant analytical comparison#41
Fimache wants to merge 1 commit into
main-freefem-sofafrom
circular-shaft-torsion

Conversation

@Fimache

@Fimache Fimache commented Jul 30, 2026

Copy link
Copy Markdown

Summary

Adds a new validation case for pure torsion of a 3D beam with a circular
cross-section, cross-checking SOFA against FreeFEM and against the
Saint-Venant analytical solution.

Files added

  • generate_beam3d_circular_tet.py — generates the P1 tetrahedral mesh
    (gmsh) of a circular cylinder, with tagged surfaces (Fixed, Loaded,
    Lateral) and volume (Beam).
  • sofa_beam3d_torsion.py — SOFA scene: linear elasticity
    (LinearSmallStrainFEMForceField), one end fully clamped
    (FixedProjectiveConstraint), pure torque applied on the other end via
    consistent nodal forces derived from the shear traction field.
  • freefem_beam3d_torsion.edp — same problem solved independently through
    FreeFEM's variational formulation of 3D linear elasticity, with the same
    traction distribution and a penalized clamp.
  • compare_beam3d_torsion.py — runs both solvers, pairs nodes by
    coordinates, and compares displacement fields to each other and to the
    Saint-Venant analytical solution for torsion of a circular section.
  • params.json / params_beam3d_torsion.json — geometry and material
    parameters.

Validation results

Comparison Relative error
SOFA vs FreeFEM 1.76 %
SOFA vs Saint-Venant analytical 5.00 %
FreeFEM vs Saint-Venant analytical 6.67 %
  • ux stays ~3 orders of magnitude below uy/uz, consistent with the
    theoretical absence of warping for a circular cross-section.
  • uz grows linearly along the beam axis, matching the expected twist
    profile θ(x) = θ' · x.
  • Boundary conditions are correctly enforced: displacement is exactly
    zero at the clamped end in both solvers.
  • The gap vs. the analytical solution is attributed to (1) the tetrahedral
    mesh discretization of the circular section and (2) the boundary-layer
    effect near the rigid clamp, where Saint-Venant's free-torsion
    assumption doesn't strictly hold (Saint-Venant's principle).
  • Small-strain validity was checked: total twist angle stays under the
    0.1 rad threshold for the parameters used here.

…OFA vs FreeFEM vs Saint-Venant analytical comparison
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant