HyperFEM tutorials

Tutorials of HyperFEM.jl, a library of the Gridap ecosystem for the finite-element simulation of multiphysics problems with hyperelastic materials: thermo-, electro- and magneto-mechanics at finite strains, contact, fluids, transient problems and solvers for large systems.

Every tutorial is a self-contained Julia script in the src/ folder of the repository. Its page explains the problem, the equations and every step of the code, and links to a Jupyter notebook generated from the same script. Each script ends with quantitative checks of its result (exact solutions, published benchmarks, conservation laws), which are also the test suite of the repository.

Getting started

git clone https://github.com/MultiSimOLab/HyperFEMTutorials.git
cd HyperFEMTutorials
julia --project=. -e 'using Pkg; Pkg.instantiate()'
julia -t 4 --project=. src/E02_Hyperelastic_stretch.jl

The tutorials need Julia 1.12 or later and use HyperFEM 0.3, HyperFEMKernels 0.2.6 and Gridap 0.20.8. See Running and testing for reduced cases, notebooks and tests.

Tutorials

NºTutorialWhat it shows
01Poisson equationlinear problems, Dirichlet and Neumann conditions, convergence under refinement
02Uniaxial stretch of a hyperelastic barconstitutive models, load stepping, Newton–Raphson, post-processing
03Fibre-reinforced cylinder under internal pressureanisotropic models, fibre fields, follower pressure
04Electro-mechanics of a dielectric elastomermulti-field problems, coupled weak forms
05Anisotropic electro-mechanicscomposition of models, extra arguments of the constitutive functions
06Third-medium contactcontact through a soft medium, injectivity line search, hybrid Newton
07Topology optimisationin preparation (HyperShape)
08Magneto-mechanical hMRE beamhard-magnetic soft materials, lagged loads
09hMRE beam in vacuum: staggered solutionstaggered models, coupling between meshes, transfers
10Stokes flow around a cylindermixed and stabilised formulations
11Transient Navier–Stokes flow around a cylindertime integration with TransientModel, benchmarks
12Pulsatile blood flow in a patient aorta3D transient flow, Windkessel outlet conditions
13Linear solvers for large problemsdirect, Krylov and algebraic multigrid solvers, inexact Newton
14Geometric h- and p-multigridmesh hierarchies, matrix-free p-multigrid
15Elastodynamics: free vibration of a cantileverstructural dynamics, energy conservation
16Visco-electro-mechanics: creep of a dielectric bimorphgeneralised Maxwell viscoelasticity, internal variables, quasi-static time stepping
17Thermo-mechanics: transient heat conduction and thermal expansioncoupled thermal and mechanical fields, weak forms from the energy, adaptive BDF2
18Explicit dynamics: wave propagation in a barcentral differences, lumped mass, critical time step, wave speed
19Constitutive models: energies, stresses and tangentsthe constitutive-model API, homogeneous tests, writing your own model

How to cite

If you use HyperFEM, please cite

C. Perez-Garcia, R. Ortigosa, J. Martínez-Frutos and D. Garcia-Gonzalez, Topology and material optimization in ultra-soft magnetoactive structures: making advantage of residual anisotropies, Adv. Mater. (2025) e18489, https://doi.org/10.1002/adma.202518489,

together with the citations requested by Gridap.