<<

The Pennsylvania State University The Graduate School College of Engineering

EFFECT OF GRID TOPOLOGY AND RESOLUTION ON COMPUTATION OF STEADY AND UNSTEADY INTERNAL FLOWS

A Thesis in Mechanical Engineering by Steven P. McHale

c 2009 Steven P. McHale

Submitted in Partial Fulllment of the Requirements for the Degree of

Master of Science

May 2009 The Thesis of Steven P. McHale has been reviewed and approved* by the follow- ing:

Eric G. Paterson

Associate Professor of Mechanical Engineering

Thesis Advisor

Laura L. Pauley, P.E.

Arthur L. Glenn Professor of Engineering Education

Professor of Mechanical Engineering

Karen A. Thole

Professor of Mechanical Engineering

Department Head of Mechanical and Nuclear Engineering

*Signatures are on le in the Graduate School Abstract

Internal ow has been studied under steady and unsteady conditions. The work was motivated by previous research in canine olfaction which showed that the structure of the dog's nose consists of a highly complex pipe network in which the unsteady air ow transports odorant molecules to the sensory region. Due to geometric complexity of the canine turbinates, a body-tted hex- dominant mesher was used, thus generating the question: What is the impact of grid topology and resolution on solution accuracy?

The governing equations are dened and reduced to an analytical solution for a circular pipe with both steady and unsteady components. The numerical methods and solution algorithms are described. Simple test cases are performed using an open source computational uid dynamics

(CFD) code, OpenFOAM, to understand the underlying physics and computational challenges inherent in internal pipe ows.

The characteristic steady, Poiseuille ow was found and a grid study was performed over a range of Womersley numbers (Wo) for the oscillatory, unsteady calculations of the straight pipe. It was shown that the Womersley number directly aects the amount of near wall resolution needed to accurately resolve the Stokes layer. The same calculations were also performed for two other grid topologies to compare the eectiveness of alternate grid types. The nal simulations performed were steady inhalation/exhalation and unsteady respiration of a straight pipe within an external environment.

iii Contents

List of Figures vii

List of Tables ix

Nomenclature x

Acknowledgments xi

1 Introduction 1

2 Literature Review 4

2.1 Motivation of the Current Work: Canine Olfaction CFD ...... 4

2.2 Studies of Non-Bifurcating Pipe Flow ...... 8

2.3 Studies of Bifurcating Pipe Flow ...... 11

2.4 Studies of Complex Pipe Systems ...... 13

2.5 Computational Aspects of Internal Flow ...... 14

3 Governing Equations and Numerical Methods 18

3.1 Governing Equations ...... 18

3.2 Poiseuille Flow Solution ...... 20

3.3 Solution ...... 22

3.3.1 Pulsatile Shear Stress ...... 25

3.4 Fourier Series ...... 25

3.5 Numerical Methods ...... 26

3.5.1 Spatial Discretization ...... 27

3.5.1.1 term ...... 28

iv 3.5.1.2 Laplacian Term ...... 29

3.5.1.3 Source Terms ...... 29

3.5.2 Temporal Discretization ...... 30

3.5.2.1 Temporal Derivatives ...... 30

3.5.2.2 Treatment of Spatial Derivatives in Transient Problems ...... 30

3.6 Solution Algorithm for the Navier-Stokes Equations ...... 32

3.6.1 Linearization ...... 32

3.6.2 Derivation of the Pressure Equation ...... 32

3.6.3 Pressure-Velocity Coupling ...... 34

3.6.3.1 PISO ...... 34

3.6.3.2 SIMPLE ...... 35

4 OpenFOAM 37

4.1 Using OpenFOAM ...... 37

4.1.1 Pre-processing grids ...... 37

4.1.2 Building cases ...... 38

4.1.3 Post-processing data ...... 39

4.2 OpenFOAM Solvers and Linear Algebraic Methods ...... 39

4.2.1 simpleFoam ...... 39

4.2.2 icoFoam ...... 40

4.2.3 channelIcoFoam ...... 40

4.2.4 Fourier adaptations ...... 40

4.2.5 Linear algebraic methods ...... 41

4.3 OpenFOAM Boundary Conditions ...... 41

4.3.1 xedValue ...... 41

4.3.2 zeroGradient ...... 41

4.3.3 cyclic ...... 41

4.3.4 pressureInletOutletVelocity ...... 42

4.3.5 timeVaryingUniformFixedValue ...... 42

5 Internal Flow Computations 43

5.1 Grid and Topology Studies ...... 51

5.1.1 Steady Solution ...... 51

v 5.1.2 Unsteady Results: Global Error Evaluation ...... 51

5.1.3 Unsteady Results Radial Error Evaluation ...... 57

5.2 The Plenum Study ...... 64

5.2.1 Steady Results ...... 67

5.2.2 Unsteady Results ...... 68

6 Conclusions and Recommendations for Future Work 73

Bibliography 76

vi List of Figures

1.1 The internal geometry of the canine nasal passages [4]...... 2

2.1 distribution in the canine nasal airway at peak inspiratory ow

rate during sning [5]...... 6

2.2 Axial distribution of the Womersley number in the canine nasal cavity during sning

(f = 5 Hz). For reference, the background shows an appropriately-scaled sagittal

section of the canine nasal airway [4]...... 7

3.1 Parabolic velocity prole that is characteristic of Poiseuille ow ...... 21

3.2 Velocity proles at Wo = 9 across one period. Stokes layer is evident near the wall

as the overshoot phase lag from the centerline ow...... 24

3.3 Fourier decomposition of pulsatile analytical solution into velocity magnitude and

phase lag for Wo = {1, 3, 9, 27}...... 27

5.1 Comparison of the internal spatial resolution of the (1) coarse, (2) medium, (3) ne,

and (4) nest CFD grids in the maxilloturbinate region. Comparable grid resolution

is found in the nasal vestibule and ethmoidal region [5]...... 44

5.2 Coarse, medium, and ne grids for the grid study...... 45

5.3 Unstructured, hybrid, and structured grids used for the topology study...... 46

5.4 The grid used for the plenum case shown as the view on the inlet face, along the

axial length, and on the plenum face...... 47

5.5 Example of statistically steady for Wo = 9, computation was ran for 15 cycles and

mass ux was observed before the nal Fourier cycle was computed...... 50

5.6 Steady state results for the grid and topology study: velocity proles compared to

the analytical solution and error from the wall to centerline...... 52

vii 5.7 The maximum value of the Fourier velocity magnitude across a range of Wo for the

grid and topology studies, with the error from the analytical solution...... 58

5.8 The thickness of the Stokes Layer across a range of Wo for the grid and topology

studies, with the error from the analytical solution...... 59

5.9 The phase lag of the Fourier velocity at the wall across a range of Wo for the grid

and topology studies, with the error from the analytical solution ...... 60

5.10 The value of the maximum mass ow rate across a range of Wo for the grid and

topology studies, with the error from the analytical solution...... 61

5.11 The phase lag of the mass ux to the pressure oscillation across a range of Wo for

the grid and topology study, with the error from the analytical solution...... 62

5.12 Error across the radius to the analytical solution of the Fourier velocity magnitude

and phase lag for Wo = 1, 3 ...... 65

5.13 Error across the radius to the analytical solution of the Fourier velocity magnitude

and phase lag for Wo = 9, 27 ...... 66

5.14 The velocity distribution for the steady inspiration and expiration for the plenum

case. The values for the inspiration velocity have been changed from negative to

positive for comparison purposes, but in reality have negative value...... 68

5.15 Fourier velocity magnitude and phase lag data sampled at four locations along the

pipe, Wo = 1. Error is dened as the dierence to the analytical solution...... 70

5.16 Wall shear stress compared to the analytical shear stress at twenty instances across

one period...... 71

5.17 Velocity proles at every T seconds at four locations along the pipe. The t = 20 dash-dot-dot line is the earliest prole in the phase, followed by the long-dash line

second, the dash-dot line third, and the solid line is the last prole of the phase

in each gure. The inhalation errors increase as the velocity magnitude does. The

prole at L=100*D is most aected by the proximity to the plenum...... 72

viii List of Tables

5.2 Parameters of each pipe grid...... 48

5.3 Physical parameters of grid/topology studies and the plenum case...... 48

5.4 Unsteady parameters of the grid/topology studies and the plenum case...... 49

ix Nomenclature

CFD Computational Re Reynolds number

Rec Critical Reynolds number Wo Womersley number NMR Nuclear Magnetic Resonance Imaging GCI Grid Convergence Index LDV Laser-Doppler Velocimetry TCI Time Convergence Index pIOV pressureInletOutletVelocity tVUFV timeVaryingUniformFixedValue GAMG Geometric-Algebraic MultiGrid method PCG Preconditioned Conjugate Gradient method DIC Diagonal Incomplete-Cholesky preconditioner PBiCG Preconditioned Bi-Conjugate Gradient method DILU Diagonal Incomplete Lower Upper preconditioner

x Acknowledgments

This thesis was supported by the Oce of Naval Research and the Exploratory and Founda- tional program of Penn State University's Applied Research Laboratory. I would rst and foremost like to sincerely thank Dr. Eric Paterson for providing me with an opportunity to explore an area of science that I found so fascinating. I thank you for the knowledge you imparted and the incred- ible patience with which you directed my eorts. I would like to thank Dr. Pauley for reviewing my thesis. I would also like to thank Dr. Gary Settles, Dr. Brent Craven, and Mike Lawson for your assistance to my research. The Computational Mechanics Division at the Water Tun- nel has my thanks, in particular Dr. Joel Peltier, Dr. John Mahay, Dr. Rob Kunz, and Jack

Poremba. Thanks to Dr. Hrvoje Jasak for the creation of OpenFOAM. I would like to thank John

Pitt for his advice on numerical methods and Cory Smith for his overall support. Thank you to fellow grad students: Ning Yang, Bob Erney, Bill Moody, Chandan Kumar, Cli Searfass, Ryan

Mosse, and Chris Applegate. Thank you to the Penn State Mechanical Engineering department for providing such an excellent place to study Mechanical Engineering for these past seven years.

To anyone that read my thesis and provided grammatical advice, I thank you. Lastly, I would like to thank God, my wonderful family, and exceptional friends for your absolute love and support.

xi Chapter 1

Introduction

Internal ow is a vital aspect of physics that is intrinsic to all levels of current civilization and human survival itself. Oil pipelines transport uid energy across the world; clean drinking water

ows into communities while waste ows out, providing a high standard of living and preventing the spread of disease. Blood courses through the veins of the body providing nutrients to the organs, while respiration imports oxygen, exports unnecessary air, and transports odorant molecules to the olfactory region in order to smell. For these reasons and more, scientists have endeavored to understand the underlying physics that dene this particular branch of uid dynamics.

The gold standard of olfactory acuity lies in the canine's olfactory region [1]. The internal structure of the dog's nasal cavity is a complex network of scrolling pipes that creates an optimal situation for odorant transport to the olfactory organs (ethmoidal region) [2]. Understanding how the aerodynamics of this animal's nasal cavity complements its superior odorant recognition capabilities can provide insight into bettering the current technology of trace molecular detection

[1].

Though mathematical derivations are possible for very simple instances of internal ow, the complexity of the dog's nasal cavity does not lend well to that form of exploration. In those instances, experimental techniques and Computational Fluid Mechanics (CFD) calculations ll the void of understanding. CFD, in particular, is a powerful asset that can discretize the governing equations of internal ow, apply the appropriate boundary conditions, and nd a solution with a high degree of accuracy given proper spatial and temporal resolution. With the computational power available today, CFD codes can take high delity grids and resolve very intricate ow

1 Figure 1.1: The internal geometry of the canine nasal passages [4]. characteristics, though such computations can be quite costly due to licensing fees of commercial codes.

As an alternate approach to licensing fees, OpenCFD and Wikki, Ltd. have developed Open-

FOAM, an open source object-oriented CFD toolbox. OpenFOAM contains utilities to create a mesh or convert some common meshes into the OpenFOAM format; a large library of dierent solvers and models to simulate many diverse aspects of uid dynamics; and post-processing util- ities for sampling and conversion to some common graphical formats. In using CFD, accuracy of the solution must be quantied through verication and validation. Thus, a study of internal

ows physically similar, but geometrically simpler, to the dog's nose was performed using Open-

FOAM in an attempt to understand the characteristics of steady and unsteady ow and to validate

OpenFOAM in this regard.

In uid dynamics, turbulent-ow regimes can be quantied by the Reynolds number (Re), the ratio between inertial and viscous forces. The transition from laminar to turbulent ow is dened by the critical Reynolds number. For steady, internal ow in a circular pipe, the value is: Rec ≈ 2300

2 [3]. Therefore, any ow that is less than the critical Reynolds number can be considered laminar and modeled as such. It will be shown in Chapter 2 that the canine's nasal geometric parameters in conjunction with its respiration mass ow rate produces laminar ow in all but the entrance region of the nostrils (nasal vestibule). That being stated, all computations were performed at

750 ≤ Re ≤ 1000 to ensure laminar ow. Respiration through the nasal cavity may be considered as pulsatile with zero mean ow. As turbulent-ow regimes are quantied by the Reynolds number, the degree of unsteadiness is quantied by the Womersley number (Wo). The Womersley number represents the relationship between the ow length scale, pulsatile frequency, and viscous eects.

For a circular pipe, as the Womersley number increases, a Stokes layer develops. The Stokes layer, which will be discussed in greater detail in Chapter 3, is an out-of-phase velocity phenomenon that occurs near the wall. Again in Chapter 2, it will be shown that within the regions of interest in the nasal cavity Wo∼ 1. The computations were performed across a wide range of Wo that encompasses the physical range of the dog to fully understand the physics and computational needs of this type of pulsatile ow. The capstone calculation, a straight pipe connected to an ambient external environment was computed at Wo = 1.

The purpose of this work endeavors to explore four areas: the grid resolution requirements needed to accurately capture the unique characteristics of pulsatile pipe ow over range of Womer- sley numbers; the eect of grid topology at the same Womersley range to discover the eectiveness of alternate grid types; a simplied unsteady situation resembling respiration within an exter- nal environment; and a validation of OpenFOAM in regards to the ows considered and overall usability.

This thesis is presented in the following order. First, the motivation of the research as related to canine olfaction and a review of the literature is detailed. Then, the derivations of analytical solutions and discussion of physics related to pulsatile ow. Next, the discussion moves onto the computational aspects of OpenFOAM, and the validation cases that were computed. Lastly, a summary and discussion of future work is provided.

3 Chapter 2

Literature Review

2.1 Motivation of the Current Work: Canine Olfaction CFD

The impetus for understanding the aerodynamics of canine olfaction came from eorts to develop better methods of sampling trace molecules via biomimicry. The principle of biomimicry is to garner knowledge from nature and apply it to a man-made concept. In the Journal of

Fluids Engineering, Settles describes the dog as the ultimate mobile, instinctive, intelligent sning platform, and cited the implications for security: trace explosives detection, landmine detection, and chemical and biological sning. Applying the concept of biomimicry, an appraisal of nature's accomplishments in olfaction was performed, with emphasis on the external dynamics of canine olfaction [1]. While this is outside the scope of the present work, it did propel a study of the internal uid dynamics of the dog's nose.

A fundamental study of the geometry, aerodynamics, and transport phenomenon of canine olfaction was performed by Craven, et al. [2, 4] that unearthed the internal uid dynamics of the canine nasal cavity. A general overview of the work consists of the reconstruction of the nasal passages which was then applied to a morphometric analysis. From that model, CFD was performed, gleaning insight into the aerodynamics, and a reduced-order numerical model was developed that captured the essential physics of olfactory mass transport phenomena. A detailed description of the reconstruction, morphometric analysis, and CFD computations will follow that provides the physical foundation and computational motivation of the current study.

