Skip to content

Align USERMAT parameters with ANSYS Neo-Hookean D1#3

Open
DexterQiu wants to merge 1 commit intomainfrom
codex/implement-large-deformation-neo-hookean-usermat-0lsrq0
Open

Align USERMAT parameters with ANSYS Neo-Hookean D1#3
DexterQiu wants to merge 1 commit intomainfrom
codex/implement-large-deformation-neo-hookean-usermat-0lsrq0

Conversation

@DexterQiu
Copy link
Copy Markdown
Owner

Motivation

  • Ensure the USERMAT implementation and documentation use the same incompressibility parameter naming as ANSYS Neo‑Hookean (D1) so property mapping and comments match user expectations.
  • Clarify the strain energy and stress expressions to reference D1 instead of the previous generic d/DPEN naming.
  • Keep the README APDL snippet consistent with the Fortran implementation so example runs use the correct property order.

Description

  • Rename internal/procedure parameters from DPEN/d to D1 and update all occurrences in usermat_neohookean.f90 (variables, comments, and formulae) to reflect ANSYS D1 semantics.
  • Update calls and the NEOHOOK_S2PK subroutine signature to accept D1 and use (1/D1) in the compressible penalty formulation W = (mu/2)*(I1-3) + (1/D1)*(J-1)^2.
  • Adjust effective penalty ramping logic to compute D1_EFF and propagate it through stress/energy/tangent computations.
  • Update README.md APDL snippet to list PROPS as mu, D1, ramp_time so the example matches the code.

Testing

  • No automated tests or CI jobs were executed for these changes.
  • Static inspection and local edits were performed to ensure consistent renaming across usermat_neohookean.f90 and README.md.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +210 to +214
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant