Zonal modelling approach in aerodynamic simulation and Carlos Castro Barcelona Supercomputing Center Technical University of Madrid
Outline 1 2 State of the art Proposed strategy 3 Consistency Stability 4 Laminar RAE Turbulent RAE 5
Motivation In aerodynamic simulations, ignoring the viscous effects far from sharp layers leads to the coupling of NS and Euler equations. Why? The velocity of a fluid flow around a streamlined body is of the same order of magnitude as the free-stream velocity. The inertial forces are dominant over the viscous stresses. But: only in a region outside the body surface, where boundary layers do not appear. Recall: the physical problem is the full NS or RANS equations.
Motivation Critical points The position of the interface: depends on the flow condition and the solution convergence. It affects to the accuracy. The passing algorithm: it can introduce errors or extra computational cost. Trade of between accuracy and time saving.
Zonal Solver: Split the domain into several independent partitions where distinct flow models can be solved. Advantages Simulation of multiphysic phenomena Simplification of the numerical problem Computational saving ( ) Challenges Will a new interface affect the accuracy? May it affect efficiency somehow? May it affect stability?
Zonal Solver: Split the domain into several independent partitions where distinct flow models can be solved. Advantages Simulation of multiphysic phenomena Simplification of the numerical problem Computational saving ( ) Challenges Will a new interface affect the accuracy? May it affect efficiency somehow? May it affect stability?
Zonal Solver: Split the domain into several independent partitions where distinct flow models can be solved. Advantages Simulation of multiphysic phenomena Simplification of the numerical problem Computational saving ( ) Challenges Will a new interface affect the accuracy? May it affect efficiency somehow? May it affect stability?
Zonal Solver: Split the domain into several independent partitions where distinct flow models can be solved. Advantages Simulation of multiphysic phenomena Simplification of the numerical problem Computational saving ( ) Challenges Will a new interface affect the accuracy? May it affect efficiency somehow? May it affect stability?
Zonal Solver: Split the domain into several independent partitions where distinct flow models can be solved. Advantages Simulation of multiphysic phenomena Simplification of the numerical problem Computational saving ( ) Challenges Will a new interface affect the accuracy? May it affect efficiency somehow? May it affect stability?
The equations The Euler equations U t + F (U) = 0 U(:, 0) = U 0 in Ω 1 + Boundary conditions on Ω Ω 1 The RANS equations U t + F (U) F v (U, U) = S(U, U) U(:, 0) = U 0 in Ω 2 + Boundary conditions on Ω Ω 2
The compressible Navier-Stokes equations U t + F (U) F v (U, U) = S(U, U). ρv i 0 F = ρv i v j + δ ij p F v = τ ij T ρv i H v j τ ij + k T x i where p is the pressure, H = E + p/ρ is the enthalpy and δ ij is the Kronecker delta. The pressure is related tot he state vector by the equation of state, p = (γ 1)ρ(E (u 2 + v 2 )/2) where γ is the ratio of specific heats (γ = 1,4).
The compressible Navier-Stokes equations If there is turbulence the NS equations turn into the RANS equations and it is necessary to introduce a turbulence model (one equation SA model): D ν Dt = c b1 S ν + 1 [ ((ν + ν) ν) + c b2 ( ν) 2] [ ν ] 2 c w1 f w σ d The turbulent dynamic viscosity µ t is computed as follows, µ t = ρν t, ν t = νf v1, f v1 = Ψ 3 Ψ 3 + c 3 v1, Ψ = ν ν
Heterogeneous DDM State of the art for Euler/NS coupling State of the art Proposed strategy 1 Variational strategy: strong approach [Quarteroni, Stolcis (1995)] Continuity of fluxes. Continuity of incoming characteristic variables. 2 Variational strategy: weak approach [Hesthaven (1996)] Enforce continuity using a penalty term. The penalty evaluation involves the values that are compatible with upwind and downwind locations. 3 χ-formulation [Brezzi, Canuto (1988) ] Introduce a continuous interface region (decay viscous fluxes). Three regions (Euler, NS and a transition region). Smooth transition. 4 Non-variatonal (NV) strategy.
Heterogeneous DDM The non-variational approach State of the art Proposed strategy { u = v if f (u) > 0 u = v, u x = v x if f (u) < 0 Suggested by Quarteroni [Gastaldi, Quarteroni (1989)] Mathematical analysis for linear case [Gander (2009)] NV conditions: not physical but continuous., Lack of mathematical analysis: the non-linearity prevents the analysis of existence and uniqueness. / Systems of equations require characteristic analysis. / Conditions depend on the flow direction.
Proposed approach State of the art Proposed strategy Key idea: Consider the same transmission conditions as used in parallel computation. We show that they are consistent with the set of NV conditions. What do we win? Avoid characteristic analysis. Imposed in a natural and intuitive way. Keep consistency and stability. It can be used with any parallel code. No iterations between subdomains. Efficient and robust algorithm. Continuity of variables.
1D illustration State of the art Proposed strategy Model equation: Burgers equation u t + f (u) = 0 v t + f (v) νv xx = 0 { u = v on x = δ, t > 0, u x = v x on x = δ, t > 0 if f (u(δ, t)) < 0. The boundary u x (δ, t) is not properly defined for a first order equation. Formally: { u = v on x = δ, t > 0, v t + f (v)v x = 0 on x = δ, t > 0 if f (u(δ, t)) < 0.
1D illustration State of the art Proposed strategy Model equation: Burgers equation u t + f (u) = 0 v t + f (v) νv xx = 0 Compute interior nodal values: {u n 1,..., un I }, {v n 1,..., v n J }. Continuity enforced using ghost values in the passing step of parallelization: u n I +1 = v n 1, v n 0 = un I. Reconstruct fluxes and derivatives in viscous region. Use conservative scheme in the inviscid region (upwind, LF,...).
1D illustration State of the art Proposed strategy This numerical implementation does not distinguish between incoming and outcoming characteristics in the inviscid part BUT it is proven that the algorithm makes this distinction naturally. This simplifies the implementation when considering systems.
Consistency Consistency Stability Theorem Let {u1 n,..., un I } and {v 1 n,..., v J n } be the solution of the discrete mixed model u n+1 i = ui n λ(ˆf n i+ 2 1 ˆf n i 1 ), i=1,...,i, n = 1,..., N 2 u0 n = b.c. at x = L 1 = vi n λ(ˆf n i+ 2 1 vj+1 n = b.c. at x = L 2 v n+1 i ˆf n i 1 2 ) + ν (v n x j 1 2vj n + vj+1), n j=1,...,j, n = 1,..., N with the transmission conditions. Assume that the solution of the continuous mixed problem satisfies either f (u(δ, t)) > 0 or f (u(δ, t)) < 0 for all t [0, T ]. Then, any consistent numerical flux to both sides of the interface provides a first order consistent system with the mixed problem and the NV interface conditions.
Stability (linear model: f (u) = au) Theorem GSKO stability Consistency Stability Let {u1 n,..., un I } and {v 1 n,..., v J n } be the solution of the discrete mixed model u n+1 i = ui n λ(ˆf n i+ 2 1 ˆf n i 1 ), i=1,...,i, n = 1,..., N 2 u0 n = b.c. at x = L 1 = vi n λ(ˆf n i+ 2 1 vj+1 n = b.c. at x = L 2 v n+1 i ˆf n i 1 2 ) + ν (v n x j 1 2vj n + vj+1), n j=1,...,j, n = 1,..., N with the transmission conditions and the upwind numerical flux. The numerical scheme is stable under the conditions a t x 1 in Ω 1 and λ = t x x x a + 2λ in Ω 2 Reference: [Gustaffson, Kreiss, Sundstrom and Osher]
Stability Consistency Stability Proof: In the linear case f (u) = au the discrete coupled problem can be solved sequentially Ω 1 Ω 2, if a > 0 Ω 2 Ω 1, if a < 0 Therefore, the stability in Ω 1 and Ω 2 can be analyzed separately. Moreover, transmission conditions can be interpreted as boundary conditions and the general GSKO theory for the stability of B.C. applies.
Stability Consistency Stability Example: Case a < 0 1 Solve in Ω 2. Scheme: v n+1 j = vj n λa(vj+1 n v j n) + ν x (v j 1 n 2v j n + vj+1 n ) B.C. at x = δ: u n I = v n 0 u n+1 I = u n I λa(u n I u n I +1 ) 2 Solve in Ω 1 : u n+1 i = u n i λa(u n i u n i+1 ) } v n+1 0 = v n 0 λa(v n 1 v n 0 )
Stability Consistency Stability In Ω 2 : Consider the scheme in x, t (0, ) 2 with BC for x = 0: v n+1 j = v n j λa(v n j+1 v n j ) + ν x (v j 1 n 2vj n + vj+1) n v n+1 0 = v n 0 λa(v n 1 v n 0 ) at x = 0 A sufficient condition for stability is then the lack of solutions (z, ṽ j ) for z 1 and z 1 Solution in the form ṽ j = ϕk j satisfy:
Stability Consistency Stability In Ω 2 : Taking the discrete Laplace transform of both equations (z 1)ṽ j = λa(ṽ j+1 ṽ j ) λ x (ṽ j 1 2ṽ j + ṽ j+1 ) (z 1)ṽ 0 = λa(ṽ 1 ṽ 0) with ṽ j = ṽ j (z) = 1 2π n=0 e zn u n j, z = iτ, τ [ π, π] A sufficient condition for stability is then the lack of solutions (z, ṽ j ) for z 1 and z 1 Solution in the form ṽ j = ϕk j satisfy:
Stability Consistency Stability In Ω 2 : Taking the discrete Laplace transform of both equations (z 1)ṽ j = λa(ṽ j+1 ṽ j ) λ x (ṽ j 1 2ṽ j + ṽ j+1 ) (z 1)ṽ 0 = λa(ṽ 1 ṽ 0) with ṽ j = ṽ j (z) = 1 2π n=0 e zn u n j, z = iτ, τ [ π, π] A sufficient condition for stability is then the lack of solutions (z, ṽ j ) for z 1 and z 1 Solution in the form ṽ j = ϕk j satisfy:
Stability Consistency Stability In Ω 2 : Taking the discrete Laplace transform of both equations (z 1)ṽ j = λa(ṽ j+1 ṽ j ) λ x (ṽ j 1 2ṽ j + ṽ j+1 ) (z 1)ṽ 0 = λa(ṽ 1 ṽ 0) with ṽ j = ṽ j (z) = 1 2π n=0 e zn u n j, z = iτ, τ [ π, π] A sufficient condition for stability is then the lack of solutions (z, ṽ j ) for z 1 and z 1 Solution in the form ṽ j = ϕk j satisfy: { z 1 = λa(k 1) λ x (k 2 + 1 k ) z 1 = λa(k 1)
Stability Consistency Stability In Ω 2 : Taking the discrete Laplace transform of both equations (z 1)ṽ j = λa(ṽ j+1 ṽ j ) λ x (ṽ j 1 2ṽ j + ṽ j+1 ) (z 1)ṽ 0 = λa(ṽ 1 ṽ 0) with ṽ j = ṽ j (z) = 1 2π n=0 e zn u n j, z = iτ, τ [ π, π] A sufficient condition for stability is then the lack of solutions (z, ṽ j ) for z 1 and z 1 Solution in the form ṽ j = ϕk j satisfy: k = 1 z = 1 Stable
Consistency Stability Stability only for the linear case but consistency can be applied to linear and non-linear. Time step is set from the viscous scheme since it is more restrictive. GSKO stability is a well-known method for boundary value problems. Here it can be used because the transmission problem is reduced to two boundary problems, which are solved sequencially in Ω 1 and Ω 2.
Parallellization Consistency Stability Repeat step = step +1 Compute local time steps Main parallel loop Compute interior values on Ω 1 Compute interior values on Ω 2 Exchange conservative variables using ghost values. Update physical values. CPU 1 CPU 2 Network
Parallellization Consistency Stability Repeat step = step +1 Compute local time steps Main parallel loop Compute interior values on Ω 1 Compute interior values on Ω 2 Exchange conservative variables using ghost values. Update physical values. CPU 1 CPU 2 Network
Parallellization Consistency Stability Repeat step = step +1 Compute local time steps Main parallel loop Compute interior values on Ω 1 Compute interior values on Ω 2 Exchange conservative variables using ghost values. Update physical values. transmission CPU 1 CPU 2 Network
Parallellization Consistency Stability Repeat step = step +1 Compute local time steps Main parallel loop Compute interior values on Ω 1 Compute interior values on Ω 2 Exchange conservative variables using ghost values. Update physical values. transmission CPU 1 CPU 2 Network Overlapping region depends on the order of the FV scheme!
Laminar RAE2822 Problem setting Laminar RAE Turbulent RAE Laminar flow over a RAE2822 airfoil. M = 0,2, Re = 50 000, AoA = 0,5 deg No-slip wall at the airfoil and farfield Euler BC s at the outer boundary. Hybrid mesh of 27 874 nodes.
Laminar RAE2822 Accuracy analysis Laminar RAE Turbulent RAE To study the efficiency and robustness of the method different partitions are considered: the interface is located at different distance of the airfoil. Partititions with 38 %, 24 % and 14 % of nodes in the viscous (NS) subdomain.
Laminar RAE2822 Accuracy analysis Laminar RAE Turbulent RAE To study the efficiency and robustness of the method different partitions are considered: the interface is located at different distance of the airfoil. Partititions with 38 %, 24 % and 14 % of nodes in the viscous (NS) subdomain.
Laminar RAE2822 Accuracy analysis Laminar RAE Turbulent RAE Density Residual in terms of the number of iterations for the different partitions.
Laminar RAE2822 Accuracy analysis Laminar RAE Turbulent RAE Pressure coefficient shows robustness of the method: as the interface gets closer to the airfoil, Cp degenerates to Euler profile. Cp profile for full NS and full Euler computations. Cp profile for Zonal Solver with different partitions.
Laminar RAE2822 Accuracy and efficiency analysis Laminar RAE Turbulent RAE W dist : distance to wall (it mainly affects C L value). C L C D Time iter Full NS 0.059219 0.021623 426 848 Full Euler 0.316669 0.000236 400 1340 W dist = 10 0 0.059217 0.020217 523 831 W dist = 10 1 0.059148 0.020212 387 836 W dist = 10 2 0.073490 0.019925 694 1018 W dist = 10 3 0.209286 0.028971 611 764 W dist = 10 4 0.266205 0.101579 902 1299
Turbulent RAE2822 Problem setting Laminar RAE Turbulent RAE Turbulent flow over a RAE2822 airfoil. M = 0,729, Re = 6,5 10 6, AoA = 2,31 deg No-slip wall at the airfoil and farfield Euler BC s at the outer boundary. Hybrid mesh of 27 874 nodes. Partition for the zonal solver for solving the turbulent RAE2822: showing the wake and detail of the distance to the airfoil.
Turbulent RAE2822 Accuracy and efficiency analysis Laminar RAE Turbulent RAE C L C D Time iter % NS nodes Full viscous 0.724111 0.013483 9.77 1528 DDM 0.717560 0.011535 7.214 1501 24 % 2 1 0 Full viscous DDM 1.5 1 full viscous DDM 1 0.5 Res(!) 2 Cp 0 3 4 0.5 5 1 6 0 500 1000 1500 2000 iter 1.5 0 0.2 0.4 0.6 0.8 1 x/c Residual of the density. Pressure coefficient on the airfoil.
Conclusions Simple and intuitive algorithm. Adaptable and easy implementation using parallellization. Guarantees continuity of the solution. Mathematically consistent and stable. Strategy to provide optimal subdomain partitions. Robust: continuous transition from Euler to NS profiles. Minimizes error between the physical and numerical solution. Extensible to other higher-order schemes. Lack of mathematical proof of uniqueness and existency.
Thank your attention!
1D illustration Notation: Mesh in [L 1, L 2 ] [0, T ]: (x j, t n ) = (L 1 + j x, n t) (j = 0,..., L 2 L 1 ; n = 0,..., N + 1 s.t (N + 1) t = T ) x wj n: numerical approximation of w(x j, t n ) of the physical viscous problem. Numerical scheme for viscous equation with a 3-points first order FV in convective part: w n+1 i = w n i with λ = t x λ(ˆf n ˆf n ) + ν i+ 1 i 1 2 2 x (w j 1 n 2wj n + wj+1) n and ˆf n i+ 1 2 = ˆf (wi n, wi+1 n ) is the numerical flux.
1D illustration Theorem Let {u1 n,..., un I } and {v 1 n,..., v J n } be the solution of the discrete mixed model u n+1 i = ui n λ(ˆf n i+ 2 1 ˆf n i 1 ), i=1,...,i, n = 1,..., N 2 u0 n = b.c. at x = L 1 = vi n λ(ˆf n i+ 2 1 vj+1 n = b.c. at x = L 2 v n+1 i ˆf n i 1 2 ) + ν (v n x j 1 2vj n + vj+1), n j=1,...,j, n = 1,..., N with the transmission conditions. Assume that the solution of the continuous mixed problem satisfies either f (u(δ, t)) > 0 or f (u(δ, t)) < 0 for all t [0, T ]. Then, for any numerical flux of the type E-flux, the solution is first order consistent with the mixed problem and the NV interface conditions.
1D illustration: Theorem proof Linear case f (u) = au and upwind flux: ˆf up (u, v) = Case 1: a > 0. Note that u n I is given by u n+1 I = u n I λa(u n I u n I 1 ), n > 0 { f (u), if f > 0 f (v), if f < 0 It does not use the information from the ghost value u n I +1. ui n does not depend on the viscous solution vi n : interface condition v0 n = un I can be interpreted as a classical Dirichlet BC for Ω 2, which is first order accurate with the continuity condition, i.e. u(δ, t) = v(δ, t), t > 0.
1D illustration: Theorem proof Case 2: a < 0. Consider a smooth solution (u, v) of the mixed problem with the proposed transmission conditions. Assume that (u, v) can be extended in a smooth way to the overlapping region [x I, x I +1 ]. (recall that x = δ [x I, x I +1 ]). Replacing u(x i, t n ) by ui n and v(x i, t n ) by vi n : u(x I, t n ) = v(x I, t n ), u(x I, t n+1 ) = v(x I, t n+1 ), u(x I, t n+1 ) = u(x I, t n ) λ(ˆf (u(x I + 1, t n )) ˆf (u(x 2 I 1, t n ))) 2 These equations can be combined to obtain the relation v(x I, t n+1 ) = v(x I, t n ) λa(v(x I +1, t n ) v(x I, t n )).
1D illustration: Theorem proof Case 2: a < 0. Consider a smooth solution (u, v) of the mixed problem with the proposed transmission conditions. Assume that (u, v) can be extended in a smooth way to the overlapping region [x I, x I +1 ]. (recall that x = δ [x I, x I +1 ]). Replacing u(x i, t n ) by ui n and v(x i, t n ) by vi n : u(x I, t n ) = v(x I, t n ), u(x I, t n+1 ) = v(x I, t n+1 ), u(x I, t n+1 ) = u(x I, t n ) λa(u(x I +1, t n ) u(x I, t n )) These equations can be combined to obtain the relation v(x I, t n+1 ) = v(x I, t n ) λa(v(x I +1, t n ) v(x I, t n )).
1D illustration: Theorem proof Case 2: a < 0. Using Taylor expansion for v at (δ, t): v(x I, t) = v(δ, t n) x 2 vx(δ, tn) + O( x 2 ), v(x I +1, t) = v(δ, t n) + x 2 vx(δ, tn) + O( x 2 ), v(δ, t x x n+1) vx(δ, tn+1) = v(δ, tn) 2 2 vx(δ, tn) λa xvx(δ, tn)+o( x 2 ). Using Taylor expansion of v and v x, with respect to the time variable, at (δ, t n ). This provides easily the consistency with the boundary condition v t (δ, t n ) av x (δ, t n ) = 0.
Multi-dimensional extension No characteristic analysis. Same number of variables. Computation of normal along each face. { u i = v i u i n = v i n But... what happens with the turbulent equation and variables?
Multi-dimensional extension Turbulent interface conditions Turbulence only makes sense in viscous region. Values related to turbulence are set equal to 0 in Euler subdomain: viscous and source terms are neglected. The interface is treated as far-field boundary. This requires the interface to be set far away from the sources of turbulence. Solve the turbulent equation in the viscous part and add the information to the source term.
Laminar RAE2822 Results Laminar flow over a RAE2822 airfoil. M = 0,2, Re = 50 000, AoA = 0,5 deg Hybrid mesh of 27 874 nodes. Density and pressure profiles for the partition atw d ist = 10 1.
Turbulent RAE2822 Results Turbulent flow over a RAE2822 airfoil. M = 0,729, Re = 6 500 000, AoA = 2,31 deg Hybrid mesh of 27 874 nodes. Density and eddy viscosity profiles for the partition atw d ist = 10 1.
Domain Decomposition Definition of the interface Subdomain partition computed from Truncation Error estimation of sensing variables + Smoothing algorithm. Define a sensor and compute the local truncation error map Smoothing algorithm: post-processing of the maps to create interfaces able to be parallellized. Output: list of nodes for each partition
Domain Decomposition Definition of the interface Subdomain partition computed from Truncation Error estimation of sensing variables + Smoothing algorithm. Define a sensor and compute the local truncation error map Smoothing algorithm: post-processing of the maps to create interfaces able to be parallellized. Output: list of nodes for each partition
Domain Decomposition Definition of the interface Subdomain partition computed from Truncation Error estimation of sensing variables + Smoothing algorithm. Define a sensor and compute the local truncation error map Smoothing algorithm: post-processing of the maps to create interfaces able to be parallellized. Output: list of nodes for each partition