Skip to content

Add 3D beam 3-point flexion validation: SOFA vs FreeFEM - #43

Merged
th-skam merged 1 commit into
main-freefem-sofafrom
3D-pointFlex
Aug 11, 2026
Merged

Add 3D beam 3-point flexion validation: SOFA vs FreeFEM#43
th-skam merged 1 commit into
main-freefem-sofafrom
3D-pointFlex

Conversation

@Fimache

@Fimache Fimache commented Aug 4, 2026

Copy link
Copy Markdown

Context

Adds a new SOFA vs FreeFEM cross-validation case: 3D three-point bending
of a rectangular-section beam (P1 tetrahedra). Complements the existing
3D validation cases (circular traction, circular bending, torsion,
distributed load).

Setup

  • Geometry: rectangular beam, L=1.0, H=0.2, W=0.2 (beam3d_tet.msh).
  • Boundary conditions, identified by exact node-coordinate matching:
    • Left support line (x=0, y=0): pin — ux = uy = uz = 0
    • Right support line (x=L, y=0): roller — uy = 0 only
    • Midspan load line (x=L/2, y=H): distributed line load along -y,
      split across the line's nodes using trapezoidal tributary-length
      weights so the total applied force equals P.

Contents

  • sofa_beam3d_threept.py: SOFA scene — NewtonRaphsonSolver +
    SparseLDLSolver, LinearSmallStrainFEMForceField, pin/roller
    supports via FixedProjectiveConstraint /
    PartialFixedProjectiveConstraint, midspan load via
    ConstantForceField.
  • freefem_beam3d_threept.edp: FreeFEM solve of the same problem
    (same geometry, same BCs), writes raw results to a plain-text file.
  • comparaison_script3d_3pt.py: runs both solvers, pairs nodes
    between SOFA and FreeFEM by coordinates (with grid-snapping to avoid
    float-noise mismatches between the two mesh readers — see in-code
    comment), computes discrete RMS on ux/uy/uz, and reports midspan
    deflection (node nearest (L/2, H, W/2)) from both solvers.
  • params_beam3d_threept.json: load and material parameters
    (P, Young's modulus, Poisson's ratio).
  • beam3d_tet.msh: input mesh (kept — required to run the case,
    not a generated result).

@th-skam
th-skam merged commit 5e53136 into main-freefem-sofa Aug 11, 2026
2 of 4 checks passed
@th-skam
th-skam deleted the 3D-pointFlex branch August 11, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants