Repository navigation
Conversation
The unit-warping loop read end_node from ends[i, 0] instead of ends[i, 1] and searched/filled w_vals (already complete from the shear-centre loop) instead of wo_vals, so wn and Cw were always zero for open sections. Follow the original MATLAB cutwp_prop2 for this loop. Add closed-form tests for a plain channel and a zed, plus checks that the normalised unit warping integrates to zero and that Cw does not depend on the element discretisation or order. Fixes brookshsmith#310, fixes brookshsmith#313, completes brookshsmith#128. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J5kXckCFcbYjcpMjwYqbsU
Author
|
The failing check is The same step already fails on #327 (a CI-only dependabot bump with no Python changes), while earlier runs passed. The differences are at long half-wavelengths (~1e-4), so this looks like a numerical sensitivity introduced by the runner image change ( |
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.
Fixes #310
Fixes #313
Completes #128 (the remaining unit-warping part; the Ixy part was fixed in #299)
Problem
The unit-warping loop in
pycufsm.pre.cutwp.prop2readend_nodefromends[i, 0]instead ofends[i, 1], and searched/filledw_vals(alreadycomplete from the shear-centre loop) instead of
wo_vals. As a resultwnand
Cwwere always zero for every open section.Fix
Follow the original MATLAB
cutwp_prop2: usewo_valsthroughout the secondloop and take
end_nodefromends[i, 1]. The shear centre, computed in thefirst loop, is unchanged.
Tests
New tests in
tests/test_cutwp.py(context_warping_constant):t b^3 h^2 (3b + 2h) / (12 (6b + h))t b^3 h^2 (b + 2h) / (12 (2b + h))The three value checks fail on master and pass with this change.
The 8 x 2.5 x 0.075 in channel from #313 now gives Cw = 6.385870 in^6, as expected there.
Checks (pinned dev/test dependencies, numpy 2.2.6)
pylint ./pycufsm: 10.00/10black --check .: passedmypy: no issuespytest --pspec tests/: 51 passed