Fix 6x-too-flexible TenNodeTetrahedron (double-applied 1/6 Jacobian factor in shp3d) - #29
Open
nmorabowen wants to merge 1 commit into
Open
Fix 6x-too-flexible TenNodeTetrahedron (double-applied 1/6 Jacobian factor in shp3d)#29nmorabowen wants to merge 1 commit into
nmorabowen wants to merge 1 commit into
Conversation
nmorabowen
added a commit
to nmorabowen/OpenSees
that referenced
this pull request
Jul 22, 2026
…g entry (#602) Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
nmorabowen
force-pushed
the
up/00-tennodetet-shp3d
branch
from
July 22, 2026 16:40
2b0407b to
a36136e
Compare
… 1/6 Jacobian factor twice
In TenNodeTetrahedron::shp3d the assembled Jdet is divided by 6, making it
the element volume rather than the raw 3x3 Jacobian determinant. The Gauss
weights wg[] (4 points x 1/24) already sum to 1/6 - the volume of the natural
tetrahedron - so returning xsj = Jdet applied the 1/6 factor twice:
sum_i wg[i] * xsj = (1/6) * V instead of V
Every quantity integrated with dvol = wg * xsj (stiffness, consistent and
lumped mass, body loads, stress resultants) therefore came out 6x too small.
A uniaxial patch test of a single element column gives reaction = E*eps*A/6
before this change and the exact E*eps*A after it.
The fix returns the raw determinant, xsj = 6.0 * Jdet. The shape-function
derivatives are unaffected: they already normalize by 1/(6*Jdet).
Co-authored-by: Patricio Palacios <pxpalacios@miuandes.cl>
Co-authored-by: Jose A. Abell <jaabell@miuandes.cl>
nmorabowen
force-pushed
the
up/00-tennodetet-shp3d
branch
from
July 23, 2026 02:46
a36136e to
b84972d
Compare
nmorabowen
added a commit
to nmorabowen/OpenSees
that referenced
this pull request
Jul 23, 2026
… held for José (#608) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
ppalacios92
pushed a commit
to ppalacios92/OpenSees
that referenced
this pull request
Aug 10, 2026
… package 0.0b PR nmorabowen#692 rewrote campaign row 0.0 to say the two TenNodeTetrahedron defects should "ship as one PR". That is not achievable: package 0.0 ALREADY shipped upstream as jaabell#29 on 2026-07-22 and that PR is still OPEN, scoped to the shp3d 1/6-Jacobian hunk alone. Widening a PR that is already under review is the wrong move. The getResponse 144-byte heap overrun was found later (nmorabowen#692, 2026-08-04) and therefore needs its own package 0.0b with its own branch and upstream PR. Adds the 0.0b tracker row (NOT YET PORTED) and corrects row 0.0's wording. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Summary
TenNodeTetrahedron::shp3dreturns the Jacobian measurexsjused by every quadrature loop in the element (dvol = wg * xsj). The assembled determinant is divided by 6 —— which makes
Jdetthe element volume, not the raw 3×3 determinant. But the Gauss weights already carry the natural-tet volume:wg[] = {1/24}over 4 points sums to 1/6. So the 1/6 factor was applied twice, and every integrated quantity (stiffness, consistent and lumped mass, body loads, stress resultants) came out 6× too small.Fix
xsj = 6.0 * Jdet;so that
Σ wg·xsj = (1/6)·(6·Jdet) = Vexactly. The shape-function derivatives are unaffected — they already normalize by1/(6·Jdet).Verification
Uniaxial patch test — a single-element column with prescribed axial strain ε:
E·ε·A / 6E·ε·A(exact)The total volume accumulated in
formInertiaTerms(volume += dvol) now matches the geometric tet volume.Impact
Because K and M scaled down together, modal frequencies were essentially unchanged by the bug — which is why it could go unnoticed in eigen checks. The error shows up in absolute quantities: displacements under external loads 6× too large, reactions/element mass/self-weight 6× under-counted. Any model using
TenNodeTetrahedronis affected, so this is worth flagging in release notes.Authors: Nicolas Mora Bowen, Patricio Palacios, José A. Abell