FEM tutorial: Difference between revisions
m (Change Class variable to Topic) |
(Templates to categorize the page.) |
||
(25 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
|||
<translate> |
<translate> |
||
<!--T:1--> |
<!--T:1--> |
||
{{TutorialInfo |
{{TutorialInfo |
||
Line 7: | Line 7: | ||
|Time= 10 minutes + Solver 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.16 or above |
|FCVersion=0.16.6700 or above |
||
|Files= |
|Files= |
||
}} |
}} |
||
== Introduction == <!--T:8--> |
|||
! DO NOT TRANSLATE AT THE MOMENT ! work in progress ! see [[FEM_CalculiX_Cantilever_3D]] too. |
|||
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. |
|||
=== Introduction === <!--T:8--> |
|||
This tutorial is meant to introduce the reader to the basic workflow of the FEM Module, as well as most of the tools that are available to perform a static analysis. |
|||
<!--T:9--> |
<!--T:9--> |
||
[[Image:FEM_tutorial_result.png| |
[[Image:FEM_tutorial_result.png|600px]] |
||
== Requirements == <!--T:10--> |
|||
* |
* FreeCAD version 0.16.6700 or above |
||
* [http://sourceforge.net/projects/netgen-mesher/ Netgen] and/or [http://geuz.org/gmsh/ GMSH] is installed on the system |
|||
* The use of FreeCADs [[FEM_Module]] requires the installation of some external software. Check [[FEM_Install]] for further install instructions. |
|||
* In the case of GMSH, install [[Macro GMSH]] from the [[AddonManager]], developed by [https://github.com/psicofil/Macros_FreeCAD psicofil] |
|||
* The reader has the basic knowledge to use the Part and PartDesign Workbenches |
|||
* [http://www.calculix.de/ Calculix] is installed on the system |
|||
* The reader has the basic knowledge to use the [[Part Workbench|Part]] and [[PartDesign Workbench|PartDesign Workbenches]] |
|||
== Procedure == <!--T:2--> |
|||
=== Modeling === <!--T:11--> |
|||
=== Procedure === <!--T:10--> |
|||
==== Geometrical model ==== <!--T:11--> |
|||
In this example a Cube is used as the study object, but models created in the Part or PartDesign Workbenches can be used instead. |
In this example a Cube is used as the study object, but models created in the Part or PartDesign Workbenches can be used instead. |
||
Line 34: | Line 32: | ||
# Create a new document |
# Create a new document |
||
# Activate the Part Workbench |
# Activate the Part Workbench |
||
# Create a Cube |
# Create a Cube |
||
# Change its '''Dimensions''' to the following: |
|||
# We have a geometrical model to work with right now. |
|||
## Height: 1.000 mm |
|||
## Length: 8.000 mm |
|||
## Width: 1.000 mm |
|||
<!--T:13--> |
|||
Now we have a model with which to work with. |
|||
=== Creating the Analysis === <!--T:15--> |
|||
==== Netgen ==== |
|||
# Select the model |
|||
# Click [[Image:FEM_Analysis.png|16px]] [[FEM Analysis|New mechanical analysis]] from the menu to create an analysis from the object that was selected |
|||
# In the meshing dialog, click '''OK''' |
|||
<!--T:16--> |
|||
==== Create an analysis and mesh the geometrical model ==== <!--T:13--> |
|||
You can also drag and drop a mesh to a Mechanical Analysis that does not have a mesh within the Tree View. |
|||
# Switch to the FEM Workbench |
|||
# Do '''NOT''' select any object neither in tree view nor in model space |
|||
# Click [[Image:Fem_Analysis.svg|32px]] [[FEM Analysis|New mechanical analysis]] to create a analysis. |
|||
# An analysis container and a solver object will be created. |
|||
# The analysis should be activated already. |
|||
# If a file is reloaded the analysis has to be activated before anything could be done with the analysis objects. To activate an analysi make a right click in tree view on the analysis and activate the analysis. |
|||
==== |
==== GMSH ==== <!--T:17--> |
||
The usage of psicofil's macro is recommended, and is used for this example. |
|||
# Next step will be to give an material to our model |
|||
# Activate the macro |
|||
# Select [[Image:Fem_Material.svg|32px]] [[FEM Material|Mechanical material...]] and choose Steel-generic as the material |
|||
# Select the object you wish to use, in this case our Cube |
|||
# Check the box '''Create Mechanical Analysis from mesh''' |
|||
# Click '''OK''' |
# Click '''OK''' |
||
<!--T:18--> |
|||
We have now meshed our object and are ready to add constraints and forces. |
|||
=== Constraints and Forces === <!--T:19--> |
|||
# Hide the mesh from the Tree View. |
|||
==== Constraints ==== <!--T:19--> |
|||
# Show the original model |
|||
# What needed next is to add some fixed and force constraints to our model. |
|||
# Select [[Image: |
# Select [[Image:FEM_FixedConstraint.png|16px]] [[FEM_ConstraintFixed|Create FEM fixed constraint]] |
||
# Select the |
# Select the back face of the Cube (face on the '''YZ''' axis) and click OK |
||
# Select [[Image: |
# Select [[Image:FEM_ForceConstraint.png|16px]] [[FEM_ConstraintForce|Create FEM force constraint]] |
||
# Select the front face of the Cube (the face parallel to the back face) and set the '''Area load''' value to 9000000.00 |
|||
# Click on Add Reference button in task panel of force constraint. |
|||
# |
# Set the '''Direction''' to '''-Z''' by selecting one of the face edges parallel to that direction. |
||
# The unit is fix and will be in Newton. The force is distributed on all given references. |
|||
# Click OK |
# Click OK |
||
# We now have established the restrictions and forces for our static study. What is missing is the FEM Mesh. |
|||
==== FEM Mesh ====<!--T:25--> |
|||
# The two possibilities by either the build in mesher Netgen and the external mesher GMSH will be shown in this tutorial. There are various possibilities to get an valid FEM Mesh. See [[FEM_Mesh]] if you are interested in more detailed descriptions. |
|||
<!--T:20--> |
|||
We now have established the restrictions and forces for our static study. |
|||
# Select the shape you wish to mesh, in this case our Cube and click on [[Image:Fem_FemMesh.svg|32px]] [[FEM Create|Create FEM mesh]]. |
|||
# If you did not change the size of the cube geometry (standard is 10 mm x 10 mm x 10 mm) you can leave the settings and click ok. |
|||
# The mesh will be created. |
|||
# The properties of the FEM mesh can be seen in the property editor of FreeCAD. |
|||
# Drag the FEM mesh object inside the Analyis. |
|||
=== Final preparations === <!--T:21--> |
|||
# Select [[Image:FEM_Material.png|16px]] [[FEM_MaterialSolid|Mechanical material...]] and choose Calculix as the material |
|||
# If FreeCADs build in mesher Netgen is not available the usage of [[Macro_GMSH]] is recommended, and is used for this example. |
|||
# Start the GMSH macro |
|||
# Select the shape you wish to mesh, in this case our Cube |
|||
# Since we have an analysis object already make sure the box '''Create Mechanical Analysis from mesh''' is not activated. |
|||
# Click '''OK''' |
# Click '''OK''' |
||
# The FEM mesh object will be created. |
|||
# Drag the FEM mesh object inside the Analyis. |
|||
=== Running the Solver === <!--T:22--> |
|||
==== Standard Procedure ==== |
|||
# Select the solver object [[Image:Fem_Solver.svg|32px]] of the analysis in tree view and press [[Image:Fem_QuickAnalysis.svg|32px]] [[FEM_RunCalculiXccx|Quick Analysis]] from the icon tool bar |
|||
# Select the solver object [[Image:FEM_Solver.png|16px]] contained in the '''Mechanical Analysis''' |
|||
# The analysis will be made and the result object should be created. |
|||
# Select [[Image:FEM_Calculation.png|16px]] [[FEM_SolverControl|Start calculation]] from the menu |
|||
# Select '''Write Calculix Input File''' |
|||
# Select '''Run Calculix''' |
|||
# Click '''Close''' |
|||
==== |
==== Quick Procedure ==== <!--T:25--> |
||
# Select [[Image: |
# Select the solver object [[Image:FEM_Solver.png|16px]] contained in the '''Mechanical Analysis''' |
||
# Click on [[Image:FEM_RunCalculiXccx.png|16px]] [[FEM_SolverRun|Quick Analysis]]. |
|||
=== Analyzing Results === <!--T:23--> |
|||
# From the '''Object Tree''', select the '''Results''' object |
|||
# Select [[Image:FEM_ShowResult.png|16px]] [[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 to |
# 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_PurgeResults.png|16px]] [[FEM_ResultsPurge|Purge results]] |
||
<!--T:26--> |
|||
{{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.}} |
|||
<!--T:7--> |
<!--T:7--> |
||
We are now finished with the basic workflow for the [[FEM Module]]. |
We are now finished with the basic workflow for the [[FEM Module]]. |
||
</translate> |
|||
{{Tutorials navi{{#translation:}}}} |
|||
{{FEM Tools navi{{#translation:}}}} |
|||
<!--T:24--> |
|||
{{Userdocnavi{{#translation:}}}} |
|||
[[Category:User Documentation]] |
|||
[[Category:Tutorials]] |
|||
</translate> |
|||
{{clear}} |
|||
<languages/> |
Revision as of 05:21, 25 February 2020
Tutorial |
Topic |
---|
Finite Element Analysis |
Level |
Beginner |
Time to complete |
10 minutes + Solver time |
Authors |
Drei |
FreeCAD version |
0.16.6700 or above |
Example files |
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.16.6700 or above
- Netgen and/or GMSH is installed on the system
- In the case of GMSH, install Macro GMSH from the AddonManager, developed by psicofil
- Calculix is installed on the system
- 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 models created in the Part or PartDesign Workbenches can be used instead.
- Create a new document
- Activate the Part Workbench
- Create a Cube
- Change its Dimensions to the following:
- Height: 1.000 mm
- Length: 8.000 mm
- Width: 1.000 mm
Now we have a model with which to work with.
Creating the Analysis
Netgen
- Select the model
- Click New mechanical analysis from the menu to create an analysis from the object that was selected
- In the meshing dialog, click OK
You can also drag and drop a mesh to a Mechanical Analysis that does not have a mesh within the Tree View.
GMSH
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
- Click OK
We have now meshed our object and are ready to add constraints and forces.
Constraints and Forces
- Hide the mesh from the Tree View.
- Show the original model
- Select Create FEM fixed constraint
- Select the back face of the Cube (face on the YZ axis) and click OK
- Select Create FEM force constraint
- Select the front face of the Cube (the face parallel to the back face) and set the Area load value to 9000000.00
- 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.
Final preparations
- Select Mechanical material... and choose Calculix as the material
- Click OK
Running the Solver
Standard Procedure
- Select the solver object contained in the Mechanical Analysis
- Select Start calculation from the menu
- Select Write Calculix Input File
- Select Run Calculix
- Click Close
Quick Procedure
- Select the solver object contained in the Mechanical Analysis
- Click on Quick Analysis.
Analyzing Results
- From the Object Tree, select the 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 Module.
- 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, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub