a mesh adaptive compressible euler model for the

2 downloads 0 Views 555KB Size Report
the simulation of compressible liquid flows with phase-transition at all Mach numbers. - shock and wave dynamics in cavitating 3-D micro and macro systems.
V International Conference on Computational Methods in Marine Engineering MARINE 2011 L. E¸ca, E. O˜ nate, J. Garca, P. Bergan and T. Kvamsdal (Eds)

A MESH ADAPTIVE COMPRESSIBLE EULER MODEL FOR THE SIMULATION OF CAVITATING FLOW CLAES ESKILSSON AND RICKARD E. BENSOW Department of Shipping and Marine Technology Chalmers University of Technology SE–412 96 Gothenburg, Sweden e-mail: [email protected], www.chalmers.se/smt e-mail: [email protected], www.chalmers.se/smt

Key words: Cavitation, Euler Equations, Adaptive Mesh Refinement, Error Estimator Abstract. We present computations of cavitating flow over a NACA0015 hydrofoil. The simulations are performed by a finite volume compressible Euler model with dynamic mesh adaptation. The adaptive mesh refinement (AMR) is driven by a generic, simple and efficient error estimator based on the jump in value between cell faces for a given variable. It is shown that AMR based on vapour fraction provide unsatisfactory results both for (quasi-)steady and unsteady cavitation, as the major flow features are not captured. Instead, adaptivity driven by the Q-value proved successful even for resolving the cavity interface.

1

INTRODUCTION

Numerical simulation of cavitating flows are predominately carried out using a twophase incompressible Navier-Stokes model together with a mass-transfer model, see e.g. [7, 14, 2, 11]. The assumption of incompressibility is in general considered acceptable in many situations. However, the pressure waves following a cavity collapse are believed to be an important mechanisms in cavititation erosion, giving rise to pressure pulses in the order of 150 MPa [4]. Moreover, a travelling pressure wave will, to a certain extent, influence the dynamics of neighbouring cavities. It is thus of interest to include compressibility in the simulations in order to assess the impact of these effects. In the following we present computations of cavitating flow based on a mixture in equilibrium model where the governing equations are the compressible Euler equations. The fundamentals of the model closely follow the work of Schmidt et al. [17] and Koop [8], an approach that has been successful in several studies of sheet and cloud cavitation [16, 18, 19]. As compressible simulations in hydrodynamics suffer from requiring extremely small time steps, often in the order of 10−8 seconds, it is even more important than usual to 1

Claes Eskilsson and Rickard E. Bensow

keep the cell number and consequently the computational effort to a minimum. The most efficient way to minimize the computational effort is, of course, to only resolve the problem enough to satisfy a requested error tolerance – to be achieved through the use of adaptive mesh refinement (AMR). Further, in order to correctly capture secondary cavitation processes we need to accurate model the pressure pulses originating from the collapse of a cavity. So while AMR is beneficial in the general CFD case it would appear that AMR will be especially beneficial for compressible cavitating flows. AMR is typically driven by an error estimator or indicator. Due to the often highly unsteady nature of cavitating flows and thus the many time steps done during a simulation, the error estimator can not carry any substantial computational cost. In this paper we will use a simple, generic and efficient error estimator devised for discontinuous Galerkin (DG) methods [3] and apply it in a the finite volume setting. We will then use the error estimator to flows involving cavitation and investigate which flow entities are best suited to be used in the error estimator. The paper is organized as follows. In Section 2, we outline the governing equations. The finite volume model is presented in Section 3 whereas Section 4 is devoted to adaptivity and the error estimator used. The model is then applied to two 2D computational examples: in Section 4 we use a case with exact solution to asses the performance of the error estimator and in Section 5 we compute the sheet and cloud cavitation over a NACA0015 foil; in section 5 the emphasis is on the performance of the AMR technique rather than the underlying physics of the cavitating flow. Finally, in Section 6 the study is summarised. 2

GOVERNING EQUATIONS

The two-phase flow is treated as a single fluid mixture of liquid and vapour and assumed to be described by the compressible Euler equations, i.e. ∂U + ∇ · F (U ) = 0 , ∂t

(1)

where U = [ρ, ρu, ρv, ρw, ρE]T is the vector of conserved variables. Here ρ denotes density, u = [u, v, w]T is the velocity vector and E = e + 0.5u · u is the total specific energy made up of the internal specific energy and the kinetic energy. The flux vector F = [C, D, E] read       ρu ρv ρw  ρu2 + p   ρvu   ρwu     2     , D =  ρv + p  , E =  ρwv  , ρuv C= (2)        ρuw   ρuw   ρw2 + p  ρuH ρvH ρwH in which p is the pressure and H = E + p/ρ is the total specific enthalpy.

2

Claes Eskilsson and Rickard E. Bensow

In order to close the equations, information about the equation of state (EOS) is required. Following Saurel et al. [15] the mixture is assumed to be in equilibrium and we get three possible cases: - Liquid phase. Described by the modified Tait EOS [15]. - Vapour phase. Described by the perfect gas law. - Mixture phase. Assumed to be in thermodynamic equilibrium and the pressure is given by the saturated pressure. The temperature dependent liquid and vapour saturation densities and the saturation pressure are given by analytical expressions, see e.g. [8]. 3

NUMERICAL IMPLEMENTATION

The governing equations (1) are discretised in space using a cell-centred finite volume method by integrating over the Ωi with boundary Γi : Z Z control volume ∂ F (U ) · n dS = 0 , (3) U dV + ∂t Ωi Γi R ¯i = or, after introducing the cell-averaged values U U dV /|Ωi | and the numerical flux Ωi ˆ (U L , U R , n) ≈ F (U ) · n, F Ni ∂ ¯ 1 X ˆ (U L , U R , n)|Sij | = 0 . Ui + F (4) ∂t |Ωi | j=1 Here U L and U R denote the right and left hand states of a cell boundary and n is the unit normal vector. Ni is the number of faces belonging to the ith cell, |Sij | is the face area and |Ωi | the cell volume. The semi-discretised equations (4) are integrated in time using a strong-stability-preserving third-order four-stage explicit Runge-Kutta scheme [13]. The SSP-RK(3,4) scheme has a stability limit CFL coefficent of 2 and we typically run our cases with a CFL number of 1.8. The numerical model presented in this paper has been developed using the open-source finite volume framework OpenFOAM-1.7.x [12]. OpenFOAM provides a large selection of built-in features such as moving meshes, dynamic adaptive meshes and parallelism. The Euler solver developed draws to some extent upon the existing rhoCentralFoam solver [6], with the important difference that the numerical flux is computed by approximate Riemann solvers, see e.g. [20], rather than central schemes. We use the HLLC modified low-Mach AUSM numerical flux [8]. In the HLLC/AUSM solver the flux is decomposed ˆ = into a convective part and a pressure part like in the standard AUSM schemes: F ˙ conv +F pressure . The difference lies in that the massflux, m, ˙ now is given by the HLLC mF Riemann solver and not by a polynomial expression like in the AUSM family of schemes This minor alteration greatly improves the performance in the low-Mach range. Finally, in order to achieve second-order accuracy we employ standard linear reconstruction in conjunction with the Barth and Jespersen limiter [1]. 3

Claes Eskilsson and Rickard E. Bensow

4

MESH ADAPTIVITY AND ERROR ESTIMATION

