<<

EXAMENSARBETE I TEKNISK MEKANIK 120 HP, AVANCERAD NIVÅ STOCKHOLM, SVERIGE 2016

Implementation of Aeroacoustic Methods in OpenFOAM

ERIKA SJÖBERG

KTH KUNGLIGA TEKNISKA HÖGSKOLAN

SKOLAN FÖR TEKNIKVETENSKAP TRITA TRITA-AVE 2016:01 ISSN 1651-7660

www.kth.se Abstract

A general method is established for external low Mach-number flows where aeroa- coustic analogies are used to decouple the sound generation from the sound prop- agation. The CFD solver OpenFOAM is used to compute the flow induced sound sources and Ffowcs-Williams and Hawkings acoustic analogy is implemented to calculate the propagation of sound. Incompressible and compressible source data is gathered for a test case and upon evaluation of the noise emission the assump- tion of incompressibility prove to be valid for a low Mach-number flow. Fur- thermore the advantage of non-reflecting boundary conditions in OpenFOAM is appraised and found to be effective. Lastly the method is tested on a more com- plicated test case in terms of a generic side mirror and results are found to agree well with previous studies.

3

Acknowledgments

I want to extend my warmest thank Creo Dynamics for giving me the opportunity to do my master thesis at their company. I have felt like a part of Creo from day one and could not have wished for better colleges; your help and expertise have made this thesis possible. Moreover I want to extend a special thanks to Johan Hammar who has guided me through this process and always put time aside for me no matter how busy of a schedule he has had. I also want to thank my examinator Ciarán O’Reilly for his time and valuable input.

Creo Dynamics, January 2016 Erika Sjöberg

5

Contents

Notation 9

1 Introduction 1 1.1 Motivation ...... 1 1.2 Research Objective ...... 2 1.3 Outline ...... 2

2 Theory 3 2.1 Methodology ...... 3 2.2 CFD Analysis - predicting the flowfield ...... 4 2.2.1 Direct Simulation ...... 4 2.3 Turbulence Modelling ...... 6 2.3.1 Reynolds averaged Navier-Stokes Equation ...... 6 2.3.2 Large Eddy Simulations ...... 7 2.3.3 Detached Eddy Simulation ...... 7 2.3.4 Spalart Allmaras Turbulence Model ...... 8 2.3.5 Wall functions ...... 8 2.3.6 Turbulence Modelling ...... 9 2.3.7 Boussinesq Approximation ...... 9 2.4 Hybrid Methods ...... 10 2.4.1 Lighthill’s Acoustic Analogy ...... 10 2.4.2 Curle’s Analogy ...... 11 2.4.3 Ffowcs-Williams and Hawkings Analogy ...... 13

3 CFD Software 15 3.1 Spatial Discretization ...... 16 3.2 Temporal Discretization ...... 16 3.3 Pressure and Velocity Coupling ...... 17 3.3.1 SIMPLE Algorithm ...... 18 3.3.2 PISO Algorithm ...... 19

4 Validation Case 21 4.1 Cylinder Test Case ...... 21

7 8 Contents

4.2 Review of Flow around a Cylinder Test Cases ...... 23 4.3 Cylinder Setup ...... 23 4.4 Boundary Conditions ...... 24 4.5 Mesh ...... 25 4.6 Validation ...... 27 4.6.1 Flow Validation ...... 27 4.6.2 Acoustic Validation ...... 28 4.7 Results ...... 30 4.7.1 Incompressible Solution ...... 30 4.7.2 Compressible Solution ...... 31 4.8 Interim Conclusion ...... 36

5 Generic Side Mirror Case 37 5.1 Review of Flow around a Side Mirror Test Cases ...... 37 5.2 Side Mirror Setup ...... 38 5.3 Boundary Conditions ...... 39 5.4 Mesh ...... 40 5.5 Flow Results ...... 43 5.6 Acoustic Results ...... 46 5.7 Interim Conclusion ...... 50

6 Concluding Remarks 51 6.1 Future Work ...... 52

Bibliography 53 Notation

Nomenclature Notation

qi Heat flux eo Internal energy ρ density τij viscous stress tensor R ideal gas constant cv specific heat (constant volume) cp specific heat (constant pressure) µ molecular viscosity σ Prandtl number η Kolmogorov length scale Λ Kolmogorov large size eddies ui velocity Ui time averaged velocity u0 fluctuating velocity P time averaged pressure p0 fluctuating pressure p pressure xi coordinate position δij Kronecker delta e0 total internal energy e internal energy νt kinetic eddy viscosity K kinetic energy Sij mean strain rate tensor T temperature a SPL sound pressure level f frequency fst strouhal frequency

9 10 Notation

Nomenclature Notation τ retarded time r distance between source and observer Go Green’s free field function Tij Lighthill’s stress tensor H(f ) Heavyside step function Dimensionless quantities CD drag coefficient CL lift coefficient Re Reynolds number M Mach number St Strouhal number 1 Introduction

1.1 Motivation

Aeroacoustics is the study of flow induced sound and was pioneered by James Lighthill back in the 1950’s. Flow induced sound can be created by turbulent wakes, detached boundary layers, vortex structures in the flow and flow interac- tion with solid walls [Y.Khalighi, 2010]. Flow-generated sound is today a well known problem in the transport industry, and according to a World Health Or- ganisation report side effects of noise can involve fatigue, stress, hearing loss and hormonal imbalance [Y.Khalighi, 2010]. Emphasis is today spent on noise control and to mitigate the aerodynamic noise a deeper understanding of the physics of the flow field and the sound field is necessary. Resolving both the sound and flow field presents an inherent scale problem where as Crighton [1993] so well described it

... in the 45 seconds of take-off roll of “terrifyingly loud ”Boeing 707, the total energy radiated as sound is only about enough to cook one egg.

Due to the scale difficulties severe limitations are put on computational re- sources and the aeroacoustic field have been heavily dependent upon experimen- tal methods. With the advance of technology and computational power acoustic analogies have proven to be an effective tool. Lighthill established when he developed an equation for the propagation of sound waves for a turbulent flow. Since then many researches have followed in his footsteps and made extensions to Lighthill’s original theory. Some of the more renowned are Curle’s analogy that takes into account the pres- ence of solid boundaries, and Ffowcs-Williams and Hawkings equation that also includes surfaces in motion.

1 2 1 Introduction

Due to the limitation of computational resources aeroacoustic analogies are a very useful tool since it drasticly reduces the computational power needed when solving for sound propagation. Acoustic analogies reduces the computational domain to the near field where high resolution is required and the sources are computed. All non-linear effects are prescribed to the near field and a linear wave operator propagates the sound in the acoustic domain.

1.2 Research Objective

The objective of the present thesis is to establish a method in OpenFOAM to calcu- late the sound field using aeroacoustic analogies. The results should be compared to previous studies done using commercial available software. To achieve the objectives this work is broken down into several sub-goals:

• Build a good test case. The test case should be simple enough that one can focus on the essential flow features but still capture the unsteady von Kármán vortex shedding. • Evaluate both the aerodynamic (CFD) part as well as the acoustic field cal- culated using the Ffowcs-Williams and Hawkings analogy. • Test the methodology on a more demanding case.

Other aims behind the research is to evaluate the existing boundary condi- tions in OpenFOAM with the goal of minimizing reflections at the boundaries.

1.3 Outline

The following structure will be used in the report.

• Chapter 2 will cover the general theory and governing equations behind the flow and aeroacoustic field. • Chapter 3 briefly explains the OpenFOAM software, user settings, and dis- cretization schemes.

• Chapter 4 and 5 presents the Validation case and a study of a Generic Side Mirror respectively. • Conclusions and future work is found in chapter 6. 2 Theory

2.1 Methodology

Utilizing the continuity, and energy equations in combination with initial and boundary conditions the flow field as well as the acoustic part can be found. Focusing on the sound generation and its propagation various methods can be used varying in computational effort and accuracy. Two main numerical Computational Aero Acoustic (CAA) approaches can be distinguished;

1. Direct Methods: A transient solution is calculated where the source and its propagation is resolved out to the far field. This method requires a very fine grid for the spatial and temporal resolution which places stringent demands on computational resources. X. Gloerfelt [2003] writes that direct methods can only predict good acoustic results for simple configurations at moderate Re numbers.

2. Hybrid methods: The source field is computed using CFD analysis and the propagation is predicted using a transport method. Hybrid methods significantly reduces the computational demand since only the nearfield needs to be spatially and temporally resolved.

Fig. 2.1 shows a schematic layout of the various CAA methods available [C. Wag- ner, 2007].

3 4 2 Theory

Figure 2.1: Various CAA Methods

A distinction will be made between calculating the flow field (1) and using the data from the flow field to predict the sound field (2). Sec 2.2 will present various methods available to solve for the flow field and sec 2.4 will focus on the implementation of acoustic analogies to calculate the sound radiation.

2.2 CFD Analysis - predicting the flowfield

2.2.1 Direct Simulation Direct methods is the most exact and perhaps also the most straightforward methodology in CAA. In Direct Simulation (DS) the governing equations are solved without using physical simplifications therein resolving the physical phe- nomena without modelling. The governing equations used are the fundamental equations of fluid dynamics: the continuity, momentum and the energy equation. They are here written in conservative form for a compressible fluid using the in- dex notation and Einstein convention.

The ,

∂ρ ∂(ρu ) + i = 0 (2.1) ∂t ∂xi

The momentum equation,

∂(ρu ) ∂(ρui uj ) ∂ p ∂τij i + = + (2.2) ∂t ∂xj −∂xi ∂xj 2.2 CFD Analysis - predicting the flowfield 5

And the energy equation,

∂(ρe ) ∂(ρe0uj + puj ) ∂(τij ui qj ) 0 + = − (2.3) ∂t ∂xj ∂xj

Where the energy e0 is the total internal energy, 1 e = e + u u (2.4) 0 2 i i

Further equations to close the system of equations are needed. The viscous stress tensor in eq. 2.2 and eq. 2.3 is for a Newtonian fluid defined as:   ∂ui ∂uj 2 ∂uk τij = µ + δij (2.5) ∂xj ∂xi − 3 ∂xk

Where µ is the dynamic molecular viscosity. The heat flux, qi, can be modeled with Fourier’s law:

µcp ∂T qi = (2.6) − σ ∂xi

Here cp is the specific heat and σ is the Prandtl number.

Under the assumption of a thermally perfect gas the Ideal gas law can be writ- ten as:

p = ρRT (2.7)

Where R is the ideal gas constant. For a calorically perfect gas the internal energy and enthalpy relations can be modeled as:

e = cv T h = cpT cp = cv + R (2.8)

DS can be compared to Direct Numerical Simulation in CFD and the sound emission can be evaluated anywhere in the flow field but at the price of daunting computer power. DS requires a computational grid resolving the entire span from the Kolmogorov micro scale η to the large size eddies, Λ. This presents an 6 2 Theory inherent multi scale problem where A. Johansson [2013] writes that the ratio of the smallest to the largest scales of turbulence can be estimated as:

Λ Re3/4 (2.9) η ∼ Λ

For a grid spanning in three directions and resolved down to the Kolmogorov 9/4 scale this would account in a grid-point-growth of ReΛ , or taking temporal res- 3 olution into account ReΛ.

2.3 Turbulence Modelling

2.3.1 Reynolds averaged Navier-Stokes Equation Reynolds averaged Navier-Stokes equations (RANS) are a time averaged version of the instantaneous Navier-Stokes equations. To cut down on computational cost the velocity vector and the pressure are divided into a steady (time-averaged) and a fluctuating part.

’ 0 ui = Ui + ui p = P + p (2.10)

This decomposition is known as the Reynolds decomposition. Incorporating the fluctuating velocity and pressure components into the incompressible Navier- Stokes equation the resulting mean flow equation can after time averaging be written as:

∂U ∂U 1 ∂P ∂  ∂U  i i i 0 0 + Uj = + ν ui uj (2.11) ∂t ∂xj − ρ ∂xi ∂xj ∂xj −

0 0 With the implementation of the RANS equations a new term, ρui uj , is found on the RHS describing the relationship between fluctuating velocities. This term is often referred to as the Reynolds stress tensor and introduces a closure problem where six additional unknown turbulent stresses arise.

To close the set of equations a wide variety of turbulence models are available:

• Algebraic models/zero equation models: Case specific and not very gen- eral. Works well for the scenario they were created for but need additional information such as velocity gradients or geometry specifications.

• One-equation models: Somewhat more general. Like the name a one-equation model usually solves a transport equation for one turbulent variable like 2.3 Turbulence Modelling 7

the turbulent kinetic energy K, or the eddy viscosity νT . Somewhat more general but case specific input is still required. An example of a common one-equation model is the Spalart-Allmaras model.

• Two-equation models: Two transport equations are solved for two different variables. Isotropic turbulence is generally assumed and no additional in- formation is needed; hence the model is "completely formulated in terms of local quantities" [A. Johansson, 2013]. Example of common two-equation models are k- and k-ω.

2.3.2 Large Eddy Simulations Large Eddy Simulation, or LES, is a model where instead of averaging equations as done in RANS, the equations are filtered. This is done on the Navier-Stokes equation and the result are variables that depend on both space and time. Filter- ing of variables is a part of a hybrid method where large eddies are resolved and small sub-grid scale information is modelled. A. Johansson [2013] writes that the small scale turbulence, or the Kolmogorov scale, is more isotropic and contains less energy than the large scale turbulence; hence errors introduced in the mod- elling process should be less critical. The small scales are usually modelled using the Boussinesque hypothesis.

2.3.3 Detached Eddy Simulation Detached Eddy Simulation (DES) was originally formulated for the Spalart All- maras model and is a combination of Unsteady RANS (URANS) and LES. URANS is very similar to RANS since they both solve for the time-averaged flow but dif- fers in the sense that URANS keeps the transient term [P.Spalart, 2007]. DES models the boundary layer using RANS while the outer eddies are resolved using LES.

∂ρν˜ ∂ρu˜j ν˜t ∂  µ + µ ∂ν˜  C ρ ∂ν˜ ∂ν˜ t + = t t + b2 t t + P Ψ (2.12) ∂t ∂xj ∂xj σ ν˜t ∂xj σ ν˜t ∂xj ∂xj −

νt = ν˜t fi (2.13) The production term , P;   ν˜t 1 P = C ρ s + f ν˜ s = (2s s ) 2 (2.14) b1 k2d2 2 t ij ij And the destruction term Ψ ;

 ν˜ 2 Ψ = C ρf t (2.15) w1 w d From the RANS SA model the distance, d, stems from the distance to the nearest wall, while in the DES model the distance d comes from the minimum of the cell length ∆ and the turbulent length scale d. Hence 8 2 Theory

˜ d = min(d, Ddes∆) (2.16)

This means that in the case where d < Cdes∆, which would occur in the bondary layer, the DES model switches to RANS mode [P.Spalart, 2007].

2.3.4 Spalart Allmaras Turbulence Model The Spalart Allmaras (SA) model is a one-equation model that solves for ν˜. ν˜ is referred to as nut in OpenFOAM but is often called the Spalart Allmaras variable. The SA model drops the last part in eq. 2.23 when solving for the eddy viscosity. Following relations are found in the SA model:

νT = νefv1 (2.17) where the viscous damping functions are:

X3 νe fv1 = 3 3 X = (2.18) X + Cv1 ν And the transport equation is written as:

   2 ∂ν˜ ∂ν˜ 1 ∂ ∂νe ∂ν˜ ∂ν˜ ν˜ + uej = cb1Sν˜ + [ (ν + ν˜) + cb2 ] cw1fw (2.19) ∂t ∂xj |{z} σ ∂xj ∂xj ∂xj ∂xj − d | {z } production | {z } Diffusion destruction And vorticity Seis modelled to keep its log-layer characteristics [S Deck, 2002]:

q ν˜ S˜ = 2Ω Ω f + f (2.20) ij ij v3 k2d2 v2 where   1 ∂u˜i ∂uej Ωij = (2.21) 2 ∂xj − ∂xj x fv2 = 1 fv3 = 1 (2.22) − 1 + xfv1

Following the recommendations in P.Spalart [2007] for adequate ratio of tur- ν bulent kinematic viscosity to kinematic viscosity, t = 3 5, nut (ν˜) was set to ν − 7.45 10 5 in the turbulent mirror case. × − 2.3.5 Wall functions To circumvent the need for a very fine mesh resolution wall functions can in- stead be used. Wall functions models the near-wall flow using empirical laws and information such as distance to the wall, pressure gradients, shear stress etc. Wall functions are based of von Kármáns law of the wall and for successful usage 30 < y+ < 300 while in some cases the range is even larger; 11 < y+ < 300. 2.3 Turbulence Modelling 9

2.3.6 Turbulence Modelling As previously mentioned the closure problem causes a need for turbulence mod- elling. Using time-averaging methods instead of looking at the instantaneous con- tinuity and Navier-Stokes equations we are left with six unknowns (see sec. 2.3.1) called the Reynolds stresses and the scalar transport terms. To close this system of equations turbulence modeling is used.

2.3.7 Boussinesq Approximation One of the early attempts of modeling the turbulent shear stress was made by the French 19th century scientist Boussinesq [A. Johansson, 2013]. Boussinesq described the Reynolds stresses using mean velocity gradients. 2 ρu0 u0 = ρν S ρKδ (2.23) − i j T ij − 3 ij

Here νT is the kinetic eddy viscosity, K the kinetic energy and Sij the mean strain rate tensor:

1 1∂U ∂Uj  0 0 i K = ui uj Sij = + (2.24) 2 2 ∂xj ∂xi Using the Boussinesq model the closure problem is reduced to model the eddy viscosity. Since the eddy viscosity is dominated by the length and velocity scale of the large turbulent eddies (Λ, V ) this assumption brings about a huge reduction in computational cost [A. Johansson, 2013]. 10 2 Theory

2.4 Hybrid Methods

The hydrodynamic phenomenon is the salient feature in the flow region with the energy of the acoustic field generally of the order of 1% as compared to the to- tal energy [J.Larsson, 2002]. Since the sound is generated in the flow region and propagated through the far field hybrid methods decouple the flow generation from the acoustic propagation in the far field; consequently allowing for meth- ods adapted for the various regions.

Hybrid methods are only applicable for aeroacoustic problems that exhibit a one-way coupling between the flow and the . In the case of a one-way coupling the flow is independent of the acoustic part, hence no energy is fed back into the flow from the propagation. An advantage behind one-way coupled problems is that they can be separated into two different problems, one part being the flow induced source field while the other one is propagation of sources. Figure 3.2 shows the three different flow regions generally used when dealing with aeroacoustic flows.

Far field

Near field

Source Region

Figure 2.2: Flow and Acoustic Regions

CFD is a prevalent tool when resolving the sound sources in the flow region. In a direct coupling scenario the sound sources can be computed at a much lower computational cost than direct methods thanks to a much smaller computational domain. In this case the computational region should cover all non-linear effects, which is usually only up to a few wave lengths [C. Wagner, 2007].

2.4.1 Lighthill’s Acoustic Analogy James Lighthill laid the groundwork for the models of sound generation and is today considered the father of aeroacoustics. To reduce the generated sound from jet engines Lighthill developed analogies uncoupling the sound field from the source field. Lighthill used the fundamental equations of fluid dynamics to model the source field as an inhomogeneous . 2.4 Hybrid Methods 11

Differentiating the continuity equation (eq. 2.1) with respect to time, and the momentum equation (eq. 2.2) with respect to space, while subtracting the latter from the differentiated continuity equation one gets:

2 2 2 2 ∂ ρ ∂ ρui uj ∂ p ∂ τij 2 = 2 (2.25) ∂t − ∂xi∂xj ∂xi − ∂xi xj 2 2 ∂ ρ Subtracting a 2 from equation (eq. 2.25) it can be re-formulated as Lighthill’s ∞ ∂xi wave equation:

2 2 2 ∂ ρ 2 ∂ ρ ∂ Tij 2 a 2 = (2.26) ∂t − ∞ ∂xi ∂xi∂xj

Where Tij is the Lighthill’s stress tensor and defined as

2 Tij = ρui uj τij + (p a ρ)δij (2.27) − − ∞

No assumptions has been made at this point and Eq. 2.26 is exact. A distinc- tion has been made between the sound sources and the propagation of sound sources. The left hand side is an ordinary wave operator whereas the right hand side is the acoustic source terms. For Lighthill’s equation to be applicable the right hand side should be known as well as decoupled from the acoustic field.

By comparing the magnitude of the three terms in the stress tensor Lighthill deduced that the momentum flux tensor ρui uj is the only significant contributor to sound production Tij for cold jets.

The acoustic wave equation can be solved analytically if the right hand side is assumed known [J.Larsson, 2002]. A common approach is to integrate the sources using a free fields Green function.

Z 2 1 1 ∂ Tij x y ρ( , t) ρ0 = 2 ∂V ( ) (2.28) − 4πa r ∂yi∂yj ∞ ∞

r Where τ is the retarded time; τ = t − a ∞

2.4.2 Curle’s Analogy Lighthill’s theory was further extended by Curle to incorporate the presence of solid boundaries upon the aerodynamic sound. Curle’s approach was to find a solution to the inhomogeneous wave equation where the double divergence of 12 2 Theory

Eq. 2.26 can be taken outside the integral sign. The derivation is carried out in a similar fashion as Lighthill’s original work but with two additional steps. To account for solid boundaries a surface integral is added through the Kirchoff- Helmholtz formula [Ask, 2008], then a transformation from source coordinates to observer coordinates is done. Starting with the general solution of the inhomoge- neous wave equation previously mentioned but this time on a bounded domain.

2 1 R 1 ∂ Tij (x ) = (y) ρ , t ρ0 2 V ∂V − 4πa r ∂yi∂yj ∞ (2.29) 1 R 1 ∂ρ 1 ∂r 1 ∂r ∂ρ  + ρ + ∂S(y) −4π S r ∂n r2 ∂n a r ∂n ∂t ∞

Utilizing partial integration and symmetrical properties from the Green’s func- tion G0 [S. Rienstra, 2015]:

∂G ∂G ∂G ∂G 0 = 0 0 = 0 (2.30) ∂xi ∂yi ∂τ − ∂t

Yields: 2 1 ∂ R Tij (x ) = (y) ρ , t ρ0 2 V dV − 4πa ∂xi∂xj r ∞

1 ∂ R nj [ + ] (y) (2.31) 2 S ρui uj pδij τij dS −4πa ∂xi r − ∞ 1 ∂ R ρu n + i i dS(y) 4πa2 ∂t S r ∞

The second surface integral in Equation 2.31 characterizes the monopole field created by fluid vibrations of the body [5] which in many cases can be neglected. In the case of solid surfaces where the velocity on the surface is zero Curle’s final equation reads:

2 1 ∂ R Tij (x ) = (y) ρ , t ρ0 2 V dV − 4πa ∂xi∂xj r ∞ (2.32) 1 ∂ R n j ( ) (y) 2 S r pδij τij dS −4πa ∂xi − ∞

A more detailed derivation can be found in J.Larsson [2002]. 2.4 Hybrid Methods 13

2.4.3 Ffowcs-Williams and Hawkings Analogy Ffowcs-Williams and Hawkings (FW-H) extended the work that Curle had pub- lished by taking into account the sound generation from arbitrary motion of a body in a turbulent flow. FW-H equation is a generalization of Curle’s analogy where the governing equations are re-written in such a way that the source terms will account for boundary effects. The result is an equation valid for a continuous infinite space.

2 0 1 ∂ R Tij∗ (x ) = (y ) ρ , t ρ0 2 V dV ∗ − 4πa ∂xi∂xj lj vj ∞ r(1 ) − a ∞

1 ∂ R F∗ i (y ) 2 S dS ∗ − 4πa ∂xi lj vj (2.33) ∞ r(1 ) − a ∞ 1 ∂ R Q + ∗ (y ) 2 S dS ∗ 4πa ∂t S lj vj ∞ r(1 ) − a ∞

Where the source terms in a moving reference frame are:

0 2 Tij∗ = ρ(ui∗ + vi)(uj∗ + vj ) τij∗ + (p a (ρ ρ )) δij  − − ∞ − ∞  F∗ = ρ(u∗ + v ) u∗ + pδ τ∗ n (2.34) i i i j ij − ij j Q∗ = (ρ vi + ρui∗)ni ∞

0 The three source terms Tij∗,Fi∗,Q∗ are associated with quadrupole, dipole, and monopole source mechanisms respectively. The quadrupole source mechanism is due to fluctuating stresses in the fluid (unsteady Reynolds stress) and dipole sources are created by external unsteady forces, or fluid pressure on a solid bound- ary. Monopole sources are due to volume flow or fluctuating mass injection.

In the case of an impermeable surface simplifications can be made. Focusing on the dipole term which is of most importance to this work, ui∗ is by definition equal to zero on the surface, and Fi∗ can therefore be written as:

F∗ = (pδ τ∗ ) n (2.35) i ij − ij j Numerical implementation of Eq. 2.33 can be difficult due to the combination of spatial and temporal derivatives with respect to the observer frame of refer- ence [Williamson, 1996]. Later formulations by Bretner and Farassat resolves the Ffowcs-Williams and Hawkings analogy in the frequency domain to circumvent 14 2 Theory the problem of emission time.

With the implementation of the FW-H analogy isotropic wave propagation is considered, and can hence only be expected to provide good results in flows with zero or low mean motion. To incorporate mean flow the convected FW-H analogy can be used where Gloerfelt et al. introduces the concept of having the observer move with the mean flow. The derivation can be found in X. Gloerfelt [2003] and the convected FW-H equation for the frequency domain is written as following:

 ∂2 ∂ ∂2  + k2 2iM k M M [H( f )c2 ρ0 (x, ω)] 2 i ∂x i j ∂x ∂x ∂xi − i − i j ∞ (2.36) ∂2  ∂2 = T (x, ω)H(f)] [F (x, ω)δ(f )] iωQ(x, ω)δ(f ) ∂x ∂x ij 2 i − i j − ∂xi −

