Skip to content

Beam compression validation, plane strain, SOFA vs FF - #36

Merged
th-skam merged 2 commits into
main-freefem-sofafrom
2d-compressionDP
Jul 17, 2026
Merged

Beam compression validation, plane strain, SOFA vs FF #36
th-skam merged 2 commits into
main-freefem-sofafrom
2d-compressionDP

Conversation

@Fimache

@Fimache Fimache commented Jul 17, 2026

Copy link
Copy Markdown

Adds compression validation for the 2D cantilever beam
(fully clamped left edge, traction load on the right edge), plane
strain. No analytical solution is exact over the whole domain
(Saint-Venant boundary layer near the clamp), so validation combines:

  1. SOFA vs FreeFEM cross-validation (primary check, full domain)
  2. A far-field analytical check (x >= 2H) against the uniform
    uniaxial compression solution
  • Elements: P1 triangles (beam2d_tri.msh, L=1, H=0.2)
  • BCs: left edge fully clamped (ux=uy=0); traction (-q, 0) applied
    on the right edge via consistent nodal forces (line-integral,
    1/2 per node per boundary segment)
  • Plane strain: template="Vec3d" (lambda = E*nu/((1+nu)(1-2*nu))
    on the FreeFEM side)
  • Params: q=100, E=1000, nu=0.3

Results

SOFA and FreeFEM agree at machine precision across the entire domain.

Files added

  • beam2d_tri.msh — shared mesh (already present from the
    distributed-load / plane stress PRs)
  • sofa_beam2d_compression.py — SOFA scene (plane strain)
  • freefem_beam2d_compression.edp — FreeFEM weak form (plane strain)
  • comparaison_script_2d_compression.py — cross-validation driver
  • params_beam2d_compression.json — physical parameters (q, E, nu)

@th-skam th-skam left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also asymmetric u_y

Image

Since all your files have the same name, and they do kind of the same thing, give a bit descriptive names to your directories:
Compression vs compression_cp

@th-skam th-skam left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok, you just had gravity on.
I'll remove it in the factorized version.

@th-skam
th-skam merged commit 81a92b6 into main-freefem-sofa Jul 17, 2026
1 of 3 checks passed
@th-skam
th-skam deleted the 2d-compressionDP branch July 17, 2026 12:41
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