FEM Workbench: Difference between revisions

From FreeCAD Documentation
(update to new naming)
No edit summary
(20 intermediate revisions by 5 users not shown)
Line 36: Line 36:


<!--T:33-->
<!--T:33-->
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|FEM Install]] for instructions on setting up the external tools.
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|FEM Install]] for instructions on setting up the external tools.


<!--T:153-->
<!--T:153-->
Line 61: Line 61:


<!--T:154-->
<!--T:154-->
* [[Image:FEM_MaterialReinforced.svg|32px]] [[FEM_MaterialReinforced|Reinforced material]]: Lets you select reinforced materials consist of a matrix and a reinforcement from the database.
* [[Image:FEM_MaterialReinforced.svg|32px]] [[FEM_MaterialReinforced|Reinforced material (concrete)]]: Lets you select reinforced materials consist of a matrix and a reinforcement from the database.


<!--T:83-->
<!--T:83-->
* [[Image:Arch_Material_Group.svg|32px]] [[Material_editor|Material editor]]:: Lets you open the material editor to edit materials.
* [[Image:Arch_Material_Group.svg|32px]] [[Material_editor|Material editor]]: Lets you open the material editor to edit materials.


=== Element Geometry === <!--T:68-->
=== Element Geometry === <!--T:68-->
Line 85: Line 85:
* [[Image:FEM_ConstraintElectrostaticPotential.svg|32px]] [[FEM_ConstraintElectrostaticPotential|Constraint electrostatic potential]]:
* [[Image:FEM_ConstraintElectrostaticPotential.svg|32px]] [[FEM_ConstraintElectrostaticPotential|Constraint electrostatic potential]]:


=== Fluid constraints === <!--T:70-->
=== Fluid Constraints === <!--T:70-->


<!--T:89-->
<!--T:89-->
Line 93: Line 93:
* [[Image:FEM_ConstraintFlowVelocity.svg|32px]] [[FEM_ConstraintFlowVelocity|Constraint flow velocity]]: Used to define a flow velocity as a boundary condition at an edge (2D) or face (3D).
* [[Image:FEM_ConstraintFlowVelocity.svg|32px]] [[FEM_ConstraintFlowVelocity|Constraint flow velocity]]: Used to define a flow velocity as a boundary condition at an edge (2D) or face (3D).


=== Geometrical constraints ===
=== Geometrical Constraints === <!--T:160-->


<!--T:94-->
<!--T:94-->
* [[Image:FEM_ConstraintPlaneRotation.svg|32px]] [[FEM_ConstraintPlaneRotation|Constraint plane rotation]]: Used to define a plane rotation constraint on a planar face.
* [[Image:FEM_ConstraintPlaneRotation.svg|32px]] [[FEM_ConstraintPlaneRotation|Constraint plane rotation]]: Used to define a plane rotation constraint on a planar face.


<!--T:161-->
* [[Image:FEM_ConstraintSectionPrint.svg|32px]] [[FEM_ConstraintSectionPrint|Constraint section print]]: {{Version|0.19}}
* [[Image:FEM_ConstraintSectionPrint.svg|32px]] [[FEM_ConstraintSectionPrint|Constraint section print]]: {{Version|0.19}}


Line 103: Line 104:
* [[Image:FEM_ConstraintTransform.svg|32px]] [[FEM_ConstraintTransform|Constraint transform]]: Used to define a transform constraint on a face.
* [[Image:FEM_ConstraintTransform.svg|32px]] [[FEM_ConstraintTransform|Constraint transform]]: Used to define a transform constraint on a face.


=== Mechanical constraints === <!--T:71-->
=== Mechanical Constraints === <!--T:71-->


<!--T:92-->
<!--T:92-->
Line 114: Line 115:
* [[Image:FEM_ConstraintContact.svg|32px]] [[FEM_ConstraintContact|Constraint contact]]: Used to define a contact constraint between two faces.
* [[Image:FEM_ConstraintContact.svg|32px]] [[FEM_ConstraintContact|Constraint contact]]: Used to define a contact constraint between two faces.


<!--T:162-->
* [[Image:FEM_ConstraintTie.svg|32px]] [[FEM_ConstraintTie|Constraint tie]]: {{Version|0.19}}
* [[Image:FEM_ConstraintTie.svg|32px]] [[FEM_ConstraintTie|Constraint tie]]: {{Version|0.19}}


