Basic Tests

TensileTest

website : https://github.com/latug0/mfem-mgis-examples/tree/master/ex1

The sources of this example live in mfem-mgis, in tests/UniaxialTensileTest.cxx. They are installed in share/mfem-mgis/examples/ex1.

Description:

This example is a cyclic tension-compression test on a unit cube. The imposed axial strain goes up to 0.9 %, down to -2.1 % and back up to 1.9 %, in 100 time steps. Its test compares the results to the reference file IsotropicLinearHardeningPlasticity.ref.

Illustration of the start of the TensileTest simulation.
Illustration of the end of the TensileTest simulation.

Problem Solved

Plastic behaviour with linear isotropic hardening,
IsotropicLinearHardeningPlasticity.mfront :
[ parameters      , material ]
[ Young Modulus   , 70e9     ];
[ Poisson Ratio   , 0.34     ];
[ Yield Stress    , 300e6    ];
[ Hardening Slope , 10e9     ];

Boundary conditions:
- symmetry on the faces x = 0, y = 0 and z = 0
- imposed displacement along x on the face x = 1

Solver : CGSolver

Element:
- Family H1
- Order 1

Run This Simulation

Without any option, the example runs as described above. The --reference-file option compares the results to the reference file:

./uniaxial_tensile_test
mpirun -n 2 ./uniaxial_tensile_test
./uniaxial_tensile_test --reference-file IsotropicLinearHardeningPlasticity.ref

Available options

Command line

Description

Default

--mesh or -m

Mesh file

cube.mesh

--library or -l

Material library

src/libBehaviour.so

--behaviour or -b

Name of the behaviour

IsotropicLinearHardeningPlasticity

--internal-state-variable or -isv

Internal state variable saved and compared to the reference file, none if empty

EquivalentPlasticStrain

--reference-file or -rf

Reference file

no comparison

--order or -o

Finite element order

1

--refinement or -r

Number of uniform refinements of the mesh

0

--nbsteps or -ns

Number of time steps. The reference file must have been computed with the same number of time steps.

100

--linearsolver or -ls

Linear solver: GMRESSolver, CGSolver, UMFPackSolver, MUMPSSolver, HypreFGMRES, HyprePCG or HypreGMRES. UMFPackSolver is sequential only. MUMPSSolver and the hypre solvers are parallel only. HypreFGMRES uses the HypreILU preconditioner. HyprePCG uses the HypreDiagScale preconditioner.

CGSolver

--parallel or -p, --no-parallel or -no-p

Run in parallel or not

parallel if MFEM is built with MPI

--post-processing or -pp, --no-post-processing or -no-pp

Export or not the results to Paraview

export

TwoLayerCube

website: https://github.com/latug0/mfem-mgis-examples/tree/master/ex3

The sources of this example live in mfem-mgis, in tests/TwoLayerCube.cxx. They are installed in share/mfem-mgis/examples/ex3.

Description:

Periodic unit cube made of two elastic layers. A macroscopic strain is imposed. The solution is compared to the analytical one.

Problem solved

The layers are split at x = 0.5. Material 1 fills x < 0.5. Material 2
fills x > 0.5.

One component of the macroscopic strain is imposed:
Exx -> 0, Eyy -> 1, Ezz -> 2, Exy -> 3, Exz -> 4, Eyz -> 5.
Its value is 1 for a normal component. It is √2/2 for a shear
component, in Mandel notation.

Solver : CGSolver

Elastic behaviour parameters, IsotropicLinearElasticity.mfront :
[ parameters             , material 1 , material 2 ]
[ First Lame Coefficient , 100        , 200        ];
[ Shear Modulus          , 75         , 150        ];

Element:
- Family H1
- Order 1

Run the simulation

The first command runs the default case Eyy. The second one runs the case Exy on 4 processes:

./two_layer_cube
mpirun -n 4 ./two_layer_cube --test-case 3

The mesh cube_2mat_per.mesh has 4x4x4 hexahedra. The mesh Box.med has 8x8x8 hexahedra. Its periodicity is described by Box.per. Reading it requires MFEM built with MED support:

./two_layer_cube --mesh Box.med

Available options

Command line

Description

Default

--mesh or -m

Mesh file

cube_2mat_per.mesh

--library or -l

Material library

src/libBehaviour.so

--order or -o

Finite element order

1

--refinement or -r

Number of uniform refinements of the mesh

0

--xmax or -xm, --ymax or -ym, --zmax or -zm

Coordinates of the upper corner of the cube. They must match the mesh.

1

--test-case or -t

Imposed component of the strain, from 0 to 5

1

--linearsolver or -ls

Linear solver: GMRESSolver, CGSolver, UMFPackSolver, MUMPSSolver, HypreFGMRES, HyprePCG or HypreGMRES. UMFPackSolver is sequential only. MUMPSSolver and the hypre solvers are parallel only. HypreFGMRES uses the HypreILU preconditioner. HyprePCG uses the HypreDiagScale preconditioner.

CGSolver

