FEM Mesh/de

Ein FE Polygonnetz erstellen
Die Finite Elemente Analyse (FEA) wird an einem Polygonnetz durchgeführt, das aus mehreren drei- und vierseitigen Finite Elementen besteht, die einen Originalkörper unterteilen. Je feiner das Netz ist, desto genauer sind die numerischen Ergebnisse, aber auch desto größer ist die Berechnungszeit. Ein ausgewogenes Verhältnis zwischen der Größe des Netzes, der Berechnungszeit und der Genauigkeit der Ergebnisse ist ein wichtiges Merkmal einer gut definierten Finite Elemente Analyse.

Es gibt verschiedene Möglichkeiten, ein Polygonnetz im FEM Arbeitsbereich einzurichten:
 * Das Gmsh Werkzeug von der grafischen Benutzeroberfläche aus.
 * Das Netgen Werkzeug von der grafischen Benutzeroberfläche aus.
 * Importieren eines Polygonnetzes aus einem anderen Programm. Insbesondere können Gmsh und Netgen außerhalb von FreeCAD allein verwendet werden, um Volumenkörper wie Step Dateien zu vernetzen.
 * Manuelle Erstellung des Netzes durch Python Skripten.

Die Gmsh und Netgen Werkzeuge unterstützen die Vernetzung von Körpern, die mit der Part und PartDesign Arbeitsbereiche erstellt wurden, sowie einfache Kopien dieser Körper. Im Allgemeinen kann jeder Arbeitsbereich, der Volumenkörper erzeugt, wie z.B. die Arch Arbeitsbereich, als Grundlage für die Erstellung von Polygonnetzen verwendet werden. Beachte, dass sich ein für die FEA verwendetes Netz von einem Netz unterscheidet, das mit der Polygonnetz Arbeitsbereich erstellt oder importiert wurde.





The Gmsh and Netgen tools are convenience tools to quickly mesh a body, and thus don't expose the full capabilities of these programs; they normally create triangular meshes, which may not be ideal for some types of analysis. If you'd like to have more control of the created mesh (use only quadrilaterals, precise element number and size, variable resolution of the mesh, etc.), you should use these programs externally, produce a mesh file in a supported format, and import this file into FreeCAD.

Previously, Netgen was included with FreeCAD and could be used immediately. Now, both Netgen and Gmsh should be installed before they can be used by the FEM Workbench. Refer to FEM Install for instructions.

Meshing software
Meshing software operates on solid bodies that can be in different formats, like Step and Brep. These programs can be used independently of FreeCAD, and typically have many options to control the meshing algorithms, element size, and boundary conditions.

The FEM Workbench has developed simple communication interfaces to use Gmsh and Netgen directly inside FreeCAD. Other programs don't have an interface, but this could change in the future if there is interest from the community, and if those applications are easy to integrate. The meshing software can be compiled and distributed together with FreeCAD only if its license is compatible with the LGPL2 license; otherwise, the program has to be used as an external binary, like Gmsh (GPL2) is used.

Interface implemented in FreeCAD

 * Gmsh: main website, code repository
 * Netgen: main website, code repository

No interface in FreeCAD

 * ENigMA, forum thread, code repository
 * libMesh, main website, code repository, forum thread; it's a very active project, and it's C++ only
 * PythonOCC, main website
 * SnappyHexMesh, main website
 * Tetgen, main website

Mesh elements in FreeCAD
FreeCAD supports various element types. The following article explains the difference between them, and when should be used: Meshing Your Geometry: When to Use the Various Element Types.


 * "NI" means the element type is not implemented in FreeCAD but the format would support it.
 * Edit_Cancel.svg "-" means the format specification does not support this element type, thus FreeCAD cannot support it.
 * "?" means it is not known if the format supports this element type.

FEM element types
More information on the elements, and their data structure inside FreeCAD can be found in FEM Element Types.

Create a FEM mesh completely in Python
FreeCAD Scripting Basics.

The Python API allows the user to define a finite element mesh by directly adding individual nodes, and defining edges, faces, and volumes.

The mesh itself is of type, which needs to be attached to a proper document object of type.

Creating a mesh with one Tet-10 element
Create an empty FemMesh, populate it with nodes, create the volume, and finally call to create the document object with the corresponding mesh.

If you want to have predefined node and element numbering, pass the appropriate ID to the node and volume methods.

To create an actual document object, instead of you can also use the document  method; then attach the created mesh to this object's  attribute.

Visual properties
Once a FemMesh object has been created with, some of its visual properties can be changed by modifying the different attributes of its. This can be useful to postprocess the mesh after a finite element solution has been obtained.

Highlight some nodes in the mesh

The individual elements of a mesh can be modified by passing a dictionary with the appropriate pairs.

Set volume 1 to red

Set nodes 1, 2 and 3 to a certain color; the faces between the nodes acquire an interpolated color

Displace the nodes 1 and 2 by the magnitude and direction defined by a vector

Double the factor of the displacement shown

Shell, 3 node triangle, tria3 (linear)
Add a face with the element number.

Shell, 6 node triangle, tria6 (quadratic)
Add a face with the element number.

Shell, 4 node quadrangle, quad4 (linear)
Add a face with the element number.

Shell, 8 node quadrangle, quad8 (quadratic)
Add a face with the element number.

Volume, 4 node tetrahedron, tetra4 (linear)
Add a volume with the element number.

Volume, 10 node tetrahedron, tetra10 (quadratic)
Add a volume with the element number.

Volume, 8 node hexahedron, hexa8 (linear)
Add a volume with the element number.

Volume, 20 node hexahedron, hexa20 (quadratic)
Add a volume with the element number.

Volume, 6 node pentahedron, penta6 (linear)
Add a volume with the element number.

Volume, 15 node pentahedron, penta15 (quadratic)
Add a volume with the element number.

Volume, 5 node pyramid, pyra5 (linear)
Add a volume with the element number.

Volume, 13 node pyramid, pyra13 (quadratic)
Add a volume with the element number.

Scripting examples for groups
See for example https://forum.freecadweb.org/viewtopic.php?f=18&t=37304&start=20#p318823