We use the adaptive mesh technology already implemented natively in OpenFOAM: a straightforward 1 to 8 isotropic hexahedra split with hanging nodes. In addition, maximum level of refinement, number of buffer layers as well as maximum allowed number of cells can be given. Please note that as the AMR is for 3D simulations, all adaptive mesh computations presented below are performed in 3D even though the solutions are constant in the z-direction. In order to drive the adaptivity we need an error estimator or indicator. In this study we use a simple and computationally efficient error estimator based on the jump in face values over cell boundaries [3]. This estimator originates from DG methods and the fact that DG solutions are super convergent on downwind faces [9]. Nevertheless, as DG and finite volume methods are equal to first order we expect the jump error estimator to work also for finite volume methods. For an arbitrary scalar q we denote the right- and left-hand states on either sides of a cell boundary by qR and qL , respectively. For a first order scheme qL,R is obtained by the corresponding cell averaged values, while for a second-order scheme qL and qR are given by a MUSCL reconstruction, see e.g. [20]. The error φ thus read φ=

1 |qL − qR | ≈ O(hp ) , 2

(5)

where h is the mesh size and p is the order of convergence. An error estimator for cell i can be constructed by taking the mean of the average error on the faces of the cell: R ! Ni X φ2 dS |Ω | S i ij ε2i = . (6) Ni j=1 |Sij | Finally, we normalize with the L2 norm of the entire domain to get the error estimator Ji that will be used to drive the adaptivity: Ji2 =

ε2i . 2kqk2L2

(7)

Even if not applied in the present study we note that the jump can additionally be used as a smoothness indicator [10], to determine if the solution in a cell needs to be limited. Note that it is the gradient that should be limited, not the face value, in order for the jump based error estimator to work satisfactorily. 5

ISENTROPIC VORTEX

We begin by considering a non-cavitating case: the isentropic vortex case. The isentropic vortex has an analytical solution, see e.g. [5], that can be used to asses the performance of the error estimator described in Section 4. The fluid is assumed to be governed by the perfect gas law with a heat capacity ratio of 1.4. 4

Claes Eskilsson and Rickard E. Bensow

Table 1: Exact and estimated L2 error for ρ

1st order 2nd order

N = 40 N = 80 error error order Exact 5.17E-03 3.22E-03 0.68 Estimated 3.41E-03 1.77E-03 0.94 Exact 3.41E-04 7.80E-05 2.13 Estimated 2.35E-04 4.97E-05 2.24

N = 160 error order 1.83E-03 0.82 9.07E-04 0.96 1.79E-05 2.12 1.06E-05 2.23

Table 2: Exact and estimated L2 error for |u|

1st order 2nd order

N = 40 N = 80 error error order Exact 2.10E-02 1.22E-02 0.78 Estimated 3.90E-02 2.12E-02 0.88 Exact 7.68E-04 1.85E-04 2.05 Estimated 4.32E-03 1.07E-03 2.01

N = 160 error order 6.33E-03 0.95 1.09E-02 0.96 4.71E-05 1.97 2.75E-04 1.96

We compute a quarter of a steady-state vortex with strength 5 in a in 5 × 5 domain. We divide the computational domain into Nx = Ny = N = [40, 80, 160] cells and use a CFL number of 0.01 in order to ensure that spatial errors are dominant. The error estimator (7) is designed for scalar quantities and it is straightforward to apply the error estimator to the density or the pressure. For vector-valued quantities such as velocity we need to resort to a scalar representation of the vector field, such as the magnitude. In this test case we investigate the L2 error for ρ and |u|. In Tables 1 and 2 we show the order of convergence for both the exact computational error as well as for the error estimator. From Tables 1 and 2 it can been seen that the schemes have the expected order of accuracy. Importantly we also see that the estimated error has the same order of convergence as the exact error, illustrating that it is feasible to use the jump based error estimator also in a finite volume setting. In Figure 1 we illustrate the spatial distribution of the exact and estimated errors for the density. Although the error estimator captures the spatial distribution of the error largely correct – the main error at the vortex core and along the boundaries – the error is in general under predicted. The numerical diffusion is the cause of this as the numerical diffusion will tend to smooth out the fields, making the jump values smaller and thus under predicting the error. 6

FLOW OVER A NACA0015 HYDROFOIL

A NACA0015 foil with a chord length, c, of 0.200 m at 6 degrees angle of attack is used as test case. The foil is immersed in a domain of 1.400 × 0.570 m, extending 2

