Shape Optimization through Proper Orthogonal Decomposition with Interpolation and Dynamic Mode Decomposition Enhanced by Active Subspaces M. Tezzele, N. Demo and G. Rozza VIII International Conference on Computational Methods in Marine Engineering MARINE 2019 R. Bensow and J. Ringsberg (Eds) SHAPE OPTIMIZATION THROUGH PROPER ORTHOGONAL DECOMPOSITION WITH INTERPOLATION AND DYNAMIC MODE DECOMPOSITION ENHANCED BY ACTIVE SUBSPACES MARCO TEZZELE∗, NICOLA DEMO∗AND GIANLUIGI ROZZA∗ ∗Mathematics Area, mathLab, SISSA, International School of Advanced Studies, via Bonomea 265, I-34136 Trieste, Italy e-mail: [email protected],
[email protected], [email protected] Key words: Nonintrusive Model Order Reduction, Active Subspaces, Free Form Deformation, POD with Interpolation, Dynamic Mode Decomposition, Parameter Space Reduction Abstract. We propose a numerical pipeline for shape optimization in naval engineering involving two different non-intrusive reduced order method (ROM) techniques. Such methods are proper orthogonal decomposition with interpolation (PODI) and dynamic mode decomposition (DMD). The ROM proposed will be enhanced by active subspaces (AS) as a pre-processing tool that reduce the parameter space dimension and suggest better sampling of the input space. We will focus on geometrical parameters describing the perturbation of a reference bulbous bow through the free form deformation (FFD) technique. The ROM are based on a finite volume method (FV) to simulate the multi-phase incompressible flow around the deformed hulls. In previous works we studied the reduction of the parameter space in naval engineering through AS [38, 10] focusing on different parts of the hull. PODI and DMD have been employed for the study of fast and reliable shape optimization cycles on a bulbous bow in [9]. The novelty of this work is the simultaneous reduction of both the input parameter space and the output fields of interest. In particular AS will be trained computing the total drag resistance of a hull advancing in calm water and its gradients with respect to the input parameters. DMD will improve the performance of each simulation of the campaign using only few snapshots of the solution fields in order to predict the regime state of the system. Finally PODI will interpolate the coefficients of the POD decomposition of the output fields for a fast approximation of all the fields at new untried parameters given by the optimization algorithm. This will result in a non-intrusive data-driven numerical optimization pipeline completely independent with respect to the full order solver used and it can be easily incorporated into existing numerical pipelines, from the reference CAD to the optimal shape. 1 122
Marco Tezzele, Nicola Demo and Gianluigi Rozza 1 Introduction In a shape optimization problem, we aim to find the shape — among all the admissible geometries — that minimizes a certain objective function. In this work we propose a novel approach to optimize the total resistance of a ship hull advancing in calm water by deforming the original hull, a common problem in the naval engineering field. First we define the total resistance as the sum of the viscous and lift forces acting on the hull. Formally, our optimization problem can be expressed as min ∀µ∈Df(Ω,µ) = min ∀µ∈Dpcos θdΩµ+τxdΩµ,(1) where the D⊂RPis the parametric domain, Pthe number of parameters, Ω ∈R3is the reference hull domain, and Ωµ=M(Ω,µ) is the defomed hull. The morphing map M(·,µ):R3→R3 we use in this work is the free form deformation (FFD) and will be properly defined in Section 2. Examples of other deformation techniques are radial basis functions (RBF) interpolation [5, 22, 21], and inverse distance weighting (IDW) interpolation [32, 13, 2]. The unknowns pand τxdenote respectively the pressure and the xcomponent of the wall shear stress over the hull surface, while θis the angle between the flow direction and the surface. The evaluation of the objective function requires a numerical simulation of the flow around the ship, which has a high computational cost. The purpose of this work is beyond an analysis of the adopted full order model for the fluid dynamics, we just provide a brief summary in order to facilitate the understanding of the pipeline. We resolve the Reynolds-averaged Navier Stokes (RANS) equations with the k–ωSST turbulence model using a finite volume approach, a typical benchmark in industrial hydrodynamics analysis. Such model deals very well with turbulent fluid, but at high computational cost. Moreover, due to the complexity of the optimization problem, we typically need many evaluations of the objective function to converge to the optimal shape. For this work we choose to simulate the flow around the DTMB 5415 hull due to the existence of a vast amount of literature and benchmark tests. In Figure 1 the undeformed hull domain. Figure 1: Complete hull domain of the DTMB 5415. In order to reduce the computational cost, we introduce in the optimization framework two reduced order modeling (ROM) techniques. These techniqes are able to represent complex systems in a low dimensional space, reducing the number of degrees of freedom used in the full order model discretization and providing an efficient and reliable approximation of the solution. The ROM methods initially collect a database of high-fidelity solutions — the solutions 2 123
Marco Tezzele, Nicola Demo and Gianluigi Rozza computed using the full-order model — during the most computationally expensive phase, also called offline phase. Then, the solutions are combined to build the reduced space we query during the online phase to obtain the new solution. In this work, we adopt the dynamic mode decomposition (DMD) and proper orthogonal decomposition with interpolation (PODI), two emerging data-driven techniques. PODI is used to approximate, given the high-fidelity solutions computed for some defomed hulls, the solution for any new parametric point in the domain D. DMD algorithm instead provides a simplification of the dynamics of complex system: we use it in order to accelerate the single high-fidelity simulations we need for PODI method, by storing few system outputs and exploiting them to approximate the flow dynamics. For more details about equation-free ROM methods, we suggest [37], while for a complete overview — including intrusive approaches — we cite [27, 26, 24]. Moreover, additionally to these methods, we use the active subspace (AS) property as preprocessing tool in order to be able to reduce the dimension of the parameter space and obtain a better accuracy in ROM solution approximation. In this contribution, we focus on all the components of the computational pipeline: in Section 2 we provide a brief overview of the FFD method, the Section 3 illustrates the DMD algorithm, in Section 4 the AS property is explained, while Section 5 describes the idea behind PODI technique. Finally, Sections 6 and 7 provide respectively the numerical results collected during this work and the final conclusions. 2 The free form deformation technique Free form deformationi (FFD) is a widespread deformation technique. Proposed in [31], FFD was initially employed in computer graphics, getting more popular both in academia and industry in the last decades. In this section, we provide an overview of the method: for more details about FFD, among all the works in literature, we recommend [25, 9, 14]. Figure 2: Graphical representation of the FFD morphing map Mas composition of the maps ψ,T, and ψ−1. The displacements of the control points Pdefine the morphing of the domain. 3 124
Marco Tezzele, Nicola Demo and Gianluigi Rozza The idea of FFD is very intuitive: the domain is deformed by manipulating a lattice of points surrounding the object to morph. The displacements of these control points are the input parameters µGEO. To achieve this result 1) the physical domain Ω is mapped to the reference domain Ω using the function ψ, and a lattice of control points Pis constructed around the object to deform, then 2) through the map Tthe reference domain is morphed using B-splines or Bernstein polynomials tensor product and finally 3) the deformed domain is remapped to the physical one by using ψ−1. In Figure 2 is shown a sketch of the free form deformation map as a composition of the three functions presented above. Formally, we can define the deformation map Mas M(x,µGEO):=(ψ−1◦T◦ψ)(x,µGEO)∀x∈Ω.(2) This technique allows to manipulate complex geometries and also computational grids, since it is able to preserve derivatives continuity and perform global deformation using only few parameters. Figure 3 shows the position of the lattice of control points around a bulbous bow, which is the part of the hull we want to parametrize and morph. Regarding the implementation, the results in this contribution are obtained using PyGeM [1], an open source Python package implementing several deformation techniques. Figure 3: Example of bulbous bow deformation using the FFD method. The red dots are the FFD control points, already manipulated. 3 Dynamic mode decomposition as accelerator of the single simulations Dynamic mode decomposition is a data-driven modal decomposition technique for analysing the dynamics of nonlinear systems [29, 30]. A comprehensive overview on DMD and its major variants is in [17]. Other nonintrusive approaches with randomized DMD can be found in [4, 3], while naval engineering applications are in [9, 10]. Here we present a brief overview of the method and how we integrate it in the computational pipeline we propose. Let us consider msnapshots representing the state of the system for a given time interval: {xi}m i=1 ∈Rn. We seek a linear operator Ato approximate the nonlinear dynamics of the state variable x, that is xk+1 =Axk. In order to find the DMD decomposition 4 125
Marco Tezzele, Nicola Demo and Gianluigi Rozza we only need to approximate the eigenpairs of the operator A, without explicitly compute it. We proceed by dividing the snapshots in two matrices Xand Yas in the following: X= x1 1x1 2··· x1 m−1 x2 1x2 2··· x2 m−1 . . .. . ..... . . xn 1xn 2··· xn m−1 ,Y= x1 2x1 3··· x1 m x2 2x2 3··· x2 m . . .. . ..... . . xn 2xn 3··· xn m . With this representation we seek Asuch that Y≈AX. Using the Moore-Penrose pseudoinverse operator, denoted by †, we express the best-fit matrix as A=YX†. We can compute the POD modes of the matrix Xand project the data onto the subspace defined by them. We use the truncated singular value decomposition obtaining X≈UrΣrV∗ r, where the unitary matrix Urcontains the first rmodes. With these modes we can compute the reduced operator ˜ A∈Cr×ras ˜ A=U∗ rAUr=U∗ rYX†Ur=U∗ rYVrΣ−1 rU∗ rUr=U∗ rYVrΣ−1 r, without the explicit computation of the full operator A. The reduced operator describe the evolution of the low-rank approximated state ˜xk∈Rras ˜xk+1 =˜ A˜xk. We can then recover the high-dimensional state xkusing the POD modes already computed: xk=Ur˜xk. Using the eigendecomposition of the matrix ˜ A, that is ˜ AW =WΛ, we are able to compute the eigenpairs of the full operator A. In particular the eigenvalues in Λcorrespond to the nonzero eigenvalues of A, while the eigenvectors Φof Acan be computed in two ways: by projecting the low-rank approximation Won the high-dimensional space Φ=UrW, or by computing them exactly with Φ=YVrΣ−1 rW. Figure 4: Example of total drag reconstructed using the DMD algorithm. On the left the reconstructed field, while on the right the absolute error with respect to the high-fidelity solution. The actual implementation of the DMD algorithm we used and many different variants from 5 126
Marco Tezzele, Nicola Demo and Gianluigi Rozza multiresolution DMD [18], to DMD with control [23], and higher order DMD [19], can be found in the open source Python package PyDMD [12]. In this work the DMD is used to accelerate the computation of the total drag resistance for a given deformed hull. It uses only few snapshots of the high-fidelity simulation, equispaced in time, to predict the evolution of the target output. In particular we are interested in the value of the total drag at regime. Figure 4 reports the forces field approximated using DMD and the absolute error with respect to the high-fidelity solution for a particular geometrical configuration. 4 How to reduce the parameter space dimension with active subspaces The active subspaces (AS) property has been formalized by Constantine in [7, 8]. It is a property of a scalar function f:RN→Rand a probability density function ρ:RN→R+, where Nis the number of the input parameters. Taking linear combinations of the original parameters we can approximate fusing these new parameters, thus reducing the parameter space dimension. The output of interest f(µGEO), in our case the total drag of the hull advancing in calm water, depends on the geometrical parameters introduced in Section 2, while ρdescribe the uncertainty in the model inputs, i.e. how we sample the parameter space. For sake of clarity we will drop the pedix and from now on f(µ) := f(µGEO). The general idea is to rotate the input domain, after a proper rescale, in order to unveil a low dimensional parametrization of f, which means to find proper directions in the input space where fvaries the most on average. We do so by checking the gradients of the output of interest with respect to the parameters. To proper exploit the AS property we introduce some hypotheses: fhas to be continuous and differentiable with square-integrable partial derivatives in the support of ρ. Then we introduce the uncentered covariance matrix Cof the gradients of the target function, which is the matrix constructed with the average products of partial derivatives of the map fas follows C=E[∇µf∇µfT]=(∇µf)(∇µf)Tρdµ,(3) where with Ewe identify the expected value, and ∇µf=∇f(µ)=∂f ∂µ1,..., ∂f ∂µpTis the column vector of partial derivatives of f. Since Cis symmetric we can express it with its real eigenvalue decomposition C=WΛWT, where Wis the eigenvectors matrix, and Λthe diagonal matrix with the eigenvalues in descending order. It can be proven that the eigenvalues express the amount of variance of the gradient along the corresponding eigenvector direction. This means that taking the first Mmost energetic eigenvalues and the corresponding eigenvectors, we can approximate the target function with a reduce number of input parameters. So the eigenpairs of Cdefine the active subspaces of the pair (f,ρ). We proceed by partitioning Wand Λas follows Λ=Λ1 Λ2,W=[W1W2],(4) where the pedix 1 means the first Meigenvalues and eigenvectors respectively. Now we can use W1to project the original parameters to the active subspace, that is the span of the first Meigenvectors. This means to align the input parameter space to W1and retain only the directions where fvaries the most on average. We call active variable µMthe range of WT 1, 6 127
Marco Tezzele, Nicola Demo and Gianluigi Rozza that is µM=WT 1µ∈RM. We can thus introduce a lower-dimension approximation g:RM→R of the quantity of interest f, which is a function of µMas follows f(µ)≈g(WT 1µ)=g(µM).(5) Active subspaces have been proven useful in naval applications in [38, 36, 10], but also coupled with POD-Galerkin model order reduction [35]. A gradient-free algorithm for the discovery of active subspaces has been proposed in [6], while an AS variant using average gradients in [20]. We are going to find the active subspace for the total drag resistance of the deformed hulls obtained by the FFD method and the application of the DMD algorithm. Then we are going to exploit this active subspace to perform a better sampling of the parameter space and thus enhancing the construction of the reduced order model. 5 Proper orthogonal decomposition with interpolation Reduced order modeling (ROM) is a popular technique to reduce the computational cost of numerical simulations. Among all the available methods to achieve this reduction, we focus in this contribution to the reduced basis method using the proper orthogonal decomposition (POD) algorithm for the basis identification. This method allows to reduce the number of degrees of freedom of a parametric system by collecting the snapshots — the full order system outputs — for several different configurations and combining them in an efficient way for a real-time approximation of new solutions (for any new configuration). In the POD reduction framework, we can discern two main techniques: POD-Galerkin, which requires all the details of the full order system to generate a consistent low-dimensional representation of the physical problem, and POD with interpolation (PODI), which instead requires only the snapshots. Due to these requirements, the PODI method is particularly suited for industrial problem, since it is able to been coupled to all the numerical solvers, even commercial ones. In this contribution, we adopt PODI method. For more information about POD-Galerkin, we suggest [34, 33, 16, 15], while for other examples of PODI applications we recommend [14, 11, 28]. To calculate the POD modes we use the singular value decomposition (SVD) applied to the snapshots matrix Xsuch that X=UΣV∗. The columns of the unitary matrix Uare the POD modes end the corresponding singular values, the elements in the diagonal matrix Σin decresing order, indicate the energy associated to each mode. Hence it is possible to select the first modes — the most energetic — to span the reduced space and project onto it the high-fidelity snapshots. In matricial form, we have: XPOD =UT NX,(6) where UNis the matrix containing the first Nmodes, and XPOD is the matrix whose columns xPOD iare the reduced snapshots. We note that xPOD i∈VNand xi∈VNwhere Nrefers to the number of degrees of freedom of the full-order system. Finally, due to the reduced dimension, we are able to interpolate the reduced snapshots in order to approximate the solution manifold. The new interpolated reduced snapshots are then mapped back to the high-dimensional space for a real-time evaluation of the solution. To perform the non-intrusive model order reduction, we use the open source package EZyRB [11]. 7 128
Marco Tezzele, Nicola Demo and Gianluigi Rozza 6 Numerical results Here we are going to present the results of the complete numerical pipeline applied to the DTMB 5415 hull. Moreover we demonstrate the improvements obtained using the proposed pipeline, called POD+AS, with respect to the POD approach on the full parameter space. After generating NPOD = 100 deformed hulls, we perform the high-fidelity simulations accelerated via the DMD algorithm. We construct the snapshots matrix and compute the POD modes and the corresponding eigenvalues for the construction of the reduced output space. We compare this approach with the one proposed in this work that exploits a preprocessing step with the finding of the active subpace for the total drag resistance. With the NPOD input/output couples, we individuate an eigenvector W1(compare Section 4) describing an active subspace of dimension 1, and we sample the full space only along the active direction described by this vector. After this second sampling we collect a new set of high-fidelity simulations formed by NPOD+AS = 80 snapshots. For this new snapshots matrix we compute again the POD modes and eigenvalues, and we compare the two approaches looking at the POD singular values decay. A faster decay means a better approximation of the output fields for a fixed number of modes. In Figure 5 the blue line shows the singular values σidivided by the first and greatest singular value σmax for the sampling of the full parameter space; with the dashed red line the POD singular values decay for the POD+AS approach. A faster decay is observed, especially for the first few modes. This translates in an enhanced reduced order model, which exhibits a better approximation of the solutions manifold, with respect to the classical approach. Figure 5: POD singular values decay as a function of the number of modes. The blue line corresponds to the original sampling, while the red dotted line, called POD+AS approach, corresponds to the sampling along the active direction. Since we are relying on multidimensional interpolation to reconstruct the solutions at untried 8 129
Marco Tezzele, Nicola Demo and Gianluigi Rozza parameters, having a new reduced parameter space improves the creation of such interpolator. In the POD+AS approach we have to interpolate a univariate function in N-dimension, where Nis the number of POD modes we retain. In the POD approach on the full parameter space instead, we have the same number of modes to fit but a multivariate function depending on 5 input parameters, resulting in a difficult interpolation. 7 Conclusions and perspectives In this work we presented a nonintrusive numerical pipeline for shape optimization of the bulbous bow of a benchmark hull. It comprises automatic geometrical parametrization and morphing through FFD, estimation of the total drag resistance via DMD using only few snapshots of the time-dependent high fidelity simulations, the reduction of the parameter space exploiting the AS property, and the construction of a surrogate model with PODI for the realtime evaluation of the many-query problem solved by an optimization algorithm. We proved that the reduction of the parameter space can further enhance the reduced order model creation. Moreover all this parts of the pipeline can be used and integrated separately into an existing computational workflow resulting in a great interest for industrial applications. Acknowledgements This work was partially performed in the context of the project SOPHYA - “Seakeeping Of Planing Hull YAchts” supported by Regione FVG, POR-FESR 2014-2020, Piano Operativo Regionale Fondo Europeo per lo Sviluppo Regionale, and partially supported by European Union Funding for Research and Innovation — Horizon 2020 Program — in the framework of European Research Council Executive Agency: H2020 ERC CoG 2015 AROMA-CFD project 681447 “Advanced Reduced Order Methods with Applications in Computational Fluid Dynamics” P.I. Gianluigi Rozza. REFERENCES [1] PyGeM: Python Geometrical Morphing. Available at: https://github.com/mathLab/ PyGeM. [2] F. Ballarin, A. D’Amario, S. Perotto, and G. Rozza. A POD-selective inverse distance weighting method for fast parametrized shape morphing. International Journal for Numerical Methods in Engineering, 117(8):860–884, 2018. [3] D. Bistrian and I. Navon. Efficiency of randomised dynamic mode decomposition for reduced order modelling. International Journal of Computational Fluid Dynamics, 32(2-3):88–103, 2018. [4] D. A. Bistrian and I. M. Navon. Randomized dynamic mode decomposition for nonintrusive reduced order modelling. International Journal for Numerical Methods in Engineering, 112(1):3–25, 2017. [5] M. D. Buhmann. Radial basis functions: theory and implementations, volume 12. Cambridge university press, 2003. 9 130