Repository navigation
Validator: a two-way immersed body needs a positive mass - #2193
Draft
sbryngelson wants to merge 2 commits into
Draft
sbryngelson wants to merge 2 commits into
sbryngelson wants to merge 2 commits into
Conversation
moving_ibm = 2 advances the body with force/mass, and an unset mass is the -1e6 sentinel, so the body accelerated the wrong way, silently. The Adaptive dt test, the only suite case with a two-way body and no mass, gets a heavy mass so its body keeps its speed.
|
Claude Code Review Head SHA: 8bbb431 Files changed:
Findings: |
This branch has not been deployed
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.
What
moving_ibm = 2advances a body withforce/mass, and an unsetmassis the-1e6sentinel, so a two-way body without a mass accelerated the wrong way, silently. The validator now requirespatch_ib(i)%mass > 0for everymoving_ibm = 2body (particle clouds already required a positive mass). A fixed or prescribed body needs none. Thepatch_ibdocs table gets amassrow.Follow-up to #2188, which stopped the body-force term from entering the recorded force of bodies that are not two-way.
Effect on tests and examples
I ran the validator over all 789 buildable cases in
list_cases()and over every example: onlyIBM -> Adaptive dt(09FDDC81) has a two-way body without a mass. It now getsmass = 1e6, so the body keeps its speed. Its golden changes: the old mass of -1e6 accelerated the body by about 1e-9 in the wrong direction, and that test places the body edges exactly on cell faces, so the difference changes which cells count as solid (about 430 of 2500 cells, 1e-3 relative in density). The other cases and goldens are unchanged.Verification
IBMsubset passes (71 of 71), with the other wave-4 validator and levelset changes merged into the same tree.IBMsubset passes on this branch (71 of 71), so the regenerated golden also holds on a second vendor.This PR was made with Claude Code (AI).