원시데이터 수집 시스템
선정목록으로

multiRegionFoam: A Unified Multiphysics Framework for Multi-Region Coupled Continuum-Physical Problems

간접 관련 수소연료전지 · (7) MEA(막전극접합체) (5) 연료전지용 수분제어장치(가습기)(6) PEM(고분자전해질막)

기본 정보

저자
  1. Alkafri, Heba
  2. Habes, Constantin
  3. Elwardi Fadeli, Mohammed
  4. Hess, Steffen
  5. Beale, Steven B.
  6. Zhang Shi-dong
  7. Jasak, Hrvoje
  8. Marschall Holger
DOI
10.26083/tuprints-00030608
저널
TUbilio (Technical University of Darmstadt)
발행년도
2025
발행기관
Technical University of Darmstadt
피인용수
0
라이선스
0
논문 유형
–
언어
–
원문 페이지
http://tubiblio.ulb.tu-darmstadt.de/view/person/Alkafri=3AHeba=3A=3A.html>
토픽
Heat and Mass Transfer in Porous Media
OpenAlex ID
W6889698691

평가 내용

관련도
간접 관련
사업분야
수소연료전지 · (7) MEA(막전극접합체)
부 분야
(5) 연료전지용 수분제어장치(가습기), (6) PEM(고분자전해질막)
R&D 측면
분석·모델링
확신도
0.80
근거 용어
multiphysics, multi-region coupling, fuel-cells, OpenFOAM, interface coupling
판단 근거
이 논문은 OpenFOAM 기반의 다중 물리(multiphysics) 및 다중 영역 결합(multi-region coupling) 시뮬레이션 프레임워크를 다루며, 연료전지(fuel cells)를 주요 응용 사례 중 하나로 명시하고 있습니다.
R&D 활용 포인트
PEMFC의 막(membrane), 전극(electrode), 가스확산층(GDL) 간의 복합적인 열 및 물질 전달 현상을 수치 해석적으로 모델링하고 성능을 예측하는 데 활용 가능합니다.
평가 입력
본문 110,462자 중 30,032자 발췌

초록

초록이 없습니다.

본문 110,462자

