Skip to content

Fix 6x-too-flexible TenNodeTetrahedron (double-applied 1/6 Jacobian factor in shp3d) - #29

Open
nmorabowen wants to merge 1 commit into
jaabell:ladruñofrom
nmorabowen:up/00-tennodetet-shp3d
Open

Fix 6x-too-flexible TenNodeTetrahedron (double-applied 1/6 Jacobian factor in shp3d)#29
nmorabowen wants to merge 1 commit into
jaabell:ladruñofrom
nmorabowen:up/00-tennodetet-shp3d

Conversation

@nmorabowen

@nmorabowen nmorabowen commented Jul 22, 2026

Copy link
Copy Markdown

Summary

TenNodeTetrahedron::shp3d returns the Jacobian measure xsj used by every quadrature loop in the element (dvol = wg * xsj). The assembled determinant is divided by 6 —

double Jdet = (t1*(t5*t9-t6*t8) - t2*(t4*t9-t6*t7) + t3*(t4*t8-t5*t7))/6.0;
xsj = Jdet;   // <-- bug

— which makes Jdet the 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) = V exactly. The shape-function derivatives are unaffected — they already normalize by 1/(6·Jdet).

Verification

Uniaxial patch test — a single-element column with prescribed axial strain ε:

reaction
before E·ε·A / 6
after E·ε·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 TenNodeTetrahedron is affected, so this is worth flagging in release notes.

Authors: Nicolas Mora Bowen, Patricio Palacios, José A. Abell

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
nmorabowen force-pushed the up/00-tennodetet-shp3d branch from 2b0407b to a36136e Compare July 22, 2026 16:40
… 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
nmorabowen force-pushed the up/00-tennodetet-shp3d branch from a36136e to b84972d Compare July 23, 2026 02:46
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>
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