Skip to content

Examples

New to AgentFEM? Explore three practical starting points: AI-assisted simulation, learning from finite-element data, and an interactive structural-design demonstration.

Examples are executable parts of the software, not screenshots of possible features. Each example identifies the physical problem, numerical route, important output, and present maturity. Release examples carry numerical contracts; engineering examples exercise broader workflows that still require problem-specific qualification.

Example index

Example Physics and procedure Maturity
Wave packet with an inclusion Heterogeneous solid wave, explicit central difference Release
2D static elasticity Plane-strain linear solid, direct linear solve Release
NAFEMS LE10 3D elasticity Curved quadratic 3D solid, pressure, external stress target Release
Axisymmetric thick cylinder Full-revolution linear solid, direct linear solve Release
Transient heat transfer Heat equation, backward Euler Release
Modal cantilever Linear solid, generalized Hermitian eigensolve Engineering
NAFEMS R0016 Test 5H direct harmonic response 3D linear solid, Rayleigh damping, direct frequency sweep Engineering
Abaqus periodic hyperelastic cell Imported 3D quadratic mesh, equations, finite strain Engineering
Implicit creep relaxation 3D power-law creep, global/local Newton and cutback Engineering
Viscoelastic relaxation 3D generalized-Maxwell equilibrium, exact state and restart Engineering
Viscoelastic harmonic response 3D generalized-Maxwell direct frequency-domain response Experimental
Elasticity surrogate campaign Repeated FEM, accepted dataset, surrogate and fallback Release
Science supershear data protocol Public-data identity, XLSX inspection, research handoff Experimental

Wave packet with an inclusion

Release

A Gaussian-modulated elastic wave crosses a stiff circular inclusion. The workflow brings together heterogeneous material regions, explicit central difference, a time-dependent source, periodic projection, an absorbing boundary, probes, progress events, and time-series fields.

Read the complete flagship example · Source code

2D static elasticity

Release

A compact cantilever demonstrates Study, mesh, named boundaries, displacement, isotropic elasticity, strong constraints, traction, a linear step, standard U/S/E/MISES output, a Golden observable, and release-quality verification.

python examples/static_elasticity_2d.py

Source code · Linear-solid guide · Golden benchmark record

NAFEMS LE10 3D elasticity

Release

The public NAFEMS LE10 thick elliptical plate exercises the complete 3D static-solid workflow: curved quadratic hexahedral geometry, quadratic displacement, component constraints, surface pressure, standard result fields, stress recovery, force balance, and energy balance. The versioned mesh obtains \(\sigma_{yy}(D)=-5.399\) MPa, 0.35% from the published -5.38 MPa target, and retains AgentFEM's unsmoothed DG0 stress as the default scientific field.

python examples/nafems_le10_3d.py

Source code · Benchmark record · NAFEMS benchmark index

Axisymmetric thick cylinder

Release

A Q2 meridian model of a long pressurized cylinder demonstrates native axisymmetric strain, full (r, theta, z) stress, the 2*pi*r physical measure, pressure loading, standard output, and comparison with the analytical Lamé solution. The same formulation is consumed by the stateful J2 and implicit creep providers.

python examples/axisymmetric_thick_cylinder.py

Source code · Solid-mechanics guide · Benchmark record

Transient heat transfer

Release

This case exercises capacity and conduction operators, backward-Euler time integration, accepted-increment progress, temperature histories, unified field output, and a release Golden observable.

python examples/transient_heat_2d.py

Source code · Heat-transfer guide

Engineering

A quadratic plane-stress cantilever exercises the public linear modal procedure: constrained stiffness and consistent mass assembly, SLEPc's generalized Hermitian eigensolve, positive natural frequencies, mass-normalized mode fields, eigenpair residuals, orthogonality, cluster semantics, and serial/two-rank agreement. Mode fields are relative spatial patterns; they are not physical displacement amplitudes.

python examples/modal_cantilever_2d.py

Source code · Dynamics guide · Benchmark record

NAFEMS R0016 Test 5H direct harmonic response

Engineering

