Multi-Region Conjugate Heat/Mass Transfer

84
Multi-Region Conjugate Heat/Mass Transfer MRconjugateHeatFoam: A Dirichlet–Neumann partitioned multi-region conjugate heat transfer solver Brent A. Craven 1 Robert L. Campbell 2 1 Computational Mechanics Division Applied Research Laboratory Penn State University 2 Noise Control and Hydroacoustics Division Applied Research Laboratory Penn State University 6th OpenFOAM Workshop 13–16 June 2011

Transcript of Multi-Region Conjugate Heat/Mass Transfer

Page 1: Multi-Region Conjugate Heat/Mass Transfer

Multi-Region Conjugate Heat/Mass Transfer

MRconjugateHeatFoam: A Dirichlet–Neumann partitioned multi-regionconjugate heat transfer solver

Brent A. Craven1 Robert L. Campbell2

1Computational Mechanics Division

Applied Research Laboratory

Penn State University

2Noise Control and Hydroacoustics Division

Applied Research Laboratory

Penn State University

6th OpenFOAM Workshop13–16 June 2011

Page 2: Multi-Region Conjugate Heat/Mass Transfer

Outline

1 Introduction

2 Multi-region support: OpenFOAM and ParaView

3 OpenFOAM multi-region solvers (e.g., MRconjugateHeatFoam)

4 Advanced multi-region solver development

5 Advanced multi-region usage

6 Hands-on training: MRconjugateHeatFoam

Page 3: Multi-Region Conjugate Heat/Mass Transfer

Outline

1 Introduction

2 Multi-region support: OpenFOAM and ParaView

3 OpenFOAM multi-region solvers (e.g., MRconjugateHeatFoam)

4 Advanced multi-region solver development

5 Advanced multi-region usage

6 Hands-on training: MRconjugateHeatFoam

Page 4: Multi-Region Conjugate Heat/Mass Transfer

Outline

1 Introduction

2 Multi-region support: OpenFOAM and ParaView

3 OpenFOAM multi-region solvers (e.g., MRconjugateHeatFoam)

4 Advanced multi-region solver development

5 Advanced multi-region usage

6 Hands-on training: MRconjugateHeatFoam

Page 5: Multi-Region Conjugate Heat/Mass Transfer

Outline

1 Introduction

2 Multi-region support: OpenFOAM and ParaView

3 OpenFOAM multi-region solvers (e.g., MRconjugateHeatFoam)

4 Advanced multi-region solver development

5 Advanced multi-region usage

6 Hands-on training: MRconjugateHeatFoam

Page 6: Multi-Region Conjugate Heat/Mass Transfer

Outline

1 Introduction

2 Multi-region support: OpenFOAM and ParaView

3 OpenFOAM multi-region solvers (e.g., MRconjugateHeatFoam)

4 Advanced multi-region solver development

5 Advanced multi-region usage

6 Hands-on training: MRconjugateHeatFoam

Page 7: Multi-Region Conjugate Heat/Mass Transfer

Outline

1 Introduction

2 Multi-region support: OpenFOAM and ParaView

3 OpenFOAM multi-region solvers (e.g., MRconjugateHeatFoam)

4 Advanced multi-region solver development

5 Advanced multi-region usage

6 Hands-on training: MRconjugateHeatFoam

Page 8: Multi-Region Conjugate Heat/Mass Transfer

Introduction• What do we mean by “multi-region multi-physics

modeling”?- Inherently-coupled physics on disparate continua (e.g.,

fluid, solid, different solids)

- Separate governing equations for each continuum/region

• For example:- Conjugate heat and mass transfer (Part 1)

- Fluid-structure interaction (Part 2)

• Briefly, recall that there are two approaches to solvingsuch problems:

- Monolithic: use same primitive variables, cast

governing equations in terms of these variables, solve a

single coupled matrix equation system

- Partitioned: separate governing equations, solve

separate matrix equation systems, couple at the

boundary interface, sub-iterate until coupled

convergence is reached

Page 9: Multi-Region Conjugate Heat/Mass Transfer

Introduction• What do we mean by “multi-region multi-physics

modeling”?- Inherently-coupled physics on disparate continua (e.g.,

fluid, solid, different solids)

- Separate governing equations for each continuum/region

• For example:- Conjugate heat and mass transfer (Part 1)

- Fluid-structure interaction (Part 2)

• Briefly, recall that there are two approaches to solvingsuch problems:

- Monolithic: use same primitive variables, cast

governing equations in terms of these variables, solve a

single coupled matrix equation system

- Partitioned: separate governing equations, solve

separate matrix equation systems, couple at the

boundary interface, sub-iterate until coupled

convergence is reached

Page 10: Multi-Region Conjugate Heat/Mass Transfer

Introduction• What do we mean by “multi-region multi-physics

modeling”?- Inherently-coupled physics on disparate continua (e.g.,

fluid, solid, different solids)

- Separate governing equations for each continuum/region

• For example:- Conjugate heat and mass transfer (Part 1)

- Fluid-structure interaction (Part 2)

• Briefly, recall that there are two approaches to solvingsuch problems:

- Monolithic: use same primitive variables, cast

governing equations in terms of these variables, solve a

single coupled matrix equation system

- Partitioned: separate governing equations, solve

separate matrix equation systems, couple at the

