Full text
V. Tsiolakis, M. Giacomini, R. Sevilla, C. Othmer and A. Huerta, “Nonintrusive proper generalised decomposition for parametrised incompressible flow problems in OpenFOAM”. Computer Physics Communications. To appear. Nonintrusive proper generalised decomposition for parametrised incompressible flow problems in OpenFOAM V. Tsiolakis1 ,2 ,3 , M. Giacomini2 , R. Sevilla3 , C. Othmer1and A. Huerta2 October 31, 2019 Abstract The computational cost of parametric studies currently represents the major limitation to the application of simulation-based engineering techniques in a daily industrial environment. This work presents the first nonintrusive implementation of the proper generalised decomposition (PGD) in OpenFOAM, for the approximation of parametrised laminar incompressible Navier-Stokes equations. The key feature of this approach is the seamless integration of a reduced order model (ROM) in the framework of an industrially validated computational fluid dynamics software. This is of special importance in an industrial environment because in the online phase of the PGD ROM the description of the flow for a specific set of parameters is obtained simply via interpolation of the generalised solution, without the need of any extra solution step. On the one hand, the spatial problems arising from the PGD separation of the unknowns are treated using the classical solution strategies of OpenFOAM, namely the semi-implicit method for pressure linked equations (SIMPLE) algorithm. On the other hand, the parametric iteration is solved via a collocation approach. The resulting ROM is applied to several benchmark tests of laminar incompressible Navier-Stokes flows, in two and three dimensions, with different parameters affecting the flow features. Eventually, the capability of the proposed strategy to treat industrial problems is verified by applying the methodology to a parametrised flow control in a realistic geometry of interest for the automotive industry. 1Volkswagen AG, Brieffach 011/1777, D-38436, Wolfsburg, Germany 2Laboratori de C`alcul Num`eric (LaC`aN), ETS de Ingenieros de Caminos, Canales y Puertos, Universitat Polit`ecnica de Catalunya, Barcelona, Spain 3Zienkiewicz Centre for Computational Engineering, College of Engineering, Swansea University, Wales, UK Corresponding author: Matteo Giacomini. E-mail: [email protected] Page 1 of 37
Keywords: Reduced order models, proper generalised decomposition, finite volume, incompressible laminar Navier-Stokes, pressure Poisson equation, parametrised flows, OpenFOAM, nonintrusiveness 1 Introduction and motivations Computational fluid dynamics (CFD) is a key component in the current industrial design pipeline. Simulations of incompressible flows are performed on a daily basis to solve different problems both in automotive and aeronautical industries. Owing to its robustness, the most widely spread CFD methodology is the finite volume (FV) method [1–7]. Using this technique, numerically evaluated quantities of interest (e.g. drag and lift) have proved to match reasonably well experimental results in many realistic engineering problems. Nonetheless, design and optimisation cycles in a production environment require multiple queries of the same problem with boundary conditions, physical properties of the fluid and geometry of the domain varying within a range of values of interest. In this context, parameters act as extra-coordinates of a high-dimensional partial differential equation (PDE). The computational cost of such parametric studies currently represents the major limitation to the application of simulation-based engineering techniques in a daily industrial environment. It is well-known that the computational complexity of approximating the PDEs describing the problems under analysis increases exponentially with the number of parameters considered. In recent years, reduced order models [8,9], including reduced basis (RB) [10–16], proper orthogonal decomposition (POD) [17–23] and hierarchical model reduction (HiMod) [24–27], have been proposed to reduce the computational burden of parametric analysis for several physical problems, including incompressible flows. The aforementioned techniques rely on an a posteriori reduction based on snapshots computed as solutions of the full-order model for different values of the parameters under analysis. An alternative approach is represented by PGD [28–32]. This method features an a priori reduction [33–35], using a separable approximation of the solution, which depends explicitly on the parameters under analysis. In this context, during an offline phase, a reduced basis is constructed with no a priori knowledge of the solution, whereas efficient online evaluations of the generalised solution are performed by simple interpolation in the parametric space. The PGD framework has been first applied to incompressible Navier- Stokes equations in [36] to separate xand ydirections in two-dimensional problems and in [37,38] to separate space and time discretisations of unsteady flows. Moreover, special attention has been devoted to the study of convective phenomena and convection stabilisation using PGD-based separated representations [39,40]. Applications of PGD to different physical phenomena including wave propagation, incompressible flows, nonlinear thermal problems and elastic metamaterials have been studied in [41–44]. Of course, parametric solutions involving the geometry of the domain, which are beyond the contributions of this paper, are of great interest in an industrial environment for the speed up of shape de- 2
sign and optimisation procedures. A separated solution of a PDE involving parametrised geometries was first proposed in [45] and further investigated in [42, 46, 47]. Such technique can be extended to the PGD algorithm for OpenFOAM proposed in this work via the definition of two nested computational meshes, one with the FV cells used for the flow computation and one featuring macrocells for the description of the geometry. In the context of geometrically parametrised problems, it is worth mentioning that a seamless integration of PGD and computer aided design (CAD) tools has been recently proposed in [48] to exploit the potential of parametric representation of curves and surfaces via the control points of nonuniform rational B-splines (NURBS). In the context of flow problems, model reduction techniques based on Galerkin projection have been extensively studied in the literature [49–51]. In this framework, several strategies have been proposed to construct the trial basis, using POD [52], RB [53] or the empirical interpolation method [54]. Concerning incompressible Navier-Stokes equations, in [55, 56] supremiser stabilisations techniques have been investigated to couple the FV method with POD to solve parametrised turbulent flow problems. Alternative projection methods based on minimisation of the residual of the momentum equation only [57] and on a least-squares Petrov-Galerkin approach [58–60] have been proposed. More recently, special attention has also been devoted to FV-based structure-preserving ROMs for conservation laws [61]. Another key aspect for the application of simulation-based techniques to industrial problems is the capability of the proposed methods to provide verified and certified results. This problem has been classically treated by equipping numerical methods with reliable and fully-computable a posteriori error estimators using equilibrated fluxes [62–64] and flux-free approaches [65–67] to control the error of the solution as well as of quantities of interest [68–75]. Nonetheless, these approaches require intrusive modifications of existing computational libraries and may not be feasible in the context of commercial software. Hence, although the effort of the academic community in this direction, such solutions have not been successfully and widely integrated in codes utilised by the industry. More recently, to circumvent this issue, great effort has been devoted to nonintrusive implementations in which novel numerical methodologies are externally coupled to existing commercial and open-source software used in industry on a daily basis. Some contributions in this direction have been successfully proposed coupling PGD with AbaqusR for mechanical problems [76] and PGD with SAMTECHR for shape optimisation problems [77]. For flow problems, the coupling of POD and OpenFOAM has been discussed in [56,78]. The present contribution is the first nonintrusive integration of the PGD framework in OpenFOAM for the solution of parametrised incompressible Navier-Stokes problems in the laminar regime. The resulting algorithm, henceforth referred to as pgdFoam, relies on internal functions and routines of OpenFOAM [79] and exploits the incompressible flow solver simpleFoam for the spatial iteration of the alternating direction scheme. The rest of this paper is organised as follows. Section 2 recalls the incompressible Navier-Stokes equations and their FV approximation. The parametrised equations for 3
laminar Navier-Stokes flows are introduced in Section 3 as well as their PGD approximation and its nonintrusive implementation in OpenFOAM. Numerical simulations to validate the discussed reduced-order strategy are provided in Section 4, whereas its application to parametrised flow control problems in laminar regime is presented in Section 5. Section 6 summarises the results and two appendices complement the information with some technical details on the formulation and the OpenFOAM spatial solver utilised. 2 Finite volume approximation of laminar incompressible Navier-Stokes equations In this section, the steady Navier-Stokes equations for the simulation of incompressible viscous laminar flows in dspatial dimensions are recalled. Let Ω ⊂Rd, ∂Ω=ΓD∪ΓNbe an open bounded domain with disjoint Dirichlet, ΓD, and Neumann, ΓN, boundaries. The flow problem under analysis consists of computing the velocity field uand the pressure p such that ∇·(u⊗u)−∇·(ν∇u) + ∇p=sin Ω, ∇·u= 0 in Ω, u=uDon ΓD, n·(ν∇u−pId) = ton ΓN, (1) where the first equation describes the balance of momentum and the second one the conservation of mass. In Equation (1), srepresents a volumetric source term, ν>0 is the dynamic viscosity and Idis the d×didentity matrix. On the Dirichlet boundary ΓD, the value uDof the velocity is imposed, whereas on ΓNthe pseudo-traction tis applied. From the modelling point of view, inlet surfaces and physical walls are described as Dirichlet boundaries with an imposed entering velocity profile and a homogeneous datum, respectively, whereas outlet surfaces feature homogeneous Neumann boundary conditions. For the sake of simplicity and without loss of generality, ΓNis henceforth assumed to be an outlet boundary, that is a null tis considered. 2.1 A cell-centred finite volume approximation using OpenFOAM In this section, the formulation of a FV scheme for the laminar incompressible Navier-Stokes equations is briefly recalled to introduce the notation needed for the high-dimensional parametrised problem of Section 3. The domain Ω is partitioned in Nnonoverlapping cells Vi, i=1, . . . , N such that Ω:= SN i=1 Viand Vi∩Vj=∅,for i6=j. The FV discretisation is constructed starting from the integral formulation of Equation (1), namely find (u, p), 4
constant on each cell Vi, i=1, . . . , N, such that u=uDon ΓDand it holds ZVi ∇·(u⊗u)dV −ZVi ∇·(ν∇u)dV +ZVi ∇p dV =ZVi sdV , ZVi ∇·udV = 0. (2) OpenFOAM implements a cell-centred FV rationale in which piecewise constant approximations are sought for velocity and pressure in each cell of the computational mesh and the degrees of freedom of the discretised problem are located at the centroid of each finite volume. Employing Gauss’s theorem, the integrals in Equation (2) are rewritten in terms of fluxes over the boundaries of the cells and approximated using classical central differencing schemes [4, 5]. Moreover, to handle the nonlinearity in the convection term, OpenFOAM considers a relaxation approach introducing a fictitious time variable. The resulting solution strategy relies on the SIMPLE algorithm [80] which belongs to the family of fractional-step projection methods [81, Sect. 6.7]. A brief description of this method is provided in B. 3 Nonintrusive proper generalised decomposition for parametrised laminar flow problems Consider now the case in which the user-prescribed data in Equation (1), i.e. the viscosity coefficient, the source term and the boundary conditions, depend on a set of parameters µ∈I⊂RM, with Mbeing the number of parameters. More precisely, the set Idescribing the range of admissible parameters can be defined as the Cartesian product of the domains of the Mparameters, namely, I:=I1×I2× · · ·×IMwith µi∈ Iifor i=1, . . . , M. Within this context, µis treated as a set of additional independent variables, or parametric coordinates, instead of problem parameters. For the purpose of discretisation, each interval Iiis subdivided in Nµsubintervals. The unknown pair (u, p) is thus sought in a high-dimensional space described by the independent variables (x,µ)∈Ω×Iand fulfils the following parametrised Navier-Stokes equations on each cell Vi, i=1, . . . , N ZIZVi ∇·(u⊗u)dV dI−ZIZVi ∇·(ν∇u)dV dI +ZIZVi ∇p dV dI=ZIZVi sdV dI, ZIZVi ∇·udV dI= 0. (3) In the following sections, the rationale for the construction of a separated solution of the parametrised laminar Navier-Stokes equations is recalled and the proposed nonintrusive implementation of the alternating direction scheme in OpenFOAM is presented. 5
3.1 The proper generalised decomposition rationale PGD constructs an approximation (un PGD , pn PGD ) of the solution (u, p) of Equation (3) in terms of a sum of nseparable functions, or modes. Each mode is the product of functions depending solely on one of the arguments x, µ1, . . . , µM. For the sake of readability and without loss of generality, only the spatial coordinates xand the parametric ones µare henceforth separated. Following [42], the so-called single parameter approximation is detailed. That is, for each mode, a unique scalar parametric function φ(µ) is considered for all the variables and the resulting separated form of the unknowns is (un PGD (x,µ) = un−1 PGD (x,µ) + σn ufn u(x)φn(µ), pn PGD (x,µ) = pn−1 PGD (x,µ) + σn pfn p(x)φn(µ),(4) where the superindex ndenotes the, a priori unknown, number of terms in the PGD expansion and the positive scalar coefficients σn uand σn prepresent the amplitude of the nth mode for velocity and pressure, respectively. These coefficients are obtained normalising the modal functions, namely σn u:= kfn ukand σn p:= kfn pk, with kφnk= 1. Appropriate user-defined norms on the spatial and parametric domains need to be introduced for each function. For all the simulations in Section 4 and 5, the L2 norm has been considered for normalisation. Remark 1. The normalisation coefficients play a critical role in checking the convergence of the PGD algorithm and may be used as quantitative stopping criterion in the PGD enrichment procedure described in Section 3.2. For a discussion on alternative formulations of the separation in Equation (4), involving both scalar and vector-valued parametric functions, the interested reader is referred to [42]. Henceforth and except in case of ambiguity, the dependence of the modes on xand µis omitted. Considering a linearised approach to compute each new mode, Equation (4) can be rewritten as the following predictor-corrector single parameter approximation (un PGD =e un PGD +σn uδe un PGD =un−1 PGD +σn ufn uφn+σn uδe un PGD , pn PGD =e pn PGD +σn pδe pn PGD =pn−1 PGD +σn pfn pφn+σn pδe pn PGD ,(5) where e un PGD :=un−1 PGD +σn ufn uφnand e pn PGD :=pn−1 PGD +σn pfn pφnaccount for the n−1 previously computed terms and a prediction of the current mode. More precisely, (σn ufn uφn, σn pfn pφn) play the role of predictors in the computation of the n-th mode, whereas (σn uδe un PGD , σn pδe pn PGD ) are the 6
corresponding correctors featuring the variations ∆in the spatial and parametric functions, namely (δe un PGD := ∆fuφn+fn u∆φ +∆fu∆φ, δe pn PGD := ∆fpφn+fn p∆φ +∆fp∆φ. (6) Note that the last term in Equation (6) represents a high-order variation which is henceforth neglected. As for the classical single parameter approximation,σn uand σn prepresent the amplitudes of the n-th velocity and pressure modes. That is, setting kφn+∆φk= 1, they are defined as σn u:= kfn u+∆fukand σn p:= kfn p+∆fpk. 3.2 Predictor-corrector alternating direction scheme In order to compute (un PGD , pn PGD ) in Equation (5), a greedy algorithm is implemented. The first PGD mode (u0 PGD , p0 PGD ) is arbitrarily chosen to fulfil the Dirichlet boundary conditions of the problem and the n-th mode is successively computed assuming that term n−1 is available [31, 32]. Some variations of this strategy based on Arnoldi-type iterations have been investigated in [82, 83]. In this section, the alternating direction scheme used to compute the PGD modes is described. A key assumption for the application of this method is the separability of the data. For the sake of simplicity and without any loss of generality, the separated form of the viscosity coefficient, see e.g. [46], is reported ν(x,µ) := ψ(µ)D(x) = nν X i=1 ψ1,i(µ1)· · · ψM,i(µM)Di(x),(7) and analogous separations are considered for all the parametric data in the problem under analysis. By plugging (5) into (3) and gathering the unknown increments (σn uδe un PGD , σn pδe pn PGD ) on the left-hand side while leaving on the right-hand side the residuals computed using the previous modes (un−1 PGD , pn−1 PGD ) and the predictions (σn ufn uφn, σn pfn pφn) of the current one, the following equations are obtained ZIZVi ∇·(σn uδe un PGD ⊗σn uδe un PGD )dV dI +ZIZVi ∇·(σn uδe un PGD ⊗e un PGD )dV dI+ZIZVi ∇·(e un PGD ⊗σn uδe un PGD )dV dI −ZI ψZVi ∇·(D∇(σn uδe un PGD )) dV dI+ZIZVi ∇(σn pδe pn PGD )dV dI=Ru, ZIZVi ∇·(σn uδe un PGD )dV dI=Rp, (8) 7
where the residuals are defined as Ru:= Ru(un−1 PGD , pn−1 PGD , σn ufn u, σn pfn p, φn) = Ru(e un PGD ,e pn PGD ) =ZIZVi sdV dI−ZIZVi ∇·(e un PGD ⊗e un PGD )dV dI +ZI ψZVi ∇·(D∇e un PGD )dV dI−ZIZVi ∇e pn PGD dV dI, (9) Rp:= Rp(un−1 PGD , σn ufn u, φn) = Rp(e un PGD ) =−ZIZVi ∇·e un PGD dV dI.(10) As classical in ROMs [84,85], an affine dependence of the forms in (8), (9) and (10) on the parameters is required to construct the PGD approximation. The spatial (respectively, parametric) component of each mode is thus computed by restricting Equation (8) to the tangent manifold associated with the spatial (respectively, parametric) coordinate. Following from Equation (6) and setting a fixed value for the parametric function φn, the pair (σn u∆fu, σn p∆fp) is determined by solving a purely spatial PDE. Recall that the PGD alternating direction scheme handles homogeneous Dirichlet boundary conditions at each iteration of the spatial solver [32], whereas inhomogeneous data are treated by the first arbitrary PGD mode (u0 PGD , p0 PGD ) introduced above. In a similar fashion, the increment ∆φ is computed as the solution of an algebraic system of equations in the parameter µwhile the spatial functions (σn ufn u, σn pfn p) are considered known. Note that at each iteration of the alternating direction scheme, e un PGD is known and may be expressed in separated form as Pn m=1 σm ufm uφm. Thus, exploiting the separated structure of the unknowns and the affine parametric decomposition of the involved integral forms, the numerical complexity of the high-dimensional PDE is reduced by alternatively solving for the spatial and the parametric unknowns, as detailed in the next subsections. Remark 2. By restricting Equation (8) to the tangent manifold in the spatial (respectively, parametric) direction, the integral forms are multiplied by φn(respectively, (σn ufn u, σn pfn p)). This is equivalent to the projection of the high-dimensional PDE to the tangent manifold discussed for PGD in the context of finite element approximations [42]. In the framework of FV discretisations, the finite element test functions are set equal to 1 to retrieve the classical integral form of the PDE under analysis. Hence, the restriction of the highdimensional PDE to the tangent manifold introduces a factor φnmultiplying the integral forms in Equations (8), (9) and (10) for the spatial iteration. Similarly, in the parametric iteration, a factor σn ufn uappears in the integral form of the momentum equation and in the residual Ru, whereas σn pfn pmultiplies the integrand terms in the mass conservation equation and in the residual Rp. 8
3.2.1 The spatial iteration First, the parametric function φnis fixed and the increments (σn u∆fu, σn p∆fp) are determined by solving a spatial PDE. More precisely, restricting Equation (8) to the tangent manifold in the spatial direction, a pair (σn u∆fu, σn p∆fp), constant cell-by-cell, is sought such that in each cell Vi, i=1, . . . , N it holds α0 ZVi ∇·(σn u∆fu⊗σn u∆fu)dV + ZVi ∇·σn u∆fu⊗ n X m=1 αm 1σm ufm udV + ZVi ∇·n X m=1 αm 1σm ufm u⊗σn u∆fudV −α2 ZVi ∇·(D∇(σn u∆fu))dV +α3 ZVi ∇(σn p∆fp)dV =Rn u, α3 ZVi ∇·(σn u∆fu)dV =Rn p, (11) where Rn uand Rn pare the spatial residuals associated with the discretisation of the momentum and mass equations, respectively, and each coefficient αi, i=0,...,3 depends solely on the parametric function φnand on the data of the problem α0:= ZI [φn]3dI, α2:= ZI [φn]2ψ dI, αm 1:= ZI [φn]2φmdI, α3:= ZI [φn]2dI. (12) Note that given the separable form of (9)-(10), an efficient implementation of the righthand side of the spatial iteration may be devised and the corresponding FV discretisation is obtained. A detailed description of the residuals acting as linear functionals on the right-hand side of Equation (11) is provided in A. The terms in Equation (11) feature a structure similar to the original incompressible Navier-Stokes problem in the spatial domain Ω, see Equation (2). The discretisation is thus performed using the cell-centred FV method implemented in OpenFOAM, see Section 2.1. The main difference is represented by the second and third integrals on the left-hand side of the momentum equation (11). In order to preserve the nonintrusiveness of the discussed PGD approach, Equation (11) is modified by introducing a relaxation in the SIMPLE iterations to treat these two integrals in an explicit way as part of the right-hand side of 9
(a) f1 p(b) f2 p(c) f3 p(d) f4 p(e) f5 p(f) f6 p Figure 3: PGD approximation of the Kovasznay flow with parametrised viscosity. First six computed spatial modes fm p, m = 1,...,6 for pressure. (a) f1 u(b) f2 u(c) f3 u(d) f4 u(e) f5 u(f) f6 u Figure 4: PGD approximation of the Kovasznay flow with parametrised viscosity. First six computed spatial modes fm u, m = 1,...,6 for velocity. (a) p6 PGD (b) p8 PGD (c) p15 PGD (d) Exact p (f) u6 PGD (g) u8 PGD (h) u15 PGD (i) Exact u Figure 5: Comparison of the PGD approximation to the analytical solution of the Kovasznay flow for Re = 200, that is µ= 10−2. Pressure (top) and velocity (bottom) using n=6, 8 and 15 terms. 16
The PGD approximation (un PGD , pn PGD ) using n=6,8,15, that is with one, three and ten computed modes, respectively, is compared to the analytical solution for the case of Re=200, in Figure 5. 4.2 Two-dimensional cavity with parametrised lid velocity In this section, the classical benchmark problem of the nonleaky lid-driven cavity is studied [87]. The unitary square Ω=[0,1]2is considered as spatial domain and homogeneous Dirichlet boundary conditions are imposed on the lateral and bottom walls. On the top wall, a velocity ulid(x, µ)=400µulid(x) is enforced, where the parameter µ∈[0.25,1] acts as a scaling factor of the maximum velocity of the lid, whereas ulid(x) is a velocity profile featuring two ramps on the top-left and top-right corners of the domain to account for the change between null and maximum velocity. As classical in the literature treating the lid-driven cavity example, for x∈[0,0.06] and x∈[0.94,1], the horizontal component of the lid velocity changes linearly from 0 to 400µand vice versa. The dynamic viscosity is set to ν=0.1 m2/s and the values considered for the Reynolds number span from 1,000 to 4,000. The nonlinear term of the Navier-Stokes equations is now treated as described in Section 3.2. The mode handling the boundary conditions is obtained as a full-order solution of the Navier-Stokes equations using the simpleFoam algorithm for a lid velocity computed using µ=1, that is for a maximum horizontal velocity of 400 m/s. The corresponding parametric boundary condition mode is set to be linearly evolving from µ=0.25 to µ=1, that is φ(µ)=µ. Following the rationale described in the previous section, two different stopping criterions are considered for the PGD enrichment strategy, namely η(u,p)≤10−3and η(u,p)≤10−4. Figure 6(a) displays the relative amplitude of the computed modes. Note that the first stopping point is achieved after seven computed modes, whereas fourteen terms are required to fulfil the lower tolerance. The corresponding computed parametric modes are presented on Figure 6(b). It is worth noting that all the computed parametric modes are close or equal to 0 for µ=1. This is due to the fact that the boundary conditions of the problem are imposed by means of a full-order solution computed for the maximum value of µin the parametric space. Hence, the case of µ=1 is accurately described by the PGD approximation using solely the mode obtained via simpleFoam. Now, the online evaluations of the PGD approximation of the velocity and pressure fields for different values of the parameter µare compared to the full-order solutions computed using simpleFoam. The corresponding relative L2(Ω) errors are presented in Figure 7 as a function of the number of modes utilised in the PGD approximation. The boundary condition mode and the first seven computed modes, for which η(u,p)≤10−3, provide a good approximation of both velocity and pressure and limited corrections are introduced by the following modes until the stopping criterion of 10−4is fulfilled. For the case µ=1, a small error of the order of 10−4appears starting from the fifth computed mode, i.e. 17
2 10 -4 10 -3 10 -2 10 -1 100 4 6 8 10 12 14 (a) Amplitude of the computed modes 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 -3 -2 -1 0 1 2 3 (b) Computed parametric modes Figure 6: PGD of the cavity flow with parametrised lid velocity. (a) Relative amplitude of the computed modes fm u(black), fm p(blue) and the combined amplitude of (fm u, fm p) according to Equation (18). (b) First seven normalised computed parametric modes. 2 10-4 10-3 10-2 10-1 100 6 84 10 12 14 Figure 7: Relative L2(Ω) errors of the PGD approximation of the cavity flow with parametrised lid velocity with respect to the full-order solution as a function of the global number of modes (i.e. boundary conditions and computed) utilised in the PGD expansion. 18
uPGD uREF µ=0.25 µ=0.625 µ=1 Figure 8: Comparison of the PGD approximation (top) and the full-order solution (bottom) of the parametrised lid-driven cavity problem for µ=0.25, µ=0.625 and µ=1, corresponding to a maximum velocity of the lid of 100, 250 and 400 m/s, respectively. 19
n=6. This is due to the fact that the boundary condition mode already captures all the features of the flow, being a full-order solution of the Navier-Stokes equations as previously mentioned. A qualitative comparison of the reduced-order and full-order solutions of the parametrised lid-driven cavity problem is displayed in Figure 8. The PGD approximations for µ=0.25, µ=0.625 and µ=1 are presented as long as their corresponding simulations obtained using simpleFoam. The cases under analysis are associated with a maximum horizontal velocity of the lid of 100, 250 and 400 m/s, respectively. It is worth noting that pgdFoam is able to capture the topological changes of the flow with great accuracy, managing to identify location and size of the vortices, as well as their appearance and disappearance according to the values of the Reynolds number considered in the analysis. 5 Application to parametrised laminar flow control problems Dynamically controlling the features of a flow is a challenging problem with several highimpact applications including, e.g., drag minimisation, stall control and aerodynamic noise reduction [88–90]. A major bottleneck to the design of flow control devices is represented by the large number of simulations involved in the tuning of the control loop. In this section, the potential of the described nonintrusive PGD implementation in OpenFOAM is demonstrated for parametrised flow control problems. Two- and three-dimensional internal flows with jets are studied. Specifically, a parametric study involving the peak velocity of the jets as extra-coordinate of the problem is considered to test the proposed PGD methodology. 5.1 Lid-driven cavity with parametrised jet velocity Consider the nonleaky lid-driven cavity problem introduced in Section 4.2. The lid velocity is defined with two linear ramps, increasing from 0 to 10 m/s on the top-left corner and decreasing correspondingly on the top-right one. Three jets of size 0.12 m are introduced on the vertical walls, two on the right wall and one on the left, respectively. The parametrised velocity of the jets is ujet(x, µ)=µujet(x), where the maximum velocity is controlled by the parameter µ∈[0,1] and the profile ujet(x) is defined as ujet(x, y)= −1+ cos2πy/0.12,0for x=1, y∈[0,0.12], 1−cos2π(y−0.88)/0.12,0for x=1, y∈[0.88,1], 1−cos2π(y−0.88)/0.12,0for x=0, y∈[0.88,1]. (19) 20
(a) B.C. mode for the lid (b) B.C. mode for the jets Figure 9: Cavity flow with parametrised jet velocity. Spatial boundary condition modes for velocity. An outlet boundary is added on the left vertical wall for y∈[0,0.12] and a free-traction condition is enforced. The dynamic viscosity is set to ν=0.01 m2/s, therefore the corresponding Reynolds number is Re=1,000. The boundary conditions of the problem are enforced through two modes computed as full-order solutions via simpleFoam as shown in Figure 9: the first one, for µ=0, corresponds to lid velocity of 10 m/s and inactive jets; the second one, for µ=1, is associated with the maximum velocity of the jets and a zero velocity of the lid. The corresponding parametric modes for the boundary conditions are set to φ(µ)=1 and φ(µ)=µ, respectively. Following the rationale previously discussed, the PGD enrichment process is stopped when η(u,p)≤10−4. In Figure 10, the generalised solution computed by the PGD is interpolated in different points of the parametric space under analysis and compared with the corresponding full-order solutions provided by simpleFoam. The flows for µ=0.1, µ=0.3, µ=0.5, µ=0.7, µ=0.8 and µ=1 are displayed, covering a wide range of flow regimes in the cavity. It is worth noting that the discussed reduced-order strategy is able to capture the topological changes in the flow features and accurately reproduce the appearance and disappearance of vortices localised in different regions of the domain. The accuracy of the PGD approximation with respect to the full-order solution is also verified by computing the relative L2(Ω) error of the spatial discretisation while enriching the modal description of the solution. More precisely, Figure 11 shows that using two boundary condition modes and six computed modes all approximations achieve a plateau with relative errors of 10−2or lower. 21
uPGD uREF µ=0.1µ=0.3µ=0.5µ=0.7µ=0.8µ=1 Figure 10: Comparison of the PGD approximation (top) and the full-order solution (bottom) of the lid-driven cavity with jets for µ=0.1, µ=0.3, µ=0.5, µ=0.7, µ=0.8 and µ=1, corresponding to a maximum velocity of the jets spanning from 0.2 to 2 m/s. 1 10 -3 10 -2 10 -1 100 2 3 4 5 6 7 8 9 10 Figure 11: Relative L2(Ω) error of the PGD approximation of the cavity flow with parametrised jet velocity with respect to the full-order solution as a function of the global number of modes (i.e. boundary conditions and computed) utilised in the PGD expansion, for µ=0.1, µ=0.5, µ=0.7 and µ=1. 22
(a) Front view (b) Bottom view (c) Perspective view (d) Patches of the duct Figure 12: Geometrical model of the S-Bend. On the bottom-right image, the jet patch is highlighted in red. 5.2 S-Bend with flow control driven by a jet In this section, the proposed PGD methodology is applied to a flow control problem using a three-dimensional geometry of industrial interest. The model of a heating, ventilation and air conditioning (HVAC) duct section provided by Volkswagen AG is shown in Figure 12. A jet is introduced on the red patch, at the first bend of the duct. The velocity profile of the jet is a sinusoidal function defined on the reference planar square [0,1]2as uˆy(ˆx, ˆz) = 0.0375(1 −cos(−2πˆx))(1 −cos(2πˆz)) (20) and pointing in the direction ˆyorthogonal to the plane (ˆx, ˆz). The parametrisation is constructed as a scaling of the jet velocity from uy=−0.015 m/s, i.e. blowing, to suction with uy=0.15 m/s. A single parameter µis introduced and the parametric domain considered for the analysis is I=[−0.1,1]. Note that this problem is especially challenging due to the change of sign in the interval of parametric values considered leading to different physical phenomena. The remaining boundary conditions feature homogeneous velocity on all the lateral walls, a parabolic velocity profile with mean value u=(0.83,0,0)m/s on the inlet and a free-traction on the outlet. The dynamic viscosity is set to ν=1.588×10−5m2/s and the corresponding value of the Reynolds number is Re=280. The quantity of interest in this problem is the pressure drop computed along the duct. As previously done for the lid-driven cavity with jets, two modes to account for the boundary conditions are computed using simpleFoam. The first mode is a full-order solution corresponding to the case of inactive jet and given inlet parabolic profile; the second one, is obtained setting a zero inlet velocity and a jet of maximum velocity uy=0.15 m/s. 23
10 12 14 16 18 10 -4 10 -3 10 -2 10 -1 100 2 4 6 8 (a) Amplitude of the computed modes 210 12 14 16 18 10 -2 10 -1 4 6 8 (b) Relative L2(Ω) error Figure 13: Internal flow in the S-Bend with parametrised jet velocity. (a) Relative amplitude of the computed modes fm u(black), fm p(blue) and the combined amplitude of (fm u, fm p) according to Equation (18). (b) Relative L2(Ω) error of the PGD approximations of pressure and velocity with respect to the full-order solutions for different values of µ. The corresponding parametric modes are φ(µ)=1 and φ(µ)=µ, respectively. Setting a tolerance of 10−3,pgdFoam computes five modes before fulfilling the stopping criterion for η(u,p), see Equation (18), whereas seventeen computed modes are required for the amplitude to drop at 10−4, as displayed in Figure 13(a). The PGD approximation obtained is compared with the full-order solutions given by simpleFoam for the values µ=−0.1, µ=0.45 and µ=1 of the parameter under analysis. In Figure 13(b), the relative L2(Ω) error for these configurations is reported. The numerical experiments confirm that an accuracy of 10−2is achieved, for all parameters, using two computed modes additionnally to the two terms accounting for the boundary conditions. Note that the first computed mode is one order of magnitude more relevant than the following ones (Fig. 13(a)) and after two computed modes only limited corrections are introduced to the existing PGD approximation. It is worth observing that a comparable accuracy of the PGD solution is achieved throughout the whole parametric space for both velocity and pressure. A qualitative comparison of the pressure and velocity fields computed using the PGD solution interpolated in different points of the parametric interval Iand the corresponding full-order discretisations is presented in Figures 14 and 15. As mentioned at the beginning of this section, the quantity of engineering interest in the analysis of this problem is the pressure drop computed along the duct. Considering a zero reference pressure on the outlet, the weighted average pressure drop is defined as pdrop := 1 Ain Nin X i=1 Aipi,(21) 24
(a) pPGD , µ=−0.1 (b) pPGD , µ=0.45 (c) pPGD , µ=1 (d) pREF , µ=−0.1 (e) pREF , µ=0.45 (f) pREF , µ=1 Figure 14: Comparison of the PGD approximation (top) and the full-order solution (bottom) of the pressure field of the internal flow in the S-Bend with a jet configuration of µ=−0.1, µ=0.45 and µ=1, corresponding to a jet which spans from blowing at maximum velocity 0.015 m/s to suction with peak velocity 0.15 m/s. (a) uPGD , µ=−0.1 (b) uPGD , µ=0.45 (c) uPGD , µ=1 (d) uREF , µ=−0.1 (e) uREF , µ=0.45 (f) uREF , µ=1 Figure 15: Comparison of the PGD approximation (top) and the full-order solution (bottom) of the velocity field of the internal flow in the S-Bend with a jet configuration of µ=−0.1, µ=0.45 and µ=1, corresponding to a jet which spans from blowing at maximum velocity 0.015 m/s to suction with peak velocity 0.15 m/s. 25
[49] A. E. Deane, I. G. Kevrekidis, G. E. Karniadakis, and S. A. Orszag. Low-dimensional models for complex geometry flows: Application to grooved channels and circular cylinders. Phys. Fluids A: Fluid Dynamics, 3(10):2337–2354, 1991. [50] X. Ma and G.E. Karniadakis. A low-dimensional model for simulating threedimensional cylinder flow. J. Fluid Mech., 458:181–190, 2002. [51] R. Zimmermann, A. Vendl, and S. G¨ortz. Reduced-order modeling of steady flows subject to aerodynamic constraints. AIAA Journal, 52(2):255–266, 2014. [52] P. Holmes, J. L. Lumley, and G. Berkooz. Turbulence, Coherent Structures, Dynamical Systems and Symmetry. Cambridge Monographs on Mechanics. Cambridge University Press, 1996. [53] B. Haasdonk and M. Ohlberger. Reduced basis method for finite volume approximations of parametrized linear evolution equations. ESAIM: M2AN, 42(2):277–302, 2008. [54] M. Drohmann, B. Haasdonk, and M. Ohlberger. Reduced basis approximation for nonlinear parametrized evolution equations based on empirical operator interpolation. SIAM J. Sci. Comput., 34(2):A937–A969, 2012. [55] S. Lorenzi, A. Cammi, L. Luzzi, and G. Rozza. POD-Galerkin method for finite volume approximation of Navier-Stokes and RANS equations. Comput. Methods Appl. Mech. Eng., 311:151 – 179, 2016. [56] G. Stabile and G. Rozza. Finite volume POD-Galerkin stabilised reduced order methods for the parametrised incompressible Navier-Stokes equations. Comput. Fluids, 173:273 – 284, 2018. [57] A. Tallet, C. Allery, C. Leblond, and E. Liberge. A minimum residual projection to build coupled velocity-pressure POD-ROM for incompressible Navier-Stokes equations. Communications in Nonlinear Science and Numerical Simulation, 22(1):909 – 932, 2015. [58] K. Carlberg, C. Bou-Mosleh, and C. Farhat. Efficient non-linear model reduction via a least-squares Petrov-Galerkin projection and compressive tensor approximations. International Journal for Numerical Methods in Engineering, 86(2):155–181, 2011. [59] K. Carlberg, C. Farhat, J. Cortial, and D. Amsallem. The GNAT method for nonlinear model reduction: Effective implementation and application to computational fluid dynamics and turbulent flows. Journal of Computational Physics, 242:623 – 647, 2013. [60] K. Carlberg, M. Barone, and H. Antil. Galerkin v. least-squares Petrov-Galerkin projection in nonlinear model reduction. Journal of Computational Physics, 330:693 – 734, 2017. 32
[61] K. Carlberg, Y. Choi, and S. Sargsyan. Conservative model reduction for finite-volume models. J. Comput. Phys., 371:280 – 314, 2018. [62] P. Destuynder and B. M´etivet. Explicit error bounds in a conforming finite element method. Math. Comp., 68(228):1379–1396, 1999. [63] A. Ern, A. F. Stephansen, and M. Vohral´ık. Guaranteed and robust discontinuous Galerkin a posteriori error estimates for convection-diffusion-reaction problems. J. Comput. Appl. Math., 234(1):114 – 130, 2010. [64] A. Ern and M. Vohral´ık. Polynomial-Degree-Robust A Posteriori Estimates in a Unified Setting for Conforming, Nonconforming, Discontinuous Galerkin, and Mixed Discretizations. SIAM J. Numer. Anal., 53(2):1058–1081, 2015. [65] N. Par´es, P. D´ıez, and A. Huerta. Subdomain-based flux-free a posteriori error estimators. Comput. Methods Appl. Mech. Eng., 195(4-6):297–323, 2006. [66] R. Cottereau, P. D´ıez, and A. Huerta. Strict error bounds for linear solid mechanics problems using a subdomain-based flux-free method. Comput. Mech., 44(4):533–547, 2009. [67] N. Par´es and P. D´ıez. A new equilibrated residual method improving accuracy and efficiency of flux-free error estimates. Comput. Methods Appl. Mech. Eng., 313(1):785 – 816, 2017. [68] J.T. Oden and S. Prudhomme. Goal-oriented error estimation and adaptivity for the finite element method. Comput. Math. Appl., 41(5):735 – 756, 2001. [69] N. Par´es, J. Bonet, A. Huerta, and J. Peraire. The computation of bounds for linearfunctional outputs of weak solutions to the two-dimensional elasticity equations. Comput. Methods Appl. Mech. Eng., 195(4-6):406–429, 2006. [70] N. Par´es, P. D´ıez, and A. Huerta. Exact bounds for linear outputs of the advectiondiffusion-reaction equation using flux-free error estimates. SIAM J. Sci. Comput., 31(4):3064–3089, 2009. [71] F. Larsson, P. D´ıez, and A. Huerta. A flux-free a posteriori error estimator for the incompressible Stokes problem using a mixed FE formulation. Comput. Methods Appl. Mech. Eng., 199(37-40):2383–2402, 2010. [72] M. Ainsworth and R. Rankin. Guaranteed computable bounds on quantities of interest in finite element computations. Int. J. Numer. Methods Eng., 89(13):1605–1634, 2012. [73] I. Mozolevski and S. Prudhomme. Goal-oriented error estimation based on equilibrated-flux reconstruction for finite element approximations of elliptic problems. Comput. Methods Appl. Mech. Eng., 288:127 – 145, 2015. 33
[74] Giacomini, M., Pantz, O., and Trabelsi, K. Certified descent algorithm for shape optimization driven by fully-computable a posteriori error estimators. ESAIM: COCV, 23(3):977–1001, 2017. [75] M. Giacomini. An Equilibrated Fluxes Approach to the Certified Descent Algorithm for Shape Optimization Using Conforming Finite Element and Discontinuous Galerkin Discretizations. J. Sci. Comput., 75(1):560–595, Apr 2018. [76] X. Zou, M. Conti, P. D´ıez, and F. Auricchio. A nonintrusive proper generalized decomposition scheme with application in biomechanics. Int. J. Numer. Methods Eng., 113(2):230–251, 2018. [77] Amaury Courard, David N´eron, Pierre Ladev`eze, and Ludovic Ballere. Integration of PGD-virtual charts into an engineering design process. Comput. Mech., 57(4):637–651, 2016. [78] A. Bertram, C. Othmer, and R. Zimmermann. Towards real-time vehicle aerodynamic design via multi-fidelity data-driven reduced order modeling. In 2018 AIAA/ASCE/AHS/ASC Structures, Structural Dynamics, and Materials Conference, 2018. [79] The OpenFOAM foundation. OpenFOAM 6.0, 2019. [Accessed 5-February-2019]. [80] S.V Patankar and D.B Spalding. A calculation procedure for heat, mass and momentum transfer in three-dimensional parabolic flows. Int. J. Heat Mass Transfer, 15(10):1787 – 1806, 1972. [81] Jean Donea and Antonio Huerta. Finite element methods for flow problems. John Wiley & Sons, Chichester, 2003. [82] A. Nouy. Generalized spectral decomposition method for solving stochastic finite element equations: Invariant subspace problem and dedicated algorithms. Comput. Methods Appl. Mech. Eng., 197(51):4718 – 4736, 2008. [83] L. Tamellini, O. Le Maˆıtre, and A. Nouy. Model reduction based on proper generalized decomposition for the stochastic steady incompressible Navier-Stokes equations. SIAM J. Sci. Comput., 36(3):A1089–A1117, 2014. [84] Anthony T. Patera and Gianluigi Rozza. Reduced Basis Approximation and A- Posteriori Error Estimation for Parametrized Partial Differential Equations. MIT Pappalardo Graduate Monographs in Mechanical Engineering, Massachusetts Institute of Technology, Cambridge, MA, USA, 2007. [85] Gianluigi Rozza. Fundamentals of reduced basis method for problems governed by parametrized PDEs and applications. In F. Chinesta and P. Ladev`eze, editors, Separated representations and PGD-based model reduction, volume 554 of CISM Courses and Lectures, pages 153–227. Springer, Vienna, 2014. 34
[86] L. I. G. Kovasznay. Laminar flow behind a two-dimensional grid. Proc. Cambridge Phi. Sc., 44:58–62, 1947. [87] U. Ghia, K. N. Ghia, and C. T. Shin. High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method. J. Comput. Phys., 48:387–411, 1982. [88] R. Duvigneau and M. Visonneau. Optimization of a synthetic jet actuator for aerodynamic stall control. Comput. Fluids, 35(6):624 – 638, 2006. [89] L. Ded`e. Optimal flow control for Navier-Stokes equations: drag minimization. Int. J. Numer. Methods Fluids, 55(4):347–366, 2007. [90] E. Guilmineau, R. Duvigneau, and J. Labroqu`ere. Optimization of jet parameters to control the flow on a ramp. C. R. Acad. Sci. Ser. II-Mec., 342(6):363 – 375, 2014. Flow separation control. [91] R. Temam. Navier-Stokes equations. Theory and numerical analysis. North-Holland Publishing Co., Amsterdam-New York-Oxford, 1977. [92] J.-L. Guermond and L. Quartapelle. On the approximation of the unsteady Navier- Stokes equations by finite element projection methods. Numer. Math., 80(2):207–238, 1998. [93] J.-L. Guermond and L. Quartapelle. On stability and convergence of projection methods based on pressure Poisson equation. Int. J. Numer. Methods Fluids, 26(9):1039– 1053, 1998. [94] A. Quarteroni. Numerical models for differential problems, volume 16 of MS&A. Modeling, Simulation and Applications. Springer, Cham, 2017. [95] H. Laval and L. Quartapelle. A fractional-step Taylor–Galerkin method for unsteady incompressible flows. Int. J. Numer. Methods Fluids, 11(5):501–513, 1990. [96] A. Quarteroni, F. Saleri, and A. Veneziani. Factorization methods for the numerical approximation of Navier-Stokes equations. Comput. Methods Appl. Mech. Eng., 188(1– 3):505–526, 2000. 35
A Separated representation of the residuals Consider a separable expression of the source term s(x,µ):=η(µ)S(x). For the spatial iteration, the residuals in separated form read as Rn u:= ZVi α4SdV − n X m=1 n X q=1 αmq 5ZVi ∇·(σm ufm u⊗σq ufq u)dV +ZVi ∇·D∇n X m=1 αm 6σm ufm udV −ZVi ∇n X m=1 αm 7σm pfm pdV , (22a) Rn p:= − ZVi ∇·n X m=1 αm 7σm ufm udV , (22b) where the following expressions for the coefficients are devised α4:= ZI φnη dI, αmq 5:= ZI φnφmφqdI, αm 6:= ZI φnφmψ dI, αm 7:= ZI φnφmdI. (23) For the parametric iteration, the separated expression of the residuals is rn u:= a4η+ n X m=1 − n X q=1 amq 5φq+am 6ψ−am 7!φm,(24a) rp:= − n X m=1 am 8φm,(24b) where the coefficients depend solely on the spatial modes, namely a4:= ZVi σn ufn u·SdV , amq 5:= ZVi σn ufn u·∇·(σm ufm u⊗σq ufq u)dV , am 6:= ZVi σn ufn u·∇·(D∇(σm ufm u))dV , am 7:= ZVi σn ufn u·∇(σm pfm p)dV , am 8:= ZVi σn pfn p∇·(σm ufm u)dV . (25) 36
BsimpleFoam: the semi-implicit method for pressure linked equations in OpenFOAM In OpenFOAM, the steady laminar Navier-Stokes equations are approximated by means of an iterative procedure, namely simpleFoam. This algorithm implements the SIMPLE method proposed in [80]. SIMPLE is a fractional-step Chorin-Temam projection method [91, Sect. 3.7] that has been extensively studied in the literature [92, 93]. A description of the relationship between SIMPLE and Chorin-Temam projection methods is detailed in [94, Sect. 17.7, 17.8], whereas the implementation details of simpleFoam are provided in the official OpenFOAM documention [79]. First, an intermediate velocity ukis computed starting from the momentum equation and neglecting the contribution of pressure, see Equation (26a); second, the step involving the incompressibility constraint is rewritten in terms of a Poisson equation for the pressure p, see Equation (26b); eventually, a correction is applied to the intermediate velocity field to determine the final value uin Equation (26c). Special attention is required to impose the correct set of boundary conditions in each step of the algorithm [95]. uk−uk−1 ∆t+∇·(uk⊗uk−1)−∇·(ν∇uk) = sin Ω, uk=uDon ΓD, n·(ν∇uk) = ton ΓN, (26a) ∇·(∇p) = 1 ∆t∇·ukin Ω, n·∇p= 0 on ΓD, np=0on ΓN, (26b) u=uk−∆t∇p. (26c) Remark 5. A variant of the above numerical scheme, known as incremental Chorin- Temam projection method, is obtained by adding the term −∇pkto the right-hand side of Equation (26a) to compute the velocity prediction. Hence, the Poisson problem for pressure in Equation (26b) is solved to compute a pressure variation ∆p, whereas the correction step in Equation (26c) remains unchanged, now being p=pk+∆p. Note that the algorithm in Equation (26) may also be rewritten in the framework of an algebraic splitting method [96]. For a complete introduction to the subject, interested readers are referred to [81, Sect. 6.7]. 37