The FEniCS Project is a popular and open-source finite element analysis (FEA) framework for mathematical modeling and physics simulations with the Python programming language. In contrast to more specialized solvers, such as OpenFOAM and SU2 Code for computational fluid dynamics (CFD), and CalculiX and Code Aster for structural mechanics, FEniCS is aimed at modeling and solving general systems of partial differential equations (PDE), such as can be found in coupled multiphysics, continuum mechanics, and computer aided engineering (CAE) problems.
Simulation and visualization courtesy of the fenics-hpc project.
FEniCS GUI & Solver Interface
One of the special features of the FEATool Multiphysics toolbox is that it provides simple and convenient “one-click interfaces” to several different physics and PDE solvers. This means that you only have to set up and define your mesh and model once, and can then seamlessly switch between using the built-in multiphysics solver, or the OpenFOAM and SU2 CFD solvers, and now also the FEniCS FEA solver. This unique multi-simulation solver functionality allows you to use the best and most efficient solver for the job, as well as validate and verify (V&V) engineering simulations by easily comparing results produced by different state-of-the-art physics solvers.
Define and run FEniCS and Python multiphysics simulations without having to learn a new PDE language and syntax!
Multiphysics Simulation Scripts for Python
As both FEATool Multiphysics and FEniCS use the finite element method (FEM) to define and discretize equations, FEATool can automate and directly make 1-to-1 translations of the PDE equation syntax and FEA simulation models to equivalent Python multi-physics scripts for FEniCS. These scripts can both be inspected, edited, and customized directly in the FEniCS GUI allowing for running and interfacing Python simulation scripts directly with the FEATool toolbox.
Supported FEATool-FEniCS Features
The FEATool-FEniCS GUI and solver integration makes it quick and easy to define and run advanced physics, PDE, and engineering simulations. The FEniCS interface includes all of the following functionality
Set up and perform fully coupled FEniCS and multi-physics simulations in an easy-to-use GUI with fully integrated 3D geometry modeling and computer aided design (CAD) tools, automatic mesh generation, postprocessing and visualization.
Pre-defined physics modes and equations for fluid mechanics, structural mechanics, heat and mass transfer, and electromagnetics simulations.
Full support for stationary, time dependent and instationary, linear static, as well as non-linear and dynamic simulations.
Designed for high performance and solving systems in parallel with a large selection of advanced and efficient linear equation system solvers, such as the PETSc solver framework.
Easy Python and MATLAB programming and scripting APIs, for advanced simulation control, running parametric studies, or custom postprocessing and visualization of simulation results.
As FEATool fully automates the simulation set up and control process, user do not need to know or learn the FEniCS syntax or even Python. However, advanced users can still view and modify the equation forms and Python scripts directly in the simulation interface to customize and define more advanced simulation cases.
Some further details on simulation conversions and supported functionality of the FEniCS simulations
Constant, and complex non-linear equation and boundary coefficients are also fully supported, and can involve expressions of dependent variables, derivatives, time, space, mathematical expressions (such as
sin, cos, log
), and logical switch expressions (for examplex>1 & y<=0.5
). FEATool automatically converts these expressions to valid Python or equivalent C++ syntax. A perfectly valid combined equation coefficient or boundary expression can for example look likex*sin(2*pi*t)
.As FEniCS currently does not feature built-in time dependent solvers, FEATool automatically converts instationary equations to either use first order implicit backward Euler, or second order Crank-Nicolson time discretization schemes.
Both FEATool Multiphysics and FEniCS use the same finite element basis functions and PDE discretizations, and fully support higher-order FEM spaces to ensure accurate solutions and calculation of quantities such as boundary and subdomain integrals, and evaluation and analysis of simulation results.
In addition to fully supporting FEniCS, the Python simulation scripts can technically also be compatible with the Firedrake project solver which also uses the FEniCS Unified Form Language (UFL) and syntax to define simulation problems.