FEATool Multiphysics

Frequently Asked Questions FAQ

FEATool Multiphysics - Frequently Asked Questions FAQ
FEATool Multiphysics - Frequently Asked Questions FAQ

⊕ General information

⊖ General information

What is FEATool Multiphysics?


FEATool Multiphysics is short for Finite Element Analysis Toolbox for Multiphysics, and is a fully integrated simulation software for modeling and simulation of partial differential equations (PDE), continuum mechanics, physical processes, and engineering applications.

What kind of problems can FEATool Multiphysics solve?


FEATool Multiphysics can model and solve general systems of coupled partial differential equations (PDE) which enables simulation of many types of physical phenomena found in continuum mechanics, such as heat and mass transfer, computational fluid dynamics (CFD), structural mechanics (SME), computational electromagnetics (CEM), and chemical, transport, and reaction engineering problems.

What are the benefits of using FEATool Multiphysics?


FEATool Multiphysics is designed to be very easy to use and a fully integrated simulation package including CAD and geometry modeling tools, preprocessing and automatic grid generation, solvers, and post processing. This makes it possible to very quickly set up simulation experiments and test ideas, all in the same program so that the time to (start) solution is very short. Moreover, since FEATool can integrate seamlessly with MATLAB one can also leverage the m-scripting language and MATLAB toolboxes together with FEATool.

What is the design philosophy behind FEATool?


FEATool is specifically designed to be easy to use, and also very general so that any kind of equation or problem can be studied. Moreover, FEATool feature optional native integration with MATLAB, and is extensible so as to interface with other software and simulation tools such as OpenFOAM, FEniCS, SU2 Code, Gmsh, ParaView, and Plotly.

What programming language is FEATool written in?


The FEATool interface is written in the MATLAB m-code script language, and is therefore also extensible so users can call their own preprocessing, solvers, postprocessing routines through hooks, API, and function overloading.

What is CFDTool?


CFDTool is a GUI toolbox specifically designed to make Computational Fluid Dynamics (CFD) simulations easy.

What are the differences between FEATool Multiphysics and CFDTool?


CFDTool is based on FEATool Multiphysics code base, and is a cost effective GUI only toolbox for (coupled) fluid flow and heat transfer simulations.

In contrast to FEATool Multiphysics, CFDTool does not support m-file scripting, equation editing and custom PDEs, multiphysics couplings (other than coupled flow-temperature), or non CFD external solvers (such as FEniCS). However, CFDTool models are fully compatible with FEATool Multiphysics.

Is there more documentation/tutorials available?


FEATool comes with a full documentation suite including Quickstart, User’s, Modeling and Tutorial guides. Also keep and eye out on the FEATool Blog which frequently features tutorials, tips, and examples, and subscribe to the FEATool Newsletter which features information about new releases and important updates. Research papaers using the FEATool and CFDTool toolboxes can also be helpful and are listed on the references page.

I have used FEATool Multiphysics in my research, article, or paper, how should I attribute or cite FEATool or CFDTool?


Please first check which release and version number of the software you are using, by selecting About in the Help menu of the toolbox GUI. Please include the product name in the paper/presentation abstract and add the product documentation and homepage link as a reference whenever possible, for example:

[1] FEATool Multiphysics, version 1.17, Precise Simulation Ltd., 2024, https://www.featool.com.

I think I have found a bug in the software, what should I do?


Please use the Report Issue… option under the Help menu in the GUI to submit a bug report or report it directly to the user forum. Include details of your system and instructions how to reproduce the error if possible.

⊕ System requirements

⊖ System requirements

What operating systems does FEATool support?


FEATool Multiphysics and CFDTool can run either as a stand-alone Microsoft Windows or Linux Desktop App (without scripting support), or be used a toolbox Add-On for MATLAB (with support for native m-file scripting API when using FEATool).

Note that support for MacOS (OSX) is not yet available as a stand-alone Desktop App. MacOS (OSX) support is currently limited to use as a MATLAB toolbox running x86(Intel) CPUs (or ARM CPUs with the Rosetta emulation layer).

What are the minimum system requirements to run the toolboxes?


FEATool Multiphysics and CFDTool requires a 64-bit x86-64 compatible Intel or AMD system with 4 GB or more RAM memory.

FEATool can also be installed as a MATLAB toolbox (supporting version 7.9 (R2009b) or later), which enables running MATLAB simulation m-scripts.

Does FEATool support ARM based systems (such as the Apple M CPU)?


FEATool Multiphysics currently only supports computer system architectures based on Intel and AMD x86-64 CPUs.

What is the best system specifications for physics simulations?


A high base core clock speed will always make simulations faster but a large CPU cache memory will definitely help as well.

