# FEM Workbench/sv

## Introduction

The FEM Workbench provides a modern finite element analysis (FEA) workflow for FreeCAD. Mainly this means all tools to make an analysis are combined into one graphical user interface (GUI).

## Workflow

The steps to carry out a finite element analysis are:

- Preprocessing: setting up the analysis problem.
- Modeling the geometry: creating the geometry with FreeCAD, or importing it from a different application.
- Creating an analysis.
- Adding simulation constraints such as loads and fixed supports to the geometric model.
- Adding materials to the parts of the geometric model.
- Creating a finite element mesh for the geometrical model, or importing it from a different application.

- Solving: running an external solver from within FreeCAD.
- Postprocessing: visualizing the analysis results from within FreeCAD, or exporting the results so they can be postprocessed with another application.

The FEM Workbench can be used on Linux, Windows, and Mac OSX. Since the workbench makes use of external solvers, the amount of manual setup will depend on the operating system that you are using. See FEM Install for instructions on setting up the external tools.

Workflow of the FEM Workbench; the workbench calls two external programs to perform meshing of a solid object, and perform the actual solution of the finite element problem

## Menu: Model

- Analysis container: Creates a new container for a mechanical analysis. If a solid is selected in the tree view before clicking on it, the meshing dialog will be opened next.

### Materials

- Material for solid: Lets you select a solid material from the database.

- Material for fluid: Lets you select a fluid material from the database.

- Nonlinear mechanical material: Lets you add a nonlinear mechanical material model.

- Reinforced material (concrete): Lets you select reinforced materials consisting of a matrix and a reinforcement from the database.

- Material editor: Lets you open the material editor to edit materials.

### Element Geometry

- Beam cross section: Used to define cross sections for beam elements.

- Beam rotation: Used to rotate cross sections of beam elements.

- Shell plate thickness: Used to define shell element thickness.

- Fluid section for 1D flow: Used to create fluid section element for pneumatic and hydraulic networks.

### Electromagnetic boundary conditions

- Electrostatic potential boundary condition: Used to define electrostatic potential.

- Current density boundary condition: Used to define a current density. introduced in version 0.21

- Magnetization boundary condition: Used to define a magnetization. introduced in version 0.21

### Fluid boundary conditions

- Initial flow velocity condition: Used to define an initial flow velocity for a body (volume).

- Initial pressure condition: Used to define an initial pressure for a body (volume). introduced in version 0.21

- Flow velocity boundary condition: Used to define a flow velocity as a boundary condition at an edge (2D) or face (3D).

### Geometrical analysis features

- Plane multi-point constraint: Used to define a constraint for keeping the nodes in a planar surface in the same plane.

- Section print feature: Used to print the predefined facial output variables (forces and moments) to the data file.

- Local coordinate system: Used to define a transform constraint on a face.

### Mechanical boundary conditions and loads

- Fixed boundary condition: Used to define a fixed constraint on point/edge/face(s).

- Rigid body constraint: Used to apply the CalculiX's rigid body constraint that constrains the motion of the nodes of a selected geometrical entity to the motion of a reference point positioned by the user. introduced in version 1.0

- Displacement boundary condition: Used to define a displacement constraint on point/edge/face(s).

- Contact constraint: Used to define a contact constraint between two faces.

- Tie constraint: Used to define a tie constraint ("bonded contact") between two faces, or, introduced in version 1.0, cyclic symmetry.

- Spring: Used to define a spring. introduced in version 0.20

- Force load: Used to define a force in [N] applied uniformly to a selectable face in a definable direction.

- Pressure load: Used to define a pressure constraint.

- Centrifugal load: Used to define a centrifugal body load constraint. introduced in version 0.20

- Gravity load: Used to define a gravity acceleration acting on a model.

### Thermal boundary conditions and loads

- Initial temperature: Used to define the initial temperature of a body.

- Heat flux load: Used to define a heat flux constraint on a face(s).

- Temperature boundary condition: Used to define a temperature constraint on a point/edge/face(s).

- Body heat source: Used to define an internally generated body heat.

### Overwrite Constants

- Constant vacuum permittivity: Used to overwrite the permittivity of vacuum with a custom value.

## Menu: Mesh

- FEM mesh from shape by Netgen: Generates a finite element mesh for a model using Netgen.

- FEM mesh from shape by Gmsh: Generates a finite element mesh for a model using Gmsh.