Line 125: Line 127:
* [[Image:FEM_ConstraintSelfWeight.svg|32px]] [[FEM_ConstraintSelfWeight|Constraint self weight]]: Used to define a gravity acceleration acting on a model.
* [[Image:FEM_ConstraintSelfWeight.svg|32px]] [[FEM_ConstraintSelfWeight|Constraint self weight]]: Used to define a gravity acceleration acting on a model.


=== Thermal constraints === <!--T:72-->
=== Thermal Constraints === <!--T:72-->


<!--T:103-->
<!--T:103-->
Line 139: Line 141:
* [[Image:FEM_ConstraintBodyHeatSource.svg|32px]] [[FEM_ConstraintBodyHeatSource|Constraint body heat source]]:
* [[Image:FEM_ConstraintBodyHeatSource.svg|32px]] [[FEM_ConstraintBodyHeatSource|Constraint body heat source]]:


=== Constraints without solver ===
=== Constraints without solver === <!--T:163-->


<!--T:90-->
<!--T:90-->
* [[Image:FEM_ConstraintFluidBoundary.svg|32px]] [[FEM_ConstraintFluidBoundary|Constraint fluid boundary]]:
* [[Image:FEM_ConstraintFluidBoundary.svg|32px]] [[FEM_ConstraintFluidBoundary|Fluid boundary condition]]:


<!--T:100-->
<!--T:100-->
Line 152: Line 154:
<!--T:102-->
<!--T:102-->
* [[Image:FEM_ConstraintPulley.svg|32px]] [[FEM_ConstraintPulley|Constraint pulley]]: Used to define a pulley constraint.
* [[Image:FEM_ConstraintPulley.svg|32px]] [[FEM_ConstraintPulley|Constraint pulley]]: Used to define a pulley constraint.

=== Overwrite Constants === <!--T:164-->

<!--T:165-->
* [[Image:FEM_ConstantVacuumPermittivity.svg|32px]] [[FEM_ConstantVacuumPermittivity|Constant vacuum permittivity]]: {{Version|0.19}}


== Menu: Mesh == <!--T:73-->
== Menu: Mesh == <!--T:73-->
Line 159: Line 166:


<!--T:108-->
<!--T:108-->
* [[Image:FEM_MeshGmshFromShape.svg|32px]] [[FEM_MeshGmshFromShape|FEM mesh from shape by GMSH]]:
* [[Image:FEM_MeshGmshFromShape.svg|32px]] [[FEM_MeshGmshFromShape|FEM mesh from shape by Gmsh]]:


<!--T:109-->
<!--T:109-->
* [[Image:FEM_MeshBoundaryLayer.svg|32px]] [[FEM_MeshBoundaryLayer|FEM mesh boundary layer]]:
* [[Image:FEM_MeshBoundaryLayer.svg|32px]] [[FEM_MeshBoundaryLayer|FEM mesh boundary layer]]: Creates anisotropic meshes for accurate calculations near boundaries.


<!--T:141-->
<!--T:141-->
* [[Image:FEM_MeshRegion.svg|32px]] [[FEM_MeshRegion|FEM mesh region]]:
* [[Image:FEM_MeshRegion.svg|32px]] [[FEM_MeshRegion|FEM mesh region]]: Creates a localized area(s) to mesh which highly optimizes analysis time.


<!--T:110-->
<!--T:110-->
* [[Image:FEM_MeshGroup.svg|32px]] [[FEM_MeshGroup|FEM mesh group]]:
* [[Image:FEM_MeshGroup.svg|32px]] [[FEM_MeshGroup|FEM mesh group]]: Groups and labels elements of a mesh (vertex, edge, surface) together, useful for exporting the mesh to external solvers.


<!--T:111-->
<!--T:111-->
Line 179: Line 186:


<!--T:113-->
<!--T:113-->
* [[Image:FEM_SolverCalculixCxxtools.svg|32px]] [[FEM_SolverCalculixCxxtools|Solver Calculix Standard]]: Creates a new solver for this analysis. In most cases the solver is created together with the analysis.
* [[Image:FEM_SolverCalculixCxxtools.svg|32px]] [[FEM_SolverCalculixCxxtools|Solver CalculiX Standard]]: Creates a new solver for this analysis. In most cases the solver is created together with the analysis.


