Cont damage fix - #1723
Conversation
…ransport, bounded energetics
|
Almost done. Will update very soon. |
…and degrade probe sound speed by damage
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1723 +/- ##
==========================================
- Coverage 62.30% 62.29% -0.02%
==========================================
Files 84 84
Lines 21583 21635 +52
Branches 3195 3209 +14
==========================================
+ Hits 13448 13477 +29
- Misses 5937 5951 +14
- Partials 2198 2207 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Merged master to resolve the conflicts from #1762, which moved the elastic-energy term into |
Yes the G_K choice matches my intent, and all the merges look correct to me. |
Lines of Code
|
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
Fixes and stabilizes the continuum damage model by switching to a conservative damage carrier, correcting stress/energy handling, and enforcing bounds; updates validation, tests, and docs accordingly.
Changes:
- Advance conservative damage carrier (U_D=m_sD) (with updated flux/source treatment) and clip/projection to physical bounds.
- Correct maximum-principle stress to include (-p\mathbf{I}) and adjust elastic energy accounting to use undamaged modulus (G_0).
- Update case validation rules, add/adjust regression cases, regenerate goldens, and refresh documentation/examples.
Reviewed changes
Copilot reviewed 25 out of 30 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| toolchain/mfc/test/cases.py | Updates/extends regression cases for continuum damage (threshold/stress configs, adds 2-fluid axisym coverage). |
| toolchain/mfc/case_validator.py | Tightens cont_damage validation (requires hypoelasticity; enforces parameter sign/positivity constraints). |
| src/simulation/m_time_steppers.fpp | Enforces conservative damage bounds after each RK stage. |
| src/simulation/m_riemann_state.fpp | Ensures hypoelastic interface energy uses undamaged modulus before damage scaling. |
| src/simulation/m_riemann_solver_hllc.fpp | Adds conservative damage flux (U_D u) based on damageable-solid partial mass. |
| src/simulation/m_riemann_solver_hll.fpp | Adds conservative damage flux and carries it into geometric-source flux path. |
| src/simulation/m_rhs.fpp | Passes primitive state into damage source computation (for (-p\mathbf{I}) principal-stress evaluation). |
| src/simulation/m_hypoelastic.fpp | Reworks damage source to use max principal Cauchy stress, weights by solid partial mass, adds bounds projection helper. |
| src/simulation/m_data_output.fpp | Outputs damage as recovered (D=U_D/m_s); uses (G_0) for energy and damaged modulus for wave speed. |
| src/post_process/m_start_up.fpp | Writes damage_state from primitive (D) instead of conservative carrier. |
| src/common/m_variables_conversion.fpp | Converts conservative↔primitive damage consistently (D↔U_D), and keeps elastic energy based on (G_0). |
| examples/2D_cont_damage/case.py | Updates and documents 2D continuum-damage demo setup (domain/driver/disk). |
| examples/1D_cont_damage/case.py | Removes the legacy 1D continuum-damage example. |
| docs/references.bib | Adds Spratt (2024) thesis reference for continuum damage documentation. |
| docs/documentation/equations.md | Documents the conservative continuum damage model and its stress/energy coupling. |
| docs/documentation/case.md | Updates cont_damage option documentation (requirements, bounds, interpretation). |
| tests/EF3E7C79/golden-metadata.txt | Regenerated golden metadata for updated continuum damage behavior. |
| tests/B73DC79F/golden.txt | Removes obsolete golden output for retired/changed case. |
| tests/B73DC79F/golden-metadata.txt | Removes obsolete golden metadata for retired/changed case. |
| tests/6CFBCF4A/golden-metadata.txt | Adds new golden metadata for newly covered regression case. |
| tests/5A137315/golden-metadata.txt | Regenerated golden metadata. |
| tests/574636EE/golden-metadata.txt | Regenerated golden metadata. |
| tests/32A3A936/golden-metadata.txt | Regenerated golden metadata. |
| tests/0BAA2F42/golden-metadata.txt | Regenerated golden metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Description
Bug fix; closes #1673.
Following #1673, this PR made the following major changes to the continuous damage model:
Testing
Regenerated the affected continuous damage golden files.
All CI passed on CPU and GPU.
Shock-cylinder interaction - damage evolution in the cylinder:
Checklist
Check these like this
[x]to indicate which of the below applies.See the developer guide for full coding standards.
GPU changes (expand if you modified
src/simulation/)AI code reviews
Reviews are not retriggered automatically. To request a review, comment on the PR:
@claude full review— Claude full review (also triggers on PR open/reopen/ready)claude-full-review— Claude full review via label