FEATool
v1.6
Finite Element Analysis Toolbox

In Equation mode partial differential equations (PDEs) together with equation coefficients must be chosen to accurately describe the physical phenomena to be simulated. Furthermore, in Boundary mode suitable boundary conditions must be prescribed in order to account for how the model interacts with its surroundings (outside of the modeled geometry and grid).
After creating a suitable geometry and grid one can switch between equation and boundary modes by using the and mode buttons. The corresponding Equation and Boundary Settings dialog boxes will also automatically open. Each boundary and equation setting tab corresponds to a different physics mode present in the model and allow for specifying the equation and boundary coefficients, initial conditions, and finite element shape functions. The coefficients and boundary coefficients will vary depending on the chosen physics mode and are explained in the following sections. The equation settings also allow for different equation and initial conditions to be set on a per subdomain basis by selecting the subdomains in the left hand side Subdomain: listbox.
Moreover, a convenient way to set up models is to use Model Constants and Expressions. The button opens the corresponding dialog box where one can enter constants and define expressions. One entered they can be used in stead of entering numerical values in equation coefficients and postprocessing expressions. More space for coefficients and expressions can also be added with the Add Row button.
The FEATool GUI also makes it easy to add and couple multiphysics equations and complex expressions to your models.
After starting to work with a physics mode it is simple to add one or more other modes by going to the last tab, with a + plus sign, in the Equation Settings dialog box. There you can simply choose an additional physics mode from the drop down combo box, select the dependent variable names you want to use (or keep the default ones), and press Add Physics >>> to add the mode. The new physics mode will now show up as a new tab with its short abbreviated name on the tab handle. Once the new mode has been added you can switch between the modes by clicking on the corresponding tabs in the Equation and Boundary Settings dialog boxes.
The physics modes can be coupled by simply using the dependent variable names and derivatives in the coefficient expression dialog boxes. For example, the NavierStokes equations physics mode shown below uses the temperature variable T from the heat transfer mode in the source term for the ydirection.
Moreover, here below we can see how to make a three way multiphysics coupling. The convective velocities u and v are coupled from the NavierStokes equations physics mode and at the same time the temperature T and its two derivatives Tx and Ty are simultaneously coupled to the reaction rate source term in the convection and diffusion mode.
As we have seen, it is very simple to set up multiphysics models in FEATool. This is made possible by the expression parsing functionality that allows you to enter and use complex expressions of dependent variables (for example u, v, T, c), their first derivatives (by just appending x or y to the variable names like Tx and Ty), the space dimensions x and y, as well as all common Octave and Matlab expressions and constants like pi, sin, cos, sqrt, ^2 etc.
By using the predefined FEATool physics modes it is possible to easily and quickly implement models which simulate different physical effects such as fluid flow, structural stresses, chemical reactions, and heat transfer. This section describes how the various physics modes are defined, set up and used. The available physics modes are listed in the following table
Physics Mode  Description  Definition Function 

Poisson Equation  Poisson equation  poisson 
Convection and Diffusion  Mass transport through convection and diffusion  convectiondiffusion 
Conductive Media DC  Electric potential  conductivemediadc 
Heat Transfer  Heat transport through convection and conduction  heattransfer 
Linear Elasticity  Structural mechanics (3D solid linear elasticity)  linearelasticity 
Plane Stress  Structural mechanics (2D plane stress approximation)  planestress 
Plane Strain  Structural mechanics (2D plane strain approximation)  planestrain 
NavierStokes Equations  Incompressible fluid flow  navierstokes 
Custom Equation  User defined equation  customeqn 
The Poisson equation physics mode solves the classic elliptic Poisson equation for the scalar dependent variable
where is a time scaling coefficient, is a diffusion coefficient, and is a scalar source term. In the Poisson_Equation Settings_ dialog box shown below these equation coefficients, initial value can be specified. The FEM shape function space can also be selected from the dropdown combobox (1st and 2nd order conforming P1/Q1 shape functions), or further specified in the corresponding edit field.
The physics mode allows for both Dirichlet and Neumann (flux) boundary conditions. Dirichlet conditions prescribe a fixed value of the dependent variable on a boundary segment, while a Neumann condition will prescribe the normal flux to a boundary segment, that is , where is the outward directed normal, and therefore represents the value of the inward directed flux. The available boundary conditions are summarized in the table below
Boundary Condition  Definition  Boundary Coefficient 

Dirichlet  Prescribed value,  r 
Neumann  Prescribed flux,  g 
The convection and diffusion physics mode models mass transport and reaction of a chemical species . The governing equation for convection and diffusion reads
where is a time scaling coefficient, is a diffusion coefficient, is the reaction rate source term, and a vector valued convective velocity field. In the Equation Settings dialog box shown below these equation coefficients, initial value can be specified. The FEM shape function space can also be selected from the dropdown combobox (1st and 2nd order conforming P1/Q1 shape functions), or further specified in the corresponding edit field.
For convection and diffusion problems with dominating convective effects it is advisable to use artificial stabilization. Pressing the lower Artificial Stabilization opens the corresponding dialog box which allows adding both isotropic artificial diffusion and anisotropic streamline diffusion. Turning coefficients are also provided to control the strength of the introduced artificial diffusion.
The convection and diffusion physics mode allows for four different boundary conditions; a prescribed concentration boundary condition, a convective flow (outflow condition), an insulation/symmetry condition which prescribes zero flux (or flow), and a prescribed flux condition. These boundary conditions are summarized in the table below
Boundary Condition  Definition  Boundary Coefficient 

Concentration  Prescribed concentration,  c_{0} 
Convective flux  Outflow,  
Insulation/symmetry  Zero flux/flow,  
Flux condition  Prescribed flux,  N_{0} 
Electric potential and current can be modeled through the conductive media DC physics mode. To describe the flow of current and electric potential an electric field is firstly defined as . Furthermore, the current density is related to the electric field by where is the conductivity. By assuming conservation of the current one can pose a continuity equation for the current density, that is where is a current source, which after expansion results in the following equation
In the Equation Settings dialog box shown below the equation coefficients, initial value for the electric potential can be specified. The FEM shape function space can also be selected from the dropdown combobox (1st and 2nd order conforming P1/Q1 shape functions), or further specified in the corresponding edit field.
The conductive media DC physics mode features two boundary conditions, one prescribing the electric potential at a boundary , and the other prescribing the current flow into the boundary. These boundary conditions are summarized in the table below
Boundary Condition  Definition  Boundary Coefficient 

Electric potential  Prescribed electric potential,  V_{0} 
Current flow  Prescribed current flow (flux),  J_{0} 
The heat transfer physics mode models heat transport through convection and conduction and heat generation through the following governing equation
where is the density, the heat capacity, is the thermal conductivity, is the heat source term, and a vector valued convective velocity field. In the Equation Settings dialog box show below the equation coefficients, initial value for the temperature can be specified. The FEM shape function space can also be selected from the dropdown combobox (1st and 2nd order conforming P1/Q1 shape functions), or further specified in the corresponding edit field.
For heat transfer problems with dominating convective effects it is advisable to use artificial stabilization. Pressing the lower Artificial Stabilization opens the corresponding dialog box which allows adding both isotropic artificial diffusion and anisotropic streamline diffusion. Turning coefficients are also provided to control the strength of the introduced artificial diffusion.
The heat transfer physics mode allows for four different boundary conditions; prescribed temperature, convective flow (outflow condition), an insulation/symmetry condition which prescribes zero flux (or flow), and a prescribed flux boundary condition.
The heat flux boundary condition involves several parameters. Firstly, an arbitrary expression for the heat flux may be prescribed with the coefficient q_{0}. The second term, h*(T_{inf}T), represents natural convection between the boundary and the surroundings. Here h is the convective heat transfer coefficient and T_{inf} a reference bulk temperature. The final term, Const*(T_{amb}^4T^4), represents a radiation flux boundary condition where Const is the product between the emissivity of the boundary and the StefanBolzmann constant , and T_{amb} is the surrounding ambient temperature.
The boundary conditions are summarized in the table below
Boundary Condition  Definition  Boundary Coefficient 