5

Claes Eskilsson and Rickard E. Bensow

(a)

(b)

(c)

Figure 1: Isentropic vortex case at t = 10 using second-order reconstruction and N = 160. (a) ρ, (b) ||Error (ρ) ||L2 and (c) J (ρ).

chord lengths ahead of the leading edge, ending 4 chord lengths behind the trailing edge and with a vertical extent reflecting the size of the cavitation tunnel. We investigate two cases with different cavitation number, σ = 1.6 and σ = 1.0. The far field values are: T∞ = 293 K and u∞ = [12, 0]T m/s, yielding a Mach number of M∞ = 7.8 × 10−3 . The first case was chosen in order to apply the AMR to a steady cavity [11], while the latter was chosen as to apply the AMR to unsteady cavitation. It is however believed that the cavity at σ = 1.6 only globally appears to be steady, and (small-scale) shedding occurs at the trailing edge of the cavity; in our simulations, this was manifested through a low-frequency shedding. Nevertheless, there are periods during the simulation for which the cavity can be regarded as quasi-steady and we utilise one of those periods. We initially solve the cases on a fairly dense static mesh, made up of 53 500 cells in a C-type configuration, in order to obtain ‘reference’ solutions. It should be noted that the first- and second-order schemes tend to give different results even for simulations resolved to this degree. The high dependence of the solution on resolution is well-known and reported by e.g. [8]. The second-order simulations give larger vapour content and a more unsteady behaviour. We do, of course, expect the second-order scheme to better mimic the physical processes. However, as the main objective of the study is on the AMR we decided to use the first order scheme as the behaviour is more repetitive and it thus becomes easier to asses the performance of the AMR. In the test cases below we investigate AMR driven by the following entities: (i) vapour fraction, α, (ii) pressure, (iii) magnitude of the velocity and (iv) the relative strength of vorticity as given by the Q = 0.5((∂ui /∂xi )2 + (∂ui /∂xj )(∂ui /∂xi )) value. The former two are output from the EOS and thus functions of ρ and T , the latter two are functions of the velocity field. We initially evaluate the error estimators for the static case dense mesh as shown in Figure 2. It is seen that the vapour fraction, naturally, will only target the cavities. On the other hand, the pressure will not refine anything inside the cavities as the pressure is quite uniform there. Apart from in the proximity of the cavity, the pressure and the 6

Claes Eskilsson and Rickard E. Bensow

(c)

(d)

Figure 2: Example of estimated errors in the case of σ = 1.0 at t = 0.58 s. The thick black line shows the α = 0.05 contour line. (a) J (|u|), (b) J (Q), (c) J (α) and (d) J (p).

magnitude of velocity will indicate similar regions for refinement, notably in the far field, typically at the trailing edge of the foil and in the wake. It is interesting to note that the Q-value will pick up the cavities almost as well as the vapour fraction. Additionally, the Q-value also picks up the leading and trailing edges. We interpolate the solutions obtained on the dense mesh to an intentionally very coarse mesh to be used for the adaptive runs. The computational domain is decomposed into a C-type mesh, consisting of only 8 300 hexahedrals. We restrict the level of refinement to two and use two buffer layers in the simulations. In choosing the adaptivity tolerances we have tried to obtain as similar degrees of freedom (DoF) as possible for the four different adaptivity cases. Please note that the DoF reported are for a corresponding 2D run, regardless of the fact that the simulations are performed in 3D. We start by considering the quasi-steady case: σ = 1.6. In Figure 3 we show the adapted meshes as well as the pressure distribution and cavity surface. In Table 3 we Table 3: Quasi-steady cavitation σ = 1.6.

Case Static mesh Adaptive: |u| Adaptive: Q Adaptive: α Adaptive: p

Total vapour volume 8.49E-04 9.15E-04 8.84E-04 2.11E-04 3.89E-04

