Beam compression validation, plane strain, SOFA vs FF - #36
Merged
Conversation
th-skam
reviewed
Jul 17, 2026
th-skam
approved these changes
Jul 17, 2026
th-skam
left a comment
Collaborator
There was a problem hiding this comment.
It's ok, you just had gravity on.
I'll remove it in the factorized version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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:
uniaxial compression solution
beam2d_tri.msh, L=1, H=0.2)on the right edge via consistent nodal forces (line-integral,
1/2 per node per boundary segment)
template="Vec3d"(lambda = E*nu/((1+nu)(1-2*nu))on the FreeFEM side)
q=100, E=1000, nu=0.3Results
SOFA and FreeFEM agree at machine precision across the entire domain.
Files added
beam2d_tri.msh— shared mesh (already present from thedistributed-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 driverparams_beam2d_compression.json— physical parameters (q, E, nu)