Restore constrained neo-Hookean reference-map hyperelasticity#1677
Restore constrained neo-Hookean reference-map hyperelasticity#1677sbryngelson wants to merge 4 commits into
Conversation
Follow-up correctness audit: this should remain a draftThis is an AI-assisted follow-up audit of the add-back at Parts that appear correct
1. Reference-map boundary conditions are currently incorrectThe new rather than one. On an x face this creates and a nonzero elastic stress in an initially undeformed body. Thus the golden test starts with numerical pre-strain near its boundaries. This should not be addressed by rejecting most MFC boundary conditions. The completed capability needs a dedicated reference-map boundary layer covering every applicable MFC BC:
A useful implementation pattern is to run the existing fluid BC routine and then call one centralized 2. The transverse HLLC elastic-energy correction is structurally wrongThe current correction contains, for transverse components, (s_S - u_t) * tau_nt / (s_K - u_t)Here The safest first restoration is to use the two-wave HLL flux for the complete conservative hyperelastic state: with physical fluxes MFC's HLL implementation already has partial hyperelastic wave-speed logic, but its stress-aware momentum and energy branches and all If HLLC is retained, the elastic branch should instead be rewritten from the Rankine-Hugoniot relations. Let This has no Until that work is complete, validation should at least require direct wave speeds ( 3. Invalid maps must not silently lose elasticity
Use a device-safe invalid-map counter/flag, record the minimum determinant, reduce it across MPI ranks, and terminate with a clear diagnostic after the kernel. If regularization is desired instead, it needs to be an explicit documented model with diagnostics, not implicit zeroing. 4. The current golden test is an execution canary, not a correctness testBecause its ghost extrapolation already strains the identity map,
Until these points are addressed, this PR should remain draft and should not close #1674. References
This comment and audit were AI-assisted; the findings above are based on direct inspection of the current PR source and the cited formulations. |
Description
This is the add-back half of the stacked workflow proposed in #1674. It is intentionally based on the removal branch in #1675, so this PR shows the hyperelastic capability being added back from a clean baseline. After #1675 merges, this PR should be retargeted to
master.The restored implementation is deliberately narrower than the prior interface: neo-Hookean only, 3D Cartesian only, finite-difference gradients enabled, and HLLC only. It preserves the project-specific Barbosa/Rodriguez-family closure already used by MFC,
tau = (G/J) dev(b), rather than silently replacing it with the differentJ^(-5/3)closure in Kamrin et al.The repair:
hyper_modelin the generated parameter/namelist system and accepts onlyhyper_model = 1;pre_stressinitializer;b = F F^Tfrom the storedF^Tlayout;The audit, concrete equations, provenance discussion, references, and remaining architectural caveats are in #1674.
Closes #1674.
Type of change (delete unused ones)
Testing
./mfc.sh precheck./mfc.sh build -t pre_process simulation post_process --no-mpi --debug -j 4./mfc.sh test --from C06DAA3C --to C06DAA3C --no-mpi --debug -j 1./mfc.sh test --from 32A3A936 --to 32A3A936 --no-mpi --debug -j 1The new
C06DAA3Cgolden case is a 3D shear problem. It evolves the reference map away from the identity and produces nonzero off-diagonal elastic stresses, so it exercises the correctedb = F F^Tpath and the HLLC elastic/reference-map fluxes.Checklist
See the developer guide for full coding standards.
GPU changes (expand if you modified
src/simulation/)GPU validation remains to be done.
AI assistance disclosure
This audit and patch were AI-assisted. The technical claims were checked against the repository source, CPU debug builds/runs, the new regression output, and the references collected in #1674. Human review is especially requested for the intended constitutive closure and the transitional treatment of derived stress/energy slots.
Review requested from @mrodrig6 and @ChrisZYJ.