. . . . Coupled calculations in OpenFOAM - Multiphysics - - PowerPoint PPT Presentation

coupled calculations in openfoam multiphysics handling
SMART_READER_LITE
LIVE PREVIEW

. . . . Coupled calculations in OpenFOAM - Multiphysics - - PowerPoint PPT Presentation

. . . . . . . . Coupled calculations in OpenFOAM - Multiphysics handling, structures and solvers, Gothenburg Region OpenFOAM User Group Meeting Klas Jareteg Chalmers University of Technology November 14, 2012 . . . . Outline .


slide-1
SLIDE 1

. .

.

.

.

.

.

.

Coupled calculations in OpenFOAM -

Multiphysics handling, structures and solvers, Gothenburg Region OpenFOAM User Group Meeting Klas Jareteg

Chalmers University of Technology

November 14, 2012

slide-2
SLIDE 2

.

.

.

.

Outline

  • Region coupling and block coupling
  • Overview of coupled formats in OpenFOAM
  • Application 1: Multiphysics simulations for nuclear reactors
  • Application 2: Block coupled solver for incompressible flow
  • Summary and future outlook

. Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 2

slide-3
SLIDE 3

.

.

On coupled problems

On coupled problems Region coupling Background OpenFOAM Application: multiphysics in nuclear reactors Field coupling Background Application: block coupled incompressible flow solver Summary and future outlook

. On coupled problems . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 3

slide-4
SLIDE 4

.

.

.

.

Coupled problems

  • Multiple field problems and/or equations problems, e.g.:
  • Navier-Stokes
  • Conjugate heat-transfer
  • Nuclear reactor modeling
  • Multi-group radiation
  • Multiphase modeling
  • Not enough to solve one problem.

How to solve the coupling of the fields/equations/regions?

. . On coupled problems . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 4

slide-5
SLIDE 5

.

.

Region coupling

On coupled problems Region coupling Background OpenFOAM Application: multiphysics in nuclear reactors Field coupling Background Application: block coupled incompressible flow solver Summary and future outlook

. Region coupling . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 5

slide-6
SLIDE 6

.

.

.

.

Background

  • Characteristic:
  • Multiple materials (solid/fluid)
  • Similar physics in many regions (T)
  • Coupled boundaries
  • Solution methods:
  • Segregated solver - Iterative solution
  • f region by region
  • Coupled solver - Solve multiple

regions at once

Figure: conjugateCavity, dual region simulation

Region 1 Region 2

Coupled boundary

Region 1+2 . Region coupling — Background . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 6

slide-7
SLIDE 7

.

.

.

.

Regional coupling in OpenFOAM I

  • Regional coupling availble through coupleFvMatrix.

coupledFvScalarMatrix TEqns (2 ); // Add f l u i d equation TEqns . set ( 0 , new fvScalarMatrix ( fvm : : ddt(T) + fvm : : div(phi , T) − fvm : : laplacian (DT , T) ) ) ; // Add s o l i d equation TEqns . set ( 1 , new fvScalarMatrix ( fvm : : ddt( Tsolid ) − fvm : : laplacian (DTsolid , Tsolid ) ) ) ; TEqns . solve ( ) ;

Energy equation in conjugateHeatFoam

. . Region coupling — OpenFOAM . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 7

slide-8
SLIDE 8

.

.

.

.

Regional coupling in OpenFOAM II

  • regionCouple boundary condition at coupled patches
  • Existing solvers CG, BiCGStab, BiCG, smoothSolver
  • Parallelizable
  • Utilities (mostly) compatible with multiple regions (splitMesh,

foamToVTK, sample, decomposePar, reconstructPar)

Additional sources:

  • H. Jasak. “Coupled Multiphysics with OpenFOAM Inter-Region and Inter-Equation Coupling”
  • K. Jareteg. “Development of an integrated deterministic neutronic/thermalhydraulic model using a CFD

solver”. MA thesis. Chalmers University of Technology, 2012

. Region coupling — OpenFOAM . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 8

slide-9
SLIDE 9

.

.

.

.

Application: multiphysics in nuclear reactors

Nuclear reactor cores: multiphysics environment

Fuel properties Neutron density field Flow properties

Power Fuel temperature Fuel temperature W a t e r d e n s i t y Water temperature . Region coupling — Application: multiphysics in nuclear reactors . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 9

slide-10
SLIDE 10

.

.
  • Multi-region environment: Both

solid and fluid, different types of materials

  • Fields in all regions:
  • Temperature (solid: conduction,

fluid: convection)

  • Multi-group neutron density field

(same model equation all regions)

Fuel Gap Coolant Cladding Figure: Slice of nuclear fuel pin

. . Region coupling — Application: multiphysics in nuclear reactors . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 10

slide-11
SLIDE 11

.

.

.

.

OpenFOAM implementation

  • Implemented using OpenFOAM 1.6-ext.
  • Region coupling for an arbitrary number of pins
  • Segregated solver considering field dependencies

Details:

  • K. Jareteg. “Development of an integrated deterministic neutronic/thermalhydraulic model using a CFD

solver”. MA thesis. Chalmers University of Technology, 2012

  • K. Jareteg. Klas Jareteg, PhD Student, Personal web page. 2012. url: klas.nephy.chalmers.se

. . Region coupling — Application: multiphysics in nuclear reactors . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 11

slide-12
SLIDE 12

.

.

.

.

Example results

(a) All regions (b) Moderator only

Figure: Radial temperature profiles.

. . Region coupling — Application: multiphysics in nuclear reactors . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 12

slide-13
SLIDE 13

.

.

Field coupling

On coupled problems Region coupling Background OpenFOAM Application: multiphysics in nuclear reactors Field coupling Background Application: block coupled incompressible flow solver Summary and future outlook

. Field coupling . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 13

slide-14
SLIDE 14

.

.

.

.

Coupling 2: Field coupling

  • Characteristic:
  • Multiple fields (α, Ug, Ul, p)
  • Couplings between fields
  • Same mesh (typically)
  • Field dependent parameters
  • Solution methods:
  • Segregated solver - Iterative solution.

Solve one field at a time. Explicit coupling.

  • Coupled solver - Solve all/multiple fields

at once. Implicit coupling.

Figure: bubbleColumn

. Field coupling — Background . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 14

slide-15
SLIDE 15

.

.

.

.

Application block coupled incompressible flow solver

  • Incompressible steady-state Navier-Stokes:

∇ · (U) = 0 (1) ∇ · (UU) − ∇(ν∇U) = −1 ρ∇p (2)

  • Traditionally segragated solvers (OpenFOAM simpleFoam)
  • Often slow convergence, pressure equation elliptic behaviour
  • Possible remedy: coupled calculation using OpenFOAM 1.6-ext:

BlockLduMatrix

Additional sources:

  • Henrik Rusche and Hrvoje Jasak. Implicit solution techniques for coupled multi-field problems – Block

Solution, Coupled Matrices. June 2010

  • Julia Springer et al. A coupled pressure based solution algorithm based on the Volume-of-Fluid approach for

two or more immiscible fluids. June 2010

  • Ivor Clifford. Block-Coupled Simulations Using OpenFOAM. June 2011

. . Field coupling — Application: block coupled incompressible flow solver . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 15

slide-16
SLIDE 16

.

.

.

.

Theory

  • SIMPLE algorithm: pressure equation from the continuity equation,

explicit use of velocity (from momentum predictor step)

  • Alternative approach: Rhie-Chow interpolation:

faces

[ Uf − Df ( ∇Pf − ∇Pf )] · Sf = 0 (3) ∑

faces

[UU − ν∇U]f · Sf = − ∑

faces

PfSf (4)

Additional sources:

  • M. Darwish, I. Sraj, and F. Moukalled. “A coupled finite volume solver for the solution of incompressible

flows on unstructured grids”. In: Journal of Computational Physics 228 (2009), pp. 180–201

  • L. Mangani and C. Bianchini. A coupled finite volume solver for the solution of laminar/turbulent

incompressible and compressible flows. June 2010

  • F. Peng Kärrholm. “Rhie-Chow interpolation in OpenFOAM”. 2006

. Field coupling — Application: block coupled incompressible flow solver . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 16

slide-17
SLIDE 17

.

.

.

.

OpenFOAM implementation I

  • Implemented using OpenFOAM-1.6-ext
  • Block matrix class: BlockLduMatrix
  • Templated matrix class. Elements of arbitrary size:

// − Diagonal c o e f f i c i e n t s CoeffField<Type>* diagPtr_ ; // − Upper t r i a n g l e c o e f f i c i e n t s . Also used for symmetric matrix CoeffField<Type>* upperPtr_ ; // − Lower t r i a n g l e c o e f f i c i e n t s CoeffField<Type> *lowerPtr_ ;

BlockLduMatrix.H

  • In this case: manual assembling of matrix coefficients and source for each

term in the continuity and momentum equations (Eqs. (3) and (3)) ∑

faces

[ Uf − Df ( ∇Pf − ∇Pf )] · Sf = 0 ∑

faces

[UU − ν∇U]f · Sf = − ∑

faces

PfSf

. . Field coupling — Application: block coupled incompressible flow solver . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 17

slide-18
SLIDE 18

.

.

.

.

OpenFOAM implementation II

  • For 3D solver: Ax = f
  • Matrix element:

ai,j =    au,u ap,u av,v ap,v aw,w ap,w au,p av,p aw,p ap,p   

i,j

(5)

  • Solution vector:

xi =    u v w p   

i

(6)

  • Off-diagonal coefficients giving the implicit coupling between pressure and

velocity

  • New solvers implemented (GMRES, BiCGStab, CG)

Description of work:

  • K. Jareteg. “Block coupled calculations in OpenFOAM: A coupled incompressible flow solver”. Project work

within: CFD with OpenSource software, 2012, Chalmers. Oct. 2012

. . Field coupling — Application: block coupled incompressible flow solver . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 18

slide-19
SLIDE 19

.

.

.

.

Case study pitzDailyFoam

  • New solver benchmarked against simpleFoam using the standard

pitzDailyFoam.

  • Convergence profile (non-turbulent case):

200 400 600 800 1000 Iteration 10

  • 10

10

  • 9

10

  • 8

10

  • 7

10

  • 6

10

  • 5

10

  • 4

10

  • 3

10

  • 2

10

  • 1

10 Residuals

(- simpleFoam, -- pUCoupledFoam) Velocity (x) Pressure

(a) Iterations

5 10 15 20 25 30 35 40 ['Elapsed time [s]'] 10

  • 10

10

  • 9

10

  • 8

10

  • 7

10

  • 6

10

  • 5

10

  • 4

10

  • 3

10

  • 2

10

  • 1

10 Residuals

(- simpleFoam, -- pUCoupledFoam) Velocity (x) Pressure

(b) Elapsed time

Figure: Comparison of convergence for simpleFoam and pUCoupledFoam. Laminar case.

. . Field coupling — Application: block coupled incompressible flow solver . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 19

slide-20
SLIDE 20

.

.
  • Convergence profile (turbulent case):

200 400 600 800 1000 Iteration 10

  • 10

10

  • 9

10

  • 8

10

  • 7

10

  • 6

10

  • 5

10

  • 4

10

  • 3

10

  • 2

10

  • 1

10 Residuals

(- simpleFoam, -- pUCoupledFoam) Turbulent energy Velocity (x) Pressure

(a) Iterations

10 20 30 40 50 60 70 80 90 ['Elapsed time [s]'] 10

  • 10

10

  • 9

10

  • 8

10

  • 7

10

  • 6

10

  • 5

10

  • 4

10

  • 3

10

  • 2

10

  • 1

10 Residuals

(- simpleFoam, -- pUCoupledFoam) Turbulent energy Velocity (x) Pressure

(b) Elapsed time

Figure: Comparison of convergence for simpleFoam and pUCoupledFoam. Turbulent case.

. . Field coupling — Application: block coupled incompressible flow solver . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 20

slide-21
SLIDE 21

.

.

Summary and future

  • utlook

On coupled problems Region coupling Background OpenFOAM Application: multiphysics in nuclear reactors Field coupling Background Application: block coupled incompressible flow solver Summary and future outlook

. Summary and future outlook . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 21

slide-22
SLIDE 22

.

.

.

.

Summary and future outlook

Summary:

  • Great possibilities
  • Successful parallelized multiphysics simulations of nuclear reactor cores
  • Faster convergence for incompressible flow simulations

Future developments:

  • Multi-grid methods for region and block coupling?
  • Combining region and block coupling?
  • ....

Community needs:

  • Documentation
  • Examples (e.g. parallelization of region coupling)
  • Tutorials

. Summary and future outlook . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 22

slide-23
SLIDE 23

.

.

Thank you! Questions?

Contact information: Klas Jareteg klas.jareteg@chalmers.se http://klas.nephy.chalmers.se

. . Summary and future outlook . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 23