Align USERMAT parameters with ANSYS Neo-Hookean D1#3
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ea9a84be44
ℹ️ 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".
| CALL MAT_IDENTITY(I3) | ||
| J = DSQRT(MAT_DET3(CMAT)) | ||
| TRC = CMAT(1,1) + CMAT(2,2) + CMAT(3,3) | ||
| CALL MAT_INV3(CMAT, CMATINV) | ||
| S2PK = MU * I3 + (2.0D0/D1) * (J - 1.0D0) * J * CMATINV |
There was a problem hiding this comment.
Guard against D1=0 before dividing
If a user supplies D1=0 (a common ANSYS convention for incompressible behavior), the expression (2.0D0/D1) will divide by zero and propagate Inf/NaN into stresses and tangents, typically causing solver failure. Consider explicitly rejecting D1<=0 with a clear error or replacing it with a small positive floor before computing stresses/energy.
Useful? React with 👍 / 👎.
Motivation
D1) so property mapping and comments match user expectations.D1instead of the previous genericd/DPENnaming.Description
DPEN/dtoD1and update all occurrences inusermat_neohookean.f90(variables, comments, and formulae) to reflect ANSYSD1semantics.NEOHOOK_S2PKsubroutine signature to acceptD1and use(1/D1)in the compressible penalty formulationW = (mu/2)*(I1-3) + (1/D1)*(J-1)^2.D1_EFFand propagate it through stress/energy/tangent computations.README.mdAPDL snippet to listPROPSasmu, D1, ramp_timeso the example matches the code.Testing
usermat_neohookean.f90andREADME.md.Codex Task