Add compressible Neo-Hookean USERMAT with penalty ramp and README note#2
Add compressible Neo-Hookean USERMAT with penalty ramp and README note#2
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b07e2d8e22
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ! Strain energy density | ||
| PSI = 0.5D0*MU*(TRC - 3.0D0) + (1.0D0/DPEN_EFF) * (J - 1.0D0)**2 | ||
| SSE = PSI | ||
|
|
There was a problem hiding this comment.
Initialize unused energy outputs to avoid garbage values
This subroutine sets SSE but leaves other standard USERMAT outputs (SPD, SCD, RPL, DDSDDT, DRPLDE, DRPLDT) untouched anywhere in the routine. In Fortran these will contain whatever was on the stack, and ANSYS can read them for energy bookkeeping or output even if your material doesn’t use them, which can lead to NaNs or non-deterministic results in runs where those fields are queried. Consider explicitly zeroing the unused outputs (as many USERMAT examples do) so solver behavior is stable across builds and platforms.
Useful? React with 👍 / 👎.
Motivation
USERMATimplementation for a large-deformation compressible Neo-Hookean model with a controllable volumetric penalty ramp to avoid abrupt penalty forces during early time steps.Description
usermat_neohookean.f90, aUSERMATimplementation that supportsPROPS(1)=mu,PROPS(2)=dand an optionalPROPS(3)ramp time and computesRAMP = min(1, TIME(1)/PROPS(3))whenPROPS(3)>0to scale the volumetric penalty.DPEN_EFF = DPEN / max(RAMP, 1.0D-12)and used it in the 2nd Piola–Kirchhoff stress computation, strain energyPSI, and numerical consistent tangent evaluations.EPS = 1.0D-8) and included small supporting matrix utilities (MAT_IDENTITY,MAT_MATMULT,MAT_INV3,MAT_DET3,ZERO_TANGENT,ISOTROPIC_TANGENT,NEOHOOK_S2PK).README.mdwith an ANSYS APDL snippet that forces a direct solver usingEQSLV,SPARSEprior toSOLVEfor transient structural analyses.Testing
USERMATwas added but not compiled or unit-tested in CI in this change.usermat_neohookean.f90into an ANSYS USERMAT build and run a transient structural case with and withoutPROPS(3)to confirm the ramp behavior (not executed here).Codex Task