Skip to content

Solver integration

Rend can automatically generate material subroutines for supported finite-element solvers.

Enable the corresponding export option in MaterialRegressor. When regressor.run() finishes, the generated files are available in the results directory and through the Exports section of the HTML report.

The generated subroutines must then be compiled and verified in the target solver.

Target Option when fitting Supported material
Abaqus/Standard UHYPER export_uhyper=True Compressible and incompressible isotropic hyperelasticity
CalculiX ABAQUSNL UMAT export_calculix_umat=True Compressible isotropic hyperelasticity in 3D solids with a \(J\)-dependent energy

Use export_json=True to retain the interchange file alongside solver artifacts. Both adapters share the invariant derivatives. They map \(I_1=J^{2/3}\bar I_1\), \(I_2=J^{4/3}\bar I_2\) and \(I_3=J^2\), preserving shifts such as I1_bar - 3 and J - 1 from the expression tree. The report identifies any unsupported operators.

The Rend wheel includes both adapters. Transfer the generated files to the solver host for compilation and verification.

Abaqus UHYPER

Set export_uhyper=True as in the Treloar example. The report links the generated Fortran source, an Abaqus/Standard one-element deck and a *.expected.json manifest with reference results and comparison instructions.

Run the deck with its generated subroutine in an Abaqus environment configured with a supported Fortran compiler. When gfortran is available during a Rend fit, Rend also compiles and checks the energy and derivatives in an independent material-point driver.

UHYPER gives Abaqus the energy and its derivatives with respect to the isochoric invariants and the volume ratio. The generated routine targets hyperelasticity without Mullins softening.

CalculiX ABAQUSNL UMAT

The adapter returns corotated Cauchy stress and its analytic tangent with respect to the logarithmic strain supplied by CalculiX. The fitted energy supplies the volumetric response.

Set export_calculix_umat=True and copy the generated model_NNN_umat.f90 file and your CalculiX input deck to Linux. In that directory, compile the UMAT into a shared library against LAPACK and BLAS, substituting your source filename as needed. The generated source contains the material law and builds independently of Rend.

gfortran -shared -fPIC rend_umat.f90 -o libREND.so -llapack -lblas

In the CalculiX input deck, use the matching @ABAQUSNL_ material name and attach it to a 3D solid section. The generated energy contains its coefficients, so the single user-material constant is a placeholder.

*MATERIAL, NAME=@ABAQUSNL_REND
*USER MATERIAL, CONSTANTS=1
0.
*DEPVAR
1
*SOLID SECTION, ELSET=EALL, MATERIAL=@ABAQUSNL_REND
,

Use a nonlinear geometry step (NLGEOM=YES) and a CalculiX build with CALCULIX_EXTERNAL_BEHAVIOURS_SUPPORT enabled. Run LD_LIBRARY_PATH="$PWD:${LD_LIBRARY_PATH:-}" ccx -i job in the directory containing job.inp and libREND.so. CalculiX dynamic loader

Export from a saved JSON

If you already have a material JSON, generate solver files from it without running another search. For example, generate Abaqus UHYPER files with:

python -m rend.json_interchange model_001.json --backend abaqus_uhyper --output-dir solver

Use --backend calculix_umat for CalculiX, or call export_solver_from_json from the Python API.

Benchmark verification

The benchmark run used the saved rend.material.v4 exports from both search configurations and the successful archived Treloar run. Each row counts model occurrences. The recorded fixture index identifies the source run, model and applicable backend, and records the exclusions. Paths in the index refer to the original run archive. The current adapters require isotropic profiles. A CalculiX candidate also needs a \(J\)-dependent energy.

Benchmark dataset Compiled UHYPER material-point checks CalculiX one-element solves
Treloar rubber 136 / 136 passed Incompressible profile outside this adapter's scope
Soft elastomer 85 / 85 passed Incompressible profile outside this adapter's scope
Footwear heel foam 216 / 216 passed 133 / 158 passed (84.2%)
Total 437 / 437 passed 133 / 158 passed
  • UHYPER: gfortran compiled the routines. A standalone driver checked energy and invariant derivatives at three physical deformation states. An Abaqus/Standard job remains a separate verification step.
  • CalculiX: the CI dynamically loaded each eligible UMAT. Passing cases finished the free-DOF one-element solve and matched independent stress and displacement references. The 25 cases that failed were all foam models, with 11 from the searches with optional checks and 14 from searches without them.
  • Rend FEM follow-up: all 25 of those foam models also failed both FEChecks.robustness and FEChecks.convergence on their original benchmark configuration. Robustness stopped at a failed equilibrium solve for 24 models and at a nonfinite FE energy or gradient for one. The convergence checks stopped at the equilibrium solve before mesh and increment comparisons. These checks flagged the same candidates under a different loading setup, so the specific causes of the CalculiX failures remain open.

Write another solver integration

Use the solver adapter development skill with an AI coding agent, or follow these steps:

  1. Load the material. Start from rend.material.v4 with rend.json_interchange.load_material_json(path), or decode the documented tree with an allowlist for node types and operators. Check schema, unit, profile and reference directions before generating source.
  2. Map the solver's inputs to the energy. Identify its deformation or strain variables, invariant conventions and material axes. Keep all fitted constants and offsets. For an invariant-based isotropic adapter, see the shared conversion and derivatives in rend.solver_integration.invariants. Report unsupported expressions with their operator names.
  3. Implement the constitutive interface. Generate the required stress measure and tangent by differentiating \(W\) and applying the chain rule in the solver's variables. Check its component order, shear convention and finite-strain stress frame. For incompressible laws, handle pressure through the solver's incompressibility formulation.
  4. Verify the material point. Compare generated results against independent energy, stress and derivative evaluations for representative deformations. The standalone_fortran JSON backend can also generate a portable energy kernel for diagnostics.
  5. Verify the solver. Compile and load the adapter in the target solver. Check stresses and reactions in a prescribed deformation case, then use a free-DOF case to exercise equilibrium and the tangent. Use the JSON validation intervals to choose sampled operating paths, and the HTML report to investigate any limits or failures.

For selecting a candidate and documenting evidence for a specific application, see validation for engineering decisions.