0% found this document useful (0 votes)
440 views29 pages

Introduction To: Elmer FEM Software

Uploaded by

Ronnaruchit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
440 views29 pages

Introduction To: Elmer FEM Software

Uploaded by

Ronnaruchit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Introduction to Elmer

FEM software

ElmerTeam
CSC – IT Center for Science, Finland

CSC, 2020
Elmer finite element software
for multiphysical problems

Figures by Esko Järvinen, Mikko


Lyly, Peter Råback, Timo Veijola
(TKK) & Thomas Zwinger
Elmer was published under open source in 2008
• Used worldwide by thousands of researchers
• Library parts under LGPL, modules under GPL
Elmer is hosted at GitHub and accepts contributions

6 4.2.2021
Elmer in numbers
Software Community
• ~400,000 lines of active • ~20,000 downloads for
code Windows binary yearly
o~3/4 in Fortran, 1/4 in C/C++ oLinux users untracked

• ~700 consistency tests • ~2000 forum postings yearly


• ~750 pages of • ~100 people participate on
documentation Elmer courses yearly
• ~1000 code commits yearly • Several Elmer related
scientifc visits to CSC yearly
Elmer finite element software
• Elmer is actually a suite of several programs
o Components may also be used independently
ElmerGrid
• ElmerGUI – Preprocessing ElmerGUI

• ElmerSolver – FEM Solution


o Each physical equation is a dynamically loaded
FlowSolve
library to the main program
HeatSolve ElmerSolver
• ElmerGrid - structured meshing, mesh import

& partitioning

Paraview
ElmerGUI
• Graphical user interface of Elmer
oBased on the Qt library (GPL)
oDeveloped at CSC since 2/2008

• Mesh generation
oPlugins for Tetgen, Netgen, and
ElmerGrid
oCAD interface based on OpenCascade

• Easiest tool for case specification


oEven educational use
oParallel computation

• New solvers easily supported


through GUI
oXML based menu definition
ELMER SOLVER (v 8.3) STARTED AT: 2017/06/19 18:35:01
ElmerSolver ParCommInit: Initialize #PEs: 1
MAIN: =============================================================
MAIN: ElmerSolver finite element software, Welcome!
• Assembly and solution of the MAIN: This program is free software licensed under (L)GPL
MAIN: Copyright 1st April 1995 - , CSC - IT Center for Science Ltd.
finite element equations and MAIN: Webpage http://www.csc.fi/elmer, Email [email protected]
MAIN: Version: 8.3 (Rev: 8068c86, Compiled: 2017-06-18)
beyond MAIN: HYPRE library linked in.
MAIN: MUMPS library linked in.
MAIN: =============================================================
• Large number of auxiliary MAIN: Reading Model: flux.sif
LoadMesh: Base mesh name: ./angle
routines MAIN: -------------------------------------
Loading user function library: [HeatSolve]...[HeatSolver]
HeatSolve: -------------------------------------
• Note: When we talk of Elmer HeatSolve: TEMPERATURE ITERATION 1
HeatSolve: -------------------------------------
we mainly mean ElmerSolver HeatSolve: Assembly:
DefUtils::DefaultDirichletBCs: Setting Dirichlet boundary conditions
ComputeChange: NS (ITER=1) (NRM,RELC): ( 0.25941344E-01 2.0000000 ) :: heat equation
• ~95% of development effort CompareToReferenceSolution: Solver 1 PASSED: Norm = 2.59413436E-02 RefNorm = 2.5941343
CompareToReferenceSolution: Relative Error to reference norm: 1.512027E-09
CompareToReferenceSolution: PASSED all 1 tests!
ElmerSolver: *** Elmer Solver: ALL DONE ***
ElmerSolver: The end
SOLVER TOTAL TIME(CPU,REAL): 0.10 0.15
ELMER SOLVER FINISHED AT: 2017/06/20 01:35:01
ElmerGrid (standalone + built-in ElmerGUI)

• Creation of 2D and 3D structured meshes


oRectangular basic topology + simple mapping
oExtrusion, rotation

• Mesh Import
oAbout ten different formats:
Ansys, Abaqus, Fidap, Comsol, Gmsh,…

• Mesh manipulation
oIncrease/decrease order
oScale, rotate, translate

• Partitioning
oSimple geometric (upper figure)
oMetis library (lower figure)
SERIAL WORKFLOW: CAD
MESH
CASE
VISUALIZATION
SOLUTION
IMPORT
SETUP
GENERATION
ElmerSolver – Numerical Methods
• Time-dependency
o Static, transient, harmonic, eigenmode, scanning

• Discretization
o Element families: nodal, edge (Hcurl), face (Hdiv), and p-elements, DG
o Element shapes: triangles, quads, tets, wedges, pyramids, hexas
o Formulations: Galerkin, stabilization, bubbles
o Continuity: Mortar finite elements for periodic and nonconforming meshes

• Linear system solvers


o Direct: Lapack, Umfpack, (SuperLU, Mumps, Pardiso)
o Iterative Krylov space methods (HutIter & Hypre)
o multigrid solvers (GMG & AMG) for “easy” equations (own & Hypre)
o Preconditioners: ILU, BILU, Parasails, multigrid, SGS, Jacobi,…

• Adaptivity
o For selected equations, unfortunately no parallel implementation
ElmerSolver - Physical Models
• Heat transfer • Electromagnetics
✓Heat equation ✓ Solvers for either scalar or vector potential
(nodal elements)
✓Radiation with view factors
✓ Edge element based AV solver for magnetic
✓convection and phase change
and electric fields
• Fluid mechanics
• Mesh movement (Lagrangian)
✓ Navier-Stokes (2D & 3D)
✓ Extending displacements in free surface
✓ RANS: SST k-, k-, v2-f problems
✓ LES: VMS ✓ ALE formulation
✓ Thin films: Reynolds (1D & 2D)
• Level set method (Eulerian)
• Structural mechanics ✓ Free surface defined by a function
✓ General elasticity (unisotropic, lin & nonlin)
✓ Plates & Shells • Electrokinetics
✓ Poisson-Boltzmann
• Acoustics
✓ Helmholtz • Thermoelectricity
✓ Linearized time-harmonic N-S • Quantum mechanics
✓ Monolithic thermal N-S
✓ DFT (Kohn Scham)
• Species transport
• Particle Tracker
✓ Generic convection-diffusion equation
Poll on application fields (status 3/2020)
Czockralski Crystal Growth
• Most crystalline silicon is grown by the Czhockralski (CZ)
method
• The main application when Elmer development was started.
Figures by Okmetic Ltd.

V. Savolainen et al., Simulation of large-scale


silicon melt flow in magnetic Czochralski
growth, J. Crystal Growth 243 (2002), 243-260.
CZ-growth: Transient simulation
Parallel simulation of silicon meltflows using stabilized finite
element method (5.4 million elements).

Simulation Juha Ruokolainen, animation Matti Gröhn, CSC


Elmer in Crystal Growth Simulations
• Elmer has been used extensively in crystal
growth simulations: These include crystal
and tube growth for silicon, silicon-
carbide, NiMnGa and sapphire in
Czochralski, HTCVD, sublimation,
Bridgman, Vertical Gradient Freeze and
Heat Exchanger Methods.
• Numerical results have been successfully
verified with experiments.
• Elmer is a part of open-source chain from
CAD to visualization, and offers an access
to parallelism and a number of
simultaneous simulations important for
industrial R&D.

Simulations Jari Järvinen, Silicom Oy, 2014


MEMS: Inertial sensor
• MEMS provides an ideal field for multi-physical simulation software
• Electrostatics, elasticity and fluid flow are often inherently coupled
• Example shows the effect of holes in the motion of an accelerometer
Figure by VTI Technologies
prototype

A. Pursula, P. Råback, S. Lähteenmäki and J. Lahdenperä, Coupled FEM simulations of accelerometers


including nonlinear gas damping with comparison to measurements,
J. Micromech. Microeng. 16 (2006), 2345-2354.
Elmer/ICE: Glaceology
• Elmer/Ice is the leading software used in 3D
computational glaciology
• Full 3D Stokes equation to model the flow
• Large number of tailored models to deal with the
special problems
• Motivated by climate change and sea level rise
• Currently ~100 peer-reviewed publications in the area
• Dedicated community portal
elmerice.elmerfem.org
F. Gillet-Chaulet et al.,
2012. Greenland ice sheet
contribution to sea-level
rise from a new-generation
ice-sheet model,
The Cryosphere,
6, 1561-1576.
Marine Ice Sheets Glaciers

Favier, L., G. Durand, S. L. Cornford, G. H. Gudmundsson, O. T. Zwinger and Moore, J. C. (2009) Diagnostic and
Gagliardini, F. Giller-Chaulet, T. Zwinger, A. J. Payne and A. prognostic simulations with a full Stokes model
M. Le Brocq, 2014. Retreat of Pine Island Glacier controlled accounting for superimposed ice of Midtre
by marine ice-sheet instability, Nature Climate Change Lovénbreen, Svalbard, The Cryosphere, 3, 217-
229, doi:10.5194/tc-3-217-2009
Block preconditioning: Weak scaling of 3D driven-cavity
Elems Dofs #procs Time (s)

34^3 171,500 16 44.2

43^3 340,736 32 60.3

54^3 665,500 64 66.7

68^3 1,314,036 128 73.6

86^3 2,634,012 256 83.5

108^3 5,180,116 512 102.0

132^3 9,410,548 1024 106.8

Velocity solves with Hypre: CG + BoomerAMG preconditioner for the


3D driven-cavity case (Re=100) on Cray XC (Sisu). O(~1.14)
Simulation Mika Malinen, CSC.
Computational Hemodynamics
• Cardiovascular diseases are the leading
cause of deaths in western countries
• Calcification reduces elasticity of arteries
• Modeling of blood flow poses a
challenging case of fluid-structure-
interaction
• Artificial compressibility is used to
enhance the convergence of FSI coupling

E. Järvinen, P. Råback, M. Lyly, J. Salonius. A Blood flow in carotid artery


method for partitioned fluid-structure interaction accounting FSI interaction
computation of flow in arteries. Medical Eng. &
Physics, 30 (2008), 917-923
Elmer/EM: Collaboration in electromechanics
• SEMTEC project to further develop Elmer
as a tool for heavy electromagnetics
computations.
oExisting solution provided unsatisfactory
scalability
oCSC, VTT, Aalto Univ., TUT, LUT, ABB, Kone,
Konecranes, Sulzer, Ingersoll-Rand, Trafotek,
Scanveir

• With the end of the project large


developments made available under open
source
• Most important industrial application
area at the moment
Open source workflow at Trafotek

• Simulation of losses in Cast Resin


Transformer by Trafotek
oComputed with 256 cores

• CAD & meshing with SALOME using


python bindings
• Simulation with Elmer
oEstimation of heat generation from
magnetic losses
oCoupled heat and N-S equations

• Postprocessing with Paraview

Simulation by Eelis Takala, Trafotek, Finland, 2014


47 4 February 2021
Recent developments: nonlinear shell solver

Verification against:
Sze KY, Liu XH, Lo SH, Popular
benchmark problems for
geometric nonlinear analysis of
shells, Finite Elements in Analysis
and Design 2004, 40(11):1551-
1569.
55 4.2.2021
Elastic particles - Granular flow

Simulation Peter Råback, CSC, 2011.


pyelmer
• The pyelmer package provides a simple object-oriented way
to set up Elmer simulations from python.
• Some utility-functions for pre-processing using the gmsh
python API, execution of ElmerGrid and ElmerSolver, and
some post-processing routines are provided. Some default
simulation settings, solvers, and materials are available.
• GitHub: https://github.com/nemocrys/pyelmer
• Pypi: https://pypi.org/project/pyelmer/

57 4.2.2021
Video
EOF-Library & info

Elmer and OpenFOAM coupler


● Open-source
● MPI-based
● 4 dynamic libraries + solvers

Multiphysics coupling
● Electromagnetics
● Fluids with free surface
● Heat transfer

Running both codes simultaneously


mpirun -n x Elmer : -n y OpenFOAM
Concluding remarks about Elmer
• Developed mainly via collaborative projects with academia and industry
o MEMS, Microfluidics, Acoustics, Crystal Growth, Hemodynamics, Glaciology,
Electromagnetics,…

• Focus on developments where open source approach is natural


o Science: Compatibe with the scientific method
o Novel developments: benefit from the fast feedback cycle of open source software

• Little emphasis on the GUI


o Serious users mainly use Elmer in scripted workflows
o Complementary rather than competing to commercial codes

• Value stability and backward compability – consistency tests

• Favour modularity and generality for multiphysics

• Always consider parallellism and scalability


Most important Elmer resources
• http://www.csc.fi/elmer
o Official Homepage of Elmer

• http://www.elmerfem.org
oDiscussion forum, wiki, elmerice community

• https://github.com/elmercsc/elmerfem
o GIT version control (the future)

• http://youtube.com/elmerfem
oYoutube channel for Elmer animations

• http://www.nic.funet.fi/pub/sci/physics/elmer/
o Download repository

• Further information: [email protected]

You might also like