From the integral solution by X. Gloerfelt [2003] the source terms can be writ- ten as:

2 Tij = ρ(ui Ui∞)(uj Uj∞) + (p c ρ)δij τij − − − ∞ − F = [ρ(u 2U ∞) u + pδ τ∗ ] n (2.37) i − i − i j ij − ij j Q = ρui ni

It should here be noted that instead of using the free-space Green’s function the convective Green’s function should be used. 3 CFD Software

OpenFOAM is an open source CFD software package and was created by Henry Weller in 1989. It is written using C++ as programming language, structured as a library, and released under the GNU Public License. One of the core ideas of OpenFOAM is to share the source code with its users. Pre-built solvers for a wide variety of applications are available in OpenFOAM, but also the opportunity of customizing a solver, or building one’s own solver. OpenFOAM can easily be run in parallel. The general structure of OpenFOAM is divided into three main directories; a System, Constant and a Time directory.

OpenFOAM Case System

controlDict fvSchemes fvSolution Constant polyMesh properties

Time Directories U,P,nuTilda Piso Algorithm Figure 3.1: OpenFOAM case structure Set boundary conditions

15 Solve momentum eq.

compute intermediate velocity field (v∗) Compute mass fluxes

solve for pressure (p∗)

Correct mass fluxes correct velocities

Update boundary conditions 16 3 CFD Software

The System directory contains at minimum the controlDict, fvSchemes, and fv- Solution. The controlDict controls parameters such as start/end time, step size, when and what files to output etc. fvSchemes and fvSolution dictates what dis- cretization schemes to use, equation solvers and tolerances respectively. The Con- stant directory contains the mesh and other physical properties needed for the calculations. For a turbulent case the turbulent properties would be specified here [Greenshields, 2015].

3.1 Spatial Discretization

Much time can be spent discussing and testing the numerous schemes in Open- FOAM. Since this is out of the scope of this thesis only a few things will be said about the chosen settings. The schemes used are second order, and well tested at Creo Dynamics.

The GAMG solver, short for Geometric Agglomerated Algebraic Multigrid solver, is a linear solver used for the pressure. SnGradSchemes is a user defined variable in OpenFOAM that allows the user to chose what surface normal grad scheme to use. Limited, is used for this work, which means that a limited non- orthogonal correction is to be used.

Gaussian integration is a second order discretization scheme and is defined in the fvSchemes dict together with the choice of interpolation scheme. In the Gaus- sian integration values from cell centers need to be interpolated to face centers. A linear interpolation scheme is used for this.

3.2 Temporal Discretization

OpenFOAM provides a wide range of temporal discretization schemes varying in accuracy and computational cost. During a steady state simulation the SteadyS- tate option can be specified in the fvSchemes for the time scheme, and the time derivative will be “switched off”. For a transient problem the solution is time dependent and a solution will be found by a time-marching method.

The Crank-Nicolson (CN) method averages properties between time steps where both the old and new values are used. CN uses a weighted average be- tween spatial steps where for an equal contribution close resemblance can be found to central-differencing schemes. The Crank-Nicolson method is often used ∂T for parabolic equations and can for the heat conductivity equation = α 2T ∂t ∇ be written as [Anderson, 1995]:

n+1 n 1 n+1 n 1 n+1 n 1 n+1 n Ti Ti 2 (Ti+1 + Ti+1) + 2 ( 2Ti 2Ti ) + 2 (Ti 1 + Ti 1) − = α − − − − (3.1) ∆t (∆x)2 3.3 Pressure and Velocity Coupling 17

Where α is the thermal diffusivity constant. Being an implicit method Eq. 3.1 can not be solved for a particular node point but has to be solved for all grid points simultaneously. Crank-Nicolson is con- ditionally bounded and comes with a time constraint. Since it is not a pure ex- plicit method CN does not have as strict of a time step for stability. The Courant- Friedrichs-Levy (CFL) condition is used to find a suitable time step for temporal accuracy as well as stability.

u ∆t CFL = | | 1 (3.2) ∆x ≤

The CFL condition is a necessary condition for stability but does not ensure a stable solution. Based on the CFL value the computational time-step for the time advancement for this study’s two cases is found:

9 6 ∆t = 1 10− s ∆t = 5 10− s (3.3) cylinder × mirror ×

With a resulting max CFL value of around 0.48 for the cylinder and 1.5 for the mirror.

3.3 Pressure and Velocity Coupling

PISO and SIMPLE are two algorithms commonly used in OpenFOAM to solve the equations for velocity and pressure. PISO is a semi-implicit method that stands for Pressure-Implicit Split Operator and is developed for transient prob- lems. SIMPLE on the other hand, or Semi-Implicit Method for Pressure-Linked Equations, is a steady-state algorithm. PIMPLE is a merged version of the PISO- SIMPLE algorithms. Both SIMPLE and PISO are discretized using a staggered velocity field. This is done so that in the case of a ƒcheckerboard ‚pressure field the discretised solution will not exhibit a non-physical uniform pressure distribu- tion. H.K Versteeg [1995] presents a grafic figure of the discretized volume where scalar variables are defined on the nodes (black dots) while velocities are defined between nodes in fig. 3.2. 18 3 CFD Software

Figure 3.2: Staggered grid for velocity components

3.3.1 SIMPLE Algorithm SIMPLE, or the Semi-Implicit Method for Pressure-Linked Equations, is a steady- state algorithm based on work by Patankar and Spalding (1972). The SIMPLE algorithm uses a “guess-and-correct”method [H.K Versteeg, 1995] where in its initial stage SIMPLE approximates the velocity field using the momentum equa- tion and a guessed pressure field p . ∗ The discretised u- and v-momentum equations are: X ai,J ui,J∗ = anbunb∗ + (pl∗ 1,J pl,J∗ )Ai,J + bi,J (3.4) − − X aI,j vI,j∗ = anbvnb∗ + (pI,J∗ 1 pI,J∗ )AI,J + bI,J (3.5) − − where ai,J and anb are coefficients, for a more detailed explanation on how to calculate these see the work by H.K Versteeg [1995]. The correct pressure field p, relates to the guessed pressure field p∗ and the correction, p0 , in the following way;

p = p∗ + p0 (3.6) Many times under-relaxation is used to reduce the risk of divergence. Under- relaxation reduces the amount the guessed pressure field is corrected by p0 , and the new pressure field can be calculated in a following way

new 0 p = p∗ + αpp (3.7)

Here αp is the under-relaxation factor and it is for the present case set to 0.33. 3.3 Pressure and Velocity Coupling 19

From the guessed pressure field, and the discretized momentum equation u and v velocities are solved for. ∗ ∗

u = u∗ + u0 v = v∗ + v0 (3.8) Where for a converged solution

p∗ = p u∗ = u v∗ = v (3.9)

3.3.2 PISO Algorithm The PISO algorithm is similar to the SIMPLE algorith but has another corrector step. The main steps of the PISO loop are found in Fig. 3.3 below [Greenshields, 2015].

Figure 3.3: Main steps of Piso

The PISO algorithm entails two corrector steps and will hence solve for the pressure equation twice. Due to this additional storage and computational power is needed when running PISO.

4 Validation Case

To test the methodology a validation case is essential. The test case should fill certain criteria such as well tested and documented in literature and limited ge- ometrical complexity. A more ƒstraightforward‚validation case allows for more time to be spent on the paramount characteristics of the problem.

4.1 Cylinder Test Case

Flow past a circular cylinder is chosen as the test case on the basis of these criteria. It is an area that has been intensively studied due to its fundamental importance and high applicability. Williamson [1996] categorises the vortex formation for various flow regimes into different groups based of their base suction coefficient:

21 22 4 Validation Case

Figure 4.1: Vortex Dynamics in the Cylinder Wake Regime

Figure 4.1 is a plot of the base suction coefficients for a wide variety of Reynolds numbers. The base suction coefficient is the negative value of base pressure coef- ficients (-Cp). Williamson points towards its usefulness when distinguishing be- tween different flow regimes since the base suction coefficient is highly effected by vortex formation in the immediate wake. From Fig. 4.1 the laminar vortex shedding regime is found for Reynolds numbers ranging between 49 to 140-194. The 3-D wake transition regime is found between B and C in Fig Fig. 4.1 and with increased Reynolds number the 3-D flow features become increasingly im- portant.

With Williamsons research in mind a Reynolds number of 150 was chosen for the study.

ρu D Re = ∞ (4.1) µ

The Reynolds number is based on the oncoming free-stream velocity and the diameter of the cylinder. The laminar flow past a cylinder and its vortex shedding regime is a well tested case both experimentally and numerically which makes it a well suited test-case. 4.2 Review of Flow around a Cylinder Test Cases 23

