numerical modelling in continuum mechanics -...
TRANSCRIPT
![Page 1: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/1.jpg)
Numerical Modellingin Continuum
MechanicsHrvoje Jasak
Wikki Ltd. United Kingdom
22/Mar/2005
Numerical Modelling in Continuum Mechanics – p.1/31
![Page 2: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/2.jpg)
Outline
Objective
• Present a new way of handling ContinuumMechanics models in numerical software
Topics
• A new approach to model representation
• Object-orientation in numerical simulationsoftware: code re-use and layered design
• Examples of complex model implementation
Numerical Modelling in Continuum Mechanics – p.2/31
![Page 3: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/3.jpg)
Background
State of the Art
• Numerical modelling is becoming a part ofproduct design◦ Improvements in computer performance◦ Improved physical modelling and numerics◦ Sufficient validation and experience
• Two-fold requirements◦ Ease of use and process integration◦ Quick and reliable model implementation
Numerical Modelling in Continuum Mechanics – p.3/31
![Page 4: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/4.jpg)
Numerics for CCM
How to handle complex models in software?
• Natural language of continuum mechanics:partial differential equations
∂k
∂t+ ∇•(uk) −∇•[(ν + νt)∇k] =
νt
[
1
2(∇u + ∇u
T )
]2
−εo
ko
k
Numerical Modelling in Continuum Mechanics – p.4/31
![Page 5: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/5.jpg)
FOAM: CCM in C++
FOAM (Field Operation and Manipulation):Represent equations in their natural language
solve
(
fvm::ddt(k)
+ fvm::div(phi, k)
- fvm::laplacian(nu() + nut, k)
== nut*magSqr(symm(fvc::grad(U)))
- fvm::Sp(epsilon/k, k)
);
Numerical Modelling in Continuum Mechanics – p.5/31
![Page 6: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/6.jpg)
Object Orientation
Recognise main objects from the numericalmodelling viewpoint
• Computational domainObject Software representation C++ Class
Time Time steps (database) time
Tensor (List of) numbers + algebra vector, tensor
Mesh primitives Point, face, cell Point, face, cell
Space Computational mesh polyMesh
Numerical Modelling in Continuum Mechanics – p.6/31
![Page 7: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/7.jpg)
Object Orientation
• Field algebraObject Software representation C++ Class
Field List of values Field
Boundary condition Values + condition patchField
Dimensions Dimension Set dimensionSet
Geometric field Field + boundary conditions geometricField
Field algebra + − ∗ / tr(), sin(), exp() . . . field operators
• Matrix and solversObject Software representation C++ Class
Linear equation matrix Matrix coefficients lduMatrix
Solvers Iterative solvers lduMatrix::solver
Numerical Modelling in Continuum Mechanics – p.7/31
![Page 8: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/8.jpg)
Object Orientation
• NumericsObject Software representation C++ Class
Interpolation Differencing schemes interpolation
Differentiation ddt, div, grad, curl fvc, fec
Discretisation ddt, d2dt2, div, laplacian fvm, fem, fam
Implemented Methods: Finite Volume, FiniteElement, Finite Area and Lagrangian tracking
• Top-level organisationObject Software representation C++ Class
Model library Library turbulenceModel
Application main() –
Numerical Modelling in Continuum Mechanics – p.8/31
![Page 9: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/9.jpg)
Model Interaction
Common interface for related models
class turbulenceModel
{
virtual volTensorField R() const = 0;
virtual fvVectorMatrix divR
(
volVectorField& U
) const = 0;
virtual void correct() = 0;
};
class SpalartAllmaras : public turbulenceModel{};
Numerical Modelling in Continuum Mechanics – p.9/31
![Page 10: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/10.jpg)
Model Interaction
Model-to-model interaction
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divR(U)
==
- fvc::grad(p)
);
New components do not disturb existing code
Numerical Modelling in Continuum Mechanics – p.10/31
![Page 11: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/11.jpg)
Geometry Handling
Complex geometry requirements
• Complex geometry is a rule, not exception
• Polyhedral cell support◦ Cell described as a polyhedron bounded
by polygons◦ Consistent handling of all cell types◦ More freedom in mesh generation
• Recent developments: polyhedral FVMprovides equivalent accuracy at lower cost
Numerical Modelling in Continuum Mechanics – p.11/31
![Page 12: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/12.jpg)
Geometry Handling
Numerical Modelling in Continuum Mechanics – p.12/31
![Page 13: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/13.jpg)
Geometry Handling
Time-varying geometry cases
• Automatic mesh motion
• Topological mesh changes with poly support
Numerical Modelling in Continuum Mechanics – p.13/31
![Page 14: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/14.jpg)
Speed of Execution
Handling large-scale computations
• Efficient and accurate numerics◦ Best discretisation practice for a given
problem◦ Iterative solvers almost inevitable◦ Careful analysis of non-linearity and
inter-equation coupling
• Massive parallelism: domain decomposition
Numerical Modelling in Continuum Mechanics – p.14/31
![Page 15: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/15.jpg)
Layered Development
• Design encourages code re-use: shared tools
• Code developed and tested in isolation◦ Vectors, tensors and field algebra◦ Mesh handling, refinement, topo changes◦ Discretisation, boundary conditions◦ Matrices and solver technology◦ Physics by segment◦ Custom applications
• Ultimate user-coding capabilities!
Numerical Modelling in Continuum Mechanics – p.15/31
![Page 16: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/16.jpg)
Examples of Application
Illustrates examples of FOAM library in use
• Concentrating on complex physics modelling:this is what FOAM is best at!
• Foundation work: numerics, mesh handling,accuracy, efficiency , validation etc.
• Examples chosen from recent work/interests
• Some other research and application areasnot fairly represented
Numerical Modelling in Continuum Mechanics – p.16/31
![Page 17: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/17.jpg)
Droplet Splash
Two-phase incompressible system
∂γ
∂t+ ∇•(uγ) = 0
∇•u = 0
∂ρu
∂t+ ∇•(ρuu) −∇•σ = −∇p + ρf + σκ∇γ
u = γu1 + (1 − γ)u2
µ, ρ = γρ1 + (1 − γ)ρ2
Numerical Modelling in Continuum Mechanics – p.17/31
![Page 18: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/18.jpg)
Droplet Splash
Droplet impact into a wall film, 1.3 million cells
Numerical Modelling in Continuum Mechanics – p.18/31
![Page 19: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/19.jpg)
Droplet Splash
Droplet impact into a wall film, cutting plane
Numerical Modelling in Continuum Mechanics – p.19/31
![Page 20: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/20.jpg)
Ice Modelling
• Ice represented as a 2-D continuum: (h, A)
• Ice interaction model: Hibler 1979
σ = 2ηε + I (ζ − η)
[
tr(ε) −P (h,A)
2
]
ζ =P (h,A)
2∆; η =
ζ
e2
∆ =
√
(
1 −1
e2
)
tr(ε)2 +2
e2ε : ε
Numerical Modelling in Continuum Mechanics – p.20/31
![Page 21: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/21.jpg)
Ice Modelling
• Wind + ocean current forcing
• Coriolis force, mean water surface gradient
• Simple melting and freezing model
Numerical Modelling in Continuum Mechanics – p.21/31
![Page 22: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/22.jpg)
Diesel Combustion
Diesel Combustion in Scania D-12 Engine
• 1/8 sector with 75 % load and n-heptane fuel
• RANS, k − ε turbulence model, simplified5-species chemistry and 1 reaction,Chalmers PaSR combustion model
• Temperature on the cutting plane
• Spray droplets coloured with temperature
Numerical Modelling in Continuum Mechanics – p.22/31
![Page 23: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/23.jpg)
Diesel Combustion
Diesel Combustion in Scania D-12 Engine
Numerical Modelling in Continuum Mechanics – p.23/31
![Page 24: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/24.jpg)
Fluid-Solid Coupling
Pipeline failure: crack propagation and leakage
Numerical Modelling in Continuum Mechanics – p.24/31
![Page 25: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/25.jpg)
Fluid-Solid Coupling
Enlarged deformation of the pipe
Numerical Modelling in Continuum Mechanics – p.25/31
![Page 26: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/26.jpg)
Surface tracking
rF
vF
vb = −vF
y
x
y′
x′
aF
o′SA
SB
o
Free
surface
Free surface tracking
• 2 phases = 2 meshes
• Mesh adjusted forinterface motion
• Coupled b.c.
Air-water system
• 2-D: rb = 0.75 mm
• 3-D: rb = 1 mm
Numerical Modelling in Continuum Mechanics – p.26/31
![Page 27: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/27.jpg)
Surfactant Effect
Clean surface
Pollution by surfactant chemicals
Numerical Modelling in Continuum Mechanics – p.27/31
![Page 28: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/28.jpg)
3-D Rising Bubble
Complex coupling problem: FVM flow solver +
FEM mesh motion + FAM surfactant transportNumerical Modelling in Continuum Mechanics – p.28/31
![Page 29: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/29.jpg)
Current and Future Work
Grocery list for future research
• Free surface tracking, solid-fluid interaction
• LES and LES free surface, multi-phase flows
• Polyhedral mesh generation, topologicalchanges, internal combustion engines
• Non-linear stress analysis, crack propagation
• Algorithmic differentiation, adjoints (discreteand continuous) and error estimation
Numerical Modelling in Continuum Mechanics – p.29/31
![Page 30: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/30.jpg)
Summary
• Object-oriented approach facilitates modelimplementation: layered design + re-use
• CCM: equation mimicking opens new grounds
• Extensive capabilities already implemented
• Open design for easy user customisation
Acknowledgements
• Ice Modelling: Dr. Jenny Hutchings University of Fairbanks, Alaska
• Cracking pipe: Dr. Vlado Tropša, prof. Alojz Ivankovic, UC Dublin
• Surface tracking: Dr. Željko Tukovic, University of Zagreb, Croatia
• Foam and OpenFOAM are released under GPL: http://www.openfoam.org
Numerical Modelling in Continuum Mechanics – p.30/31
![Page 31: Numerical Modelling in Continuum Mechanics - …powerlab.fsb.hr/ped/kturbo/OpenFOAM/slides/UniSheffield_22Mar2005… · Numerical Modelling in Continuum Mechanics Hrvoje Jasak h.jasak@wikki.co.uk](https://reader035.vdocuments.mx/reader035/viewer/2022062413/5b04758a7f8b9a3c378da82a/html5/thumbnails/31.jpg)
FOAM: CCM in C++
Main characteristics
• Wide area of applications: all of CCM!
• Shared tools and code re-use
Versatility
• Unstructured meshes, automatic meshmotion + topological changes
• Finite Volume, Finite Element, Lagrangiantracking and Finite Area methods
• Efficiency through massive parallelism
Numerical Modelling in Continuum Mechanics – p.31/31