MechanicsHarness
Menu

Case study shared with the authors of Noii et al. (2024) on 24 October 2026; corrections welcome · Teng Zhang · an AI-agent test built on their battery fatigue model · runs of 20 to 21 October 2026

AI agents implemented a published battery fatigue model: all three elements were robust, two predicted too much damage

We restated the chemo-mechanical fatigue model of Noii et al. (2024) as a self-contained task and asked an AI coding agent to write an Abaqus/Standard user element (UEL) for it: a 4-node quadrilateral with displacement, lithium concentration and damage. Each element ran inside a full simulation on a hidden problem and was compared with an independent answer key. The same agent built the element three times: without our code-generation framework, abaqus_ufl (A); with it and a team of sub-agents (B); and with it as a single agent (B2). All three elements were robust; two predicted too much damage.

Reference work. We built the benchmark on Noii et al. (2024), Comput. Methods Appl. Mech. Eng. 428, 117068, and its FEniCS implementation, Eng. Fract. Mech. 306, 110251, with the authors' public code (full references at the end). We took the equations and the 2D conventions of the authors' script; the parameters, test problems, answer key and scoring are ours, and parts of the paper's model are left out (Section 1). The test asks how AI agents implement a published model; it does not test or reproduce the authors' results, and the agents' errors are not errors in the papers.

Public version. This page is the case study shared with the authors on 24 October 2026, without the descriptions, loading, meshes, result fields and reference values of the hidden problems, which stay reserved for scoring. Errors on the hidden problems are given as numbers only.

Release note, 6 November 2026. In its status file, run B declared its own run invalid because of the process listing described under "Did anything leak to the agents?" below. Teng Zhang ruled on 6 November 2026 to score the run with this deviation recorded. The task, host, scorer, reference code, the runs and their results are released at github.com/tengzhang48/agent-mechanics-benchmarks-public.

  1. Robustness
    3 of 3 passed

    Every run passed all six robustness and history checks.

  2. Accuracy
    2 of 3 failed

    A and B: 8.5 % and 9.3 % too much damage. The limit is 4 %.

  3. Cause
    Element too simple

    At these mesh sizes, the simplest element turns swelling into false stress.

  4. B2
    Right path

    Our mixed-order example, then an independent check: three times too much damage, fixed to 0.55 %.

Why did B fail?

  1. A simpler example. Our mixed-order example was on the next line of the index it read.
  2. No whole-problem reference. It checked parts independently, and left a 9.35 % gap between its own meshes unresolved.
  3. Sub-agents elsewhere, on time stepping and extreme cases.

Why did A fail?

Not for lack of knowledge. A wrote its own higher-order reference; on the 32 × 32 mesh its damage differed by about 14 %. The gap fell with each finer mesh, so A called it converged and stopped after 61 of 360 minutes. The short check it skipped: judge the size of the remaining error, not only its trend.

What worked

An independent check of the whole problem. B2 studied our mixed-order example, wrote its own higher-order reference, saw three times too much damage on a coarse mesh, named the cause and fixed it. Its element agrees with the key within 0.55 %.

1The model and the test

The model is the authors' script, restated as equations; the parameters and problems are ours. The agent decided how to discretize the hard term: lithium pushed by the gradient of the pressure, which itself depends on the displacement gradient.

The problems. A unit square; lithium enters through one charged edge.

fixed in x and yfixed in y onlycharged edge: c = c_b(t)unit square, 1 × 1other edges sealed and freeG_c = 3.5e-6 · period T = 8 · 20 cycles

Practice problem, given to the agents. Lithium enters through the top edge.