The canine nasal cavity is divided into two bilaterally symmetric airways, comprised of the

4 nasal vestibule, respiratory, and olfactory regions. Upon inspiration, air enters through the nasal vestibule and exits to the lungs through the nasopharynx. The ethmoidal region contains the olfactory epithelium which consists of the odorant receptors that send olfactory signals to the brain.

The maxilloturbinate region is responsible for warming, humidifying, and ltering the inspired air.

In Craven's work, a Labrador's nasal cavity was dissected from its cadaver; a large-breed specimen was selected to allow higher resolution of the nasal cavity. Nuclear Magnetic Resonance Imaging

(NMR) was used to obtain high-resolution data from the bony structures and soft tissue of the nasal cavity. Slices with a thickness of 200 µm were taken every 1000 µm along the length of the nasal cavity and surface reconstruction was then performed. Surface reconstruction entails partitioning the image into airway or tissue designations, then segmenting the two-dimensional images into a three-dimensional surface model. The surface is represented as a triangulated surface mesh with slight surface smoothing to reduce surface staircasing.

In the morphometric analysis the airway perimeter, cross-sectional area, cumulative surface area, and cumulative internal volume were calculated as functions of axial location. The hydraulic diameter, Dh, was calculated. The hydraulic diameter (Equation 2.1) is the ratio of cross-sectional area to the perimeter, which represents the average airway diameter. The Reynolds and Womersley numbers, in Equations 2.2 and 2.3, were found where Vave is the cross-sectional average velocity, ν is the kinematic of air, and f is the sni frequency that was found to be approximately 5 Hz.

4A D = c (2.1) h P V D Re = ave h (2.2) ν r D 2πf W o = h (2.3) 2 ν

The largest airway perimeter and maximum cross-sectional area occur in the ethmoidal region. The hydraulic diameter ranges from 1.5-5 mm. The scrollwork of the ethmoidal conchae dramatically increases the surface area which facilitates the transfer of mass in the nasal cavity. A substantially larger portion of the overall surface area is relegated to olfaction purposes than to the other functions of the nasal cavity. It was theorized, but not conrmed, that the higher surface area in the olfaction region would be needed because the ethmoidal region is not located along the main

ow path, resulting in smaller velocities and lower transfer rates.

5 Figure 2.1: Reynolds number distribution in the canine nasal airway at peak inspiratory ow rate during sning [5].

Functionally, the morphological data was used to estimate the Reynolds and Womersley num- bers in order to obtain an approximation of the ow within the dog's nose. During sning, the majority of the nasal cavity contains low-Reynolds-number ow (Figure 2.1) with the minimum on the order of 100. The dead end region far beyond the nasopharynx was not shown because the velocities within this region are not known. The part of the ethmoidal region in which the

Reynolds number could be calculated shows the Re to be at a minimum. The distribution of the

Womersley number is shown in Figure 2.2. Within the maxilloturbinate and ethmoidal conchae the

Wo is at or near unity. The conclusion was made that the quasi-steady approximation is justied for the ethmoidal region and the ow is expected to be laminar.

The morphological analysis created the framework for the assumptions needed for the CFD computations [4, 5]. The internal structures of the nasal airways were assumed to be rigid and the nostrils were assumed to be undilated. During respiration the nostrils were found to move, but such motion has not been fully dened and was not expected to aect the general results of the study. The nasal cavity contains regions of high-Womersley number ow indicating that the ow during sning is unknown a priori and therefore must be modeled as fully-transient. The ow in the nasal vestibule was expected to be turbulent at peak inspiration; however, relaminarization is expected to occur downstream in the low-Reynolds number, low-Womersley number regions, specically within the ethmoidal and maxilloturbinate regions. Thus, the turbulence of the nasal vestibule was neglected and laminar ow was calculated throughout the entire nasal cavity.

Due to bilateral symmetry, only the left nasal airway was computed in conjunction with the

6 Figure 2.2: Axial distribution of the Womersley number in the canine nasal cavity during sning (f = 5 Hz). For reference, the background shows an appropriately-scaled sagittal section of the canine nasal airway [4]. entire external nose contained within a large rectangular box, with fareld atmospheric boundary conditions applied. The optimal minimum fareld distance was found to be 25 diameters of the left nostril. The no-slip condition was applied to all solid surfaces and the nasopharynx pressure boundary condition was specied such that the mass ow rates corresponded to previously found experimental values. Steady computations held the pressure constant, whereas the unsteady CFD used a sinusoidal pressure boundary condition with a frequency of 5 Hz.

The grids created for the computations were hexahedral-dominated unstructured grids in which grid resolution was regionally specied. For example, the fareld had a coarse grid density that was gradually rened with proximity to the nostril, while the main airway regions required ner grid resolution. Four grids were generated on the order of 14, 28, 55, and 77 million cells; the largest of which was limited by practical computational requirements. Though the grid resolution was regionally specied, proper near-wall resolution was missing throughout the entire grid.

A grid dependence study was performed in which airow impedance curves of overall pressure drop versus ow rate was measured. This method quanties the sum of frictional pressure drop and minor losses due to ow separation and mixing, which is directly comparable to experimental data. A nonlinear pressure drop was observed, in which monotonic convergence occurred with grid renement. A Richardson extrapolation was performed at four dierent pressure drops (∆P = 50, 500, 2000, 4000 Pa) for steady inhalation and exhalation. At the lowest pressure drop, rapid grid convergence was observed yielding Grid Convergence Index (GCI) values of approximately

7 4%. The GCI is the measure of percent error that has a high probability of bounding the actual error of the numerical solution [6]. At larger pressure drops, the order of convergence decreased yielding GCI values of 15-25%. The observed order of convergence for all cases was greater than unity. Further, a time step study was also performed using four dierent time steps from 20 to 160 time step per sning cycle, with a renement ratio of 2. The pressure drop used was 2.5 KPa. For the nest grid, the GCI values was near 1% and the order of accuracy was nearly second-order, with the conclusion that temporal errors were small and the total numerical error is mainly from spatial resolution.

The unsteady CFD solutions revealed the aerodynamics of canine sning using physiological values of sni frequency and peak airow rate. Upon entering the nasal cavity, air becomes well mixed within the nasal vestibule and the fraction of air that enters the dorsal meatus quickly advects to the rear of the olfactory region. Then the air lters through the ethmoidal region towards the nasopharynx or front-most ethmoturbinates for the duration of inspiration. Upon expiration, little air leaves the olfactory region. In conjunction, one respiratory cycle forces the air unidirectionally through the olfactory region, which is optimal for odorant separation and discrimination. The quiescence in the ethmoidal region during expiration provides additional time for the absorption of odorants. The unsteady results showed that the geometry of the dog's nose provides the optimal aerodynamics to transport odor particles to the olfactory region and the time to absorb and process odorants into sensory signals [5].

2.2 Studies of Non-Bifurcating Pipe Flow

The study of internal ow in biological systems began, largely, with Womersley [7], with the development of an analytical solution for velocity proles of pulsatile ow in a straight, circular pipe and the subsequent experimental validation. The analytical solution, which is fully derived in Chapter 3, considers the pressure gradient as periodic in time that yields a closed-form solution involving zeroth-order Bessel functions and a dimensionless parameter, α (which later became known as the Womersley number). Taking the real part of the pressure gradient corresponds to the real part of the solution and is expressed in terms of a modal Fourier magnitude and phase lag.

Analyzing the solution found that increasing α resulted in a departure from the steady Poiseuille form of the velocity solution. Further, analytical values of mass ow rate and viscous drag at the surface of the pipe were developed. Applying this solution to an experimentally derived pressure

8 gradient in the femoral artery of a dog (minus the steady component), the mass ow was computed across one pulsatile cycle for values of α ranging from 0 to 10. It was found that the phase lag tended to zero with low α and approached its asymptotic value of 90 degrees at high α. The mass

ow at low α was the same given by the Poiseuille formula but decreased as α was increased. The current work will be shown to verify these results in Section 5.1.2.

For oscillatory ow, it was found that the transition from laminar to turbulence occurred at a

Reynolds number that is lower than the critical value for steady motion. An attempt to quantify an eective Reynolds number was made by Hale, et al [8]. The femoral artery of a dog was exposed and injected with dye. The blood ow was lmed and the pressure gradients measured.

Observation showed that the ow was laminar at a Reynolds number range of 600-1000. A similar technique showed transition to turbulence in a rabbit aorta at a similar Reynolds range. Both arteries had a similar external diameter of 3mm, but the rabbit's pulse frequency was twice that of the dog's. The velocity prole was calculated using Womersley's solution across the pulse of the dog to obtain the value of the maximum shear stress. Equating the maximum pulsatile shear stress ow condition with the steady ow condition resulting in the same shear stress yielded a ratio that was applied to the pulsatile Reynolds number. The ratio was found to be close to unity at α < 2 and to increase linearly as α > 3. Scaling the pulsatile Reynolds number with this ratio gave the eective Reynolds number which became a function of α. In essence, increasing the frequency would have the same eect on the Reynolds number as increasing the square of the radius. When applied to the dog and rabbit, it was found that the eective turbulent Reynolds number was above the critical Reynolds number for the rabbit, but not the dog. The conclusion was made that the limit of stability depended not only on velocity and diameter of the tube, but also on the pulse frequency.

In further study of stability, pulsatile ow in a plane channel was considered [9]. For steady channel ow, the critical Reynolds number (Rec ∼ 5800) is higher than for a straight pipe. When Wo is nearly zero, the critical pulsatile Reynolds is nearly that of steady ow, but drops to nearly a third of the steady Rec at Wo 1. As Wo is increased from unity to innity, Rec for pulsatile ow increases asymptotically from its minimum value back to the steady value. Increasing frequency was shown to have a stabilizing inuence on planar ow with Wo > 1, though the critical pulsatile Reynolds number was less than the steady ow situation and the ow was not purely oscillatory.

A similar evaluation was done using a straight pipe [10]. A similar trend to the channel ow was observed experimentally, where stability increased with increasing frequency for a given Re.

9 For purely oscillatory ow, a linear t was established between critical Reynolds number and

Womersley number that yielded a constant of 475. This constant was within a range of 250-1000 that had been previously established [11].

To further develop understanding of physiological internal ow, the eect of geometry has been considered. Berger, et al. derived equations for and studied ow in toroidal pipes [12]. Steady

ow within a toroid with a radius-to-curvature  1 had a velocity solution similar to that of the Poiseuille ow. For Poiseuille ow, contours of constant axial velocity are concentric circles that are centered in the precise middle of the pipe. For the toroid, the axial velocity contours are circles whose centerpoints are located further towards the outer diameter along the plane of symmetry. A centrifugally-induced pressure gradient drives the slower-moving uid near the wall inward, while the faster moving uid in the core is swept outward, inducing symmetric-about- the-plane-of-symmetry secondary ows and creating the velocity perspective just described. The velocity gradient, and thusly the shear stress, is higher on the outer wall than on the inner wall.

As the ratio of the radius to curvature is increased, the secondary ows become more powerful and push the location of maximum velocity closer to the outer diameter. Low velocity contours are circular, but as velocity increases, the shape of the contour on the inner side is deected inward. At high velocities, the contour is kidney shaped and the shear stress increases on the outer diameter.

With further increase of the ratio of radius to curvature, the locations of maximum circumferential velocity continues to move toward the outer bend. The secondary ow boundary layers near the inner bend thicken further, and may separate. At the time this article was written, the existence of separation was in dispute and the attempt to conrm this was not made. Unsteady laminar ow was also considered. For purely oscillatory ow at large Wo, the centrifugal forces cause a mean secondary ow to develop in the Stokes layer at the wall. The eects of viscosity are conned to thin boundary layers near the walls and along the plane of symmetry.

Further work on this subject was performed by Siggers, et al. [13] in which computational methods were used. It was found that, at Wo = 10, the solution conformed to the analytical values that were derived in Berger's work [12], but the onset of instability resulted in asymmetric ows that were periodic or non-periodic, depending on the curvature-to-radius ratio. A lower-than-critical ratio would retain periodicity in the ow.

The inuence of geometry was also explored by Nishimura [14], in which oscillatory viscous ow was studied in symmetric wavy-walled channels. Two wall shapes were considered: sinusoidal and arc-shaped walls of large amplitude. It was found that the wall geometries have little eect on

10 the fundamental characteristics of oscillatory ow, but the arc-shaped walls became more unstable more quickly than the sinusoidal walls at higher Womersley numbers. At Wo < 4, the ow was a two-vortex system, but at Wo > 4 the ow became a four-vortex system. It was concluded that

ow above the transition point were inertially-dominated; which resulted in more complicated secondary ow features. In all, slight modications to geometry induce secondary motion which aects the stability. Unsteadiness also reduces stability, yielding a lower critical Reynolds number than that for steady ow.

Unsteadiness in a straight pipe induces velocities that are dierent from a steady case, which aects stability such that the onset of turbulence comes at lower Reynolds number. Varying the geometry further complicates the ow, which results in secondary ows and recirculation that in turn also aect stability.

2.3 Studies of Bifurcating Pipe Flow

New ow phenomena occurs with the introduction of a bifurcating pipe system, like the vascular system of mammals. Two dimensional ow characteristics of blood ow through a symmetric branch, under realistic ow pulsations, was studied by Friedman, et al. [15]. The branch area ratio and mean ow parameters correspond to the physical aortic bifurcation of a human with a

45-degree branch. Flow reversal was observed on every point of the outer wall at one point during the cycle, while no ow reversal was found on the inner wall until a point further downstream from the ow divider. From this model, it was concluded that ow separation in the arterial tree is a rare phenomenon and may not be factor in the development of atherosclerosis. The conclusions were later disputed as more sophisticated technology facilitated better computational models; however, this study did show that a bifurcation under physiological condition will exhibit, at times, secondary ow features. A similar 2D numerical study modeled unsteady ow at renal branches [16]. Two branches, half the diameter of the main line, split o orthogonally as an idealized model of aortic branching. The Reynolds number was varied sinusoidally about a mean value at 200 and peak value of 400. A dividing streamline was found to always exist that separated the central outow with the sidearm outow. The intersection of the streamline with the wall was at or downstream of the downstream branch/main-line corner, except at zero net ux (Re = 0) when the dividing stream cut o the branch. The ow was completely reversed along the main wall from the centerline ow. The simulations found localized regions near the bifurcations of high

11 shear stress magnitude.

Three-dimensional models were eventually developed in order to more realistically simulate arterial ow. The benchmark in human carotid modeling, by Bharadvaj, et al. [17, 18], was a two part analysis of steady ow: ow visualization and Laser-Doppler velocimetry (LDV). Geometric and Reynolds number similarity was maintained between the human carotid and laboratory model.

The carotid artery bifurcates from the common carotid into the internal and external carotid - the internal carotid with a larger diameter than the external. The ow visualization, using Hydrogen bubbles, found secondary ow in the daughter carotids that moved downstream in a helical path.

The secondary ow, which occured along the outer walls, redistributed the velocity so that the maximum was closer to the bifurcation apex. The ow was shown to likely separate along the outer wall, though ow reversal was only seen at lower-Reynolds number ow. The study also found that the zones with low or reversed axial ow were coincident with locations in the carotid with a predilection for disease. The ndings were able to disprove previous conclusions of ow separation and recirculation regions and showed that the 2D unsteady assumptions would not be representative of 3D unsteady ow.