Degrees of Lift freedom coefficient 40 872 7.51E-01 21 763 6.68E-01 17 352 6.98E-01 9 068 6.62E-01 18 215 6.67E-01

7

Drag coefficient 3.91E-02 2.34E-02 2.77E-02 1.31E-02 2.06E-02

Claes Eskilsson and Rickard E. Bensow

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

Figure 3: Quasi-steady cavitation at σ = 1.6. AMR driven by the estimated error of (a,b) |u|, (c,d) Q, (e,f) α and (g,h) p. Left panel: mesh at t = 0.13 s and right panel: pressure and the thick black line shows the α = 0.05 contour line at t = 0.13 sec.

8

Claes Eskilsson and Rickard E. Bensow

(a)

(b)

(c)

(d)

Figure 4: Unsteady cavitation at σ = 1.0. (a) Total vapour volume, (b) degrees of freedom, (c) lift coefficient and (d) drag coefficient. In (c,d) the simulations driven by α and p are not include due to noise.

present mean values of total vapour volume, the degrees of freedom and the drag and lift coefficients (we present the mean values as the results for the drag and lift coefficients using the α and p adapted schemes are very noisy, see Figure 3(h,f)). In general we can see that the simulations where the AMR is driven by the velocity field give a better agreement with regard to vapour volume and drag coefficient, while there is little difference in lift coefficient. The velocity driven simulations have both two refinement levels at large portions around the leading edge and over the entire upper surface. The pressure simulation suffer from noise in the pressure field causing refinement to take place on false grounds. The α simulation stands out as giving the poorest results. On the other hand, the α simulation has a very low DoF – it was not possible to obtain any larger DoF due to the restriction of only two levels of refinement. However, to add resolution at the cavity interface is secondary to resolving the flow features causing the cavitation to occur in the first place. The unsteady cavitation case of σ = 1.0 is illustrated in Figures 4 and 5. In large, the results are the same as for the steady case: the velocity based refinement give the better results. However, Q is the only simulation for which the DoF is related to the vapour volume. As mentioned above, the pressure will not refine inside the cavity (see Figure 5(g)) as the pressure there is rather uniform.

9

Claes Eskilsson and Rickard E. Bensow

(a)

(b)

(c)

(d)

(e)

(f)

(g)

(h)

Figure 5: Unsteady cavitation at σ = 1.0. AMR driven by the estimated error of (a,b) |u|, (c,d) Q, (e,f) α and (g,h) p. Left panel: mesh at t = 0.575 s and right panel: pressure and the thick black line shows the α = 0.05 contour line at t = 0.575 sec.

10

Claes Eskilsson and Rickard E. Bensow

7

CONCLUSIONS

We implemented a generic and simple error estimator devised for DG methods [3] in a finite volume setting. The error estimator is based on the jump in values over the cell boundaries and was numerically shown to exhibit the same order of convergence as the exact error. We then used the error estimator for AMR simulations of cavitating flow over a NACA0015 foil. It was found that refinement based on vapour fraction gave poor results as the major flow features are not captured. AMR driven by the Q-value was shown to capturing not only the leading and trailing edge but also notably the cavity interface. Adaptivity based on Q is expected to be good also in non-cavitating regions, like the blade wake and tip vortex on a propeller. The model have recently been extended to include viscous effects and comparisons of predictions of cavitating flow using compressible and incompressible LES and RANS are thus work in progress. The aim is to clarify some of the potential issues in using incompressible flow solvers for cavitating flows, as was briefly discussed in the introduction. ACKNOWLEDGEMENTS The research leading to these results has received funding from the European Union Seventh Framework Programme (FP7/2007-2013) under grant agreement n◦ 233896. The computations were performed on C3SE computing resources. REFERENCES [1] Barth, T.J. and Jespersen, D.C. The design and application of upwind schemes on unstructured meshes. AIAA paper 89-0366 (1989). [2] Bensow R.E. and Bark G. Implicit LES predictions of the cavitating flow on a propeller. J. Fluids Eng. 132, (2010). [3] Bernard, P.-E. Discontinuous Galerkin Methods for Geophysical Flow Modeling. PhD thesis, Universit´e Catholique de Louvain, Belgium, (2008). [4] Franc, J.-P. and Michel, J.-M. Fundamentals of Cavitation. Kluwer , (2004). [5] Garnier, E., Sagaut, P. and Deville, M. A class of explicit ENO filters with application to unsteady flows. J. Comp. Phys. (2001) 170:184-204. [6] Greenshields, C.J., Weller, H.G., Gasparini, L. and Reese, J.M. Implementation of semi-discrete, non-staggered central schemes in a colocated, polyhedral, finite volume framework, for high-speed viscous flows. Int. J. Num. Meth. Fluids (2010) 63:1–21. [7] Huuva T., Large Eddy Simulation of Cavitating and Non-Cavitating Flow. PhD Thesis, Chalmers University of Technology, Sweden, (2008).

