from comsol to ngsolve: a very personal voyagefrom comsol to ngsolve: a very personal voyage philipp...
TRANSCRIPT
Background Finite element method Linear/nonlinear solvers Time-stepping Conclusion
From COMSOL to NGSolve:a very personal voyage
Philipp W. Schroeder
Institute for Numerical and Applied MathematicsGeorg-August-University Göttingen, Germany
2nd NGSolve User Meeting 2018
Georg-August-University Göttingen, Germany
4–6 July 2018
Philipp W. Schroeder (University of Göttingen) From COMSOL to NGSolve: a very personal voyage 1 / 12
Background Finite element method Linear/nonlinear solvers Time-stepping Conclusion
Outline
1 Background
2 Finite element method
3 Linear/nonlinear solvers
4 Time-stepping
5 Conclusion
Philipp W. Schroeder (University of Göttingen) From COMSOL to NGSolve: a very personal voyage 1 / 12
Background Finite element method Linear/nonlinear solvers Time-stepping Conclusion
Some brief COMSOL backgroundCOMSOL Multiphysics
commercial finite element packagehas a GUI from which everything can be controlleddifferent packages (modules) available:
electromagneticsstructural mechanics & acousticsfluid flow & heat transferchemical engineering
but: basic package (no specific modules) has all core functionalitythere exists a MATLAB interface
Philipp W. Schroeder (University of Göttingen) From COMSOL to NGSolve: a very personal voyage 2 / 12
Background Finite element method Linear/nonlinear solvers Time-stepping Conclusion
How did I come to COMSOL?
Universityused in (some) FEM lectures at University of Göttingen
students can compute FE solutions with only knowledge of PDEeverything else (weak formulation etc.) can be ignored
Industryinternship and master’s thesis in automotive industry
optimise thickness of thermal insulation for pressure tanksuse phase change material to improve performance of adsorber
Philipp W. Schroeder (University of Göttingen) From COMSOL to NGSolve: a very personal voyage 3 / 12
Background Finite element method Linear/nonlinear solvers Time-stepping Conclusion
Why do I use NGSolve now?
Christoph Lehrenfeldcame to Göttingen in September 2016convinced me to come to 1st NGSolve user meeting
I am using NGSolve ever since!
General factors which are essential for mePython interface!!!forum on ngsolve.org(Christoph, of course ;) )
Philipp W. Schroeder (University of Göttingen) From COMSOL to NGSolve: a very personal voyage 4 / 12
Background Finite element method Linear/nonlinear solvers Time-stepping Conclusion
What do I use NGSolve for?
Incompressible Computational Fluid Dynamicstime-dependent incompressible Navier–Stokes equationsexactly divergence-free methodspressure-robustnesstreatment of dominant convection via upwinding
Kelvin–Helmholtz instability Decaying homogeneous turbulence
Philipp W. Schroeder (University of Göttingen) From COMSOL to NGSolve: a very personal voyage 5 / 12
Background Finite element method Linear/nonlinear solvers Time-stepping Conclusion
Geometry and meshing
1D / 2D / 3D domains supportedsegm / trigs / quad / tet / hex / prism / pyramidhybrid meshes possiblecurved boundaries possibleno hanging nodes allowed
GUI very convenient to use8 periodicity complicated4 complicated meshes: relatively easy8 manual meshes: only after export
h-adaptivity: works pretty well
Python: sometimes complicated4 periodicity more natural8 manual meshes: complicated
h-adaptivity: coarsening?
Philipp W. Schroeder (University of Göttingen) From COMSOL to NGSolve: a very personal voyage 6 / 12
Background Finite element method Linear/nonlinear solvers Time-stepping Conclusion
FE spaces
H1, L2, H(div), H(curl)
8 cannot add more spaces manually8 H1: k ⩽ 78 L2: k ⩽ 10 (2D); ⩽ 7 (3D)8 H(div): k ⩽ 3 (2D); ⩽ 2 (3D)8 H(curl): k ⩽ 3 (2D); ⩽ 2 (3D)8 no facet spaces, no hybrid methods
4 can add whatever you like4 arbitrary high-order
This flexibility was my main reason to switch to NGSolve!
Philipp W. Schroeder (University of Göttingen) From COMSOL to NGSolve: a very personal voyage 7 / 12
Background Finite element method Linear/nonlinear solvers Time-stepping Conclusion
Weak form → discrete system
variational formulation works pretty much the same wayaccuracy of numerical integration can be chosen
8 only scalar-valued input possible4 simply add nonlinear expressions8 static condensation???
4 InnerProduct()4 Assemble() / Apply()
RAM in COMSOLpossible not very economical...
Philipp W. Schroeder (University of Göttingen) From COMSOL to NGSolve: a very personal voyage 8 / 12
Background Finite element method Linear/nonlinear solvers Time-stepping Conclusion
Linear systems
pardiso, mumps available
4 pardiso and mumps are integrated4 automatically performs reiteration4 (F)GMRES, BiCGStab, CG4 (h/p) multigrid, algebraic multigrid4 all kinds of smoothers
4 sparsecholesky4 BDDC works great for me
Iterative solvers in COMSOLWork good for H1 methods. But: I was not able to obtain good resultsfor H(div)...
Philipp W. Schroeder (University of Göttingen) From COMSOL to NGSolve: a very personal voyage 9 / 12
Background Finite element method Linear/nonlinear solvers Time-stepping Conclusion
Nonlinear systems
4 Newton solver integrated4 detects nonlinearity and acts
accordingly4 works very robustly
basically no personal experience
Philipp W. Schroeder (University of Göttingen) From COMSOL to NGSolve: a very personal voyage 10 / 12
Background Finite element method Linear/nonlinear solvers Time-stepping Conclusion
Implicit and explicit methods
4 BDF: adaptive order, adaptivetime-step
4 generalised-α: adaptivetime-step
4 (explicit) Dormand-Prince:adaptive time-step
4 whatever you can imaginepossible solution of nonlinearsystems necessary
IMEX in COMSOLBDF variant: possible, but not efficient. Runge–Kutta variant: not clearif possible.
Philipp W. Schroeder (University of Göttingen) From COMSOL to NGSolve: a very personal voyage 11 / 12
Background Finite element method Linear/nonlinear solvers Time-stepping Conclusion
Conclusion
convenience / usability flexibility / performance
4 easy to get started4 very ‘foolproof’8 (possibly) not optimal for
research8 performance not competitive
good and convenient if nothing‘fancy’ is desiredtransparent (for commercialtool)
4 huge reference manual
4 great for research4 fast
extensive knowledge of FEMnecessary
Philipp W. Schroeder (University of Göttingen) From COMSOL to NGSolve: a very personal voyage 12 / 12
Background Finite element method Linear/nonlinear solvers Time-stepping Conclusion
Thank you for your attention
Questions
Philipp W. Schroeder (University of Göttingen) From COMSOL to NGSolve: a very personal voyage 12 / 12