A collection of FEniCS finite element codes for a wide array of coupled-physics theories in solid mechanics.
Constructed by Eric M. Stewart and Lallit Anand.
A selection of example codes are currently provided for:
- Finite elasticity
- Finite thermo-elasticity
- Gel mechanics
- Gel thermo-mechanics
- Chemo-mechanically coupled Cahn-Hilliard
- Electro-elasticity of dielectric elastomers
- Finite deformation viscoelasticity with inertial effects
- Electro-viscoelasticity of dielectric elastomers with inertial effects
- Finite deformation rate-independent isotropic plasticity
We recommend running the FEniCS codes locally and using ParaView to visualize the results. Local installation can be quite tricky and is highly platform-dependent; my FEniCS installation instructions for Mac and Windows machines are available here:
Alternatively, you can run any FEniCS *.py code hosted on a public GitHub repository "in the cloud" (in your web browser, without a local installation) by following the instructions in this Google Colab web notebook:
If you use these codes in your own research, cite both of the following:
-
E. M. Stewart and L. Anand. Example codes for coupled theories in solid mechanics, 2023. URL https://github.com/SolidMechanicsCoupledTheories/example_codes.
-
L. Anand, E.M. Stewart, & S.A. Chester. Introduction to coupled theories in solid mechanics. Oxford University Press, 2026.