This public three-dimensional forced-vibration comparison exercises the provider-neutral direct harmonic procedure with visible stiffness, mass, viscous damping, loss stiffness, and load operators. The frozen 50-point frequency sweep checks peak frequency, displacement amplitude, a declared stress-recovery channel, residual, cyclic energy balance, applied resultant, serial/two-rank agreement, and portable scalar-ledger restart. Its acceptance limits are AgentFEM release gates, not NAFEMS tolerances.

0.3.3 evidence and numerical comparison · Executable benchmark · Benchmark record

Abaqus periodic hyperelastic cell

Engineering

This workflow directly imports an Abaqus C3D10H mesh and equation constraints, preserves quadratic-node and hybrid/constant-pressure identity, solves a P2/DG0 finite-strain Neo-Hookean problem with exact periodic constraints, and writes homogenized and visualization results.

Research background. This benchmark is informed by Haoming Luo's work with Julie Diani, Kostas Danas, and Zahra Hooshmand-Ahoor on the finite-strain response of nonlinear elastic composites containing particles or voids: Numerical estimation via remeshing and analytical modeling of nonlinear elastic composites.

Read the complete periodic-cell workflow before running the case; it explains the source files, element mapping, periodic semantics, nonlinear controls, and output.

Source directory · Finite-strain theory

Implicit creep relaxation

Engineering

A three-dimensional power-law creep problem exercises quadrature state, backward-Euler constitutive integration, analytical consistent tangent, physical-time automatic incrementation, rollback/cutback, creep output, energy evidence, and restart. The same global step can consume a prescribed temperature field through the Arrhenius material factory.

python examples/implicit_creep_relaxation_3d.py

Source code · Creep and inelasticity · Constitutive equations

Viscoelastic relaxation

Engineering

A three-dimensional generalized-Maxwell solid is ramped to a prescribed strain and then held. The global Step combines exact Prony-branch updates, committed quadrature state, incremental equilibrium, standard stress/strain/ energy fields, nonnegative viscous dissipation, temperature-shift support and restart. Its automated homogeneous patch matches the closed-form stress after both the ramp and hold. A separate three-dimensional traction-controlled rod test matches the published Abaqus 0.001 s and 50 s creep response.

python examples/viscoelastic_relaxation_3d.py

Source code · Dynamics and viscoelasticity · Golden benchmark record · External rod benchmark

Viscoelastic harmonic response

Experimental

A three-dimensional generalized-Maxwell bar demonstrates one material-specific consumer of the direct harmonic procedure without requiring a complex PETSc build. Storage and loss stiffness, optional inertia and a load phasor are lowered to one exact real block system; the common result publishes real, imaginary, amplitude and phase displacement fields together with material-loss evidence. This material coupling remains experimental even though the generic linear structural direct harmonic procedure is engineering maturity.

python examples/viscoelastic_harmonic_3d.py

Source code · Direct harmonic response · Golden benchmark record

Hot-wall creep assessment

Engineering

The hot-wall case performs a thermal/thermoelastic finite-element workflow and then an explicitly identified local creep assessment. It demonstrates how the software distinguishes a global field solution from a material-point or assessment-level model.

python examples/creep_hot_wall_assessment.py

Source code

Elasticity surrogate campaign

Release

The campaign varies declared parameters, runs the same finite-element model, records failures and evidence, creates an accepted scientific dataset, trains a surrogate, checks its applicability domain, and retains an FEM fallback.

python examples/static_elasticity_surrogate_campaign.py

Source code · Simulation to learning

Science supershear data protocol

examples/science_supershear_v5_protocol.py verifies the pinned Dryad file identities and inventories the public Science 2023 crack-speed, wave-speed, Mach-cone, material-response, and SED/KED workbooks. It is the data boundary for the Science Supershear V5 protocol, not a parameter fit disguised as an example.

Reading an example

Do not copy only the final solver call. Read the Study, dimensional assumption, mesh and regions, material data, loads and constraints, procedure, output request, result policy, and benchmark evidence as one scientific workflow. When adapting an example, any change to physics, discretization, material law, or loading may require new verification evidence.