boundary interface, sub-iterate until coupled

convergence is reached

Page 11: Multi-Region Conjugate Heat/Mass Transfer

Introduction• What do we mean by “multi-region multi-physics

modeling”?- Inherently-coupled physics on disparate continua (e.g.,

fluid, solid, different solids)

- Separate governing equations for each continuum/region

• For example:- Conjugate heat and mass transfer (Part 1)

- Fluid-structure interaction (Part 2)

• Briefly, recall that there are two approaches to solvingsuch problems:

- Monolithic: use same primitive variables, cast

governing equations in terms of these variables, solve a

single coupled matrix equation system

- Partitioned: separate governing equations, solve

separate matrix equation systems, couple at the

boundary interface, sub-iterate until coupled

convergence is reached

Page 12: Multi-Region Conjugate Heat/Mass Transfer

Introduction• What do we mean by “multi-region multi-physics

modeling”?- Inherently-coupled physics on disparate continua (e.g.,

fluid, solid, different solids)

- Separate governing equations for each continuum/region

• For example:- Conjugate heat and mass transfer (Part 1)

- Fluid-structure interaction (Part 2)

• Briefly, recall that there are two approaches to solvingsuch problems:

- Monolithic: use same primitive variables, cast

governing equations in terms of these variables, solve a

single coupled matrix equation system

- Partitioned: separate governing equations, solve

separate matrix equation systems, couple at the

boundary interface, sub-iterate until coupled

convergence is reached

Page 13: Multi-Region Conjugate Heat/Mass Transfer

Introduction• What do we mean by “multi-region multi-physics

modeling”?- Inherently-coupled physics on disparate continua (e.g.,

fluid, solid, different solids)

- Separate governing equations for each continuum/region

• For example:- Conjugate heat and mass transfer (Part 1)

- Fluid-structure interaction (Part 2)

• Briefly, recall that there are two approaches to solvingsuch problems:

- Monolithic: use same primitive variables, cast

governing equations in terms of these variables, solve a

single coupled matrix equation system

- Partitioned: separate governing equations, solve

separate matrix equation systems, couple at the

boundary interface, sub-iterate until coupled

convergence is reached

Page 14: Multi-Region Conjugate Heat/Mass Transfer

Introduction• What do we mean by “multi-region multi-physics

modeling”?- Inherently-coupled physics on disparate continua (e.g.,

fluid, solid, different solids)

- Separate governing equations for each continuum/region

• For example:- Conjugate heat and mass transfer (Part 1)

- Fluid-structure interaction (Part 2)

• Briefly, recall that there are two approaches to solvingsuch problems:

- Monolithic: use same primitive variables, cast

governing equations in terms of these variables, solve a

single coupled matrix equation system

- Partitioned: separate governing equations, solve

separate matrix equation systems, couple at the

boundary interface, sub-iterate until coupled

convergence is reached

Page 15: Multi-Region Conjugate Heat/Mass Transfer

Introduction• What do we mean by “multi-region multi-physics

modeling”?- Inherently-coupled physics on disparate continua (e.g.,

fluid, solid, different solids)

- Separate governing equations for each continuum/region

• For example:- Conjugate heat and mass transfer (Part 1)

- Fluid-structure interaction (Part 2)

• Briefly, recall that there are two approaches to solvingsuch problems:

- Monolithic: use same primitive variables, cast

governing equations in terms of these variables, solve a

single coupled matrix equation system

- Partitioned: separate governing equations, solve

separate matrix equation systems, couple at the

boundary interface, sub-iterate until coupled

convergence is reached

Page 16: Multi-Region Conjugate Heat/Mass Transfer

Introduction• What do we mean by “multi-region multi-physics

modeling”?- Inherently-coupled physics on disparate continua (e.g.,

fluid, solid, different solids)

- Separate governing equations for each continuum/region

• For example:- Conjugate heat and mass transfer (Part 1)

- Fluid-structure interaction (Part 2)

• Briefly, recall that there are two approaches to solvingsuch problems:

- Monolithic: use same primitive variables, cast

governing equations in terms of these variables, solve a

single coupled matrix equation system

- Partitioned: separate governing equations, solve

separate matrix equation systems, couple at the

boundary interface, sub-iterate until coupled

convergence is reached

Page 17: Multi-Region Conjugate Heat/Mass Transfer

Introduction

• Newer, monolithic solution approaches in OpenFOAM were coveredearlier by Ivor Clifford (“Block-Coupled Solvers”)

• Here, we focus on partitioned approaches using:- Standard multi-region OpenFOAM functionality (Part 1: Conjugate

heat/mass transfer)

- Custom partitioned approaches for coupling to third-party software

(Part 2: FSI)

Page 18: Multi-Region Conjugate Heat/Mass Transfer

Introduction

• Newer, monolithic solution approaches in OpenFOAM were coveredearlier by Ivor Clifford (“Block-Coupled Solvers”)

• Here, we focus on partitioned approaches using:- Standard multi-region OpenFOAM functionality (Part 1: Conjugate

heat/mass transfer)

- Custom partitioned approaches for coupling to third-party software

(Part 2: FSI)

Page 19: Multi-Region Conjugate Heat/Mass Transfer

Introduction

• Newer, monolithic solution approaches in OpenFOAM were coveredearlier by Ivor Clifford (“Block-Coupled Solvers”)

• Here, we focus on partitioned approaches using:- Standard multi-region OpenFOAM functionality (Part 1: Conjugate

heat/mass transfer)

- Custom partitioned approaches for coupling to third-party software

(Part 2: FSI)

Page 20: Multi-Region Conjugate Heat/Mass Transfer

Introduction

• Newer, monolithic solution approaches in OpenFOAM were coveredearlier by Ivor Clifford (“Block-Coupled Solvers”)

• Here, we focus on partitioned approaches using:- Standard multi-region OpenFOAM functionality (Part 1: Conjugate

heat/mass transfer)

- Custom partitioned approaches for coupling to third-party software

(Part 2: FSI)

Page 21: Multi-Region Conjugate Heat/Mass Transfer

OpenFOAM Multi-Region Case Structure• Multi-region OpenFOAM case structure is slightly adapted from the

standard case structure• Recall the standard case structure:

Page 22: Multi-Region Conjugate Heat/Mass Transfer

OpenFOAM Multi-Region Case Structure• Multi-region case structure:

• Within each “fluid” and “solid” subdirectory there exists the standardcontents (“polyMesh”, “transportProperties”, “fvSchemes”, “fvSolution”,etc.)

Page 23: Multi-Region Conjugate Heat/Mass Transfer

OpenFOAM Multi-Region Case Structure• Multi-region case structure:

• Within each “fluid” and “solid” subdirectory there exists the standardcontents (“polyMesh”, “transportProperties”, “fvSchemes”, “fvSolution”,etc.)

Page 24: Multi-Region Conjugate Heat/Mass Transfer

OpenFOAM Multi-Region Support• Many of the essential OpenFOAM utilities already support this

multi-region case structure:- blockMesh -region name- decomposePar -region name- reconstructPar -region name- checkMesh -region name

• If a utility does not support multi-region cases, it is quite simple toadd (e.g., checkMesh):

Page 25: Multi-Region Conjugate Heat/Mass Transfer

OpenFOAM Multi-Region Support• Many of the essential OpenFOAM utilities already support this

multi-region case structure:- blockMesh -region name- decomposePar -region name- reconstructPar -region name- checkMesh -region name

• If a utility does not support multi-region cases, it is quite simple toadd (e.g., checkMesh):

Page 26: Multi-Region Conjugate Heat/Mass Transfer

OpenFOAM Multi-Region Support• Many of the essential OpenFOAM utilities already support this

multi-region case structure:- blockMesh -region name- decomposePar -region name- reconstructPar -region name- checkMesh -region name

• If a utility does not support multi-region cases, it is quite simple toadd (e.g., checkMesh):

Page 27: Multi-Region Conjugate Heat/Mass Transfer

OpenFOAM Multi-Region Support• Many of the essential OpenFOAM utilities already support this

multi-region case structure:- blockMesh -region name- decomposePar -region name- reconstructPar -region name- checkMesh -region name

• If a utility does not support multi-region cases, it is quite simple toadd (e.g., checkMesh):

Page 28: Multi-Region Conjugate Heat/Mass Transfer

ParaView Multi-Region Support

• ParaView natively supportsmulti-region OpenFOAM cases

• This includes support fordifferent variables defined oneach region

• Typically, it is convenient to:- Load the multi-region case

- Extract each region via “Filter

-> Extract Block”

- Post-process/manipulate each

region as desired

Page 29: Multi-Region Conjugate Heat/Mass Transfer

ParaView Multi-Region Support

• ParaView natively supportsmulti-region OpenFOAM cases

• This includes support fordifferent variables defined oneach region

• Typically, it is convenient to:- Load the multi-region case

- Extract each region via “Filter

-> Extract Block”

- Post-process/manipulate each

region as desired

Page 30: Multi-Region Conjugate Heat/Mass Transfer

ParaView Multi-Region Support

• ParaView natively supportsmulti-region OpenFOAM cases

• This includes support fordifferent variables defined oneach region

• Typically, it is convenient to:- Load the multi-region case

- Extract each region via “Filter

-> Extract Block”

- Post-process/manipulate each

region as desired

Page 31: Multi-Region Conjugate Heat/Mass Transfer

ParaView Multi-Region Support

• ParaView natively supportsmulti-region OpenFOAM cases

• This includes support fordifferent variables defined oneach region

• Typically, it is convenient to:- Load the multi-region case

- Extract each region via “Filter

-> Extract Block”

- Post-process/manipulate each

region as desired

Page 32: Multi-Region Conjugate Heat/Mass Transfer

ParaView Multi-Region Support

• ParaView natively supportsmulti-region OpenFOAM cases

• This includes support fordifferent variables defined oneach region

• Typically, it is convenient to:- Load the multi-region case

- Extract each region via “Filter

-> Extract Block”

- Post-process/manipulate each

region as desired

Page 33: Multi-Region Conjugate Heat/Mass Transfer

ParaView Multi-Region Support

• ParaView natively supportsmulti-region OpenFOAM cases

• This includes support fordifferent variables defined oneach region

• Typically, it is convenient to:- Load the multi-region case

- Extract each region via “Filter

-> Extract Block”

- Post-process/manipulate each

region as desired

Page 34: Multi-Region Conjugate Heat/Mass Transfer

OpenFOAM Multi-Region Solvers

• So, now we’ve seen how multi-region OpenFOAM cases are setup andpost-processed

• Now, from a developer’s perspective, how are multi-region solversconstructed?

• General overview of multi-region partitioned solvers:1 Define multiple meshes, one for each “region”

2 Create field variables on each mesh

3 Solve separate governing equations on each mesh

4 Multi-region coupling at the boundary interface

5 Subiterate until fully-coupled solution is reached

• To illustrate, let’s walk through MRconjugateHeatFoam, aDirichlet–Neumann partitioned multi-region conjugate heat transfersolver

Page 35: Multi-Region Conjugate Heat/Mass Transfer

OpenFOAM Multi-Region Solvers

• So, now we’ve seen how multi-region OpenFOAM cases are setup andpost-processed

• Now, from a developer’s perspective, how are multi-region solversconstructed?

• General overview of multi-region partitioned solvers:1 Define multiple meshes, one for each “region”

2 Create field variables on each mesh

3 Solve separate governing equations on each mesh

4 Multi-region coupling at the boundary interface

5 Subiterate until fully-coupled solution is reached

• To illustrate, let’s walk through MRconjugateHeatFoam, aDirichlet–Neumann partitioned multi-region conjugate heat transfersolver

Page 36: Multi-Region Conjugate Heat/Mass Transfer

OpenFOAM Multi-Region Solvers

• So, now we’ve seen how multi-region OpenFOAM cases are setup andpost-processed

• Now, from a developer’s perspective, how are multi-region solversconstructed?

• General overview of multi-region partitioned solvers:1 Define multiple meshes, one for each “region”

2 Create field variables on each mesh

3 Solve separate governing equations on each mesh

4 Multi-region coupling at the boundary interface

5 Subiterate until fully-coupled solution is reached

• To illustrate, let’s walk through MRconjugateHeatFoam, aDirichlet–Neumann partitioned multi-region conjugate heat transfersolver

Page 37: Multi-Region Conjugate Heat/Mass Transfer

OpenFOAM Multi-Region Solvers

• So, now we’ve seen how multi-region OpenFOAM cases are setup andpost-processed

• Now, from a developer’s perspective, how are multi-region solversconstructed?

• General overview of multi-region partitioned solvers:1 Define multiple meshes, one for each “region”

2 Create field variables on each mesh

3 Solve separate governing equations on each mesh

4 Multi-region coupling at the boundary interface

5 Subiterate until fully-coupled solution is reached

• To illustrate, let’s walk through MRconjugateHeatFoam, aDirichlet–Neumann partitioned multi-region conjugate heat transfersolver

Page 38: Multi-Region Conjugate Heat/Mass Transfer

OpenFOAM Multi-Region Solvers

• So, now we’ve seen how multi-region OpenFOAM cases are setup andpost-processed

• Now, from a developer’s perspective, how are multi-region solversconstructed?

• General overview of multi-region partitioned solvers:1 Define multiple meshes, one for each “region”

2 Create field variables on each mesh

3 Solve separate governing equations on each mesh

4 Multi-region coupling at the boundary interface

5 Subiterate until fully-coupled solution is reached

• To illustrate, let’s walk through MRconjugateHeatFoam, aDirichlet–Neumann partitioned multi-region conjugate heat transfersolver

Page 39: Multi-Region Conjugate Heat/Mass Transfer

OpenFOAM Multi-Region Solvers

• So, now we’ve seen how multi-region OpenFOAM cases are setup andpost-processed

• Now, from a developer’s perspective, how are multi-region solversconstructed?

• General overview of multi-region partitioned solvers:1 Define multiple meshes, one for each “region”

2 Create field variables on each mesh

3 Solve separate governing equations on each mesh

4 Multi-region coupling at the boundary interface

5 Subiterate until fully-coupled solution is reached

• To illustrate, let’s walk through MRconjugateHeatFoam, aDirichlet–Neumann partitioned multi-region conjugate heat transfersolver

Page 40: Multi-Region Conjugate Heat/Mass Transfer

OpenFOAM Multi-Region Solvers

• So, now we’ve seen how multi-region OpenFOAM cases are setup andpost-processed

• Now, from a developer’s perspective, how are multi-region solversconstructed?

• General overview of multi-region partitioned solvers:1 Define multiple meshes, one for each “region”

2 Create field variables on each mesh

3 Solve separate governing equations on each mesh

4 Multi-region coupling at the boundary interface

5 Subiterate until fully-coupled solution is reached

• To illustrate, let’s walk through MRconjugateHeatFoam, aDirichlet–Neumann partitioned multi-region conjugate heat transfersolver

Page 41: Multi-Region Conjugate Heat/Mass Transfer

Creating Multiple (i.e., Multi-Region) Meshes

• In createMesh.H:

Create “fluidMesh” Create “solidMesh”

• For comparison, see:$FOAM_SRC/OpenFOAM/include/createMesh.H

Page 42: Multi-Region Conjugate Heat/Mass Transfer

Creating Multi-Region Field Variables

• Now we need to create field variables associated with each mesh• In createFields.H:

Create “fluid” variables Create “solid” variables

Page 43: Multi-Region Conjugate Heat/Mass Transfer

Coupled Patches

• We will cover it in more detail shortly, but thepartitioned approach inherently consists of “coupledpatch pairs” :

- Coincident boundary patches, one associated with each

region

- These are solely where the solutions on each mesh are

coupled

• Since these “coupled patch pairs” will be usedextensively later on, let’s:

- Find the coupled patches and append to a list

- “Check” the coupled patches

Page 44: Multi-Region Conjugate Heat/Mass Transfer

Coupled Patches

• We will cover it in more detail shortly, but thepartitioned approach inherently consists of “coupledpatch pairs” :

- Coincident boundary patches, one associated with each

region

- These are solely where the solutions on each mesh are

coupled

• Since these “coupled patch pairs” will be usedextensively later on, let’s:

- Find the coupled patches and append to a list

- “Check” the coupled patches

Page 45: Multi-Region Conjugate Heat/Mass Transfer

Coupled Patches

• We will cover it in more detail shortly, but thepartitioned approach inherently consists of “coupledpatch pairs” :

- Coincident boundary patches, one associated with each

region

- These are solely where the solutions on each mesh are

coupled

• Since these “coupled patch pairs” will be usedextensively later on, let’s:

- Find the coupled patches and append to a list

- “Check” the coupled patches

Page 46: Multi-Region Conjugate Heat/Mass Transfer

Coupled Patches

• We will cover it in more detail shortly, but thepartitioned approach inherently consists of “coupledpatch pairs” :

- Coincident boundary patches, one associated with each

region

- These are solely where the solutions on each mesh are

coupled

• Since these “coupled patch pairs” will be usedextensively later on, let’s:

- Find the coupled patches and append to a list

- “Check” the coupled patches

Page 47: Multi-Region Conjugate Heat/Mass Transfer

Coupled Patches

• We will cover it in more detail shortly, but thepartitioned approach inherently consists of “coupledpatch pairs” :

- Coincident boundary patches, one associated with each

region

- These are solely where the solutions on each mesh are

coupled

• Since these “coupled patch pairs” will be usedextensively later on, let’s:

- Find the coupled patches and append to a list

- “Check” the coupled patches

Page 48: Multi-Region Conjugate Heat/Mass Transfer

Coupled Patches

• We will cover it in more detail shortly, but thepartitioned approach inherently consists of “coupledpatch pairs” :

- Coincident boundary patches, one associated with each

region

- These are solely where the solutions on each mesh are

coupled

• Since these “coupled patch pairs” will be usedextensively later on, let’s:

- Find the coupled patches and append to a list

- “Check” the coupled patches

Page 49: Multi-Region Conjugate Heat/Mass Transfer

Coupled Patches

• In checkCoupledPatches.H:

Page 50: Multi-Region Conjugate Heat/Mass Transfer

Coupled Patches• Also in checkCoupledPatches.H:

• Can also check coupled patch:- Neighbour patch names (specified by the user in the BCs)

- Size/spatial extent/surface area (coincident?)

- Normals/orientation

- Connectivity (if conformal meshes)

Page 51: Multi-Region Conjugate Heat/Mass Transfer

Coupled Patches• Also in checkCoupledPatches.H:

• Can also check coupled patch:- Neighbour patch names (specified by the user in the BCs)

- Size/spatial extent/surface area (coincident?)

- Normals/orientation

- Connectivity (if conformal meshes)

Page 52: Multi-Region Conjugate Heat/Mass Transfer

Coupled Patches• Also in checkCoupledPatches.H:

• Can also check coupled patch:- Neighbour patch names (specified by the user in the BCs)

- Size/spatial extent/surface area (coincident?)

- Normals/orientation

- Connectivity (if conformal meshes)

Page 53: Multi-Region Conjugate Heat/Mass Transfer

Coupled Patches• Also in checkCoupledPatches.H:

• Can also check coupled patch:- Neighbour patch names (specified by the user in the BCs)

- Size/spatial extent/surface area (coincident?)

- Normals/orientation

- Connectivity (if conformal meshes)

Page 54: Multi-Region Conjugate Heat/Mass Transfer

Coupled Patches• Also in checkCoupledPatches.H:

• Can also check coupled patch:- Neighbour patch names (specified by the user in the BCs)

- Size/spatial extent/surface area (coincident?)

- Normals/orientation

- Connectivity (if conformal meshes)

Page 55: Multi-Region Conjugate Heat/Mass Transfer

Solving Separate Governing Equations for Each Region• So far we have:

- Defined multiple meshes

- Create separate field variables associated with each mesh

- Checked/collected coupled patch information

• Now, we can solve separate governing equations in each region, whichare subject to coupled boundary conditions (to be discussed)

• In solveFluid.H (or equivalently in solveSolid.H):

Page 56: Multi-Region Conjugate Heat/Mass Transfer

Multi-Region Subiteration• Now we need to solve the governing equation in each region multiple

times to achieve a “fully-coupled” solution• Thus, at each time step we subiterate until coupled convergence is

reached• In MRconjugateHeatFoam.C :

Page 57: Multi-Region Conjugate Heat/Mass Transfer

Multi-Region Coupling via Dirichlet–Neumann Partitioning

• Multi-region coupling strategy:1 Solve fluid (Region 1) subject to the appropriate

Dirichlet boundary condition at the coupled interface:

TΓ1 = TΓ2

2 Solve solid (Region 2) subject to the appropriate

Neumann boundary condition at the coupled interface:

q”Γ1 = q”

Γ2

3 ...repeat 1-2 until converged

• This is known as “Dirichlet–Neumann partitioning”

Page 58: Multi-Region Conjugate Heat/Mass Transfer

Multi-Region Coupling via Dirichlet–Neumann Partitioning

• Multi-region coupling strategy:1 Solve fluid (Region 1) subject to the appropriate

Dirichlet boundary condition at the coupled interface:

TΓ1 = TΓ2

2 Solve solid (Region 2) subject to the appropriate

Neumann boundary condition at the coupled interface:

q”Γ1 = q”

Γ2

3 ...repeat 1-2 until converged

• This is known as “Dirichlet–Neumann partitioning”

Page 59: Multi-Region Conjugate Heat/Mass Transfer

Multi-Region Coupling via Dirichlet–Neumann Partitioning

• Multi-region coupling strategy:1 Solve fluid (Region 1) subject to the appropriate

Dirichlet boundary condition at the coupled interface:

TΓ1 = TΓ2

2 Solve solid (Region 2) subject to the appropriate

Neumann boundary condition at the coupled interface:

q”Γ1 = q”

Γ2

3 ...repeat 1-2 until converged

• This is known as “Dirichlet–Neumann partitioning”

Page 60: Multi-Region Conjugate Heat/Mass Transfer

Multi-Region Coupling via Dirichlet–Neumann Partitioning

• Multi-region coupling strategy:1 Solve fluid (Region 1) subject to the appropriate

Dirichlet boundary condition at the coupled interface:

TΓ1 = TΓ2

2 Solve solid (Region 2) subject to the appropriate

Neumann boundary condition at the coupled interface:

q”Γ1 = q”

Γ2

3 ...repeat 1-2 until converged

• This is known as “Dirichlet–Neumann partitioning”

Page 61: Multi-Region Conjugate Heat/Mass Transfer

Multi-Region Coupling via Dirichlet–Neumann Partitioning

• Multi-region coupling strategy:1 Solve fluid (Region 1) subject to the appropriate

Dirichlet boundary condition at the coupled interface:

TΓ1 = TΓ2

2 Solve solid (Region 2) subject to the appropriate

Neumann boundary condition at the coupled interface:

q”Γ1 = q”

Γ2

3 ...repeat 1-2 until converged

• This is known as “Dirichlet–Neumann partitioning”

Page 62: Multi-Region Conjugate Heat/Mass Transfer

Multi-Region Coupling via Dirichlet–Neumann Partitioning• In MRconjugateHeatFoam Dirichlet–Neumann partitioning is handled

within the provided coupledFvPatchFields boundary conditions• In regionCoupleTemperatureFvPatchScalarField the Dirichlet condition

is satisfied:

Page 63: Multi-Region Conjugate Heat/Mass Transfer

Multi-Region Coupling via Dirichlet–Neumann Partitioning• In regionCoupleHeatFluxFvPatchScalarField the Neumann condition is

satisfied:

Page 64: Multi-Region Conjugate Heat/Mass Transfer

Coupled Solution Convergence

• Finally, within the subiteration loop we must ensure that coupledsolution convergence is reached to know when to stop the subiterations

• This is accomplished in convergenceCheck.H by:1 Looping over coupled patches

2 Calculating the maximum normalized coupled patch temperature &

heat flux residuals:

3 Stop subiterations if the maximum normalized residual is less than the

user-specified converge tolerance

• That’s it! Now we have a fully-coupled multi-region solver.

Page 65: Multi-Region Conjugate Heat/Mass Transfer

Coupled Solution Convergence

• Finally, within the subiteration loop we must ensure that coupledsolution convergence is reached to know when to stop the subiterations

• This is accomplished in convergenceCheck.H by:1 Looping over coupled patches

2 Calculating the maximum normalized coupled patch temperature &

heat flux residuals:

3 Stop subiterations if the maximum normalized residual is less than the

user-specified converge tolerance

• That’s it! Now we have a fully-coupled multi-region solver.

Page 66: Multi-Region Conjugate Heat/Mass Transfer

Advanced Multi-Region Solver DevelopmentConservative flux interpolation on non-conformal multi-region meshes

• As is, MRconjugateHeatFoam utilizesinverse distance weightedinterpolation provided bypatchToPatchInterpolation for bothDirichlet (temperature) and Neumann(heat flux) boundary conditions

• This is appropriate for temperature• ....but not for heat flux (which must

be conserved) on non-conformalboundary meshes

• For accurate flux interpolation onnon-conformal meshes, a“conservative” scheme is recommended(e.g., ggiInterpolation)

Page 67: Multi-Region Conjugate Heat/Mass Transfer

Advanced Multi-Region Solver DevelopmentConservative flux interpolation on non-conformal multi-region meshes

• As is, MRconjugateHeatFoam utilizesinverse distance weightedinterpolation provided bypatchToPatchInterpolation for bothDirichlet (temperature) and Neumann(heat flux) boundary conditions

• This is appropriate for temperature• ....but not for heat flux (which must

be conserved) on non-conformalboundary meshes

• For accurate flux interpolation onnon-conformal meshes, a“conservative” scheme is recommended(e.g., ggiInterpolation)

Page 68: Multi-Region Conjugate Heat/Mass Transfer

Advanced Multi-Region Solver DevelopmentConservative flux interpolation on non-conformal multi-region meshes

• As is, MRconjugateHeatFoam utilizesinverse distance weightedinterpolation provided bypatchToPatchInterpolation for bothDirichlet (temperature) and Neumann(heat flux) boundary conditions

• This is appropriate for temperature• ....but not for heat flux (which must

be conserved) on non-conformalboundary meshes

• For accurate flux interpolation onnon-conformal meshes, a“conservative” scheme is recommended(e.g., ggiInterpolation)

Page 69: Multi-Region Conjugate Heat/Mass Transfer

Advanced Multi-Region Solver DevelopmentConservative flux interpolation on non-conformal multi-region meshes

• As is, MRconjugateHeatFoam utilizesinverse distance weightedinterpolation provided bypatchToPatchInterpolation for bothDirichlet (temperature) and Neumann(heat flux) boundary conditions

• This is appropriate for temperature• ....but not for heat flux (which must

be conserved) on non-conformalboundary meshes

• For accurate flux interpolation onnon-conformal meshes, a“conservative” scheme is recommended(e.g., ggiInterpolation)

Page 70: Multi-Region Conjugate Heat/Mass Transfer

Advanced Multi-Region Solver DevelopmentAccelerated coupled solution convergence via dynamic relaxation

• Presently, MRconjugateHeatFoam includes a static coupled solutionrelaxation factor

• Recall in regionCoupleTemperatureFvPatchScalarField.C :

• However, coupled solution convergence can be accelerated via the useof a dynamic relaxation factor (e.g., using Aitken’s ∆2 method)

• This can significantly increase coupled solution convergence rates• For example, to converge to a relative tolerance of 1x10−5:

- Static relaxation factor: 12 – 14 subiterations

- Aitken’s method: 2 – 5

Page 71: Multi-Region Conjugate Heat/Mass Transfer

Advanced Multi-Region Solver DevelopmentAccelerated coupled solution convergence via dynamic relaxation

• Presently, MRconjugateHeatFoam includes a static coupled solutionrelaxation factor

• Recall in regionCoupleTemperatureFvPatchScalarField.C :

• However, coupled solution convergence can be accelerated via the useof a dynamic relaxation factor (e.g., using Aitken’s ∆2 method)

• This can significantly increase coupled solution convergence rates• For example, to converge to a relative tolerance of 1x10−5:

- Static relaxation factor: 12 – 14 subiterations

- Aitken’s method: 2 – 5

Page 72: Multi-Region Conjugate Heat/Mass Transfer

Advanced Multi-Region Solver DevelopmentAccelerated coupled solution convergence via dynamic relaxation

• Presently, MRconjugateHeatFoam includes a static coupled solutionrelaxation factor

• Recall in regionCoupleTemperatureFvPatchScalarField.C :

• However, coupled solution convergence can be accelerated via the useof a dynamic relaxation factor (e.g., using Aitken’s ∆2 method)

• This can significantly increase coupled solution convergence rates• For example, to converge to a relative tolerance of 1x10−5:

- Static relaxation factor: 12 – 14 subiterations

- Aitken’s method: 2 – 5

Page 73: Multi-Region Conjugate Heat/Mass Transfer

Advanced Multi-Region Solver DevelopmentAccelerated coupled solution convergence via dynamic relaxation

• Presently, MRconjugateHeatFoam includes a static coupled solutionrelaxation factor

• Recall in regionCoupleTemperatureFvPatchScalarField.C :

• However, coupled solution convergence can be accelerated via the useof a dynamic relaxation factor (e.g., using Aitken’s ∆2 method)

• This can significantly increase coupled solution convergence rates• For example, to converge to a relative tolerance of 1x10−5:

- Static relaxation factor: 12 – 14 subiterations

- Aitken’s method: 2 – 5

Page 74: Multi-Region Conjugate Heat/Mass Transfer

Advanced Multi-Region Solver DevelopmentAccelerated coupled solution convergence via dynamic relaxation

• Presently, MRconjugateHeatFoam includes a static coupled solutionrelaxation factor

• Recall in regionCoupleTemperatureFvPatchScalarField.C :

• However, coupled solution convergence can be accelerated via the useof a dynamic relaxation factor (e.g., using Aitken’s ∆2 method)

• This can significantly increase coupled solution convergence rates• For example, to converge to a relative tolerance of 1x10−5:

- Static relaxation factor: 12 – 14 subiterations

- Aitken’s method: 2 – 5

Page 75: Multi-Region Conjugate Heat/Mass Transfer

Advanced Multi-Region Solver DevelopmentAccelerated coupled solution convergence via dynamic relaxation

• Presently, MRconjugateHeatFoam includes a static coupled solutionrelaxation factor

• Recall in regionCoupleTemperatureFvPatchScalarField.C :

• However, coupled solution convergence can be accelerated via the useof a dynamic relaxation factor (e.g., using Aitken’s ∆2 method)

• This can significantly increase coupled solution convergence rates• For example, to converge to a relative tolerance of 1x10−5:

- Static relaxation factor: 12 – 14 subiterations

- Aitken’s method: 2 – 5

Page 76: Multi-Region Conjugate Heat/Mass Transfer

Advanced Multi-Region UsageParallel execution of multi-region solvers

• There is one main difficulty when usingmulti-region solvers in parallel: decomposition ofcoupled patch pairs

• This is because patchToPatchInterpolation is notcurrently parallelized (to my knowledge at least)

• So, there are two ways that I know of to run inparallel:

1 Use the “simple” decomposition method to

decompose both meshes at the same coordinate

location (only works for conformal meshes)

2 Use the “globalFaceZones” option in the

decomposeParDict to preserve the coupled

patch pairs on all processors (works for

non-conformal meshes, but some of the

necessary utilities [e.g., faceSet] do not

recognize the “-region” option)

Page 77: Multi-Region Conjugate Heat/Mass Transfer

Advanced Multi-Region UsageParallel execution of multi-region solvers

• There is one main difficulty when usingmulti-region solvers in parallel: decomposition ofcoupled patch pairs

• This is because patchToPatchInterpolation is notcurrently parallelized (to my knowledge at least)

• So, there are two ways that I know of to run inparallel:

1 Use the “simple” decomposition method to

decompose both meshes at the same coordinate

location (only works for conformal meshes)

2 Use the “globalFaceZones” option in the

decomposeParDict to preserve the coupled

patch pairs on all processors (works for

non-conformal meshes, but some of the

necessary utilities [e.g., faceSet] do not

recognize the “-region” option)

Page 78: Multi-Region Conjugate Heat/Mass Transfer

Advanced Multi-Region UsageParallel execution of multi-region solvers

• There is one main difficulty when usingmulti-region solvers in parallel: decomposition ofcoupled patch pairs

• This is because patchToPatchInterpolation is notcurrently parallelized (to my knowledge at least)

• So, there are two ways that I know of to run inparallel:

1 Use the “simple” decomposition method to

decompose both meshes at the same coordinate

location (only works for conformal meshes)

2 Use the “globalFaceZones” option in the

decomposeParDict to preserve the coupled

patch pairs on all processors (works for

non-conformal meshes, but some of the

necessary utilities [e.g., faceSet] do not

recognize the “-region” option)

Page 79: Multi-Region Conjugate Heat/Mass Transfer

Advanced Multi-Region UsageParallel execution of multi-region solvers

• There is one main difficulty when usingmulti-region solvers in parallel: decomposition ofcoupled patch pairs

• This is because patchToPatchInterpolation is notcurrently parallelized (to my knowledge at least)

• So, there are two ways that I know of to run inparallel:

1 Use the “simple” decomposition method to

decompose both meshes at the same coordinate

location (only works for conformal meshes)

2 Use the “globalFaceZones” option in the

decomposeParDict to preserve the coupled

patch pairs on all processors (works for

non-conformal meshes, but some of the

necessary utilities [e.g., faceSet] do not

recognize the “-region” option)

Page 80: Multi-Region Conjugate Heat/Mass Transfer

Hands-On Training: MRconjugateHeatFoam

• Run standard tutorial case: “conjugateChannelFlow”

• Investigate the effect of the coupled solution relaxation factor- In system/coupledSolution change “coupleRelaxFactor ”- Try coupleRelaxFactor = 0.1, 0.5, 0.7, 1.0

• Run MRconjugateHeatFoam in parallel (use the decomposeMesh andrunmePar scripts)

Page 81: Multi-Region Conjugate Heat/Mass Transfer

Hands-On Training: MRconjugateHeatFoam

• Run standard tutorial case: “conjugateChannelFlow”

• Investigate the effect of the coupled solution relaxation factor- In system/coupledSolution change “coupleRelaxFactor ”- Try coupleRelaxFactor = 0.1, 0.5, 0.7, 1.0

• Run MRconjugateHeatFoam in parallel (use the decomposeMesh andrunmePar scripts)

Page 82: Multi-Region Conjugate Heat/Mass Transfer

Hands-On Training: MRconjugateHeatFoam

• Run standard tutorial case: “conjugateChannelFlow”

• Investigate the effect of the coupled solution relaxation factor- In system/coupledSolution change “coupleRelaxFactor ”- Try coupleRelaxFactor = 0.1, 0.5, 0.7, 1.0

• Run MRconjugateHeatFoam in parallel (use the decomposeMesh andrunmePar scripts)

Page 83: Multi-Region Conjugate Heat/Mass Transfer

Hands-On Training: MRconjugateHeatFoam

• Run standard tutorial case: “conjugateChannelFlow”

• Investigate the effect of the coupled solution relaxation factor- In system/coupledSolution change “coupleRelaxFactor ”- Try coupleRelaxFactor = 0.1, 0.5, 0.7, 1.0

• Run MRconjugateHeatFoam in parallel (use the decomposeMesh andrunmePar scripts)

Page 84: Multi-Region Conjugate Heat/Mass Transfer

Hands-On Training: MRconjugateHeatFoam

• Run standard tutorial case: “conjugateChannelFlow”

• Investigate the effect of the coupled solution relaxation factor- In system/coupledSolution change “coupleRelaxFactor ”- Try coupleRelaxFactor = 0.1, 0.5, 0.7, 1.0

• Run MRconjugateHeatFoam in parallel (use the decomposeMesh andrunmePar scripts)