FEM Workbench: Difference between revisions

From FreeCAD Documentation
(description of scalar clip)
(complete reference links)
(12 intermediate revisions by 4 users not shown)
Line 68: Line 68:


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


=== Element Geometry === <!--T:68-->
=== Element Geometry === <!--T:68-->
Line 82: Line 82:


<!--T:87-->
<!--T:87-->
* [[Image:FEM_ElementFluid1D.svg|32px]] [[FEM_ElementFluid1D|Fluid section for 1D flow]]: Creates a FEM fluid section element for pneumatic and hydraulic networks.
* [[Image:FEM_ElementFluid1D.svg|32px]] [[FEM_ElementFluid1D|Fluid section for 1D flow]]: Used to create fluid section element for pneumatic and hydraulic networks.


=== Electrostatic Constraints === <!--T:69-->
=== Electrostatic Constraints === <!--T:69-->


<!--T:88-->
<!--T:88-->
* [[Image:FEM_ConstraintElectrostaticPotential.svg|32px]] [[FEM_ConstraintElectrostaticPotential|Constraint electrostatic potential]]:
* [[Image:FEM_ConstraintElectrostaticPotential.svg|32px]] [[FEM_ConstraintElectrostaticPotential|Constraint electrostatic potential]]: Used to define electrostatic potential.


=== Fluid Constraints === <!--T:70-->
=== Fluid Constraints === <!--T:70-->
Line 154: Line 154:


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


<!--T:100-->
<!--T:100-->
Line 199: Line 199:


<!--T:114-->
<!--T:114-->
* [[Image:FEM_SolverCalculiX.svg|32px]] [[FEM_SolverCalculiX|Solver CalculiX (experimental)]]:
* [[Image:FEM_SolverCalculiX.svg|32px]] [[FEM_SolverCalculiX|Solver CalculiX (new framework)]]:


<!--T:115-->
<!--T:115-->
Line 243: Line 243:


<!--T:126-->
<!--T:126-->
* [[Image:FEM_PostApplyChanges.svg|32px]] [[FEM_PostApplyChanges|Apply changes to pipeline]]:
* [[Image:FEM_PostApplyChanges.svg|32px]] [[FEM_PostApplyChanges|Apply changes to pipeline]]: Toggles if changes to pipelines and filters are applied immediately.


<!--T:127-->
<!--T:127-->
Line 255: Line 255:


<!--T:130-->
<!--T:130-->
* [[Image:FEM_PostFilterCutFunction.svg|32px]] [[FEM_PostFilterCutFunction|Function cut filter]]:
* [[Image:FEM_PostFilterCutFunction.svg|32px]] [[FEM_PostFilterCutFunction|Function cut filter]]: Used to display the results on a sphere or a plane cutting through the model.


<!--T:131-->
<!--T:131-->
* [[Image:FEM_PostFilterClipRegion.svg|32px]] [[FEM_PostFilterClipRegion|Region clip filter]]:
* [[Image:FEM_PostFilterClipRegion.svg|32px]] [[FEM_PostFilterClipRegion|Region clip filter]]: Used to clip a field with a sphere or a plane cutting through the model.


<!--T:132-->
<!--T:132-->
* [[Image:FEM_PostFilterDataAlongLine.svg|32px]] [[FEM_PostFilterDataAlongLine|Line clip filter]]:
* [[Image:FEM_PostFilterDataAlongLine.svg|32px]] [[FEM_PostFilterDataAlongLine|Line clip filter]]: Used to plot the values of a field along a specified line.


<!--T:133-->
<!--T:133-->
* [[Image:FEM_PostFilterLinearizedStresses.svg|32px]] [[FEM_PostFilterLinearizedStresses|Stress linearization plot]]:
* [[Image:FEM_PostFilterLinearizedStresses.svg|32px]] [[FEM_PostFilterLinearizedStresses|Stress linearization plot]]: Creates a stress linearization plot.


<!--T:134-->
<!--T:134-->
Line 270: Line 270:


<!--T:135-->
<!--T:135-->
* [[Image:Fem-post-geo-plane.svg|32px]] [[FEM_PostCreateFunctions|Filter functions]]: Used to define how the result mesh is cut for the [[FEM_PostFilterCutFunction|Function cut filter]] and [[FEM_PostFilterClipRegion|Region clip filter]].
* [[FEM_PostCreateFunctions|Filter functions]]:
** [[Image:Fem-post-geo-plane.svg|32px]]
** [[Image:Fem-post-geo-sphere.svg|32px]]


== Menu: Utilities == <!--T:76-->
== Menu: Utilities == <!--T:76-->


<!--T:136-->
<!--T:136-->
* [[Image:FEM_ClippingPlaneAdd.svg|32px]] [[FEM_ClippingPlaneAdd|Clipping plane on face]]:
* [[Image:FEM_ClippingPlaneAdd.svg|32px]] [[FEM_ClippingPlaneAdd|Clipping plane on face]]: Adds a clipping plane for the whole model view.


<!--T:137-->
<!--T:137-->
* [[Image:FEM_ClippingPlaneRemoveAll.svg|32px]] [[FEM_ClippingPlaneRemoveAll|Remove all clipping planes]]:
* [[Image:FEM_ClippingPlaneRemoveAll.svg|32px]] [[FEM_ClippingPlaneRemoveAll|Remove all clipping planes]]: Removes all existing [[FEM_ClippingPlaneAdd|clipping planes]].


<!--T:158-->
<!--T:158-->
Line 333: Line 331:


<!--T:155-->
<!--T:155-->
Tutorial 5: [[Transient FEM analysis]]
Tutorial 5: [[Transient_FEM_analysis|Transient FEM analysis]]


<!--T:157-->
<!--T:157-->
Tutorial 6: [[Post-Processing_of_FEM_Results_with_Paraview]]
Tutorial 6: [[Post-Processing_of_FEM_Results_with_Paraview|Post-Processing of FEM Results with Paraview]]


<!--T:159-->
<!--T:159-->
Tutorial 7: [[FEM Example Capacitance Two Balls]]; Elmer's GUI tutorial 6 "Electrostatics Capacitance Two Balls" using FEM Examples.
Tutorial 7: [[FEM_Example_Capacitance_Two_Balls|FEM Example Capacitance Two Balls]]; Elmer's GUI tutorial 6 "Electrostatics Capacitance Two Balls" using FEM Examples.


<!--T:55-->
<!--T:55-->
Line 359: Line 357:


<!--T:151-->
<!--T:151-->
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 [https://forum.freecadweb.org/index.php FreeCAD forums], in the Development section. For FEM discussions, advice or assistance in extending the workbench, the reader should refer to the [https://forum.freecadweb.org/viewforum.php?f=18 FEM subforum].
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|Power users hub]] and the [[Developer_hub|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 [https://forum.freecadweb.org/index.php FreeCAD forums], in the Development section. For FEM discussions, advice or assistance in extending the workbench, the reader should refer to the [https://forum.freecadweb.org/viewforum.php?f=18 FEM subforum].


<!--T:60-->
<!--T:60-->

Revision as of 12:12, 29 June 2022

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.
  • Solver Z88: Creates the solver controller for Z88. It is independent from other solver objects.

Menu: Results

  • Show result: Used to display the result of an analysis.
  • 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.
  • 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.

Menu: Utilities

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.

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.

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