The second part of the study provided a more quantitative analysis of steady carotid ow. The

ow was fully developed before entering the bifurcation and was studied at mean and peak Re for a variety of ow divisions ratios that were found to exist during a physiological pulse within the human. The outer corner of the internal-common junction was subjected to low shear stress and was postulated that reversed ow zones would be expected there during a pulsatile simulation yielding oscillating wall shear stresses as well. The outer corners at both splits were regions of comparatively higher pressure. The apex of the bifurcation was subjected to unidirectional and moderately high shear stress. The ndings were able to indicate that the ow phenomenon within the carotid is linked to atherogenesis but no direct mechanism was veried. Future studies relied heavily on the work of Bharadvaj for validation and geometrical modeling.

One such study, by Rindt, et al. [19], was a numerical analysis of steady ow of a carotid geometry based upon the one described by Bharadvaj. The inlet boundary condition was Poiseuille

ow at Re = 640 and a ow division of 52/48 in the internal/external carotids. The results found good agreement with LDV results, except near the ow divider. The grid generation was problematic in this region, and overall the grid renement was limited by computational power.

The computation was able to reveal the ow reversal that was observed at low Reynolds number by Bharadvaj [17] even though the ow ratios were dierent.

12 The same human carotid geometry was used for ow visualization and LDV studies of pulsatile

ow by Ku and Giddens [20, 21]. Under physiological pulsatile conditions, similar results were found from the steady ndings of the previous articles: low shear stress on the outer wall and relatively higher shear stress on the inner wall. Though, pulsatility was found to generate a changing region of ow reversal and separation that disappeared during early systole (near peak mass ux) and redeveloped during late systole into a region that was larger than the steady separation zones on the outer wall of the internal carotid. Bubbles introduced into the ow were found to remain in this region for several cycles, indicating an increased uid residence time, while the LDV conrmed that the outer wall experienced low mean shear stress and oscillatory shear stress. This recirculation region was found to correspond directly to sites where atherosclerosis is most prominent initially in atherogenesis.

Numerical analysis of unsteady carotid ow followed the experimental studies. Perktold, et al. [22, 23], compared the results to the unsteady experiments under dierent bifurcation angles.

The model was based on the geometry from Bharadvaj, but not in great detail. This created discrepancies with the results quantitatively, but found good agreement in the overall ow patterns.

The inlet velocity was assumed to be the Womersley velocity prole (see Chapter 3). With increased bifurcation angle, it was found that ow reversal increased and ow recirculation was enhanced.

Decreased angle led to separation further upstream. Yung [25] and Jou [25] performed the same computations for geometries of dierent angles and contours with similar results, providing solid data for a broad range of carotid geometry found in the human being.

From the previous studies, a conceptual analysis of more complex geometry can be made, but no further unless high-delity CFD or experiments can be performed. The introduction of a bifurcation to a pipe system creates secondary ows, recirculation, and at times fully-reversed ow.

The ow is further altered as the model is upgraded from two-dimensional to three-dimensional or planar to cylindrical and can be expected to become more complicated as the geometry becomes more physiological.

2.4 Studies of Complex Pipe Systems

Airow in the human nasal cavity was simulated by Keyhani, et al. [26] from a reconstructed model in a procedure similar to that of the dog nose and reconstruction compared to an experi- mental model. Velocity proles were compared and the results between the two methods varied

13 within 20% of each other. Experimental error was subject to high uncertainty due to low velocities and uncertainty in the position of the sensor. Computational renement was found to have neg- ligible eect on the results; however, small dierences to the physical model were inevitable due the discretization of the geometry.

A similar study was performed by Horschler, et al. [27] on the human nasal cavity. The comparison was of velocity streamlines and found good qualitative agreement. Neither a quantita- tive error assessment nor an uncertainty analysis (computationally or experimentally) was given.

Croce, et al. [28] compared pressure drop against Reynolds number between CFD and experiment.

Excellent agreement was found with both the standard deviation and mean having less than 2% dierence. The conclusion was drawn that the gross aerodynamics in the CFD solution were accu- rate especially in the boundary layers where the pressure drop is most heavily aected, but could not properly validate the local velocity distribution.

The dierences between the comparisons claries the diculty in validating a computational result to that of an experiment for such complicated geometry. While gross ow features such as pressure drop were found to compare well, the ner aerodynamics had large disagreement or only qualitative agreement. Computationally, the implication is that grid requirements must be fully understood and independently veried to reduce numerical error, along with sophisticated and proper boundary condition application.

2.5 Computational Aspects of Internal Flow

In order to have condence in a CFD solution, verication and validation are integral to success.

Roy [29] reviewed the procedure to ensure such condence. Verication is proving the mathematical correctness of the solution. Code verication is a process designed to nd mistakes in the computer code. In general, a simplication of the geometry and governing equations will provide an exact or manufactured solution that is used to pinpoint coding mistakes. Solution verication is concerned with assessing the numerical errors in the computation. Error sources are round-o error, iterative convergence error, and discretization error. The error from discretization is the dominant source of error and the several methods exist to estimate the eect. An extrapolation-based Richardson method is popular because it is readily applicable to nite-volume, nite-dierence, and nite- element methods. In cases where an analytical solution of the governing equations is not available,

Richardson extrapolation takes the solution on two dierent meshes and extrapolates to a higher-

14 order accurate solution, which provides an estimation of the observed order of accuracy. When an analytical solution is known, then a one-to-one error estimation is possible. Roache [6] outlines a procedure to calculate a Grid Convergence Index (GCI) that provides an estimation for an error band to predict the overall uncertainty of a computational simulation. Validation of CFD proves the appropriateness of the equations to provide accurate predictions of reality. This can be done by comparison to experimental data or analytically-derived solutions, as in the case for oscillatory

ow in a circular straight pipe. Validation shows that the boundary conditions and physical models are appropriate for the reality that is being simulated.

Gokaltun, et al. performed verication and validation of a pulsating laminar ow in a straight pipe [30]. The ow conditions were such that Re = 233 and Wo = 10. Velocity values were extracted across every twelfth of the period and subjected to a Richardson Extrapolation. Using the steady-state Poiseuille ow solution, the GCI calculation showed the order of convergence to be 1.999 with an error band of ±0.00049. The nest grid had 24 cells uniformly spaced across the radius; the domain was treated two-dimensionally due to symmetry. While GCI calculation was not performed for the unsteady case, a Time Convergence Index (TCI) was calculated. The

nest uniform time step was set such that 244 time steps were calculated per period. The pressure gradient was the ow function used for verication and showed an order of convergence that varied between 1.7 and 2.3. For validation of oscillatory laminar ow, the velocity proles were compared to the analytical solution and experimental data. The spatial and temporal errors were smaller than precision errors due to round-o.

Creating computational grids of physiological geometries is challenging, more so without the use of an automatic mesher. Typically, the wall and outlet surfaces are generated and then the internal volumes are created from this boundary. Grid resolution and quality in the bifurcation region is especially dicult when the angle is sharp, yet this region has signicant impact on the

ow. Several techniques have been developed to address this problem, most notably in employing novel block structures for purely hexahedral meshes or using unstructured tet-meshes. Vinchurkar and Longest [31] evaluated hexahedral, prismatic and hybrid meshes for simulating respiratory aerosol dynamics. For clarication, Vinchurkar denes a prismatic volume as a pyramid with a tet or square as the base and a hybrid volume made entirely of tets. However, the work of this thesis refers to an unstructured mesh as volumes made entirely of tets and a hybrid mesh as a combination of hexahedral and tet volumes with either square or tet bases. The diculty in quantifying grid convergence on these meshes is that grid renement does not necessarily double the mesh density.

15 The relative error was found through a GCI of values at specied locations. Linear interpolation was employed because the locations did not coincide with a cell center. The prismatic mesh was found to have comparable GCI values to the hexahedral grid with only a moderate increase in grid volumes. The elds showed good agreement, except in the secondary velocity proles. The hybrid grid had a signicantly higher GCI than the other meshes, and a signicant increase in cell volumes.

Though, the hybrid grid was the quickest to mesh because it was a fully automated procedure.

The prismatic mesh took longer because a rectangular surface grid was made by hand before it was lled with tets. The structured hexahedral grid was very time intensive because its inherent nature allows for little automation. The result of the study found that the prismatic yielded the best avenue for gridding in that the time of construction was manageable with comparable results to the hexahedral mesh. However, when a particle deposition model was included on the same grids [32] , the hexahedral mesh most closely matched the empirical data. The other grids showed much lower correlation to the empirical data.

Prakash, et al. [33] studied mesh resolution requirements for 3D computational hemodynamics of the right coronary artery. The purpose was to nd renement levels that would accurately resolve separation zones and wall shear stress. Interestingly, the standard for resolution was set to previous studies' approximation of big enough and found that the results yielded only moderate accuracy. Non-adaptive renement yielded grids that provided mesh-independent solutions but were computationally unfeasible. Using an adaptive, localized renement procedure, like the dog's nose grid, the arterial grid remained manageable and achieved mesh-independence. In essence, localized renement in regions of interest and complex ow elds yielded larger returns with man- ageable grid size for complicated physiological geometries.

Inclusive to verication and validation is the application of boundary conditions. Taylor, et al. [34] developed a method for a fully-developed Womersley-type inlet velocity prole for a given transient mass ow rate. Mass ux data in the circular and respiratory systems is easier to obtain than a velocity prole. Admittedly, the velocity prole in nature is unlikely to correspond exactly to the Womersley solution, but the model here is more accurate than a Poiseuille or plug ow inlet and allows for a reduction in grid size because no development length is necessary. As it stands, the Poiseuille solution is inherent in this method as it corresponds to the steady part of the solution. Barring experimentally-derived velocity proles, the inlet boundary condition provides the closest approximation to the actual ow and has the exibility for any periodic mass ux pulse. However, for the current work, this boundary condition application was not needed due to

16 the simple geometry and application of a periodic boundary at the inlet and outlet.

In terms of dening the pressure boundary conditions, the simplest method is prescribing pressure values at the boundaries. For a geometry with one inlet and one outlet, this is often sucient; however, with multiple outlets, constant pressure application is dicult when only the mass ow ratios are known, i.e. the carotid artery. Vignon, et al. [35] detailed the deciencies of such a boundary condition and oer two alternatives: resistance and impedance matching.

The resistance boundary condition derives a relationship between pressure and ow that yields a resistance constant. This is similar to the voltage-current-resistance relationship in electricity.

Voltage being pressure and current being ow. The impedance boundary is based on a solution of a linear, damped wave equation in the downstream domain. The resistance boundary condition was found to yield better results than a constant pressure application, but still had very high numerical damping. This led to un-physiological mass uxes across a pulse period, especially at peak ows; similar but muted. The impedance boundary condition improved results over the resistance and was determined to be the most physically relevant application.

17 Chapter 3

Governing Equations and Numerical

Methods

The governing equations described below are the Navier-Stokes equations. OpenFOAM reduces those PDE's into a set of linear algebraic equations and solves them. In order to validate a CFD code, computational results must be compared against some prepossessed knowledge (i.e., previous experimental data or mathematical formulation). In the instance of a straight, circular pipe, steady and transient analytical solutions can be derived, providing a foundation for validation. The following derivation of the governing equations describes the response of a radial velocity prole to an axial pressure gradient. The steady, Poiseuille ow has a characteristic parabolic velocity prole induced by a constant pressure gradient. For the pulsatile ow, a complex pressure waveform is used in the derivation. Taking the imaginary component of the velocity solution corresponds to the imaginary component of the complex pressure waveform. In this way, a velocity solution can be found for a sinusoidal pressure wave and is shown below [36].

3.1 Governing Equations

The governing equations used in this study are the full Navier-Stokes equations. Cylindrical co- ordinates are simpler to use due to the circular bounding geometry of the ows under consideration.

The x, r, and θ coordinates correspond to the u, v, and w velocity components contained in the governing equations. For an incompressible, Newtonian uid, the equations are the Conservation

18 of Mass (continuity, Equation 3.1) and Conservation of Momentum (Equation 3.2).

∇ · u = 0 (3.1)

∂u 1 + u · ∇u = − ∇P + ν∇2u (3.2) ∂t ρ

where u = (u, v, w)

The aforementioned analytical solutions can be found by reducing the governing equations under these assumptions:

1. The ow is fully-developed.

2. The ow is incompressible.

3. The pipe has a rigid, symmetric, circular cross-section.

4. There are no external forces.

5. The time derivative is zero for steady ow (Poiseuille ow).

6. No slip condition applies at the walls.

For fully-developed ow, all derivatives in the x direction are zero.

∂ = 0 (3.3) ∂x Under assumptions 3, 4, and 5, the angular velocity and all θ derivatives are zero. ∂ = 0 (3.4) ∂θ w = 0 (3.5)

Considering Equations 3.3, 3.4, 3.5, and assumption 6, the Continuity Equation (Eq. 3.1) can be reduced to:

∂ (rv) = 0 (3.6) ∂r

19 rv = constant (3.7)

rwall > 0, vwall = 0 : therefore (3.8) v = 0 (3.9)

Reducing the Momentum Equations (Eq. 3.2) yields the following:

∂u 1 ∂P ∂2u 1 ∂u = − + ν + (3.10) ∂t ρ ∂x ∂r2 r ∂r

∂P = 0 (3.11) ∂r

The governing equations, under the six assumptions, have been reduced to Equations 3.10 and

3.11. The axial velocity is only a function of radial distance and time, u = f(r, t). The pressure is only a function of axial position and time, . Under the assumption that dP only, P = f(x, t) dx = f(t) an analytical solution is obtainable with each component having a steady and oscillatory part.

u(r, t) = us(r) + uφ(r, t)

P (x, t) = Ps(x) + Pφ(x, t) (3.12)

Inserting into the reduced governing equation (Eq. 3.13) and separating the steady (Eq. 3.14) and unsteady (Eq. 3.15) components yields two separate equations.

∂u 1 dP dP  ∂2u ∂2u  ν ∂u ∂u  φ + s + φ = ν s + φ + s + φ (3.13) ∂t ρ dx dx ∂r2 ∂r2 r ∂r ∂r

1 dP ∂2u ν ∂u s = ν s + s (3.14) ρ dx ∂r2 r ∂r

∂u 1 dP ∂2u ν ∂u φ + φ = ν φ + φ (3.15) ∂t ρ dx ∂r2 r ∂r

3.2 Poiseuille Flow Solution

Poiseuille ow describes a laminar, steady state, internal ow in a circular pipe that is charac- terized by a parabolic, axial velocity prole in the radial direction and a constant axial pressure gradient. Poiseuille ow is derived using a no slip condition at the wall and a nite velocity at

20 Figure 3.1: Parabolic velocity prole that is characteristic of Poiseuille ow the centerline. Considering the steady governing equation, Eq. 3.14, a solution is possible if both sides of the equations are set to a constant, Ks.

dP ∂2u µ ∂u s = µ s + s = K (3.16) dx ∂r2 r ∂r s

Integrating the pressure side, and applying P (x = 0) = P0 yields:

Ps(x) = Ks · x + P0 (3.17)

Integrating the velocity and applying some simple algebra yields:

K u = s r2 + A ln(r) + B (3.18) s 4µ

Applying the no slip condition and then the nite velocity at the centerline results in the nal form of the steady velocity equation:

−K u = s R2 − r2 (3.19) s 4µ P (L) − P (0) K = s s L

The Poiseuille velocity prole is parabolic with the maximum velocity at the centerline, Figure 3.1.

