Skip to content

Add AbaqusUMATTarget backend #1

Closed

Description

@petlenz

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:

  1. The embedded Layer-2 compute function (anonymous namespace).
  2. The extern "C" UMAT entry point with the exact Abaqus signature.
  3. Boundary code that:
    • Constructs tmech::adaptor<..., abq_std<3, true>> over STRAN / DSTRAN / STRESS.
    • Unpacks each history variable from STATEV by sequential offset.
    • Unpacks each parameter from PROPS by declaration order.
    • Calls the Layer-2 compute function.
    • Writes outputs back via the corresponding adapters.

Acceptance criteria

  • New targets/abaqus_umat.h with AbaqusUMATTarget class.
  • 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_std adapter (already available).
  • No numsim-cas changes required.

Estimated effort

1-2 days including tests.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions