Fix Newman-Raju G22 term in surface crack SIF for a > c - #4531
Open
dallonby wants to merge 1 commit into
Open
Conversation
The a > c branch of surface_stress_intensity_factor computed the G22 coefficient as 0.14*(c/a)*1.5 where the published Newman-Raju equation (and the sibling a <= c branch) uses 0.14*(c/a)**1.5 — multiplication in place of exponentiation. Currently benign in outputs because bending_stress is hardcoded to zero so H2 never enters the stress intensity factor, but wrong the moment bending is enabled. Also adds the previously-missing test coverage of the a > c branch, with expected K values computed independently from the Newman-Raju equations (the existing tests only exercised a < c at phi = pi/2). Co-Authored-By: Claude Fable 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.
Closes #4530
Overview
One-token fix in
process/models/cs_fatigue.py: the a > c branch ofsurface_stress_intensity_factorcomputed G22 as0.14e0 * c_a * 1.5e0where the Newman-Raju equation (and the a <= c branch) requires0.14e0 * c_a**1.5e0.Changes
process/models/cs_fatigue.py:*→**in the G22 term.tests/unit/models/test_cs_fatigue.py: add two a > c parametrised cases (phi = pi/2 and phi = 0) totest_surface_stress_intensity_factor, with expected K values computed independently from the Newman-Raju equations (derivation in the test comment). The a > c branch previously had zero test coverage.Notes for reviewers
bending_stressis hardcoded to 0 inside the function, so H2 (which contains G22) never reaches the returned K today — the existing golden values are untouched and regression outputs are unaffected. The fix removes a landmine for whenever bending is parameterised.bending_stressto a parameter (default 0) so H1/H2 become testable directly.Found during an independent audit of v3.4.2.
🤖 Generated with Claude Code