21 3.3 Pulsatile Flow Solution

Pulsatile ow of a straight pipe is characterized by a periodic pressure waveform that induces an unsteady response to the axial velocity. An analytical solution for the velocity can be found for a purely oscillatory pressure waveform in such a way that allows, via Fourier series, for a similar solution involving a pressure waveform that is periodic, but not necessarily sinusoidal. The solution found below has been derived using an oscillatory, complex pressure gradient with an amplitude equal to that of the steady case. The pressure is a function of axial position and time, P = f(x, t), and the axial velocity is a function of radial position and time, u = f(r, t). The same boundary conditions apply as in the steady case: zero velocity at the wall and nite velocity at the centerline.

dP P (L, t) − P (0, t) φ = φ φ = K = K eiωt (3.20) dx L φ s

∂u K ∂2u ν ∂u φ + s eiωt = ν φ + φ (3.21) ∂t ρ ∂r2 r ∂r

iωt If separation of variables is applied, where uφ = U(r) · e , and inserted into the unsteady governing equations, the PDE can be reduced to a solvable ODE.

K d2U 1 dU  (iωU) · eiωt + s · eiωt = ν + · eiωt (3.22) ρ dr2 r dr

If the Womersley number is dened as p ω , and inserted into Eq. 3.22 along with some Ω = R ν algebraic manipulation, the ODE takes the form of:

K R2 U(r) = AJ (ζ) + BY (ζ) + i s (3.23) 0 0 µΩ2

The general solution of which is:

K R2 U(r) = AJ (ζ) + BY (ζ) + i s (3.24) 0 0 µΩ2

Where A, B are arbitrary constants, and J0,Y0 are zero-order Bessel functions of the rst and second kind, respectively, satisfying the standard Bessel Equations:

d2J 1 dJ d2Y 1 dY 0 + 0 + J = 0 and 0 + 0 + Y = 0 (3.25) dζ2 ζ dζ 0 dζ2 ζ dζ 0

22 The independent variable is dened as r , where is the complex frequency param- ζ ζ(r) = λ R λ   eter dened as λ = i√−1 Ω. In order to solve for constants A and B, the boundary conditions 2 must be applied to Eq. 3.24:

Boundary Condition1:r = 0 → u(0, t) = finite, ζ = 0,U(0) = finite

K R2 U(0) = i s + AJ (0) + BY (0) µΩ2 0 0

Y0(0) → ∞,B = 0

Boundary Condition 2: r = R → u(R, t) = 0, ζ = λ, U(0) = 0

K R2 0 = i s + AJ (λ) µΩ2 0

2 KsR 1 A = i 2 · µΩ J0(λ)

Resulting in the nal form of U(r):

 2    iKsR J0(ζ) (3.26) U(r) = 2 1 + µΩ J0(λ)

The oscillatory axial velocity is therefore:

 2    iKsR J0(ζ) (3.27) uφ(r, t) = 2 1 + (cos(ωt) + i sin(ωt)) µΩ J0(λ)

Combining the steady and unsteady velocities yields the full analytical solution for the unsteady pulsatile ow equation:

 2    −Ks 2 2 iKsR J0(ζ) (3.28) u(r, t) = R − r + 2 1 + (cos(ωt) + i sin(ωt)) 4µ µΩ J0(λ)

The nal solution of the velocity equation is complex, as is the driving pressure waveform. In the zero-mean computations, the imaginary component of the pressure gradient was used, therefore the imaginary part of the velocity equation was extracted to validate the solutions.

23 Figure 3.2: Velocity proles at Wo = 9 across one period. Stokes layer is evident near the wall as the overshoot phase lag from the centerline ow.

∂P φ = K · sin(ωt) = K · eiωt , therefore ∂x s s I

 2     iKsR J0(ζ) (3.29) uCFD = (uφ)I = 2 1 + (cos(ωt) + i sin(ωt)) µΩ J0(λ) I The shape of the unsteady response varies with the Womersley number. At low Womersley numbers, near unity, the ow is considered quasi-steady. The shape of the velocity prole has a similar parabolic prole akin to the steady case. At such a low Womersley number, the velocity transitions in phase with the transient pressure gradient. As the Womersley number increases, thereby increasing the frequency, the pressure oscillates quicker than the viscous uid can react.

An out-of-phase velocity prole develops, where the near wall region leads the ow closer to the centerline. This is described as the Stokes layer. As frequency increases, the centerline velocity decreases towards zero while the magnitude of the Stokes layer increases, but its radial thickness

24 decreases. At a Womersley number of innity, the velocity prole is radially zero. 3.3.1 Pulsatile Shear Stress

Like the velocity solution, the shear stress will oscillate back and forth throughout the period. The oscillatory shear stress equation is:

  ∂uφ(r, t) τφ(t) = −µ (3.30) ∂r r=R For a purely oscillatory ow, there is no steady component. Inserting the analytical velocity solution into the shear stress equation yields:

2    iKsR d J0(ζ) iωt (3.31) τφ(t) = − 2 1 − e Ω dr J0(λ) r=R The nal form of the shear stress equation is:   KsR J1(λ) iωt τφ = − · e (3.32) λ J0(λ)

3.4 Fourier Series

A Fourier Series decomposes a periodic function into an innite series of sines and cosines [37].

A periodic function is dened as having the same value at any point across an integer number of periods. If the length of one period is dened by a length T , then a periodic function would have the following property and general Fourier denition:

f(t) = f(t + T ) (3.33)

∞ X f(t) = A0 + An cos(nωt) + Bn sin(nωt) (3.34) n=1

Where A0 represents the average value across one period, or the steady component of the

th function, whereas An and Bn represent the magnitude of the n mode, or the unsteady component of that mode. The innite sum of these values will return an exact replica of a given function, yet a discrete number of modes can result in a high degree of replication, leaving out only the highest frequency content.

25 1 Z 2π A0 = f(t) · dt 2π 0 1 Z 2π An = f(t) cos(nωt) · dt (3.35) π 0 1 Z 2π Bn = f(t) sin(nωt) · dt π 0

The constants An and Bn can also be converted into a magnitude, |An|, and phase lag, φ per mode.

∞ X f(t) = A0 + | An | ·sin(nωt + φ) where (3.36) n=1

p 2 2 | An | = An + Bn B  φ = tan−1 n An

A feature of the Fourier Series is the capability of reducing time dependent information into several manageable constants. This procedure was used within the unsteady computations (Chapter 5) to facilitate understanding of the results across a period. The decomposition of the analytical solutions can be seen in Figure 3.3.

3.5 Numerical Methods

The governing equations for conservation of mass, conservation of momentum, and transport of scalars can be represented by the generic transport equation for φ

∂ρφ + ∇ · (ρUφ) − ∇ · (ρΓ ∇φ) = S (φ) (3.37) ∂t φ φ which is comprised of 4 basic terms: temporal acceleration, convective acceleration, diusion, and a source term. The nite volume method requires that each term in Eq. 3.37 be satised over the control volume Vp around the point P in the integral form.

26 Figure 3.3: Fourier decomposition of pulsatile analytical solution into velocity magnitude and phase lag for Wo = {1, 3, 9, 27}.

Z t+∆t  ∂ Z Z Z  ρφdV + ∇ · (ρUφ)dV − ∇ · (ρΓφ∇φ)dV dt t ∂t VP VP VP Z t+∆t Z  = Sφ(φ)dV dt (3.38) t VP

The discretization of each term will be discussed in the following sections.

3.5.1 Spatial Discretization

The solution domain is discretized into computational cells, or nite volumes, on which the gov- erning equations are discretized, reduced into algebraic form, and solved with numerical methods.

OpenFOAM is based upon general polyhedral cells. The cells are contiguous, i.e., they do not overlap each other and completely ll the domain. Dependent variables and other properties are stored at the cell centroid P, although they may be stored on faces or vertices. The cell is bounded by a set of faces, given the generic label f. Since the mesh can be a general polyhedral, there is no limitation on the number of faces bounding each cell, nor any restriction on the alignment of each face.

The rst step in spatial discretization is to transform the volume integrals in Eq. 3.38 to surface integrals by using Gauss's Theorem (also known as the Divergence Theorem). In its most general

27 form, Gauss's Theorem can be written as

Z Z ∇ ? φdV = dS ? φ (3.39) V S where S is the surface area vector, φ represents any tensor eld, and the star operator ? is used to represent any tensor product, i.e., inner, outer, cross and the respective derivatives (div, grad, curl).

Volume and surface integrals are then linearized using appropriate schemes which are described for each term.

3.5.1.1 Convection term

The convection terms is integrated over a control volume and linearized as follows:

Z Z X X ∇ · (ρUφ)dV = dS · (ρUφ) = Sf · (ρU)f φf = F φf (3.40) V S f f where the face eld φf can be evaluated using a variety of schemes including central, upwind, and blended dierencing. Central (or linear) dierencing, which is second-order accurate, can be written as:

φf = fxφP + (1 − fx)φ (3.41) fN fx = (3.42) PN

OpenFOAM also includes two other centered schemes: cubicCorrection and midPoint. Upwind dierencing for φf , which guarantees boundedness but is rst-order accurate, can be written as

  φp for F ≥ 0 φf = (3.43)  φN for F ≤ 0

In addition to the standard upwind scheme, linearUpwind, skewUpwind and Quick schemes are variants of upwinded schemes which are available in OpenFOAM. Finally, there are a number of blended schemes which attempt to preserve both boundedness and accuracy of the solution. The gamma scheme can be written as

28 φf = (1 − γ)(φf )UD + γ(φf )CD (3.44) where the blending factor 0 ≤ γ ≤ 1 determines how much dissipation is introduced.

The mass ux F in Eq. 3.40 is calculated from interpolated values of ρ and U. Similar to interpolation of φf ,F can be evaluated using a variety of schemes including centered, upwinded, and blended schemes, the latter of which includes a number of schemes (such as limitedLinear, vanLeer, MUSCL, limitedCubic, SFCD, and Gamma).

3.5.1.2 Laplacian Term

The Laplacian term is integrated over a control volume and linearized as follows:

Z Z X ∇ · (Γφ∇φ)dV = dS · (Γφ∇φ) = Γf Sf · (∇φ)f (3.45) V S f

The face gradient discretization is implicit when the length vector d between the center of the cell of interest P and the center of neighboring cell N is orthogonal to the face plane, i.e., parallel to

Sf :

φ − φ S · (∇φ) = |S | N P (3.46) f f f |d|

In the case of non-orthogonal meshes, an additional explicit term is introduced which is evaluated by interpolating cell center gradients, themselves calculated by central dierencing cell center values.

3.5.1.3 Source Terms

Source terms can be specied in three ways: explicit, implicit, and implicit/explicit. For explicit source terms, they are incorporated into an equation simply as a eld of values. For example, to solve Poisson's equation ∇2φ = f; φ and f would be dened as volScalarField and then do

solve(fvm :: laplacian(phi) == f)

29 In contrast, an implicit source is integrated over a control volume and linearized by

Z Sφ(φ)dV = SpVP φP V The Implicit/Explicit approach changes between the two based upon the sign of the source term.

If the source is positive, it is treated as an implicit source term so that it increases the diagonal dominance of the matrix. If the source is negative, it is treated as an explicit source term. In mathematical terms, the mixed source approach can be written as

Z Sφ(φ)dV = SuVP + SpVP φP (3.47) V

3.5.2 Temporal Discretization

3.5.2.1 Temporal Derivatives

The rst derivative ∂ is integrated over a control volume with one of two schemes: 1st-order Euler ∂t implicit, or a 2nd-order backward dierence

∂ Z (ρ φ V )n − (ρ φ V )0 ρφdV = P P P P P P (3.48) ∂t V ∆t ∂ Z 3(ρ φ V )n − 4(ρ φ V )0 + (ρ φ V )00 ρφdV = P P P P P P P P P (3.49) ∂t V 2∆t where the new values of φn = φ(t + ∆t), the old values are φ0 = φ(t), and the old-old values are

φ00 = φ(t − ∆t).

3.5.2.2 Treatment of Spatial Derivatives in Transient Problems

Reconsider the integral form of the transport equations Eq. 3.38.

30 Z t+∆t  ∂ Z Z Z  ρφdV + ∇ · (ρUφ)dV − ∇ · (ρΓφ∇φ)dV dt t ∂t VP VP VP Z t+∆t Z  = Sφ(φ)dV dt t VP

Using Eqs. 3.40, 3.45, and 3.47, Eq. 3.38 can be written in a semi-discretized form

  Z t+∆t ∂ Z X X ρφdV + F φ − (ρΓ )S · (∇φ) dt ∂t f φ f  t VP f f Z t+∆t = (SuVP + SpVP φP ) dt (3.50) t

For an Euler implicit approach, this equation can be reduced to

n 0 (ρP φP VP ) − (ρP φP VP ) X X + F φn − (ρΓ )S · (∇φ)n ∆t f φ f f f n (3.51) = (SuVP + SpVP φP )

In contrast, Eq. 3.50 can also be evaluated with a Crank-Nicholson scheme. The result is

n 0 n 0 ! n 0 ! (ρP φP VP ) − (ρP φP VP ) X φf + φf X (∇φ)f + (∇φ)f + F − (ρΓ )S · ∆t 2 φ 2 f f φn + φ0  = SuV + SpV P P (3.52) P P 2

Regardless of the approach, the equations can be reduced to the algebraic system for every control volume

n X n (3.53) aP φP + aN φN = RP N where the coecients aP and aN are the diagonal and o-diagonal coecients, respectively, and

RP is the source-term vector.

31 3.6 Solution Algorithm for the Navier-Stokes Equations

Solution of the incompressible Navier-Stokes equations requires that three items be addressed: derivation of an equation for pressure; linearization of the momentum equations; and implemen- tation of a pressure-velocity coupling algorithm. These items will be discussed in the following sections.

3.6.1 Linearization

The non-linear convection terms in the governing equation, Eq. 3.37, are reduced to P n f F φf where F = . The challenge is that , and from Eq. 3.53, are functions of . The impor- S · (U)f F aP and aN (U) tant issue is that the uxes F should satisfy the Continuity Equation, Eq. 3.1. Linearization of the convection term means that the existing velocity (or ux) eld that satises continuity will be used to calculate aP and aN . For strongly nonlinear phenomenon, two approaches can be used to cap- ture the non-linearity: sub-iteration over the entire algorithm such the the lagged velocities, and therefore the uxes and coecients, are iteratively updated; or use of small time-steps such that the error in not updating the uxes and coecients remains small, both impose a computational cost.

3.6.2 Derivation of the Pressure Equation

A semi-discrete form of the momentum equations is used to derive the pressure equation:

aP UP = H(U) − ∇p (3.54)

This equation is clearly and extension of 3.53, however, the pressure term has been broken out, and

H(U) consists of two parts, the transport part which includes the matrix of coecients for all neighbors multiplied by corresponding velocities, and the source term part which includes part of the transient term and all other source terms (apart from the pressure gradient). For example,

H(U) for the incompressible Navier-Stokes equations (excluding source term due to gravity and

32 turbulence) using Euler implicit temporal dierencing is

X U0 H(U) = − a U + (3.55) N N ∆t N

Equation 3.54 can also be solved for the velocity at the cell center by dividing aP

H(U) 1 UP = − ∇p (3.56) aP aP

From this, the velocity at the cell face can be found though interpolation, i.e.,

    H(U) 1 (3.57) Uf = − (∇p)f aP f aP p To derive the pressure equation, the discrete incompressible continuity equation is written

