FEATool Multiphysics
- Frequently Asked Questions FAQ

Banner - FEATool Multiphysics - Frequently Asked Questions FAQ

⊕ General information

⊖ General information

What is FEATool?

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

What kind of problems can FEATool solve?

FEATool 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 transfer, fluid dynamics (CFD), structural mechanics (SME), electromagnetics, and chemical, transport, and reaction engineering problems.

What are the benefits of using FEATool?

FEATool is by design 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 integrates seamlessly with MATLAB and Octave, and FEniCS one can also leverage the m-scripting and Python languages and functions 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 interfaces naturally with MATLAB and Octave, and is extensible so as to interface with other software and simulation tools such as OpenFOAM, FEniCS, Gmsh, Triangle, and Plotly.

What programming language is FEATool written in?

FEATool is entirely written in Octave/MATLAB m-code script language, and is also extensible so users can call their own preprocessing, solvers, postprocessing routines through hooks and function overloading.

What limitations does FEATool have?

Since m-code is not pre-compiled but Just-In-Time (JIT) interpreted by Octave or MATLAB it will in general not be as fast or memory efficient as an equivalent code written in C or Fortran. However, library calls, for example calls to linear solvers such as UMFPACK, are just as efficient as other software using these same libraries. Moreover, core FEM library functions of FEATool have been vectorized, optimized, and benchmarked to run as fast as Fortran.

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.

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

Please add a reference to the FEATool User’s Guide and homepage, for example:

[1] FEATool Multiphysics v1.8, User’s Guide, Precise Simulation Ltd., Hong Kong, 2018, https://www.featool.com.

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

Please submit a bug report with details of your system and instructions how to reproduce the error if possible.

If the bug is related to Octave please report the bug to the GNU Octave bug tracker directly.

⊕ System requirements

⊖ System requirements

What is required to run FEATool?

FEATool requires either MATLAB Version 7.9 (R2009b) or later, or alternatively GNU Octave Version 4.0 or later (command line interface CLI non-GUI operation is supported for earlier Octave versions). Furthermore, a system with 4GB or more RAM memory is recommended.

What operating systems does FEATool support?

FEATool can run on any computer system that supports Octave or MATLAB, such as Windows, Linux, Unix, and Mac.

Can I use the graphical user interface (GUI) in Octave?

GUI under Octave is supported on Windows and Linux systems with the Qt toolkit which is available with Octave version 4.0 and later (Note that Octave 4.4 has introduced regression bugs that may severely affect the usability of the FEATool Octave GUI).

Please note that Octave with Mac does not offer any custom GUI function support, and thus does not allow the FEATool GUI to run. The FEATool command line CLI interface should still work on Octave with macOS, alternatively please use MATLAB with Mac systems for full FEATool GUI functionality.

⊕ Installation

⊖ Installation

How do I install FEATool?

Sign up to the FEATool newsletter to download the software. FEATool is available as a MATLAB Windows installer, Octave package, and also zip archive for other systems. 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.

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 the lib/gmsh 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 blueCFD-core (2017) binaries from blueCAPE. For Ubuntu Linux OpenFOAM can be installed with the apt-get package manager as

 sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
sudo apt-get -y install openfoam5
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 the lib/triangle subdirectory of the FEATool installation folder. (A pre-compiled Windows binary can also be downloaded directly from SourceForge.)

⊕ 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 14 predefined 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)
- Navier-Stokes equations (incompressible laminar fluid flow)
- Euler-Bernoulli Beam (structural mechanics modeling)
- Plane strain (structural mechanics modeling)
- Plane stress (structural mechanics modeling)
- Axisymmetric Stress-strain (structural mechanics modeling)
- Linear elasticity (structural mechanics modeling)

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 2*u + sin(pi*x*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, 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 Octave and 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?

MATLAB and Octave does not per default include parallel sparse linear solvers. However, one can export FEATool models to FEniCS project Python scripts with support for parallel solvers, and run CFD models in parallel with OpenFOAM. Alternatively, it is also possible to run MATLAB and Octave instances in parallel batches.

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 option from the Grid and Postprocessing Menus.

How do I export a computed solution?

First export the problem struct from the GUI to the main workspace by choosing File > Export > FEA problem struct to MATLAB Workspace. Now the solution can be accessed in the fea.sol.u field and can be saved and exported to a file with the MATLAB save command.

Note that only linear 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.

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