- FEM mesh boundary layer: Creates anisotropic meshes for accurate calculations near boundaries.

- FEM mesh region: Creates a localized area(s) to mesh which highly optimizes analysis time.

- FEM mesh group: Groups and labels elements of a mesh (vertex, edge, surface) together, useful for exporting the mesh to external solvers.

- FEM mesh to mesh: Convert the surface of a FEM mesh to a mesh.

## Menu: Solve

- Solver CalculiX Standard: Creates a new solver for this analysis.

- Solver Elmer: Creates the solver controller for Elmer.

- Solver Mystran: Creates the solver controller for the MYSTRAN solver. introduced in version 0.20

- Solver Z88: Creates the solver controller for Z88.

### Mechanical equations

- Elasticity equation: Equation for the Solver Elmer to perform linear mechanical analyses.

- Deformation equation: Equation for the Solver Elmer to perform nonlinear mechanical analyses (deformations). introduced in version 0.21

### Electromagnetic equations

- Electrostatic equation: Equation for the Solver Elmer to perform electrostatic analyses.

- Electricforce equation: Equation for the Solver Elmer to calculate the electric force on surfaces.

- Magnetodynamic equation: Equation for the Solver Elmer to calculate magnetodynamics. introduced in version 0.21

- Magnetodynamic 2D equation: Equation for the Solver Elmer to calculate magnetodynamics in 2D. introduced in version 0.21

- Flow equation: Equation for the Solver Elmer to perform flow analyses.

- Flux equation: Equation for the Solver Elmer to perform flux analyses.

- Heat equation: Equation for the Solver Elmer to perform heat transfer analyses.

- Solver job control: Opens the menu to adjust and start the selected solver.

- Run solver calculations: Runs the selected solver of the active analysis.

## Menu: Results

- Purge results: Deletes the results of the active analysis.

- Show result: Used to display the result of an analysis. This dialog is not available for the Solver Elmer as this solver visualizes using the Post pipeline from result object only.

- Apply changes to pipeline: Toggles if changes to pipelines and filters are applied immediately.

- Post pipeline from result: Used to add a new graphical representation of FEM analysis results (color scale and more display options).

- Warp filter: Used to visualize the scaled deformed shape of the model.

- Scalar clip filter: Used to clip a field with a specified scalar value.

- Function cut filter: Used to display the results on a sphere or a plane cutting through the model.

- Region clip filter: Used to clip a field with a sphere or a plane cutting through the model.

- Contours filter: Used to display iso-lines (for analyses in 2D) or iso-contours. introduced in version 0.21

- Line clip filter: Used to plot the values of a field along a specified line.

- Stress linearization plot: Creates a stress linearization plot.

- Data at point clip filter: Used to display value of a selected field at a given point.

### Filter functions

- Plane: Cuts the result mesh with a plane.

- Sphere: Cuts the result mesh with a sphere.

- Cylinder: Cuts the result mesh with a cylinder. introduced in version 0.21

- Box: Cuts the result mesh with a box. introduced in version 0.21

## Menu: Utilities

- Clipping plane on face: Adds a clipping plane for the whole model view.

- Remove all clipping planes: Removes all existing clipping planes.

- Open FEM examples: Open the GUI to access FEM examples.

## Context Menu

- Clear FEM mesh: Deletes the mesh file from the FreeCAD file. Useful to make a FreeCAD file lighter.

- Display FEM mesh info: Displays basic statistics of existing mesh - number of nodes and elements of each type.

## Obsolete tools

- Fluid boundary condition: Used to define a fluid boundary condition. Did not have a solver. Not available in version 1.0 and above.

- Constraint bearing: Used to define a bearing constraint. Did not have a solver. Not available in version 1.0 and above.

- Constraint gear: Used to define a gear constraint. Did not have a solver. Not available in version 1.0 and above.

- Constraint pulley: Used to define a pulley constraint. Did not have a solver. Not available in version 1.0 and above.

- Solver CalculiX (new framework): Same as the original framework Solver CalculiX Standard with extra checks. Tool was unfinished. Not available in version 1.0 and above.

- Nodes set: Creates/defines a node set from FEM mesh. Tool was unfinished and couldn't be used. Not available in version 1.0 and above.

## Preferences

- Preferences...: Preferences available in FEM Tools.

## Information

The following pages explain different topics of the FEM Workbench.

FEM Install: a detailed description on how to set up the external programs used in the workbench.