X S · Uf = 0 (3.58) f and Eq. 3.57 is inserted,

 1  X H(U) ∇ · ∇p = S · (3.59) aP ap f f The Laplacian operator on the left-hand side can be discretized using the methods described in

Section 3.5.1.2, which results in the nal form of the discretized incompressible Navier-Stokes equations

X aP UP = H(U) − S(p)f (3.60) f

"  #   X 1 X H(U) (3.61) S · (∇p)f = S · aP aP f f f f

Finally, if the face uxes F are computed using Uf from Eq. 3.57,

"    # H(U) 1 (3.62) F = S · Uf = S · − (∇p)f aP f aP p then the uxes are guaranteed to be conservative.

33 3.6.3 Pressure-Velocity Coupling

The discretized form of the Navier-Stokes system in Eqs. 3.60 and 3.61 are coupled in that each contains velocity and pressure. While there are algorithms for solving the fully-coupled set of equations, this remains computationally expensive in comparison to the segregated methods for coupling the pressure and velocity elds. The most common segregated methods are the PISO and

SIMPLE algorithms and their derivatives (e.g., SIMPLE-C, SIMPLER). Both are commonly used in OpenFOAM; however, SIMPLE and PISO are typically used for steady and transient problems, respectively. Each is discussed briey in the following sections.

3.6.3.1 PISO

The Pressure-Implicit Split-Operator (PISO) algorithm is a predictor-corrector method approach for solving transient ow problems. For the PISO algorithm, the momentum equation is solved rst, however, since the exact pressure gradient source term is not known at this stage, the pressure eld from the previous time-step is used instead. This stage is called the momentum predictor and gives an approximation of the new velocity eld. Using the predicted velocities, the H(U) operator can be assembled and the pressure equation can be formulated. The solution of the pressure equations gives the rst estimate of the new pressure eld. This step is called the pressure solution.

Next, conservative uxes consistent with the new pressure eld are computed using Eq. 3.62.

The velocity eld should also be corrected as a consequence of the new pressure distribution.

Velocity correction is done in an explicit manner, using Eq. 3.56. This is the explicit velocity correction stage.

A closer look at Eq. 3.56 reveals that the velocity correction actually consists of two parts:   a correction due to the change in pressure gradient 1 ∇p and the transported inuence of aP   corrections of neighboring velocities H(U) . The fact that the velocity correction is explicit means aP that the latter part is neglected. It is therefore necessary to correct the H(U) term, formulate the new pressure equation and repeat the procedure. in other words, the PISO loop consists of an implicit momentum predictor followed by a series of pressure solution and explicit velocity corrections. The loop is repeated until a predetermined tolerance is reached.

Another issue is the dependence of H(U) coecients on the ux eld. After each pressure solution, a new set of conservative uxes is available. It would therefore be possible to recalculate

34 the coecients in H(U). This, however, is not done; it is assumed that the non-linear coupling is less important than the pressure-velocity coupling, consistent with the linearization of the momen- tum equation. The coecients in H(U) are therefore kept constant through the whole correction sequence and will be changed only in the next momentum predictor.

The overall PISO algorithm can be summarized as follows:

1. Set the conditions.

2. Begin the time-marching loop.

3. Assemble and solve the momentum predictor equation with the available face uxes (and

pressure eld).

4. Solve the pressure equation, and explicitly correct the velocity eld. Iterate until the tolerance

for pressure-velocity system is reached. At this stage, pressure and velocity elds for the

current time-step are obtained, as well as the new set of conservative uxes.

5. Using the conservative uxes, solve all other equations in the system.

6. Go to the next time step, unless the nal time has been reached.

3.6.3.2 SIMPLE

The SIMPLE algorithm (Semi-Implicit Method for Pressure-Linked Equations) provides an iterative method for solving steady-ow problems. The algorithm is comprised of several steps:

1) an approximation of the velocity eld is obtained by solving the momentum equation; 2) the pressure equation is solved in order to obtain an updated pressure eld; 3) conservative uxes are computed using Eq. 3.62; 4) velocity eld is explicitly corrected using Eq. 3.56; and 5) all secondary equations (e.g., turbulent kinetic energy and specic dissipation) are solved. At each step, under-relaxation is used to stabilize the non-linearity of the solution algorithm.

The overall SIMPLE algorithm can be summarized as follows:

1. Set initial conditions of all the eld values.

2. Begin the global iteration loop.

35 3. Assemble and solve the under-relaxed momentum predictor equation.

4. Solve the pressure equation and calculate the conservative uxes. Update the pressure eld

with an appropriate under-relaxation. Perform the explicit velocity correction using Eq.

3.56.

5. Solve the other equations in the system using the available uxes, and the updated pressure

and velocity elds.

6. Check the convergence criterion for all equations. If the system is not converged, start a new

global iteration.

36 Chapter 4

OpenFOAM

The use of Open-Source Field-Operation and Manipulation (OpenFOAM) at the practical level is explained in this chapter. The process of grid construction, case assembly, and post- processing application is discussed with a focus on the particular methods used for the internal

ow computations.

4.1 Using OpenFOAM

4.1.1 Pre-processing grids

A grid can be described as a contiguous computational domain (see Sec. 3.5.1). The programs used to build the grids were OpenFOAM's blockMesh utility and Gridgen [38]. The blockMesh utility is a mesher without a graphical interface. The user inputs the spatial values of the bounding edges of a hexahedral volume. Simple geometric shapes like lines or circular arcs can be used to describe the volume geometry. The user then inputs the number of cells and cell growth rate on each edge. While this approach is unt for complicated geometry, which is outside the scope of this research, it does provide the benet of proper face ordering. Equipping a grid with cyclic

(periodic) boundary conditions can only be successfully done if each corresponding face on the cyclic boundaries is ordered in the same way.

Gridgen allows for direct manipulation of grids and has the ability of creating wholly structured, wholly unstructured, or a blend of both grid types. Gridgen can directly export to OpenFOAM's mesh format, though it could not at the time the current work was performed. Grids were exported

37 as a Fluent grid and converted with an OpenFOAM utility. However, the face ordering was not always consistent through this method. For example, the unstructured grid used in the topological study was capable of cyclic boundary conditions, though other attempts at a similar unstructured grid could not be used. The hybrid and fully structured grids could not be assembled in Gridgen such that cyclic boundary conditions could be implemented. A utility, couplePatches, attempts to renumber the boundaries appropriately, but was unsuccessful for the grids.

OpenFOAM has a function to evaluate a mesh called checkMesh. This utility quanties the geometrical statistics and cell shapes; checks the topology and boundaries; and assesses the delity of the grid. The parameters of mesh delity are the boundary openness; non-orthogonality of the cells; orientation and skew of the cell faces; edge lengths; aspect ratios; and face atness. The mesh check is useful in predicting the success of the grid and the non-orthogonal correctors needed to resolve the pressure solution per time step. While passing the mesh checks does not guarantee that the grid will run successfully, failing one or more mesh checks will almost certainly cause the computation to lose stability.

4.1.2 Building cases

A case is initially composed of three directories: the system, constant, and zero. Solvers require dierent les within these for a case to start, but only les needed for laminar, incompressible ow are described within this section. The constant directory contains the polymesh directory and transportProperties le. The contents within the polymesh directory describe the grid geometry and connectivity matrix upon which the cell volumes were created. Within the transportProperties

le, the kinematic viscosity constant, ν, must be set to the value that corresponds to the particular uid. In the incompressible form of the governing equations, the kinematic viscosity is the only constant needed, but the pressure gradient term must be divided by the density, ρ. The system directory is used to describe the more administrative aspects of the computation.

The controlDict is used to adjust the time controls, read/write properties, and time step values.

The controlDict can also be used to set a maximum Courant number to ensure stability, as well as calling the probes function. The probes function allows the user to select locations within the computational domain and obtain a time history of the variables at those locations. The fvSchemes le contains the information pertaining to the discretization schemes for the dierent terms in the Navier Stokes equations. Computations done for the current work used schemes that were second order accurate (Gauss Linear). The fvSolution le sets the linear algebraic solver and

38 convergence criteria. The sampleDict le contains the sample locations and method for the sample post-processing utility. The decomposePar le sets the method and manner in which a grid is decomposed for parallel computations.

The zero directory contains a le for each variable that will be calculated once the computation begins. Within each le, every boundary is given its proper boundary condition and initialized with the appropriate initial condition. The internal cells are also initialized. For laminar ow, the velocity and pressure are the variables upon which this is done. The manner that this is done is specic to each boundary condition and is described in the following sections.

4.1.3 Post-processing data

OpenFOAM provides many dierent ways to post-process a case. During a run, the code writes a directory, like the zero directory, for each time specied by the controlDict. Within that folder the variable les contain the value for every cell volume and boundary face. These times can be visualized using external software. OpenFOAM contains utilities to convert the data to formats for programs such as Tecplot, Ensight, and Paraview. Paraview is provided within the OpenFOAM installer.

Several utilities exist to expedite CFD analysis. For example, the wallGradU and wallS- hearStress utilities calculate the velocity gradient and shear stress at the wall and inserts that as a variable into the time folders. The sample function can be used to extract variable data at designated locations that are specied within the sampleDict. For the current work, the wall-

GradU variable was sampled at four points along the wall circumference. The other variables were sampled along a line and interpolated between the midpoints and faces of the cell. The foamLog utility decomposes the log le and provides a time history of the convergence details.

4.2 OpenFOAM Solvers and Linear Algebraic Methods

4.2.1 simpleFoam

The simpleFoam solver is a steady state solver for incompressible ow. While there is no temporal term in a steady state equation, the solver uses a time step to denote the number of iterations toward the steady solution. SimpleFoam uses the SIMPLE algorithm (Section 3.6.3.2) to handle the pressure-velocity coupling and employs an under-relaxation solution method. The

39 user species the number of orthogonal iterations and non-orthogonal sub-iterations on the pressure side of each time step calculation, as well as the relaxation factors for each variable. SimpleFoam is an inherently stable solver in that the Courant number (the ratio between time step size, cell spatial dimensions, and velocity magnitude) is not a factor in its stability.

4.2.2 icoFoam

The icoFoam solver is an unsteady solver for laminar, incompressible ow. IcoFoam uses the

PISO method (Section 3.6.3.1) for the pressure-velocity coupling and has the same iterative cycles to correct for non-orthogonality as in simpleFoam. The solver is subject to stability requirements dictated by the Courant number. A function can be applied to the solver that allows for a constant

Courant number and adjusts the time step accordingly.

4.2.3 channelIcoFoam

The channelIcoFoam solver is adapted from two standard OpenFOAM solvers: icoFoam and channelFoam. ChannelIcoFoam has the same characteristics as icoFoam mentioned in Sec. 4.2.2 but handles the pressure term in the velocity equation as a known quantity. Because the Navier

Stokes equation is a function of the pressure gradient, not the pressure itself, the velocity solution needs to approximate that value at each time step. The channelFoam solver is used for ows in which the pressure gradient is constant and always known. In this case there is no need to approximate the pressure gradient via a numerical discretization method, the pressure gradient can simply be given a value and set as a body-force term in the velocity equation. The channelI- coFoam solver adapts that method, but allows for the pressure gradient to sinusoidally oscillate; thereby permitting a pressure driven computation to have cyclic inlet and outlet boundary con- ditions. The frequency, gradPMag, and gradPNormalDirection constants must be set within the gradPProperties le in the constant folder,

4.2.4 Fourier adaptations

A periodic ow can be quantied using Fourier analysis, via the magnitude and phase lag of the rst (or higher) mode and the average (zeroth mode). For applicable ow situations, the icoFourierFoam and channelIcoFourierFoam solvers were developed. They are computationally no dierent from icoFoam and channelIcoFoam; however, at the end of each time step calculation, the

40 coecients A0,A1, and B1 are calculated using the trapezoidal rule. To obtain valid Fourier coef- cients, the Fourier solvers must be used on a previous calculation that has reached a statistically steady state and ran for one period, T . On the last time step (at t = T ), the Fourier coecient variables are valued as the integration of the velocity components across one period and can be post-processed. The frequency, 1 , is specied in the fourierCoeProperties in the constant f = T folder.

4.2.5 Linear algebraic methods

Though there are many dierent algebraic solvers available in OpenFOAM, three were utilized for the computations. The pressure equations were solved using a Geometric-Algebraic Multi-

Grid method (GAMG) and a Preconditioned Conjugate Gradient (PCG) method using a Diagonal

Incomplete-Cholesky (DIC) preconditioner. The velocity equation was solved using a Precondi- tioned Bi-Conjugate Gradient method (PBiCG) using a Diagonal Incomplete Lower Upper (DILU) preconditioner. Dierent algebraic solvers were used to dually assess the capability of each method within OpenFOAM.

4.3 OpenFOAM Boundary Conditions

4.3.1 xedValue

The xedValue boundary condition applies a user-specied constant value along the boundary.

The constant can be applied uniformly or non-uniformly as a scalar, vector, or tensor value.

4.3.2 zeroGradient

The zeroGradient boundary condition applies a zero rst-derivative, or Neumann condition with a constant of zero, in the normal direction of the local face to the boundary.

4.3.3 cyclic

A cyclic boundary condition enables two patches to be treated as if they are physically connected and are used for repeated geometries. For the pipe cases, a reference pressure must be set to a reference volume in order for the pressure loop to solve correctly. From that reference pressure and

41 the pressure gradient specied in the gradPProperties, channelIcoFoam can solve for the pressures with respect to the reference cell.

4.3.4 pressureInletOutletVelocity

The pressureInletOutletVelocity (pIOV) boundary condition evaluates the velocity via the pressure-induced volume ux. In order to apply this boundary condition, the pressure must be well-posed or a solution will not converge.

4.3.5 timeVaryingUniformFixedValue

The timeVaryingUniformFixedValue (tVUFV) boundary condition applies a uniform value to the boundary that is specied as a function of time in a data le. The value is constant for each face and is interpolated between the two nearest values in the data le. Like the xedValue boundary, the value can be a scalar, vector, or tensor.

42 Chapter 5

Internal Flow Computations

The CFD results are separated into two sections: a grid and topological study of a straight pipe and a straight pipe respiring into an external environment (plenum). The grid study was computed on three hexahedral structured grids, see Figure 5.2. The coarsest of which has an approximate number of volumes across the diameter as the nest dog's nose grid (Figure 5.1). With each grid renement, the number of volumes along a connector was doubled from the previous grid and the growth rate remained constant; thereby doubling the near wall resolution and quadrupling the total volumes on each circular face with each renement. The grid parameters can be seen in

Table 5.2. The grid study was performed to understand the eect of increasing the resolution to capture the Stokes Layer characteristics and overall velocity prole.

The grids used for the topology study (see Figure 5.3) were a fully unstructured grid with no clustering near the wall; a hybrid grid with a structured wall layer and unstructured inner core; and the middle grid from the grid study. The grids were created to have approximately the same volume density on the circular face with no variation in the axial direction, except for number of cells (see Table 5.2). In other words, any slice normal to the axial direction would be uniform to the inlet and outlet face. The grids were able to be created this way for two reasons: for the ow under consideration, the fully developed velocity solution will not change in the axial direction and the application of the boundary conditions is such that an entry length in the pipe is not required. The increase in the number of downstream volumes for the unstructured and hybrid grid is purely to ensure solution convergence. The topological comparison was performed to understand the eectiveness of alternate grid topologies.

43 Figure 5.1: Comparison of the internal spatial resolution of the (1) coarse, (2) medium, (3) ne, and (4) nest CFD grids in the maxilloturbinate region. Comparable grid resolution is found in the nasal vestibule and ethmoidal region [5].