Physics simulations typically become bound by memory bandwidth as they become larger (as simulations are primarily memory intensive having to shuffle a lot of sparse matrices and data back and forth between the memory and CPU), so high bandwidth memory support which is often found in server class CPUs like Xeon and high end AMD CPUs is recommended.

The larger memory the larger model size is possible (memory requirements scale with mesh density and dimension). Especially 3D models will require significantly more memory than 2D ones.

Graphics card performance is not that important as it is currently only used for visualization. Potentially simulations using graphics cards (GPUs) have the potential for about 10x speedup but is still not very common as code has to be rewritten significantly for it to work on them.

⊕ Installation

⊖ Installation

How do I install FEATool?


To install FEATool follow the installation instructions in the Quickstart guide.

How do I get started with FEATool?


Start by working through one of the tutorial examples found in the FEATool Quickstart Guide or start any of the tutorials found in the File > Model Examples and Tutorials… menu.

How do I install the FEniCS FEM solver?


Please follow the installation instructions on the FEniCS project website, noting that FEniCS must be callable through Python with the command python featool-fenics-file.py. For Windows systems FEniCS needs to be installed with the Linux Subsystem for Windows available with Windows 10.

How do I install the Gmsh mesh generator?


FEATool will automatically try to download and install Gmsh if requested. If this fails, manually download the executable binaries for your system from the Gmsh website. Then extract and copy the Gmsh binary (gmsh.exe on Windows systems, and gmsh on Linux/Mac systems) to a subdirectory of the FEATool installation folder.

How do I install the OpenFOAM CFD solver?


For Windows systems it is recommended to install and use the pre-compiled Native-windows/mingw binaries from OpenCFD ESI. For Ubuntu Linux OpenFOAM can be installed with the apt-get package manager as per the linked instructions. For other systems, please follow the installation recommendations from the official OpenFOAM website. For the OpenFOAM solver integration to work FEATool requires that the simpleFoam and pimpleFoam solver binaries are directly callable from Linux bash and/or Windows bat shell files.

How do I install the Triangle mesh generator?


FEATool will automatically try to download and install Triangle if requested. If this fails, manually download the source code from the Triangle website. Then extract the source file triangle.c, compile it with a c compiler like gcc (for example with the command gcc -O -DLINUX -I/usr/X11R6/include -L/usr/X11R6/lib -o ./triangle ./triangle.c -lm), and copy the resulting binary (triangle.exe on Windows systems, and triangle on Linux/Mac systems) to a subdirectory of the FEATool installation folder. (A pre-compiled Windows binary can also be downloaded directly from GitHub.)

⊕ Multiphysics

⊖ Multiphysics

Can FEATool simulate coupled multiphysics problems?


FEATool technically supports any number of coupled equations and physics modes. (Limited by system constraints, as increasing the number of coupled equations will require more memory and time to solve.)

Can FEATool solve 3D problems?


FEATool supports 1D, 2D, Axisymmetric (Cylindrical coordinates 2.5D), and problems in full 3D.

What kind of physics can be simulated?


There are currently 15 pre-defined physics application modes available

- Poisson Equation (classic PDE)
- Conduction Media DC (electric potential)
- Electrostatics (electric potential)
- Magnetostatics (magnetic potential)
- Convection and Diffusion (mass and chemical species transport)
- Heat Transfer (heat conduction and convection)
- Darcy’s Law (porous media flow)
- Brinkman Equations (porous media flow)
- Compressible Flow (compressible viscous fluid flow)
- Inviscid Euler Equations (compressible inviscid fluid flow)
- Navier-Stokes Equations (incompressible laminar fluid flow)
- Non-Newtonian Flow (incompressible non-Newtonian fluid flow)
- Swirl Flow (axisymmetric flows with swirl effects)
- Euler-Bernoulli Beam (structural mechanics modeling)
- Plane Strain (structural mechanics modeling)
- Plane Stress (structural mechanics modeling)
- Axisymmetric Stress-Strain (structural mechanics modeling)
- Linear Elasticity (3D solid stress-strain)

The equations for all of these physics modes can also easily be edited and changed by the user. Moreover, there is also a custom equation physics mode available that allows input of general equations.

How do I couple physics modes (implement a multiphysics model)?


Add additional equations can be added with the + tab in the Equation Settings dialog box. Then one can simply use the dependent variable names in the equation and boundary coefficients, as well as complex postprocessing expressions. A valid expression can for example be something like 2u + sin(pix*ux) where u is the name of a dependent solution variable in one of the physics modes.

⊕ Finite element method

⊖ Finite element method

What algorithm or method does FEATool use to solve problems?


