Guided Examples Using Elmerfem
Guided Examples Using Elmerfem
• Paraview
• multiple-platform application for interactive, scientific
visualization
• Open source
• Many useful visualization capabilities:
• Contours and isosurfaces for scalar and vector fields
• Streamlines
• Advanced data manipulation through Python
• Support of variety of formats
• VTK, VTU
• CGNS
• Source code and documentation available at
GitHub - Kitware/ParaView: VTK-based Data Analysis and Visualization
Application
Software loading and running
• On Viz
• Connect to Viz using NoMachine Terminal
• Click bottom left icon on desktop to open the start menu
(See figure)
• Open terminal
• To open ParaView
• To load ParaView into environment, type into terminal
• module load ParaView/5.6.2-foss-2020b-mpi
• To run ParaView
• paraview
Loaded elastic beam – 2D
• Case definition
• 2D case
• Homogeneous, elastic beam, defined
on 𝑥 − 𝑦 plane
(length 1𝑚 and thickness 0.1𝑚)
• Rigid support at the wall
• Space dependent mechanical load,
which grows linearly from 0 to 𝑞0 = 1𝑒7𝑁
𝐿 = 1𝑚
• Goal
𝑡 = 0.1𝑚
• Obtain the displacement of the beam
Loaded elastic beam – 2D
• Mathematical definition of the problem
• Domain of computation:
• Beam area Ω
• Boundary conditions
• Mechanical load Γ3
• No displacement at Γ4
• Zero load on Γ1 and Γ2
• Problem solution
−∇𝜎 = 0 𝑜𝑛 Ω
𝜎 = 𝜆𝑡𝑟 𝜀 𝑢 𝐼 + 2𝜇𝜀(𝑢) 𝑜𝑛 Ω
𝑢=0 𝑜𝑛 Γ4
𝜎𝑛 = 0 𝑜𝑛 Γ1 𝑎𝑛𝑑 Γ_2
𝜎𝑛 = −𝑞 𝑜𝑛 Γ3
Case preparation - overview
1. Definition of domain of computation (Elmer GUI)
• Mesh preparation/definition
2. Definition of type of physical problem (Elmer GUI)
• Definition of equation to be solved
3. Definition of material properties (Elmer GUI)
4. Definition of boundary/initial conditions (Elmer GUI)
5. Computation (Elmer GUI)
6. Postprocessing of results (ParaView)
Case preparation
1. Definition of domain of computation (Elmer GUI)
• Import mesh into Elmer GUI
• File->Open
• Navigate to your folder and select beam.grd
• Use Mouse wheel/left button to rotate and zoom mesh
Case preparation
• Go to Model->summary to observe mesh
information
• Check that mesh contains 3221 nodes
• How many surface elements are in the mesh?
• What is the type of the surface elements?
• Triangles, quadrangles?
• Check Elmer documentation
to see ID numbers for different
elements
Case preparation
2. Definition of type of physical problem
• In Model->Setup… one can define
properties related to the simulation, such
as results directory, input mesh directory,
name of output file, constants, etc…
• Make sure the simulation type is set
to Steady state
Case preparation
• In Model->Equation->Add… one
can select equations to be solved
during the computation. For the
bending of beam, select Linear
elasticity tab
• Tick checkboxes Active and
Plane stress
• Assign the equation to the Mesh body
(Tick the box in Apply to body)
• In the end, click OK to accept new
changes
Case preparation
3. Definition of material properties
• The material of the beam in our Study is
iron with Poisson’s ration of 0.29 and
Young’s modulus of 1.93 ∙ 109 𝑁/𝑚2
• Click on Model->Material->Add…
• Click on Material library and
select Iron(generic)
• Click OK
• Tick box Apply to bodies to set the
material to mesh.
• Click OK
Case preparation
4. Definition of boundary conditions
• To define a boundary condition, click on Model->Boundary condition->Add…
• Navigate to Linear elasticity
• Here, we can define displacements and loads on the mesh boundaries
Case preparation
• Definition of wall boundary condition
• Set Displacement 1 and Displacement 2 to 0. Identification number 1 refers to x-coordinate
and 2 refers to y-coordinate
• Select appropriate Edge on the Mesh
• Set name of boundary condition to Wall
• Click OK
• Definition of mechanical load 𝑞(𝑥)
• Create a new boundary condition (Model->Boundary condition->Add…)
• Navigate to Linear elasticity
• Now we have to define linear load that points in y-direction and is linearly increasing along x-
direction. To do that:
• Go to Force 2 (remember, 2 refers to y-direction)
• The variable to specify: Variable Coordinate 1; Real; 0 0; 1 -1.0e7; End
• Set boundary condition name to Load
Case preparation
• Explanation of Force 2 definition
• The semicolon in Elmer FEM specifies the definition of new keyword
• The first keyword (Variable Coordinate 1) specifies that Force 2
is changing its value along coordinate 1 (remember, 1 refers to x-
direction) 𝑦
𝑥 = 0.5𝑚,
𝑥 = 0𝑚, 𝐹 = −1𝑒8𝑁
𝐹 = 0𝑁 𝑥 = 1𝑚,
𝐹 = 0𝑁
Exercise 3
• Transient loading
• Change Simulation Type to Transient (Setup->simulation type)
• Set the Time Stepping Method to bdf
• Set the Time step intervals to 200
• Set the Time Step Sizes to 1𝑒 −4
Loaded elastic beam – 3D
• Case definition
• A homogeneous, elastic beam is rigidly supported on
one end. On the other end, the force is 2000N due to
an attached object. The weight of the beam itself is wall
also included as additional load.
• The length of the beam is 1m, thickness is 0.05 m and
width is 0.1m
• Young’s modulus is 10 ∙ 109 𝑁/𝑚2 and Poisson’s ratio 𝑤 = 0.1𝑚
is 0.37
• Density of the material is 550𝑘𝑔/𝑚2
• Goal
• Calculate displacement field of the beam
• Obtain the location and value of the maximum 𝑡 = 0.05𝑚
displacement
• Calculate stress field
𝐹 = 2000𝑁
Loaded elastic beam – 3D
1. Definition of domain of computation
• Import mesh into Elmer GUI
• Navigate to your folder and select beam3d.grd
• Use Mouse wheel/left button to rotate and zoom mesh
• Verify that mesh consists of 6073 nodes and of 1200 quadratic hexahedral
elements
Loaded elastic beam – 3D
2. Definition of type of physical problem
• Set the simulation type to Steady
state
• Set equation to Linear elasticity
• In Linear elasticity, set checkbox
next to Active
• We also want to compute stresses as a
post-processing step, so set checkbox of
Calculate Stresses
• Click on Edit solver settings:
Edit Solver Settings
• check Iterative method and set it to
GCR
• Set Preconditioning to ILU1
Loaded elastic beam – 3D
𝑇[℃]
𝑥[𝑚]
Exercise
6. Post-processing
• Examination of computational time vs. number of
mesh nodes
• Check output of Solver Log and read second line
from bottom to get the CPU time (see below)
This project has received funding from the European High-Performance Computing Joint Undertaking (JU) under grant
agreement No 951732. The JU receives support from the European Union’s Horizon 2020 research and innovation
programme and Germany, Bulgaria, Austria, Croatia, Cyprus, Czech Republic, Denmark, Estonia, Finland, Greece, Hungary,
Ireland, Italy, Lithuania, Latvia, Poland, Portugal, Romania, Slovenia, Spain, Sweden, United Kingdom, France, Netherlands,
Belgium, Luxembourg, Slovakia, Norway, Switzerland, Turkey, Republic of North Macedonia, Iceland, Montenegro