44 Figure 5.2: Coarse, medium, and ne grids for the grid study.

45 Figure 5.3: Unstructured, hybrid, and structured grids used for the topology study.

46 Figure 5.4: The grid used for the plenum case shown as the view on the inlet face, along the axial length, and on the plenum face.

47   Total Cells Axial Cells Faces Density faces In/Out Boundary mm2 Coarse 245 1 245 311.9 cyclic Middle 980 1 980 1247.8 cyclic Fine 3920 1 3920 4991.1 cyclic Hybrid 2616 3 872 1110.3 pIOV, tVUFV Middle 980 1 980 1247.8 cyclic Unstruct. 5190 5 1038 1321.6 cyclic

Table 5.2: Parameters of each pipe grid.

 2  D (mm) L (mm) Re m 1 ∂P m umax ( s ) ρ ∂x s2 Pin Pout Grid/Topology 10 10 1000 0.2 0.032 0 0.00032 Plenum (Pipe) 1 100 750 1.5 0.25 0 n/a Plenum (Plenum) 50 25 n/a 2.5

Table 5.3: Physical parameters of grid/topology studies and the plenum case.

Initially, steady CFD solutions were obtained for all the grids. The velocity proles were compared to the analytical solutions. The computations were capable of solving for steady ow.

The computational domains for the grid and topology study were created with an equal diameter and length, D = L = 0.01 m and computed at Re = 1000. For steady ow, this calculates to an average velocity, m , which corresponds to parabolic prole with m . These u¯ = 0.1 s umax = 0.2 s velocity conditions dene the pressure gradient to a value of ∂P P a . As a laminar solver was ∂x = 32 m used, the kinematic viscosity was the only known uid parameter needed ( −6 m2 ), though ν = 1×10 s the pressure must be divided by the density ( kg ) to maintain uniform dimensions. ρ = 1000 m3

The inlet and outlet pressure boundary conditions were set to a xedValue of uniform Pin = −4 m2 and m2 respectively across the boundary faces. This ensures laminar 3.2 × 10 s2 Pout = 0 s2 ow at the desired Reynolds number. As the pressure is fully specied, the velocity boundary conditions were set to cyclic (channelIcoFoam) or pIOV (icoFoam/simpleFoam) in the case of the hybrid grid (Table 5.2). The wall boundary condition sets the pressure boundary condition to zeroGradient and the velocity to a xedValue of zero. The physical parameters for all the steady calculations can be seen in Table 5.3. Once the steady solutions were obtained and veried, the unsteady solutions were ready to be computed.

The unsteady cases were purely oscillatory ow. This was performed by varying the pressure gradient sinusoidally about zero, via a time data le (tVUFV, icoFoam) or directly specifying the gradient and frequency in the constant folder within the case (channelIcoFoam). The magnitude of

48 Wo 1 T (s) Cycles to Stat. Steady f ( s ) 27 4.6410 0.21547 250 9 0.51565 1.9393 15 3 0.057296 17.4532 5 1 0.00636618 157.08 2 1 (Plenum) 0.636618 1.5708 2

Table 5.4: Unsteady parameters of the grid/topology studies and the plenum case. the pressure gradient corresponds to the steady value found for the appropriate Reynolds number, depending on the grid: straight pipe or plenum. The frequency was varied such that the Womersley number had four dierent values: W o = {1, 3, 9, 27}. The numerical details are shown in Table 5.4.

For each Womersley number, the cases were run for the same number of cycles until a sta- tistically steady situation developed, and then ran for one period using the Fourier solver - a statistically-steady condition was reached when the ow was the same at corresponding times across a cycle, meaning that the ow has reached its periodic form. This was determined by moni- toring the mass ow rate across the cycles and comparing its value at peak mass ux. An example of this is shown in Figure 5.5. For a W o = 9 computation, each case was ran for 15 periods before the Fourier solver was implemented. Increasing the Womersley number increased the number of cycles needed to reach this condition.

Computationally, only a discrete number of times were calculated across a period. In order to maintain stability, the time steps were moderated by two criteria: a maximum Courant number and a maximum time step. During the computations to achieve statistically steady, the maximum

Courant number was set to 0.5. The time step was allowed to vary to expedite the computations.

During the last period, in which the Fourier solver was implemented, the time step was set to a maximum value of 1 ms and the variable time step option was enabled. This lowered the Courant number, increased the accuracy, and allowed the time step to automatically reduce itself in order to output the variables at the designated times. The hybrid grid was computed with a slightly dierent approach. A constant time step per Wo was used to ensure an integer number of computation cycles between outputting variables. The time steps varied between 1.08 ms and 0.873 ms. The number of time steps per cycle was specically set so as to greatly exceed the number of time steps computed in the pulsatile ow grid study [30] and canine olfaction CFD [5]. This eort allowed the results to be compared through spatial dierences alone, with the exception of the mass ux analysis. More detail will be provided in Section 5.1.2.

49 Figure 5.5: Example of statistically steady for Wo = 9, computation was ran for 15 cycles and mass ux was observed before the nal Fourier cycle was computed.

For the grid and topology study, the steady results are presented rst, followed by the unsteady results. The steady proles are compared to the analytical solution, then the error across a radius is shown for all grids. The unsteady results were compared to several global, analytical parameters and also to the analytic rst Fourier mode velocity magnitude and phase lag. The error of the solution to the analytic value is shown for each comparison. For each parameter under consideration, the results of the grid study are discussed rst and the topology study second.

The plenum case was performed to simulate a more realistic physical environment similar to that of the canine olfaction CFD computations by introducing an external environment (plenum) to the straight pipe. The physical parameters are similar to the dog's nose CFD (laminar and quasi-steady) and can be seen in Tables 5.3 and 5.4; however, the geometry is much simpler, though scaled on the order of the nasal cavity. The plenum case includes both steady inspiration and expiration computations. The boundary conditions of the hybrid grid (pIOV, tVUFV) were applied to the plenum case, though the plenum was considered as the outlet from the previous cases. The diameter and length of the pipe have dierent values (D = 0.001 m and L = 0.1 m) and the Reynolds number was lower (Re = 750, Figure 2.1). Therefore, the magnitude of the pressure gradient changed, and consequently, the pressure at the inlet and plenum became: m2 Pin = 2.5 s2 and m2 for the same uid. The plenum case was only ran at (Figures 2.2 and Ppl = 0 s2 W o = 1 5.4) to reect the quasi-steady environment within the ethmoidal (olfaction) region of the canine's olfactory region.

50 5.1 Grid and Topology Studies 5.1.1 Steady Solution

Considering the steady solution, all grids were capable of converging to the Poiseuille solution.

The results of the grid study can be seen in Figure 5.6 (a, c). The sample function was used to extract the velocity values across the radii of all the grids.

In evaluating the eect of grid renement, the grid study shows a monotonic decrease in error with increasing renement. A Richardson extrapolation exercise was not performed to show this because an analytical solution exists for comparison. The coarse grid had the highest error, min- imizing at the centerline at 97.6% of the analytical solution. The error increased to a maximum of 3.2%. With the rst renement, the middle grid halved the error of the coarse grid almost uniformly across the radius, about 1% minimum error at the centerline and 2% maximum error near the wall. The nest grid renement reduced the error again nearly by half, capturing just under 99.5% of the solution at the centerline and 98.9% at the wall.

The comparison of the steady solution on dierent grid topologies, Figure 5.6 (b, c), provides insight into the value of structured layers near the wall and gridding exibility of unstructured meshes. The hybrid grid, with the lowest grid density (Figure 5.2), maintains approximately a

1.4% error in its unstructured core, while the structured grid is closer to 1% in the same region.

The hybrid grid error only slightly decreases in its structured region furthest from the wall. The concentric nature of the structured layers in the hybrid grid, which blockMesh does not create for the structured grid, appears to lower the error when compared to the structured grid through this region. The hybrid grid is also the least dense and local renements specically in the structured layer closest to the wall, as seen in the grid study, would increase accuracy . The completely unstructured grid (and also the most dense) averaged under 0.7% error from the centerline to the near wall region. The lack of a structured wall layer did not signicantly impact the solution in the area where the velocity gradient was highest.

5.1.2 Unsteady Results: Global Error Evaluation

To quantify the results of the unsteady computations, several global parameters were compared to the analytical value at each Womersley number. To evaluate the performance of capturing the dynamics of the Stokes Layer, three parameters were selected. First, the maximum value of the rst Fourier mode velocity magnitude was found. This value was found at the location of

51 (a) Grid study

(b) Topology study

(c) Error across the radius to the analytical value

Figure 5.6: Steady state results for the grid and topology study: velocity proles compared to the analytical solution and error from the wall to centerline. 52 the peak overshoot when the Stokes layer was present, or the centerline when the velocity had no overshoot. As Womersley number increased by a factor of three, the magnitude decreased by nearly a factor of ten. Then, the radial location of the rst parameter on each grid was compared to the analytical value. These rst two parameters signify how well the grid under consideration captures the Stokes Layer. The next parameter shows the phase lag at the wall. Analytically, this value has the smallest phase lag along the radius to the pressure wave. The nal two global parameters considered are the peak mass ux magnitude and phase lag to the analytical solution.

The separation of independent variables intrinsic to the analytical solution can also be expressed in the analysis of the computations. The constant shape of the velocity magnitude curve is modied by the temporal term, creating a time sensitive velocity prole. Similarly, the analysis of the Fourier velocity magnitude and phase lag allows the computational results to be dissected separately.

Considering rst the rst Fourier mode maximum velocity magnitude, the grid study (Figure 5.7 a, c) shows an expected decrease in error as the grid is rened, though the error for coarse grid is small (error < 1.5%). The middle grid, for all Wo, has less than 1% error and in all cases has less than 0.5% dierence to the ne grid. This suggests that the middle grid's level of renement is adequate for a reliable computation with a lower computational cost than that of the ne grid. As to the diering topologies, the unstructured grid has the lowest error (error < 0.4%) except for Wo

= 27 (error > 1%) though the slightly higher grid density does provide an accuracy advantage. For the hybrid grid, the error is higher than the structured and unstructured grid when the value was found in the unstructured core. The performance increases for Wo = {9, 27} when the maximum magnitude was found in the structured near wall region, though at Wo = 9 the unstructured grid still has a higher accuracy. The middle grid maintains a steady error of less than 1% whereas the hybrid grid exceeds 1% for the lowest Wo and the unstructured grid does so for the highest Wo.

While the error was low for the grid study in resolving the value of the overshoot in the Stokes

Layer, the need for higher resolution near the wall as Wo increases is shown in Figure 5.8 (a, c). One point of clarity needs to be made, the Stokes Layer is dened in this results section as the distance from the wall to the location of maximum Fourier velocity magnitude. Technically, by denition the Stokes Layer is also out-of-phase with the ow in the centerline of the pipe due to viscous interaction with the wall. In eect, the Stokes Layer does not exist for the lower Wo because the

ow is largely in-phase with itself with no overshoot, but this section considers the Stokes Layer to be the radial point of maximum Fourier velocity magnitude from the wall. Referring back to Figure

3.3 shows that Wo = {1, 3} has no overshoot and therefore no Stokes Layer; however, for ease of

53 discussion in this section the entire radial distance is considered to be the Stokes Layer. The error in Figure 5.8 (c) was calculated by nding the radial value at the cell center that corresponded to the value found in the maximum Fourier magnitude in the rst global parameter discussed.

The grid study shows that for the two lowest Womersley numbers, each grid accurately resolved the thickness to be the entire radius with no error. As the shape of the velocity distribution in these two cases are axisymmetrically parabolic, these results are expected due to the cell center located exactly in the center of the circle. As the Womersley number increased, inducing a true

Stokes Layer, the local renement became a factor. The error became more disparate at Wo = 9, though maintained a higher accuracy with each renement. Interestingly, at Wo = 27 the coarse grid had an error of 5% and the ne grid had an error of 4.3%, but the middle grid had an error of 11.5%. The middle grid, in this case, had a cell center that was much further to the analytical solution than the other grids which resulted in a greater error by the way the error was calculated.

While the exact Stokes Layer thickness was known a priori, no adjustments were made during the gridding process to make the performance monotonically distributed because for more complex geometries (i.e. the canine nasal passage) such knowledge is not known a priori.

The introduction of unstructured mesh types (Figure 5.8 b, c) shows that at Wo = {1, 3}, the error is below 2% for the hybrid grid and below 3% for the unstructured grid. This is a disadvantage when compared to the symmetric middle grid that had no error. At Wo = 9, the Stokes Layer thickness is within the near-wall-structured portion of the hybrid and middle grids. The middle grid has the highest error at 6.5%, followed by the hybrid grid at 4.5% and the unstructured grid at 1%. At the highest Wo, the middle grid again had the highest error. The hybrid grid, with an error of 2.5%, was better than the unstructured error of 4%. Statistically, the error should increase as Wo increases because the analytical Stokes Layer thickness, which is the denominator of the error equation, decreases. The unstructured grid exemplies this increase in error from Wo = 9 to

Wo = 27 because there was not adjustment to the cell sizes near the wall, though Gridgen does have the capability to do that. Decreasing cell size near the wall through adjusting cell expansion rates can slightly moderate the error for a structured grid. This is the case for the hybrid grid, though not for the middle grid which was discussed in the previous paragraph.

The last global parameter concerning the Stokes Layer is the rst Fourier mode velocity phase lag at the wall. Whereas the rst parameters described the accuracy of the computations in terms of magnitude, the results of studying the phase lag at the wall imparts information on the transient part of the calculations. On the surface of the wall, no phase lag occurs because the velocity is

54 zero; though slightly above the wall within the uid, a phase lag to the pressure sinusoid exists.

The data was sampled at the closest cell center to the wall surface. Ostensibly, this location could have been selected at any radial point. Analytically, the radial phase lag can be evaluated as the dierence from any radial point and compared as such; however, the location just away from the wall is within the Stokes Layer and has the smallest phase lag to the pressure waveform.

Furthermore, the gradient of the analytical solution for the Fourier velocity phase lag is sharpest per Wo at the wall and would be expected to be more dicult for a grid to resolve.

Considering the grid study in Figure 5.9 (a, c), the error increases as the Wo is increased for all structured grids. Each grid had error of less that 0.05% accuracy at Wo = 1 and ranged from

0.12% to 0.65% error for Wo = 3. The coarse grid increased from 1.3% to 1.5% error from Wo

= 9 to Wo = 27. Similarly, the middle grid increased from 0.6% to 1% error and the ne grid increased from 0.2% to 0.75% error. The increase in error from the previous Wo for all three grids is indicative of the diculty in resolving the Stokes layer at higher frequencies.

As to the topology study, it is very apparent that a structured near wall region is benecial in resolving the phase lag. The unstructured grid has the highest errors, most signicantly at Wo =

27. The hybrid and structured grids have nearly identical errors at or below 1%. The disparity in the grid densities between the unstructured (highest) and hybrid (lowest) grid further shows that the phase lag for the higher two Wo is heavily aected by near wall resolution.

The last two global parameters concerns the mass ux. The rst of which is the comparison to the analytical mass ow rate at maximum ux, or peak expiration. As the mass ux is the integration of the velocity ux normal to a plane, this parameter provides an indication of how well each grid resolves the entire ow eld at peak ow. A function inherent in OpenFOAM was applied to the solvers to calculate the volume ux at all boundaries per time step. As incompressible solvers were used, the value was scaled by the constant density, ρ, and compared to the analytical mass ow rate. The wall boundary had no mass ux, which ensured the no slip condition worked properly.