FEATool uses the finite element method (FEM) to discretize and solve the underlying partial differential equations (PDEs). Moreover, time dependent problems are discretized and solved with the backward Euler, Crank-Nicolson, and Fractional-Step-Theta time stepping schemes.

What FEM shape/basis functions are supported?


FEATool supports standard 1st through 5th order conforming Lagrange (P1-P5/Q1-Q5) functions, bubble, vector (Nedelec and Raviart-Thomas), linear non-conforming Crouziex-Raviart and P-1/Q-1, quadratic C1 Hermite, and piecewise constant discontinuous (P0) FEM basis functions.

Except for the Crouziex-Raviart and non-conforming elements which only are available in 2D and 3D, and the Hermite functions available in 1D and 2D, all shape functions are defined for 1D line, 2D triangle and quadrilateral, and 3D tetrahedral and hexahedral grid cell shapes.

Custom FEM Shape Functions can also be implemented, as described in the linked tutorial. Moreover, numerical integration/quadrature rules of any order is supported.

Can I access finite element matrices and/or bi-linear forms?


For a predefined fea problem struct (defined in the fea.eqn.m/a/f fields) the finite element mass matrix, system matrix, and right hand side load vector can be assembled with the assembleprob function

[M,A,f] = assembleprob( fea, 'f_m', true, 'f_a', true, 'f_f', true, 'f_sparse', true );

Alternatively, it is also possible to manually assemble the individual bi-linear forms and matrices/vectors by specifying the weak equation forms and coefficients and using the assemblea and assemblef functions as described in the Poisson command line CLI tutorial.

How do I access the finite element problem data?


The finite element problem is defined in a struct variable called fea, this can be accessed in the command terminal of the FEATool GUI or exported to the MATLAB command line with the File > Export > FEA Problem Struct to Main Workspace menu option. The fea struct contents is described in the corresponding section of the FEATool User’s Guide.

How do I enter my own equations?


Press the eqn edit button in the Equation Settings dialog box to access and edit predefined equations. This Black-Scholes equation example illustrates a FEATool custom equation. Alternatively, it is possible to use the custom equation physics mode. Moreover, it is also possible to directly access and edit the finite element analysis equation specification struct fields, or even use the fem assembly functionality directly, see for example the model script files in the included examples directory.

Does FEATool support parallel solvers?


FEATool includes built-in support for the MUMPS linear solver, which solves problems using OpenMP parallelization on multi-core CPU systems.

In addition, all external solvers FEniCS, OpenFOAM, and SU2 support parallel execution via MPI parallelization. Parallel simulation runs can also be performed using batch simulation scripts.

What dimensions/units does FEATool use?


FEATool does not use any fixed unit system, it is therefore up to the user define and use consistent units. If for example the geometry length unit is chosen as meters (m), then standard SI-units are recommended for the equation coefficients. Using another length unit such as millimeters (mm) or inches, would require rescaling of the equation coefficients to preserve consistency.

⊕ Import and export

⊖ Import and export

How do I import and export grids/data?


Import and exporting grids and data from various formats can be done using the corresponding options from the Grid and Postprocessing Menus.

How do I export solution data?


First export the FEA problem struct from the GUI to the main MATLAB workspace by selecting Export > FEA Problem Struct To Main Workspace from the File menu.

The solution vector can be found and accessed from the fea.sol.u field, and can be saved and exported to a file with the MATLAB save command (for example u = fea.sol.u; save('-ascii','mysol.txt','u')).

The solution data is stored as an array with rows corresponding to the degrees of freedom for the dependent variables (as determined by mapdofbdr), and columns corresponding to solution time/number. This means that linear conforming P1/Q1 FEM shape functions will correspond to solution values in the exact grid points. For other FEM shape functions it is recommended to use the evalexpr function to evaluate the solution in the desired coordinates (see below).

How do I evaluate and export general expressions?


Expressions in points and lines can be evaluated using the Point/Line Evaluation… option in the Post menu of the FEATool GUI.

For exporting data from several points (such as all grid points) it is recommended to make use of the evalexpr function and the MATLAB Command Line Interface (CLI). For example, first export the problem struct from the GUI to the main MATLAB workspace by selecting Export > FEA Problem Struct To Main Workspace from the File menu. Then use evalexpr to create a variable with data to export, for example

 c_data = { 'x', 'y', 'u', 'ux', '2*sin(u*x)^2' };
n_data = length(c_data);
p = fea.grid.p;
n_p = size(p,2);
data = zeros(n_p,n_data);
for i=1:n_data
  data(:,i) = evalexpr( c_data{i}, p, fea );
end

The data can now be saved and exported to a file with the MATLAB save command (for example save('-ascii','mydata.txt','data')).


Click on the ⊕/⊖ Heading to expand or collapse the corresponding section.