FEM Install

Introduction
To be able to perform finite element analysis (FEA) with the FEM Workbench FreeCAD makes use of two external programs: one is used for generating the FEM Mesh, and the other for numerically solving the system of equations of the analysis. You can test if your FreeCAD installation is ready for FEA by loading and testing the FEM CalculiX Cantilever 3D example which is included with every installation since FreeCAD 0.17.

FEM solver
The default solver to perform the finite element calculations is CalculiX. FreeCAD writes a CalculiX input file, starts the solver, and reads the output. This means the CalculiX binary is standalone and independent from FreeCAD. Because of this reason, and given that there are many programs that can generate a mesh, it is recommended to install the solver first and make sure it's working.

If the solver is correctly installed, you may run the single command in the terminal

FEM mesh generator
In order to create a FEM Mesh, FreeCAD uses Netgen as the default mesher. For this to work, FreeCAD needs to be compiled against the Netgen libraries. Another common mesher that can be used is Gmsh, which needs to be installed separately. See FEM Mesh for various possibilities of obtaining a valid mesh for analysis.

If the programs are installed, you may run the commands or  in the terminal to launch their user interfaces. These interfaces are not used by FreeCAD, but demonstrate that the programs are correctly installed.

Installing on Windows
The FreeCAD packages available from the download page already include Netgen and CalculiX, so no additional software needs to be installed.

Installing on Linux
Linux distributions collect software in their own repositories. Look for, , and or  in your package manager.

Ubuntu PPA
The freecad-stable and freecad-daily personal package archives (PPA) provide a more recent version of FreeCAD than is available in the Ubuntu repositories. These PPAs include the most recent, , and packages as well. See Install on Unix for more information on setting up the repositories.

If the PPA is already added to your system, install the packages as follows

The freecad-community PPA also provides, , and packages for testing. If they are stable enough, they will be migrated to the daily or stable builds.

For developers: the thread Ubuntu Repository discusses the creation of the Ubuntu PPA packages. At the time it was written, CalculiX was not included in the Debian repositories, so there were several personal packages in Launchpad. Only one package should be installed.

Arch Linux
Get the package from the repository.

Debian

 * Debian 9 Buster: the packages in the repository are outdated, but you can use the packages from the Ubuntu PPA . See Gmsh 4 package available for testing in Community Extras PPA.
 * Debian 8 Stretch: the packages in the repository are outdated, but you can use the packages from the Ubuntu PPA . See Gmsh 4 package available for testing in Community Extras PPA.
 * Debian 7 Jessie: install the packages from Debian 8 Stretch using . See Debian source package for Calculix.

CalculiX binary
The CalculiX authors provide a pre-compiled generic Linux binary. It can be downloaded from the authors' website.

Since different Linux distributions have different library paths, most likely this binary will not work out of the box without making some adjustments.

To use the binary with Fedora 21, see the thread Making FEM run on linux fedora 21. For newer Fedora versions, you should compile CalculiX yourself.

If you use this binary, check that the binary is executable, that it is in the executable of your system, and that it is linked against the proper libraries (,, , etc.) as mentioned in the thread FEM WB.

Compile CalculiX
Since CalculiX is a standalone application, you either install a CalculiX binary or compile it yourself. Any CalculiX version from 2.7.x onwards works with FreeCAD. Since the code hasn't changed much, lower versions than 2.7.x might work as well.

Compiling CalculiX has proved problematic, requiring editing the Makefiles and build options in different platforms. See the following information:
 * Debian: Debian source package for Calculix, Gmsh 4 package available for testing in Community Extras PPA, Compiling CalculiX ccx on fedora, ubuntu and debian.
 * Fedora 27, 28, 29: Compiling CalculiX ccx on fedora, ubuntu and debian.
 * There is a Cmake version of the source package on github, but at FreeCAD forums no one has reported if this package works.

Netgen
There have been mixed results with the Netgen mesher and compiling FreeCAD with Netgen support.
 * ToDo

Installing on OSX
The OSX development packages of FreeCAD may include Netgen but may not include CalculiX.

See this forum post FEM on Mac OSX for information on installing CalculiX, and an updated post for more recent information.

The following posts may be outdated:
 * FEM on Mac OSX, post 1
 * MacPorts users: CalculiX port test request

Further information
The FEM Workbench is under constant development. The most recent information is found in the FreeCAD forum.

If you have problems installing Netgen, Gmsh, or CalculiX, or another external tool, please search the forum first:
 * netgen site:forum.freecadweb.org
 * gmsh site:forum.freecadweb.org
 * calculix site:forum.freecadweb.org