A hybrid method using Ffowcs-Williams and Hawkings method will be im- plemented in OpenFOAM where the flow field is solved using CFD and the fluc- tuating wall pressure on the cylinder will be used to calculate the far field sound radiation. This hybrid method only requires a spatially and temporally high res- olution around the cylinder and is therefore beneficial in terms of computational resources. Evaluating the sound field in the frequency domain will circumvent the costly time integration, and utilizing the convected FW-H equation will ac- count for the mean flow. The FW-H results will be compared to directly com- puted results as well as to previous studies.

4.2 Review of Flow around a Cylinder Test Cases

Lixia Qu [2013] studied the intermediate wake for a 2D flow around a cylinder at a Reynolds number of 100. They found from their sensitivity study for the domain size that a physical domain height of 120*D (where D=diameter) caused less than a 0.5% discrepancy for factors such as drag and lift when compared to a domain height of 200D. Shair et al displayed that the stability of the wake and the critical Reynolds number is closely related to increases in blockage for a flow past a solid body. B. Kumar [2006] continued on the same lines as Shair et al’s work and investigated the effect of blockage on critical parameters for the onset of wake instabilities. Their work found the Strouhal number to be highly effected by blockage, but that the effect of blockage is negligible when the lateral boundaries are positioned more than 100 D from the cylinder. ×

4.3 Cylinder Setup

Choosing a physical domain for the numerical simulation is a balance between computational cost and accuracy. A larger domain reduces the effect of bound- aries and blockage but can be computationally heavy. Since this study is done in two-dimensions (2-D) the problem is not as pertinent. For 2-D cylinder simu- lations, rectangular, polar, or O-grid domains are most common. A rectangular domain is selected which allows for a higher resolution in the wake and more flexibility regarding boundary conditions. The cylinder is placed with its centre at the origin of a Cartesian coordinate system. 24 4 Validation Case

푢∞

D H

y L z x

Figure 4.2: Representation of the solution domain

The diameter of the cylinder, D, is 1 and located at the center of the domain (L/2, H/2). The overall length is 200D and the height of the domain is 100D. While running a 2-D simulation OpenFOAM does not support strictly 2-D cases and the depth of the domain size is therefore specified as 1. This “additional” volume created by a front and back plane will later on be defined as empty and yield a 2-D domain.

4.4 Boundary Conditions

A free-stream Dirichlet condition, u = u , v = o is assigned to the inlet, outlet, and freestream boundaries (top and bottom).∞ The outlet and external walls are placed far enough from the cylinder that the disturbances caused by the cylinder are assumed to be small enough that no velocity gradients in the flow are present.

Table 4.1: Cylinder Boundary Conditions. Velocity Pressure Inlet u vel specified (v=w=0) Wave Transmissive Outlet u vel specified (v=w=0) Wave Transmissive Wall No slip condition (u=v=w=0) Zero gradient Symmetry u vel specified (v=w=0) Wave Transmissive 4.5 Mesh 25

At the cylinder a no-slip boundary condition is applied. To compute the sound field the source terms will be modeled from the wall pressure terms. Since the acoustic energy often is less than 1% of the total energy of the flow it is of high importance to reduce the influence of boundaries reflecting back energy into the computational domain [J.Larsson, 2002]. If caution is not taken the ef- fect of boundaries can have a larger impact on the sound field than the sound itself. A wave transmissive pressure boundary condition is therefore applied in OpenFOAM to all four boundaries.

4.5 Mesh

Implementing FW-H’s analogy to compute the sound region assumes that the generation of sound can be decoupled from its propagation. The aerodynamic quantities are transiently recorded using a CFD mesh. Since sound is the prop- agation of unsteady, small, pressure fluctuations it is of paramount importance that the mesh is fine enough to capture this phenomena.

The geometry and the mesh are created using Beta CAE’s pre-processor ANSA. For the purpose of this work one mesh was used for both the CFD as well as the acoustic computation. The dual purpose of the mesh calls for a higher grid resolution in the source region as well as downstream of the cylinder. In the cylinder wake the ANSA Size Box entity is used for local mesh control. Four boxes are placed around the cylinder stretching downstream, and allowing for refinement in the near wake to capture the periodic vortex shedding.

Figure 4.3: Computational Mesh created in ANSA and used for the cylinder simulations in OpenFOAM

To capture the high velocity gradients in the boundary layer 10 prism layers are used with a growth factor of 1.1 and a first layer height of 4 10 4D. × − 26 4 Validation Case

Figure 4.4: Close up on the prism layers constructed to capture the high velocity gradients from the cylinder walls.

Two different meshes are created ranging in how fine the wake is resolved.

Table 4.2: Set up mesh independence study. Cylinder Mesh 1 Mesh 2 Nr. Cells 904750 84700 st + 3 3 Dist 1 y prism layer 0.4 10− 12 10− Largest cell size Box 1 0×.02× 0.05 Largest cell size Box 2 0.2 0.35 Largest cell size Box 3 0.35 0.8

For validation the drag and lift force, as well as the Strouhal number, on the cylinder are compared between the two different meshes as well as to previous results.

F F fL C = D C = L St = (4.2) d L 1 2 1 2 DρU U ρ U D 2 ∞ 2 ∞ ∞

Where FD and FL are the forces in the longitudinal and lateral direction re- spectively. The drag and lift forces are per unit width being a 2-D geometry.

Table 4.3: Mesh Independence Study. CL Cd St Fine mesh 0.369 1.334 0.1835 Coarse mesh 0.366 1.345 0.1866

Comparing force parameters very slight differences are captured between the fine and the coarse mesh indicating that the fine mesh captures the flow field accurately. 4.6 Validation 27

4.6 Validation

To verify the accuracy of the results a two step validation process should be car- ried out. Where initially a flow assessment should be implemented followed by an acoustic validation. For trustworthy results it is critical that both the hydro- dynamic flow calculations are calculated correctly and that the FW-H acoustic analogy is implemented accurately. Moreover simplifying assumptions made dur- ing the evaluation of the FW-H source terms should be assessed and if possible verified.

4.6.1 Flow Validation

Thanks to a vast amount of published research from similar cylinder studies flow results are available for comparison. Table 4.5 presents some of them.

Table 4.4: Comparison to previous studies. Re C C C St L D − pb Present study 150 0.3688 1.334 0.870 0.1835 Qu et al. 150 0.3546 1.305 0.846 0.1841 Qu et al (larger domain) 150 0.3529 1.301 0.840 0.1837 Inoue and Hatakeyama 150 1.334 0.1835

The base suction coefficient, Cpb at the base of the cylinder, can be compared to Lixia Qu [2013] study of the intermediate− wake region for flow past a cylinder at a Reynolds number of 150. A close correlation is found. The drag coefficient also agrees well with previous studies and is the same as O.Inoue [2002] found in their study.

The Strouhal number for the present cylinder simulations can be compared with the Strouhal-Reynolds-number relationship for the vortex shedding from a circular cylinder proposed by U. Fey [1998].

1 St = 0.2684 1.0356(Re)− 2 (4.3) −

Equation 4.3 is developed from experimental data and would yield a Strouhal number of 0.1838 (Re = 150); which is within 0.2% of the Strouhal number ob- tained in the present study. A graphical representation of Eq. 4.3 and previous results are displayed in Fig 4.5. 28 4 Validation Case

0.2

0.19

0.18

0.17

St 0.16

0.15

0.14 Fey Qu et al. 0.13 Park et al. present 0.12 50 100 150 200 Re

Figure 4.5: Strouhal vs. Reynolds number comparison of similar 2-D flow past a cylinder studies.

The Strouhal number from the present case, in Fig 4.5, is right on the trace of what is to be expected for a free stream external flow for a cylinder with Re = 150.

4.6.2 Acoustic Validation

For the implementation of the FW-H analogy in Eq. 2.33 the quadrupole source 0 term, Tij∗, is considered negligible in comparison to the dipole source term, Fi∗, under the assumption of a low Mach number flow. Moreover the viscous shear stress, τij , is believed to have such small contribution to the dipole source term that only the pressure fluctuations are taken into account when calculating the sound field. To assess the validity of previous assumptions results soon to be pub- lished from Creo Dynamics is used. The data from Creo Dynamics is achieved using the commercial solver StarCCM+ and an identical setup. Fig. 4.6 shows a directivity comparison between including all source terms, or only taking the pressure fluctuations into account when evaluating the FW-H sound field. 4.6 Validation 29

90 0.003 120 60

0.002 150 30 0.001

180 0

210 330

240 300 270 Figure 4.6: Directivity plot comparison using StarCCM+; based off FW-H 0 wall pressure fluctuations (– blue line) and the inclusion of Tij∗ and τ (red line).

Fig. 4.6 shows that only taking the fluctuating surface pressure into account during the evaluation of the sound field in the FW-H analogy gives a good repre- sentation at a Mach number of 0.2. Since the significance of viscous shear stress is less for higher Reynolds number flows one can expect an even better agreement for higher Reynolds cases.