Temperature  Prescribed temperature,  T_{0} 
Convective flux  Outflow,  
Thermal insulation/symmetry  Zero heat flux,  
Heat flux  Prescribed heat flux,  q_{0}, h, T_{inf}, Const, T_{amb} 
The linear elasticity physics mode models how structural stresses form in solid structures where the stressstrain relations can be written as
where is the elastic or Young's modulus, and is the Poisson's ratio of the material. The strains are related to the material displacements ( , , ) as
Balance equations for the stresses finally give the resulting governing equation system as
where , , and are volume (body) forces in the x, y, and zdirections, respectively. In the Equation Settings dialog box shown below the equation coefficients, initial value for the displacements can be specified. The FEM shape function space can also be selected from the dropdown combobox (1st and 2nd order conforming P1/Q1 shape functions), or further specified in the corresponding edit field.
Optional stressstrain temperature dependence can also be added, which takes the form
where is the coefficient of thermal expansion and either a prescribed temperature field or a dependent variable name from another physics mode that represents the temperature.
The boundary conditions for the linear elasticity physics mode allows for any combination of prescribing displacements and edge loads. These boundary conditions are summarized in the table below
Boundary Condition  Definition  Boundary Coefficient 

Fixed displacements  Prescribed displacements,  u_{0}, v_{0} , w_{0} 
Edge loads  Prescribed edge loads,  f_{x,0}, f_{y,0}, f_{z,0} 
The plane stress physics mode models how structural stresses form in thin structures where the planar component of the stress can be neglected or considered zero. In this case the stressstrain relations can be written as
where is the elastic or Young's modulus, and is the Poisson's ratio of the material. The strains are related to the material displacements ( , ) as
Balance equations for the stresses finally give the resulting governing equation system as
where and are volume (body) forces in the x and ydirections, respectively. In the Equation Settings dialog box shown below the equation coefficients, initial value for the displacements can be specified. The FEM shape function space can also be selected from the dropdown combobox (1st and 2nd order conforming P1/Q1 shape functions), or further specified in the corresponding edit field.
Optional stressstrain temperature dependence can also be added, which takes the form
where is the coefficient of thermal expansion and either a prescribed temperature field or a dependent variable name from another physics mode that represents the temperature.
The boundary conditions for the plane stress physics mode allows for any combination of prescribing displacements and edge loads. These boundary conditions are summarized in the table below
Boundary Condition  Definition  Boundary Coefficient 

Fixed displacements  Prescribed displacements,  u_{0}, v_{0} 
Edge loads  Prescribed edge loads,  f_{x,0}, f_{y,0} 
Like the plane stress physics mode, the plane strain mode models how structural stresses form in structures but where the zcomponent of the displacements can be neglected or considered zero. In this case the stressstrain relations can be written as
where is the elastic or Young's modulus, and is the Poisson's ration of the material. The strains are related to the material displacements ( , ) as
Balance equations for the stresses finally give the resulting governing equation system as
where and are volume (body) forces in the x and ydirections, respectively. In the Equation Settings dialog box shown below the equation coefficients, initial value for the displacements can be specified. The FEM shape function space can also be selected from the dropdown combobox (1st and 2nd order conforming P1/Q1 shape functions), or further specified in the corresponding edit field.
Optional stressstrain temperature dependence can also be added, which takes the form
where is the coefficient of thermal expansion and either a prescribed temperature field or a dependent variable name from another physics mode that represents the temperature.
The boundary conditions for the plane strain physics mode allows for any combination of prescribing displacements and edge loads. These boundary conditions are summarized in the table below
Boundary Condition  Definition  Boundary Coefficient 