FEM Geometry Preparation and Meshing: tips regarding geometry preparation for FEM and meshing.

FEM Mesh: details about meshes in the FEM workbench.

FEM Solver: further information on the different solvers available in the workbench, and those that could be used in the future.

FEM CalculiX: further information on CalculiX, the default solver used in the workbench for structural analysis.

FEM Concrete: interesting information on the topic of simulating concrete structures.

## Tutorials

Tutorial 1: FEM CalculiX Cantilever 3D; basic simply supported beam analysis.

Tutorial 2: FEM Tutorial; simple tension analysis of a structure.

Tutorial 3: FEM Tutorial Python; set up the cantilever example entirely through scripting in Python, including the mesh.

Tutorial 4: FEM Shear of a Composite Block; see the deformation of a block that is comprised of two materials.

Tutorial 5: Transient FEM analysis

Tutorial 6: Post-Processing of FEM Results with Paraview

Tutorial 7: FEM Example Capacitance Two Balls; Elmer's GUI tutorial 6 "Electrostatics Capacitance Two Balls" using FEM Examples.

Coupled thermal mechanical analysis tutorials by openSIM

Video tutorial 1: FEM video for beginner (including YouTube link)

Video tutorial 2: FEM video for beginner (including YouTube link)

Many video tutorials: anisim Open Source Engineering Software (in German)

## Extending the FEM Workbench

The FEM Workbench is under constant development. An objective of the project is to find ways to easily interact with various FEM solvers, so that the end user can streamline the process of creating, meshing, simulating, and optimizing an engineering design problem, all within FreeCAD.

The following information is aimed at power users and developers who want to extend the FEM Workbench in different ways. Familiarity with C++ and Python is expected, and also some knowledge of the "document object" system used in FreeCAD is necessary; this information is available in the Power users hub and the Developer hub. Please notice that since FreeCAD is under active development, some articles may be too old, and thus obsolete. The most up to date information is discussed in the FreeCAD forums, in the Development section. For FEM discussions, advice or assistance in extending the workbench, the reader should refer to the FEM subforum.

The following articles explain how the workbench can be extended, for example, by adding new types of boundary conditions (constraints), or equations.

- Extend FEM Module
- Onboarding FEM Devs attempts to orient new devs on how to contribute to the FEM workbench.
- Add FEM Constraint Tutorial
- Add FEM Equation Tutorial

A developer's guide has been written to help power users in understanding the complex FreeCAD codebase and the interactions between the core elements and the individual workbenches. The book is hosted at github so multiple users can contribute to it and keep it updated.

- Early preview of ebook: Module developer' guide to FreeCAD source forum thread.
- FreeCAD Mod Dev Guide github repository.

## Extending the FEM Workbench documentation

- More information regarding extending or missing FEM documentation can be found in the forum: FEM documentation missing on the Wiki

**Materials:**Solid, Fluid, Nonlinear mechanical, Reinforced (concrete); Material editor

**Element geometry:**Beam (1D), Beam rotation (1D), Shell (2D), Fluid flow (1D)

**Constraints**

**Electromagnetic:**Electrostatic potential, Current density, Magnetization

**Geometrical:**Plane rotation, Section print, Transform

**Mechanical:**Fixed, Displacement, Contact, Tie, Spring, Force, Pressure, Centrif, Self weight

**Thermal:**Initial temperature, Heat flux, Temperature, Body heat source

**Overwrite Constants:**Constant vacuum permittivity

**Solve:**CalculiX Standard, Elmer, Mystran, Z88;**Equations:**Deformation, Elasticity, Electrostatic, Electricforce, Magnetodynamic, Magnetodynamic 2D, Flow, Flux, Heat;**Solver:**Solver control, Solver run

**Results:**Purge, Show;**Postprocessing:**Apply changes, Pipeline from result, Warp filter, Scalar clip filter, Function cut filter, Region clip filter, Contours filter, Line clip filter, Stress linearization plot, Data at point clip filter, Filter function plane, Filter function sphere, Filter function cylinder, Filter function box

**Additional:**Preferences; FEM Install, FEM Mesh, FEM Solver, FEM CalculiX, FEM Concrete; FEM Element Types

**Getting started****Installation:**Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap**Basics:**About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate

**Help:**Tutorials, Video tutorials**Workbenches:**Std Base, Assembly, BIM, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework

**Hubs:**User hub, Power users hub, Developer hub