Skip to content

Fix shear modulus and torsion constant in rect_beam_props - #29

Open
barrosyan wants to merge 2 commits into
sandialabs:mainfrom
barrosyan:fix/rect-beam-shear-modulus-and-torsion-constant
Open

barrosyan wants to merge 2 commits into
sandialabs:mainfrom
barrosyan:fix/rect-beam-shear-modulus-and-torsion-constant

Conversation

@barrosyan

@barrosyan barrosyan commented Oct 9, 2026 •

Copy link
Copy Markdown

Addresses items 2 and 3 of #27. Item 1 is left alone on purpose (see below), so I am not using Fixes.

Changes

  • G = E / (2 * (1 - nu)) is now E / (2 * (1 + nu)). At nu = 0.33 the old value was about 1.985x too high.
  • The torsion constant J was I1 + I2 (the polar moment of area), which is only the torsion constant of a circular section. It now uses the St. Venant constant of the rectangle, J = (a c^3 / 3) (1 - (192 / pi^5) (c / a) sum_{n odd} tanh(n pi a / (2 c)) / n^5) with a the long side and c the short side (Timoshenko and Goodier). It is 1.19x smaller for a square and 3.17x smaller for a 1:3 section. The series uses 100 odd terms (error below 1e-10).
  • Docstring note on both. ae, ei1, ei2, mass_per_length and tmmi_per_length are unchanged (the polar moment is correct for the rotary inertia term).

Tests

New tests/beam_test.py (11 tests):

  • J against the classical torsion coefficients for side ratios 1, 1.5, 2, 3 and 10 (0.1406, 0.1958, 0.2287, 0.2633, 0.3123), and symmetry in b, h;
  • G through jg: the ratio of the values at nu = 0 and nu = 0.5 must be 3/2 (the old formula gave 1/2), and the value for a square section;
  • the first torsion frequency of a 1 m, 10 x 30 mm aluminum cantilever (40 elements) against sqrt(G J / (rho Ip)) / (4 L): within 0.5% (the issue's reproducer gives 438.7 Hz by the closed form and 1099.7 Hz with the old code);
  • the other returned properties are unchanged.

With the old code 8 of the 11 fail; with the change all pass, and the whole suite passes (88 tests, including the 77 existing ones). Models that use rect_beam_props (System.beam, beamkm_2d, the frame_wing demo) will see lower torsional stiffness, as physics requires. The 2D beam keeps only bending and axial dofs, so it is not affected.

About item 1 (bending stiffnesses)

I did not change I1 and I2. beamkm documents ei1 as the stiffness about bending axis 1, and with that reading I1 = b h^3 / 12 is consistent. The in-repo callers pass (width, height) as (b, h) and depend on it. If the intended reading is deflection along bend_direction_1, the cleaner fix is probably in the rect_beam_props docstring, but that is a decision for the maintainers (more detail in my comment on #27).

The shear modulus used E / (2 (1 - nu)) instead of E / (2 (1 + nu)), which
made G about 2x too high at nu = 0.33. The torsional stiffness used the polar
moment of area as the torsion constant, which is only right for a circular
section; it now uses the St. Venant torsion constant of the rectangle
(Timoshenko and Goodier series), which is 3.17x smaller for a 1:3 section.

Add tests against the classical torsion table and the closed-form first
torsion frequency of a cantilever. The bending stiffnesses are unchanged.

Refs sandialabs#27

This branch has not been deployed

No deployments
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