FEM tutorial/en: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{TutorialInfo |
{{TutorialInfo |
||
|Topic= |
|Topic=Finite Element Analysis |
||
|Level= |
|Level=Beginner |
||
|Time= |
|Time=10 minutes + Solver time |
||
|Author=[http://freecadweb.org/wiki/index.php?title=User:Drei Drei] |
|Author=[http://freecadweb.org/wiki/index.php?title=User:Drei Drei] |
||
|FCVersion=0. |
|FCVersion=0.17 or above |
||
|Files= |
|||
}} |
}} |
||
== Introduction == |
== Introduction == |
||
This tutorial is meant to introduce the reader to the basic workflow of the FEM Workbench, as well as most of the tools that are available to perform a static analysis. |
This tutorial is meant to introduce the reader to the basic workflow of the FEM Workbench, as well as most of the tools that are available to perform a static analysis. |
||
Line 15: | Line 16: | ||
== Requirements == |
== Requirements == |
||
* FreeCAD version 0. |
* FreeCAD version 0.17 or above. |
||
* [http://sourceforge.net/projects/netgen-mesher/ Netgen] and/or [http://geuz.org/gmsh/ GMSH] is installed on the system |
* [http://sourceforge.net/projects/netgen-mesher/ Netgen] and/or [http://geuz.org/gmsh/ GMSH] is installed on the system (included in the FreeCAD installation). |
||
* In the case of GMSH, install [[Macro_GMSH|Macro GMSH]] from the [[Std_AddonMgr|AddonManager]], developed by [https://github.com/psicofil/Macros_FreeCAD psicofil] |
|||
* [http://www.calculix.de/ Calculix] is installed on the system |
* [http://www.calculix.de/ Calculix] is installed on the system (included in the FreeCAD installation). |
||
* The reader has the basic knowledge to use the [[Part_Workbench|Part]] and [[PartDesign_Workbench|PartDesign |
* The reader has the basic knowledge to use the [[Part_Workbench|Part]] and [[PartDesign_Workbench|PartDesign]] Workbenches. |
||
== Procedure == |
== Procedure == |
||
=== Modeling === |
=== Modeling === |
||
⚫ | |||
⚫ | |||
⚫ | |||
# Activate the Part Workbench |
|||
# Press the {{Button|[[Image:Std_New.svg|16px|link=Std_New]] [[Std_New|Std New]]}} button to create a new document. |
|||
# Create a Cube |
|||
# Activate the [[Image:Workbench_Part.svg|24px|link=Part_Workbench]] [[Part_Workbench|Part Workbench]]. |
|||
⚫ | |||
# Change its '''Dimensions''' to the following: |
# Change its '''Dimensions''' to the following: |
||
## |
## Length: 8.000 m. |
||
## |
## Width: 1.000 m. |
||
## |
## Height: 1.000 m. |
||
Now we have a model |
Now we have a model to work with. |
||
=== Creating the Analysis === |
=== Creating the Analysis === |
||
⚫ | |||
⚫ | |||
# Click [[Image:FEM_Analysis.png|16px]] [[FEM Analysis|New mechanical analysis]] from the menu to create an analysis from the object that was selected |
|||
⚫ | |||
# Activate the [[Image:Workbench_FEM.svg|24px|link=FEM_Workbench]] [[FEM_Workbench|FEM Workbench]]. |
|||
⚫ | |||
# Select the {{MenuCommand|Model → [[Image:FEM_Analysis.svg|16px]] Analysis container}} option from the menu. |
|||
⚫ | |||
The usage of psicofil's macro is recommended, and is used for this example. |
|||
# Activate the macro |
|||
# Select the object you wish to use, in this case our Cube |
|||
# Check the box '''Create Mechanical Analysis from mesh''' |
|||
⚫ | |||
⚫ | |||
=== Constraints and Forces === |
=== Constraints and Forces === |
||
# Hide the mesh from the Tree View. |
# Hide the mesh from the Tree View. |
||
# Show the original model |
# Show the original model. |
||
# Select [[Image: |
# Select [[Image:FEM_ConstraintFixed.svg|24px|link=FEM_ConstraintFixed]] [[FEM_ConstraintFixed|Create FEM fixed constraint]]. |
||
# |
# Click {{Button|Add}}, select the back face of the Cube object (face on the '''YZ''' axis) and click {{Button|OK}}. |
||
# Select [[Image: |
# Select [[Image:FEM_ConstraintForce.svg|24px|link=FEM_ConstraintForce]] [[FEM_ConstraintForce|Create FEM force constraint]]. |
||
# |
# Click {{Button|Add}}, select the front face of the Cube object (the face parallel to the back face) and set the '''Force [N]''' value to 9000000. |
||
# Set the '''Direction''' to '''-Z''' by selecting one of the face edges parallel to that direction. |
# Set the '''Direction''' to '''-Z''' by selecting one of the face edges parallel to that direction. |
||
# Click OK |
# Click {{Button|OK}}. |
||
We now have established the restrictions and forces for our static study. |
We now have established the restrictions and forces for our static study. |
||
=== |
=== Material === |
||
# Select [[Image: |
# Select [[Image:FEM_MaterialSolid.svg|24px]] [[FEM_MaterialSolid|Material for solid]] and choose Calculix-Steel as the material. |
||
⚫ | |||
⚫ | |||
=== Meshing === |
|||
It is recommended to make a mesh as the last step in the analysis preparations due to association to a geometry in FreeCAD. |
|||
Depending on FreeCAD installation, there can be Netgen or GMSH meshers, you can use any of them. |
|||
⚫ | |||
⚫ | |||
# [[Image:FEM_MeshNetgenFromShape.svg|24px]] [[FEM_MeshNetgenFromShape|FEM mesh from shape by Netgen]]: Generates a finite element mesh for a model using Netgen. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
# Select the model |
|||
# [[Image:FEM_MeshGmshFromShape.svg|24px]] [[FEM_MeshGmshFromShape|FEM mesh from shape by Gmsh]]: Generates a finite element mesh for a model using Gmsh. |
|||
# In the meshing dialog, click {{Button|Apply}} and {{Button|OK}}. |
|||
⚫ | |||
=== Running the Solver === |
=== Running the Solver === |
||
==== Standard Procedure ==== |
==== Standard Procedure ==== |
||
# Select the solver object [[Image: |
# Select the solver object [[Image:FEM_SolverCalculixCxxtools.svg|24px]] contained in the '''Analysis''' container. |
||
# Select [[Image: |
# Select [[Image:FEM_SolverControl.svg|24px]] [[FEM_SolverControl|Solver job control]] from the menu. |
||
# Select '''Write Calculix Input File''' |
|||
# Select ''' |
# Select '''Write .inp File'''. |
||
# |
# Select '''Run CalculiX'''. |
||
⚫ | |||
==== Quick Procedure ==== |
==== Quick Procedure ==== |
||
# Select the solver object [[Image:FEM_Solver.png|16px]] contained in the '''Mechanical Analysis''' |
|||
# |
# Select the solver object [[Image:FEM_SolverCalculixCxxtools.svg|24px]] contained in the '''Analysis''' container. |
||
# Click on [[Image:FEM_SolverRun.svg|24px]] [[FEM_SolverRun|Run solver calculations]]. |
|||
=== Analyzing Results === |
=== Analyzing Results === |
||
# From the '''Object Tree''', select the ''' |
# From the '''Object Tree''', select the '''CCX_Results''' object. |
||
# Select [[Image: |
# Select [[Image:FEM_ResultShow.svg|24px|link=FEM_ResultShow]] [[FEM_ResultShow|Show result]]. |
||
# Choose among the different Result types to view the results |
# Choose among the different Result types to view the results. |
||
# The slider at the bottom can be used to alter the mesh visualization. This allows us to visualize the deformation experienced by |
# The slider at the bottom can be used to alter the mesh visualization. This allows us to visualize the deformation experienced by the object, keep in mind that this is an approximation. |
||
# To remove the results select [[Image: |
# To remove the results select [[Image:FEM_ResultsPurge.svg|24px|link=FEM_ResultsPurge]] [[FEM_ResultsPurge|Purge results]]. |
||
{{Note|Comparison to previous example file|If you select the '''Z displacement''' result type, you can see that the obtained value is almost identical to the test example provided by FreeCAD. Differences may occur due to the quality of the mesh and the number of nodes it possesses.}} |
{{Note|Comparison to previous example file|If you select the '''Z displacement''' result type, you can see that the obtained value is almost identical to the test example provided by FreeCAD. Differences may occur due to the quality of the mesh and the number of nodes it possesses.}} |
||
We are now finished with the basic workflow for the [[FEM |
We are now finished with the basic workflow for the [[FEM_Workbench|FEM Workbench]]. |
||
== Notes == |
|||
* For a video tutorial based on this written tutorial watch: [https://www.youtube.com/watch?v=SZTIqhfCSVc FEM MaterialReinforced tutorial]. |
|||
{{Tutorials navi{{#translation:}}}} |
|||
{{FEM Tools navi{{#translation:}}}} |
{{FEM Tools navi{{#translation:}}}} |
||
{{Userdocnavi{{#translation:}}}} |
{{Userdocnavi{{#translation:}}}} |
Latest revision as of 09:38, 27 March 2024
Tutorial |
Topic |
---|
Finite Element Analysis |
Level |
Beginner |
Time to complete |
10 minutes + Solver time |
Authors |
Drei |
FreeCAD version |
0.17 or above |
Example files |
None |
See also |
None |
Introduction
This tutorial is meant to introduce the reader to the basic workflow of the FEM Workbench, as well as most of the tools that are available to perform a static analysis.
Requirements
- FreeCAD version 0.17 or above.
- Netgen and/or GMSH is installed on the system (included in the FreeCAD installation).
- Calculix is installed on the system (included in the FreeCAD installation).
- The reader has the basic knowledge to use the Part and PartDesign Workbenches.
Procedure
Modeling
In this example a Cube is used as the study object, but any model created in the Part or PartDesign Workbenches can be used instead.
- Press the Std New button to create a new document.
- Activate the Part Workbench.
- Create a Cube.
- Change its Dimensions to the following:
- Length: 8.000 m.
- Width: 1.000 m.
- Height: 1.000 m.
Now we have a model to work with.
Creating the Analysis
- Activate the FEM Workbench.
- Select the Model → Analysis container option from the menu.
Constraints and Forces
- Hide the mesh from the Tree View.
- Show the original model.
- Select Create FEM fixed constraint.
- Click Add, select the back face of the Cube object (face on the YZ axis) and click OK.
- Select Create FEM force constraint.
- Click Add, select the front face of the Cube object (the face parallel to the back face) and set the Force [N] value to 9000000.
- Set the Direction to -Z by selecting one of the face edges parallel to that direction.
- Click OK.
We now have established the restrictions and forces for our static study.
Material
- Select Material for solid and choose Calculix-Steel as the material.
- Click OK.
Meshing
It is recommended to make a mesh as the last step in the analysis preparations due to association to a geometry in FreeCAD. Depending on FreeCAD installation, there can be Netgen or GMSH meshers, you can use any of them.
Netgen
- Select the model.
- FEM mesh from shape by Netgen: Generates a finite element mesh for a model using Netgen.
- In the meshing dialog, click Apply and OK.
You can also drag and drop a mesh to a Mechanical Analysis that does not have a mesh within the Tree view.
GMSH
- Select the model
- FEM mesh from shape by Gmsh: Generates a finite element mesh for a model using Gmsh.
- In the meshing dialog, click Apply and OK.
We have now meshed our object and are ready to add constraints and forces.
Running the Solver
Standard Procedure
- Select the solver object contained in the Analysis container.
- Select Solver job control from the menu.
- Select Write .inp File.
- Select Run CalculiX.
- Click OK.
Quick Procedure
- Select the solver object contained in the Analysis container.
- Click on Run solver calculations.
Analyzing Results
- From the Object Tree, select the CCX_Results object.
- Select Show result.
- Choose among the different Result types to view the results.
- The slider at the bottom can be used to alter the mesh visualization. This allows us to visualize the deformation experienced by the object, keep in mind that this is an approximation.
- To remove the results select Purge results.
If you select the Z displacement result type, you can see that the obtained value is almost identical to the test example provided by FreeCAD. Differences may occur due to the quality of the mesh and the number of nodes it possesses.
We are now finished with the basic workflow for the FEM Workbench.
Notes
- For a video tutorial based on this written tutorial watch: FEM MaterialReinforced tutorial.
- 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