Part of the modelIn our testThe authors' script (revision 8bcec27)The CMAME paper
Swelling strainβ(c − c0) I, small strainSame (β = Ω/3)Same (eq. 9)
Stress degradationWhole stress: σ = g(d) σeffSame (split = 1, the hybrid form)Only the tensile part is degraded (eqs. 89 to 90)
Degradation functiong(d) = (1 − κ)(1 − d)2 + κSameSame
Crack driving energyψ+ = (K/2)⟨tr εe⟩+2 + μ dev εe : dev εeSameSame
Phase field−ℓ2Δd + d − (1 − κ)(1 − d) H = 0, H the largest past 2ℓψ+/GfSameAdds a viscous term and a scaling ζ (eqs. 91 to 93)
Fatigueα accumulates increases of g ψ+; logarithmic f(α), k = 0.5SameSame (eq. 51)
Lithium fluxJ = g D ∇c − χ c ∇(g peff), peff = tr σeff/3Same (χ is the script's c2)Eq. 87 also multiplies the stress-driven term by g(d) and uses the hydrostatic part of the split stress
2D conventions2D trace divided by 3; K = λ + 2μ/3SameWritten for 2D and 3D
Geometry and loadingUnit square; one edge charged, c cycling between 0.35 and 0.80Circular particle with notches; cyclic surface concentrationParticles with notches and cavities, 2D and 3D
ParametersDimensionless: E = 10, ν = 0.28, β = 0.035, c0 = 0.35, κ = 1e-5, D = 0.14, χ = 0.25, ℓ = 0.12Physical unitsTable 1
DiscretizationLeft to the agent, on 4-node quadrilateralsLinear triangles for u, c and d; staggered(u, c) monolithic, d staggered

Also left out of the paper's model: the chemical potential with its logarithmic lithium energy (eq. 30; the paper reduces it to the dilute limit, eq. 87), flux charging conditions, three-dimensional particles and micro-cavities, and the parallel solver study. Our comparison with the script and the paper, 22 October 2026.

The task

  • Write a UEL with the standard Abaqus/Standard argument list that solves the model robustly in a global analysis.
  • Left open: how to compute ∇(g peff); the interpolation and quadrature of each field and any extra variables; how and when the history is stored and updated; behaviour on invalid states.
  • Given: the equations, the practice problem D0 and a Python simulator that calls the element as Abaqus/Standard does.
  • Conditions: offline, its own folder only, no human help, about 6 hours. The exact texts are in the Appendix.

The problems

  • Practice (D0): lithium enters through the top edge of the unit square; given to the agents.
  • Hidden problems, used for scoring: similar to the practice problem, with other boundary conditions, loading, parameters and meshes, as the task told the agents (Appendix).

The answer key

An independent FEniCSx (dolfinx) solution with quadratic displacement, computed before any agent ran.

The runs

OpenAI Codex (gpt-6.1-sol, maximum reasoning), the same task and budget for each. A worked without our framework. B could use abaqus_ufl (public commit a02ed7c) with its documentation and AI skill, which advises a team of sub-agents. B2 was B rerun as a single agent, to separate the framework from that advice.

2Every run was robust; two of three were wrong on damage

All ten checks, run on the same simulator. The accuracy checks are the only ones that separate the runs.

CheckA · no frameworkB · framework + sub-agentsB2 · framework, single agent
Accuracy against the key
Accuracy: damage and lithium totals fail fail pass
Accuracy: fields fail fail pass
Error falls with a finer mesh pass pass pass
Distorted meshes pass pass pass
Robustness and history
All simulations finish pass pass pass
History only grows pass pass pass
No hidden memory pass pass pass
Zero-length step pass pass pass
Large steps pass pass pass
Near-total damage pass pass pass

Hover a cell for its value. "Accuracy" compares with the key on the 32 × 32 mesh, in the limit of small time steps.

How a pass is definedthe exact measure and scope
  • Measure: for each quantity, the largest difference from the key over the ends of cycles 1 to 10, divided by the key's largest value. Fields use the RMS over the nodes. Limits: 4 % for total and peak damage, 0.5 % for total lithium, 1 % for fields.
  • Small-time-step limit: each element and the key are run at two time steps and extrapolated, v = 2 v(T/80) − v(T/40), so a valid but different time scheme is not penalized.
  • Mesh: 32 × 32 for the pass; 16 × 16 as well for "error falls with a finer mesh".
  • Not scored: elastic energy. The simulator rebuilds it from the simple displacement, so even a correct simple element is about 8 % off on this mesh.
  • Where it ran: each element ran as compiled code on our Python simulator, which behaves like Abaqus. No run used Abaqus itself.
  • What the agents were told: results must converge to an independent reference under refinement. The task did not state the 4 % limit or the 32 × 32 mesh. A and B met the stated part (their error fell about 3.6 times per mesh halving); B2 met both.

3The error is in damage, near the charged edge, and still above the limit at 32 × 32

Total lithium is right in all three runs, within 0.03 % (the lithium field within 0.05 %). Damage is not: A and B add damage everywhere, most near the charged edge. A finer mesh cuts their error about 3.6 times per halving, as it should, but at 32 × 32 it is still more than twice the limit.

Error against the key, two meshes

0.001 %0.01 %0.1 %1 %10 %100 %16 × 16 mesh32 × 32 meshpass line 4 %B 9.3 %A 8.5 %B2 0.55 %

Log scale. A and B fall about fourfold from 16 to 32, but stay above the pass line on damage.

Total damage over the cycles

A and B start about 7 % high in cycle 1, rise to 8.5 to 9.3 % by cycle 4 or 5, and then hold or ease slightly. B2 stays on the key.

4The cause: an element too simple for swelling

Lithium changes across each element, and so does the swelling it causes. In the simplest (bilinear) element, the stretch in one direction cannot change along that direction, so the element cannot match this swelling. At these mesh sizes the part it misses becomes stress that is not physical, and that false stress feeds the damage. In B2's own control, removing only its four extra modes raised peak damage from 0.27 to 0.95, against an independent reference of 0.27. The modes cut this error; they do not remove every error.

Is the answer key right?

Teng asked: "Are you sure the key is correct?"

Agent A had written its own higher-order solution, without access to the key. It agrees with the key to 0.1 % in peak and total damage. So the gap is in A's and B's elements, not in the key.

What avoids it, and where this holds

A richer description of the displacement than of the other fields ("mixed order") avoids the false stress. B2 got there with four extra displacement modes inside each element, condensed out.

This holds at our parameters and on our meshes: bilinear quadrilaterals up to 32 × 32 on the unit square. We did not assess the authors' simulations, which use other parameters, geometry and elements.

RunHow it computed the hard termHow it described the displacementDamage error
AAn extra pressure field, projectedSimplest (bilinear), same as all fields; 9 evaluation points8.5 %, fails
BThe same idea, generated by our frameworkSimplest (bilinear); 4 evaluation points9.3 %, fails
B2The same idea, generated by our frameworkBilinear plus four extra modes inside each element, condensed out0.55 %, passes

All three chose a sound method for the hard term, the decision the test was built around. The decisive choice was one level deeper.

5B2 took the right path through our framework

Same framework copy as B, different folders. In its first minute B2 opened our mixed-order example. It then did not trust a converging solver: it wrote an independent reference, compared over many cycles on a coarse mesh, saw three times too much damage, named the cause, and fixed it. Each step is timestamped in its log and, independently, in the session record of its tool calls.

RunExample it studiedWhat that example teachesWhat the run then did
Bscalar_diffusion_uelThe same simple element for every field; checked by closed-form forcesSimplest element; closed-form checks of parts; damage 9.3 % off
B2thermo_mechanics_quad8"Mixed-order ... (quadratic u, bilinear T)", with an "Independent physics oracle"Richer displacement than the other fields; independent full reference; 0.55 %

Both examples sit on adjacent lines (42 and 43) of the examples index B read; thermal expansion works like swelling. Nothing in the framework says which example fits a problem where swelling drives stress, so each agent chose its own. B2 does not cite the example; one run each.

  1. Oct 20, 23:10–23:12

    B2 reads the framework

    It opens the skill file, the README, the API guide, the generator source, and our mixed-order example.

    Evidence

    Lines it saw: "Supported as a prototype formulation="local_pressure" path for Quad4 and Hex8 u,mu gel-style elements with one condensed element-local pressure" (skill file) and "Prototype Quad4/Hex8 u,mu path with one condensed element-local pressure" (API guide). From the example: "Mixed-order thermo-mechanical Quad8 UEL (quadratic u, bilinear T)". It did not open the two longer design notes.

  2. 23:27

    It builds its own check

    Before trusting its element, B2 writes an independent higher-order solver from the task text.

    Evidence

    Its log: "Built an independent NumPy high-order Qp reference, with physical shape Hessians and the strong stress gradient, no abaqus_ufl import."

  3. 23:47–23:59

    The check exposes an error

    On a coarse mesh over 20 cycles, its first element predicts about three times too much damage.

    Evidence

    Its log: "n=16 reached d_max=.953 after twenty cycles, versus approximately .294 for the independent strong-gradient Q3 reference. Solver success alone is insufficient evidence of accuracy."

  4. Oct 21, 00:05–00:14

    It names the cause and fixes it

    Cause: false swelling stress in the bilinear element. Fix: four extra displacement modes inside each element, condensed out.

    Evidence

    Its log: "Investigated incompatible/enhanced strain modes to reduce parasitic Q1 swelling stress ... Enhanced strain dramatically improved D0 and severe-load agreement with the independent reference." Its file enhanced_modes.f90 first appears at 00:05:38. Its design note: the generator "does not natively supply this four-mode condensation".

  5. 00:23

    Element final

    B2 freezes its element 74 minutes after launch. Three more hours of its own checks change nothing.

    Evidence

    21 further simulations and 18 reference studies. Its final element is byte-identical to the snapshot we scored at 00:45.

  6. Scored

    Passes every check

    Total damage within 0.55 % of the key, against 8.5 % and 9.3 % for A and B.

    Evidence

    Peak damage 0.66 %, damage field 0.20 %, lithium 0.004 %, on the 32 × 32 mesh. No cutbacks, exact rollback, history never decreases.

Why A and B left it unresolved

  • A saw the gap and read the trend. Its own higher-order reference showed about 14 % damage difference on the 32 × 32 practice mesh (cycle 5). The difference fell with each finer mesh; A wrote "This supports convergence" and finished after 61 of 360 minutes.
  • B checked parts, then its own finer mesh. Its independent checks were closed-form limits of parts of the model. For the whole problem it had "no ... independent full coupled reference". It saw a 9.35 % gap between meshes, and at 20 cycles peak damage of 0.99 on 16 × 16 against 0.37 on 32 × 32, and called it "residual spatial sensitivity". B2 saw the same symptom (0.95 against 0.29) and compared with an independent solution.
  • B's effort went elsewhere. Its review sub-agents spent an hour on time integration and extreme cases.

What in our framework reached B2

  • The mixed-order example (23:10): a displacement one order richer than the other field, and an independent oracle.
  • The skill's rule asking for an independent check "NOT derived from the code under test" (23:10). B2 met it with an independent solution of the whole problem.
  • The generator, which wrote 94 % of B2's code; and a line on condensing an extra unknown inside an element (23:10).
  • Limits. B2 does not cite these files, and its four displacement modes are its own design. Each arm ran once.

Points where the authors' view would help

  • Our restatement. Is the model in Section 1 and in the task (Appendix) a fair reading of the script? For a test like this, would you recommend the script's form of the stress-driven flux or that of eq. 87 of the CMAME paper?
  • The stress-driven term on linear triangles. In the script, displacement and lithium are linear (CG1, lines 144 to 156 of Battery_fatigue_Exm3.py), and the flux takes ∇(g(d) peff) inside each element (line 383). On linear triangles the strain is constant in each element, so the displacement part of this gradient vanishes there, and its jumps between elements do not enter. Is this intended, for example because the coupling (c2 = 1e-23) is small in that example, or is the term treated in a way we missed? We have not run the script.

For reference

Did anything leak to the agents?audit of every command and file

The framework notes B2 read were in the framework's first public release, before this test; none was written for it.

We checked every path in B2's tool calls, its process listings, its 1,173 study files, its starting context and Codex's memory. Nothing outside its workspace was read, and nothing about other runs or the key reached it. A and B were audited the same way: 197 and 1,632 commands, none forbidden. B reported a slip of its own: a process listing that showed unrelated jobs and nothing relevant.

Caveatswhat this test cannot show
  • One run per arm, one agent family (Codex); no other agent was run on this test.
  • B and B2 differ in the sub-agents and in the run itself. The comparison shows that a single agent with the framework can do best, not that it always will.
  • All runs shared a busy computer, so wall times are noisy.
  • The elements ran as compiled code on our Python simulator, not inside Abaqus.
Further reading on this family of modelsbackground, not sources we used

We built the benchmark from the papers and code of Noii et al. (see "Reference work" at the top). These works help to understand the family of models it belongs to. Noii et al. cite some of them; the rest we added. DOIs checked on Crossref, 22 October 2026.

Sources. Our scorer's outputs on copies of each frozen element; the agents' research logs, design notes and status files; the Codex session records, including sub-agents; the trial and build logs. Prepared by Claude (organizer, answer key and analysis) with Teng Zhang. Reference work: Noii, Milijasevic, Waisman and Khodadadian (2024), "Fatigue failure theory for lithium diffusion induced fracture in lithium-ion battery electrode particles", Computer Methods in Applied Mechanics and Engineering 428, 117068, doi:10.1016/j.cma.2024.117068; and its FEniCS implementation, Noii, Milijasevic, Khodadadian and Wick (2024), "An efficient FEniCS implementation for coupling lithium-ion battery charge/discharge processes with fatigue phase-field fracture", Engineering Fracture Mechanics 306, 110251, doi:10.1016/j.engfracmech.2024.110251, with the authors' public code (github.com/noiiG/Battery-Li-Ion-Simulation-Fatigue). The answer key is an independent implementation; no code from the authors' repository is included.

Appendix: the exact task and prompt

Each run received a one-line prompt and a folder with the organizer's note, the task, the simulator and the practice problem. Below are the texts exactly as the agents saw them, with local paths and one internal repository name in brackets.

A.1 The prompt, the same for A, B and B2

Read ORGANIZER_NOTE.md in this folder first, then PUBLIC_TASK.md and host/README.md, and carry out the challenge under the organizer's conditions. Work only inside this folder. End with a short summary of what you reached and what remains unverified.

A.2 How each run was started

A, B: codex exec --skip-git-repo-check -s workspace-write -C [workspace] -o [final summary] "[the prompt]"
B2:   codex exec --disable multi_agent --skip-git-repo-check -s workspace-write -C [workspace] -o [final summary] "[the prompt]"
Each with TMPDIR inside the workspace and a 7-hour hard limit; the budget stated to the agents was about 6 hours.

A.3 The files

Organizer noteread first; run A shown

Organizer note (read this first, then PUBLIC_TASK.md and host/README.md)

You are a test agent in a controlled trial. The challenge is in PUBLIC_TASK.md. These conditions are pinned by the organizer and are identical for every run of this challenge, except the arm line at the end.

Conditions

  • Visibility: this workspace only. No internet, no package installs. Do not read files outside this workspace, except the Python environment and the system compilers named below. Do not search the disk for other copies of this challenge, answer keys or other agents' work. Any such access invalidates the run. Your commands are logged and audited.
  • Temporary files: only under tmp/ in this workspace (TMPDIR points there). Do not write to /tmp or your home directory.
  • Environment: use [local Python environment]. Put its bin/ first on PATH: export PATH=[local Python environment]/bin:$PATH. It has Python 3.13, numpy, scipy, sympy, gfortran, meson and ninja (for numpy.f2py).
  • The host in host/ is part of the challenge. Use it as it is; do not modify it. Your element is scored on an unmodified copy.
  • Abaqus is not available. Do not claim Abaqus execution.
  • No human help. Nobody will answer questions. Make reasonable decisions and record them.
  • Time budget: about 6 hours of wall-clock time. Stop when done or when the budget is used, and report what you actually reached.

Deliverables

As listed in PUBLIC_TASK.md §5: element/ (source and uel_contract.json), design.md, verification/, research_log.md and STATUS.md. Do not hard-code answers: the organizer runs your compiled element on hidden problems on the same host and compares with an independent reference.

Your arm: A (direct)

Do not use abaqus_ufl in any form: not the public package, not a bundled copy, not its generators, templates, skills or examples, and no code derived from it. The host in host/ is the only part of it you get, and only as the host. Write the UEL directly from the equations. General libraries in the environment (numpy, scipy, sympy) are allowed.

Arm lines for B and B2replace the arm line at the end of the note

Your arm: B (with abaqus_ufl as a tool)

You may use tools/abaqus_ufl/, the abaqus_ufl code generator at the pinned public commit a02ed7c (18 October 2026), with its documentation and its AI skill (ai_skills/abaqus-ufl/). Import it by putting tools/abaqus_ufl on PYTHONPATH. Use it to create the UEL where it fits. Where the task needs something it does not support, extend it or write that part yourself, and document it. Record what you used, every modification, and how much of the Fortran was generated versus hand-written. Do not imply capabilities it does not have.


B2 only, added:

Single agent

Work as a single agent. Sub-agents are not available in this run. Where the abaqus_ufl skill suggests an independent or multi-agent review, do that review yourself and record it.

PUBLIC_TASK.mdthe full problem statement

Robust UEL challenge v2: chemo-mechanics with fatigue damage

Goal. Build an Abaqus/Standard user element (UEL) that solves the model below robustly in a global analysis. The model is fixed. The formulation is yours to choose. Explore the problem, decide how to discretize it, and show that your element works on meshes, through damage growth and over many load cycles.

This is a reproduction and engineering task based on a published model (Noii et al. 2024, lithium diffusion with swelling and fatigue phase-field fracture). It is not a test of new physics.

1. The model (fixed)

The fields are the displacement u (2D, unit thickness), the concentration c and the damage d. Everything is dimensionless and small-strain.

Constitutive laws

  • ε = sym ∇u, ε_e = ε − β (c − c0) I
  • σ_eff = 2μ ε_e + λ tr(ε_e) I, μ = E / [2(1+ν)], λ = Eν / [(1+ν)(1−2ν)]
  • g(d) = (1 − κ)(1 − d)² + κ, σ = g(d) σ_eff
  • p_eff = tr(σ_eff) / 3
  • J_c = g(d) D ∇c − χ c ∇(g(d) p_eff)

Here I is the 2×2 identity and tr the 2D trace; p_eff divides by 3. These conventions come from the authors' public script. They are part of the model: you may discuss them, but implement them as stated, so that results can be compared.

Balance laws (in Ω, for t > 0)

  • ∇·σ = 0
  • ∂c/∂t = ∇·J_c
  • −ℓ² Δd + d − (1 − κ)(1 − d) H = 0

Natural boundary conditions are traction-free, zero flux and ∇d·n = 0, except where the host prescribes values.

History (pointwise, irreversible)

  • ψ⁺ = (K/2) ⟨tr ε_e⟩₊² + μ dev₂(ε_e) : dev₂(ε_e), with K = λ + (2/3)μ
  • W = g(d) ψ⁺
  • α(t) = accumulated increase of W, so α grows only when W grows
  • f(α) = 1 for α ≤ α_T; otherwise f(α) = max(1e-15, [max(0, 1 − k_fg log10(α/α_T))]²), with k_fg = 0.5
  • G_f = G_c f(α)
  • H(t) = max over s ≤ t of 2ℓ ψ⁺(s) / G_f(α(s))

H, α and W may change only on accepted increments. A Newton iteration or a rejected increment must leave no trace in them.

Parameters

E ν β c0 κ D χ ℓ G_c α_T
10 0.28 0.035 0.35 1e-5 0.14 0.25 0.12 set in the problem file set in the problem file

2. What is yours to decide

  • How to compute ∇(g p_eff). Note that p_eff already depends on ∇u. How you discretize this term is your decision. Justify it with evidence, including how it behaves under mesh refinement.
  • The discretization. You choose the interpolation and quadrature for each field, and whatever nodal or element-local variables your formulation needs (declare them in the contract).
  • The history update. You choose how and when H, α and W are updated and stored.
  • Failure behaviour. You choose how the element behaves on invalid states, and how it asks the host for a smaller increment (PNEWDT).
  • Anything else robustness needs.

The mesh topology is fixed to 4-node quadrilaterals, which may be non-affine and moderately distorted. Explain every choice and the alternatives you rejected, with evidence.

3. The host

host/ is the solver part of abaqus_ufl.fe, which plays the role of Abaqus/Standard. It calls your compiled UEL through the standard argument list, with: - one monolithic Newton per increment, with a line search; - start-of-increment SVARS at every call, kept only after convergence and restored on rejection; - cutbacks when PNEWDT < 1 or Newton fails.

Read host/README.md first. It states every argument the host passes, the time convention, and the format of element/uel_contract.json. In the contract you name your PROPS, so the host can set the model parameters, and you point to your stored H and α, so the scorer can check them.

host/run_problem.py runs the development problem D0 (host/dev_problem/d0.json, a square without a crack under cyclic charging) on structured or distorted meshes, and writes observables computed by the host from your nodal values. Use it to test your element globally.

4. What "robust" means (how you will be judged)

The organizer runs hidden problems on the same host. They are similar to the development problem but use other boundary conditions, loading, parameters and meshes. No element-level answer key is used, because formulations differ. 1. Convergence. Under mesh and time-step refinement, the fields and observables converge to an independent reference solution of the PDE. The observables are the maximum damage, the integrals of d and c, and the elastic energy, over the cycles. This is tested on structured and distorted meshes. 2. History. H and α never decrease. A forced rejected increment leaves no trace. Results are stable under time-step refinement. 3. Solver behaviour. Newton converges through damage growth up to d near 1. The element survives cutbacks, a large-step run and a direct DTIME = 0 call, and returns no NaN. - Hidden state: two runs reject the same increment, one after your UEL has seen the trial states and one before. They must agree exactly, so all memory must be in SVARS. 4. Your design. Whether your formulation choice is justified by evidence. 5. Honesty. Whether your claims match what you checked.

5. Deliverables

  • element/:
  • the UEL source (standard signature);
  • uel_contract.json in the format of host/README.md §2: DOF names, named PROPS, the SVARS layout with history_slots, LFLAGS, and residual scales.
  • design.md: the formulation, the alternatives considered, and why you chose as you did.
  • verification/: your tests and your global studies on the host (mesh and time-step studies), with results.
  • research_log.md: times taken from the clock (date), failed attempts and pivots.
  • STATUS.md: what works, what does not, and what is unverified.

6. Conditions

  • Isolation: offline, no installs, this workspace only.
  • Environment: [local Python environment].
  • No Abaqus.
  • Budget: about 6 hours.
  • No human help.
  • Arm: the arm line, with or without abaqus_ufl, is given in ORGANIZER_NOTE.md.
host/README.mdhow the simulator calls the element

The v2 host: how your UEL is called

The host is the solver part of abaqus_ufl.fe ([internal lab repository], commit 9ac03e8), vendored in hostfe/. It plays the role of Abaqus/Standard. It calls your compiled UEL through the standard argument list and solves the global problem. The organizer scores your element on this same host.

1. How the host calls your UEL

Every value below is fixed; none is left for you to guess.

Argument What the host passes
NNODE, MCRD 4, 2. Nodes are counter-clockwise; COORDS(1:2, a) is node a
NDOFEL, NRHS, MLVARX 4 × dof_per_node, 1, NDOFEL
U, DU Current nodal values in your dof_names order, node by node. DU = U − (accepted values at the start of the increment). So previous values are U − DU
PROPS, NPROPS Your props, with every entry named in prop_names that is a model parameter overwritten by the problem's value
JPROPS, NJPROP Your jprops (NJPROP = its length; 0 if empty)
SVARS, NSVARS Start-of-increment values at every call of the increment. After a converged increment, the host calls your UEL once more at the converged state, and keeps the SVARS that call returns. A rejected increment restores the previous SVARS. Initial values: your svars_initial (default 0)
LFLAGS Your lflags (default 1, 0, 1, 0, 0, 0). LFLAGS(3) = 1 asks for both RHS and AMATRX
TIME(1), TIME(2) Both equal the time at the end of the increment. This is the abaqus_ufl.fe convention; Abaqus itself passes the beginning
DTIME The increment length. It is always > 0 in solves. The scorer also makes one separate call with DTIME = 0 (§4)
KSTEP, KINC, JELEM 1, 1, element index + 1
PNEWDT 1 on entry. Return a value < 1 to reject the increment: the host restores SVARS and retries with a step halved, up to 10 times
RHS, AMATRX The host uses R = −RHS and K = AMATRX = dR/dU. K may be unsymmetric
ENERGY, V, A, PREDEF, PARAMS, loads Unused: zero arrays and no distributed loads

The global solve. - Newton: one monolithic Newton iteration over all DOFs per increment, with a line search. - Convergence: judged on the residual, weighted per field by your residual_scale (default 1), and on the update. - Dirichlet conditions are applied by the host, as described in §3.

2. element/uel_contract.json

{
  "source": "element/uel.f90",              // or a list of files; compiled in this order
  "compile_flags": [],                       // extra gfortran flags, e.g. ["-ffixed-line-length-none"]
  "dof_per_node": 4,                         // more if your formulation adds nodal variables
  "dof_names": ["ux", "uy", "c", "d"],       // must include these four; name any others yourself
  "abaqus_dofs": [1, 2, 11, 12],             // the Abaqus DOF numbers you would use
  "prop_names": ["E", "nu", "beta", "c0", "kappa", "D", "chi", "ell", "G_c", "alpha_T", "k_fg", "my_flag"],
  "props": [10.0, 0.28, 0.035, 0.35, 1e-5, 0.14, 0.25, 0.12, 1.0, 1.0, 0.5, 0.0],
  "jprops": [],
  "nsvars": 0,                               // your SVARS length per element
  "svars_initial": null,                     // or a list of length nsvars, per element
  "history_slots": {"H": [], "alpha": []},   // 1-based SVARS indices of H and of alpha, one per point where you store them
  "lflags": [1, 0, 1, 0, 0, 0],
  "residual_scale": {"c": 1.0}               // optional characteristic size per named field
}

The // comments above are explanation only; the real file must be plain JSON.

The model parameter names the host fills in are E, nu, beta, c0, kappa, D, chi, ell, G_c, alpha_T and k_fg. history_slots must point at every stored value of H and of α, because the scorer checks that they never decrease. The host prescribes values only for ux, uy, c and d; any further nodal variables get natural boundary conditions.

3. Problem D0, the development problem

The problem is in dev_problem/d0.json (parameters, loading and boundary conditions). There is no crack. - Domain: Ω = [0,1]². - Constraints: u_x = u_y = 0 at (0, 0); u_y = 0 at (1, 0). Otherwise traction-free. - Concentration: c = c0 + A[1 − cos(2πt/T)]/2 on the top edge y = 1; zero flux elsewhere. - Damage: ∇d·n = 0 on the whole boundary. - Initial state: u = 0, c = c0, d = 0, and zero history.

To run it:

export PATH=[local Python environment]/bin:$PATH
python host/run_problem.py . --mesh structured --n 16            # also: --mesh distorted --seed 1
python host/run_problem.py . --mesh structured --n 32 --steps-per-cycle 80 --cycles 5

Each run writes verification/runs/D0_<mesh>_<n>_s<seed>_spc<steps>/: - observables.csv: d_max, A_damage, D_int, C_int and E_el per accepted step, computed by the host from your nodal values (observables.py); - fields_cycle_XXX.npz: nodal values and SVARS at the end of each cycle; - run.json: the solver summary, including history_min_change, the smallest change of each history_slots entry between accepted steps.

Meshes: meshes.py, with structured or distorted 4-node quadrilaterals and n a multiple of 8.

4. What the scorer adds on top of D0

The scorer uses hidden problems with other boundary conditions, loading and parameters, on structured and distorted meshes, with the same host and the same contract. One of them drives the damage to 1. On top of those it runs: - History checks: H and α (your history_slots) never decrease. - A hidden-state test: two runs reject the same increment, one after your UEL has seen the trial states and one before. They must give identical results, so all memory must be in SVARS. - A DTIME = 0 call: one call at a typical state must return finite arrays or PNEWDT < 1. It must not crash. - A large-step run: a quarter of the steps per cycle, completed through cutbacks or directly. - Newton statistics per increment.

Practice problem file (D0)host/dev_problem/d0.json
{
 "id": "D0",
 "name": "D0 smooth square, cyclic charging on the top edge, no crack",
 "parameters": {
  "E": 10.0,
  "nu": 0.28,
  "beta": 0.035,
  "c0": 0.35,
  "kappa": 1e-05,
  "D": 0.14,
  "chi": 0.25,
  "ell": 0.12,
  "G_c": 3.5e-06,
  "alpha_T": 0.0001,
  "k_fg": 0.5
 },
 "loading": {
  "A": 0.45,
  "T": 8.0,
  "N_cyc": 20,
  "steps_per_cycle": 40
 },
 "c_edges": [
  "top"
 ],
 "notch": null,
 "constraints": [
  [
   0.0,
   0.0,
   [
    "ux",
    "uy"
   ]
  ],
  [
   1.0,
   0.0,
   [
    "uy"
   ]
  ]
 ]
}

The hidden problem files are not shown, so that the hidden problems stay usable for later tests. Section 1 describes them.