Implicit solution techniques for coupled multi-field problems – Block Solution, Coupled Matrices Henrik Rusche and Hrvoje Jasak [email protected], [email protected]Wikki, Germany and United Kingdom Advanced Training at the OpenFOAM Workshop 23.6.2010, Gothenburg, Sweden Implicit solution techniques for coupled multi-field problems –Block Solution, Coupled Matrices – p. 1
22
Embed
Implicit solution techniques for coupled multi-field ...web.student.chalmers.se/groups/ofw5/Presentations/HenrikRusche... · Implicit solution techniques for coupled multi-field
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Implicit solution techniques for coupledmulti-field problems –
Block Solution, Coupled MatricesHenrik Rusche and Hrvoje Jasak
Implicit solution techniques for coupled multi-field problems –Block Solution, Coupled Matrices – p. 2
Motivation and Overview
• Coupled solution algorithms are designed to handle systems of equations in themost efficient way possible
• The option of solving all equations together always exists, but it is very expensiveand in most cases unnecessary
• The objective is to treat “important” and “nice” terms implicitly and handle thecoupling algorithmically whenever possible
• Numerically well behaved terms help with the stability of discretisation
• But in some cases explicit coupling simply does not work or it is too slow
• Today : Emphasis on Implicit Coupling
◦ Domain (Matrix) coupling
◦ Equation (Block) coupling
Implicit solution techniques for coupled multi-field problems –Block Solution, Coupled Matrices – p. 3
Domain Coupling Test Case
• Steady-state conjugate heat transfer to an incompressible, laminar fluid
• Fluid: ∇•(uu)−∇•ν∇u = −∇p (1)
∇•u = 0 (2)
∇•(uT )−∇•K(∇T ) = 0 (3)
• Solid: −∇•Ks(∇Ts) = 0 (4)
• Interface: T = Ts (5)
K∇T = Ks∇Ts (6)
Implicit solution techniques for coupled multi-field problems –Block Solution, Coupled Matrices – p. 4
Variable layout Domain Coupling
pUT
Ts
Implicit solution techniques for coupled multi-field problems –Block Solution, Coupled Matrices – p. 5
Multiple Domain Support
Multiple Domains in a Single Simulation
• Original class-based design allows for multiple object of the same type in a singlesimulation, e.g. meshes and fields
• Solution: hierarchical object registry◦ Multiple named mesh databases within a single simulation:
1 mesh = 1 domain, with separate fields and physics
◦ Fields, material properties and solution controls separate for each mesh
• “Main” mesh controls time advancement (with possible sub-cycling)
Code Organisation
• Every individual mesh represents a single addressing space , with its owninternal faces and boundaries. Operations on various face types are consistent:consequences for conjugate heat transfer type of coupling
Implicit solution techniques for coupled multi-field problems –Block Solution, Coupled Matrices – p. 6
Multiple Domain Support
Case Organisation for Multiple Meshes: “Main Mesh” and solid
system
constant
points
cells
faces
boundary
polyMesh
. . . Properties
solid
solid
fvSchemes
fvSolution
U
T
solid
<case>
boundary
time directories
controlDict
fvSchemes
fvSolution
polyMesh
points
cells
faces
. . . Properties
U
p
Implicit solution techniques for coupled multi-field problems –Block Solution, Coupled Matrices – p. 7
Explicit Coupling
Multiple Solvers Side-by-Side
• With multiple mesh support, creating side-by-side solvers is trivial: multiple fieldsand equations in a single executable
• Each solver uses its own mesh, with access to its fields, material properties, solvercontrols etc.
• Coupling achieved through boundary condition update
• Here: Conjugate Heat Transfer
◦ Solve the fluid flow and fluid temperature equation;
◦ Apply the temperature on the interface to the solid side;
◦ Solve for the temperature in the solid;
◦ Update the fluid temperature at the wall equation using the new heat flux;
• Auxiliary operations◦ Data mapping: works!
• Example solver written for testing: steady, incompressible version ofchtMultiRegionFoam
Implicit solution techniques for coupled multi-field problems –Block Solution, Coupled Matrices – p. 8
Implicit Domain (Matrix) Coupling
• In many cases, Picard iterations (explicit coupling) simply does not work or it is tooslow
• Discretisation machinery in OpenFOAM is satisfactory and needs to be preserved
• Multi-domain support must allow for some variables/equations to be coupled, whileothers remain separated
• Example: conjugate heat transfer
◦ Fluid flow equations solved on fluid only
◦ Energy equation discretised separately on the fluid and solid region but solvedin a single linear solver call
• Combining variables or addressing spaces into implicit coupling requires specialpractices and tools
• Historically, conjugate heat transfer in many CFD codes is “hacked” as a specialcase: we need a general arbitrary matrix-to-matrix coupling
• The problem was insufficient flexibility of matrix support
Implicit solution techniques for coupled multi-field problems –Block Solution, Coupled Matrices – p. 9
Implementation of Domain Coupling
• OpenFOAM supports multi-region simulations, with possibility of separateaddressing and physics for each mesh: multiple meshes, with local fields
• Some equations present only locally, while others span multiple meshes
• Matrix coupled solver handles multiple matrices together in internal solver sweeps
Implicit solution techniques for coupled multi-field problems –Block Solution, Coupled Matrices – p. 10
Mesh and Matrix for Domain Coupling
T1 T2 Ts1 Ts2
a ·
·. . .
·
·
a ·
·. . .
T1
...Ts1
...
=
b2
...bs1
...
(7)
Implicit solution techniques for coupled multi-field problems –Block Solution, Coupled Matrices – p. 11
Domain Coupled Solution Algorithms
Example: Conjugate Heat Transfer
• Coupling may be established geometrically: adjacent surface pairs
• Each variable is stored only on a mesh where it is active: (U, p, T)
• Choice of conjugate variables is completely arbitrary: e.g. catalytic reactions
• Coupling is established only per-variable: handling a general coupled complexphysics problem rather than conjugate heat transfer problem specifically
Implicit solution techniques for coupled multi-field problems –Block Solution, Coupled Matrices – p. 12