# Step 2: formulation ## Read First - `/AGENTS.md` - `/docs/ABAQUS_SUBROUTINE_AGENT_DESIGN.md` - `/docs/ARCHITECTURE.md` - `/docs/ADR.md` - `/.codex/skills/abaqus-subroutine-formulation/SKILL.md` - `/docs/requirements/uel-3d-euler-beam.md` - `/docs/research/uel-3d-euler-beam-research.md` - `/docs/formulations/README.md` ## Task Create `/docs/formulations/uel-3d-euler-beam.md`. Define the implementable finite element formulation for the first 3D Euler-Bernoulli beam `UEL` scope. Include: - Element topology, node ordering, local axes, and DOF ordering. - Required material and section parameters. - Local 12x12 stiffness matrix terms for axial, torsion, bending about local 2, and bending about local 3. - Transformation matrix from local to global coordinates and orientation-vector validation. - Internal force/residual relation for static small-displacement analysis. - `AMATRX` and `RHS` contribution rules by `LFLAGS` for the supported procedure subset. - Numerical tolerances for zero length, near-parallel orientation vector, non-positive section/material properties, and matrix symmetry. - State variable policy. If no persistent state is needed, state that `SVARS` is not used except optional diagnostics approved by requirements. - Output recovery quantities that external CSV validation should compare. Do not define the full Abaqus ABI signature here unless needed to express formulation responsibilities; the interface step owns the ABI contract. Do not create or modify Fortran source, tests, reference artifacts, or implementation plans in this step. ## Tests To Write First - None. This is a formulation artifact step. ## Acceptance Criteria ```bash python -m unittest discover -s scripts -p "test_*.py" python scripts/validate_reference_artifacts.py python scripts/validate_workspace.py ``` The step is complete only when `/docs/formulations/uel-3d-euler-beam.md` has enough matrix, residual, and transformation detail for a later implementation step to code without inventing physics. ## Validation Notes - Keep solver-result validation as externally generated ODB-extracted CSV evidence. - Update `/phases/uel-3d-euler-beam/index.json` step 2 with `completed`, `error`, or `blocked` and a concrete summary or reason. ## Forbidden - Do not add JavaScript/TypeScript/npm fallback. - Do not run Abaqus analyses from this project. - Do not generate reference CSVs. - Do not create Fortran production source. - Do not break existing tests.