The inlet and outlet boundaries had negligible dierence between the two that was consistent with the numerical error inherent in CFD.

Unlike the previous parameters discussing the Stokes Layer, the mass ow phase lag must be analyzed in conjunction with the maximum mass ow magnitude. Analytically, this phase lag is the dierence between the time of peak pressure and the time of peak mass ux. The phase lag increases with increasing Womersley number. To reiterate, at Wo = 1 the ow is considered quasi-steady and the ow oscillates nearly in-phase with the pressure. As the Womersley number

55 increases, the Stokes Layer develops and the near wall viscous eects reduce the overall magnitude of the mass ux while increasing the response time of the ow. In parallel with the discrete cell centers and analytical Stokes Layer thickness comparison, the discrete time steps were not chosen to fall directly on the time of maximum mass ow. At the time when the mass ux peaked in the computation, the ux value and corresponding time were recorded and compared to the analytical values. Therefore, any discrepancy between the computed and analytical time induces extra error into the mass ux comparison because the velocity prole at the computational moment will be dierent from the velocity prole at peak analytical mass ow. A higher phase lag error would add to the numerical error of the peak mass ux, but subjectively, a similar phase lag error between grids would enable fair comparison of the peak ux. Also, each grid had a slightly dierent time of peak mass ux due to the variable time step discussed previously.

Comparing the mass ux at three levels of renement, Figures 5.10 (a, c) and 5.11 (a, c), provides a general comparison to the solution as a whole. At Wo = 1, the phase lag error decreased from 1.45% to 0.59% to 0.22% with each level of renement. The phase lag error corresponded to the following maximum mass ow error from coarsest to nest: 1%, 0.5%, and 0.25%. The largest dierence in phase lag error occurs at this Womersley number, skewing the peak mass ux results the most out of any Womersley number. Though, the peak mass ux error was halved with each successive renement. The error would likely decrease by less than 50% with each renement when the two results are combined and adjusted. For Wo = 3, the phase lag error appeared to have no eect on the mass ow magnitude. The phase lag error decreases from 0.7% to 0.3% from the coarse to middle grid and then to 0.2% for the ne grid. Though the mass ow magnitude hovers near 0.1% for all three grids. This does not necessarily mean that all three grids uniformly computed the solution accurately because any overshoot of the solution would compensate for an undershoot, thereby decreasing the overall error of the integration. For the last two Womersley numbers, the phase lag is consistent for all three grids at a value of 0.2%. This provides the opportunity to compare the mass ux error independently of phase lag. At Wo = 9, the error for the coarse, middle, and ne grid is 0.3%, 0.14%, and 0.05% respectively. At the last Womersley number, the error reduced from 2.8% to 2.5% and then to 2.3%. While lower error cannot equate greater success in resolving the ow eld, higher error suggests an overall diculty in achieving the analytical velocity prole. The consistency of the error at Wo = 27 for all the grids further suggests such diculty because upon renement the results did not tend to converge towards zero error.

56 Comparing the mass ux errors for the three dierent topologies, Figures 5.10 (b, c) and 5.11 (b, c), also gives an overall comparison to the velocity solution. At Wo = 1, the hybrid and structured grid have a phase lag error of 0.6% and the unstructured grid has a lower error of 0.25%. The hybrid grid had the highest mass ow magnitude error at 1.2%, followed by the middle grid with

0.5%, and the unstructured grid with 0.2% error. With no dierence in phase lag error between the hybrid and middle grid, the indication is that the unstructured core does not resolve the ow as well as the completely structured grid. At Wo = 3, the hybrid grid again has the highest error to the mass ow magnitude (0.4%) when compared to the other two grids (0.1% error). The phase lag error is near 0.3% for all three grids: hybrid (0.33%), middle (0.3%) and unstructured (0.27%).

The results suggest that grid density is a large factor in resolving velocity proles with a parabolic shape. With the onset of the Stokes Layer at Wo = {9, 27}, the phase lag error is consistently

0.2% (except that the hybrid grid had an error near zero at Wo = 9). Compared subjectively, the completely structured grid computed the mass ux magnitude with highest accuracy (0.12%) at Wo = 9 while the hybrid and unstructured grid matched errors at 0.5%. The hybrid grid signicantly resolved the velocity with the highest accuracy at Wo = 27, while the unstructured grid had the highest error. Section 5.1.3 further validates the global parameters by evaluating the error across the entire radius.

5.1.3 Unsteady Results Radial Error Evaluation

To further quantify the unsteady results, the magnitude and phase lag error to the analytical rst

Fourier velocity mode was calculated across the radius for each Womersley number. Whereas the global parameters detailed specic characteristics of the ow, the radial error provides information on the accuracy of resolving the entire ow eld. While the peak mass ux error could only suggest high accuracy in solving for the velocity prole, the radial error evaluation can complete the analysis. For each Womersley number, the grid study results will be discussed followed by the topological study. A smoothing algorithm was applied to the error curves, so there is a slight discrepancy in the radial phase lag error at the wall to the global error evaluation.

In Figure 5.12 (a, b) at Wo = 1, the general shape of the error curve remains the same but the error decreases upon grid renement for both parameters. The Fourier magnitude is most successfully resolved near the centerline but the error grows in the near wall region. The opposite is true for the Fourier phase lag, though the error is small for all three grids; the highest error is less than 0.2% for the coarsest grid. The phase lag error here was the lowest among all the Womersley

57 (a) Grid study

(b) Topology study

(c) Error to the analytical value

Figure 5.7: The maximum value of the Fourier velocity magnitude across a range of Wo for the grid and topology studies, with the error from the analytical solution. 58 (a) Grid study

(b) Topology study

(c) Error to the analytical value

Figure 5.8: The thickness of the Stokes Layer across a range of Wo for the grid and topology studies, with the error from the analytical solution. 59 (a) Grid study

(b) Topology study

(c) Error to the analytical value

Figure 5.9: The phase lag of the Fourier velocity at the wall across a range of Wo for the grid and topology studies, with the error from the analytical solution 60 (a) Grid study

(b) Topology study

(c) Error to the analytical

Figure 5.10: The value of the maximum mass ow rate across a range of Wo for the grid and topology studies, with the error from the analytical solution.

61 (a) Grid study

(b) Topology study

(c) Error to the analytical value

Figure 5.11: The phase lag of the mass ux to the pressure oscillation across a range of Wo for the grid and topology study, with the error from the analytical solution.

62 numbers considered, the closest to the pressure wave, and had the least dierence between the wall and the centerline value. Monotonic convergence was observed.

As the gridding technique was altered for the topology study, the results show that the unstruc- tured grid has the highest overall accuracy in resolving the Fourier magnitude. The unstructured grid has more cells on its face than the other two grids, though none of its cells are clustered near the wall. For a parabolic velocity prole, this suggests that grid density is more important to solution accuracy than near wall resolution. However, if structured near wall resolution is used, an axisymmetrical approach generally yields better results; the hybrid grid has a lower error in most of the structured region.

As the Womersley number is tripled (Wo = 3), the analytical Fourier magnitude stays parabolic, but with a blunter prole than the previous Wo. The analytical phase lag values increases, as well as the dierence between wall and centerline phase lag. The grid study again shows that the error decreases proportionately with grid renement for both magnitude and phase lag in Figure 5.12

(c, d). The Fourier magnitude error near the centerline is less than the previous Wo and the error near the wall is relatively unchanged. The phase lag error as a whole is much greater than at Wo =

1 and the error between the wall and the midpoint of the radius is more pronounced. The Fourier phase lag error still remains less than 1%, but it is evident that the ow is more dicult to resolve with the increase in Womersley number.

In regards to the topology study, the unstructured grid again has the lowest error for the Fourier magnitude and also for the phase lag. Within the structured region, the hybrid grid again has lower error than the middle grid for both Fourier components; however, the middle grid has lower error near the centerline than the hybrid grid.

At Wo = 9, the manipulation of the analytical solution into its Fourier components reveals a Stokes Layer. The combination of the overshoot near the wall of the Fourier magnitude and the dierence in phase lag between the wall and the centerline ow creates this unsteady ow characteristic, while the ow in the centerline begins to move with a uniform plug ow. In

Figure 5.13 (a, b), The grid study shows that Fourier magnitude error becomes negligible in the plug ow region for even the coarsest grid; however, the phase lag error continues to increase in the Stokes Layer region near the wall. For a ow that contains a Stokes Layer, this suggests that less renement is needed in the plug ow region and higher renement is needed to capture the overshoot phase lag, which will also decrease the Fourier magnitude error near the wall.

The unstructured grid still had the least overall error for the Fourier magnitude and phase

63 lag; however, the results begin to deteriorate near the wall, especially in resolving the phase lag.

Unlike the other two grids with structured components, the unstructured grid has seen an increase in overall error for both Fourier components with an increase in Womersley number. The higher grid density has been a factor in the the lower errors when compared to the other grids, though this trend suggests that the lack of localized cells is becoming a factor that is detrimental in resolving the Stokes Layer. The hybrid and middle have negligible error outside the Stokes Layer. Near the wall, the hybrid grid has less error in resolving the Fourier phase lag, yet the opposite is true of the Fourier magnitude. The high error near the wall is very detrimental to the hybrid grid, but the low grid density increases the overall error that mitigates the results somewhat.

At Wo = 27, the Stokes Layer thickness decreases and the ow outside of it becomes even more like plug ow. In Figure 5.13 (c, d), the structured grids shows almost no error outside of the Stokes Layer for both parameters, yet the errors within are higher than for the previous Wo with a Stokes Layer. This suggests that a very ne degree of resolution within the Stokes Layer is imperative to accurate solution convergence for high frequencies. Though much relaxation is possible within the plug ow region, as the coarse grid performs as well as the ne grid.

While the unstructured grid performed well for the previous Womersley numbers, it had the worst results for both Fourier phase lag and signicantly higher error near the wall for the velocity magnitude. The phase lag error is more than four times higher within the Stokes Layer than the other grids. The hybrid grid solves for the centerline ow with more accuracy than the middle and unstructured grid, but the error in the Stokes Later is higher than the middle grid for both Fourier components. Computationally, this Wo is the hardest velocity eld to resolve with accuracy.

5.2 The Plenum Study

The purpose of the plenum computation was to increase the complexity of the physical model to simulate a more realistic computation of respiration. This was done with the addition of an ambient external environment (plenum) to one end of the straight pipe. The geometry was scaled on the order of the canine nasal cavity: the diameter of the pipe equals one hydraulic diameter of the dog's nose and the length equals one hundred diameters. The plenum was extended twenty-ve diameters axially and radially from the outlet of the pipe. The grid built on the geometry was fully structured with no near-wall renement (Figure 5.4) and approximately the same number of

64 (a) Fourier velocity magnitude error, Wo = 1 (b) Fourier velocity phase lag error, Wo = 1

(c) Fourier velocity magnitude error, Wo = 3 (d) Fourier velocity phase lag, Wo = 3

Figure 5.12: Error across the radius to the analytical solution of the Fourier velocity magnitude and phase lag for Wo = 1, 3

65 (a) Fourier velocity magnitude error, Wo = 9 (b) Fourier velocity phase lag error, Wo = 9

(c) Fourier velocity magnitude error, Wo = 27 (d) Fourier velocity phase lag error, Wo = 27

Figure 5.13: Error across the radius to the analytical solution of the Fourier velocity magnitude and phase lag for Wo = 9, 27

66 cells across the diameter as the nest dog's nose grid (Figure 5.1) .

Initially, computations were performed to model the uid ow of steady exhalation and inhala- tion at Re = 750 to reect the laminar ow situation within the olfactory region of the dog's nose

(Figure 2.1). The physical and geometrical parameters can be seen in Table 5.3. The exhalation computation was not able to converge when the steady solver, simpleFoam, was used. The recourse was to use icoFoam with boundary conditions set such that the steady situation could develop.

The steady inhalation computation was performed using simpleFoam and the absolute value of the results was used to facilitate comparison. In the frame of reference used, the values are actually negative. The computational data was sampled at seventy-ve diameters from the outlet of the pipe, or 25% of the total length from the inlet, and compared to the analytical solution.

To model the unsteady ow, the pressure at the inlet (x = 0) was varied sinusoidally with a magnitude to that of the steady ow (2.5 KPa) while the plenum boundary pressure was held at zero (Figure 5.4). The frequency was set so that the Womersley number equaled one, which reected the value found in the ethmoidal region of the dog's nose in Figure 2.2. After two cycles, the ow reached a statistically steady state and the Fourier solver was implemented for a third period (Table 5.4). At the end of the last period, the rst Fourier mode coecients were calculated and manipulated into magnitude and phase lag. The values and error of both parameters are shown as a function of radial position. These were sampled at every fourth-length of the pipe {0.25*L,

0.50*L, 0.75*L, 1.00*L} where 1.00*L was the interface of the pipe and the plenum. These locations were selected to evaluate the eect of entry length ow characteristics. The velocity gradient was also calculated on the wall using the wallGradU function, scaled with the viscosity, and compared to the analytical wall shear stress at twenty equally spaced times throughout the period. Finally, radial velocity proles at the four locations are shown at the same twenty times of the shear stress evaluation.

5.2.1 Steady Results

The analytical solution for steady pipe ow yields the parabolic Poiseuille ow solution. At Re =

750, this yields a maximum velocity of 1.5 m/s at the centerline of the pipe. The errors discussed are a result of comparing the computed solution to the analytical values. Referencing Figure 5.14, the expiration simulation had a maximum value at the centerline of 1.458 m/s, which is an error of

2.8% to the analytical solution. Considering the coarseness of the grid, this is an acceptable error.

67 (a) Velocity prole through the diameter at x = 25*D

Figure 5.14: The velocity distribution for the steady inspiration and expiration for the plenum case. The values for the inspiration velocity have been changed from negative to positive for comparison purposes, but in reality have negative value.

As the uid was drawn into the pipe during the inspiration simulation, the velocity only peaked at

1.205 m/s (19.7% error). Whereas the expulsion of air into the ambient surroundings had negligible eect on the ow, the air entering the pipe from the plenum encountered the sharp corners of the inlet and incurred signicant losses. As the solution is still parabolic for the inhalation, it was determined that the lower peak velocity was due to losses at the inlet and not a computational discrepancy.

5.2.2 Unsteady Results

As the unsteady ow in this computation is at Wo = 1, the ow can be considered quasi-steady.

The results of the steady computation can provide insight into the uid dynamics of the unsteady case. The addition of the plenum to the straight pipe altered the ow characteristics of the steady computation because the ow was no longer independent of axial position. Proximity to the

68 interface between the pipe and the plenum aected the ow due to losses at the inlet and entry length eects.

The results of the unsteady computation conrms the insights gained from the steady compu- tation. Examination of the rst Fourier velocity mode in Figure 5.15 shows that the magnitude retains a parabolic shape, yet the maximum value does not reach the analytical value. This is the case because the inspiration prole, while maintaining the parabolic shape, does not attain the analytical value along most of the radius. The phase lag is a full degree lower than the analytical value as well. The ow is fully developed for most of the pipe. The dierence in error between the data sampled at 0.25*L, 0.50*L, and 0.75*L is small: a maximum dierence of 2% for the magnitude and 0.35% for the phase lag. The velocity prole is heavily aected at the interface between the pipe and plenum. The shape of the Fourier magnitude curve suggests an unsteady ve- locity prole that is blunter than the analytical solution, which is consistent with a still-developing velocity prole. Accepting that the analytical value is not achievable for this type of computation, the phase lag at the interface is consistent with the fully-developed phase lag, except near the wall.