Fixed displacements  Prescribed displacements,  u_{0}, v_{0} 
Edge loads  Prescribed edge loads,  f_{x,0}, f_{y,0} 
The NavierStokes equations physics mode models flows of incompressible fluid flows and which is described by
which is to be solved for the unknown velocity field and pressure . In these equations represents the density of the fluid and the dynamic viscosity, moreover represents body forces acting on the fluid. In the Equation Settings dialog box shown below the equation coefficients, initial values for the velocities and pressures can be specified. The FEM shape function spaces can also be selected from the dropdown combobox (P2P1/Q2Q1 and P1P1/Q2P1 shape functions), or further specified in the corresponding edit field.
For flow problems with dominating convective effects it is advisable to use artificial stabilization. Pressing the lower Artificial Stabilization opens the corresponding dialog box which allows adding both isotropic artificial diffusion and anisotropic streamline diffusion. Turning coefficients are also provided to control the strength of the introduced artificial diffusion.
The NavierStokes equations physics mode allows prescription of several different boundary conditions. Firstly, the noslip (zero velocity) boundary condition which is appropriate for stationary walls. Moreover, a prescribed velocity condition can be prescribed to both in and outflows as well as moving walls. Prescribed pressure and neutral (zero viscous stress) conditions are both appropriate for outflows. Lastly, symmetry or slip conditions sets the flow to zero in one coordinate direction so as to prevent flow normal to the boundary. These boundary conditions are summarized in the table below
Boundary Condition  Definition  Boundary Coefficient 

Wall/noslip  Zero velocity,  
Inlet/velocity  Prescribed velocity,  u_{0}, v_{0}, w_{0} 
Neutral outflow/stress boundary  Zero stress,  
Outflow/pressure  Prescribed pressure,  p_{0} 
Symmetry/slip, x_{i}direction  Zero velocity in x_{i}direction, 
User defined equations can be prescribed by using the custom equation physics mode.
The equation specification can be accessed by either pressing the edit button next to the equation description, or the equation description itself. A dialog box will appear showing one edit field for equation and corresponding dependent variable.
Note that the other physics mode equations are defined similarly and can also be edited by pressing the edit button in the corresponding tabs of the equation settings dialog box.
The syntax for equation specifications tries to as close as possible look like how one would write a partial differential equation with pen and paper. If for example the dependent variable is u like in the example above, then u' corresponds to the time derivative, ux the derivative in the xdirection, ux_x a second order derivative in the xdirection (to which partial integration will be applied according to the standard finite element derivation of the weak formulation), and u_t is the variable u multiplied with the fem test function, thus it will be assembled to the iteration matrix instead of the right hand side. The following table describes the syntax and legal operators
Syntax  Description  Formula 

u  Dependent variable name  
x  Space dimension name  
ux  Derivative in xdirection, rhs  
u_t  Dep. var multiplied with test function  
u_x  Derivative of test function  
ux_t  Derivative in xdirection  
ux_x  2nd derivative in xdirection  
+  Addition  
  Subtraction  
*  Multiplication  
/  Division  
sqrt()  Square root  
^  Power  
()  Delimit by enclosing in parentheses 
where v is a test function. The equation syntax parser accepts numeric constants and coefficients defined in the fea.coef field. Higher dimensions work analogously. For a more complicated example look at Custom Equation  BlackScholes model equation in the tutorials section.
For problems with dominating convective effects such as can be found in convection and diffusion, heat transfer problems with convection, and fluid flow problems one can employ artificial stabilization if the grid size is too coarse to allow convergence.
The Artificial Stabilization dialog box allows control of both isotropic artificial diffusion and anisotropic streamline diffusion options. Turning coefficients are also provided to control the strength of the introduced artificial diffusion.
Isotropic artificial diffusion adds diffusion of magnitude delta*h_grid*u in all directions, where delta is the tuning coefficient, h_grid the local mean diameter of a grid cell, and u the magnitude of the convective velocity. Streamline diffusion modifies the finite element test function space and only adds a stabilization coefficient of the form delta*h_grid/u in the direction of the flow so as to minimize changes to the original problem.