To validate the acoustic calculations a directivity comparison is made between the results from Creo Dynamics using StarCCM+, and the results of the present study. Only the fluctuating pressure in the dipole source term is considered.

90 0.003 120 60 0.002 150 30 0.001

180 0

210 330

240 300 270 Figure 4.7: Directivity plot comparison at fshed based of FW-H wall pressure fluctuations using StarCCM+ (– red line) and OpenFOAM (blue line). 30 4 Validation Case

Comparing the calculated directivity from StarCCM+ and OpenFOAM at a diameter of 10D a close agreement is found. A distinguished latitudinal direc- tionality of the sound is also evident from the directivity plot of the shedding frequency in Fig 4.7.

4.7 Results

A steady state solution is primarily run and the converged results are used to initiate the incompressible and compressible simulations.

Data from pressure fluctuations on the cylinder is captured once the von Kár- mán shedding shows a time independent periodic behaviour.

A snap shot of the vorticity is presented in Fig 4.8.

Figure 4.8: Vorticity cylinder 0 < ω D/L < 2 ×

Fig 4.8 captures von Kármán vortex shedding where vortices are shed from the upper and lower part of the cylinder.

4.7.1 Incompressible Solution

The assumption of incompressibility is often assumed valid for low Mach number flows; Ma < 0.3. A Mach number of 0.2 is used in the present case and to inves- tigate if this is a reasonable supposition a comparison of the directivity using an incompressible as well as a compressible approach is carried out. 4.7 Results 31

90 0.006 120 60 0.004 150 30 0.002

180 0

210 330

240 300 270 Figure 4.9: Comparison compressible vs. incompressible results at a dis- tance of 5D. (blue) compressible (- red) incompressible

Fig 4.9 shows a slightly higher directivity in the compressible solution, but overall both solutions concur well. The Strouhal number for shedding frequency is the same. Lift (CL), is calculated using r.m.s values and (Cd) is calculated from the time mean drag value.

Table 4.5: Comparison Incompressible vs. Compressible results Re CL Cd Compressible 150 0.3688 1.334 Incompressible 150 0.3515 1.303

CL in the compressible case is 5% larger than in the incompressible case and the same trend is seen for Cd where a 2.3% greater Cd is measured in the com- pressible solution.

4.7.2 Compressible Solution

Fig 4.10 shows the cylinder pressure coefficient. As expected the pressure coeffi- cient is close to unity in the frontal stagnation point at the rear (θ = 180) while a minimum is reached at θ of 95 deg. − ∼ − 32 4 Validation Case

1.5

1

0.5

0 Cp

-0.5

-1

-1.5 -180 -150 -120 -90 -60 -30 0 3

Figure 4.10

It is critical that the boundaries do not affect the solution since reflected sound waves will propagate through the domain. With the implementation of a wave transmissive boundary condition in OpenFOAM a large impact on the drag coef- ficient (Cd) is measured.

1.37 1.37

1.36 1.36

1.35 1.35

1.34 1.34

Cd Cd 1.33 1.33

1.32 1.32

1.31 1.31

1.3 1.3 3.4 3.5 3.6 3.7 3.8 3.9 4 4.1 4.2 4.3 4.4 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4 4.1 4.2 -4 Time #10-4 Time #10

Figure 4.11: Cd without wave Figure 4.12: Cd with wave transmissive boundary condi- transmissive boundary condi- tions tions

Fig. 4.11 exhibits a larger periodic behaviour increasing with time while Fig. 4.12 displays no such trend. This discrepancy can also be seen in the instantaneous pressure distribution in Fig 4.13, where an almost checker-board pressure propa- gation is captured in the left figure. 4.7 Results 33

Figure 4.13: Implementation of different boundary conditions. Left figure: Zero gradient pressure condition. Right figure: Wave Transmissive pressure condition

A probe is positioned in the domain at a radius of 5D from the cylinder [- 3.5D,-3.6D]. Pressure fluctuations are measured and used to compute the radi- ated sound. The sound emission is also computed in the same point using the pressure fluctuations on the cylinder and FW-H analogy. Equation 4.4 is used to calculate the Sound Pressure Levels (SPL) in Fig. 4.14:

 p2  SPL = 10log10 2 (4.4) pref

Where p is 2 10 5. ref × −

130

120

110

100

90

SPL (dB) SPL 80

70

60

50

40 105 106 Frequency (Hz)

Figure 4.14: SPL at sensor 10 (red ) Measured, (black) FW-H − 34 4 Validation Case

From Fig. 4.14 the dominant node is found at the shedding frequency, f = 3.8 105. The directly computed noise and the FW-H analogy results agree reasonable× well for the first and second harmonics while at higher frequencies the FW-H analogy results are clearly underpredicting. This could be due to the neglection of the volume integral and hence the omission of the quadrupole term.

Fig. 4.15 shows the directivity at the shedding frequency calculated from di- rect probe measurements as well as FW-H analogy.

90 0.008 120 60 0.006

150 0.004 30

0.002

180 0

210 330

240 300 270

Figure 4.15: Directivity comparison at a radius of 5 D from the cylinder, ( · ) Measured, ( ) FW-H calculated. ×

The longitudal dipole shape is expected at even multiples of the shedding frequency which is caused by the drag force on the cylinder [Y.Khalighi, 2010]. X. Gloerfelt [2003]’s formulation is used where the convective effect is accounted for, however the influence of viscous forces is not taken into account in the CFD calculation of the sources. The slight left-lean in the directionality for the di- rectly measured pressure fluctuations is caused by the quadrupole term. The quadrupole term is calculated using a volume integral and is very computation- ally heavy since the entire flow field needs to be stored. Based of the results achieved in Sec. 4.6.2 the quadrupole term was neglected. Had this not been done one would have expected the two impediance plots to agree better.

Fig. 4.16 shows a closer look of the force coefficients, CL and Cd over time. 4.7 Results 35

0.6

0.4

0.2 L

0

and C and

d C -0.2

-0.4

-0.6 560 580 600 620 640 660 680 tU/D

Figure 4.16: (black ) CL , (red) Cd

It should be noted here that the mean drag coefficient is subtracted from Cd for an easier amplitude comparison. Comparing the magnitude of the lift and drag coefficients the amplitude of CL is much larger, indicating that the lift force has a greater contribution to the dipole sound. It can also be noted that CL has 6 the frequency of vortex shedding, ∆T = 2.6 10− whereas Cd oscillates at ∆T/2. An overall comparison can be made between× the implementation of wave transmissive boundary conditions and its exclusion, and a compressible versus incompressible approach.

90 0.006 120 60 0.004 150 30 0.002

180 0

210 330

240 300 270

Figure 4.17: Directivity comparison (red) non wave transmissive solution, (- black) wave transmissive BC implemented, (green) incompressible solution.

Fig. 4.17 shows clearly that reflections at outer boundaries contributes to a 36 4 Validation Case larger error than assuming a constant density.

4.8 Interim Conclusion

• The calculation of source terms in OpenFOAM can with success be used for simpler geometries when using the Ffowcs-Williams and Hawkings’ equa- tion to predict the flow induced noise field. • The assumption of incompressibility can be made for a low Mach-number flow without loosing much accuracy in the sound field computation.

• The importance of reducing non-physical reflections at domain boundaries 5 Generic Side Mirror Case

It is today known that exposed components of a moving object can create flow structures that will generate noise. Ask and Davidson [2009] writes that at a ve- locity of around 120 km/h the exposed components are the major noise contrib- utor for a vehicle. With this in mind the external aerodynamic design of vehicles has changed immensely during the previous decades.

5.1 Review of Flow around a Side Mirror Test Cases

The side mirror is one area of vehicles that has been studied extensively in the past. With the advances of computational resources CFD are becoming a preva- lent tool and resources are shifted from experimental methods towards computer modelling.

Ask and Davidson [2009] investigated flow past a generic side mirror on a 5 flat plate at a Reynolds number of ReD = 5.2 10 based of the mirror diameter. They found a horseshoe vortex forming from× flow stagnation as one approaches the front side of the mirror. Ask and Davidson’s study was carried out using FLUENT commercial solver and the results were compared with experimental data from Daimler Chrysler. Upon comparison the flow trends were found to agree perfectly with the experimental data from Daimler Chrysler (DC) in the wake and shear layer; however the fluctuation values were under predicted by 5dB. Moreover the laminar flow separation over the curvature of the mirror re- ported in experiments from DC was not captured in the simulations. B. Lock- hande [2013] studied the same identical side mirror as Ask and Davidson but at a higher Reynolds number of 7.0 106 and hence at a higher velocity (200km/h). Lockhande implemented FW-H acoustic× analogy in Fluent and his results were found to mainly agree within 5dB.

37 38 5 Generic Side Mirror Case