<!--T:114-->
<!--T:114-->
Line 193: Line 200:
* [[Image:FEM_EquationElasticity.svg|32px]] [[FEM_EquationElasticity|Elasticity equation]]:
* [[Image:FEM_EquationElasticity.svg|32px]] [[FEM_EquationElasticity|Elasticity equation]]:


<!--T:166-->
* [[Image:FEM_EquationElectricforce.svg|32px]] [[FEM_EquationElectricforce|Electricforce equation]]: {{Version|0.19}}
* [[Image:FEM_EquationElectricforce.svg|32px]] [[FEM_EquationElectricforce|Electricforce equation]]: {{Version|0.19}}


Line 216: Line 224:


<!--T:124-->
<!--T:124-->
* [[Image:FEM_ResultsPurge.svg|32px]] [[FEM_ResultsPurge|Results purge]]: Deletes the results of the active analysis.
* [[Image:FEM_ResultsPurge.svg|32px]] [[FEM_ResultsPurge|Purge results]]: Deletes the results of the active analysis.


<!--T:125-->
<!--T:125-->
* [[Image:FEM_ResultShow.svg|24px]] [[FEM_ResultShow|Result show]]: Used to display the result of an analysis.
* [[Image:FEM_ResultShow.svg|24px]] [[FEM_ResultShow|Show result]]: Used to display the result of an analysis.


<!--T:126-->
<!--T:126-->
* [[Image:FEM_PostApplyChanges.svg|32px]] [[FEM_PostApplyChanges|Post Apply changes]]:
* [[Image:FEM_PostApplyChanges.svg|32px]] [[FEM_PostApplyChanges|Apply changes to pipeline]]:


<!--T:127-->
<!--T:127-->
* [[Image:FEM_PostPipelineFromResult.svg|32px]] [[FEM_PostPipelineFromResult|Post Pipeline from result]]:
* [[Image:FEM_PostPipelineFromResult.svg|32px]] [[FEM_PostPipelineFromResult|Post pipeline from result]]:


<!--T:128-->
<!--T:128-->
* [[Image:FEM_PostFilterWarp.svg|32px]] [[FEM_PostFilterWarp|Post Create warp vector filter]]:
* [[Image:FEM_PostFilterWarp.svg|32px]] [[FEM_PostFilterWarp|Warp filter]]:


<!--T:129-->
<!--T:129-->
* [[Image:FEM_PostFilterClipScalar.svg|32px]] [[FEM_PostFilterClipScalar|Post Create scalar clip filter]]:
* [[Image:FEM_PostFilterClipScalar.svg|32px]] [[FEM_PostFilterClipScalar|Scalar clip filter]]:


<!--T:130-->
<!--T:130-->
* [[Image:FEM_PostFilterCutFunction.svg|32px]] [[FEM_PostFilterCutFunction|Post Create cut filter]]:
* [[Image:FEM_PostFilterCutFunction.svg|32px]] [[FEM_PostFilterCutFunction|Function cut filter]]:


<!--T:131-->
<!--T:131-->
* [[Image:FEM_PostFilterClipRegion.svg|32px]] [[FEM_PostFilterClipRegion|Post Create clip filter]]:
* [[Image:FEM_PostFilterClipRegion.svg|32px]] [[FEM_PostFilterClipRegion|Region clip filter]]:


<!--T:132-->
<!--T:132-->
* [[Image:FEM_PostFilterDataAlongLine.svg|32px]] [[FEM_PostFilterDataAlongLine|Post Create data along line filter]]:
* [[Image:FEM_PostFilterDataAlongLine.svg|32px]] [[FEM_PostFilterDataAlongLine|Line clip filter]]:


<!--T:133-->
<!--T:133-->
* [[Image:FEM_PostFilterLinearizedStresses.svg|32px]] [[FEM_PostFilterLinearizedStresses|Post Create linearized stresses]]:
* [[Image:FEM_PostFilterLinearizedStresses.svg|32px]] [[FEM_PostFilterLinearizedStresses|Stress linearization plot]]:


<!--T:134-->
<!--T:134-->
* [[Image:FEM_PostFilterDataAtPoint.svg|32px]] [[FEM_PostFilterDataAtPoint|Post Create data at point filter]]:
* [[Image:FEM_PostFilterDataAtPoint.svg|32px]] [[FEM_PostFilterDataAtPoint|Data at point clip filter]]:


<!--T:135-->
<!--T:135-->
* [[Image:Fem-post-geo-sphere.svg|32px]][[File:Toolbar_flyout_arrow.svg|16px]] [[FEM_PostCreateFunctions|Post Create functions]]:
* [[FEM_PostCreateFunctions|Filter functions]]:
** [[Image:Fem-post-geo-sphere.svg|32px]] :
** [[Image:Fem-post-geo-plane.svg|32px]]
** [[Image:Fem-post-geo-plane.svg|32px]] :
** [[Image:Fem-post-geo-sphere.svg|32px]]


== Menu: Utilities == <!--T:76-->
== Menu: Utilities == <!--T:76-->
Line 262: Line 270:


<!--T:158-->
<!--T:158-->
* [[Image:FEM_Examples.svg|32px]] [[FEM_Examples|FEM Examples]]: Open the GUI to access FEM examples.
* [[Image:FEM_Examples.svg|32px]] [[FEM_Examples|Open FEM examples]]: Open the GUI to access FEM examples.


== Context Menu == <!--T:77-->
== Context Menu == <!--T:77-->


<!--T:138-->
<!--T:138-->
* [[Image:FEM_MeshClear.svg|32px]] [[FEM_MeshClear|FEM mesh clear]]:
* [[Image:FEM_MeshClear.svg|32px]] [[FEM_MeshClear|Clear FEM mesh]]: deletes the mesh file from the FreeCAD file. Useful to make a FreeCAD file lighter.


<!--T:139-->
<!--T:139-->
* [[Image:FEM_MeshDisplayInfo.svg|32px]] [[FEM_MeshDisplayInfo|FEM mesh display info]]:
* [[Image:FEM_MeshDisplayInfo.svg|32px]] [[FEM_MeshDisplayInfo|Display FEM mesh info]]:


== Preferences == <!--T:78-->
== Preferences == <!--T:78-->
Line 353: Line 361:
* [https://forum.freecadweb.org/viewtopic.php?t=17581 Early preview of ebook: Module developer' guide to FreeCAD source] (forum thread)
* [https://forum.freecadweb.org/viewtopic.php?t=17581 Early preview of ebook: Module developer' guide to FreeCAD source] (forum thread)
* [https://github.com/qingfengxia/FreeCAD_Mod_Dev_Guide FreeCAD Mod Dev Guide] (github repository)
* [https://github.com/qingfengxia/FreeCAD_Mod_Dev_Guide FreeCAD Mod Dev Guide] (github repository)

== Extending the FEM Workbench documentation == <!--T:153-->
* More information in the regard of extending or missing FEM documentation can be found on the forum: [https://forum.freecadweb.org/viewtopic.php?f=18&t=20823 FEM documentation missing on the Wiki]


<!--T:49-->
<!--T:49-->

Revision as of 14:13, 1 April 2021

FEM workbench icon

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:

  1. Preprocessing: setting up the analysis problem.
    1. Modeling the geometry: creating the geometry with FreeCAD, or importing it from a different application.
    2. Creating an analysis.
      1. Adding simulation constraints such as loads and fixed supports to the geometric model.
      2. Adding materials to the parts off the geometric model.
      3. Creating a finite element mesh for the geometrical model, or importing it from a different application.
  2. Solving: running an external solver from within FreeCAD.
  3. 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

Element Geometry

Electrostatic Constraints

Fluid Constraints

Geometrical Constraints

Mechanical Constraints

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

Thermal Constraints

Constraints without solver

Overwrite Constants

Menu: Mesh

  • 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.
  • Nodes set: Creates/defines a node set from FEM mesh.

Menu: Solve

  • Solver CalculiX Standard: 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.

Menu: Results

  • Show result: Used to display the result of an analysis.

Menu: Utilities

Context Menu

  • Clear FEM mesh: deletes the mesh file from the FreeCAD file. Useful to make a FreeCAD file lighter.

Preferences

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.

Extending the FEM Workbench documentation