Cantilever CSM Benchmark
1. Introduction
In order to evaluate the PERFORMANCE of the solidstructure interaction solver of FEEL ++, we realize here a benchmark on the deformation of an elastic structure, initially the Cantilever problem, we will simulate a simple cantilevered beam with a fixed end and a load applied to the other end. We will compare the obtained results with different meshes and a different polynomial degree in order to evaluate the time resolution.
2. Running the model
The configuration file are in benchmarks/modules/csm/examples/cantilever
.
Some useful commande lines:
To executing Cantilever testcase
mpirun np 4 feelpp_toolbox_solid case "github:{repo:toolbox,path:examples/modules/csm/pages/cantilever}"
Some useful commande lines:
To edit the mesh step for 0.5 we must add
gmsh.hsize= 0.5
To edit polynomial degree we must add
case.discretization=P1
3. The model
3.1. Notations and units
Notation 
Quantity 
Unit 
\(\boldsymbol{\eta}_s\) 
displacement 
\(m\) 
\(\rho_s\) 
density 
\(kg.m^{3}\) 
\(\lambda_s\) 
first Lamé coefficients 
\(N.m^{2}\) 
\(\mu_s\) 
second Lamé coefficients 
\(N.m^{2}\) 
\(E_s\) 
Young modulus 
\(kg.m^{1}.s^{2}\) 
\(\nu_s\) 
Poisson’s ratio 
dimensionless 
\(\boldsymbol{F}_s\) 
deformation gradient 

\(\boldsymbol{\Sigma}_s\) 
second PiolaKirchhoff tensor 

\(f_s^t\) 
body force 
3.2. Equations and Linear elasticity
In this case we will use the following equations :

strain tensor \(\boldsymbol{F}_s = \boldsymbol{I} + \nabla \boldsymbol{\eta}_s\)

CauchyGreen tensor \(\boldsymbol{C}_s = \boldsymbol{F}_s^{T} \boldsymbol{F}_s\)

GreenLagrange tensor
The second Newton’s law allows us to define the fundamental equation of the solid mechanic, in this problem, we try to determine the displacement \(\boldsymbol{\eta}_s\), which verifies the following equation:
The Lamé coefficients are deducing from the Young’s modulus \(E_s\) and the Poisson’s ratio \(\nu_s\) of the material we work on and can be express
4. Geometry
We consider a solid structure, composed of an elastic bar, which is fixed on one side that we note \(\Gamma_{L}\) (F:fixed) resulting in the displacement \(\boldsymbol{\eta}_s=0\) on the edges of \(\Omega_s\) and a load applied to the other end that we note \(\Gamma_{L}=\partial\Omega_s \backslash \Gamma_F\).
The geometry can be represented as follows:
In this case test, we will observe the behavior of \(A\), during this simulation, we will obtain the displacement of \(A\), on the axis \(x\) and \(y\) , when the elastic structure is subjected to its own weight and a hanging weight to her.
5. Input parameters
5.1. Boundary conditions
We set

On \(\Gamma_{F}\),a condition that imposes this boundary to be fixed : \(\boldsymbol{\eta}_s=0\) (ps: \(\boldsymbol{\eta}_s\) is the displacement )

On \(\Gamma_{L}\), a force will be applied on the other end of the beam.
5.2. Discretization
To solve this problem we will use the Feel++ Toolboxes that use Finite Elements Method, with Lagrangian elements of order \(N\) to discretize space.
There are several different Toolboxes available, such as: CSM, CFD, Heat Transfer, etc. Of these, we need the CSM (Computational Solid Mechanics) Toolbox.
It is also necessary to define the type of the simulation. For example “Elasticity” is generally applied in case of metals, and “HyperElasticity” for plastics.
5.3. Solvers
Here are the different solvers (linear) used during results acquisition.
type 
cg 
relative tolerance 
1e8 
max iteration 
1000 
reuse preconditioner 
true 
type 
gamg 
package 
PETSC 

