Repository navigation
Add AbaqusUMATTarget backend #1
Copy link
Copy link
Closed
Description
Goal
Generate an Abaqus UMAT user subroutine (Fortran-callable C++ via extern "C") from a ConstitutiveModel recipe. This is the second target after MOOSE; doing it forces the Voigt machinery that ANSYS and LS-DYNA will reuse.
Abaqus UMAT signature
The UMAT entry point (Fortran calling convention, C++-side declared via extern "C"):
extern "C" void umat_(
double *STRESS, // (NTENS) in/out: Cauchy stress, Voigt
double *STATEV, // (NSTATV) in/out: state variables, flat array
double *DDSDDE, // (NTENS, NTENS) out: Jacobian dσ/dε, Voigt 6×6
double *SSE, double *SPD, double *SCD,
double *RPL, double *DDSDDT, double *DRPLDE, double *DRPLDT,
double *STRAN, // (NTENS) in: strain at start of step, Voigt
double *DSTRAN, // (NTENS) in: strain increment, Voigt
double *TIME, double *DTIME, double *TEMP, double *DTEMP,
double *PREDEF, double *DPRED,
char *CMNAME, int CMNAME_LEN,
int *NDI, int *NSHR, int *NTENS, int *NSTATV,
double *PROPS, // (NPROPS) in: material constants, positional
int *NPROPS,
double *COORDS,
double *DROT,
double *PNEWDT,
double *CELENT,
double *DFGRD0, double *DFGRD1,
int *NOEL, int *NPT, int *LAYER, int *KSPT,
int *KSTEP, int *KINC);For 3D: NTENS = 6, Voigt component order {11, 22, 33, 12, 13, 23} (per Abaqus convention). For shear strains in STRAN/DSTRAN the engineering convention is used (γ_ij = 2 ε_ij off-diagonals).
Recipe mapping
| Recipe element | UMAT slot |
|---|---|
InputRole::Strain |
STRAN (in), tmech-adapted via abq_std<3, /*ShearStrain=*/true> |
InputRole::StrainIncrement |
DSTRAN, same Voigt + ShearStrain handling |
InputRole::History (each) |
sequential offset into STATEV |
| Each parameter | sequential offset into PROPS |
OutputRole::Stress |
STRESS, Voigt without engineering factor |
OutputRole::ConsistentTangent |
DDSDDE, 6×6 Voigt |
OutputRole::HistoryNew (each) |
corresponding STATEV slot |
What needs to be emitted
A single .cpp file containing:
- The embedded Layer-2 compute function (anonymous namespace).
- The
extern "C"UMAT entry point with the exact Abaqus signature. - Boundary code that:
- Constructs
tmech::adaptor<..., abq_std<3, true>>overSTRAN/DSTRAN/STRESS. - Unpacks each history variable from
STATEVby sequential offset. - Unpacks each parameter from
PROPSby declaration order. - Calls the Layer-2 compute function.
- Writes outputs back via the corresponding adapters.
- Constructs
Acceptance criteria
- New
targets/abaqus_umat.hwithAbaqusUMATTargetclass. - Smoke test: emits the LinearElasticShear example as a UMAT, string-checks the extern "C" signature and the Voigt adapter calls.
- Documentation: README target table updated.
Dependencies
- tmech's
abq_stdadapter (already available). - No numsim-cas changes required.
Estimated effort
1-2 days including tests.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity