elmer - uni-graz.at · elmer franz pichler virtual vehicle competence center 2011-10-05...
TRANSCRIPT
Elmer
Franz Pichler
Virtual Vehicle Competence Center
2011-10-05
2011-10-05 Elmer 1 / 26
Gliederung
Elmer, what is that?
Solvers
Maybe an example?
2011-10-05 Elmer 2 / 26
Gliederung
Elmer, what is that?
Solvers
Maybe an example?
2011-10-05 Elmer 3 / 26
ELMER
Open Source Finite Element Software for Multiphysical ProblemsProject: http://www.csc.fi/english/pages/elmer
Forum: http://www.elmerfem.org
2011-10-05 Elmer 4 / 26
What can Elmer do?
I solving PDE’s with Finite Element Method
I Specializes on coupling of multyphysical problems (CouplingEquations)
I Coupling happens by Iteration of Solvers
I Works on HPC machines
2011-10-05 Elmer 5 / 26
What are the main parts of Elmer?
I ElmerGrid - Pre-Processor, Can convert/create/partitionmeshes
I ElmerGUI - GUI for setting up easy models and basis for morecomplicated models
I ElmerPost - Post-processor for Visualisation of results
I ElmerModels - Solvers of some important PDE’s and muchmore
2011-10-05 Elmer 6 / 26
HPC Capabilities
I Elmer works on Element formulation
I Local Matrices and rhs are assembled per Element
I Very little to no adjustment of the serial solvers needed to beused in parallel
I Uses mpi and supports some interfaces to the parallelenvironment
2011-10-05 Elmer 7 / 26
Some Technical Details:
I written in Fortran
I binaries available
I Compilation and Linking quite easy
I Uses Hypre, MUMPS, Metis,...
2011-10-05 Elmer 8 / 26
Gliederung
Elmer, what is that?
Solvers
Maybe an example?
2011-10-05 Elmer 9 / 26
Direct Solvers:
I Banded (Lapack)
I Umfpack (Multifrontal)
I MUMPS (Multifrontal in parallel)
2011-10-05 Elmer 10 / 26
Iterative Solvers: The Krylov subspace methods available inElmerSolver are
I Conjugate Gradient (CG)
I Conjugate Gradient Squared (CGS)
I Biconjugate Gradient Stabilized (BiCGStab)
I BiCGStab(l)
I Transpose-Free Quasi-Minimal Residual (TFQMR)
I Generalized Minimal Residual (GMRES)
I Generalized Conjugate Residual (GCR)
2011-10-05 Elmer 11 / 26
The Multigrid Methods are:
I GMG
I AMG
2011-10-05 Elmer 12 / 26
Preconditioners:
I None
I Diagonal
I ILUn, where the literal n may take values 0,1,...,9.
I ILUT
I Multigrid
2011-10-05 Elmer 13 / 26
Meshing Utilities:
I create simple 1D,2D,3D meshes with ElmerGrid
I convert meshes from known file formats to Elmer format
2011-10-05 Elmer 14 / 26
Gliederung
Elmer, what is that?
Solvers
Maybe an example?
2011-10-05 Elmer 15 / 26
Simple Example:Heat equation in a battery cell. The components of the battery are:
1. A passive housing Ωhouse
(gray)
2. A battery cell Ωcell (blue)
3. The electric ConductorsΩcond (brown/red)
2011-10-05 Elmer 16 / 26
The equation:
−∇ · (κ∇T ) = f
T = 270, x ∈ ΓD
f =
500, x ∈ Ωcell
1000, x ∈ Ωcond
0, else
2011-10-05 Elmer 17 / 26
Steps in Elmer (Possibility)
I Set up Model in ElmerGui
I Generate SIF File (input for Solver)
I Post-Process via ElmerPost
2011-10-05 Elmer 18 / 26
Refine Example: Couple “HeatSolver“ with “StaticCurrentSolver“The equation:
−∇ · (κ∇T ) = f
−∇ · (σ∇φ) = 0
T = 270, x ∈ ΓD
φ = 0, x ∈ ΓP1
φ = 10, x ∈ ΓP2
f = ∇φ · σ∇φ
2011-10-05 Elmer 19 / 26
Steps in Elmer (Possibility: Weak Coupling)
I Modify SIF File of the first example
I Add StaticCurrentSolver Section
I Add Keyword Joule Heat in Body Force
I Add ResultOutputSolver for VTK/VTU File output
I Post-Process via Paraview
2011-10-05 Elmer 20 / 26
Parallelization:
I Install with mpi (if not precompiled allready)
I Partition with ElmerGrid
I Adjustment of solvers (Not needed in Standard Cases)
I mpirun -np NP ElmerSolver
2011-10-05 Elmer 21 / 26
Installation:
I Use: svn co https://elmerfem.svn.sourceforge.net/
svnroot/elmerfem/trunk
to get trunk version
I Adjsut your Configure options:I modules="matc umfpack mathlibs elmergrid meshgen2d eio hutiter fem"
for m in $modules; do
cd $m ;\
./configure --prefix=/work/elmer_64\
--with-mpi=yes\
--with-64bits=yes\
--with-mpi-dir=/usr/local/lib\
--with-blas="/usr/lib64/libblas.so.3.0.3"\
--with-lapack="/usr/lib64/liblapack.so.3.0.3"\
--with-hypre="-L$HYPRE/lib -lHYPRE";
make -j2; make install ;
cd ..
done
2011-10-05 Elmer 22 / 26
Partition:
I Put mesh files in directory meshdir
I Type: ElmerGrid 2 2 meshdir -partition nx ny nz
I Using metis: ElmerGrid 2 2 meshdir -metis algorithm
NP
2011-10-05 Elmer 23 / 26
The Example:
I Using the metis PartGraphkway
I ElmerGrid 2 2 meshdir -metis 8 3
2011-10-05 Elmer 24 / 26
Solver Adjustment:
I None needed in that case
2011-10-05 Elmer 25 / 26
0 5 10
20
40
60
80
Number of Processors
Tim
e
0 5 10
100
200
300
400
2011-10-05 Elmer 26 / 26