Regarding the resolution, we used the conjugate gradient method with the mutligrille preconditioner, because we are working on a linear system.
5.4. Parameters
The following table displays the material properties of the model.We will use the following data:
Name 
Description 
Nominal Value 
Units 
\(g\) 
gravitational constant 
2 
\(m / s^2\) 
\(l\) 
elastic structure length 
\(40\) 
\(m\) 
\(h\) 
elastic structure height 
\(8\) 
\(m\) 
\(E_s\) 
Young’s modulus 
\(206.84277e9\) 
\(kg / ms^2\) 
\(\nu_s\) 
Poisson’s ratio 
\(0.3\) 
dimensionless 
\(\rho_s\) 
density 
\(7870\) 
\(kg/ m^3\) 
6. Outputs
As described before, in this problem, we try to determine the displacement \(\boldsymbol{\eta}_s\) on \(\Omega_s\), which verifies the following equation:
Add to this, the execution time as well as the degree of freedom and the number of element generated by the different steps of meshes and we will compare at the end the results with different meshes and a different polynomial degree in order to evaluate the time resolution.
7. Results
7.1. CSM cantilever P1
Maillage 
\(N_{elt}\) 
\(N_{dof}\) 
Number of iteration 
Execution time \(s\) 
Relative time 
1.0 
6356 
5127 
13 
0.310092 
1 
0.9 
8949 
6831 
15 
0.464755 
1.4987648827 
0.8 
12143 
8838 
23 
0.662687 
1.4258846059 
0.7 
19318 
13353 
25 
1.06298 
1.6040453487 
0.6 
28351 
18921 
20 
1.56676 
1.4739317767 
0.5 
47959 
30264 
18 
3.11404 
1.9875666982 
0.4 
92816 
55500 
21 
5.34246 
1.7156041669 
0.3 
221419 
124992 
33 
15.1014 
2.8266753518 
0.2 
732051 
389994 
31 
53.2594 
3.526785596 
The following graph shows the number of element and degree of freedom depending on the mesh step during a performance test with a P1 polynomial degree using the FEEL ++ solver, applied to the Cantilever test case. A performance test was launched with a mesh size \(h = 0.1\) less at each step. Note that, more the mesh is refined more the number of element increases and the degree of freedom also, which also leads to an increase in the number of equations to solve.
The data of a numerical problem usually depend on experimental measurements, that’s whay, in general, it can be said that, the conditioning associated with a problem is a measure of the difficulty of a numerical calculation of the problem. A problem with a low conditioning is Well packaged and a problem with high conditioning is said to be poorly conditioned.
The following graph shows the number of iteration according to the mesh step \(h\), which evolves in an irregular way, because the condition number is linked to the mesh size (as h decreases, the condition number increases) and affects the convergence of iterative solvers (it inscreases with the condition number), that’s explaine why the number of iterations increases by refining the mesh.
The next graph shows the execution time and the relative time according to the mesh step \(h\). We note that the execution time increases by refining the mesh this is due to the generated element numbers and therefore the number of equation to solve, and we see it well on the curve of relative time that evolves almost with the execution time, which will allow us to approximately the time of the next mesh, or the time evolution of the resolution in function of the mesh step.
7.2. CSM cantilever P2
Maillage  \(N_{elt}\)  \(N_{dof}\)  Number of iteration  Execution time \(s\)  Relative time 

1.0 
6296 
32910 
36 
7.13087 
1 
0.9 
8949 
45246 
40 
10.5747 
1.4829466811 
0.8 
12168 
60006 
32 
14.1339 
1.3365769242 
0.7 
19413 
92922 
36 
23.6667 
1.6744635239 
0.6 
28353 
133275 
33 
35.0736 
1.4819810113 
0.5 
47959 
218940 
34 
67.1934 
1.915782811 
0.4 
93190 
413373 
34 
136.305 
2.0285474466 
0.3 
221419 
954552 
48 
408.4 
2.9962217087 
0.25 
377220 
1603095 
60 
791.143 
1.9371767875 
The following figures show the results of table above on graphs for good realize that refining the mesh, the number of element and degree of freedom increase, and it is practically the same case as that with polynomial degree P1. As to the number of iteration evolve differently according to \(h\), but in the seems to increase too.
The next graph shows the execution time and the relative time according to the mesh step \(h\). We note that the execution time increases by refining the mesh this is due to the generated element numbers and therefore the number of equation to solve, and we see it well on the curve of relative time that evolves almost with the execution time, which will allow us to approximately the time of the next mesh, or the time evolution of the resolution in function of the mesh step.
All the files used for this case can be found in this
Conclusion
To obtain these data, we used several refinements of meshes and different polynomial approximations to obtain the time of resolution of each one.
As expected from a theoretical point of view, the mesh size has a considerable influence on the results states, as you’ve seen it plays a very important role on the time of performance.
We chose a simplified model for the project, which from this done well as part of the proposed study. Finally, with these results we could see that the solver Feel++ has a good calculation speed.
8. References

Yousef Saad, Iterative Methods for Sparse Linear Systems, Second edition with correction. January 3rd, 2000.

[CSM] Theory of solid mechanics : docs.feelpp.org/toolboxes/0.104/csm/theory/

[Toolboxes] Feel++ Toolboxes Manual : docs.feelpp.org/toolboxes/0.104/