--parallel or -p, --no-parallel or -no-p

Run in parallel or not

parallel

--check or -c, --no-check or -no-c

Compare or not the solution to the analytical one. It is only valid for the provided meshes.

compare

Satoh

website: https://github.com/latug0/mfem-mgis-examples/tree/master/ex5

Description:

Plate of length 1 in plane strain, clamped on its left and right boundaries. A parabolic temperature profile is imposed along the x-axis.

Illustration of the displacement of the plate.

Problem solved

This test models a 2D plate of length 1 in plane strain clamped on the left
and right boundaries and subjected to a parabolic temperature profile along
the x-axis:

- the temperature is 293.15 K on the left and right boundaries
- the temperature is 2000 K for x = 0.5

This example shows how to define an external state variable using an
analytical profile.

Solver : UMFPackSolver
Preconditioner : None

Thermoelastic behavior law parameters :
[ parameters            , material ]
[ Young Modulus         , 150e9    ];
[ Poisson Ratio         , 0.3      ];
[ Thermal Expansion     , 1e-5     ];
[ Reference Temperature , 293.15   ];

Element:
- Family H1
- Order 2

Run the simulation

Parameters are hardcoded in this example.

./satoh

Note

The example runs sequentially. A parallel run needs parallel set to true in the source code and a parallel linear solver.

Ssna303 Example (2D and 3D)

Description:

Tensile test on a notched beam with a finite-strain plastic behaviour. The 2D example ex2 is in plane strain. The tutorial describes it. The 3D example ex4 is described below.

Illustration of the start of the 3D ssna303 simulation.
Illustration of the end of the 3D ssna303 simulation.

Problem solved in 3D

The mesh ssna303_3d.msh is made of hexahedra. Lengths are in meters.
The mesh is 1.5e-3 thick.

Plastic behaviour with linear isotropic hardening,
IsotropicLinearHardeningPlasticity.mfront :
[ parameters      , material ]
[ Young Modulus   , 70e9     ];
[ Poisson Ratio   , 0.34     ];
[ Yield Stress    , 300e6    ];
[ Hardening Slope , 10e9     ];

Boundary conditions:
- uy = 0 on the lower boundary y = 0
- ux = 0 on the symmetry plane x = 0
- uz = 0 on the symmetry plane z = 0
- uy = 6e-3 * t on the upper boundary y = 0.03

Time: 50 steps from t = 0 to t = 1

Element:
- Family H1
- Order 1

Run the 3D simulation

Three executables solve this problem with different linear solvers:

  • ssna303_3d_mumps uses MUMPS in parallel and UMFPack sequentially. It requires MFEM built with MUMPS. It also offers the FBar formulation.

  • ssna303_3d_hypre uses the FGMRES solver of hypre with the BoomerAMG preconditioner.

  • ssna303_3d_petsc uses PETSc with the configuration file rc_ex10p. It requires MFEM built with PETSc.

mpirun -n 4 ./ssna303_3d_mumps
mpirun -n 4 ./ssna303_3d_hypre
mpirun -n 4 ./ssna303_3d_petsc

Available options

Command line

Description

Default

--order or -o

Finite element order

1

--nbsteps or -ns

Number of time steps

50

--end-time or -et

End time. The displacement of the upper boundary is 6e-3 * t.

1

--reference-file or -rf

Reference values of the resultant force on the upper boundary

no comparison

--use-fbar or -fb, --no-use-fbar or -no-fb

Use or not the FBar formulation. It requires MGIS built with TFEL. Only for ssna303_3d_mumps.

no FBar

--standard-reference-file or -srf

Reference values computed without FBar, compared with a larger tolerance. Only for ssna303_3d_mumps.

no comparison

--parallel or -p, --no-parallel or -no-p

Run in parallel with MUMPS or sequentially with UMFPack. Only for ssna303_3d_mumps.

parallel

--linearsolver or -ls

Linear solver. Only for ssna303_3d_hypre.

HypreFGMRES

--preconditioner or -pc

Preconditioner of the linear solver. Only for ssna303_3d_hypre.

HypreBoomerAMG

--refinement or -r

Number of uniform refinements of the mesh. Not for ssna303_3d_mumps.

0

--use-petsc and --petsc-configuration-file

Use PETSc with the given configuration file. It requires MFEM built with PETSc. Not for ssna303_3d_hypre.

rc_ex10p for ssna303_3d_petsc, no PETSc otherwise

Tests

In the full test mode, ssna303_3d_mumps and ssna303_3d_hypre compute the whole loading in 10 time steps. In the restricted test mode, they only compute the first time step, up to 0.1. The resultant force is compared to ssna303_3d-force-10steps.ref.

The test ssna303_3d_mumps-fbar does the same with FBar. It compares the resultant force to ssna303_3d-force-10steps-fbar.ref, and to the reference values without FBar with a larger tolerance.

The test ssna303_3d_petsc always computes one time step up to 0.02. It compares the resultant force to ssna303_3d-force-1step.ref.