본문 펼치기
## multiRegionFoam – A Unified Multiphysics Framework for Multi-Region Coupled Continuum-Physical Problems Heba Alkafri <sup>a</sup>, Constantin Habes <sup>a,</sup> <sup>_∗_</sup>, Mohammed Elwardi Fadeli <sup>a</sup>, Steffen Hess <sup>b</sup>, Steven B. Beale <sup>b,c</sup>, Shidong Zhang <sup>b</sup>, Hrvoje Jasak <sup>d</sup>, Holger Marschall <sup>a,</sup> <sup>_∗∗_</sup> _aTechnische_ _Universität_ _Darmstadt,_ _Department_ _of_ _Mathematics,_ _Computational_ _Multiphase_ _Flow,_ _64287_ _Darmstadt,_ _Germany_ _bForschungszentrum_ _Jülich_ _GmbH,_ _Institute_ _of_ _Energy_ _and_ _Climate_ _Research_ _(IEK-9,_ _IEK-13,_ _IEK-14),_ _52428_ _Jülich,_ _Germany_ _cQueen’s_ _University,_ _Department_ _of_ _Mechanical_ _and_ _Materials_ _Engineering,_ _Kingston_ _K7L_ _3N6,_ _Ontario,_ _Canada_ _dThe_ _Cavendish_ _Laboratory,_ _Department_ _of_ _Physics,_ _University_ _of_ _Cambridge,_ _United_ _Kingdom_ Abstract This paper presents a unified framework, called multiRegionFoam, for solving multiphysics problems of the multi-region coupling type within OpenFOAM (FOAM-extend). It is intended to supersede the existing solver with the same name. The design of the new framework is modular, allowing users to assemble a multiphysics problem region-by-region and coupling conditions interface-by-interface. The present approach allows users to choose between deploying either monolithic or partitioned interface coupling for each individual transport equation. The formulation of boundary conditions is generalised in the sense that their implementation is based on the mathematical jump/transmission conditions in the most general form for tensors of any rank. The present contribution focuses on the underlying mathematical model for these types of multiphysics problems, as well as on the software design and resulting code structure that enable a flexible and modular approach. Finally, deployment for different multi-region coupling cases is demonstrated, including conjugate heat, multiphase flows and fuel-cells. Source code repository: `[https://bitbucket.org/hmarschall/multiregionfoam/](https://bitbucket.org/hmarschall/multiregionfoam/)` _Keywords:_ multiphysics, interface coupling, multi-region problems, OpenFOAM 1. Introduction Interface-coupled multi-region problems like fluid-structure interactions, conjugate heat & mass transfer or multiphase flow problems represent a subgroup of multiphysics problems of high relevance in engineering. Analysis of the underlying continuum-physical models reveals inherent structural similarities, which can be exploited in software design and method development to devise a unified computational multiphysics framework for multiregion coupled continuum-physical problems over a broad spectrum of applications. We have developed a novel unified solver framework for computational multiphysics of multi-region coupling type, i.e. transport processes coupled across region boundaries/interfaces. The code design is such that a multiphysics problem can be assembled region-by-region, and the coupling conditions interface-by-interface. Both monolithic and partitioned coupling for each individual transport equation can be applied as desired by the user. Fluid flow problems are dealt with using SIMPLE, PISO and PIMPLE pressure-velocity algorithms - with loops of predictor and corrector steps across regions. The code is implemented as a C++ library in OpenFOAM (FOAM-extend) for computational continuum physics [1] and follows the principles of objectoriented programming. We incorporate user-defined types of regions representing sub-domains of specific physics i.e. a set of transport equations. Such a region type should govern a meaningful subset of physics specific to the region - such as e.g. fluid flow, solid mechanics, species and/or energy transport - and can be combined with others. This results into a modular concept and allows to assemble a multiphysics problem region-by-region. The coupling and communication between regions is realised in a modular fashion where interface-specific physics as well as interpolation/mapping methods are accessible in boundary conditions. The implementation is readily parallelised for large scale computations in domain decomposition mode for runs on distributed-memory parallel computer architectures. _∗_ Corresponding author, Email: constantin.habes@tu-darmstadt.de _∗∗_ Corresponding author, Email: holger.marschall@tu-darmstadt.de _Literature_ _Survey_ There are numerous open-source solutions to cope with multi-region coupled problems. However, the majority of codes are dedicated to specific problems, and thus are following a domain-driven design. In consequence, they cannot be easily adapted to other multi-region coupling problems. Available proprietary simulation codes, on the other-hand-side, often do provide platforms to solve for a broad range of multi-region coupling problems. However, being proprietary the source-codes are non-accessible to the community with the consequence of limited flexibility and/or extensibility, particularly when it comes to very specific engineering applications in technology niches. To alleviate these limitations, (mostly) open-source multi-code coupling approaches have been devised. Examples are the `ADVENTURE_Coupler` (ADVanced ENgineering analysis Tool for Ultra large REal world) [2], `MpCCI` (Mesh-based parallel Code Coupling Interface) [3, 4], `OpenPALM` (Projet d’Assimilation par Logiciel Multimethodes) [5, 6], the `OASIS` coupler [7, 8], `PIKE` (Physics Integration KErnerls) [9] as a part of the Trilinos library [10], and `preCICE` [11, 12]. With these coupling software packages, multiple distinct simulations codes are coupled in a co-simulation run - each with an own specialisation coping with the physics in one specific region of the multi-region domain. Note that such code-to-code coupling frameworks for cosimulations are particularly not within the scope of this work, since they inherently only provide partitioned coupling strategies and thus suffer from stability and/or efficiency issues when it comes to challenging, e.g. numerically stiff, coupling problems. In what follows, we attempt to provide a comprehensive yet concise overview over available open-source multiregion coupling software in the literature, highlighting their coverage of applications. Alya [13, 14] is a Fortran and C based code developed at Barcelona Supercomputing Center, Spain. It solves coupled multiphysics problems using high performance computing techniques for distributed and shared memory supercomputers. The simulations involve the solution of partial differential equations in an unstructured mesh using finite element methods. Indeed it provides region coupling in a single code environment as well as partitioned multi-code coupling using existing code. Examples of implementation for fluid-structure interaction (FSI) and cojugate heat transfer (CHT) problems, among other applications, are found in [15] and [13]. code_saturne [16] is developed primarily by Électricité de France R&D (EDF) for computational fluid dy namics (CFD) applications. It is written in C and Fortran and relies on finite volume discretisation. It can be coupled with other codes, using its Parallel and Locator Exchange library (PLE) [17], for instance, with SYRTHES [18], a code for transient thermal simulations in solids, to model CHT problems [19]. It also has a module for arbitrary Lagrangian Eulerian (ALE) interface tracking in the frame of fluid-structure interaction [20]. deal.II [21] is a C++ library intended to serve as an interface to the complex data structures and algorithms required for solving partial differential equations using adaptive finite element methods. It is deployed in multiphysics simulations for various applications including FSI in ALE formulation [22], and numerous others [23]. FEniCS [24] is a python and C++ based code dedicated to solving partial differential equations arising in scientific models using the finite element method. It is often integrated with other platforms as it does not have a built in multi-physics solver. Example of usage include the FEniCS-FEATool solver [25], the coupling of FEniCS with OpenFOAM through the multiscale universal interface MUI [26], as well as the combination of FEnics with HAZmath [27] where the `cbc.block` extension is used that enables the assembly and the solution of block-partitioned problems. MOOSE stands for Multiphysics Object-Oriented Simulation Environment [28]. It is an open-source C++ based code developed at the Idaho National Laboratory, enabling parallel multiphysics simulation. It uses a finite element framework and supports segregated and fully implicit volumetric coupling as well as partitioned interface coupling. Fluid dynamics, heat transfer, and fluid–structure interaction are some of the applications where MOOSE is used [29, 30]. OpenFOAM [1] (Open Field Operation And Manipulation) is an open-source C++ library for computa tional continuum physics (CCP) including computational fluid dynamics (CFD) based on the finite volume method (FVM) with support for dynamic meshes of general topology (unstructured meshes). Within OpenFOAM, numerous application-specific multi-region frameworks are available mostly from its active developer community. For instance, `solids4foam` [31] has been developed for FSI simulations, `openFuelCell` [32] for modelling fuel cells, `chtMultiRegionFoam` [33] for CHT problems. Note that besides the above application-specific solutions to interface-coupled multiphysics, OpenFOAM (OpenFOAM-dev) has undergone refactoring towards a "new modular solver framework" [34], in which so-called solver modules can be selected for coupled multi-region simulations. However, with only one solver module selectable for each region, the resulting framework forces the user to develop modules covering the full set of physics in a region. This hinders flexibility and introduces unnecessary complexity. Moreover, interfacial physics has not been modularised and generalised at all. Both aspects have been subject to the present work. Yales2 [35] aims at solving two-phase combustion from primary atomization to pollutant prediction on massive complex meshes. It is developed at CORIA-CFD using C++ and Fortran. It uses a finite volume solver for multiphysics problems in fluid dynamics, with support for ALE within FSI context [36] in addition to the possibility for multi-code coupling, such as for CHT applications [37] through the OpenPALM library [38]. While the focus here is on open-source, there are also various proprietary software packages developed for similar purposes, such as COMSOL Multiphysics [39], FEATool [40], Fluent [41], and LS-DYNA [42]. _Aim_ _&_ _Objective_ This contribution aims to provide a unified and versatile framework to cope with multiphysics problems of multi-region coupling type in OpenFOAM. Particular emphasis is put on - freedom in the choice of coupling strategies - i.e. monolithic and partitioned coupling is at the choice of the user for each individual transport equation, - ease and flexibility in assembling multiphysics problems - by means of use-defined region types, which also can be superimposed, leading to a multiphysics setup that can be assembled in a modular fashion, - support of established predictor-corrector based solution algorithms – e.g. to support pressure-velocity, or magnetohydrodynamics in fluid flow across regions, - strict physics-driven design which allows to clearly separate material models from balance equations - by rigorously exploiting the common mathematical structure of transport equations _and_ interface jump and transmission (flux) conditions. With this, it is hoped to enable substantial coverage over a spectrum of different multiphysics problems of multi-region coupling type, and to leverage significant synergies among different, so far disjoint domain-expert communities, such that improvements and fixes from one community directly can benefit others. In the remainder, detailed information on the generic mathematical formulation of the sharp-interface model is given (Section 2) which is exploited at the software design stage in the code structure to arrive at a unified multiphysics framework (Section 5). Eventually, its deployment for different multi-region coupling cases is demonstrated (Section 7). 2. Generic sharp interface model We aim to provide a concise self-contained derivation of the sharp interface model in its generic formulation as it emerges from balance considerations of conserved quantities. The mathematical procedure will also yield the well-known general transport equation introduced by Spalding in [43]. Thus, the following can also be seen as its extension to general transport equations in multiple domains coupled across sharp interfaces separating the domains. For this, we shall closely follow [44–47]. Starting point of this derivation is a conservation equation in its generic form, _<u>D</u>_ <u>Φ</u> _Dt_ <sup>=</sup> <sup>_J_</sup> <sup>+</sup> <sup>_S,_</sup> (1) with the left hand side of (1) being the material derivative of an extensive quantity Φ (e.g. mass, momentum, energy), _J_ denoting the flux term and _S_ being sources/sinks of Φ. We assume this generic conservation equation to be valid in a material control volume _V_ ( _t_ ) = Ω <sup>+</sup> ( _t_ ) _∪_ Ω <sup>_−_</sup> ( _t_ ), being composed out of two subdomains Ω <sup>+</sup> and Ω <sup>_−_</sup> (see Fig. 1). The two subdomains are separated by a deformable sharp interface Σ( _t_ ) = _∂_ Ω <sup>+</sup> ( _t_ ) _∩_ _∂_ Ω <sup>_−_</sup> ( _t_ ) which leads to the fact that V(t) is bounded by _∂V_ ( _t_ ) = _∂V_ <sup>+</sup> ( _t_ ) _∪∂V_ <sup>_−_</sup> ( _t_ ) _∪∂_ Σ( _t_ ), where _∂V_ <sup>_±_</sup> ( _t_ ) = _∂_ Ω <sup>_±_</sup> ( _t_ ) _\_ Σ( _t_ ). Furthermore, we define that the interface normal _n_ Σ always points from Ω <sup>_−_</sup> to Ω <sup>+</sup> and the interface edge normal points out of Σ. The sharp interface Σ( _t_ ) considered here can be seen as a simplification of a transition layer of finite thickness between adjacent domains with different physical properties. Therefore, the interface is not necessarily massless and can store conserved quantities which are accounted for in the following by the appearance of so-called surface excess quantities [44]. Thus, the extensive quantity can be written as a volume integral, Φ = _V_ ( _t_ ) _ρϕ_ d _x_ + Σ( _t_ ) _ρ_ <sup>Σ</sup> _ϕ_ <sup>Σ</sup> d _x_ _,_ (2) _n_ Ω <sup>+</sup> _n_ Σ Σ _n_ _∂_ Σ Ω <sup>_−_</sup> _∂V_ <sup>+</sup> _∂_ Σ _∂V_ <sup>_−_</sup> Figure 1: Material volume _V_ with two subdomains Ω <sup>+</sup> and Ω <sup>_−_</sup> separated by a sharp interface Σ where _ρ_ is the mass density in Ω <sup>_±_</sup>, _ϕ_ is the mass density-related volume specific density of the extensive quantity in the bulk and _ρ_ <sup>Σ</sup> and _ϕ_ <sup>Σ</sup> are their respective area specific excess quantities defined on the interface [45]. The flux term can be expressed through _∂_ Σ( _t_ ) _J_ = _−_ _∂V_ ( _t_ ) _j_ _·_ _n_ d _s −_ (3) _j_ <sup>Σ</sup> _·_ _n_ _∂_ Σd _l,_ with the first integral being a surface integral over the bulk flux density _j_ across the boundary of _V_ ( _t_ ) and the second integral being a line integral over the interface flux density _j_ <sup>Σ</sup> across the interface boundary. A similar expression as (2) can be formulated for the source/sink term _S_ = _V_ ( _t_ ) _s_ d _x_ + Σ( _t_ ) _s_ <sup>Σ</sup> d _s ._ (4) Here _s_ is the source/sink density field in the bulk and _s_ <sup>Σ</sup> is its respective counterpart on the interface. Inserting (2), (3) and (4) into (1) gives _<u>D</u>_ _Dt_ _V_ ( _t_ ) Σ( _t_ ) _ρ_ <sup>Σ</sup> _ϕ_ <sup>Σ</sup> d _s_ = _−_ _ρϕ_ d _x_ + <sup>_<u>D</u>_</sup> _Dt_ _∂V_ ( _t_ ) _∂_ Σ( _t_ ) _V_ ( _t_ ) _\_ Σ( _t_ ) + _j_ <sup>Σ</sup> _·_ _n_ _∂_ Σd _l_ _s_ d _x_ + Σ( _t_ ) _s_ <sup>Σ</sup> d _s ._ (5) The generalized transport theorem, [48] _<u>D</u>_ _Dt_ _V_ ( _t_ ) _∂t_ <sup>d</sup> <sup>_x_</sup> <sup>+</sup> _j_ _·_ _n_ d _s −_ _ρϕ_ d _x_ = _V_ ( _t_ ) _\_ Σ( _t_ ) _<u>∂ρϕ</u>_ Σ( _t_ )� _ρϕ_ ( _u_ _−_ _u_ <sup>Σ</sup> )� _·_ _n_ Σd _s,_ _V_ ( _t_ ) _\_ Σ( _t_ ) _∇·_ ( _ρϕ_ _u_ )d _x_ + can be applied to the first term on the left hand side of (5), where the jump brackets are defined as - _ϕ_ �( _t,_ _x_ ) = _h_ lim _→_ 0 <sup>+ [</sup> <sup>_ϕ_</sup> <sup>(</sup> <sup>_t,_</sup> <sup>_x_</sup> <sup>+</sup> <sup>_h_</sup> <sup>_n_</sup> <sup>Σ)</sup> <sup>_−_</sup> <sup>_ϕ_</sup> <sup>(</sup> <sup>_t,_</sup> <sup>_x_</sup> <sup>_−_</sup> <sup>_h_</sup> <sup>_n_</sup> <sup>Σ)]</sup> <sup>_,_</sup> _x_ _∈_ Σ _._ (6) Furthermore, _u_ is the velocity field in the bulk and _u_ <sup>Σ</sup> is the interface velocity field which - in the general case of a fluid interface - can have contributions in both normal and tangential direction to the interface. The second term on the left hand side of (5) can be reformulated through the use of the surface transport theorem [45] (7) Σ( _t_ ) _∇_ Σ _·_ ( _ρ_ <sup>Σ</sup> _ϕ_ <sup>Σ</sup> _u_ <sup>Σ</sup> )d _s ._ _<u>D</u>_ _Dt_ Σ( _t_ ) _<u>∂ρ</u>_ <sup>Σ</sup> _<u>ϕ</u>_ <sup>Σ</sup> d _s_ + _∂t_ _ρ_ <sup>Σ</sup> _ϕ_ <sup>Σ</sup> d _s_ = Σ( _t_ ) Here the interface Nabla operator is defined by _∇_ Σ = [ I _−_ _n_ Σ _⊗_ _n_ Σ] _· ∇_, with interface divergence of a vector _∇_ theΣ _·_ first _y_ =term _tr_ ( _∇_ onΣ _y_ )thebeingrightthehandtracesideof ofthe(5)interfacecan be writtengradientas[46]. Using the two-phase divergence theorem [45], _∂V_ ( _t_ ) _V_ ( _t_ ) _\_ Σ( _t_ ) Σ( _t_ ) _−_ _j_ _·_ _n_ d _s_ = _−_ _∇·_ _j_ d _x_ _−_ - _j_ - _·_ _n_ Σd _s ._ (8) Table 1: Specifications of the general transport equation and the generic interface transmission condition under the assumption of a mass-less but capillary interface _ϕ_ _j_ _s_ _ϕ_ <sup>Σ</sup> _j_ <sup>Σ</sup> _s_ <sup>Σ</sup> Mass 1 0 0 0 0 0 Momentum _u_ _p_ I _−_ _τ_ _ρ_ _g_ 0 _−_ _τ_ <sup>Σ</sup> 0 2 <sup>2</sup> b 0 0 _q_ + ( _p_ I _−_ _τ_ ) _·_ _u_ _−_ _τ_ <sup>Σ</sup> _·_ _u_ <sup>Σ</sup> Energy _e_ + <sup>_<u>u</u>_</sup> 2 <sup>2</sup> Entropy _η_ _j_ _η_ _ζ_ 0 0 _ζ_ <sup>Σ</sup> Similarly, the second term on the right hand side of (5) can be expressed using the surface divergence theorem [49] _∇_ Σ _·_ _j_ <sup>Σ</sup> d _s ._ (9) Σ( _t_ ) _−_ _∂_ Σ( _t_ ) _j_ <sup>Σ</sup> _·_ _n_ _∂_ Σd _l_ = _−_ Substituting ( ?? ), (7), (8) and (9) back into (5) yields _V_ ( _t_ ) _\_ Σ( _t_ ) - _<u>∂</u>_ <u>(</u> _<u>ρϕ</u>_ <u>)</u> d _x_ _∂t_ + _∇·_ ( _ρϕ_ _u_ ) + _∇·_ _j_ _−_ _s_ (10) - _<u>∂</u>_ <u>(</u> _<u>ρ</u>_ Σ _<u>ϕ</u>_ Σ) Σ _<u>ϕ</u>_ Σ) _∂t_ + _∇_ Σ _·_ ( _ρ_ <sup>Σ</sup> _ϕ_ <sup>Σ</sup> _u_ <sup>Σ</sup> ) + _∇_ Σ _·_ _j_ <sup>Σ</sup> + � _ρϕ_ ( _u_ _−_ _u_ <sup>Σ</sup> ) + _j_ - _·_ _n_ Σ _−_ _s_ <sup>Σ</sup> d _s_ = 0 _._ + Σ( _t_ ) Localizing this expression to points inside the bulk results in the well-known general transport equation _<u>∂ρϕ</u>_ _∂t_ <sup>+</sup> <sup>_∇·_</sup> <sup>(</sup> <sup>_ρϕ_</sup> <sup>_u_</sup> <sup>) =</sup> <sup>_−∇·_</sup> <sup>_j_</sup> <sup>+</sup> <sup>_s_</sup> (11) introduced by Spalding [43]. Doing the same for points on the interface yields _<u>∂</u>_ - _<u>ρ</u>_ <sup>Σ</sup> _<u>ϕ</u>_ <sup>Σ�</sup> (12) _∂t_ + _∇_ Σ _·_ ( _ρ_ <sup>Σ</sup> _ϕ_ <sup>Σ</sup> _u_ <sup>Σ</sup> ) + � _ρϕ_ ( _u_ _−_ _u_ <sup>Σ</sup> ) + _j_ - _·_ _n_ Σ = _−∇_ Σ _·_ _j_ <sup>Σ</sup> + _s_ <sup>Σ</sup> _,_ which is called the interface transmission or flux condition. This equation relates the transport of the surface excess quantities to the jump in convective and diffusive fluxes from the adjacent regions across the interface. By specifying _ϕ_, _j_, _s_ and their corresponding surface excess quantities it is then possible to obtain the respective transport equations and transmission conditions for mass, momentum energy and entropy. Such specifications under sharp interface assumptions (no interfacial mass) are given in Table 1. In this table, _p_ represents the pressure, _τ_ is the deviatoric stress tensor, _g_ is the gravitational vector, _e_ is the internal energy and _q_ is the heat flux vector. The interfacial stress tensor _τ_ <sup>Σ</sup> accounts for the capillarity of the interface. The entropy is denoted by _η_ with its flux and production in the bulk being represented by _j_ _η_ and _ζ_ respectively. Due to the consideration of interfacial stress, the interfacial entropy production _ζ_ <sup>Σ</sup> is also accounted for. 3. Interface-coupling Within the sharp interface model framework, adjacent regions are coupled with each other through the interface transmission condition (12). Note that (12) does not represent a boundary condition for the coupling of the primitive fields used to describe the physics of each region. However, it can be reformulated when considering a generic primitive field _f_ [50] to match with �Γ _∇f_ - _·_ _n_ Σ = _F._ (13) Here, Γ typically denotes a constant diffusivity but can also be a dependent function of other variables. The jump of the interfacial flux of _f_ (flux discontinuity) is denoted by _F_, which might also be a dependent function of other variables. When linearised appropriately, (13) can be used as a coupling Neumann boundary condition on either side of the interface. In addition, one also needs to account for jumps of the primitive fields _f_ at the interface in order to fully describe the interfacial coupling. Such jumps of the primitive fields arise from closure, e.g. when accounting for the second law of thermodynamics - see [44] for a rigorous treatise on this subject. Jump conditions can also be written in a generic form, - _f_ - = _J_ _,_ (14) where _J_ represents the interfacial jump of _f_ and may be a dependent function of primitive transport variables. In a linearised form (14) can be applied as a coupling Dirichlet boundary condition on either side of the interface. When it comes to the algorithmic aspect of region-to-region coupling, monolithic coupling and partitioned coupling types are to be distinguished. In monolithic coupling methods, the coupled equations for each region are assembled and solved simultaneously in one system accounting for the coupling conditions implicitly. Whereas in partitioned coupling methods, the equations of each region are solved separately, updating the coupling conditions using iterations [51]. These partitioned methods are most often based on so-called non-overlapping domain decomposition methods - also known as Schwarz methods - and can be of different types [52, 53]. One such type is the Dirichlet-Neumann-Algorithm, which is implemented in the presented framework. Here, each interface is assigned a coupling Dirichlet boundary condition on one side and a coupling Neumann boundary condition on the other side. Since partitioned coupling algorithms in general can lack convergence, acceleration methods are needed during the update procedure [54]. These acceleration methods can either be based on relaxation of the boundary condition values or on quasi-Newton procedures. The `multiRegionFoam` framework implements a fixed and an Aitken relaxation method as well as the IQN-ILS procedure. The interested reader is referred to [54–56] for more details. 4. Notes on OpenFOAM In the following, we attempt to set out details regarding two essential features OpenFOAM provides _by_ _de-_ _sign_, namely the object registry and runtime selection. Both are crucial to understand at this point, since `multiRegionFoam` leverages them so as to devise a flexible and modular approach for computational multiphysics problems of multi-region coupling type. _4.1._ _Run-Time_ _Selection_ Typically a domain expert will be concerned with developing models and/or testing different combinations of models. For this purpose, in the strict object-oriented programming paradigm of OpenFOAM, models are implemented as classes answering to the same interface so they are encapsulated and re-usable. Note that the term ’model’ is used here in the broadest sense, e.g. for the choice of linear solvers, or the selection of discretisation schemes, etc. Then, compiling such model classes into shared objects (model libraries) has the advantage that the selection of models can be deferred until run-time (compared to compile-time in traditional factory methods). Together with Run-Time Selection (RTS) tables, models can then be selected from dynamically loaded shared libraries. Such an approach provides ultimate extensibility, since new models can be just added to a RTS table at run-time (by loading shared libraries dynamically) and become available to the top-level solvers just like the models of the same kind from the legacy code. The basic idea of a Run-Time Selection Table is to use a combination of static member variables and methods as well as templates to declare a Hash-Table in the base classes which all child classes register to automatically [57]. It leverages the fact that when a new shared library is loaded, all static variables are immediately initialized, which is exploited to call code that inserts the type name to the parent class’s table of models. The parent class’s side basically manages a dynamic ’v-table’ to construction methods of child classes. Traditionally, a static method (called New) looks up the requested model (provided by user input), constructs the object with its concrete type, but returns a pointer to the base type. _4.2._ _Object_ _Registry_ In OpenFOAM the object registry can be thought of as a kind of database that stores information about each object registered to it. It provides a way to keep track of all relevant objects created in a simulation, making it easier to access and manipulate them during runtime. An object registry is implemented using a hash table which belongs to C++ data structures that store key-value pairs. In this case, the keys are strings representing the names of the objects, and the values are references to the objects themselves. All classes in OpenFOAM inheriting from `objectRegistry` represent such an object registry. The most notable ones are the classes `Time`, providing read access to e.g. mesh objects, and `mesh`, providing read access to e.g. field objects. To look up an object in the registry, OpenFOAM uses a technique called string hashing. If the object is found, its reference is returned. If the object is not found, an exception is thrown indicating that the object does not exist in the registry. In essence, the mechanism relies on two incredients to check for existence of a requested object and return a reference to it (see Listing 1): - the object’s name, which is assumed to be unique in a single database, and - the object’s type, which is passed as a template argument to the lookup member function. Dynamic casts are simply used to check whether the `regIOobject` object of requested name is also of requested type. Listing 1: Object lookup example in OpenFOAM 1 `//` `Lookup` `the` `velocity` `field` `(of` `type` `volVectorField )` `from` `the` `mesh` 2 `const` `volVectorField &` `U` `=` `mesh.lookupObject <volVectorField >(` `"U"` `);` This hierarchy enables flexible access to objects across multiple libraries. These objects are typically declared at the main scope in solver code and persist throughout the solver’s execution. The object registration mechanism facilitates obtaining references to these objects from any shared library, provided there is access to the corresponding database (refer to Section 4.1 for the significance of this access level). This mechanism effectively eliminates the requirement to pass lengthy lists into class constructors, which otherwise impairs maintainability, extensibility, and generality. 5. Code structure and design In its essence, `multiRegionFoam` is a unified framework for multiphysics simulations of region-to-region coupling type. This coverage of distinct region and interfacial physics requires combinatorial flexibility. Therefore, its designed with attention to the following complementary aspects, in many areas going beyond basic requirements of domain-driven software development in research & development: - Usability . Often domain experts are developing research software using their substantial knowledge on details of the continuum-physical model specific to their own area. To leverage this potential, we have followed the domain-driven software design approach. Utmost attention has been devoted to devise a modular framework for both region- and interface-specific physics which can be developed as entities on their own right. Our aim has indeed been to keep the differences between implementing a module to writing a domain-specific top-level solver in OpenFOAM as low as possible. - Understandability . We have aimed to devise a complete and organized software fabric with a concise, clear as well as descriptive terminology for names of classes, data and functions. This has been motivated by the wish that when presenting `multiRegionFoam` to an engineer not familiar with the code before, basic functionality and principles of use should be easily comprehended. - Generality . Recognising inherent structural similarities which multiphysics problems of multi-region coupling type have in common, we have devoted significant effort in a general mathematical formulation as foundation of the software design. This has led to a unified framework for multi-region coupling with coverage over a wide range of numerous coupled continuum-physics problems from various distinct fields. - Extensibility . The structure of `multiRegionFoam` has been purposely designed to allow the flexible and non-intrusive addition of new capabilities or functionality. For instance, it is straight forward to add new modules for region- and interface-specific physics and to complement the set of provided coupling algorithms and coupled boundary conditions if needed. - Maintainability . `multiRegionFoam` makes comprehensive use of modern C++, such as classes (encapsulation, inheritance and composition), virtual functions (dynamic polymorphism), and operator overloading. We paid attention to enforcing consistent encapsulations of class families under common interfaces being as small as possible. Classes are minimal in size and as low in complexity as possible, so as to fulfill their (single) task. Moreover, special attention has been paid to avoid code-repetition by means of templating. - Robustness . Substantial efforts have been devoted to provide different coupling strategies. The approach enables to deploy both monolithic and partitioned coupling at the user’s choice for each continuum-physical transport equation. This enables to devise the solution strategy to coupled multiphysics problems of region-to-region coupling type on an abstraction level, allowing to have numerical robustness (stability and convergence) in mind despite dealing with substantial model complexity. - Efficiency . We ensure the possibility to efficiently deploy `multiRegionFoam` on distributed-memory parallel computer architectures on high-performance computing clusters by providing means for straight forward domain-decomposition. In particular, the interface-to-interface communication layer is developed such that it can be used in coupled boundary conditions for data transfer both in serial and parallel in a versatile manner providing multiple mapping strategies. _5.1._ _Main_ _class_ _structure_ We have followed a strictly object-oriented programming paradigm underlying a layered software design. Figure 2 depicts the class structure following the unified modeling language (UML) class diagram convention [58]. The building blocks of the code structure are two fundamental classes; `regionType` and `regionInterfaceType` which are base classes providing common functionalities that any type of region or interface would require regardless of the simulated physics. Examples of such functionalities for regions include assembling the equations that specify their physical behaviour, correcting the region’s material properties and moving its mesh. Similarly for interfaces, examples are administering the protocols for communication and coupling between regions, allowing for deploying various mapping methods, and implementing generic coupled boundary conditions (Section 5.4). From the aforementioned base classes, a code with modular design is devised which relies on the run-time selection mechanism (Section 4.1) in which the fundamental inheritance in C++ plays a crucial role. This enables the creation of derived classes that inherit all common functionalities and extend them to account for additional physical processes at the respective region or interface by defining specialised fields or equations. The inheritance hierarchy is indicated in Figure 2 by a solid line with a hollow arrowhead pointing from derived to base classes. Currently some specialised region types are implemented such as `icoFluid` for transient flow of incompressible fluid, `conductTemperature` and `transportTemperature` for thermal transport between solid and fluid regions. Also different region interface types are already available, like the `capillaryInterface` which is a fluid-fluid interface type accounting for surface tension and surfactant transport. Additional region or interface types can be easily added with this design. Moreover, different region types and region interface types can be superimposed. This is made possible by utilising the functionality of the object registry (Section 4.2) and the helper function `lookupOrRead` in Listing 2, so that all superimposed region types have access to Interfaces Interface specialisations capillaryInterface defaultInterface fluidSolidInterface … _regionInterfaceType_ PtrList<regionInterfaceType> regionInterfaceTypeList monolithicTypeInterfaces_ regionInterfaceProperties multiRegionSystem Regions regionTypeList regionProperties PtrList<regionType> _regionType_ Region specialisations pUCoupledIcoFluid icoFluid transportTemperature … Figure 2: General structure of the `multiRegionFoam` framework the fields present in one region even if they are defined in other types. Listing 2: Object lookup or read helper function 1 `template` `<` `class` `T>` 2 `inline` `autoPtr <T>` `lookupOrRead` 3 `(` 4 `const` `fvMesh&` `mesh,` 5 `const` `word&` `fldName,` 6 `const` `bool` `&` `read=` `true,` 7 `const` `bool` `&` `write=` `true,` 8 `const` `tmp <T>` `fld` `=` `tmp <T>( nullptr)` 9 `);` The information of the regions and interfaces, such as name, type and the settings for the interfacial coupling algorithm are specified by the user at run-time via the dictionaries `multiRegionProperties` and `regionInterface-` `Properties` (see Listings 4 and 3 for a simple conjugate heat transfer (CHT) problem whose setup is also displayed in Figure 3). The regions and interfaces information is read and stored by the `regionProperties` and `regionInterfaceProperties` classes which are utilised by the `regionTypeList` and `regionInterfaceTypeList` classes to instantiate the regions and the interfaces. The `multiRegionSystem` class builds on these lists to create the multi-region system of equations. It orchestrates the solution process by either applying monolithic or partitioned approaches and therefore acts as the main class interface to the top-level solver `multiRegionFoam` . Figure 3: Example of a heat transfer multi region system being composed out of two regions. The physics of the fluid region is described by the superposition of the two `regionType` s `icoFluid` and `transportTemperature` while the physics of the solid region is described by the `regionType` `conductTemperature` with a `heatTransferInterface` coupling both regions Listing 3: `multiRegionProperties` dictionary for a simple CHT problem 1 `regions` 2 `(` 3 `(` `fluid` `(icoFluid` `transportTemperature )` `)` 4 `(` `solid` `( conductTemperature )` `)` 5 `);` 6 7 `DNA` `//` `Dirichlet -Neumann` `Algorithm` `controls` 8 `{` 9 `T` 10 `{` 11 `maxCoupleIter` `20;` 12 `residualControl` 13 `{` 14 `maxJumpRes` `1e -07;` 15 `outputJumpResField` `no;` 16 `maxFluxRes` `1e -07;` 17 `outputFluxResField` `no;` 18 `}` 19 `}` 20 `}` Listing 4: `regionInterfaceProperties` dictionary for a simple CHT problem 1 `partitionedCoupledPatches` 2 `(` 3 `fluidsolid` 4 `{` 5 `interfaceType` `heatTransferInterface ;` 6 7 `coupledPatchPair` 8 `(` 9 `(fluid` `bottom)` 10 `(solid` `top)` 11 `);` 12 13 `coupledFields` 14 `(` 15 `T` 16 `);` 17 18 `defaultInterfaceCoeffs {}` 19 `}` 20 `);` 21 `monolithicCoupledPatches` 22 `(` 23 `);` 24 `curvatureCorrectedSurfacePatches` `0();` 25 `interpolatorUpdateFrequency` `1;` 26 `interfaceTransferMethod` `directMap;` 27 `directMapCoeffs {}` 28 `GGICoeffs {}` _5.2._ _Solution_ _of_ _the_ _coupled_ _system_ The set of equations describing the physical behaviour are defined in the specialisations of the `regionType` class in the `setCoupledEqns` function as illustrated in Listing 5 for the transport temperature equation in a fluid region. An instance of the equation system is stored in a hash pointer table, `HashPtrTable` . In this case, it is called `fvScalarMatrices` which points to a finite volume matrix system of scalar type. Other types include vector, tensor, or symmetric tensor matrices, as well as block coupled types `fvBlockMatrix`, as indicated in Listing 6. A unique name identifier is used as a key for the hash table where the same name pattern is used among all types of regions for straightforward access to all coupled equations later when the system is set up and solved. Listing 5: `setCoupledEqns` of `transportTemperature` region type 1 `void` `Foam :: regionTypes :: transportTemperature :: setCoupledEqns ()` 2 `{` 3 `//-` `Create` `temperature` `equation` `system` 4 `TEqn` `=` 5 `(` 6 `rho_*cp_` 7 `*(` 8 `fvm :: ddt(T())` 9 `+` `fvm :: div(phi_(),` `T())` 10 `)` 11 `==` 12 `fvm :: laplacian(kappa_ (),` `T())` 13 `);` 14 `//-` `Store` `equation` `system` `in` `appropriate` `HashPtrTable` 15 `fvScalarMatrices .set` 16 `(` 17 `T_ (). name ()` 18 `+` `mesh (). name ()` `+` `"Mesh"` 19 `+` `transportTemperature :: typeName` `+` `"Type"` 20 `+` `"Eqn"` `,` 21 `&TEqn ()` 22 `);` 23 `}` Listing 6: coupled governing equations 1 `//-` `coupled` `governing` `equations` 2 `HashPtrTable <fvMatrix <scalar >` `>` `fvScalarMatrices ;` 3 `HashPtrTable <fvMatrix <vector >` `>` `fvVectorMatrices ;` 4 `HashPtrTable <fvMatrix <symmTensor >` `>` `fvSymmTensorMatrices ;` 5 `HashPtrTable <fvMatrix <tensor >` `>` `fvTensorMatrices ;` 6 `HashPtrTable <fvBlockMatrix <vector4 >` `>` `fvVector4Matrices ;` The multi-region system comprising all such physics-specific equations, defined in different specialisations of region types, is assembled and solved in the `multiRegionSystem` class via the `solve` function shown in Listing 7. The auto pointers `interfaces_` and `regions_` which point to `regionInterfaceTypeList` and `regionTypeList` classes (cf. Figure 2) provide access to the list of all regions and their interfaces, including the functions defined in their respective specialised classes. For example, using `interfaces_->detach()`, the detach boundary mesh modifier is applied to the interfaces in preparation for partitioned coupling while `regions_->solveRegion()` checks for possible individual physics solution requirement in each region. Another function, `solvePIMPLE` (see Section 5.3), is dedicated for solving pressure-velocity systems, if any, using the PIMPLE algorithm. A distinction of cases is made based on whether the pressure and velocity fields are coupled across the interface or not. For example, solving the pressure-velocity system in the fluid region in the case of heat transfer between fluid and solid, versus the case of pressure-velocity interfacial coupling between two fluids as in a rising bubble scenario. Moreover, the coupling of the pressure and the velocity fields is made separate from other fields in order to allow for mesh motion using the Arbitrary Lagrangian-Eulerian (ALE) interface tracking method. For other fields, the system of equations is created and solved under the `assembleAndSolveEqns` function for partitioned coupling and the `assembleAndSolveCoupledMatrix` for monolithic coupling. Each of these functions loops over the list of the partitioned or monolithic coupled fields from the lists `partitionedCoupledFldNames` or `monolithicCoupledFldNames`, respectively. These are `hashedWordList` s reading coupled fields as specified in the `regionInterfaceProperties` dictionary (Listing 4). Note that when the partitioned Dirichlet-Neumann Algorithm (DNA) (Section 3) is selected, a convergence criteria is added. It is based on the interface residuals (see Section 4.4.2 in [50]) which are computed in the generic coupled boundary condition classes (Section 5.4). `dnaControl` has access to these coupled boundary conditions and residuals for all interfaces. The DNA controlled fields and the termination criteria are specified by the user in the `multiRegionProperties` dictionary as illustrated for the temperature field `T` in Listing 3 under the `DNA` entry. Listing 7: `solve` function of `multiRegionSystem` 1 `void` `Foam :: multiRegionSystem :: solve ()` 2 `{` 3 `//-` `Detach` `boundary` `mesh` `modifier` 4 `interfaces_ ->detach ();` 5 6 `//-` `Solve` `individual` `region` `physics` 7 `regions_ -> solveRegion ();` 8 9 `//-` `Check` `if` `at` `least` `one` `region` `implements` `PIMPLE` `loop` 10 `//` `and` `solve` `pressure -velocity` `system` `if` `so` 11 `if` `(regions_ ->usesPimple ())` 12 `{` 13 `//` `PIMPLE` `p-U-coupling` 14 `regions_ -> solvePIMPLE ();` 15 `}` 16 17 `//-` `Solve` `region -region` `coupling` `(partitioned )` 18 `forAll` `( partitionedCoupledFldNames_,` `fldI)` 19 `{` 20 `//-` `Get` `name` `of` `field` `which` `is` 21 `//` `currently` `partitioned` `coupled` 22 `word` `fldName` `=` `partitionedCoupledFldNames_ [fldI ];` 23 24 `//-` `Solve` `pressure -velocity` `system` `using` `PIMPLE` 25 `if` `(fldName` `==` `"pUPimple"` `)` 26 `{` 27 `while` `( dnaControls_ [fldName]->loop ())` 28 `{` 29 `//` `PIMPLE` `p-U-coupling` 30 `regions_ -> solvePIMPLE ();` 31 `//` `ALE` `mesh` `motion` `corrector` 32 `regions_ -> meshMotionCorrector ();` 33 `//` `Update` `interface` `inherent` `physics` 34 `interfaces_ ->update ();` 35 `}` 36 `}` 37 `else` 38 `{` 39 `//-` `Solve` `other` `partitioned` `coupled` `fields` 40 `while` `( dnaControls_ [fldName]->loop ())` 41 `{` 42 `assembleAndSolveEqns <fvMatrix,` `scalar >( fldName );` 43 `//` `fields` `of` `higher` `tensor` `rank` 44 `//` `...` 45 `}` 46 `}` 47 `}` 48 `//-` `Attach` `boundary` `mesh` `modifier` 49 `interfaces_ ->attach ();` 50 51 `//-` `Solve` `region -region` `coupling` `(monolithic)` 52 `forAll` `( monolithicCoupledFldNames_,` `fldI)` 53 `{` 54 `//-` `Get` `name` `of` `field` `which` `is` 55 `//` `currently` `monolithic` `coupled` 56 `word` `fldName` `=` `monolithicCoupledFldNames_ [fldI ];` 57 58 `assembleAndSolveCoupledMatrix <fvMatrix,` `scalar >` 59 `(` 60 `monolithicCoupledScalarFlds_,` `fldName` 61 `);` 62 `//` `fields` `of` `higher` `tensor` `rank` 63 `//` `...` 64 `}` 65 `}` The assembly and solution of the system of coupled equations in partitioned mode is shown in Listing 8 which represents the `assembleAndSolveEqns` function of the `multiRegionSystem` class. The function iterates through all regions and obtains a non-constant reference, called `rg`, to the current region. It also constructs a unique name `matrixSystemName` for the equation system for the coupled field in this region. This name matches the pattern of the key assigned for the hash pointer table defined within the `setCoupledEqns` function in the respective specialised region type as mentioned earlier (see Listing 5). The coupled equation matrix defined in the current region is retrieved from the hashed table using the `getCoupledEqn` function which is a member of the `regionType` class. It is defined using a template, which allows it to be specialised for different types of matrices where the type is deduced from the input `matrixSystemName` . The use of templatisation is particularly beneficial here to avoid writing multiple identical classes differing only in type. The system of equations is then assembled and solved with the option to perform individual post-solve actions that are implemented in each region. Listing 8: `assembleAndSolveEqns` of `multiRegionSystem` 1 `template <` `template <` `class >` `class` `M,` `class` `T>` 2 `void` `Foam :: multiRegionSystem :: assembleAndSolveEqns` 3 `(` 4 `word` `fldName` 5 `)` `const` 6 `{` 7 `forAll` `(regions_ (),` `regI)` 8 `{` 9 `//-` `Getting` `non` `const` `access` `to` `current` `region` 10 `regionType &` `rg` `=` `const_cast <regionType &>( regions_ ()[ regI ]);` 11 12 `//-` `Unique` `name` `of` `equation` `system` 13 `word` `matrixSystemName` `=` 14 `(` 15 `fldName` 16 `+` `rg.mesh (). name ()` `+` `"Mesh"` 17 `+` `rg. regionTypeName ()` `+` `"Type"` 18 `+` `"Eqn"` 19 `);` 20 21 `//-` `Sanity` `checks` 22 `//` `...` 23 24 `//-` `Get` `equation` `from` `region` 25 `M<T>&` `eqn` `=` `rg.getCoupledEqn <M,T>( matrixSystemName );` 26 27 `//-` `Relax` `equation` 28 `rg.relaxEqn <T>( eqn );` 29 30 `//-` `Solve` `equation` 31 `eqn.solve ();` 32 33 `//-` `Post` `solve` `actions` 34 `rg.postSolve ();` 35 `}` 36 `}` For monolithic coupling, the procedure starts with attaching the meshes at the interfaces between adjacent regions using the attach boundary mesh modifier `interfaces_->attach()` function as indicated previously in Listing 7. Then, as for partitioned coupling, the `assembleAndSolveCoupledMatrix` function creates and solves the coupled system. However, it is now represented as a block coupled finite volume matrix using the `coupledFvMatrix` approach [59] as illustrated in Listing 9. This is a block matrix system that is initialised with the number of monolithic coupled regions. The equations to be loaded into the `coupledFvMatrix` are obtained from the respective regions using the `getCoupledEqn` function analogously to the partitioned approach by iterating over the regions and collecting equations by their unique name. Unlike partitioned coupling, the retrieved coupled equations are not directly solved but instead inserted into the block matrix system. They are first appended into the dynamic list of equations `eqns` which holds pointers to the equation matrices for all regions. The `new` operator dynamically allocates memory for each instance of a coupled equation appended to the list. Finally, the equations are solved in the block matrix system simultaneously in an implicit manner using the solver specified by the solution dictionary of the first region’s mesh for the given coupled field name. Listing 9: `assembleAndSolveCoupledMatrix` of `multiRegionSystem` 1 `template <` `template <` `class >` `class` `M,` `class` `T>` 2 `void` `Foam :: multiRegionSystem :: assembleAndSolveCoupledMatrix` 3 `(` 4 `PtrList <GeometricField <T,` `fvPatchField,` `volMesh >` `>&` `flds,` 5 `word` `fldName` 6 `)` `const` 7 `{` 8 `//-` `Get` `number` `of` `monolitic` `coupled` `regions` `per` `field` `name` 9 `//` `and` `return` `if` `there` `are` `none` 10 `//` `...` 11 12 `//-` `Initialise` `block` `matrix` `system` 13 `//` `with` `number` `of` `monolitic` `coupled` `regions` 14 `coupledFvMatrix <T>` `coupledEqns (nEqns );` 15 16 `//-` `Assemble` `all` `matrices` `one -by -one` `and` `combine` `them` `into` `the` 17 `//` `block` `matrix` `system` 18 `label` `nReg` `=` `0;` 19 `DynamicList <M<T>*` `>` `eqns;` 20 `forAll` `(regions_ (),` `regI)` 21 `{` 22 `//-` `Getting` `non` `const` `access` `to` `current` `region` 23 `regionType &` `rg` `=` `const_cast <regionType &>( regions_ ()[ regI ]);` 24 25 `//-` `Unique` `name` `of` `equation` `system` 26 `word` `matrixSystemName` `=` 27 `(` 28 `fldName` 29 `+` `rg.mesh (). name ()` `+` `"Mesh"` 30 `+` `rg. regionTypeName ()` `+` `"Type"` 31 `+` `"Eqn"` 32 `);` 33 34 `//-` `Get` `equation` `from` `region` 35 `M<T>&` `eqn` `=` `rg.getCoupledEqn <M,T>( matrixSystemName );` 36 37 `//-` `Insert` `matrix` `into` `block` `matrix` `system` 38 `eqns.append(` `new` `M<T>( eqn ));` 39 `coupledEqns .set(nReg,` `eqns[nReg ]);` 40 `nReg ++;` 41 `}` 42 43 `//-` `Solve` `block` `matrix` `system` 44 `coupledEqns .solve` 45 `(` 46 `regions_ ()[0]. mesh (). solutionDict (). solver(fldName` `+` `"coupled"` `)` 47 `);` 48 49 `//` `Post` `solve` `actions` `for` `monolithic` `coupled` `fields` 50 `//` `...` 51 `}` _5.3._ _Pressure-velocity_ _coupling_ The pressure-velocity coupling is solved in a semi-implicit manner using the PIMPLE algorithm which is a combination of the well known Pressure-Implicit with Splitting of Operators (PISO) algorithm [60] and a more consistent version of the Semi-Implicit Method for Pressure-Linked Equations (SIMPLE) algorithm [61]. This involves a predictor-corrector procedure in which a tentative solution for the velocity is obtained in the predictor step while the pressure is updated in the corrector step. The standard implementations of these algorithms in OpenFOAM are refactored and integrated into the class structure of `multiRegionFoam` (see Figure 2). The code is implemented in the `icoFluid` region type class which needs to be specified by the user in the `multiRegionProperties` dictionary (Listing 3). The code block for each of the steps of the PIMPLE algorithm are defined in the `momentumPredictor` and the `pressureCorrector` functions. These are called in the `regionTypeList` class by utilising the concept of operator overloading in C++, as illustrated in Listing 10. The `solvePIMPLE()` function represents the skeleton of the PIMPLE algorithm which outlines the outer and the inner loops and the execution across regions. In order to ensure the consistency of the pressure-velocity coupling, each step of the solution procedure is performed for all regions before the next step is carried out. Listing 10: `solvePIMPLE` of `regionTypeList` 1 `void` `Foam :: regionTypeList :: solvePIMPLE ()` 2 `{` 3 `//-` `Get` `the` `number` `of` `outer` `correctors` `that` `should` `be` `performed` 4 `//` `during` `the` `PIMPLE` `procedure` `(We` `do` `not` `have` `a` `top -level` 5 `//` `mesh.` `Construct` `fvSolution` `for` `the` `runTime` `instead .)` 6 `fvSolution` `solutionDict (runTime_ );` 7 `const` `dictionary &` `pimple` `=` `solutionDict .subDict(` `"PIMPLE"` `);` 8 `int` `nOuterCorr (readInt(pimple.lookup(` `" nOuterCorrectors "` `)));` 9 10 `//-` `PIMPLE` `loop` 11 `for` `(` `int` `oCorr =0;` `oCorr < nOuterCorr;` `oCorr ++)` 12 `{` 13 `forAll (*` `this,` `i)` 14 `{` 15 `this ->` `operator [](i). prePredictor ();` 16 `}` 17 18 `forAll (*` `this,` `i)` 19 `{` 20 `this ->` `operator [](i). momentumPredictor ();` 21 `}` 22 23 `forAll (*` `this,` `i)` 24 `{` 25 `this ->` `operator [](i). pressureCorrector ();` 26 `}` 27 `}` 28 `}` _5.4._ _Generic_ _boundary_ _conditions_ _for_ _partitioned_ _coupling_ As described in Section 3, the solution of the multi-region system using a partitioned approach requires specifying boundary conditions on the connecting boundaries of the sub-regions where a Dirichlet condition is applied on one side while a Neumann condition is applied on the other one. For this purpose, a set of generic boundary conditions are devised exploiting the fact that thes conditions have a general mathematical formulation (Section 2). Figure 4 shows how the implementation is integrated into the structure of `multiRegionFoam` . _regionInterfaceType_ interfaceToInterfaceCoupleManager fixedGradientFvPatchField<Type> fixedValueFvPatchField<Type> genericRegionCoupledFluxFvPatchField<Type> genericRegionCoupledJumpFvPatchField<Type> accelerationModel aitkenRelaxation IQNILS … Flux BCs special. Jump BCs special. interfaceCoupledPressureFlux interfaceCoupledPressureValue interfaceCoupledVelocityFlux interfaceCoupledVelocityValue … … Figure 4: General structure of the generic coupled boundary condition The generic boundary conditions are derived from the standard OpenFOAM Dirichlet and Neumann boundary conditions, namely `fixedValueFvPatchField` and `fixedGradientFvPatchField` . This results in two classes `genericRegionCoupledValueFvPatchField` and `genericRegionCoupledFluxFvPatchField` which implement the interfacial jump and transmission conditions, respectively. Utilising templates, these conditions are made agnostic to the actual physics that the jumps and fluxes originate from and rather receive this information from the relevant specialisation of `regionInterfaceType` s. The derived coupled boundary conditions also inherit from the `interfaceToInterfaceCoupleManager` class which gives access to the neighbour region data, such as the mesh and patch names, and has access to the `regionInterfaceType` on which the coupled boundary condition is applied. For their use in the partitioned interface coupling solution approach they are also able to utilize different convergence acceleration methods including, besides others, the Aitken relaxation method [54] and the Interface Quasi-Newton Inverse Least-Squares method (IQN-ILS) [62]. _5.5._ _Parallelisation_ In OpenFOAM, parallelization is generally implemented through the domain decomposition method. This typically requires dividing the solution domain into sub-regions in order for each of them to be solved on separate CPU cores. The standard Message Passing Interface (MPI) [63] is then utilised to establish communication between the processors. Although the proposed multi-region framework already requires subdivision of the computational mesh into multiple domains, these sub-domains are not convenient for efficient parallel computing, especially because a unified framework is sought. For example, if partitioned coupling is selected, then only one region will be solved at a time, or if the regions vary significantly in size in some scenarios, this will lead to an unbalanced distribution of load over the processors. Instead, all regions are decomposed into the same number of sub-domains but not necessarily using the same decomposition method. Figure 5 depicts an example of two interface coupled regions representing gas bubble and liquid where both phases are decomposed into two sub-domains but one is decomposed vertically while the other is decomposed horizontally. This causes the two patches, that form the two sides of the interface, to be non-entirely overlapping (cf. blue lines in Figure 5) which makes the fields mapping between the two sides impossible. To overcome this situation, the _global_ _face_ _zone_ approach, introduced by Cardiff et al. [31] and Tuković et al. [64], is used. It suggests that each processor is given access to the entire interface patch via the so-called `globalPolyPatch` (red and orange lines in Figure 5) which resembles the union of the non-overlapping boundaries, holding copies of their data and allowing for mapping the fields from one global patch to the other. These global patches also facilitate the implementation of the coupled boundary conditions. To adapt this concept in `multiRegionFoam`, the `globalPolyPatch` is incorporated into the `regionInterfaceType` class, i.e. it includes a pair of the local interface patches as well as pair of global patches. Liquid Liquid Gas Gas Proc 0 Proc 1 Figure 5: Local (blue) and global (red, orange) poly patches of a gas and a liquid region decomposition 6. Automated test harness In order to validate and evaluate different aspects of `multiRegionFoam`, an automated test framework is deployed. The main goal is to automatically run a suite of test cases and report on the results. This includes testing whether each simulation was successfully executed and completed as well as checking the obtained results against some criteria, such as a reference solution or an error threshold. The testing framework is also useful for parameter studies, continuous integration, and testing of further developments or new features. The tests are performed using Python utilising the `oftest` library [65] which is a test framework for OpenFOAM cases available as open source under the GPLv3 License. It makes use of the `pytest` library such that, by adding the script file `test_*.py` to each test case, `pytest` automatically discovers all tests in the folder. This script file includes all the instructions to initiate the simulation and store the results for each test case. The `run_reset_case` module from `oftest` library is responsible for running and cleaning the case according to the standard OpenFOAM scripts `Allrun` and `Allclean` . Listing 11 shows the `test_completed` function which adds the case to the pool of tests, returns the status of completion (passed/failed) in the terminal, and leaves the simulation log file in the specified path. Listing 11: Test case completion check using `oftest` and `pytest` libraries 1 `def` `test_completed ( run_reset_case ):` 2 `log` `=` `oftest.path_log ()` 3 `assert` `oftest. case_status (log)` `==` `’completed ’` For parameter studies and/or testing different scripts for the same case, the `oftest.Case_modifiers` module is used allowing for the manipulation of the case files and dictionaries. For example, Listing 12 shows part of the script file for a suite of tests for a conjugate heat transfer scenario where different values of parameters are simulated, including Reynolds number, Re, the Prandtl number, Pr, and the thermal conductivity ratio, k = _ks/kf_ (see Section 7.1 for the flow over heated plate case description). Additionally, the test includes different coupling algorithm, monolithic ( `"Allrun` `-m"` ) or partitioned ( `"Allrun` `-p"` ), where the latter could be performed with different types of acceleration `accType` ( `"aitken"` / `"IQN-ILS"` ) or without acceleration ( `"fixed"` ). In order to execute the tests, the `@pytest.mark.parametrize` decorator is used to specify the test parameters and their corresponding values as shown in Listing 13 which is included in the same script file. Listing 12: Test suites setup in the script file `test_*.py` 1 `def` `paramSet(Pr,` `Re,` `k,` `relaxType,` `relaxValue,` `script ):` 2 `L` `=` `1.0` 3 `rhof` `=` `1.0` 4 `ks` `=` `100.0` 5 `Uinf` `=` `1.0` 6 `mu` `=` `rhof*Uinf*L/` `int` `(Re)` 7 `kf` `=` `ks/k` 8 `cp` `=` `kf*Pr/mu` 9 10 `dir_name` `=` `os.path.dirname(os.path.abspath(__file__ ))` 11 `filemod` `=` 12 `{` 13 `"constant/fluid/ transportProperties "` `:` 14 `[` 15 `(` `’mu’` `,` `’mu` `[` `1` `-1` `-1` `0` `0` `0` `0` `]` `%s’` `%mu),` 16 `(` `’cp’` `,` `’cp` `[` `0` `2` `-2` `-1` `0` `0` `0` `]` `%s’` `%cp),` 17 `(` `’k’` `,` `’k` `[1` `1` `-3` `-1` `0` `0` `0]` `%s’` `%kf),` 18 `],` 19 `"0/ fluid/orig/ monolithic /k"` `:` 20 `[` 21 `(` `’internalField ’` `,` `’uniform` `%s’` `%kf),` 22 `],` 23 `"0/ fluid/orig/ partitioned /T"` `:` 24 `[` 25 `(` `’boundaryField /interface/accType ’` `,` `relaxType),` 26 `(` `’boundaryField /interface/relax ’` `,` `relaxValue),` 27 `]` 28 `}` 29 `meta_data` `=` `{` `"Pr"` `:Pr,` `"Re"` `:` `Re,` `"k"` `:` `k,` `"relaxType"` `:` `relaxType,` 30 `" relaxValue "` `:relaxValue,` `"script"` `:` `script}` 31 `case_mod` `=` `oftest. Case_modifiers (filemod,` `dir_name,` `meta_data)` 32 `return` `case_mod` During the test execution, `pytest` will run the `test_flowOverHeatedPlate` function multiple times, once for each set of input values specified in the decorator’s parameters list. Before cleaning the current case and proceeding to the next one, the data of interest from the current case, such as solution fields at final time, outcomes of OpenFOAM post-processing utilities, or computed errors are stored and written into a file format supported by Python as demonstrated in Listing 13. The results of all tests could be written into a single data frame file that can be further analyzed using standard Python libraries for data management and visualisation. Listing 13: Test suites execution in the script file `test_*.py` 1 2 `parameters` `=` `[paramSet (0.01,` `500,` `1,` `"fixed"` `,` `1,` `"Allrun` `-p"` `),` 3 `paramSet (0.01,` `500,` `1,` `"aitken"` `,` `0.75,` `"Allrun` `-p"` `),` 4 `paramSet (0.01,` `500,` `1,` `"monolithic"` `,` `0,` `"Allrun` `-m"` `),` 5 `paramSet (100,` `500,` `1,` `"fixed"` `,` `1,` `"Allrun` `-p"` `),` 6 `...` `]` 7 8 `labels` `=` `[` `" Pr01Re500k1Fixed1 "` `,` `" Pr01Re500k1Aitken75 "` `,` 9 `" Pr01Re500k1Monolithic "` `,` `" Pr100Re500k1Fixed1 "` `,` `...` `]` 10 11 `@pytest.mark. parametrize (` 12 `" run_reset_case "` `,` `parameters,` 13 `indirect =[` `" run_reset_case "` `],` `ids` `=` `labels)` 14 15 `def` `test_flowOverHeatedPlate (run_reset_case,` `load_results ):` 16 17 `#` `Access` `the` `current` `case` `parameters` `from` `the` `meta_data` `dictionary` 18 `current_case` `=` `run_reset_case .meta_data` 19 20 `#` `Append` `the` `error` `retrieved` `by` `load_results` `function` 21 `current_case [` `’error ’]` `=` `max` `( load_results [` `’error ’` `])` 22 23 `#` `Append` `current` `case` `to` `the` `list` `of` `cases` 24 `all_cases.append( current_case )` 25 26 `#` `Write` `results` `into` `data` `frame` `in` `csv` `format` 27 `all_cases_df` `=` `pd.DataFrame(all_cases)` 28 `all_cases_df .to_csv(os.path.join(dir_name,` `"all_cases.csv"` `),index=False)` 29 30 `#` `Report` `on` `test` `completion` 31 `log` `=` `oftest.path_log ()` 32 `assert` `oftest. case_status (log)` `==` `"completed"` 7. Examples of Usage _7.1._ _Forced_ _convection_ _heat_ _transfer_ _from_ _a_ _flat_ _plate_ In this case, an incompressible laminar flow over a flat plate is considered, following the description from Vynnycky et al. [66]. Their numerical results as well as their derived reference solution, using boundary-layer theory, are used for validation. A schematic sketch of the case setup is shown in Figure 6. A fluid of uniform temperature _T∞_ and velocity _U∞_ flows over a plate of finite thickness that is held at constant temperature _Ts_ _> T∞_ . fluid solid a=0 _._ 25 m _<u>∂T∂x</u>_ <sup>= 0 K</sup> <sup>_/_</sup> <sup>m</sup> y x _U∞_ = 1 <sup>m</sup> _/_ s _T∞_ = 300 K _<u>∂T∂y</u>_ <sup>= 0 K</sup> <sup>_/_</sup> <sup>m</sup> _<u>∂T∂x</u>_ <sup>= 0 K</sup> <sup>_/_</sup> <sup>m</sup> L=1m _Ts_ = 310 K Figure 6: Computational domain and boundary conditions for the flow over a heated plate Figure 7: Meshes for the flow over heated plate simulation The computational mesh is depicted in Figure 7. It covers the fluid and solid regions, both consisting of hexahedral elements. In order to capture the thermal and viscous boundary layers in the fluid, mesh grading is used to obtain a finer mesh at the fluid-solid interface and the leading edge of the plate. The two regions are coupled at the fluid-solid interface with a `heatTransferInterface` `regionInterfaceType` which consists of the meshes boundary patches, namely the "bottom" patch from the fluid and the "top" patch from the solid. Table 3 shows the thermal coupled boundary conditions used in `multiRegionFoam` . A Dirichlet condition is applied at the fluid side of the fluid-solid interface while a Neumann condition is specified at the solid side. The generic jump and flux boundary conditions (Section 5.4) are used for partitioned coupling while the region couple patch field `chtRcTemperature` [67] is used for monolithic coupling. The rest of the boundary conditions are summarized in Table 2. The authors of [66] investigated several factors affecting heat transfer, including the aspect ratio of the plate _λ_ = _a/L_, the Reynolds number, Re, the Prandtl number, Pr, and the thermal conductivity ratio, k = _ks/kf_, between the plate and the fluid. In this study, the aspect ratio is fixed at _λ_ = 0 _._ 25, while different combinations of the other parameters are considered as specified in table 4; the thermophysical properties of the fluid and solid are given in table 5. The simulations are run for 10s using time step size of ∆ _t_ = 0 _._ 01. The numerical schemes used are listed in Table 6 according to OpenFOAM equivalent terms [68]. The results are validated by computing the dimensionless conjugate boundary temperature, _θ_, defined as _θ_ = <sup>_<u>T</u>_</sup> <sup>_<u>−</u>_</sup> <sup>_<u>T∞</u>_</sup> _Ts −_ _T∞_ _,_ where _T_ is the temperature along the fluid-solid interface. Figure 8 summarizes the results of `multiRegionFoam` using monolithic and partitioned coupling. The latter was performed with Aitken’s relaxation procedure to accelerate the convergence. Both approaches result in good agreement with the numerical and analytical results from Vynnycky et al. [66]. The deviations from the reference solutions in Figure 8c are due to the fact that the solutions for the case _Pr_ _≫_ 1 were derived under the constant-flux approximation assumption, Table 2: Boundary conditions for the flow over a heated plate <u>Boundary</u> <u>Thermal</u> <u>Velocity</u> <u>Fluid</u> inlet 300 K (1 0 0) <sup>_<u>⊤</u>_</sup> <sup>m</sup> _/_ s bottom coupled (0 0 0) <sup>_⊤_</sup> <sup>m</sup> _/_ s slip-bottom (before the plate) zeroGradient zeroGradient noSlip-bottom (after the plate) zeroGradient (0 0 0) <sup>_⊤_</sup> <sup>m</sup> _/_ s <u>outlet,</u> <u>top</u> <u>zeroGradient</u> <u>zeroGradient</u> <u>Solid</u> top coupled bottom 310 K <u>left,</u> <u>right</u> <u>zeroGradient</u> <u>-</u> Table 3: Coupled thermal boundary conditions for the flow over heated plate simulation <u>Region</u> <u>Boundary</u> <u>Partitioned</u> <u>Monolithic</u> Fluid bottom regionCoupledScalarJump chtRcTemperature <u>Solid</u> <u>top</u> <u>regionCoupledScalarFlux</u> <u>chtRcTemperature</u> Table 4: Parameters for the flow over heated plate simulation <u>Re</u> <u>Pr</u> <u>k</u> 500 0.01 1, 5, 20 10000 0.01 1, 5, 20 500 100 1, 5, 20 Table 5: Thermophysical properties of the fluid and solid for the flow over heated plate simulation <u>Property</u> <u>Symbol</u> <u>Unit</u> <u>Solid</u> <u>Fluid</u> Density _ρ_ kg _/_ m <sup>3</sup> 1 1 Dynamic viscosity _µ_ kg _/_ ms - _ρf_ _U∞L/_ Re Thermal conductivity _k_ W _/_ m _·_ K 100 _ks/_ k Specific heat capacity _cp_ J _/_ kg _<u>·</u>_ K 100 _kf_ Pr _/µ_ Table 6: Numerical schemes for the flow over heated plate simulation <u>Scheme</u> <u>Setting</u> <u>Time</u> <u>Scheme</u> <u>ddtScheme</u> <u>backward</u> Finite Volume Schemes gradScheme leastSquares divScheme div(phi,U) Gauss upwind divScheme div(phi,T) Gauss linearUpwind Gauss linear lapacianScheme Gauss linear corrected interpolationScheme linear <u>snGradScheme</u> <u>corrected</u> which does not provide an accurate description of the flow as _k_ increases. Figure 8d reports the average time spent on the coupling using partitioned and monolithic approaches. In comparison to partitioned coupling, monolithic coupling exhibits either the same or reduced average coupling time across all cases. However, a notable distinction is observed when Pr is equal to 100. Notably, for monolithic coupling, the time remains almost constant regardless of the simulated parameters. (a) Dimensionless conjugate boundary temperature _θ_ over non-dimensional distance _x_ for Pr = 0.01 and Re = 500 (b) Dimensionless conjugate boundary temperature _θ_ over non-dimensional distance _x_ for Pr = 0.01 and Re = 10 <sup>4</sup> (c) Dimensionless conjugate boundary temperature _θ_ over non-dimensional distance _x_ for Pr = 100 and Re = 500 (d) Average Coupling time for partitioned and monolithic coupling Figure 8: Simulation results for different _Pr_, _Re_, and _k_ values Table 7: Boundary conditions for the heat exchanger <u>Boundary</u> <u>Thermal</u> <u>Velocity</u> <u>Inner</u> <u>fluid</u> inlet 283 K (0 _._ 002 0 0) <sup>_<u>⊤</u>_</sup> <sup>m</sup> _/_ s inner_to_solid coupled (0 0 0) <sup>_⊤_</sup> <sup>m</sup> _/_ s <u>outlet,</u> <u>walls</u> <u>zeroGradient</u> <u>zeroGradient</u> <u>Outer</u> <u>fluid</u> inlet 353 K (0 0 _._ 0037 0) <sup>_<u>⊤</u>_</sup> <sup>m</sup> _/_ s outer_to_solid coupled (0 0 0) <sup>_⊤_</sup> <sup>m</sup> _/_ s <u>outlet,</u> <u>walls</u> <u>zeroGradient</u> <u>zeroGradient</u> <u>Solid</u> solid_to_inner coupled solid_to_outer coupled walls zeroGradient _7.2._ _Shell-and-tube_ _heat_ _exchanger_ The next example demonstrates an industrial application where conjugate heat transfer takes place. Figure 9 shows a shell-and-tube heat exchanger. This particular design includes a shell, tubes, and baffles. Heat transfer occurs between two fluids; an inner fluid, flowing at lower temperature inside the tubes, and an outer fluid, flowing within the shell, but outside the tubes. The solid walls of the tubes ensure that the two fluids do not mix while the baffles help directing the flow on the shell side. Outer fluid inlet _U_ = 0 _._ 0037 <sup>m</sup> _/_ s _T_ = 353 K Shell Tubes Baffles Inner fluid inlet _T_ = 283 K _U_ = 0 _._ 002 <sup>m</sup> _/_ s Inner fluid outlet Outer fluid outlet Figure 9: Geometry for the heat exchanger Figure 10: Meshes for the heat exchanger simulation The case setup is based on a case prepared by SimScale GmbH that is publicly available at [69]. The computational mesh is shown in Figure 10 and the boundary conditions are summarized in Table 7. The coupled boundary conditions are as in the previous case in Table 3. The material properties of the solid and fluid regions are shown in Table 8 where the inner and the outer fluids both have the same properties. The simulations are run for 500s using time step size of ∆ _t_ = 1 s. The numerical schemes used are listed in Table 9. Figure 11 shows the results of the heat exchanger simulation using monolithic coupling. It depicts the distribution of the temperature at t = 30 s where no significant change in the temperature is observed afterwards. The computed Table 8: Thermophysical properties of the fluid and solid for the heat exchanger case <u>Property</u> <u>Symbol</u> <u>Unit</u> <u>Fluid</u> <u>Solid</u> Density _ρ_ kg _/_ m <sup>3</sup> 1027 8960 Thermal conductivity _k_ W _/_ m _·_ K 0.668 401 Dynamic viscosity _µ_ kg _/_ ms 3 _._ 645e <sup>_−_</sup> <sup>4</sup> Specific heat capacity _cp_ J _/_ kg _<u>·</u>_ K 4195 385 Table 9: Numerical schemes for the heat exchanger <u>Scheme</u> <u>Setting</u> <u>Time</u> <u>Scheme</u> <u>ddtScheme</u> <u>steadyState</u> Finite Volume Schemes gradScheme Gauss linear gradScheme grad(U) cellLimited Gauss linear 1 divScheme div(phi,U) Gauss upwind divScheme div(phi,T) Gauss upwind lapacianScheme Gauss linear corrected interpolationScheme linear snGradScheme corrected field values using the partitioned approach are not remarkably different, but it takes longer to reach a steady state (around t = 500 s). Figure 11: Final temperature distribution for the heat exchanger simulation _7.3._ _Polymer_ _electrolyte_ _fuel_ _cell_ The possibility of simulating complex multi-physical systems within the `multiRegionFoam` framework will be demonstrated in the following example, considering a single polymer electrolyte fuel cell (PEMFC) channel. The general structure and the typical physical components of a PEMFC are depicted in the left, gray scaled image of Figure 12. Figure 12: General modeling approach of the PEM fuel cell Beginning with the outer components, the cell consists of two end plates, or interconnects, to which the external electrical circuit is connected. The reactants are conveyed through the air and fuel channels and are transported via porous gas diffusion layers (GDLs) to the catalyst layers (CLs), which is represented here as an infinite thin surface. Besides the gas transport to the catalyst layers, the electric conductive GDLs also enable the electrical contact between the forementioned and the end plates ( `interconnect` ). The CL is located between the ionic conductive membrane and GDL. On the cathode (CL at the air side) oxygen is reduced and water is created, whereas on the anode side (CL at the fuel side) hydrogen is oxidized and protons are conducted through the ionic conductive membrane to the opposite CL. In addition, Figure 12 shows the general structure of the modeling and computational domains. The design of the single-phase PEMFC implemented here in `multiRegionFoam` is based on developments that can be traced back to [70] and to [71], and in this particular case has been extended especially towards the possibility of interface coupling. Thus, the subdomains defined as different `regionTypes` are solid, fluid and electric/ionic conductive regions. In the fluid ( `air` and `fuel` ) regions, both the modified Navier-Stokes equations, which take into account the porous layers via Darcy’s law, and the species mass fraction equations are solved. The gas mixtures are assumed to be incompressible, ideal gases whose diffusion is characterized by Fick’s law, taking also into account the impact of the porous layers. On the cathode side, the inflowing gas mixture is composed of oxygen, nitrogen and water vapor, whereas on the anode side, hydrogen and water vapor flow in. In total, the constraint that the sum of all mass fractions have to equal one must be fulfilled in each cell. Humidification of the gas mixtures is important to ensure the ionic conductivity of the membrane, which is strongly dependent on its water content. Within the electric/ionic conducting regions ( `phiEC`, `phiEA` and `phiI` ), the electric potential equations are solved using the partitioned coupling approach. Here, the open cell voltage is described by Nernst equation and the activation overpotential resulting from the reaction is expressed by Butler-Volmer equation. Additional contact resistances or limiting current densities are not considered in this particular case. The cell operates in galvanostatic mode, i.e., a constant mean current density is applied to it. Therefore, the potential field specified at the upper surface of `phiEC` (interconnectUp) is adjusted every iteration step until the specified current density is reached. In Table 10 this is indicated by the entry `adjustedPotential` for the boundary interconnectUp. The calculation of the temperature within each component of the PEM fuel cell takes place on the global region by mapping the required quantities such as densities and specific heat capacities etc. onto this mesh. A further adaptation of the source code, whereby the energy equation on the individual regions are solved using the coupled boundary conditions as shown in the previous sections, is also be possible with the framework here. With such an approach and the assumption of a single-phase flow, the global region would be redundant. Figure 13 shows the dimensions of the single channel and selected boundary conditions taken from Table 10. Table 10: Boundary conditions for the PEM fuel cell <u>Boundary</u> <u>Thermal</u> <u>Velocity</u> <u>Species</u> <u>mass</u> <u>fraction</u> <u>Potential</u> <u>air</u> airInlet - (0 _._ 655 0 0) <sup>_<u>⊤</u>_</sup> m _/_ s YO2 = 0.156, YH2O = 0.35 airOutlet - zeroGradient zeroGradient air_to_interconnect - noSlip zeroGradient air_to_electrolyte - noSlip zeroGradient <u>airSides</u> <u>-</u> <u>noSlip</u> <u>zeroGradient</u> <u>-</u> <u>fuel</u> fuelInlet - (0 _._ 161 0 0) <sup>_<u>⊤</u>_</sup> m _/_ s YH2 = 0.65, YH2O = 0.35 fuelOutlet - zeroGradient zeroGradient fuel_to_interconnect - noSlip zeroGradient fuel_to_electrolyte - noSlip zeroGradient <u>fuelSides</u> <u>-</u> <u>noSlip</u> <u>zeroGradient</u> <u>-</u> <u>phiI</u> electrolyteSides - - - zeroGradient electrolyte_to_air - - - coupled flux <u>electrolyte_to_fuel</u> <u>-</u> <u>-</u> <u>-</u> <u>coupled</u> <u>jump</u> <u>phiEA</u> anodeSides - - - zeroGradient interconnectDown - - - 0 V <u>phiEA_to_electrolyte</u> <u>-</u> <u>-</u> <u>-</u> <u>coupled</u> <u>flux</u> <u>phiEC</u> cathodeSides - - - zeroGradient interconnectUp - - - adjustedPotential <u>phiEC_to_electrolyte</u> <u>-</u> <u>-</u> <u>-</u> <u>coupled</u> <u>jump</u> <u>Global</u> <u>region</u> airInlet 363.15 K - - airOutlet zeroGradient - - fuelInlet 363.15 K - - fuelOutlet zeroGradient - - interconnectSides zeroGradient - - interconnectUp 363.15 K - - interconnectDown 363.15 K - - Figure 13: Mesh and simulation domain The cell under consideration consists of a single channel with a length of 20 mm, where the fluid channels have an area of 1 _×_ 1 mm. The simulation itself is steady state and the velocity used for the boundary condition at the fluid inlets is given by a constant stoichiometry of _λ_ = 3 calculated via Faraday’s law. The temperature of the incoming gases is set to _T_ = 90 <sup>_◦_</sup> C and a mean current density of _i_ = 8000 A _/_ m <sup>2</sup> is applied. Figure 14 shows the corresponding velocity and species mass fraction contours at different positions along the channel inside the anodic and cathodic fluid regions. (a) Velocity distribution (b) Species mass fractions Figure 14: Velocity and species mass fraction distribution along the channels for _i_ = 8000 <sup>A</sup> _/_ m <sup>2</sup> At the air side the velocity increases due to the combination of the reaction and decreased density of the gas mixture, dragged water and the development of the velocity profile, since a constant velocity is specified at the inlet. For the fuel side, the velocity is decreasing, mainly due to the dragged water and the consumption of hydrogen. This corresponds to the mass fraction contours, where the oxygen and hydrogen mass fraction decreases in flow direction. The main focus within this example is in the surface coupling of the potential. The reactions take place on the infinitesimally thin CL and at this interface the coupled jump/flux boundary conditions for the potential are prescribed (see Table 10). Figure 15a shows the potential variation in the middle of the cell going from the upper surface of the GDL at the cathode to the lower surface of the GDL at the anode. Due to the high electric conductivity of the porous media, the potential drop there is comparatively low. At the CLs however, the resulting overpotentials arising from the reactions induce a jump in the potential. Another noticeable potential drop can be found in the membrane because of the low ionic conductivity of the membrane. In addition to this, Figure 15b shows the polarization curve as a result of conducting the simulation for different current densities. The polarization curve of a PEM fuel cell exhibits a characteristic pattern, featuring a non-linear region at low current densities, which is primarily influenced by the activation overpotential, and a subsequent linear ohmic region, predominantly governed by the internal resistances within the cell. 0 0 _._ 1 0 _._ 2 0 _._ 3 0 _._ 4 0 _._ 5 0 _._ 6 0 _._ 7 0 _._ 8 0 _._ 9 1 0 _._ 6 0 _._ 4 0 _._ 2 0 _−_ 0 _._ 2 _−_ 0 _._ 4 ~~Jump~~ ~~(cathode)~~ ~~Jump~~ ~~(anode)~~ _−_ 2 _._ 5 _−_ 2 _−_ 1 _._ 5 _−_ 1 _−_ 0 _._ 5 0 0 _._ 5 1 1 _._ 5 2 2 _._ 5 1 0 _._ 8 0 _._ 6 0 _._ 4 _·_ 10 <sup>4</sup> Location in m _·_ 10 <sup>_−_</sup> <sup>4</sup> (a) Potential distribution in the middle of the cell from the top of the cathode to the buttom of the anode GDL for _i_ = 6000 A _/_ m <sup>2</sup> Current density _i_ in A/m <sup>2</sup> (b) Polarization curve Figure 15: Potential distribution along the middle of the cell (a) and the polarization curve (b) _7.4._ _Air_ _bubble_ _rising_ _in_ _water_ The last two cases demonstrate the usage of `multiRegionFoam` to implement a moving mesh ALE interface tracking method, originally developed by Hirt et al. [72] and originally implemented into OpenFOAM by Tuković and Jasak [73]. A single air bubble rising in still pure water is considered, following the setup of Duineveld [74] and using his experimental data for validation. The bubble assumes an initial spherical shape with radius _rb_ and accelerates from zero velocity at release to its terminal rise velocity. As shown in Figure 16, the computational domain has two regions comprising the bubble and the outer medium which is represented by a sphere of radius 20 _rb_ . The bubble mesh is bounded by the "interfaceShadow" patch which coincides with the "interface" patch from the liquid side forming the bubble-liquid interface where the coupled boundary conditions are imposed according to Table 11. The meshes consist of polyhedral cells for the bubble and prismatic cells with a polyhedral base for the water, as shown in Figure 17. FluidA FluidB _rb_ interfaceShadow interface space g Figure 16: Sketch of the computational domain for the rising bubble simulation Figure 17: Mesh for the rising bubble simulation Table 11: Boundary conditions for the rising bubble simulation <u>Boundary</u> <u>Pressure</u> <u>Velocity</u> <u>FluidA</u> interface genericInterfaceCoupledPressureValue genericInterfaceCoupledVelocityFlux <u>space</u> <u>zeroGradient</u> <u>inletOutlet</u> <u>FluidB</u> interfaceShadow genericInterfaceCoupledPressureFlux genericInterfaceCoupledVelocityValue The study considered bubbles with equivalent initial radii of _rb_ = 0 _._ 5 _,_ 0 _._ 6 _,_ 0 _._ 7 _,_ 0 _._ 8 _,_ and 0 _._ 9 mm. The physical properties of the bubble and the surrounding liquid are reported in Table 12. The simulations run with time step size of ∆ _t_ = 1 _e_ <sup>_−_</sup> <sup>5</sup> s until the terminal rise velocities are observed. The numerical schemes used are listed in Table 6. The results are compared with the experimental data obtained by Duineveld [74], as well as the Table 12: Physical properties for the rising bubble simulation <u>Property</u> <u>FluidB</u> <u>(Air)</u> <u>FluidA</u> <u>(Water)</u> Density 1 _._ 205 <sup>kg</sup> _/_ m <sup>3</sup> 998 _._ 3 <sup>kg</sup> _/_ m <sup>3</sup> Dynamic viscosity 1 _._ 82 _e_ <sup>_−_</sup> <sup>5</sup> <sup>kg</sup> _/_ ms 1 _e_ <sup>_−_</sup> <sup>3</sup> <sup>kg</sup> _/_ ms Surface tension coefficient 0 _._ 0727 <sup>N</sup> _/_ m Table 13: Numerical schemes for the rising bubble simulation <u>Scheme</u> <u>Setting</u> <u>Time</u> <u>Scheme</u> <u>ddtScheme</u> <u>backward</u> Finite Volume Schemes gradScheme Gauss linear divScheme div(phi,U) Gauss GammaVDC 0.5 divScheme div(phi,T) Gauss linearUpwind Gauss linear lapacianScheme Gauss linear corrected interpolationScheme linear <u>snGradScheme</u> <u>corrected</u> Finite Area Schemes gradScheme Gauss linear divScheme Gauss linear interpolationScheme linear simulation results from Tuković and Jasak [73]. Figure 18 depicts the rise velocity of the bubble with radius _rb_ = 0 _._ 5 mm over time until the expected terminal rise velocity value is attained. Figure 19 shows the final shape of the bubble at time 0 _._ 1 s color-coded by the magnitude of velocity and pressure fields along with the velocity streamlines of the flow surrounding the bubble and inside it. Figure 20 displays the terminal rise velocity for larger bubbles. The high level of agreement between the simulation results and the available data from the literature indicates that the present work has successfully addressed any potential robustness issues related to significant mesh deformation. Figure 21 depicts the terminal state of the rising bubble with _rb_ = 0 _._ 9 mm. Figure 18: The rise velocity over time for bubble with radius _rb_ = 0 _._ 5 mm compared with the experiment results Figure 19: Velocity and pressure fields visualisation at time 0 _._ 1 s Figure 20: Comparison of the terminal rise velocity for varying equivalent bubble radii Figure 21: Velocity field visualisation for the rising bubble with _rb_ = 0 _._ 9 _7.5._ _Air_ _bubble_ _oscillating_ _in_ _water_ Another typical benchmark problem for interface tracking codes involves an air bubble oscillating in a liquid due to interfacial tension in the absence of gravitational forces. The bubble is initially slightly deformed from the shape of a sphere with radius _R_ . This results in an initial prolate shape with a semi-major axis _R_ + _a_ 0 as shown in Figure 22. The boundary conditions, the mesh, and the numerical schemes are the same as in the rising bubble case (Section 7.4). The simulation parameters are summarized in Table 14 as suggested in [75]. The shape oscillation of the bubble is realised by tracing the temporal evolution of the semi-major axis as illustrated in Figure 23. The results exhibit high agreement with the analytical decay profile which is given for small linear oscillations by _a_ 0 _e_ <sup>_−t/τ_</sup>, where _τ_ <sup>_−_</sup> <sup>1</sup> is the decay factor defined in [76]. FluidA FluidB R R+ _a_ 0 Figure 22: Sketch of the computational domain for the oscillating bubble simulation Table 14: Simulation parameters for the oscillating bubble simulation _ρA_ _ρB_ _µA_ _µB_ _σ_ _R_ _a_ 0 1000 <sup>kg</sup> _/_ m <sup>3</sup> 1 _._ 226 <sup>kg</sup> _/_ m <sup>3</sup> 1 _._ 13 _e_ <sup>_<u>−</u>_</sup> <sup>3</sup> <sup>kg</sup> _/_ ms 1 _._ 78 _e_ <sup>_<u>−</u>_</sup> <sup>5</sup> <sup>kg</sup> _/_ ms 0 _._ 0727 <sup>N</sup> _/_ m 1 m 0 _._ 05 m Figure 23: Time evolution of the oscillating bubble compared to the analytical decay profile 8. Summary and Outlook The present contribution sets out `multiRegionFoam`, a unified framework for multiphysics problems of multiregion coupling type within OpenFOAM (FOAM-extend). `multiRegionFoam` offers a flexible design that allows for the assembly of multiphysics problems region-by-region and the specification of coupling conditions interfaceby-interface. For this, the framework enables to formulate region-specific physics in form of sets of partial differential equations in a modular fashion and incorporates mathematical jump/transmission conditions in their most general form – accommodating tensors of any rank. This advancement allows for a unified treatment of coupled transport processes across regions. Moreover, users have the freedom to choose between monolithic and partitioned coupling for each coupled transport equation separately. To address fluid flow problems, the code implements various pressure-velocity algorithms, including SIMPLE, PISO, and PIMPLE, incorporating loops of predictor and corrector steps across regions. The framework’s maturity and versatility is demonstrated through its successful deployment in various multi-region coupling cases, including multiphase flows, conjugate heat transfer, and fuel cells. The authors anticipate that the creation and release of `multiRegionFoam` will empower numerous domain experts and developers to derive significant advantages from this framework. Specifically, they aspire for this contribution to facilitate thorough investigations in diverse domains of multiphysics problems and across various application areas. This, in turn, is expected to foster synergistic collaborations among previously separate disciplines, enabling mutual benefits to be realized. Acknowledgment The authors H.A. M.E.F. and H.M. are grateful for the funding by the Hessian Ministry of Higher Education, Research, Science and the Arts, and the National High Performance Computing Center for Computational Engineering Science (NHR4CES). S.H. is funded by the AI Data Analytics and Scalable Simulations (AIDAS) project, the financial support of which is highly appreciated. Computations for this work were partly conducted on the Lichtenberg II high performance computer of the Technical University of Darmstadt. References [1] H. G. Weller, G. Tabor, H. Jasak, C. Fureby, A tensorial approach to computational continuum mechanics using object-oriented techniques, Computers in Physics 12 (6) (1998) 620–631. `[doi:10.1063/1.168744](https://doi.org/10.1063/1.168744)` . [2] S. Kataoka, S. Minami, H. Kawai, T. Yamada, S. Yoshimura, A parallel iterative [partitioned](https://doi.org/10.1007/s00466-013-0973-1) coupling [analysis system for large-scale acoustic fluid–structure interactions, Computational Mechanics 53 (6) (2014)](https://doi.org/10.1007/s00466-013-0973-1) 1299–1310, publisher: Springer Science and Business Media LLC. `[doi:10.1007/s00466-013-0973-1](https://doi.org/10.1007/s00466-013-0973-1)` . URL `[https://doi.org/10.1007/s00466-013-0973-1](https://doi.org/10.1007/s00466-013-0973-1)` [3] MpCCI - interfaces for [co-simulation](https://www.mpcci.de/en/mpcci-software.html) and mapping. URL `[https://www.mpcci.de/en/mpcci-software.html](https://www.mpcci.de/en/mpcci-software.html)` [4] W. Joppich, M. Kürschner, MpCCI—a tool for the [simulation](https://doi.org/10.1002/cpe.913) of coupled applications, Concurrency and Computation: Practice and Experience 18 (2) (2005) 183–192, publisher: Wiley. `[doi:10.1002/cpe.913](https://doi.org/10.1002/cpe.913)` . URL `[https://doi.org/10.1002/cpe.913](https://doi.org/10.1002/cpe.913)` [5] [S. Buis, A. Piacentini, Damien Déclat, PALM: a computational framework for assembling high-performance](https://doi.org/10.1002/cpe.914) computing [applications,](https://doi.org/10.1002/cpe.914) Concurrency and Computation: Practice and Experience 18 (2) (2005) 231–245, publisher: Wiley. `[doi:10.1002/cpe.914](https://doi.org/10.1002/cpe.914)` . URL `[https://doi.org/10.1002/cpe.914](https://doi.org/10.1002/cpe.914)` [6] F. Duchaine, S. Jauré, D. Poitou, E. Quémerais, G. Staffelbach, T. Morel, L. Gicquel, [Analysis](https://doi.org/10.1088/1749-4699/8/1/015003) of high performance conjugate heat [transfer](https://doi.org/10.1088/1749-4699/8/1/015003) with the OpenPALM coupler, Computational Science & Discovery 8 (1) (2015) 015003, publisher: IOP Publishing. `[doi:10.1088/1749-4699/8/1/015003](https://doi.org/10.1088/1749-4699/8/1/015003)` . URL `[https://doi.org/10.1088/1749-4699/8/1/015003](https://doi.org/10.1088/1749-4699/8/1/015003)` [7] S. Valcke, The OASIS3 coupler: a European [climate](https://doi.org/10.5194/gmd-6-373-2013) modelling community software, Geoscientific Model Development 6 (2) (2013) 373–388, publisher: Copernicus GmbH. `[doi:10.5194/gmd-6-373-2013](https://doi.org/10.5194/gmd-6-373-2013)` . URL `[https://doi.org/10.5194/gmd-6-373-2013](https://doi.org/10.5194/gmd-6-373-2013)` [8] A. Craig, S. Valcke, L. Coquart, Development and performance of a new version of the OASIS cou [pler, OASIS3-MCT_3.0, Geoscientific Model Development 10 (9) (2017) 3297–3308, publisher:](https://doi.org/10.5194/gmd-10-3297-2017) Copernicus GmbH. `[doi:10.5194/gmd-10-3297-2017](https://doi.org/10.5194/gmd-10-3297-2017)` . URL `[https://doi.org/10.5194/gmd-10-3297-2017](https://doi.org/10.5194/gmd-10-3297-2017)` [9] R. Pawlowski, Physics Integration [KErnels](https://www.osti.gov/biblio/1253615) (PIKE), Version 00 (Jul. 2014). URL `[https://www.osti.gov/biblio/1253615](https://www.osti.gov/biblio/1253615)` [10] The Trilinos [Project](https://trilinos.github.io/) Website. URL `[https://trilinos.github.io/](https://trilinos.github.io/)` [11] H.-J. Bungartz, F. Lindner, B. Gatzhammer, M. Mehl, K. Scheufele, A. Shukaev, B. Uekermann, [preCICE](https://doi.org/10.1016/j.compfluid.2016.04.003) - A fully parallel library for [multi-physics](https://doi.org/10.1016/j.compfluid.2016.04.003) surface coupling, Computers & Fluids 141 (2016) 250–258, publisher: Elsevier BV. `[doi:10.1016/j.compfluid.2016.04.003](https://doi.org/10.1016/j.compfluid.2016.04.003)` . URL `[https://doi.org/10.1016/j.compfluid.2016.04.003](https://doi.org/10.1016/j.compfluid.2016.04.003)` [12] preCICE coupling library for [partitioned](https://precice.org/index.html) multi-physics simulations. URL `[https://precice.org/index.html](https://precice.org/index.html)` [13] E. Casoni, A. Jérusalem, C. Samaniego, B. Eguzkitza, P. Lafortune, D. Tjahjanto, X. Sáez, G. Houzeaux, M. Vázquez, Alya: computational solid mechanics for supercomputers, Archives of Computational Methods in Engineering 22 (4) (2015) 557–576, publisher: Springer. `[doi:10.1007/s11831-014-9126-8](https://doi.org/10.1007/s11831-014-9126-8)` . [14] Alya - high performance [computational](https://www.bsc.es/research-development/research-areas/engineering-simulations/alya-high-performance-computational) mechanics. URL `[https://www.bsc.es/research-development/research-areas/engineering-simulations/aly](https://www.bsc.es/research-development/research-areas/engineering-simulations/alya-high-performance-computational)` ``` a-high-performance-computational ``` [15] J. C. Cajas, G. Houzeaux, M. Vázquez, M. García, E. Casoni, H. Calmet, A. Artigues, R. Borrell, O. Lehmkuhl, D. Pastrana, others, Fluid-structure interaction based on HPC multicode coupling, SIAM Journal on Scientific Computing 40 (6) (2018) C677–C703, publisher: SIAM. `[doi:10.1137/17M1138868](https://doi.org/10.1137/17M1138868)` . [16] [code_saturne.](https://www.code-saturne.org/cms/web/) URL `[https://www.code-saturne.org/cms/web/](https://www.code-saturne.org/cms/web/)` [17] PLE (Parallel Location [and](https://www.code-saturne.org/documentation/ple-2.0/html/index.html) Exchange) documentation. URL `[https://www.code-saturne.org/documentation/ple-2.0/html/index.html](https://www.code-saturne.org/documentation/ple-2.0/html/index.html)` [18] [SYRTHES.](https://www.edf.fr/en/the-edf-group/inventing-the-future-of-energy/r-d-global-expertise/our-offers/simulation-softwares/syrthes?logiciel=10818) URL `[https://www.edf.fr/en/the-edf-group/inventing-the-future-of-energy/r-d-global-exp](https://www.edf.fr/en/the-edf-group/inventing-the-future-of-energy/r-d-global-expertise/our-offers/simulation-softwares/syrthes?logiciel=10818)` ``` ertise/our-offers/simulation-softwares/syrthes?logiciel=10818 ``` [19] M. Zavala-Aké, D. Mira, M. Vázquez, G. Houzeaux, A partitioned methodology for conjugate heat transfer on dynamic structures, in: E. Di Napoli, M.-A. Hermanns, H. Iliev, A. Lintermann, A. Peyser (Eds.), High-Performance Scientific Computing, Vol. 10164, Springer International Publishing, Cham, 2017, pp. 37–47. `[doi:10.1007/978-3-319-53862-4\_4](https://doi.org/10.1007/978-3-319-53862-4_4)` . [20] S. Houbar, A. Gerschenfeld, G. Allaire, Simulation of the fluid-structure interaction involving two-phase flow and hexagonal structures in a nuclear reactor core, in: 14th WCCM-ECCOMAS Congress 2020, Vol. 1500, 2021. `[doi:10.23967/wccm-eccomas.2020.232](https://doi.org/10.23967/wccm-eccomas.2020.232)` . [21] deal.ii - an open [source](https://www.dealii.org/) finite element library. URL `[https://www.dealii.org/](https://www.dealii.org/)` [22] T. Wick, Solving monolithic fluid-structure interaction problems in arbitrary lagrangian eulerian coordi nates with the deal. ii library, Archive of Numerical Software 1 (1) (2013) 1–19. `[doi:10.11588/ans.201](https://doi.org/10.11588/ans.2013.1.10305)` `[3.1.10305](https://doi.org/10.11588/ans.2013.1.10305)` . [23] deal.ii [publications.](https://www.dealii.org/publications.html) URL `[https://www.dealii.org/publications.html](https://www.dealii.org/publications.html)` [24] [FEniCS](https://fenicsproject.org/) project. URL `[https://fenicsproject.org/](https://fenicsproject.org/)` [25] FEniCS [FEA](https://www.featool.com/doc/fenics) Solver. URL `[https://www.featool.com/doc/fenics](https://www.featool.com/doc/fenics)` [26] W. Liu, S. M. Longshaw, A. Skillen, D. R. Emerson, C. Valente, F. Gambioli, A high-performance open source solution for multiphase fluid-structure interaction, International Journal of Offshore and Polar Engineering 32 (01) (2022) 24–30, publisher: OnePetro. `[doi:10.17736/ijope.2022.jc844](https://doi.org/10.17736/ijope.2022.jc844)` . [27] [A. Budisa, X. Hu, M. Kuchta, K.-A. Mardal, L. Zikatanov, Haznics – software components for multiphysics](https://arxiv.org/abs/2210.13274) [problems](https://arxiv.org/abs/2210.13274) (2022). `[doi:10.48550/ARXIV.2210.13274](https://doi.org/10.48550/ARXIV.2210.13274)` . URL `[https://arxiv.org/abs/2210.13274](https://arxiv.org/abs/2210.13274)` [28] MOOSE multiphysics [object-oriented](https://mooseframework.inl.gov/index.html) simulation environment. URL `[https://mooseframework.inl.gov/index.html](https://mooseframework.inl.gov/index.html)` [29] C. J. Permann, D. R. Gaston, D. Andrš, R. W. Carlsen, F. Kong, A. D. Lindsay, J. M. Miller, J. W. Peterson, A. E. Slaughter, R. H. Stogner, others, MOOSE: Enabling massively parallel multiphysics simulation, SoftwareX 11 (2020) 100430, publisher: Elsevier. `[doi:10.1016/j.softx.2020.100430](https://doi.org/10.1016/j.softx.2020.100430)` . [30] S. L. Dhulipala, C. Bolisetti, L. B. Munday, W. M. Hoffman, C.-C. Yu, F. U. H. Mir, F. Kong, A. D. Lind say, A. S. Whittaker, Development, verification, and validation of comprehensive acoustic fluid-structure interaction capabilities in an open-source computational platform, Earthquake Engineering & Structural DynamicsPublisher: Wiley Online Library (2022). `[doi:10.1002/eqe.3659](https://doi.org/10.1002/eqe.3659)` . [31] P. Cardiff, A. Karač, P. De Jaeger, H. Jasak, J. Nagy, A. Ivanković, Z. Tuković, An open-source finite volume toolbox for solid mechanics and fluid-solid interaction simulations, arXiv preprint arXiv:1808.10736 (2018). `[doi:10.48550/arXiv.1808.10736](https://doi.org/10.48550/arXiv.1808.10736)` . [32] S. B. Beale, H. W. Choi, J. G. Pharoah, H. K. Roth, H. Jasak, D. H. Jeon, Open-source computational model of a solid oxide fuel cell, Computer Physics Communications 200 (2016) 15–26. `[doi:10.1016/j.cp](https://doi.org/10.1016/j.cpc.2015.10.007)` `[c.2015.10.007](https://doi.org/10.1016/j.cpc.2015.10.007)` . [33] P. Renze, K. Akermann, Simulation of conjugate heat transfer in thermal processes with open source CFD, ChemEngineering 3 (2) (2019) 59, publisher: MDPI AG. `[doi:10.3390/chemengineering3020059](https://doi.org/10.3390/chemengineering3020059)` . [34] New modular solver framework for [single-](https://github.com/OpenFOAM/OpenFOAM-dev/commit/968e60148ab31ec017f275673496d6193713d7e5) and multi-region simulations. URL `[https://github.com/OpenFOAM/OpenFOAM-dev/commit/968e60148ab31ec017f275673496d61937](https://github.com/OpenFOAM/OpenFOAM-dev/commit/968e60148ab31ec017f275673496d6193713d7e5)` ``` 13d7e5 ``` [35] YALES2 [public](https://www.coria-cfd.fr/index.php/YALES2) page. URL `[https://www.coria-cfd.fr/index.php/YALES2](https://www.coria-cfd.fr/index.php/YALES2)` [36] P. Sarkar, G. Ghigliotti, J.-P. Franc, M. Fivel, Mechanism of material deformation during cavitation bubble collapse, Journal of Fluids and Structures 105 (2021) 103327, publisher: Elsevier. `[doi:10.1016/j.jfluid](https://doi.org/10.1016/j.jfluidstructs.2021.103327)` `[structs.2021.103327](https://doi.org/10.1016/j.jfluidstructs.2021.103327)` . [37] L. Boulet, P. Bénard, G. Lartigue, V. Moureau, S. Didorally, N. Chauvet, F. Duchaine, Modeling of conjugate heat transfer in a kerosene/air spray flame used for aeronautical fire resistance tests, Flow, Turbulence and Combustion 101 (2) (2018) 579–602, publisher: Springer. `[doi:10.1007/s10494-018-996](https://doi.org/10.1007/s10494-018-9965-8)` `[5-8](https://doi.org/10.1007/s10494-018-9965-8)` . [38] OpenPALM, a [dynamic](https://www.cerfacs.fr/globc/PALM_WEB/) parallel code coupler. URL `[https://www.cerfacs.fr/globc/PALM_WEB/](https://www.cerfacs.fr/globc/PALM_WEB/)` [39] COMSOL [multiphysics.](https://www.comsol.com/) URL `[https://www.comsol.com/](https://www.comsol.com/)` [40] FEATool [multiphysics.](https://www.featool.com/) URL `[https://www.featool.com/](https://www.featool.com/)` [41] Ansys fluent. URL `[https://www.ansys.com/products/fluids/ansys-fluent#tab1-2](https://www.ansys.com/products/fluids/ansys-fluent#tab1-2)` [42] Ansys LS-DYNA [multiphysics](https://www.ansys.com/products/structures/ansys-ls-dyna) solver. URL `[https://www.ansys.com/products/structures/ansys-ls-dyna](https://www.ansys.com/products/structures/ansys-ls-dyna)` [43] A. D. Gosman, W. M. Pun, A. K. Runchal, D. B. Spalding, M. Wolfshtein, Heat and Mass Transfer in Recirculating Flows, Academic Press, London, 1969. [44] D. Bothe, Sharp-interface continuum thermodynamics of multicomponent fluid systems with interfacial [mass,](https://linkinghub.elsevier.com/retrieve/pii/S0020722522001008) International Journal of Engineering Science 179 (2022) 103731. `[doi:10.1016/j.ijengsci.2022.](https://doi.org/10.1016/j.ijengsci.2022.103731)` `[103731](https://doi.org/10.1016/j.ijengsci.2022.103731)` . URL `[https://linkinghub.elsevier.com/retrieve/pii/S0020722522001008](https://linkinghub.elsevier.com/retrieve/pii/S0020722522001008)` [45] J. C. Slattery, L. M. Sagis, E.-S. Oh, Interfacial transport phenomena, 2nd Edition, Springer, New York, 2007. [46] M. Ishii, T. Hibiki, Thermo-fluid dynamics of two-phase flow, 2nd Edition, Springer, New York, 2011, oCLC: ocn690084123. [47] S. Kjelstrup, D. Bedeaux, Non-Equilibrium [Thermodynamics](https://www.worldscientific.com/worldscibooks/10.1142/6672) of Heterogeneous Systems, Vol. 16 of Series on Advances in Statistical Mechanics, WORLD SCIENTIFIC, Norway, 2008. `[doi:10.1142/6672](https://doi.org/10.1142/6672)` . URL `[https://www.worldscientific.com/worldscibooks/10.1142/6672](https://www.worldscientific.com/worldscibooks/10.1142/6672)` [48] J. Casey, On the derivation of jump conditions in continuum mechanics, International Journal of Structural Changes inSolids - Machanics and Applications 3 (2) (2011) 61–84. [49] P. Cermelli, E. Fried, M. E. Gurtin, Transport relations for surface [integrals](http://www.journals.cambridge.org/abstract_S0022112005006695) arising in the formulation of balance laws for [evolving](http://www.journals.cambridge.org/abstract_S0022112005006695) fluid interfaces, Journal of Fluid Mechanics 544 (-1) (2005) 339. `[doi:10.1017/](https://doi.org/10.1017/S0022112005006695)` `[S0022112005006695](https://doi.org/10.1017/S0022112005006695)` . URL `[http://www.journals.cambridge.org/abstract_S0022112005006695](http://www.journals.cambridge.org/abstract_S0022112005006695)` [50] C. Habes, Towards a unified multiphysics [framework](https://tuprints.ulb.tu-darmstadt.de/id/eprint/23030) applied to reactive bubbly flowsPublisher: UNSPEC IFIED (2023). `[doi:10.26083/TUPRINTS-00023030](https://doi.org/10.26083/TUPRINTS-00023030)` . URL `[https://tuprints.ulb.tu-darmstadt.de/id/eprint/23030](https://tuprints.ulb.tu-darmstadt.de/id/eprint/23030)` [51] B. Uekermann, B. Gatzhammer, M. Mehl, Coupling algorithms for partitioned multi-physics simulations, in: E. Plödereder, L. Grunske, E. Schneider, D. Ull (Eds.), Informatik 2014, Gesellschaft für Informatik e.V., Bonn, 2014, pp. 113–124. [52] A. Toselli, O. B. Widlund, Domain decomposition methods–algorithms and theory, no. 34 in Springer series in computational mathematics, Springer, Berlin, 2005, oCLC: ocm56879011. [53] B. F. Smith, P. E. Bjørstad, W. Gropp, W. D. Gropp, Domain decomposition: parallel multilevel methods for elliptic partial differential equations, 1st Edition, Cambridge Univ. Press, Cambridge, 2004. [54] B. Gatzhammer, Efficient and flexible partitioned simulation of fluid-structure interactions, 1st Edition, Informatik, Verl. Dr. Hut, München, 2015. [55] B. M. Irons, R. C. Tuck, A version of the Aitken [accelerator](https://onlinelibrary.wiley.com/doi/10.1002/nme.1620010306) for computer iteration, International Journal for Numerical Methods in Engineering 1 (3) (1969) 275–277. `[doi:10.1002/nme.1620010306](https://doi.org/10.1002/nme.1620010306)` . URL `[https://onlinelibrary.wiley.com/doi/10.1002/nme.1620010306](https://onlinelibrary.wiley.com/doi/10.1002/nme.1620010306)` [56] J. Degroote, R. Haelterman, S. Annerel, P. Bruggeman, J. Vierendeels, Performance of [partitioned](https://linkinghub.elsevier.com/retrieve/pii/S0045794909003022) proce dures in [fluid–structure](https://linkinghub.elsevier.com/retrieve/pii/S0045794909003022) interaction, Computers & Structures 88 (7-8) (2010) 446–457. `[doi:10.1016/j.co](https://doi.org/10.1016/j.compstruc.2009.12.006)` `[mpstruc.2009.12.006](https://doi.org/10.1016/j.compstruc.2009.12.006)` . URL `[https://linkinghub.elsevier.com/retrieve/pii/S0045794909003022](https://linkinghub.elsevier.com/retrieve/pii/S0045794909003022)` [57] run time selection mechanism [heat](https://openfoamwiki.net/index.php/OpenFOAM_guide/runTimeSelection_mechanism) exchanger - openfoamwiki. URL `[https://openfoamwiki.net/index.php/OpenFOAM_guide/runTimeSelection_mechanism](https://openfoamwiki.net/index.php/OpenFOAM_guide/runTimeSelection_mechanism)` [58] P. Stevens, R. Pooley, Using UML: software engineering with objects and components, Addison-Wesley Longman Publishing Co., Inc., US, 1999. [59] [coupledFvMatrix.](https://sourceforge.net/p/foam-extend/foam-extend-4.1/ci/master/tree/src/coupledMatrix/coupledFvMatrices/coupledFvMatrix) URL `[https://sourceforge.net/p/foam-extend/foam-extend-4.1/ci/master/tree/src/coupledMat](https://sourceforge.net/p/foam-extend/foam-extend-4.1/ci/master/tree/src/coupledMatrix/coupledFvMatrices/coupledFvMatrix)` ``` rix/coupledFvMatrices/coupledFvMatrix ``` [60] R. I. Issa, Solution of the implicitly discretised fluid flow equations by operator-splitting, Journal of Com putational Physics 62 (1) (1986) 40–65. `[doi:https://doi.org/10.1016/0021-9991(86)90099-9](https://doi.org/https://doi.org/10.1016/0021-9991%0x2886%0x2990099-9)` . [61] S. V. Patankar, D. B. Spalding, A calculation procedure for heat, mass and momentum transfer in three dimensional parabolic flows, International Journal of Heat and Mass Transfer 15 (10) (1972) 1787–1806. `[doi:https://doi.org/10.1016/0017-9310(72)90054-3](https://doi.org/https://doi.org/10.1016/0017-9310%0x2872%0x2990054-3)` . [62] K. Davis, M. Schulte, B. Uekermann, Enhancing Quasi-Newton [Acceleration](https://www.mdpi.com/2297-8747/27/3/40) for Fluid-Structure Interac [tion,](https://www.mdpi.com/2297-8747/27/3/40) Mathematical and Computational Applications 27 (3) (2022) 40. `[doi:10.3390/mca27030040](https://doi.org/10.3390/mca27030040)` . URL `[https://www.mdpi.com/2297-8747/27/3/40](https://www.mdpi.com/2297-8747/27/3/40)` [63] W. Gropp, E. Lusk, N. Doss, A. Skjellum, A high-performance, [portable](https://linkinghub.elsevier.com/retrieve/pii/0167819196000245) implementation of the MPI message passing [interface](https://linkinghub.elsevier.com/retrieve/pii/0167819196000245) standard, Parallel Computing 22 (6) (1996) 789–828. `[doi:10.1016/0167-819](https://doi.org/10.1016/0167-8191%0x2896%0x2900024-5)` `[1(96)00024-5](https://doi.org/10.1016/0167-8191%0x2896%0x2900024-5)` . URL `[https://linkinghub.elsevier.com/retrieve/pii/0167819196000245](https://linkinghub.elsevier.com/retrieve/pii/0167819196000245)` [64] Z. Tuković, A. Karač, P. Cardiff, H. Jasak, A. Ivanković, [OpenFOAM Finite Volume Solver for Fluid-Solid](http://hrcak.srce.hr/206941) [Interaction,](http://hrcak.srce.hr/206941) Transactions of FAMENA 42 (3) (2018) 1–31. `[doi:10.21278/TOF.42301](https://doi.org/10.21278/TOF.42301)` . URL `[http://hrcak.srce.hr/206941](http://hrcak.srce.hr/206941)` [65] [oftest.](https://oftest.readthedocs.io/en/latest/readme.html) URL `[https://oftest.readthedocs.io/en/latest/readme.html](https://oftest.readthedocs.io/en/latest/readme.html)` [66] M. Vynnycky, S. Kimura, K. Kanev, I. Pop, Forced convection heat transfer from a flat plate: the conjugate problem, International Journal of Heat and Mass Transfer 41 (1) (1998) 45–59. `[doi:10.1016/S0017-931](https://doi.org/10.1016/S0017-9310%0x2897%0x2900113-0)` `[0(97)00113-0](https://doi.org/10.1016/S0017-9310%0x2897%0x2900113-0)` . [67] [chtRcTemperature.](https://sourceforge.net/p/foam-extend/foam-extend-4.1/ci/master/tree/src/conjugateHeatTransfer/fvPatchFields/chtRcTemperature/) URL `[https://sourceforge.net/p/foam-extend/foam-extend-4.1/ci/master/tree/src/conjugateH](https://sourceforge.net/p/foam-extend/foam-extend-4.1/ci/master/tree/src/conjugateHeatTransfer/fvPatchFields/chtRcTemperature/)` ``` eatTransfer/fvPatchFields/chtRcTemperature/ ``` [68] Chris Greenshields, OpenFOAM v10 User [Guide](https://doc.cfd.direct/openfoam/user-guide-v10/fvschemes) - 4.5 Numerical schemes (Jul. 2022). URL `[https://doc.cfd.direct/openfoam/user-guide-v10/fvschemes](https://doc.cfd.direct/openfoam/user-guide-v10/fvschemes)` [69] Heat exchanger [-](https://www.simscale.com/projects/cheunglucia/heat_exchanger_-_cht_simulation/) CHT simulation. URL `[https://www.simscale.com/projects/cheunglucia/heat_exchanger_-_cht_simulation/](https://www.simscale.com/projects/cheunglucia/heat_exchanger_-_cht_simulation/)` [70] [openFuelCell.](https://openfuelcell.sourceforge.io/) URL `[https://openfuelcell.sourceforge.io/](https://openfuelcell.sourceforge.io/)` [71] S. Zhang, Modeling and Simulation of Polymer Electrolyte Fuel Cells, Springer, Forschungszentrum Jülich, 2020. [72] C. W. Hirt, A. A. Amsden, J. L. Cook, An Arbitrary Lagrangian-Eulerian Computing Method for All Flow Speeds, Journal of Computational Physics 14 (3) (1974) 227–253. `[doi:10.1016/0021-9991(74)90051-5](https://doi.org/10.1016/0021-9991%0x2874%0x2990051-5)` . [73] Z. Tuković, H. Jasak, A Moving mesh finite volume interface tracking method for surface tension dominated interfacial fluid flow, Computers & Fluids 55 (2012) 70–84, publisher: Elsevier BV. `[doi:10.1016/j.comp](https://doi.org/10.1016/j.compfluid.2011.11.003)` `[fluid.2011.11.003](https://doi.org/10.1016/j.compfluid.2011.11.003)` . [74] P. C. Duineveld, The rise velocity and shape of bubbles in pure water at high reynolds number, Journal of Fluid Mechanics 292 (1995) 325–332. `[doi:10.1017/S0022112095001546](https://doi.org/10.1017/S0022112095001546)` . [75] L. B., Simulation numérique directe des oscillations, de la déformation et de la rupture d’une bulle en ascension dans un écoulement instationnaire, PhD Thesis, Institut de Mécanique des Fluides de Toulouse (2012). [76] A. Prosperetti, et al., Normal-mode analysis for the oscillations of a viscous liquid drop in an immiscible liquid (1980).

섹션 본문

섹션 본문이 없습니다.

참고문헌

참고문헌 정보가 없습니다.