For the present side mirror study a similar approach is taken to calculate the radiated sound as was chosen for the cylinder. Due to the presence of walls FW- H analogy is used where the flow field is primarily solved for, and the fluctuat- ing wall pressures are used to compute the sound field. Simulating a low Mach- number flow the quadrupole terms are considered negligible in comparison to the dipole terms and the assumption of incompressibility is considered reason- able.

5.2 Side Mirror Setup

The mirror used for the present study is a simplified side mirror and is built up by half a cylinder with a diameter D of 0.2 m, merged with a quarter sphere on the top. The Reynolds number is 5.2 105 based on the diameter of the mirror, and a free stream velocity of 39m/s.× The mirror is mounted on a flat plate and Fig. 5.1 shows the geometry of the mirror while Figure 5.2 illustrates its position on the plate. The implemented setup is a direct replication of Ask and Davidson [2009] study.

Figure 5.1: Side view and frontal view of the generic side mirror

The computational domain is bounded by a 50D wide × 25D high inlet 25D upstream of the mirror, and an outlet located 37.5D m downstream of the mirror. Employing a large computational domain the blockage ration is < 1% to mini- mize the effect of external walls. 5.3 Boundary Conditions 39

1.6 m

0.9 m 1.5 m

Figure 5.2: Setup of mirror and base plate

5.3 Boundary Conditions

A free-stream Dirichlet condition, u = u = 39m/s, v = w = o is assigned to the inlet, outlet, and free stream boundaries∞ (top and bottom). Running an incom- pressible simulation zero pressure gradients are used for all boundaries but the outlet since OpenFOAM requires at least one boundary with a specified value.

Table 5.1: Boundary conditions generic side mirror. Velocity Pressure Inlet u vel = 39m/s, (v=w=0) zero gradient Outlet u vel = 39m/s, (v=w=0) fixed value Mirror no slip condition (u=v=w=0) zero gradient Bottom plate no slip condition (u=v=w=0) zero gradient External walls u vel = 39m/s, (v=w=0) zero gradient

The choice of Solver and Solution settings in OpenFOAM is far from trivial and one could spend a vast amount of time trying to find the optimal combination. Due to time constraints the decision was made to move forward using similar settings to those used at Creo Dynamics. Table 5.2 lists some of the main settings specified in OpenFOAM’s System dict. 40 5 Generic Side Mirror Case

Table 5.2: Solver specifications. Function setting Time stepping CrankNicolson Grad Schemes Cell limited Gauss Linear Interpolation schemes Default Linear Laplacian Schemes Gauss Linear

The Crank-Nicolson scheme was used with an off-centering coefficient of Ψ = 0.5. This off-centering coefficient blends the CrankNicolson scheme with the Eu- ler scheme, where a Ψ = 1 would yield a pure Crank-Nicolson scheme and vice versa. Since the Euler method is of first order accuracy, while the Crank-Nicolson method is of second order, a blending of the two allows for an improved stability [Greenshields, 2015].

5.4 Mesh

OpenFoam’s snappyHexMesh utility is utilized to generate a mesh. SnappyHexMesh builds a 3-dimensional mesh by starting of with a very coarse background blockmesh that will “snap ”to the surface. Reduced computational cost can be achieved by keeping the mesh as coarse as possible in areas where refienement is unnecessary. This is achieved by utilizing four refinement boxes enclosing the mirror and its wake leaving the rest of the computational domain fairly coarse.

Table 5.3: Grid density for the different boxes in the mesh. Level length (mm) Box 1 1 110 Box 2 3 28 Box 3 4 14 Box 4 5 7

To ensure a high mesh quality certain mesh quality controls can be set in Snap- pyHexMesh. The more critical ones are:

• maxNonOrtho = 65

• minVol = 1e 13 − • minDeterminant = 0.001

• minFaceWeight = 0.05 5.4 Mesh 41

The final mesh satisfy these criteria and consists of 6.8 106 cells, where 300 000 of them are used to describe the mirror surface. To accurately× capture the high velocity gradients at the surface of the mirror and its bottom plate 5-7 prism layers are used.

Figure 5.3: Side mirror mesh generated using snappyHexMesh utility in OpenFOAM

The y+ value is a non-dimensional distance used as a tool when selecting the appropriate mesh configuration for turbulent flows. u y y+ = τair (5.1) vair

+ Where vair is the kinematic viscosity and uτair the frictional velocity. The y value indicates how much of the turbulent boundary layer is resolved. Fig 5.4 and Fig 5.5 shows the suction and side view y+ value for the first wall cells on the mirror.

Figure 5.4: Frontal view y+ values Figure 5.5: side view y+ values 42 5 Generic Side Mirror Case

For a y+ < 5 the viscous sublayer is resolved. The mesh created for the side mirror simulation is fine close to the mirror with a y+ value ranging between [0.5 67.2] and an average of 10.2. However, the mesh is not fine enough to accurately− capture the viscous sublayer and wall functions are implemented in OpenFOAM. For this Spalart Allmaras DDES is used as LES turbulence modell.

The time step used in the calculation is chosen on the basis of a low CFL value. 6 The time step ∆tmirror = 5 10− s and the resulting max CFL value is 1.5. Ev- ery 25th time step is recorded× and the sampling frequency is 8 [kHz].∼ The total sampling interval, T, is 40 U/D (0.206 sec) and extraction of data is started after 120 D/U.

From the instantaneous drag coefficient no real statistical convergence of forces is achieved over time. This is believed to be due to large unsteady resolved struc- tures in the near wake of the mirror [Ask and Davidson, 2005]. However, the mean Cd of 0.44 agrees well with Ask and Davidson [2009] study of a generic side mirror where Cd was found to be 0.44. Both Cd values were calculated using mean values and the projected frontal area of the mirror.

0.47

0.465

0.46

0.455

0.45

0.445 Cd

0.44

0.435

0.43

0.425

0.42 10 15 20 25 30 35 tU/D

Figure 5.6: Mean and instantaneous drag coefficient

For validation the sound pressure is calculated on certain receivers located at same positions as those used in Ask and Davidson [2005] study. The results are presented in the acoustic section. 5.5 Flow Results 43

Table 5.4: Position of Microphones in the domain Nr x y z 1 2.265D 1.2345D 2.23D 3 2.265D 0 2.729D 4 0.5D 2.5D 1D

The microphone positions are also depicted for visual inspection in the xy plane in Fig 5.7

M4

M1

M3

y

x

Figure 5.7: Microphone positions

5.5 Flow Results

For flow comparison a snap shot of vorticity at y = 0.5D can be compared to Ask and Davidson [2005] study.

Figure 5.8: Vorticity slice y = 0.5D Figure 5.9: Vorticity slice y = 0.5D present study Ask and Davidson [2009] 44 5 Generic Side Mirror Case

The general flow configuration is similar in the both cases, with large trailing edge vortices generated on each side down stream of the mirror. Keeping these in mind the root mean square pressure, (PRMS ), values should be considered. uv t N 1 X  2 P = p(t) p (5.2) RMS N − i=1 Where a comparison between the suction and pressure side of the mirror as well as the near wake is found in Fig 5.10.

Figure 5.10: 10 < pRMS Figure 5.11: 10 < pRMS < 35 < 35

Figure 5.12: 10 < pRMS < 35 Figure 5.13: 15 < pRMS < 225

It is evident from Fig 5.10 through Fig 5.13 that the base plate encompassing the mirror wake experiences the largest pressure fluctuations, and that the trail- ing vortices in the near wake is the most significant sound source. From Fig 5.11, of the pressure suction side of the mirror, a high assymetric fluctuating pressure distribution is captured. This fluctuation might contribute to the unsteadiness in Cd mentioned earlier. 5.5 Flow Results 45

Q, or the second invariant of the velocity gradient tensor [Greenshields, 2015], captures the horseshoe vortex in front of the mirror. The horseshoe vortex is created by flow stagnation and causes high pressure fluctuations on the side of the mirror which is seen in previous figures.

Figure 5.14: Iso surface of Q = 10 000 46 5 Generic Side Mirror Case

5.6 Acoustic Results

A common assumption is that the volume integral in the FW-H equation can be regarded as negligible in comparison to the surface integrals for low Mach number flows. To numerically investigate if this seems reasonable the intensity of the dipole and the quadrupole terms can be approximated.

6 3 2 8 5 2 I ρu c− l I ρu c− l (5.3) D ≈ Q ≈ And looking at the ration of the two for the present set up of a velocity of 39 m/s (Mach = 0.11) [Y.Wang, 2010]:

I  u 2 D = 0.025 (5.4) IQ ∝ c The quadrupole intensity would thus only be about 2.5 % in comparison to the dipole source. Considering the computational cost of evaluating the volume integral the trade off seems reasonable in this case.

