Wiki
Clone wikimofem-joseph / MoFEM User Manual
#MoFEM User Manual
##1 Introduction
MoFEM (Mesh Oriented Finite Element Method) is a new open-source finite element analysis code tailored for the solution of multi-physics problems with arbitrary levels of approximation, different levels of mesh refinement and optimised for high-performance computing. MoFEM is the blend of the Boost MultiIndex containers, MOAB (Mesh Oriented Database) and PETSc (Portable, Extensible Toolkit for Scientific Computation).
MoFEM is written in C++ and it is open-source under the GNU Lesser General Public License (see Legal Stuff). MoFEM currently uses the well-established CUBIT by Sandia National Laboratories for pre-processing, and the open-source ParaView by Kitware for post-processing.
####1-1 Release notes The current version of MoFEM is 0.0.1 (codename JosePH). JosePH is a development version.
####1-2 Installation MoFEM is open-source and can be compiled and used on any operating system and platform where it is possible and makes sense to do so. So far it has been compiled successfully on several versions of OS X, Ubuntu Linux and Red Hat Linux. Detailed installation instructions are provided by the following links:
If you have any problems installing MoFEM or would like to share your success installing it on a different system than the above, please contact cmatgu@googlegroups.com.
####1-3 MoFEM build directory
The MoFEM build directory has the following structure:
File/Folder | Description |
---|---|
/atom_tests | |
/benchmarks | |
/CMakeFiles | |
/examples | |
/scripts | |
/Testing | |
/third_party | |
cmake_install.cmake | |
CMakeCache.txt | |
config.h | |
CTestTestfile.cmake | |
DartConfiguration.tcl | |
Doxyfile | |
INSTALL | |
libmofem_complex_for_lazy.a | |
libmofem_Field.a | |
libmofem_student_body.a | |
Makefile |
####1-4 Testing your build
####1-5 Legal Stuff
MoFEM is copyright by Lukasz Kaczmarczyk and has received contributions by several people. MoFEM can be used freely for educational and research purposes by other institutions. If you use this software please cite our work.
MoFEM is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
MoFEM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with MoFEM. If not, please see http://www.gnu.org/licenses.
##2 Pre-Processing
####2-1 Introduction
CUBIT (https://cubit.sandia.gov)
TRELIS (http://www.csimsoft.com)
####2-5 Importing models from other software
Current limitations of working with mesh-based models
...
At present, the following approaches are recommended:
- Import an external geometry into CUBIT using a supported CAD format such as ACIS or IGES. Then work on your model as normal using the imported geometry
- Import geometry into CUBIT directly from a supported mesh-based file. Use the imported mesh or automatically generated geometry as guide to re-create the geometry in CUBIT from scratch. Then delete the imported data.
- Create the geometry in CUBIT from scratch.
##3 Post-Processing
##4 Running an Analysis
##5 Materials
####5-1 Introduction
####5-2 Constitutive materials
-
Elasticity
-
Transverse Isotropy
#####Elastic material
#####Transverse isotropic material
#####Linear interface
More information is provided in the Theory Manual.
####5-3 Defining materials for MoFEM using CUBIT/Trelis
MoFEM materials are defined with CUBIT or Trelis using Blocks (i.e. sets of entities). Normally, Blocks which consist of tets or volumes are used. A Block signifies a MoFEM material when the Block name starts with MAT_ (upper case) followed by the material name, e.g. MAT_ELASTIC (see Section 5-4 for a list of material Blocks). Optionally, the Block name can include descriptive text in the end, e.g. MAT_ELASTIC1, or MAT_ELASTIC_Steel.
CUBIT/Trelis Blocks can have up to 10 attributes (numbers). When a Block is specified as a MoFEM material using MAT_, the attributes are read in MoFEM as real numbers.
The procedure to define a MoFEM material using CUBIT/Trelis is as follows:
####5-4 Description of CUBIT/Trelis Material Blocks
#####MAT_ELASTIC: Elastic material
Block name: MAT_ELASTIC Number of attributes: 10 Attribute 1: Young's modulus Attribute 2: Poisson's ratio Attribute 3: User defined attribute 1 ... Attribute 10: User defined attribute 10 Note: Attributes 3-10 are for future use and can be left at the default value of 1
#####MAT_TRANSISO: Transverse isotropic material
Block name: MAT_TRANSISO Number of attributes: 5 Attribute 1: Young's modulus in xy plane (Ep) Attribute 2: Young's modulus in z-direction (Ez) Attribute 3: Poisson's ratio in xy plane (vp) Attribute 4: Poisson's ratio in z-direction (vpz) Attribute 5: Shear modulus in z-direction (Gzp)
#####MAT_INTERF: Linear interface
Block name: MAT_INTERF Number of attributes: 1 Attribute 1: Elastic modulus multiplier
##6 Elements
####6-1 Introduction MoFEM uses 4-node linear or high-order tetrahedra (up to 5th order). Tetrahedra can fit any 3D geometry and are suitable for local mesh refinement. High-order tetrahedra offer improved deformability and overcome the limitations of linear elements. Information on the underlying theory is provided in the Theory Manual.
Figure 6.1 4-node tetrahedron
With MoFEM the Finite Element approximation can be improved in four principal ways and manually or automatically, or using combinations of these:
- Global mesh refinement (remeshing)
- Local mesh refinement
- Global high-order enhancement
- Local high-order enhancement
Figure 6.2 Global mesh refinement
Figure 6.3 Local mesh refinement
Figure 6.4 Global high-order enhancement
Figure 6.5 Local high-order enhancement
####6-2 Pre-processing
####6-3 Post-processing
##7 Linear Elasticity
... Modelling problems with 2 or more different materials ...
##8 Nonlinear Elasticity
##9 Potential Flow
##10 Fracture
####10-1 Introduction This section describes how to undertake fracture analysis using MoFEM, e.g. in order to calculate stress intensity factors at crack tips. Fracture analysis in MoFEM is three-dimensional and nonlinear as it takes into account large deformations and nonconservative loading. The theory behind Fracture Analysis with MoFEM is outlined in the Theory Manual. All pre-processing is undertaken using CUBIT, whereas post-processing is undertaken using ParaView and/or output text files. ####10-2 Analysis workflow
- Create FE model geometry [CUBIT]
- Create the crack geometry; each crack is represented by a single geometrical surface [CUBIT]
- Apply loads & boundary conditions [CUBIT]
- Define BlockSet with linear elastic material MAT_ELASTIC and apply material properties [CUBIT]
- Mesh model [CUBIT]
- Specify fracture constraints using NodeSets and SideSets [CUBIT]
- Run fracture analysis [MoFEM]
- Post-process [ParaView & MoFEM txt output files]
Note that the modelling procedure for fracture analysis is similar to the procedure for creating a simple elastic model. The only difference is the creation of surfaces which represent cracks, and the application of fracture constraints (Section 10-4).
####10-3 Modelling of cracks Cracks for fracture analysis are modelled in CUBIT using simple geometry surfaces. Each crack is represented by a single surface, partially or fully enclosed within a volume. The nodes associated with the crack surface are split automatically by MoFEM. Unlike traditional procedures, MoFEM does not require the user to take any special mesh considerations (e.g. radial meshing) around the crack tip for integration purposes. There are no restrictions for the geometry of crack surfaces.
The user is free to adopt any procedure convenient for the creation of geometry and the meshing of crack surfaces in CUBIT. However, it is often convenient to define a tool volume enclosure and cut it to create the crack surface (see Figure 10.1 below). This approach also allows better control of the mesh in the vicinity of the crack.
Figure 10.1 Example of geometrical definition of a crack in CUBIT
A good example of MoFEM fracture modelling is the plate with horizontal crack benchmark test.
####10-4 Fracture constraints
In order to run a fracture analysis, it is necessary to inform MoFEM about the crack surface, crack tip and domain boundary. This is achieved completely during pre-processing in CUBIT using Nodesets and Sidesets with fixed numbers which are identifiable by MoFEM.
The procedure will be simplified and automated in future releases of MoFEM.
The Nodesets and Sidesets required to specify a fracture problem are as follows:
Nodeset/Sideset No | Description |
---|---|
100 (Sideset) | Sideset 100 contains curves which define the problem exterior |
101 (Nodeset) | Nodeset 101 contains vertices which define the problem exterior |
102 (Sideset) | Sideset 102 contains surfaces which define the problem exterior |
200 (Sideset) | Sideset 200 contains the crack surfaces |
201 (Sideset) | Sideset 201 contains the crack tip curves |
The Sidesets and Nodesets can be specified in two ways: using the CUBIT GUI or the command line/journal editor. It is usually convenient to identify the geometrical entities of interest by 'picking' them using the GUI, and then specify the fracture Sidesets and Nodeset using the journal editor (see Example 10.1 below).
Example 10.1 How to specify fracture constraints for MoFEM in CUBIT
Say that we first want to define Sideset 100 which contains all exterior curves of the problem of Figure 10.1.
- Step 1 - Identify geometrical entities of interest using the GUI: We can easily identify the curves which define the boundary by creating a mock displacement boundary condition and picking the curves of interest. See Figure 10.2.
CUBIT Command Panel: Materials and BCs --> Create Boundary Conditions --> Displacement --> select 'Curve' from the Entity List and then pick the curves of interest
Figure 10.2 Identification of curve IDs for Sideset 100. All curves highlighted in amber have been selected.
- Step 2 - Copy command line output to the journal editor: Once we pick all the entities, the CUBIT command line will display something similar to the following, which we can copy and paste to the journal editor.
Current entity is Curve 11. Current entity is Curve 8. Current entity is Curve 12. Current entity is Curve 2. Current entity is Curve 7. Current entity is Curve 3. Current entity is Curve 5. Current entity is Curve 1. Current entity is Curve 6. Current entity is Curve 9. Current entity is Curve 4. Current entity is Curve 10.
- Step 3 - Define Sideset 100 using the journal editor: Since we now have all the entity IDs we need to define the Sideset, we can write in the journal editor the following and then delete the command line output we previously pasted
sideset 100 curve 11 8 12 2 7 3 5 1 6 9 4 10
The same procedure can be used to define Nodeset 101 and Sidesets 102, 200 & 201. You can copy the following in the journal editor and complete the entity IDs for your case:
sideset 100 curve ... nodeset 101 vertex ... sideset 102 surface ... sideset 200 surface ... sideset 201 curve ...
all
and remove
as follows:
sideset 102 surface all sideset 102 surface ID1 ID2 ... IDn remove
####10-5 Meshing
There are no particular meshing requirements for fracture analysis. It is worthwhile to note the following:
- Tetrahedral elements are used, of any available order
- The crack is modelled in CUBIT as a single surface, which is part of the main body geometry. Therefore the crack mesh is generated automatically by meshing the enclosing volumes. The crack nodes are duplicated automatically by MoFEM to represent two crack surfaces.
- Prior to generating a mesh, ensure that you imprint and merge the crack tool volumes with each other and with the surrounding volumes in CUBIT. You can do so using the GUI or by using
imprint volume all
andmerge volume all
in the CUBIT command line or journal editor
Figure 10.3 Example of mesh with a crack surface in CUBIT
####10-6 Fracture analysis
Analysis is initiated from a terminal using two executables in the following order:
-
spatial_problem : calculates the displacement and stress field
-
material_force : calculates the griffith energy and material forces at the crack front
The input and output files of spatial_problem and material_force are shown in the Table below.
Module | Input | Output |
---|---|---|
spatial_problem | .cub file | out_spatial.h5m |
out.vtk | ||
out_stresses.vtk | ||
material_force | out_spatial.h5m | out_material.h5m |
out.vtk |
The .h5m files contain all the model and output data from the execution of the respective modules in HDF5 format.
The out.vtk files contain post-processing data (except stresses) in ASCII VTK format and can be read directly by ParaView. The out_stresses.vtk file contains stress results for post-processing.
The post-processing data available in out.vtk and out_stresses.vtk are described in Section 10-7.
spatial_problem input parameters
material_force input parameters
It is usually convenient to use a shell script to run the fracture analysis. The following link provides a general script which can be adapted accordingly.
The script can be invoked from a terminal as follows:
./fracture.sh
./fracture.sh |tee log_filename
####10-7 Post-processing
Post-processing of a fracture analysis can be undertaken in two complimentary ways:
-
Post-processing using ParaView
-
Post-processing using data from the output of the terminal. This requires a log file (see Section 10-6) and can be used to create plots of the fracture analysis results.
Some typical post-processing operations that can be done using ParaView with the results of a fracture analysis:
- Plot displacement contours. You can calculate displacements from any out.vtk file using the ParaView Calculator. The displacement vector is equal to SPATIAL_POSITION_VAL (Vector) - coords (Vector).
- Plot the deformed shape using the Warp By Vector tool and calculated displacement vector [out.vtk].
- Plot the vector of material resistance forces using the Glyph tool and MATERIAL_FORCE_PROJECTED vector [out.vtk].
- Plot stresses [out_stresses.vtk]
The Mode I stress intensity factor (KI) can be calculated directly from the terminal/log output using the computed Griffith forces and the following relationship:
where G is the computed Griffith force.
Alternatively, the user can plot contours of nodal Griffith forces in Paraview using the G result set. The following Table outlines the different results that are output for post-processing with Paraview.
#####Description of out.vtk data
Result | Description | Type | Components |
---|---|---|---|
G | Strain energy release rate. Expresses energy release associated with unit increase of crack surface area. It can be used directly in calculations of stress intensity factors. | Scalar | N/A |
GRIFFITH_FORCE | Indicates the direction of crack propagation at nodes (i.e. mesh-dependent). Energy can be calculated from the dot product of GRIFFITH_FORCE and nodal displacements. | Vector | X, Y, Z |
MATERIAL_FORCE | Force conjugate to displacements in material space. It is used to express work of topological changes of body geometry in material space. | Vector | X, Y, Z |
MATERIAL_FORCE_PROJECTED | Material force projected on surface area | Vector | X, Y, Z |
SPATIAL_POSITION_VAL | Current nodal position of the body in the deformed configuration. Displacements equal this minus the original coordinates (coords). | Vector | X, Y, Z |
SPATIAL_RESIDUAL | It expresses out-of-balance nodal forces. When the correct solution is obtained, its value should converge to zero. | Vector | X, Y, Z |
#####Description of out_stresses.vtk data
Result | Description | Type | Components |
---|---|---|---|
CAUCHY_STRESS_VAL | Cauchy stress | Tensor | 0, 1, 2 ... 8 |
ESHELBY_STRESS_VAL | Eshelby stress. It is the counterpart of Cauchy stress in material space. | Tensor | 0, 1, 2 ... 8 |
J_VAL | Jacobian. It expresses volume change. It is the determinant of the gradient of deformation | Scalar | N/A |
PIOLA1_STRESS_VAL | Piola-Kirchhoff stress | Tensor | 0, 1, 2 ... 8 |
PSI_VAL | Density of energy | Scalar | N/A |
SPATIAL_POSITION_VAL | Current nodal position of the body in the deformed configuration. Displacements equal this minus the original coordinates (coords). | Vector | X, Y, Z |
####10-8 Quick reference This section summarises tools that you can use to streamline fracture modelling, analysis and post-processing.
Pre-Processing
To define fracture constraints in the journal editor:
sideset 100 curve ID1 ID2 ... # Boundary curves nodeset 101 vertex ID1 ID2 ... # Boundary vertices sideset 102 surface ID1 ID2 ... # Boundary surfaces sideset 200 surface ID1 ID2 ... # Crack surface sideset 201 curve ID1 ID2 ... # Crack tip
sideset 102 surface all sideset 102 surface ID1 ID2 ... IDn remove
Analysis
##11 Crack Propagation
####11-1 Introduction
This section describes how to undertake discrete crack propagation analysis in MoFEM with automatic remeshing and without the use of interface elements. This is currently limited to isotropic materials. The theory for this type of crack propagation analysis is described in the Theory Manual.
All pre-processing is undertaken using CUBIT, whereas post-processing is undertaken using ParaView and/or output text files.
####11-2 Analysis workflow
- Set up a model for fracture analysis [CUBIT]
- Define points for output of load-displacement results for post-processing [CUBIT]
- Run crack propagation analysis [MoFEM]
- Post-process [ParaView & MoFEM txt output files]
####11-3 Load-displacement output
####11-4 Crack propagation analysis
####11-5 Post-processing
####11-6 Quick reference
This section summarises tools that you can use to streamline modelling, analysis and post-processing of crack propagation.
##20 Dynamics
##30 Interface Modelling
##40 Verification
Updated