FEM tutorial: Difference between revisions

From FreeCAD Documentation
No edit summary
(Moved headings one level up. {{FEM Tools navi}} {{Userdocnavi}} to categorize pages. Removed excessive whitespace. Larger image size 600px.)
(33 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<languages/>
<translate>
<translate>

<!--T:1-->
<!--T:1-->
{{TutorialInfo
{{TutorialInfo
|Class= Finite Element Analysis
|Topic= Finite Element Analysis
|Level= Beginner
|Level= Beginner
|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-->
== Introduction == <!--T:8-->
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.
! DO NOT TRANSLATE AT THE MOMENT !
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|960px]]
[[Image:FEM_tutorial_result.png|600px]]


=== Requirements === <!--T:10-->
== Requirements == <!--T:10-->
* For working with FreeCADs [[FEM_Module]] it is '''STONGLY''' recommended to use version 0.16 or above.
* 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 33: Line 32:
# Create a new document
# Create a new document
# Activate the Part Workbench
# Activate the Part Workbench
# Create a Cube by clicking on Create a cube solid.
# 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]] create an 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 be right click in tree view before anything could be done in FEM Module.


==== GMSH ==== <!--T:17-->

The usage of psicofil's macro is recommended, and is used for this example.

# Activate the macro
==== Material ==== <!--T:15-->
# Next step will be to give an material to our model
# Select the object you wish to use, in this case our Cube
# Check the box '''Create Mechanical Analysis from mesh'''
# Select [[Image:Fem_Material.svg|32px]] [[FEM Material|Mechanical material...]] and choose Steel-generic as the material
# 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:Fem_ConstraintFixed.svg|32px]] [[FEM FixedConstraint|Create FEM fixed constraint]]
# Select [[Image:FEM_FixedConstraint.png|16px]] [[FEM_ConstraintFixed|Create FEM fixed constraint]]
# Select the bottom face of the Box and click OK
# Select the back face of the Cube (face on the '''YZ''' axis) and click OK
# Select [[Image:Fem_ConstraintForce.svg|32px]] [[FEM ForceConstraint|Create FEM force constraint]]
# 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.
# Select the top face of the Box and set the '''Area load''' value to 20 000 N (The unit is fix and will be in Neton at the moment.)
# 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 varous possibilities to get an valid FEM Mesh. See [[FEM_Mesh]] if you are interested in more detailed descriptions.


===== Netgen ===== <!--T:26-->
<!--T:20-->
We now have established the restrictions and forces for our static study.
# Click on [[Image:Fem_FemMesh.svg|32px]] [[FEM Create|Create FEM mesh]]. If you did not change the size of the cube (10, 10, 10) 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.


===== GMSH ===== <!--T:27-->
=== 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 you will get a popup saying "The FEM module is build without Netgen support ... " The usage of [[GMSH_macro]] 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.png|16px]] contained in the '''Mechanical Analysis'''
# 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 the solver object [[Image:FEM_Solver.png|16px]] contained in the '''Mechanical Analysis'''
# Click on [[Image:FEM_RunCalculiXccx.png|16px]] [[FEM_SolverRun|Quick Analysis]].


==== Running the Solver ==== <!--T:22-->
=== Analyzing Results === <!--T:23-->
# From the '''Object Tree''', select the '''Results''' object
# 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 [[Image:FEM_ShowResult.png|16px]] [[FEM_ResultShow|Show result]]
# The analysis will be made and the result object should be created.

==== Analyzing Results ==== <!--T:23-->
# Select [[Image:Fem_Result.svg|32px]] [[FEM ShowResult|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 view the deformation in a simplified manner
# 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:Fem_PurgeResults.png|32px]] [[FEM PurgeResults|Purge results]]
# 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]].


<!--T:28-->

{{FEM Tools navi}}
<!--T:24-->
{{Userdocnavi}}
[[Category:User Documentation]]
[[Category:Tutorials]]

</translate>
</translate>
{{clear}}
{{clear}}
<languages/>

Revision as of 04:56, 8 April 2019

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

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.

  1. Create a new document
  2. Activate the Part Workbench
  3. Create a Cube
  4. Change its Dimensions to the following:
    1. Height: 1.000 mm
    2. Length: 8.000 mm
    3. Width: 1.000 mm

Now we have a model with which to work with.

Creating the Analysis

Netgen

  1. Select the model
  2. Click New mechanical analysis from the menu to create an analysis from the object that was selected
  3. 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.

  1. Activate the macro
  2. Select the object you wish to use, in this case our Cube
  3. Check the box Create Mechanical Analysis from mesh
  4. Click OK

We have now meshed our object and are ready to add constraints and forces.

Constraints and Forces

  1. Hide the mesh from the Tree View.
  2. Show the original model
  3. Select Create FEM fixed constraint
  4. Select the back face of the Cube (face on the YZ axis) and click OK
  5. Select Create FEM force constraint
  6. Select the front face of the Cube (the face parallel to the back face) and set the Area load value to 9000000.00
  7. Set the Direction to -Z by selecting one of the face edges parallel to that direction.
  8. Click OK

We now have established the restrictions and forces for our static study.

Final preparations

  1. Select Mechanical material... and choose Calculix as the material
  2. Click OK

Running the Solver

Standard Procedure

  1. Select the solver object contained in the Mechanical Analysis
  2. Select Start calculation from the menu
  3. Select Write Calculix Input File
  4. Select Run Calculix
  5. Click Close

Quick Procedure

  1. Select the solver object contained in the Mechanical Analysis
  2. Click on Quick Analysis.

Analyzing Results

  1. From the Object Tree, select the Results object
  2. Select Show result
  3. Choose among the different Result types to view the results
  4. 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.
  5. To remove the results select Purge results
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 Module.