. . . . . . . . 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 . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . 2 • 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
. Application: block coupled . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . On coupled problems . Summary and future outlook incompressible flow solver Background . Field coupling reactors Application: multiphysics in nuclear OpenFOAM Background Region coupling On coupled problems On coupled problems 3
. . . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . On coupled problems . . How to solve the coupling of the fields/equations/regions? 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.
. Application: block coupled . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . Region coupling . Summary and future outlook incompressible flow solver Background . Field coupling reactors Application: multiphysics in nuclear OpenFOAM Background Region coupling On coupled problems Region coupling 5
. of region by region . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . Region coupling — Background . Figure: conjugateCavity , dual region simulation regions at once . 6 Background . . • Characteristic: • Multiple materials (solid/fluid) • Similar physics in many regions ( T ) • Coupled boundaries • Solution methods: • Segregated solver - Iterative solution • Coupled solver - Solve multiple Coupled boundary Region 1 Region 2 Region 1+2
. ) ; ( 1 , new fvScalarMatrix ( Tsolid ) ) TEqns . solve ( ) ; equation Energy equation in conjugateHeatFoam . . Region coupling — OpenFOAM . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . TEqns . set // Add s o l i d . ) ; . . Regional coupling in OpenFOAM I coupledFvScalarMatrix TEqns (2 ); // Add f l u i d equation TEqns . set ( 0 , new fvScalarMatrix ( fvm : : ddt ( T ) + fvm : : div ( phi , T ) ) 7 • Regional coupling availble through coupleFvMatrix . − fvm : : laplacian ( DT , T ) fvm : : ddt ( Tsolid ) − fvm : : laplacian ( DTsolid ,
. . . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . Region coupling — OpenFOAM . solver”. MA thesis. Chalmers University of Technology, 2012 Additional sources: foamToVTK , sample , decomposePar , reconstructPar ) Regional coupling in OpenFOAM II . . 8 • regionCouple boundary condition at coupled patches • Existing solvers CG , BiCGStab , BiCG , smoothSolver • Parallelizable • Utilities (mostly) compatible with multiple regions ( splitMesh , • 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
. . . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . Region coupling — Application: multiphysics in nuclear reactors . 9 . . Application: multiphysics in nuclear reactors Nuclear reactor cores: multiphysics environment Flow Neutron W a t e r d e n s i t y properties density field Fuel temperature Fuel temperature Water temperature Power Fuel properties
. . . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . Region coupling — Application: multiphysics in nuclear reactors . . Figure: Slice of nuclear fuel pin 10 regions) (same model equation all fluid: convection) materials solid and fluid, different types of • Multi-region environment : Both • Fields in all regions : • Temperature (solid: conduction, Fuel Coolant Gap • Multi-group neutron density field Cladding
. solver”. MA thesis. Chalmers University of Technology, 2012 . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . Region coupling — Application: multiphysics in nuclear reactors . . 11 . Details: OpenFOAM implementation . . • Implemented using OpenFOAM 1.6-ext. • Region coupling for an arbitrary number of pins • Segregated solver considering field dependencies • K. Jareteg. “Development of an integrated deterministic neutronic/thermalhydraulic model using a CFD • K. Jareteg. Klas Jareteg, PhD Student, Personal web page . 2012. url : klas.nephy.chalmers.se
. . . . 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
. Application: block coupled . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . Field coupling . Summary and future outlook incompressible flow solver Background . Field coupling reactors Application: multiphysics in nuclear OpenFOAM Background Region coupling On coupled problems Field coupling 13
. Solve one field at a time. Explicit . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . Field coupling — Background . Figure: bubbleColumn at once. Implicit coupling. coupling. 14 Coupling 2: Field coupling . . . • Characteristic: • Multiple fields ( α, U g , U l , p ) • Couplings between fields • Same mesh (typically) • Field dependent parameters • Solution methods: • Segregated solver - Iterative solution. • Coupled solver - Solve all/multiple fields
. . . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . Field coupling — Application: block coupled incompressible flow solver . . two or more immiscible fluids . June 2010 Solution, Coupled Matrices . June 2010 Additional sources: BlockLduMatrix (2) (1) Application block coupled incompressible flow solver . . 15 • Incompressible steady-state Navier-Stokes: ∇ · ( U ) = 0 ∇ · ( UU ) − ∇ ( ν ∇ U ) = − 1 ρ ∇ p • Traditionally segragated solvers (OpenFOAM simpleFoam ) • Often slow convergence, pressure equation elliptic behaviour • Possible remedy: coupled calculation using OpenFOAM 1.6-ext: • Henrik Rusche and Hrvoje Jasak. Implicit solution techniques for coupled multi-field problems – Block • Julia Springer et al. A coupled pressure based solution algorithm based on the Volume-of-Fluid approach for • Ivor Clifford. Block-Coupled Simulations Using OpenFOAM . June 2011
. (3) . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . Field coupling — Application: block coupled incompressible flow solver . incompressible and compressible flows . June 2010 flows on unstructured grids”. In: Journal of Computational Physics 228 (2009), pp. 180–201 Additional sources: (4) P f S f faces . faces 16 . . Theory explicit use of velocity (from momentum predictor step) faces • SIMPLE algorithm: pressure equation from the continuity equation, • Alternative approach: Rhie-Chow interpolation: ∑ [ ( )] · S f = 0 U f − D f ∇ P f − ∇ P f ∑ ∑ [ UU − ν ∇ U ] f · S f = − • M. Darwish, I. Sraj, and F. Moukalled. “A coupled finite volume solver for the solution of incompressible • L. Mangani and C. Bianchini. A coupled finite volume solver for the solution of laminar/turbulent • F. Peng Kärrholm. “Rhie-Chow interpolation in OpenFOAM”. 2006
. faces t r i a n g l e c o e f f i c i e n t s . BlockLduMatrix.H term in the continuity and momentum equations (Eqs. (3) and (3)) faces faces CoeffField < Type >* upperPtr_ ; P f S f . . Field coupling — Application: block coupled incompressible flow solver . Klas Jareteg, Gotheburg Region OpenFOAM User Group Meeting . // CoeffField < Type > * lowerPtr_ ; symmetric matrix CoeffField < Type >* diagPtr_ ; . . OpenFOAM implementation I // c o e f f i c i e n t s for 17 Also used c o e f f i c i e n t s . // t r i a n g l e • Implemented using OpenFOAM-1.6-ext • Block matrix class: BlockLduMatrix • Templated matrix class. Elements of arbitrary size: − Diagonal − Upper − Lower • In this case: manual assembling of matrix coefficients and source for each ∑ [ ( )] · S f = 0 U f − D f ∇ P f − ∇ P f ∑ ∑ [ UU − ν ∇ U ] f · S f = −
. velocity u v w p i (6) Description of 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 . (5) 18 . . OpenFOAM implementation II • For 3D solver: A x = f • Matrix element: 0 0 a u , u a p , u 0 0 a i , j = a v , v a p , v 0 0 a w , w a p , w a u , p a v , p a w , p a p , p i , j • Solution vector: x i = • Off-diagonal coefficients giving the implicit coupling between pressure and • New solvers implemented ( GMRES , BiCGStab , CG ) • K. Jareteg. “Block coupled calculations in OpenFOAM: A coupled incompressible flow solver”. Project work
Recommend
More recommend