The sharp corner of the interface has a greater eect closer to the wall than at the centerline, skewing both the magnitude and phase lag comparison to the ow further along the pipe. The grid is also coarse which induced higher numerical error into the computation than was seen in the grid study computations.

The wallGradU function was used to calculate the velocity gradient and mathematically ma- nipulated into the wall shear stress. Figure 5.16 further conrms that the exhalation part of the period is very close to the analytical solution, but the inhalation shear stress falls short. As the values conform to each other, except at the interface, the conclusion can be reached that the lower inhalation velocities are not a function of distance to the plenum, but in losses to the ow from the interface edge.

The nal gures of the plenum computation (Figure 5.17) capture the velocity proles at twenty discrete times during the period. Each graph shows the velocity at the four data locations and the analytical solution at 90 degrees to each other. This was done to further elucidate the characteristics of the ow; specically, the lower velocities during the inhalation and the leading edge eects at the interface. While the coarseness of the grid cannot be neglected, the gures conrm that the addition of the plenum changes the overall uid dynamics of the system and the axial dependence of the ow must be taken into account.

69 (a) Fourier velocity magnitude (b) Fourier velocity magnitude error

(c) Fourier velocity phase lag (d) Fourier velocity phase lag error

Figure 5.15: Fourier velocity magnitude and phase lag data sampled at four locations along the pipe, Wo = 1. Error is dened as the dierence to the analytical solution.

70 Figure 5.16: Wall shear stress compared to the analytical shear stress at twenty instances across one period.

71 Figure 5.17: Velocity proles at every T seconds at four locations along the pipe. The dash- t = 20 dot-dot line is the earliest prole in the phase, followed by the long-dash line second, the dash-dot line third, and the solid line is the last prole of the phase in each gure. The inhalation errors increase as the velocity magnitude does. The prole at L=100*D is most aected by the proximity to the plenum.

72 Chapter 6

Conclusions and Recommendations for Future Work

The purpose of the current work was to explore steady and pulsatile laminar ow CFD. A grid study discerned the resolution requirements needed to accurately capture the unique characteristics of pulsatile pipe ow over a range of Womersley numbers. A topology study evaluated the eect of alternate grid structures at the same Womersley range to discover the eectiveness of alternate grid types. A simplied unsteady situation resembling respiration within a straight pipe/plenum system was modeled to understand some of the underlying physics and computational challenges inherent in canine olfaction CFD analysis. Validation of OpenFOAM in regards to the ows considered and overall usability was adjunctly done.

The results of the grid study showed that accuracy increased upon grid renement. At a low

Womersley number, when the ow was quasi-steady and velocity parabolic, each grid computed the velocity with high accuracy and localized cell distribution near the wall did not signicantly impact the solution. As the pulsatile frequency increased, a Stokes Layer was induced that altered the overall dynamics of the system: the overshoot Fourier magnitude descended towards the wall and grew in phase lag dierence to the centerline ow, which became more like plug ow. Local renement in the Stokes Layer region increased the accuracy of the computation but the same renement in the centerline ow had negligible impact on error and increased the computational cost.

The comparison of dierent grid topologies (fully structured hex mesh, fully unstructured tet

73 mesh, and combination hybrid mesh) provided similar insight into the unsteady ow computations.

Each was successfully able to model the unsteady ow. Neither hex-dominant nor tet-dominant grids possessed a clear advantage in that regard, but the unstructured grids were less successful in resolving the location of maximum Fourier magnitude when it was within an unstructured region.

For the ows without a Stokes Layer, the unstructured grid consistently had higher accuracy in the global and radial parameters studied. The general dierence between the unstructured grid and the other grids was the lack of cell clustering near the wall and the highest overall grid density. So gridding eorts for computations of ows at Wo = {1, 3} can yield the highest accuracy with a focus on overall grid density and can disregard near wall localization. However, this was computed on a straight pipe and may not hold valid on geometries that induce secondary ows, which was outside of the scope of the current work. At ows with a Stokes Layer, Wo = {9, 27}, the unstructured grid did not perform with the highest accuracy even with the highest grid density. The structured and hybrid grid had structured near wall resolution which proved to enhance accuracy in resolving the Stokes Layer ow. The hybrid grid had higher accuracy in resolving the dynamics of the Stokes

Layer which suggests that an axisymmetrical approach to near wall resolution will result in better performance, all else being equal. There was negligible dierence in accuracy in the centerline

ows, for all Wo, so grid type can be preferential away from the wall. Unstructured gridding does provide the advantage of coarsening the inner core of a pipe without sacricing circumferential grid resolution at the wall, leading to lower computational cost with comparable accuracy. While the unsuccessful application of the cyclic boundary conditions to the hybrid grid did not aect the computational cost, it can prove a detriment to ows where cyclic boundaries can simplify a grid.

The plenum computation showed how the ow was altered with the addition of an ambient external environment to the straight pipe. The model was geometrically simpler than the dog's nose CFD but modeled the underlying aerodynamics of canine olfaction. The computation showed that the velocity could achieve the analytical magnitude on the exhalation phase of the period, but the sharp inlet at the interface created losses that decreased the overall magnitude but still maintained the parabolic shape of the analytical solution. The ow in the pipe had a developing length of several diameters from the interface in which the velocity proles diered from further downstream. At 25 diameters the ow was fully developed. The unsteadiness of the ow at the interface occurred during both the inspiration and expiration phases of the respiration cycle. The grid was also very coarse and so the results, especially at the interface, have considerable numerical error.

74 The nal goal was to validate OpenFOAM in regards to the steady and unsteady ows under consideration and evaluate its usability from pre-processing grids to post-processing the computed data. As an open source code, it has no commercial licensing fees and the code itself is transparent and adaptable, evident by the creation of channelIcoFoam and the Fourier implementation to the unsteady solvers. OpenFOAM had the necessary boundary conditions available and proved capable of solving the computations. The gridding utility, blockMesh, is crude but capable for simple geometries. The diculty in adapting outside grids to implement the cyclic boundary condition is a detraction, though if cyclic boundaries are not needed then it can adapt a grid from many dierent commercial CFD formats. The broad range of solvers provides very diverse capabilities in solving a myriad of CFD problems, though only steady and unsteady laminar solvers have been validated in this study. The post-processing utilities are competent, from data manipulation

(wallGradU) to format conversion (i.e. foamToTecplot, foamToEnsight). The sampling utility proved to expedite much of the post-processing time.

There are several areas of the current work where future exploration can expand on the knowl- edge gained. The same computations can be performed on an unstructured grid that has near wall renement and a grid created with Harpoon, which was the gridding software used for the canine olfaction CFD. The usability of OpenFOAM-1.5's automatic mesh generator, snappyHexMesh, can be evaluated. Pulsatile ow CFD can be performed on a bifurcating pipe to study the aerodynam- ics of more complicated geometry. A grid study of the plenum computation should be performed as the plenum grid was very coarse. A method to implement the cyclic boundary condition on any grid could be developed. The dog's nose grid could be implemented into OpenFOAM and compared to the previous CFD calculations. A 3D methodology could be developed from Craven's

1D scalar transport study [4] and implemented within OpenFOAM to study vapor transport in the dog's nose.

75 Bibliography

[1] Settles, G.S., 2005, Sniers: Fluid-Dynamic Sampling for Olfactory Trace Detection in Nature and Homeland Security - The 2004 Freeman Scholar Lecture, J. Fluid. Eng. T. ASME, 127(2), pp. 189-218. [2] Craven, B.A., Neuberger, T., Paterson, E.G., Webb, A.G., Josephson, A.M., Morrison, E.E., Settles, G.S., 2007 Reconstruction and Morphometric Analysis of the Nasal Airway of the Dog (Canis Familiaris) and Implications Regarding Olfactory Airow, The Anatomical Record, 290(11), pp. 1325-1340. [3] White, Frank M., 2003, Fluid Mechanics, McGraw-Hill, Inc., New York. [4] Craven, B.A., 2008, A Fundamental Study of the Anatomy, Aerodynamics, and Transport Phenomena of Canine Olfaction, Ph.D. thesis, The Pennsylvania State University. [5] Craven, B.A., Paterson, E.G., and Settles, G.S., 2009, Development and Verication of a High-Fidelity Computational Fluid Dynamics Model of Canine Nasal Airow, J. of Biomech. Eng. (In Press). [6] Roache, P.J., 1998, Verication and Validation in Computational Science and Engineering, Hermosa Publishers, Albuquerque, New Mexico. [7] Womersley, J.R., 1955, Method for the Calculation of Velocity, Rate of Flow and Viscous Drag in Arteries when the Pressure Gradient is Known, J. Physiol., 127, pp. 553-563. [8] Hale, J.F., McDonald, D.A., Womersley, J.R., 1955, Velocity Proles of Oscillating Arterial Flow, with some Calculations of Viscous Drag and the Reynolds Number, J. Physiol., 128, pp. 629-640. [9] Straatman, A.G., Khayat, R.E., Haj-Qasem, E., Steinman, D.A., 2002, On the Hydrodynamic Stability of Pulsatile Flow in a Plane Channel, Physics of Fluids, 14(6), pp. 1938-1944. [10] Peacock, J., Jones, T., Tock, C., Lutz, R., 1998, The Onset of Turbulence in Physiological Pulsatile Flow in a Straight Pipe, Experiments In Fluids, 24, pp. 1-9. [11] Eckmann, D.M., Grotberg, J.B., 1991, Experiments on Transition to Turbulence in Oscilla- tory Pipe Flow, J. Fluid Mechanics, 222, pp. 329-350. [12] Berger, S.A., Talbot, L., 1983, Flow in Curved Pipes, Ann. Rev. of Fluid Mech., 15, pp. 461-512. [13] Siggers, J.H., Waters, S.L., 2008, Unsteady Flows in Pipes with Finite Curvature, J. Fluid. Mechanics, 600, pp. 133-165. [14] Nishimura, T., 1989, Oscillatory Viscous Flow in Symmetric Wavy-Walled Channels, Chem. Eng. Sci., 10, pp. 2137-2148.

76 [15] Friedman, M.H., O'Brien, V., Ehrlich, L.W., 1975,  Calculations of Pulsatile Flow Through a Branch: Implications for the Hemodynamics of Atherogenesis, Circulation Research, 36, pp. 277-285. [16] O'Brien, V., Ehrlich, L.W., 1977, Simulation of Unsteady Flow at Renal Branches, J. Biome- chanics, 10, pp. 623-631. [17] Bharadvaj, B.K., Mabon, R.F., Giddens, D.P., 1982, Steady Flow in a Model of the Human Carotid Bifurcation. Part I - Flow Visualization, J. Biomechanics, 15(5), pp. 349-362. [18] Bharadvaj, B.K., Mabon, R.F., Giddens, D.P., 1982, Steady Flow in a Model of the Human Carotid Bifurcation. Part II - Laser-Doppler Anemometer Measurements, J. Biomechanics, 15(5), pp. 363-378. [19] Rindt, C.C.M., Van Steenhoven, A.A., Jenssen, J.D., Reneman, R.S., Segal, A., 1990, A Numerical Analysis of Steady Flow in a Three-Dimensional Model of the Carotid Artery Bifurcation, J. Biomechanics, 23(5), pp. 461-473. [20] Ku, D.N., Giddens, D.P., Zarins, C.K., Glagov, S., 1985, Pulsatile Flow and Atherosclerosis in the Human Carotid Bifurcation. Positive Correlation between Plaque Location and Low Oscillating Shear Stress, Arteriosclerosis, 5(3), pp. 293-302. [21] Ku, D.N., Giddens, D.P., 1987, Laser Doppler Anemometer Measurements of Pulsatile Flow in a Model Carotid Bifurcation, J. Biomechanics, 20(4), pp. 407-421. [22] Perktold, K., Resch, M., Peter, R.O., 1991, Three-Dimensional Numerical Analysis of Pul- satile Flow and Wall Shear Stress in the Carotid Artery Bifurcation, J. Biomechanics, 24(6), pp. 409-420. [23] Perktold, K., Peter, R.O., Resch, M., Langs, G., 1991, Pulsatile Non-Newtonian Blood Flow in Three-Dimensional Carotid Bifurcation Models: A Numerical Study of Flow Phenomena Under Dierent Bifurcation Angles, J. Biomed. Eng., 13, pp. 507-515. [24] Yung, C.N., De Witt, K.J., Subramanian, S., Afjeh, A.A., Keith, T.G., 1997, Three- Dimensional Pulsatile Flow through a Bifurcation, Int. J. of Numerical Methods for Heat & Fluid Flow, 7(8), pp. 843-862. [25] Jou, L.D., Berger, S.A., 1998, Numerical Simulation of the Flow in the Carotid Bifurcation, Theoret. Comput. Fluid Dynamics, 10, pp. 239-248. [26] Keyhani, K., Scherer, P.W., Mozell, M.M., 1995, Numerical Simulation of Airow in the Human Nasal Cavity, J. Biomechanical Engineering, 117, pp. 429-441. [27] Horschler, I., Meinke, M., Schroder, W., 2003, Numerical Simulation of the Flow Field in a Model of the Nasal Cavity, Computers & Fluids, 32, p. 39-45. [28] Croce C., Fodil, R., Durand, M., Sbirlea-Apiou, G., Caillibotte, G., Papon, J.F., Blondeau, J.R., Coste, A., Isabey, D., Louis, B., 2006, In Vitro Experiments and Numerical Simulations of Airow in Realistic Nasal Airway Geometry, Annals of Biomedical Engineering, 34(6), pp. 997-1007. [29] Roy, C.J., 2005, Review of Code and Solution Verication Procedures for Computational Simulation, J. of Computational Physics, 205, pp. 131-156. [30] Gokaltun, S., Skudarnov, P.V., Lin, C.X., 2005, Verication and Validation of CFD Sim- ulation of Pulsating Laminar Flow in a Straight Pipe, 17th AIAA Computational Fluid Dynamics Conference 6-9 Toronto, Ontario Canada.

77 [31] Vinchurkar, S., Longest, P.W., 2008, Evaluation of Hexahedral, Prismatic and Hybrid Mesh Styles for Simulating Respiratory Aerosol Dynamics, Computers & Fluids, 37, pp. 317-331. [32] Longest, P.W., Vinchurkar, S., 2007, Eects of Mesh Style and Grid Convergence on Particle Deposition in Bifurcating Airway Models with Comparisons to Experimental Data, Medical Engineering & Physics, 29, pp. 350-366. [33] Prakash, S., Ethier, C.R., 2001 Requirements for Mesh Resolution in 3D Computational Hemodynamics, J. Biomedical Engineering, 123, pp. 134-144. [34] Taylor, C.A., Hughes, T.J.R., Zarins, C.K., 1998, Finite Element Modeling of Blood Flow in Arteries, Comput. Methods Appl. Mech. Engr., 158, pp. 155-196. [35] Taylor, C.A., Vignon, I.E., 2003, Outow Boundary Conditions for One-Dimensional Finite Element Modeling of Blood Flow and Pressure Waves in Arteries, 2004, Wave Motion, 39, pp. 361-374. [36] Zamir, M., 2000, The Physics of Pulsatile Flow, Spring-Verlag New York, Inc., pp. 67-81. [37] Spiegel, M.R., Liu, J., 1999, Schaum's Outlines: Mathematical Handbook of Formulas and Tables, 2nd Edition, McGraw-Hill, Inc., New York. [38] Pointwise, Inc., 2007, Gridgen Version 15 User Manual, Pointwise, Inc.

78