---
name: abaqus-subroutine-formulation
description: Use when drafting Abaqus User Subroutine finite element formulation specifications, stress updates, consistent tangents, state variable evolution, weak forms, element equations, numerical integration, and output recovery contracts.
---

# Abaqus Subroutine Formulation

Use this skill to convert approved requirements and research evidence into a finite element formulation suitable for Abaqus User Subroutine implementation. Finite element formulation is the owned artifact for this skill.

**REQUIRED SUB-SKILL:** Use `fem-theory-query` for finite element theory, constitutive integration, tangent, benchmark, and numerical verification knowledge.

## Inputs

Read first:

- `AGENTS.md`
- `docs/ABAQUS_SUBROUTINE_AGENT_DESIGN.md`
- `docs/requirements/<feature-id>.md`
- `docs/research/<feature-id>-research.md`

## Workflow

1. Confirm analysis assumptions, element/material family, strain measure, stress measure, coordinate system, and units.
2. Define Strong Form and Boundary Conditions when relevant.
3. Define Weak or Variational Form and residual statement when relevant.
4. Define discretization, kinematics, strain-displacement relations, and numerical integration.
5. Define stress update, consistent tangent, state variables, and output recovery.
6. Define Constitutive Contract without creating Fortran source layout.
7. Record numerical risks and tests that should catch them.
8. Write Algorithm Pseudocode at math level only.

## Output Contract

Produce or revise `docs/formulations/<feature-id>-formulation.md` with Strong Form and Boundary Conditions, Weak or Variational Form, Discretization, Kinematics, Constitutive Contract, Element Equations, Mapping and Numerical Integration, Output Recovery, Abaqus Subroutine Mapping, Numerical Risks, Algorithm Pseudocode, and Downstream Handoff.

## Boundaries

- Do not implement code.
- Do not design Fortran source layout.
- Do not choose file ownership.
- Do not run Abaqus.
- Do not generate reference CSVs.
- Do not approve release readiness.

## Quality Gate

- Stress update, consistent tangent, and state variables are defined when the selected entry point requires them.
- Element equations identify residual, tangent, stiffness, mass, or damping terms when applicable.
- Output recovery identifies location, components, units, and coordinate system.
- Numerical risks include rigid body modes, patch test, hourglass, locking, Jacobian, conditioning, tangent consistency, and convergence risks when relevant.

## Handoff

Send review-ready formulation to Numerical Review Agent, interface needs to I/O Definition Agent, model needs to Reference Model Agent, and implementation algorithm notes to Implementation Planning Agent.