Sampling the signal in the time domain presents challenges in terms of spec- tral leakage as well as capturing a long enough signal to obtain converged statis- tics. To minimize frequency leakage when truncating the discontinuous signals a power spectral density function is implemented in Matlab through the pwelch function. In this case a 50 percent overlap is used where each section is windowed using a Hamming window. The energy in the signal is conserved for the discrete time signal.

The SPL is calculated in microphone 1, 3 and 4 (see Fig. 5.7 for positioning)

70

60

50

40

SPL (dB) SPL 30

20

10

0 101 102 103 104 Frequency (Hz)

Figure 5.15: SPL at microphone no. 1 5.6 Acoustic Results 47

70

60

50

40 SPL (dB) SPL

30

20

10 101 102 103 104 Frequency (Hz)

Figure 5.16: SPL at microphone no. 3

80

70

60

50

40 SPL (dB) 30

20

10

0 101 102 103 104 Frequency (Hz)

Figure 5.17: SPL at microphone no. 4

A higher SPL is measured for microphone 1 than microphone 3, which is rea- sonable due to its position in the wake if compared with fluctuation levels in Fig 5.13. Due to the dipole directivity of the sound one would expect the highest sound pressure level to be calculated in microphone 4, which is also the case. A SPL of 75.3 [dB] is found at a frequency of 20 [Hz].

SPL at microphone 3 and 1 can be compared to the experimental and numeri- cal results from Ask and Davidson [2005] study. 48 5 Generic Side Mirror Case

Figure 5.18: SPL at microphone no. 3 and 1; present study (red), Ask and Davidson [2005] (black), Daimler Chrysler experimental data (triangles)

And microphone 4 positioned right above the mirror in the y-plane.

Figure 5.19: SPL at microphone no. 4; present study (red), Ask and David- son [2005] (black), Daimler Chrysler experimental data (triangles)

In Fig. 5.18 it is evident that SPL for frequencies < 40 [Hz] is under predicted in microphone 1 and 3, when compared to Ask and Davidson [2005] study and experimental results from Daimler Chrysler presented in the same study. Micro- phone 4 in Fig. 5.19 predicts higher SPL then results from Ask and Davidson [2005] study but still under predicts the experimental results from DC. It should be noted that present data is processed using a pwelch function with an energy preserved spectra as mentioned earlier; reducing the peaks by 50%. If an am- plitude corrected spectra would have been used one could expect the peaks to increase by roughly 2 [dB], which would bring present results closer to experi- mental values.

It has also been noted in previous studies by Y.Wang [2010] and Ask and 5.6 Acoustic Results 49

Davidson [2009] that although LES provides better results than URANS, the LES model has shown to under predict fluctuation levels. Ask and Davidson [2009] recommends the usage of LES models after investigating different turbulence models for a similar flow past a generic side mirror study.

However this does not answer why the lower frequencies are under predicted in the mirror wake. The present simulation is run for 0.206 seconds or 40 U/D. It is evident from Fig. 5.16 that the drag coefficient is not statistically converged and dealing with such low frequencies one would want to increase the simulated time. Also, neglecting the quadrapole term could cause some of the discrepancies in the sound pressure level.

Regarding the higher frequencies the mesh cut of frequency seems to be some- where around 200-300 [Hz]. 50 5 Generic Side Mirror Case

5.7 Interim Conclusion

• The acoustic analogy methodology used for the test case is also valid for the generic side mirror case. Although, with discrepancies for frequencies < 40 [Hz] in the mirror wake. • The fluctuations on the mirror base plate has a higher contribution to the flow induced sound field than fluctuations on the mirror itself.

• A horseshoe vortex is captured from the Spalart Allmaras DDES simulation just in front of the mirror. • Experimental results points at a laminar flow separation over the curvature of the mirror, however, this is not noticed in the present results. 6 Concluding Remarks

The main objectives of this thesis have been to establish a hybrid aeroacoustic method for low Mach-number flows, where CFD will be used to calculate sources in the near field and acoustic analogies are used to predict the sound propagation. Wall pressure fluctuations are recorded from the CFD calculations using the open source software OpenFOAM and Ffowcs-Williams and Hawkings analogy is im- plemented to predict the far field noise.

Two cases are studied, where low Mach-number flow over a cylinder is cho- sen as a test case. The test case is selected on the basis of a simple geometry, high applicability, and a great amount of published research within the area. 2-D com- pressible and incompressible simulations are carried out and the resulting CL and Cd values are found to agree well. Different pressure boundary conditions are tested and the wave transmissive BC in OpenFOAM is found to minimize re- flections at outer boundaries. A microphone is positioned in the domain and sound pressure levels are calculated and compared for using two methods; • Directly measured pressure fluctuations in the microphone position • FW-H integral formulation using pressure fluctuations measured on the cylinder walls The results are found to agree well for the first and second harmonics. It is believed that the omission of the volume integral causes a higher discrepancy for higher frequencies.

The second case is a generic side mirror on a base plate. It is of higher com- plexity with stronger connections to industry and it is tested using the same methodology as the validation case. However, higher Re number and 3-D sim- ulations calls for an incompressible approach. SPL comparison with previous

51 52 6 Concluding Remarks studies show good agreement, albeit discrepancies are found in the mirror wake for frequencies, f < 40 [Hz].

6.1 Future Work

1. An attempt was made to account for the viscous stress tensor in the FW-H dipole term. The objective was to incorporate τij (eq. 2.5) into the OpenFOAM solver but due to lack of time this was down-prioritized. Nonetheless this would be interesting to do in the future to see if it would have a noticeable impact on the results.

2. Integration of acoustic analogies in OpenFOAM. Current work was carried out using OpenFOAM for CFD evaluation of the sound sources and Matlab was used for the FW-H integral calculations. A solver incorporating FW-H analogy for acoustic propagation in OpenFOAM would save time and computational power.

3. Extend the simulation time for the side mirror case for better statistics to see if lower frequencies in the mirror wake would be captured more accurate.

4. No laminar separation of the boundary layer was present in the simula- tions. Other turbulence models beside Spalart Allmaras DDES should be tested for better results. Bibliography

Stefan Wallin A. Johansson. An introduction to turbulence. Royal Institute of Technology, 2013. Cited on pages 6, 7, and 9.

J. Anderson. Computational Fluid Dynamics. McGraw-Hill, 1995. Cited on page 16.

Ask and Davidson. The near field acoustics of a generic side mirror based on an incompressible approach. Chalmers University of Technology, 2005. Cited on pages 42, 43, 47, and 48.

Ask and Davidson. A numerical investiagation of the flow past a generic side mirror and its impact on sound generation. Journal of Fluids Engineering, 131, 2009. Cited on pages 37, 38, 42, 43, 48, and 49.

J. Ask. Predictions of aerodynamically induced wind noise around ground vehi- cles. Chalmers University of Technology, 2008. Cited on page 12.

S.Mittal B. Kumar. Effect of blockage on critical parameters for flow past a circu- lar cylinder. 2006. Cited on page 23.

J.Xu B. Lockhande, S.Sovani. Computational aeroacoustuc analysis of a generic side view mirror. SAE International, 2013. Cited on page 37.

T. Hüttl och P. Sagaut C. Wagner. Large-eddy simulation for acoustics,. Cam- bridge Aerospace Series, 106, 2007. Cited on pages 3 and 10.

D.G. Crighton. Computational aeroacoustics for low mach number flows. Com- putational Aeroacoustics, 1993. Cited on page 1.

Chris Greenshields. Openfoam user guide. CFD Direct, 2015. Cited on pages 16, 19, 40, and 45.

W.Malalasekera H.K Versteeg. An introduction to computational fluid dynamics. Pearson Prentice Hall, 1995. Cited on pages 17 and 18.

J.Larsson. Computational aero acoustics for vehicle applications. Chalmers Uni- versity of Technology, 2002. Cited on pages 10, 11, 12, and 25.

53 54 Bibliography

Lars Davidson Shia-Hui Peng Lixia Qu, Christoffer Norberg. Quantitative nu- merical analysis of flow past a circular cylinder at Reynolds number between 50 and 200. Chalmers University of Technology, 2013. Cited on pages 23 and 27. N.Hatakeyama O.Inoue. Sound generation by a two-dimensional circular cylin- dewr in a uniform flow. J. Fluid Mechanics, 471, 2002. Cited on page 27.

C.Rumsey P.Spalart. Effective inflow conditions for turbulence models in aerody- namic calculations. AIAA Journal, 2007. Cited on pages 7 and 8. P. d’Espiney P. Guillen S Deck, P.Duveau. Development and application of spalart–allmaras one equation turbulence model to three-dimensional super- sonic complex configurations. Aerospace Science and Technology, 6, 2002. Cited on page 8.

A. Hirschberg S. Rienstra. An introduction to acoustics. Eindhoven University of Technology, 2015. Cited on page 12. H.Eckelmann U. Fey, M.König. A new strouhal-reynolds- number relationship for the circular cylinder in the range 47