Skip to content

feat(fem): polar second moment of area of a circular shaft#430

Merged
nochallenge merged 1 commit into
masterfrom
feat/fem-circular-polar-second-moment
Jun 8, 2026
Merged

feat(fem): polar second moment of area of a circular shaft#430
nochallenge merged 1 commit into
masterfrom
feat/fem-circular-polar-second-moment

Conversation

@nochallenge

Copy link
Copy Markdown
Owner

What

Adds beam::circular_polar_second_moment_of_area(diameter) — the polar second moment of a solid round shaft about its longitudinal axis:

// J = pi * d^4 / 32   (m^4)
pub fn circular_polar_second_moment_of_area(diameter: f64) -> f64

Why

The torsion constant of a round bar — the J that feeds polar_section_modulus (Z_p = J/(d/2)) and torsional_rigidity (GJ), neither of which previously had a way to compute J for a circle (both take it as a parameter). By the perpendicular-axis theorem it is exactly twice the bending circular_second_moment_of_area (J = Ix + Iy = 2*I, since Ix = Iy for a circle). Guard mirrors the bending companion.

Test

circular_polar_second_moment_of_area_is_pi_d4_over_32:

Re-exported from lib.rs alphabetically in the beam block. valenx-fem 261 lib tests (was 260); cargo clippy -p valenx-fem --all-targets -- -D warnings clean. Research-grade torsion section-property primitive.

Add beam::circular_polar_second_moment_of_area(diameter), the polar second
moment of a solid round shaft about its longitudinal axis:

  J = pi * d^4 / 32   (m^4)

the torsion constant of a round bar -- the J that feeds polar_section_modulus
(Z_p = J/(d/2)) and torsional_rigidity (GJ), neither of which previously had
a way to compute J for a circle. By the perpendicular-axis theorem it is
exactly twice the bending circular_second_moment_of_area (J = Ix + Iy = 2*I,
since Ix = Iy for a circle). Guard mirrors the bending companion.

Analytic test circular_polar_second_moment_of_area_is_pi_d4_over_32:
(a) worked d=0.1 -> J = pi*0.1^4/32 ~= 9.8175e-6 m^4;
(b) threads circular_second_moment_of_area (#419) (non-tautological,
    perpendicular-axis theorem): J = 2*I;
(c) threads polar_section_modulus: Z_p = J/(d/2) = pi*d^3/16;
(d) threads torsional_rigidity (#410): GJ of a steel shaft;
(e) quartic in diameter;
(f) 0-sentinel guards for non-positive d and non-finite input.

Re-exported from lib.rs alphabetically in the beam block. valenx-fem 261
lib tests (was 260), cargo clippy --all-targets -D warnings clean.
@nochallenge nochallenge merged commit 68a1327 into master Jun 8, 2026
@nochallenge nochallenge deleted the feat/fem-circular-polar-second-moment branch June 8, 2026 22:41
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