11

Claes Eskilsson and Rickard E. Bensow

[8] Koop, A.H. Numerical Simulation of Unsteady Three-Dimensional Sheet Cavitation. PhD thesis, University of Twente, the Netherlands, (2008). [9] Krivodonova, L. and Flaherty, J.E. Error estimation for discontinuous Galerkin solutions of two-dimensional hyperbolic problems. Adv. Comp. Math. (2003) 19:57-71. [10] Krivodonova, L., Xin, J., Remacle, J.-F., Chevaugeon, N. and Flaherty, J.E. Shock detection and limiting with discontinuous Galerkin methods for hyperbolic conservation laws. Applied Num. Math., (2004) 48:323-338. [11] Li, Z.-R., Pourquie, M. and van Terwisga, T.J.C. A numerical study of steady and unsteady cavitation on a 2d hydrofoil. Proceding of the 9th International Conference on Hydrodynamics, 770–777, (2010). [12] OpenCFD Lmtd. Available from http://www.openfoam.com (2010). [13] Ruuth, S.J. and Spiteri, R.J. High-order strong-stability-preserving Runge-Kutta methods with downwind-biased spatial discretizations. SIAM J. Num. Anal. (2004) 42:974-996. [14] Salvatore F., Streckwall H. and van Terwisga T.J.C. Propeller cavitation modelling by CFD - Results from the VIRTUE 2008 Rome workshop 1st Int. Symp. Marine Prop., (2009). [15] Saurel, R., Cocchi, J.P. and Butler, P.B. A numerical study of cavitation in the wake of a hypervelocity underwater profile. J. Prop. Power (1999) 15(4):513–522. [16] Schmidt, S.J, Sezal, I.H., Schnerr, G.H. and Talhamer, M. Riemann techniques for the simulation of compressible liquid flows with phase-transition at all Mach numbers - shock and wave dynamics in cavitating 3-D micro and macro systems. AIAA paper 2008-1238 (2008). [17] Schnerr, G. H., Schmidt, S. J., Sezal, I. H., and Thalhamer, M. Shock and wave dynamics of compressible liquid flows with special emphasis on unsteady load on hydrofoils and on cavitation in injection nozzles. In Proc. 6th Int. Symp. Cav. – CAV2006 (2006). [18] Schnerr, G. H., Sezal, I. H. and Schmidt, S. J. Numerical investigation of threedimensional cloud cavitation with special emphasis on collapse induced shock dynamics. Phys. Fluids (2008) 20:040703. [19] Schmidt, S.J., Thalhamer, M. and Schnerr, G.H. Inertia controlled instability and small scale structures of sheet and cloud cavitation. In Proc. 7th Int. Symp. Cav. – CAV2009, Paper No. 17, (2009).

12

Claes Eskilsson and Rickard E. Bensow

[20] Toro, E.F. Riemann Solvers and Numerical Methods for Fluid Dynamics. Springer, (1997).

13

Suggest Documents