# FEM Module/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 off 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.

As of FreeCAD 0.15 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 material from the database.

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

- Nonlinear mechanical material: Lets you select a material from the database.

- image is missing Reinforced material: Lets you select reinforced materials consist of a matrix and a reinforcement from the database.

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

### Element Geometry

- Fluid section for 1D flow: Creates a FEM fluid section element for pneumatic and hydraulic networks.

### Electrostatic Constraints

### Fluid constraints

- Constraint initial flow velocity: Used to define an initial flow velocity for the domain.

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

### Mechanical constraints

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

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

- Constraint plane rotation: Used to define a plane rotation constraint on a planar face.

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

- Constraint transform: Used to define a transform constraint on a face.

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

- Constraint pressure: Used to define a pressure constraint.

- Constraint self weight: Used to define a gravity acceleration acting on a model.

- Constraint bearing: Used to define a bearing constraint.

- Constraint gear: Used to define a gear constraint.

- Constraint pulley: Used to define a pulley constraint.

### Thermal constraints

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

- Constraint heatflux: Used to define a heat flux constraint on a face(s).

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

## Menu: Mesh

- Nodes set: Creates/defines a node set from FEM mesh.

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

## Menu: Solve

- Solver Calculix CCX tools: Creates a new solver for this analysis. In most cases the solver is created together with the analysis.

- Solver Elmer: Creates the solver controller for Elmer. It is independent from other solver objects.

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

- Solver run calculation: Runs the selected solver of the active analysis.

## Menu: Results

- Results purge: Deletes the results of the active analysis.

- Result show: Used to display the result of an analysis.

## Menu: Utilities

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

## Context Menu

## 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 Mesh: further information on obtaining a mesh for finite element analysis.

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.

FEM Project: further information on the unit system, limitations, and the development ideas and roadmap of the workbench.

## 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.

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)

**Materials:**Solid, Fluid, Nonlinear mechanical; Material editor

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

**Constraints**

**Electrostatic:**Potential

**Fluid:**Initial velocity, Fluid boundary, Flow velocity

**Mechanical:**Fixed, Displacement, Plane rotation, Contact, Transform, Force, Pressure, Self weight, Bearing, Gear, Pulley

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

**Solve:**Calculix tools, CalculiX, Elmer, Z88;**Equations:**Heat, Elasticity, Electrostatic, Fluxsolver, Flow;**Solver:**Solver control, Solver run

**Results:**Purge, Show;**Postprocessing:**Apply changes, Pipeline from result, Create warp vector filter, Create scalar clip filter, Create cut filter, Create clip filter, Create data along line filter, Create linearized stresses,

Create data at point filter, Create functions

**Utilities:**Clipping plane, Remove clipping planes; Mesh clear, Mesh print info

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

**Installation:**Linux, Windows, Mac;**Getting started****Basics:**About FreeCAD, Workbenches, Preferences, Document structure, Interface Customization, Properties, Mouse Model; Tutorials**Workbenches**: Arch, Draft, FEM, Image, Inspection, Mesh, OpenSCAD, Part, PartDesign, Path, Plot, Points, Raytracing, Reverse Engineering, Robot, Ship, Sketcher, Spreadsheet, Start, Surface workbench, TechDraw, Test Framework, Web

**Scripting:**Introduction to Python, FreeCAD scripting tutorial, FreeCAD Scripting Basics, How to install macros, Gui Command, Units**Modules:**Builtin modules, Workbench creation, Installing more workbenches**Meshes:**Mesh Scripting, Mesh Module**Parts:**The Part Module, Topological data scripting, PythonOCC, Mesh to Part**Coin scenegraph:**The Coin/Inventor scenegraph, Pivy**Qt interface:**PySide, Using the FreeCAD GUI, Dialog creation**Parametric objects:**Scripted objects**Other:**Code snippets, Line drawing function, Embedding FreeCAD, FreeCAD vector math library, Power users hub, Python, Macros, FreeCAD Scripting Basics, Topological data scripting