FEM tutorial: Difference between revisions

From FreeCAD Documentation
m (Resized image)
m (Restored Original Tutorial)
Line 3: Line 3:
<!--T:1-->
<!--T:1-->
{{TutorialInfo
{{TutorialInfo
|Topic= Finite Element Analysis
|Class= Finite Element Analysis
|Level= Beginner
|Level= Beginner
|Time= 10 minutes + Solver time
|Time= 10 minutes + Solver time
Line 10: Line 10:
|Files=
|Files=
}}
}}

! DO NOT TRANSLATE AT THE MOMENT ! work in progress ! see [[FEM_CalculiX_Cantilever_3D]] too.


=== Introduction === <!--T:8-->
=== 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.
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.


<!--T:9-->
<!--T:9-->
Line 20: Line 18:


=== 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 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, installation of [https://github.com/psicofil/Macros_FreeCAD psicofil's macro] is recommended
* [http://www.calculix.de/ Calculix] is installed on the system
* The reader has the basic knowledge to use the Part and PartDesign Workbenches
* The reader has the basic knowledge to use the Part and 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 by clicking on Create a cube solid.
# Create a Cube
# We have a geometrical model to work with right now.


<!--T:13-->
Now we have a model with which to work with.


==== Meshing the model ==== <!--T:14-->
# Switch to the FEM Workbench


==== Create an analysis and mesh the geometrical model ==== <!--T:13-->
===== Netgen ===== <!--T:15-->
# Switch to the FEM Workbench
# Select the model
# Select [[Image:Fem_FemMesh.svg|32px]] [[FEM Create|Create FEM mesh]]
# Do '''NOT''' select any object neither in tree view nor in model space
# Click '''Ok'''
# Click [[Image:Fem_Analysis.svg|32px]] [[FEM Analysis|New mechanical analysis]] to create a analysis.
# Select the Mesh from the Tree View
# An analysis container and a solver object will be created.
# Click [[Image:Fem_Analysis.svg|32px]] [[FEM Analysis|New mechanical analysis]] from the menu to create an analysis from the mesh that was 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.


==== Material ==== <!--T:15-->
<!--T:16-->
You can also drag and drop a mesh to a Mechanical Analysis that does not have a mesh within the Tree View.
# Next step will be to give an material to our model

# Select [[Image:Fem_Material.svg|32px]] [[FEM Material|Mechanical material...]] and choose Steel-generic as the material
===== GMSH ===== <!--T:17-->
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'''
# 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_ConstraintFixed.svg|32px]] [[FEM FixedConstraint|Create FEM fixed constraint]]
# Select the bottom face of the Box and click OK
# Select the bottom face of the Box and click OK
# Select [[Image:Fem_ConstraintForce.svg|32px]] [[FEM ForceConstraint|Create FEM force constraint]]
# Select [[Image:Fem_ConstraintForce.svg|32px]] [[FEM ForceConstraint|Create FEM force constraint]]
# Select the top face of the Box and set the '''Area load''' value to 20 000
# Click on Add Reference button in task panel of force constraint.
# 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 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-->
<!--T:20-->
We now have established the restrictions and forces for our static study.
# 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.


===== Netgen ===== <!--T:26-->
==== Final preparations ==== <!--T:21-->
# 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]].
# Select [[Image:Fem_Material.svg|32px]] [[FEM Material|Mechanical material...]] and choose Steel-generic as the material
# 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.

===== GMSH ===== <!--T:27-->
# 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-->
==== Running the Solver ==== <!--T:22-->
# 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_NewAnalysis.svg|32px]] [[FEM Calculation|Start calculation]] from the menu
# Select '''Write Calculix Input File'''
# The analysis will be made and the result object should be created.
# Select '''Run Calculix'''
# Click '''Close'''


==== Analyzing Results ==== <!--T:23-->
==== Analyzing Results ==== <!--T:23-->
Line 98: Line 92:




<!--T:24-->
[[Category:User Documentation]]
[[Category:User Documentation]]
[[Category:Tutorials]]
[[Category:Tutorials]]

Revision as of 05:14, 6 March 2016

Tutorial
Topic
{{{Topic}}}
Level
Beginner
Time to complete
10 minutes + Solver time
Authors
Drei
FreeCAD version
0.16 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 or above
  • Netgen and/or GMSH is installed on the system
  • In the case of GMSH, installation of psicofil's macro is recommended
  • 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.

  1. Create a new document
  2. Activate the Part Workbench
  3. Create a Cube

Now we have a model with which to work with.

Meshing the model

  1. Switch to the FEM Workbench
Netgen
  1. Select the model
  2. Select File:Fem FemMesh.svg Create FEM mesh
  3. Click Ok
  4. Select the Mesh from the Tree View
  5. Click New mechanical analysis from the menu to create an analysis from the mesh that was created.

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 bottom face of the Box and click OK
  5. Select Create FEM force constraint
  6. Select the top face of the Box and set the Area load value to 20 000
  7. Click OK

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

Final preparations

  1. Select File:Fem Material.svg Mechanical material... and choose Steel-generic as the material
  2. Click OK

Running the Solver

  1. Select File:Fem NewAnalysis.svg Start calculation from the menu
  2. Select Write Calculix Input File
  3. Select Run Calculix
  4. Click Close

Analyzing Results

  1. Select File:Fem Result.svg Show result
  2. Choose among the different Result types to view the results
  3. The slider at the bottom can be used to alter the mesh to view the deformation in a simplified manner
  4. To remove the results select File:Fem PurgeResults.png Purge results

We are now finished with the basic workflow for the FEM Module.