development of a cfd solver for simulating the cavitating ... thesis...occurring during engrid 1.4...

70
Politecnico di Milano Energy Department Master program of Energy Engineering for an Environmentally Sustainably World __________________________________________________________________ Development of a CFD solver for simulating the cavitating nitrogen flow inside a cutting tool in cryogenic turning Master thesis of Behrang Mohajer Matr. 816412 Supervisors: Paolo Albertelli Co-supervisors: Tommaso Lucchini Ehsan Tahmasbi Academic year 2015-16

Upload: haminh

Post on 11-Apr-2018

227 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

Politecnico di Milano

Energy Department

Master program of Energy Engineering for an Environmentally Sustainably World

__________________________________________________________________

Development of a CFD solver for simulating the cavitating nitrogen

flow inside a cutting tool in cryogenic turning

Master thesis of

Behrang Mohajer

Matr. 816412

Supervisors: Paolo Albertelli

Co-supervisors: Tommaso Lucchini

Ehsan Tahmasbi

Academic year 2015-16

Page 2: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

i

Acknowledgment:

The author would like you thank the Internal Combustion Engine group of

Politecnico di Milano for their support and instructions. Especially my CFD

supervisors among these people, Mr. Ehsan Tahmasbi and Professore Lucchini

for their guidance. Besides, I thank my professor, Paolo Albertelli for

providing this opportunity as a common project of the university and Italian

industry.

In the end I thank Politecnico di Milano for providing this opportunity of study

in an international atmosphere.

Spring 2016

Page 3: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

ii

Abstract

Turning is one of the most common processes in manufacturing field. Many efforts has

been done in order to improve the cooling techniques. Titanium alloys, mainly because of

their poor thermal conductivity, need to be cut at relatively low cutting speeds, with

obvious negative consequences on the profitability of machining. Cryogenic cooling,

normally with liquid nitrogen, proved promising results for this issue. Cooling with LN2

has many advantages such as cheap refrigeration, omitting issues related to environmental

contamination of conventional coolants, and prevention of potential oxidation on the

finished surface by removing O2. The present document focuses on CFD analysis of the

cavitating coolant from the reservoir till the beginning of a spray jet through a cutting tool

in MUSP Organization. Modeling the cavitating cryogenic flows have been concern of

different industries. However, there are no specific commercial software for the cryogenic

fluids. Besides, the cryogenic cavitating flow necessitates additional modifications on the

existing solvers of the common fluids according to the condition that are comprehensively

discussed within this study; Slight temperature changes affect and the thermodynamics of

the fluid. Therefore, corresponding physics demand special equations related to the so

called “thermodynamic effects” which are discussed and introduced within the present

thesis. Afterwards, a new OpenFOAM code is developed and introduced.

So far, the published articles considered two approaches for the effect of temperature

changes to the saturation pressure and the other thermodynamic effects. They either

estimated the thermodynamic properties changes proportional to slight temperature

difference of their study scale, or they adjoined a thermodynamic property calculator

software to their main code. On the other hand, in the present study, Schnerr-Sauer mass

transfer correlation based on critical radius cavitation algorithm is utilized in a pimple

algorithm calculating the thermodynamic properties in the range of 65 to 125K for the

nitrogen flow. Considering that the different industrial usage of this substance is about 80-

100K, this code can be widely used in larger scales than this project. Moreover, unlike the

previous corresponding papers, compressibility of the non-saturated phases are well

considered in VOF analysis. Besides, some crucial thermo-properties of the fluid like

specific heat capacity are updated with the temperature changes and applied for the later

equations. Moreover, instead of solving the time-consuming full energy equation, the

simplified non-cavitating version of temperature distributing formula is applied before

each pimple iteration and the latent heat of cavitation is updated by the nominal

temperature drop model. On the other hand, this free solver attached to the open source

frame work, OpenFOAM, can easily be mounted on a USB and run on any machine without

any legal expense or additional software. This combination of formula in the mentioned

algorithm is done for the first time. The request of this study is originated for a lathe

machine of Titanium alloys in Piacenza of the same organization.

Page 4: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

iii

Contents List of symbols and the necessary (equivalent) OpenFOAM built-in variables: .......................................... 1

Scope of the project ...................................................................................................................................... 2

Introduction to the goals and the owning laboratory, Consorzio MUSP ................................................... 2

Geometry ................................................................................................................................................... 8

Introduction and guidelines ......................................................................................................................... 11

Cavitation types ....................................................................................................................................... 12

OpenFoam, and solvers in general .......................................................................................................... 14

Machining ............................................................................................................................................... 15

Physics .................................................................................................................................................... 15

CFD model, explanation of the available options ....................................................................................... 17

Introduction to the mesh utilities ............................................................................................................. 17

BlockMesh .......................................................................................................................................... 18

snappyHexMesh .................................................................................................................................. 18

EnGrid 1.4 ........................................................................................................................................... 19

Solvers chosen ......................................................................................................................................... 21

cavitatingFoam .................................................................................................................................... 22

interPhaseChangeFoam ....................................................................................................................... 25

Developing solver; nitroIPCF (nitroInterPhaseChangeFoam) ............................................................ 28

Mass transfer models............................................................................................................................... 29

Merkle ................................................................................................................................................. 30

Kunz .................................................................................................................................................... 31

Zwart ................................................................................................................................................... 31

Schnerr-Sauer ...................................................................................................................................... 33

Turbulence model.................................................................................................................................... 35

Sample studies and test projects .............................................................................................................. 38

Venturi Ghasemi ................................................................................................................................. 38

Bariş nozzle ......................................................................................................................................... 40

Hord water ........................................................................................................................................... 41

Specifications of the plan, Solver modifications and data approval ........................................................... 41

Literature review and the driving idea .................................................................................................... 43

Page 5: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

iv

Critical Radius Model ............................................................................................................................. 45

Nominal temperature drop model and the energy equation .................................................................... 45

nitroIPCF developments.......................................................................................................................... 47

Developing steps ................................................................................................................................. 47

Numerical setup and description with and the result approval of nitroIPCF ...................................... 49

Conclusion and the later works ............................................................................................................... 53

Bibliography ............................................................................................................................................... 55

Appendix A; nitroIPCF source code for OpenFOAM-2.3.0 ....................................................................... 58

The main code ......................................................................................................................................... 58

The deltaT_star.H file ............................................................................................................................. 61

Page 6: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

1

List of symbols and the necessary (equivalent) OpenFOAM built-in variables:

P Thermodynamic pressure

Rb Bubble radius

Psat , p_sat Saturation

ρ, rho Fluid (mixture) density

ρliq, ρl, rhol Saturated liquid density

ρvap, ρv, rhov Saturated vapor density

α, alpha.vapour Liquid fraction in interPhaseChangeFoam and nitroIPCF source

Codes

γ, (1- α),

alpha.water

Void fraction (Gas Phase Volume Fraction) in the text and

cavitatingFoam source code

x Quality, gas to liquid mass ratio

σ, sigma Cavitation number

σs Surface Tension

N Nucleation number (number of nuclei in the specific volume); an

experimental data in Schnerr-Sauer cavitation model

S Bubble surface

μm, mu Mixture viscosity

μl, mul Saturated liquid viscosity

μv, muv Saturated vapor viscosity

μt Turbulence viscosity

Ψ, psi The compressibility of the mixture equals to reciprocal of the

square of the speed of sound

a speed of sound in the mixture

C2 Prt σk σε Different experimental constant for k-ε turbulence model

R The rate of the phase transport; D(ρα)/Dt = R

n number of bubbles per unit volume of liquid

DT Heat diffusivity of the substance mixture

k Heat conductivity

Cp Specific heat capacity

T Temperature field

Page 7: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

2

Scope of the project

In this chapter some manufacturing key words are used; lathe, which is the turning machine

for cutting the Ti-alloy parts, part or workpiece, which is the portion of the Titanium alloy

under machining, and the tool that means the cutting part of the lathe which holds the blade.

In this project the tool also guides the flow toward the part. The expression spray jet is also

utilized. Therefore, pressurized nitrogen leaving the pipes and injected toward the air

around the tool. A video made by the author is attached to this document explaining the

project.

Introduction to the goals and the owning laboratory, Consorzio MUSP

This model is based on interPhaseChangeFoam that is built-in application provided with

OpenFOAM. In this thesis the liquid nitrogen is modeled for cavitation inside the tool.

Some holes are drilled in order to create paths for LN2.

This thesis is a portion of the main project focusing on LN2 defined inside a manufacturing

laboratory[1] in Piacenza named MUSP. Cavitation inside the carrying tool. Ti6Al4V is

one of the routine alloys which necessitates cryogenic turning. Therefore, the owners of

the project installed a new system to facilitate the present machinery with the cryogenic

cooling.

Figure 1, is taken of the same lab showing the refrigeration system over the manufacturing

part. This complex is installed as an experimental add-on to the lathe machine. Therefore,

it is not well optimized yet. Hence, different models are needed to be provided for this

system to increase the efficiency at an industrial level.

Page 8: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

3

FIGURE 1, MUSP LN2 INJECTOR ON THE LATHE MACHIN

The system consists of different parts:

1. The cryogenic reservoir

2. The transferring pipe

3. The connection part to the tool equipped with the load cells

4. The specific tool for as the flow guide to the spray

5. The spray jets

This project focuses on the tool that is probable part for the cavitation. Since cavitation

affects the cooling spray jets strongly a precise modeling is required. Depart from the inlet

condition of the flow before this tool a solver is developed for the case that accepts any

various inlet conditions for LN2. Hence, even if the fluid is partially evaporated within the

previous parts, the solver is still capable of modeling the fluid till the spray nozzles. A brief

explanation of the whole system is provided at this point.

1. A tank contacting LN2 is placed in the Laboratory as the reservoir. It can provide the

liquid nitrogen flow of 0.93l/min. it is a normal industrial cryogenic reservoir.

2. The transfer pipe is about two meters and well insulated in order to minimize the heat

transfer to the ambient. Figure 2 illustrates this flexible pipe.

Page 9: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

4

FIGURE 2, LN2 TRANSFER PIPE

3. The connection part is a crucial joint since it is responsible for the connection of the

well-insulated transferring pipe to the tools and the load cell bed. The heat transfer is quite

an important issue at this part. Figure 3 shows this part.

Page 10: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

5

FIGURE 3, THE CONNECTION PART RESPONSIBLE FOR LN2 CARRIAGE TO THE TOOL

This figure also shows the brass made pipes, the load cell bed and a valve. This valve is

only open in the beginning of the cryogenic cooled manufacturing to assure a fully

developed temperature profile. The temperature distribution is not fixed during the start-

up. Therefore, a controlling purge is necessary for the vapor. After ensuring the steady

temperature everywhere the optimized machining will be the project case. Hence, the

solver developed within this study runs for the steady state conditions.

4. The specific tool for as the flow guide to the spray is explained in this part. Not only

does this tool holds the cutting blade, but also it is well designed by SANDVIK in order to

let the liquid nitrogen pass.

Page 11: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

6

Figure 4 Indicates the three sprays nozzles (on top and two on the front sides), the cutting

blade (yellow), the jet guide for the top spray (green) which is only a shaped sheet metal

to turn the top flow horizontal, and the overall tool in gray.

FIGURE 4, THE TOOL AND THE INJECTORS

Figure 5 indicates the diagram of the path through the tool. This diagram was made by

SolidWorks 2015 and meshed by enGrid 1.4 provided during this project.

Page 12: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

7

FIGURE 5, THE TOOL DIAGRAM

5. The spray jets are the cooling mechanisms. There are three injectors over the part surface.

The flow passing through the tool finishes at three nozzles. Therefore, the pressurized flow

is released into the air around the workpiece. Figures 6 illustrates the jets.

Page 13: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

8

FIGURE 6, THE TOOL AND THE INJECTORS OF LN2

Geometry

The tool was modeled during this thesis by the author. Figure 7 shows the 3D computer

scheme. As this figure illustrates, the three top paths are guiding the flow toward a single

point where the workpiece is place. The pipe on the bottom is closed by in laboratory. Its

existence is only because of manufacturing techniques for this tool. The part specified with

the red circle is the sensitive part. Two close drills were applied in order to produce this

shape with a very a narrow thickness in the joining part. Therefore, the deformation of this

part is unavoidable here and the real shape is actually unknown. Besides, mesh resolution

issues appear at such part often.

Page 14: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

9

FIGURE 7, TOOL MODELED BY SOLID WORKS BY THE AUTHOR

Figure 8 provides the flow path. The red circle illustrates the primal mesh issues

occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts

FIGURE 8, THE PATH OF LN2

The primary enGrid mesh made by the author is illustrated in figures 9. This mesh is for

the estimated symmetrical path of the LN2.

Page 15: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

10

FIGURE 9, DIFFERENT VIEWS OF THE MESHED TOOL BY THE AUTHOR

Page 16: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

11

Introduction and guidelines

The flow explained in the previous chapter is a large complex issue. However, this project

is involved partially with the whole project. Hence in this chapter, different aspects of the

involving portions are introduced. The first and the most important guideline is the physics

of cavitation in the cryogenic condition of this flow.

Afterwards, more affecting parameters are introduced reaching the motivation of

developing a new solver, nitroIPCF. In the next chapter, the available tools and options for

the same motivations are discussed leaving the choices. However, ideas of the selections

are introduced in the following chapter.

Cavitation is the formation of vapor cavities in a liquid due to pressure drop. Cavitation,

can be an unfavorable effect in many systems. It is defined as a rapid decrease of pressure

resulting in a phase change to vapor from an initially homogeneous liquid. In most cases,

cavitation arises when the liquid is exposed to high velocities, such as in marine propellers,

pumps, hydraulic turbines, injectors, etc. When the vapor bubbles which are formed from

a rapid pressure drop burst, they cause adverse effects to these types of mechanical

systems[2]. Therefore, cavitation plays an important role in the design and operation of

fluid machinery and devices because it causes performance degradation, noise, vibration,

and erosion.

On the other hand, cavitation can be in favor of the designed flow; for instance, in the

combustion engine injectors bobble burst after the nozzle provides the flow with additional

mixing with the air inside the cylinder. However, the injector design must assure that this

phenomenon does occur in the flow after leaving the nozzle body[3]. Moreover, cavitation

is advantageous on flow controller and flow meter as a passive controller; for instance in

many applications it is necessary to deliver a very small specified amount of a liquid flow

rate constantly. In such cases cavitating venturis are able to provide this constant flowrate

with low dependency on the upstream pressure.

Page 17: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

12

Cavitation types

Cavitation can occur in many forms, including bubble, sheet, and vortex cavitation

depending on the flow parameters. Cavitation involves complex phase-change dynamics,

large density ratio between phase, and multiple time scale. These issues pose challenges

with respect to accuracy, stability, efficiency and robustness because of the complex

unsteady interaction associated with cavitation dynamics and turbulence [4].

Different types of cavitation are observed depending on the flow conditions and fluid

properties. Each of them has distinct characteristics as compared to others. Five major types

of cavitation have been described in literature. They are as follows[5]:

1. Traveling cavitation

2. Cloud cavitation

3. Sheet cavitation

4. Super cavitation

5. Vortex cavitation

1. Traveling cavitation is characterized by individual transient cavities or bubbles that form

in the liquid, expand or shrink, and move downstream[6]. Typically, it is observed on

hydrofoils at small angles of attack. Figure 1 (a) illustrates this kind.

2. Cloud cavitation is produced by vortex shedding in the flow field and is associated with

strong vibration, noise, and erosion[7]. A re-entrant jet is usually the causative mechanism

for this type of cavitation. Figure 10 (b).

3. Sheet cavitation

It is also known as fixed, attached cavity, or pocket cavitation. Sheet cavitation is stable in

quasi-steady sense [6]. Though the liquid-vapor interface is dependent on the nature of

flow, the closure region is usually characterized by sharp density gradients and bubble

clusters. Figure 1 (c).

4. Super cavitation can be considered as an extremity of sheet cavitation wherein a

substantial fraction of the body surface is engulfed by the cavity. It is observed in case of

supersonic underwater projectiles, and has interesting implications on viscous drag

reduction[8]. Figure 1 (d).

Page 18: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

13

5. Vortex cavitation is observed in the core of vortices in regions of high shear (Figure 1

(e)). It mainly occurs on the tips of rotating blades and in the separation zone of bluff

bodies[5], [6].

FIGURE 10, DIFFERENT TYPES OF CAVITATION

Page 19: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

14

OpenFoam, and solvers in general

OpenFOAM was chosen because it is an open source powerful CFD engine. Moreover,

ICE group of Politecnico di Milano[9] are currently working on cavitation projects with

this software. The name. OpenFOAM stands for "Open source Field Operation And

Manipulation". It is a C++ toolbox for the development of customized numerical solvers,

and pre-/post-processing utilities for the solution of continuum mechanics problems,

including computational fluid dynamics (CFD). The code is released as free and open

source software under the GNU General Public License. It is managed, maintained and

distributed by The OpenFOAM Foundation, which is supported by voluntary contributors.

The OpenFOAM name is a registered trademark of OpenCFD Ltd. OpenFOAM

(originally, FOAM) was created by Henry Weller from the late 1980s at Imperial College,

London, to develop a more powerful and flexible general simulation platform than the de

facto standard at the time, FORTRAN. This led to the choice of C++ as programming

language, due to its modularity and object oriented features. In 2004, Henry Weller, Chris

Greenshields and Mattijs Janssens founded OpenCFD Ltd to develop and release

OpenFOAM. On 8 August 2011, OpenCFD was acquired by Silicon Graphics International

(SGI). At the same time, the copyright of OpenFOAM was transferred to the OpenFOAM

Foundation, a newly founded, not-for-profit organization that manages OpenFOAM and

distributes it to the general public. On 12 September 2012, the ESI Group announced the

acquisition of OpenCFD Ltd from SGI. In 2014, Weller and Greenshields left ESI Group

and continue the development and management of OpenFOAM, on behalf of the

OpenFOAM Foundation, at CFD Direct[10].

OpenFOAM with the structured library provides different solvers from CFD modeling,

solid stress analysis to financial evaluations.

Although like most of the open source software, OpenFOAM lacks a fancy user interface,

it is a powerful fast engine for CFD analysis. It is rapidly enlarging its own share among

the commercial competitors. Many young engineers and industrial companies are

switching onto it due to the various advantageous it provides. In the next chapters more

details of this software and its capabilities will be introduced. Besides, the specific chosen

Page 20: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

15

solvers and some tips and tricks are provided for the cavitation modeling. There are also

different cases that the writer ran for testing the mesh, solvers, and different physics.

Moreover, similar to any other software these cases provide opportunities for getting

experienced with the atmosphere of study.

Later on, after running of the built-in solvers, the author explains developing a new code

for the specific study of this thesis.

Machining

The use of cryogenic cooling in metal cutting has received renewed recent attention

because liquid nitrogen is a safe, clean, and nontoxic coolant that requires no expensive

disposal and can substantially improve the tool life.[11]

The final goal of this project is defined in LAB MUSP for manufacturing of Ti-alloys in a

lathe machine. The scope of the overall project is explained in the introduction.

The same lathe machine is currently used for the downstream of this project.

Simultaneously, professor Albertelli was working Comparison of Ti6Al4V machining

forces and tool life for cryogenic versus conventional cooling[11].

Physics

Cavitation is practically the evaporation of the liquid due the pressure drop. This

phenomena is explained in the previous parts of the introduction. However, the main

concern of this project is the change in the thermodynamic properties of the fluid such as

the saturation presser. This theory is called “thermodynamic effects”. It plays a crucial role

in cryogenic cavitation unlike water. It can result into earlier or later cavitation of the liquid

depending on the saturation pressure curve versus temperature of the specific liquid. Also

the parameters related to the temperature distribution, like the heat diffusivity, are affecting

this issue. Hord[12] proved this theorem with his experiment. Figure 11 is based on

Hosangadi's[13] model over Hord testing hydrofoil 290C illustrates this fact.

Page 21: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

16

FIGURE 11, VAPOR FRACTION PROVED NUMERICAL STUDY OF HORD EXPERIMENT DONE BY [11]. (A) ISOTHERMAL LN2

(B) LN2 WITH PARTIAL THERMODYNAMIC EFFECT AND (C) WITH FURTHER EFFECTS

Observation of thermodynamic effects due to T decrease inside a cavity region arising from

the latent heat in figure 2 indicates significant variation of thermo-sensible properties such

as the vapor pressure. It can delay or suppress of cavitation.[14]

Page 22: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

17

CFD model, explanation of the available options

In the previous chapter the scope of the project, the physics of the study, and the question

marks of this thesis were explained. I this part all the utilities for these issues are introduced.

However, application of these tools are postponed till chapter 3. In another words, in the

present chapter the options are discussed and the choices are left for later. All the mentioned

utilities were tested by the author both in the training cases and in the solver testing parts.

Introduction to the mesh utilities

Meshing is one of the most important parts of CFD modeling. Sometimes, generating a

mesh takes more time than solving it. A complex geometry like the tool of this project may

take weeks for an experienced engineer to be comprehensively meshed. Moreover,

effectiveness of a mesh cannot be understood unless solving a case that it might take days

for each run itself. Therefore, experience plays a vital role in this part of the project. The

CFD interface evaluate some quantitative result of the mesh like orthogonality, Face

concavity, Face weight and etc. However, they can never substitute a visual survey of the

mesh done by an experienced engineer. It is tried to help this issue in this project according

to the conditions of the case. Hence, a tutorial is attached to this thesis.

Different mesh tools were utilized during the period of working. The OpenFOAM built-in

utilities blockMesh and SnappyHexMesh were used more often. However, enGrid 1.4 [15]

was also tested. Two computers were allocated in the engineering campus of Piacenza for

working on this open source software. enGrid utilizes Netgen algorithm which is the same

basis as snappyHexMesh. However, it is used for unconstructed mesh and complex

geometry. Moreover, it provides a more user friendly interface.

A tutorial of this software were made by the author and is provided for lab MUSP[1] and

ICE group[9] of Politecnico di Milano. These tools were applied on about 20 different CFD

cases that are discussed in this report. The cases are classified with the main geometry; for

instance NACA0015, Hord, Bariş, tool, venturi of Dr. Ghasemi and etc. these geometry

and their origins are discussed in the next chapter. However, the mesh procedure is

explained with the current part. The mesh utilities are:

Page 23: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

18

BlockMesh

This application provides hexahedral mesh cells. OpenFOAM provides it and it can be

controlled by blockMeshDict in the CFD cases. Figures 3 illustrates these cases. Moreover,

this utility is used as the base for snappyHexMesh since it necessities a base to modify.

FIGURE 12, BLOCKMESH UTILITY ON HORD HYDROFOIL 290C

snappyHexMesh

This section describes the mesh generation utility, snappyHexMesh, supplied with

OpenFOAM. The snappyHexMesh utility generates 3-dimensional meshes containing

hexahedra (hex) and split-hexahedra (split-hex) automatically from triangulated surface

geometries, or tri-surfaces, in Stereolithography (STL) or Wave front Object (OBJ) format.

The mesh approximately conforms to the surface by iteratively refining a starting mesh and

morphing the resulting split-hex mesh to the surface. An optional phase will shrink back

the resulting mesh and insert cell layers. The specification of mesh refinement level is very

flexible and the surface handling is robust with a pre-specified final mesh quality. It runs

in parallel with a load balancing step every iteration.[16]

Therefore, a STL file and primary mesh volume are vital. Figures 13 and 14 provided by

ICE group [9] OpenFOAM workshop shows the algorithm of this utility.

Page 24: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

19

FIGURE 13, THE SNAPPYHEXMESH ALGORITHM PROVIDED BY ICE GROUP

FIGURE 14, STL SAMPLE FILE. 290C AIRFOIL FOR MESH TEST IN THIS PROJECT

EnGrid 1.4

EnGrid is an open-source mesh generation software with CFD applications in mind.

EnGrid uses an in-house development for surface meshing and prismatic boundary layers;

a module for hex far-fields will be added in the next release. Tetrahedral parts of the mesh

are created by calling the Netgen library. Bariş [15]. EnGrid provides native export to

OpenFOAM® and since 1.4 for SU2. This includes export capabilities for complete

OpenFOAM cases (including boundary conditions), as well as support for polyhedral cells.

This software needs a considerable experience for engineers. It is highly sensitive to the

geometry. Like most of the open source software the online communities and forum act an

Page 25: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

20

important role for its developments. However, there is still a large capacity to be filled for

enGrid. Hence, the author made a tutorial of this software for POLIMI and the related

organizations. It can be asked of the all owners.

EnGrid has the steps below done by the user:

1. Importing of the 2D file

2. Initial modifications on the settings of enGrid

3. Setting/naming the boundary codes

4. Designing rules for the 2D mesh (most critical step, sizes, sources)

5. 2D mesh creation (how many times)

6. Adding the boundary layer

7. Generation of the volumetric mesh

8. Layering the BC

9. Extrusion

10. Export to OpenFOAM(units)

The green parts of the figures 15 and 16 are corresponding to the 2D mesh as a basis for

the volumetric 3D mesh indicated by red.

Page 26: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

21

FIGURE 15, BARIS NOZLLE MESHED BY ENGRID 1.4

FIGURE 16, PROFESSOR GHASEMI'S VENTURI MESHED BY ENGRID AND EXPORTING ONTO OPENFOAM.

Solvers chosen

OpenFOAM provides many solvers. However, there are two main solvers corresponding

to the goal of this project in OpenFOAM-2.3.0; interPhaseChangeFoam and

cavitatingFoam. The two mentioned ones are able to model a two phase cavitating flow.

The issue of choice is still under discussion among “Foamers”. CavitatingFoam

Page 27: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

22

considering the compressibility of the phases provides a very good stability. However,

modification of the source affects the stability strongly. Moreover, since it is highly

dependent on the constant values of the densities adding the thermodynamic effects gets

more difficult for the programmers. Besides, the Barotropic equation is solved outside the

solver in the source code of the OpenFOAM. Hence, modification is challenging for the

other solvers.

On the other hand, interPhaseChangeFoam provides ease of modification. Most of the

related articles utilized this solver. It offers different transport models and it easily accepts

the energy equation and the thermodynamic effects. However, there is a strong issue on the

stability. The solver is inherently sensitive to the mesh and the initial conditions.

Unfortunately, the situation gets more problematic with the internal flows. This is one of

the reasons that all the solvers were tested on both internal and external flow during this

study. Therefore, it necessitates considerable experience upon OpenFOAM. In the present

study all the cases were firstly run by cavitatingFoam. Then the result were transfer into

interPhaseChangeFoam or nitroIPCF as the initial value for the velocity field.

NitroIPCF is a modified interPhaseChangeFoam with a new internal while loop that solves

for the temperature field and updates all the thermodynamic properties. This solver is

introduced within the next chapter of this document.

Both mentioned solvers are calculate the phase taking care of using a Volume of Fluid

(VOF) approach where the transport equation for the volume fraction γ (or α), is

incorporated into the filtered equations of continuity and momentum.

cavitatingFoam

For internal flows and low quality mesh this solver proved a very good application. Using

PIMPLE algorithm, series of equation are solved as:

while (pimple.loop())

Page 28: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

23

{

#include "rhoEqn.H"

#include "alphavPsi.H"

#include "UEqn.H"

// --- Pressure corrector loop

while (pimple.correct())

{

#include "pEqn.H"

}

if (pimple.turbCorr())

{

turbulence->correct();

}

}

Where

rhoEqn is the relates the density according to the pressure of the previous iteration

through the Barotropic equation and the continuity equation.

alphavPsi calculates α based on the resulting density

UEqn is the momentum equation resulting in the flux.

Finally in the last part an internal updates the pressure for the next iteration.

Therefore, the code converges to the steady state answer of the project.

In OpenFOAM, the Barotropic Equation based Solver (BES) is represented by

cavitatingFoam.

The flow equations along with the mass and momentum equations are,

𝐶𝑜𝑛𝑡𝑖𝑛𝑢𝑖𝑡𝑦: 𝜕𝜌𝑚𝜕𝑡

+ ∇. (𝜌𝑚𝑈) = 0

Page 29: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

24

𝑀𝑜𝑚𝑒𝑛𝑡𝑢𝑚: 𝜕𝜌𝑚𝑈

𝜕𝑡+ ∇. (𝜌𝑚𝑈𝑈) = −∇𝑃 + ∇. [𝜇𝑒𝑓𝑓(∇𝑈 + (∇𝑈)

𝑇]

The essential part of this solver is the density model at the beginning of each iteration of

the main loop[17]:

𝐷𝜌

𝐷𝑡= 𝜓

𝐷𝑃

𝐷𝑡

Where 𝜓 is the compressibility expressed as the reciprocal of the square of the speed of

sound:

𝜓 =1

𝑎2

The thermodynamic properties are evaluated as:

𝛾 =𝜌𝑚 − 𝜌𝑙𝜌𝑣 − 𝜌𝑙

𝜌𝑚 = (1 − 𝛾)𝜌𝑙 + (𝛾𝜓𝑣 + (1 − 𝛾)𝜓𝑙)𝑃𝑠𝑎𝑡 + 𝜓(𝑃 − 𝑃𝑠𝑎𝑡)

𝜓𝑚 = 𝛾𝜓𝑣 + (1 − 𝛾)𝜓𝑙

𝜇𝑚 = 𝛾𝜇𝑣 + (1 − 𝛾)𝜇𝑙

𝜇𝑒𝑓𝑓 = 𝜇 + 𝜇𝑡

Where 𝜇𝑙 , 𝜇𝑣, 𝜓𝑙 , 𝜓𝑣, 𝜌𝑙 , 𝜌𝑣, 𝑎𝑛𝑑 𝑝𝑠𝑎𝑡 are all constant. Therefore, there is no modification

for the thermodynamic effects. This software is used for the fluids like fuels and water that

thermodynamic effects are negligible.

cavitatingFoam provides different models for the sound speed such as Wallis and Chung.

However, in this thesis only the linear formulation was utilized:

𝑎 =1

√𝛾𝜓𝑣 + (1 − 𝛾)𝜓𝑙

Page 30: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

25

interPhaseChangeFoam

Another solver to simulate the cavitation in OpenFOAM is interPhaseChangeFoam. It is a

solver for two incompressible, isothermal immiscible fluids with phase-change (e.g.

cavitation). It uses a VOF (volume of fluid) phase-fraction based interface capturing

approach. The momentum and continuity equations are the same. The fluid properties of

the "mixture" and a single momentum equation is solved. The set of phase-change models

provided are designed to simulate cavitation but other mechanisms of phase-change are

supported within this solver framework. Turbulence modelling is generic, i.e. laminar,

RAS or LES may be selected [18]. This solver shows a very good applications for external

velocity-driven flows.

The value α is defined as the volume fraction of liquid. The solver solves two loops at each

run:

• The α loop (α–loop): based on the given value of α around the mesh, the transport

model is applied, flux is calculated and the solvers evaluates density and viscosity

(two-phase properties) according to:

• After solving the momentum equation the second loop (pressure-loop) is solved. In

the end having P, the iteration goes to the next level and recalculates α

Similar to cavitatingFoam it uses pimple loop:

while (pimple.loop())

{

#include "alphaControls.H"

surfaceScalarField rhoPhi

(

IOobject

(

"rhoPhi",

Page 31: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

26

runTime.timeName(),

mesh

),

mesh,

dimensionedScalar("0", dimMass/dimTime, 0)

);

if (pimple.firstIter() || alphaOuterCorrectors)

{

twoPhaseProperties->correct();

#include "alphaEqnSubCycle.H"

interface.correct();

}

#include "UEqn.H"

// --- Pressure corrector loop

while (pimple.correct())

{

#include "pEqn.H"

}

if (pimple.turbCorr())

{

turbulence->correct();

}

}

Page 32: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

27

Since there is no Barotropic equation, alphaControls using the selected mass

transfer model calculates, α based on the pressure and the continuity equation

rhoPhi defnes the surficial flux for momentum equation in the middle of the loop.

Therefore, it is not dependent on the mass transfer model root files.

alphaEqnSubCycle calculates the VOF density based on α.

Smiliar to cavitatingFoam momentum equation is solved in UEqn and

Pressure gets updated in an internal loop.

In OpenFOAM version 2.3.x, an improved version of VOF technique called the

Compressive Interface Capturing Scheme for Arbitrary Meshes (CICSAM) is

implemented, and used in the interPhaseChangeFoam solver. This is an explicit high

resolution scheme, and can produce interface. In this model, an additional parameter

“interface-compression velocity (Uc)” in the surroundings of the interface is described to

promote the interface resolution by steepening the gradient of the volume fraction function,

which is represented in the transport equation for α as:

𝜕𝛼𝜌𝑙𝜕𝑡

+ ∇. (𝛼𝜌𝑙𝑈) + ∇. [𝛼𝑈𝑐(1 − 𝛼)] = 𝑅𝑐 − 𝑅𝑒

Where Rc and Re denote the rate of mass transfer for condensation and evaporation,

respectively. The term in the square brackets is called artificial compression term. This

term has a non-zero value only at the interface. The artificial compression describes the

shrinkage of the phase-interphase towards a sharper one. This term does not affect the

solution, and only defines the flow of α in the normal direction to the interface.

Analogously the saturated fluid properties are defined as:

𝜌 = 𝛼𝜌𝑙 + (1 − 𝛼)𝜌𝑣

𝜇 = 𝛼𝜇 + (1 − 𝛼)𝜌𝑣

The remaining part of the solver is the transport equation. Technically the value of Rc and

Re. the solver provides different built-in models:

Page 33: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

28

1. Schnerr-Sauer

2. Kunz

3. Merkle

Besides another model is used by the scholars which can easily be added to the solver.

4. Zwart

This modification is one the most powerful features of interPhaseChangeFoam.

A comprehensive explanation of these models are provided in the next part.

It is important for the user that this solver has practical CFD issues that necessitates further

experiences; for instance, negative pressure (even in the OpenFOAM-2.3.0 provided

tutorial), diverging probability, instability and etc. are common issues.

Developing solver; nitroIPCF (nitroInterPhaseChangeFoam)

Since there are no software or solver available for LN2, generating a new one is

unavoidable. Therefore, OpenFOAM was chosen as a free developing platform for this

goal. According to the physics of the project adding the energy equation is unavoidable.

Moreover, unlike interPhaseChangeFoam and cavitatingFoam the specific solver needs to

define a varying saturation pressure field updating via the temperature field. While neither

of this solvers accept a field for pSat. They both define this variable as an overall constant

parameters inside the phase change equations. Unfortunately, cavitatingFoam calls some

root algorithms outside the defining folder, and in the core of OpenFOAM. Hence, many

modifications are necessary. Moreover, these two solvers guaranty the divergence with

their own specified loop. Modification of this algorithm threatens the stability and the

convergence at the same time.

Andersen [19] suggested to add the energy equation between the momentum equation

(UEqn.H) and the pressure loop (PEqn.H) in the interPhaseChangeFoam flow chart.

However, he did not add the temperature change due to the latent heat absorption of the

Page 34: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

29

cavitation.

Zhu[20] solved the complete energy equation (including the latent heat term) after the

momentum equation for cryogenic nitrogen. However, he utilized the ANSYS-RefProp

joint software. Tani[21] and Tairan[14] applied the nominal temperature change ΔT*

instead of the full energy equation for the LN2 models.

In this study, nitroIPCF was developed as the combination of all above studies. The

nomination of this code means it is based on “interPhaseChangeFoam (IPCF)” which

solves only for Nitrogen. The only mass transfer model available is Schnerr-Sauer.

Volumetric fields were defined in createField.H dictionary for all the thermodynamic

properties. They are calculated based on the temperature. Before finding the flux the solver

evaluates the temperature field without the latent heat calculation. Then it updates this field

with the nominal temperature change ΔT*.

The mathematical and physical explanations are available later in chapter 3. Moreover, all

the related parts of this code are attached and mentioned in the appendix.

Mass transfer models

Transport models are generation and dissipation rates of the phase in a VOF solver. They

provide and adjoining equation of state to the momentum and continuity. cavitatingFoam

as mentioned, applies Barotropic equation. However, a variety of models are available for

interPhaseChangeFoam. The Schnerr-Sauer transport equation was applied for developing

the nitroIPCF. In this part four models and the corresponding literature is discussed.

Afterwards, the reason of this choice are explained. There are issues like, simplicity,

stability, and number of experimental variables (only one for Schnerr-Sauer) are discussed

in this part of the thesis. The later one has a considerable importance. For the same reason

Schnerr-Sauer was chosen in the current study. The experimental variables inside the

formulas are not actually constant within the flow. They are dependent on the shape,

cavitation number, Reynolds value and other parameters in practice while all the solvers

neglect it.

Page 35: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

30

This software is capable to model nitrogen flows in the range of 80 to 126K. It updates all

the thermodynamic properties in each iteration based on NIST database[22]. Curve fits

were provided with 5th order polynomials and transferred into nitroIPCF. The solver later

solves the energy equation in loop with ΔT* update for the latent heat. Moreover, it

considers the local saturation pressure change by Singhal[23] formulation. Comprehensive

details of the model and developing tools with the source code are provided in the dedicated

part of the next chapter.

Merkle

Merkle et al. [24] introduced two equations for the phase generation and dissipation of the

mass:

𝑅𝑒 =

𝐶𝑒𝑣𝑎𝑝𝛼𝑡∞

𝑀𝐼𝑁(𝑝 − 𝑝𝑠𝑎𝑡(𝑇), 0)

0.5𝜌𝑙𝑈∞2

𝑅𝑐 =

𝐶𝑐𝑜𝑛𝑑(1 − 𝛼)𝑡∞

𝑀𝐴𝑋(𝑝 − 𝑝𝑠𝑎𝑡(𝑇), 0)

0.5𝜌𝑙𝑈∞2

Where two experimental variables. Uꝏ, Cevap and Ccond additional variables depending on

the experiment and the geometry. Uꝏ is the reference velocity scale and tꝏ is reference

time scale introduced:

𝑡∞ =𝐿𝑐𝑈∞

Where Lc is the characteristic length. Roohi[8] considered it as the diameter of a cavitator.

The equations above are summed in order that they solve the rate of change in the liquid

fraction; for instance, the first one is the condensation rate[8]. It was also well applied for

cryogenic nitrogen cavitation[25]. Tiran et al[14] utilized Merkle model joined with full

energy equation in order to model the LN2 flow over the Hord experiment. They used the

Taylor’s series for Rc and Re. Afterwards, they observed the variation of the first resulting

terms of series on the flow. They suggested

Page 36: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

31

𝐶𝑐𝑜𝑛𝑑 = 3.8

𝐶𝑒𝑣𝑎𝑝 = 20

However, the problem of too many experimental constant exists in this model.

Based on Shi et al. [26]. They also modeled the turbulence effect on the thermodynamic

properties as:

𝑃𝑇 = 0.39𝜌𝑚𝑘

𝑃𝑠𝑎𝑡(𝑇)𝑓𝑖𝑛𝑎𝑙 = 𝑃𝑠𝑎𝑡(𝑇) + 𝑃𝑇

Kunz

Kunz mass transfer model is based on the work by Merkle et al. with a modification that

corresponds to the behavior of a fluid near the transition point. The final form of the model

can be considered as based on fairly intuitive, ad hoc arguments. The destruction of liquid,

or creation of vapor, is modeled to be proportional to the amount by which the pressure is

below the vapor pressure and the destruction of vapor is based on a third order polynomial

function of the volume fraction [20]. This model like Merkle has two experimental constant

variables which is an issue itself. Erney[17] and Kunz[27] utilized this model for evaluation

of different turbulence models on natural and ventilated flows.

Zwart

The cavitation process is modeled as a phase change mass source in the mass conservation

equation and a phase change energy source in the energy conservation equation, together

with a separate volume/mass fraction equation for the vapor phase. Compared to the bubbly

framework deduced from the Rayleigh-Plesset equation. This cavitation model suggested

by Zwart et al.[28] is governed by the following mass transfer equation:

�̇� =

{

−𝐶𝑒𝑣𝑎𝑝

3𝑟𝑛𝑢𝑐(1 − 𝛾)𝜌𝑣𝑅

√2(𝑃𝑠𝑎𝑡 − 𝑃)

3𝜌𝑙 𝑜𝑛𝑙𝑦 𝑤ℎ𝑒𝑛 𝑃 < 𝑃𝑆𝑎𝑡

𝐶𝑐𝑜𝑛𝑑3𝑟𝑛𝑢𝑐𝛾𝜌𝑣

𝑅√2(𝑃𝑠𝑎𝑡 − 𝑃)

3𝜌𝑙 𝑜𝑛𝑙𝑦 𝑤ℎ𝑒𝑛 𝑃 > 𝑃𝑆𝑎𝑡

}

Page 37: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

32

Where rnuc is the nucleation site volume fraction, R is the radius of a nucleation site, and

Cevap and Ccond are two empirical coefficients for the evaporation and condensation

processes, respectively. According to Wart[28], by default, the aforementioned coefficients

are set as: rnuc = 5.0 * 10-4, R = 1.0 * 10-6, Cevap = 50, Ccond = 0.01.

This model was used by Tani[21] for cryogenic LN2. The idea is by Singhal[23]. There

are few observation experiments since a handling of cryogenic fluid is difficult. Hord[12]

and Niiyama[29] visualized cryogenic cavitation, and, according to their results, cryogenic

cavitation seems to be consisted by tiny bubbles. It is necessary to clarify that cryogenic

cavitation is really consisted by bubbles, but, in the present study, it is assumed that

cryogenic cavitation is consisted by a cluster of tiny bubbles.

It is widely known that single bubble motion is governed by the Rayleigh-Plesset equation:

𝑑2𝑅𝑏𝑑𝑡2

+3

2(𝑑𝑅𝑏𝑑𝑡)2

= 𝑃𝑠𝑎𝑡 − 𝑃

𝜌𝑙𝑖𝑞

Usually, time scale of a bubble is much smaller than that of the surrounding fluid, therefore,

the first term is often neglected, and simplified Rayleigh-Plesset equation is widely used

for cavitation model for CFD[21]:

𝑑𝑅𝑏𝑑𝑡

= −𝑠𝑖𝑔𝑛(𝑃 − 𝑃𝑠𝑎𝑡)√2

3

|𝑃 − 𝑃𝑠𝑎𝑡|

𝜌𝑙𝑖𝑞

Relation between void fraction, bubble number density and bubble radius can be described

as follows:

𝛼 = 𝑁4

3𝜋𝑅3

Differentiate the above equation with respect to time ’t’, and using the relation between

bubble surface area and radius, equation (3) can be described into follows:

𝑑𝛼

𝑑𝑡= 𝑁 𝑆

𝑑𝑅𝑏𝑑𝑡

Page 38: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

33

Presently, N is assumed to be constant. Void fraction can also be described by using bubble

surface area and radius.

𝛼 =𝑁

3𝑆𝑅

Mixing the equations above, and omitting N, S and R results in:

𝑑𝛼

𝑑𝑡= −

𝑠𝑖𝑔𝑛(𝑃 − 𝑃𝑠𝑎𝑡)3𝛼

𝑅√23|𝑃 − 𝑃𝑠𝑎𝑡|

𝜌𝑙𝑖𝑞

Considering that at high Reynolds, the surface tension σS is negligible compared to the

shear stress:

𝑅 ∝𝜎𝑆

|𝑃 − 𝑃𝑠𝑎𝑡|∝

1

|𝑃 − 𝑃𝑠𝑎𝑡|

Hence Zwart equation can be reached.

Schnerr-Sauer

This model is based on Rayleigh-Plesset bubble growth equation[30]. It is used for

developing the program of this study; nitroIPCF. The advantage of this model is that it has

only one experiment variable; bubble (nucleate) number per volume. It is widely used for

cavitation. Especially, for the cases with low vapor fractions like the Hord experiment that

is redone numerically in this study. The same model was also used for cryogenic cavitation.

The main disadvantage of the model is that it does not apply the bubble interactions because

it considers them as shears[18]. Hence, not applicable on all types of cavitation but

appropriate for this study.

The vapor mass transport equation is:

𝐷(𝜌𝑣𝛾)

𝐷𝑡=𝑑(𝜌𝑣𝛾)

𝑑𝑥+ ∇. (𝜌𝑣𝛾𝑢) = 𝑅

Where R is the net mass source. According to [31] it can be expressed as:

𝑅 =𝜌𝑣𝜌𝑙𝜌𝑚

𝑑𝛾

𝑑𝑡

Page 39: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

34

Schnerr and Sauer [31] used the following expression to relate the vapor volume fraction

to the number of bubbles per unit volume of liquid (n) :

𝛼𝑣 =𝑛43 𝜋𝑅𝑏

3

1 + 𝑛43 𝜋𝑅𝑏

3

Where Rb is the bubble radius. Combining these equations, one reaches:

𝑅 =3𝛾(1 − 𝛾)

𝑅𝑏

𝜌𝑣𝜌𝑙𝜌𝑚

𝑑𝑅𝑏𝑑𝑡

Assuming that the bubble is spherical and the bubble growth is an inertial-controlled

process, the simplified Rayleigh–Plesset equation is used to account for time evolution rate

of the bubble radius as follows[30]:

𝑑𝑅𝑏𝑑𝑡

= −𝑠𝑖𝑔𝑛(𝑃 − 𝑃𝑠𝑎𝑡)√23|𝑃 − 𝑃𝑠𝑎𝑡|

𝜌𝑙𝑖𝑞

Which is the same as the Zwart model so far except we have Rb on the left side.

Therefore,

𝑃 < 𝑃𝑠𝑎𝑡(𝑇) → 𝑅𝑒 =3𝛾(1 − 𝛾)

𝑅𝑏

𝜌𝑣𝜌𝑙𝜌𝑚

√23(𝑃𝑠𝑎𝑡(𝑇) − 𝑃)

𝜌𝑙𝑖𝑞

𝑃 > 𝑃𝑠𝑎𝑡(𝑇) → 𝑅𝑐 = −3𝛾(1 − 𝛾)

𝑅𝑏

𝜌𝑣𝜌𝑙𝜌𝑚

√23(𝑃 − 𝑃𝑠𝑎𝑡(𝑇))

𝜌𝑙𝑖𝑞

There is no experimental constant except n which is inside Rb:

𝑅𝑏 = (𝛾

1 − 𝛾

3

4𝜋𝑛 )

13

The mass transfer rate in Equations are proportional to γ(1−γ) and approaches zero when

γ= 0 and γ = 1. The only parameter which must be determined in this model is the number

of vapor bubbles per volume of liquid n. OpenFOAM askes only for this value. The default

is 1.6*1013 for water.

Page 40: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

35

Zhu[20] modified this value. He reported that in the case of 290C, we perform simulations

when n fixed at 105, 108, 109 and 1010, respectively. When n exceeds 1010, the simulation

results become unstable and cannot get to convergence. When n equals 1010, the pressure

distribution is obviously away from the experiment. When n is fixed at105, 108, 109, the

pressure and temperature distributions along the hydrofoil wall are all well consistent with

the experimental data. The present study utilized n = 107. After testing different numbers

in the range of 105 to 1015 were tested. The difference is only in the stability and

convergence rate.

𝑃𝑇 = 0.39𝜌𝑚𝑘

Peters[32] also suggest the same formulation for cavitation utilizing Schnerr-Sauer as it

was done in the present study.

Turbulence model

Different turbulence models are available within OpenFOAM. Almost all the turbulence

models add two or three correlations by means of two transport equations (PDEs). In this

study k-ω SST used based on Roohi’s[8] suggestion for interPhaseChangeFoam. This

model is the modified version of classic k-ε model. k-ω SST model blends the accurate

formulation of the k-ω model in the near-wall region and the k-ε model at the far field.

Page 41: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

36

Where the new variables are related to this specific model and experimentally found as:

OpenFOAM solves these equation separately to the main loop. Then it provides the result

in the main momentum equation called UEqn.H:

𝜕(𝜌𝑚𝑢𝑖)

𝜕𝑡+𝜕(𝜌𝑚𝑢𝑖𝑢𝑗)

𝜕𝑥𝑗= −

𝜕(𝑃)

𝜕𝑥𝑖+𝜕

𝜕𝑥[(𝜇𝑚 + 𝜇𝑇) (

𝜕𝑢𝑖𝜕𝑥𝑗

+𝜕𝑢𝑗

𝜕𝑥𝑖−2

3

𝜕𝑢𝑘𝜕𝑥𝑘

𝛿𝑖𝑗)]

Which in the solver it is inside a header file called UEqn.H:

(

fvm::ddt(rho, U)

+ fvm::div(rhoPhi, U)

- fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), U)

+ turbulence->divDevRhoReff(rho, U)

);

Zhang[33] used realized k-ε model which is the same with some modifications near the

walls for LN2 with Zwart model. Tani[21] using k-ε turbulence equations, successfully

modeled the same Hord experiment as Zhang. Tairan[14] in his analysis over LN2 applied

The k–ω SST (Shear Stress Transport) turbulence model is used in simulating the cavitating

Page 42: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

37

flows, which combines the advantages of the original k– ε and k– ω models by applying

the k– ω model near the wall, and the k– ε model away from the wall. However, considering

the computational cost of the new k–ω SST model, it was still used in this thesis as Roohi[8]

did and suggested so in 2015 for the same goal. Moreover, k-ω and k-ε were also utilized

for test cases. Although these models have lower computational cost in each iteration, they

prolong the convergence. Therefore, they need more time in practice.

For the k-ω model the system of sequential equations below were utilized. The numbers

are relate to the venturi of Ghasemi[34] in the next part of this chapter.

𝐿𝑐ℎ𝑎𝑟 = 𝐷𝑡ℎ𝑟𝑜𝑎𝑡 = 0.005

𝑅𝑒 =𝜌𝑙𝑉𝑖𝑛𝑙𝑒𝑡𝐷𝑡ℎ𝑟𝑜𝑎𝑡

𝜇𝑙𝑖𝑞=

4�̇�

𝜋𝐷𝑡ℎ𝑟𝑜𝑎𝑡𝜈𝑙𝑖𝑞

the 2nd experiment of [34] , the one with mass flow 0.7kg/s was chosen to be modeled. The

data are:

𝑅𝑒 = 4 ×0.7

𝑝𝑖 × 0.005 × 9𝑒 − 7= 1.9806𝑒8

The turbulent intensity is

𝐼 = 0.16 𝑅𝑒−18 = 0.014689952

Therefore, low intensity. Afterwards,

𝑘 =3

2𝑈∞𝐼

2

With Uꝏ about 8m/s, k is calculated in the inlet

k = 0.00259

Hence,

𝜖 =√𝑘

𝐼= 0.1763

Page 43: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

38

In the rest of the geometry, k and ω are calculated by OpenFOAM itself.

It noticeable that this value is very important. Wrong ones will result in fluctuations of

interPhaseChangeFoam result instead of converging!

Sample studies and test projects

Modeling a flow with OpenFOAM needs time and experience. Smaller project were done

in order to update the built-in interPhaseChangeFoam gradually to nitroIPCF. At the same

time the chance of gaining more experience was available. Each of these cases is actually

a small part of the thesis project. Hence, solver choice, mesh tool, cavitation model,

Numerical issues, and practical decisions were decided during a long period of time and

running over about 30 cases of OpenFOAM projects. These cases vary by geometry,

OpenFOAM solver, Fluid, mesh utility, turbulence, mass transfer model, and pressure-

driven or velocity-driven.

The figures 12 to 16 of the previous part also illustrate the sample studies by the author.

Venturi Ghasemi

Dr. Ghasemi in [34] introduces the venturi theory; decreasing the downstream pressure of

a venturi while keeping everything else constant results in higher cavitation. Therefore,

more vapor passes through the venturi with lower density. At a certain point this decrease

of density results in constant mass flow rate. He discovers this phenomena by experiment.

His test was redone by the author with different solvers and mesh formats. The results

match with the one of Dr. Ghasemi. He measures the mass flow rate hence was done so in

this thesis. BlockMesh was used and the effect of a dummy mass in the outlet was observed.

Such a dummy geometry is very useful in high pressure cases in order to maintain the

stability of the iterations.

Figures 17 to 19 illustrate the results and the schemes:

Page 44: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

39

FIGURE 17, PROFESSOR GHASEMI VENTURI

FIGURE 18, THE MASS FLOW CONVERGENCE IN INLET AND OUTLET OF GHASEMI VENTURI

FIGURE 19, RESULTS OF REMODELING GHASEMI VENTURI BY THE AUTHOR OF THE PRESENT THESIS

Page 45: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

40

Dummy outlet was utilized for this venturi. However, it did not help to the convergence.

Hence, it was decided to remove it.

Bariş nozzle

Bariş BİÇER shared his experiment with OpenFOAM on the web in [18]. Moreover, a

personal communication with him was done in order to introduce the code.

Cavitation is a crucial phenomenon in diesel injectors. However, visualizing the small

conical injectors is not practically possible. Therefore, a general nozzle with squared cross

section is utilized for testing the software. This small transparent nozzle provides the

visually on the internal flow. Hence, it can be a good proof for the modeling solvers. Bariş

applies both cavitatingFoam and interPhaseChangeFoam with Kunz mass transfer model.

Afterwards, he compares the experiment and the CFD analysis so as the author of the

present document did. Bariş published his report[18] later and his proved tutorial was the

used as the correct result.

blockMesh and enGrid 1.4 were utilized.

FIGURE 20, (A) TO (D) THE APPROVED RESULT BY BARIŞ

Page 46: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

41

The author remodel this case in order to prove his cavitation’s model with water.

FIGURE 21, BARIŞ NOZZLE REMODELING BY THE AUTHOR. THE RESULTS ARE SHOWN IN DIFFERENT TIME STEPS

Hord water

The main geometry to test the resulting solver of this project is Hord[12] cryogenic test

on LN2. Firstly this case was tested on water.

Specifications of the plan, Solver modifications and data approval

So far the available tools according to the condition were explained. Moreover, the whole

project and what the writer did for it was presented. However, in this chapter the new part

of this science done by the author is presented. It is mentioned why and how the author

decided to develop a new model for the goal. Afterwards, the experimental data are

compared and the results are presented for more discussion and the later works. The rest of

the whole project is left outside of the scope of this thesis.

In this chapter the literature review over cavitation, the mathematical models, and

cryogenic fluid computational history is discussed. Afterwards, the author utilizes these

Page 47: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

42

schemes on simple geometries in order to test and prepare the solvers. In the end the final

provided solver is applied on the Hord[12] geometry. Figures 22 and 23 illustrate this

geometry. These schemes are provided by Hosangadi[35] after a personal communication.

FIGURE 22, 290C HYDRO FOIL EXPERIMENTED BY HORD

FIGURE 23, THE CRYOGENIC TUNNEL FOR TESTING 290C HYDROFOIL BY HORD. THIS SLIDE IS MADE BY HOSANGADI[13]

RECEIVED AFTER A PERSONAL COMMUNICATION

Page 48: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

43

Literature review and the driving idea

The Hord group from NASA [12] has performed subscale tests of cavitation in cryogenic

fluids (liquid nitrogen and liquid hydrogen) which is the main base of all the later

validations in a transparent plastic blow-down tunnel. The hydrofoil and ogive were placed

in the center of the tunnels respectively. And several pressure transducers and thermal

couples were mounted along their walls. The other available published data are mainly

numerical modeling of the flow over the same case.

Zhang et al.[33] using Gaspak 3.2 coupled with the thermodynamic data applied the Zwart

model and successfully modeled Hord experiment. Tani et al. [21] using Critical Radius

Model introduced the nominal temperature drop ΔT* to approximate the changes in the

thermodynamic properties. Therefore, utilizing FLUENT6.3.26 providing a SIMPLE

algorithm with Zwart mass transfer equation, they successfully modeled the water flow

over on NACA0015, thermodynamics of LN2 toward a spherical headform, Hord

hydrofoil, Laval nozzle and the computational inducer of a turbopump. However, they

showed that their model is not well applicable on a square headform. Moreover, they

utilized the constant variable G multiplying to ΔT* in order to find Psat. while I the present

study the model uses the 5th-order curve fit function Psat(T) to find the saturation pressure

for the temperature range of 80-126K. Tairan et al. [14] using the same nominal

temperature drop provided with Merkle algorithm successfully modeled Hord experiment.

The same assumption of k-ε turbulence model, no sleep boundary condition, and 2D flow

as Tairan was applied in the present study. Zhu et al. [20] extended the Schnerr-Sauer

transport equation coupled with full Energy equation instead of ΔT* and successfully

modeled the Hord hydrofoil experiment. They used the Taylor’s series for Rc and Re.

Afterwards, they observed the variation of the first resulting terms of series on the flow.

They also suggested

Page 49: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

44

𝐶𝑐𝑜𝑛𝑑 = 3.8

𝐶𝑒𝑣𝑎𝑝 = 20

For the experimental constants of the Merkle formula. They utilized the standard κ-ε

model for the turbulence with the same values as Zhang [33]:

𝜇𝑡 =𝜌𝑚𝐶𝜇𝑘

2

𝜖 𝐶2 = 1.9 Pr

𝑡= 0.85 𝜎𝑘 = 1.0 𝜎𝜖 = 1.2

The same values and model is utilized in this thesis as the newest tested one while also

Sierra[36] suggest this model as one of the best for pressurized flows. Zhu developed the

solver with Ansys-Fluent Commercial code (release 14.5) coupled with RefProp v7.0.

Roohi et al. [8] compared different turbulent models and on Zwart, Merkel, and Schnerr-

Sauer models with OpenFOAM and showed that the k-ε is a good enough as the other

newer models. Moreover, Zhu and Zhang showed the same functionality on cryogenic

LN2. The other reasons of this choice are previously mentioned in the Turbulence model

part of chapter 2.

It is noted that for steady flow computations, the pressure– density coupling scheme only

affects the convergence path and the final solution is independent of the choice because of

the nature of pressure-correlation [20], [37]The conclusions are verified that the

calculations for quasi-steady cavitation based on the incompressible fluids for both liquid

and gas phase obtained the quite accordant results with the experimental data [37]and the

compressible calculations. Therefore, compressibility of either liquid or gas is neglected

and the pressure correlation is easily converted to:

∇. 𝑢 = (1

𝜌𝑙−1

𝜌𝑣) �̇�

or as in OpenFOAM notation:

𝑣𝐷𝑜𝑡𝐴𝑙𝑝ℎ𝑎𝐿 = 𝑚𝐷𝑜𝑡𝐴𝑙𝑝ℎ𝑎𝐿 (1

𝜌𝑙− 𝛼 (

1

𝜌𝑙−1

𝜌𝑣))

Page 50: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

45

This assumption has been applied in all the mentioned solvers and majority of the literature.

Hence, the same idea is used in the present study. In another words, the built-in assumptions

of OpenFOAM solvers remained unchanged about the compressibility.

Critical Radius Model

Derivation of model is described in chapter 2, the part dedicated to Zwart model. It is

originally introduced by Singhal, et al.[23]. However, in the present study nitroIPCF

switches the transport equation onto Schnerr-Sauer model:

𝐷𝛾

𝐷𝑡= 𝑠𝑖𝑔𝑛 (𝑃𝑠𝑎𝑡 − 𝑃)

3𝛾(1 − 𝛾)

𝑅𝑏

𝜌𝑣𝜌𝑙𝜌𝑚

√23|(𝑃𝑠𝑎𝑡(𝑇) − 𝑃)|

𝜌𝑙𝑖𝑞

Where inside Rb is the bubble radius evaluating through

𝑅𝑏 = (𝛾

1 − 𝛾

3

4𝜋𝑛 )

13

With the experimental variable of bubble nucleation point number per volume, n.

This model is provided in the recent versions of OpenFOAM. However, there is no

availability of adding the thermodynamic effects. Unfortunately, the corresponding solver,

interPhaseChangeFoam, is not adoptable for the cryogenic condition at all. Hence, adding

the later modifications of nitroIPCF developments parts had to be done in order not to

exacerbate the divergence of the code.

Nominal temperature drop model and the energy equation

Energy equation needs to be added considering all the acting parameters such as heat

transfer through the walls, the evaporation heat absorption, the change of latent heat value

due to the temperature field and etc. OpenFOAM is adoptable with boundary conditions

after definition of the new field, temperature or T in the code.

The simplified non-evaporating heat equation is:

𝜕𝑇

𝜕𝑡+ ∇. 𝜑𝑇 = ∇ . (𝐷𝑇 ∇𝑇)

Page 51: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

46

Where φ is the fluid flux and DT is the heat diffusivity defined as:

𝐷𝑇 =𝑘

𝜌𝐶𝑝

With k the heat conductivity and Cp the specific heat value of the mixture. Theoretically,

both values must be calculated as the VOF numbers like the density ( 𝜌 = 𝛼𝜌𝑙 +

(1 − 𝛼)𝜌𝑣 ). However, since the variation of k and Cp is not so high. An estimated

formulation was applied with constant values for kl, kv, Cpl and Cpv:

𝐷𝑇 =𝑘𝑙𝐶𝑝𝑙 + (1 − 𝛼) × (𝑘𝑣𝐶𝑝𝑣 − 𝑘𝑙𝐶𝑝𝑙)

𝜌

The examination of this model shows that this estimation is precise enough for the

convergence of the model. However, in order to decrease the error slightly, ρ and ρ are

updated just before the calculation of these formulation based on a curve-fit. Therefore, in

each iteration all the varying thermodynamic variables are calculated two times:

In the beginning

After the consequential calculations of phase change and the temperature field; in

another words before the momentum equation inside the main loop.

The formulation of the equation above is as available in the corresponding part of appendix

A.

Tani [21] used the critical radius model with the nominal temperature drop instead of the

full energy equation, the author did not add the latent heat term to the energy. Instead the

final temperature of the simple energy equation is updated with:

∆𝑇∗ =𝜌𝑙𝑖𝐿

𝜌𝑣𝑎𝑝𝐶𝑙𝑖𝑞

Tani introduces B factor the same as Utturkar[38]:

𝐵 =𝛼

1 − 𝛼

Tairan evaluates this factor about 2 around the cavitation points. However, Tani continues

with the same equation as:

Page 52: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

47

∆𝑃𝑆𝑎𝑡 = −𝛼

1 − 𝛼

𝜌𝑙𝑖𝐿

𝜌𝑣𝑎𝑝𝐶𝑙𝑖𝑞 𝐺𝑠𝑎𝑡

Where Gsat is a constant transferring ΔT into ΔPsat. Unlike him, the author updates the

saturation pressure based on the 5th order curve-fit to the nitrogen properties provided by

NIST.gov [22]:

Therefore, the solver will be available for later usages in the temperature range of 65 to

125K regarding that 126.19K is the critical point of nitrogen.

Moreover, there is no need to adjoin OpenFOAM to any other software like RefProp like

what Zhu did. Hence, not only is this code faster, but also anyone can compile this code on

his machine in a few minutes.

Development of the new solver

This chapter is the final result of all the previous parts. The solver appropriate to the project

and the experience of the author is developed. The developing procedures are mentioned

in this part. Later the Hord[12] case undergoes a run with this new solver and the results

are compared with the real experiment.

Developing steps

The whole project in the manufacturing lab of MUSB organization is beyond the scope of

this project. However, a CFD solver is provided during this study for the flow before the

spray; the spray jest demand further analysis based on the corresponding physics of sudden

pressure-temperature change beyond the critical point of nitrogen.

A new solver for modeling for modeling the cavitating cryogenic flow is needed. The basis

of this code is interPhaseChangeFoam. Using the critical radius model for calculating the

mass transfer model between phases. Schnerr-Sauer model is selected in order to evaluate

the evaporation and condensation rates. Since the solver is defined in OpenFOAM interface

the choice of any boundary condition and any turbulence model will be possible for later

works. The temperature distribution equation is added to the solver according to the

nominal temperature drop model. Besides new volumetric fields are defined.

Page 53: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

48

In the file createFields.H new fields were defined:

pSat the saturation pressure function of the temperature

deltaHEvap the change in the enthalpy of the evaporation as a function of the

temperature

deltaRho1 the change in the saturated liquid density as a function of the temperature

deltaRho2 the change in the saturated vapor density as a function of the temperature

deltaCpl the change in the specific heat capacity of the saturated liquid as a

function of the temperature

T The temperature

deltaT The nominal temperature drop due to the latent heat

DT

Thermal diffusivity DT = k/(ρ ΔH_evap)

Some constant variables were added in transportPropertiesDict to be looked up; for

instance, HEvap, cpScalar, and klcpl as futher input data. The present study utilized n=107

for the bubble nucleation number of Schnerr-Sauer model. nitroIPCF is a mixture of all

these models and is presented for the first time with such model. Appendix A explains how

all these models are applied on the body of the built-in solver. It is provided for the

programmer user. However, figure 24 illustrates the algorithm.

Pimple loop

Start with Input data; mesh,

boundary conditions, inlet

temperature …

Calculating PSat, DT , ρl, ρv, Cpl, ΔHevap

based on the temperature.

Calculating the phase change rate and

therefore α field based on the Pressure

field

Calculating the temperature field based

on the new α and VOF results via the

non-evaporating energy equation.

Updating the temperature field with

summing the temperature change

based on the nominal temperature

drop

Updating the important thermodynamic

properties; PSat, DT , ρl, ρv, Cpl, ΔHevap

based on the temperature

Solving the

momentum equation

on VOF flow.

Updating the pressure

field based on the

new flux and α in an

internal loop

Stop in the end time;

convergence

FIGURE 24, THE CODE FLOW CHART

Page 54: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

49

The assumption are:

The change in other thermodynamic properties, such as kl, kv, μl , μv and Cpv (not

Cpl) is negligible.

The curve fits are made by MS Excel maximum 6th order polynomial 12 decimal

digits.

The saturation pressure only changes by temperature and turbulence

The rest of varying thermodynamic properties (DT , ρl, ρv, Cpl, and ΔHevap ) only depend

on the temperature.

Instead solving the full pressure equation, the same as incompressible one of

interPhaseChangeFoam is still utilized. However, the saturation density values are

updated all around the geometry based on the temperature:

𝑣𝐷𝑜𝑡𝐴𝑙𝑝ℎ𝑎𝐿 = 𝑚𝐷𝑜𝑡𝐴𝑙𝑝ℎ𝑎𝐿 (1

𝜌𝑙− 𝛼 (

1

𝜌𝑙−1

𝜌𝑣))

As a proof to this study and the generating code, nitroIPCF, Hord[12] experiment and the

CFD data of that by Hosangadi[39] will be compared. It is noticeable that there is no study

on the cryogenic cavitating flows without comparing its results with Hord experiment.

Hence, the same procedure is done in the present study.

Numerical setup and description with and the result approval of nitroIPCF

The Hord experiment was redone by OpenFOAM and via the new solver nitroIPCF. The

results show good consistency with the experiment. The condition is the same as Hord:

Cavitation number:

𝜎 =𝑃𝑜𝑢𝑡𝑙𝑒𝑡 − 𝑃𝑠𝑎𝑡12𝜌𝑙𝑈∞

2= 1.7

𝑅𝑒 = 9.1 × 106

𝑇𝑖𝑛𝑙𝑒𝑡 = 83.06𝐾

Page 55: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

50

The geometry based on figure 3 was made by both blockMesh and snappyHexMesh

utilities. The same figure shows the scheme. The mesh of 28,000 cells providing the same

y+ as Tairan was used:

𝑦+ =𝑦𝑈𝑡𝑈∞

< 100

Where y is the thickness of the first cell from the foil surface, and Ut is the wall frictional

velocity. No slip boundary condition was applied on the walls. The empty boundary

condition was also used on the sides in order to provide a 2D analysis.

The cavitation shape by Hord is provided in figure 24.

FIGURE 25, THE CAVITATION SHAPE BY HORD

Moreover, the Tairan provides a better scheme on the same experiment as figures 25 and

26:

Page 56: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

51

FIGURE 26, TAIRAN APPROVED RESULTS OVER HORD EXPERIMENT

FIGURE 27, THE CORRESPONDING QUANTITATIVE RESULT OF TAIRAN ON HORD EXPERIMENT.

The results of nitroIPCF showed good coherence with the approved ones above. They are

shown in figure 27:

FIGURE 28, PARTIAL RESULTS OF NITROIPCF ON HORD EXPERIMENT AS THE PROOF

Page 57: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

52

The flow is pressure driven. The calculated velocity profile as figure 27, resulted in the

average speed of 21.5m/s in the inlet. However, this number with Tairan is 23.9m/s which

indicates an error of 12%.

Also the convergence of the mass flow was investigated over time in figure 28:

FIGURE 29, MASS FLOW RATE IN THE INLET AND THE OUTLET OF THE MODEL. PROVING THE CONVERGENCE

However, the temperature distribution slightly differs with Tairan’s[14] article:

FIGURE 30, TEMPERATURE DISTRIBUTION CALCULATED BY THE AUTHOR

Page 58: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

53

This issue results in different saturation pressure field and therefore, different shape of

cavitation.

Tairan did not observe any temperature more than 1.52K. That means the error of:

𝑒𝑟𝑟𝑜𝑟 = |𝑚𝑎𝑥𝑖𝑚𝑢𝑚 𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 𝑜𝑓 83.06𝐾| − ∆𝑇𝑇𝑎𝑖𝑟𝑎𝑛 𝑜𝑏𝑠𝑒𝑟𝑣𝑒𝑑

𝑚𝑎𝑥

∆𝑇𝑇𝑎𝑖𝑟𝑎𝑛 𝑜𝑏𝑠𝑒𝑟𝑣𝑒𝑑𝑚𝑎𝑥 =

|85.7 − 83.06| − 1.52

1.52

= 16%

Conclusion and the later works

The result of nitroIPCF shows good coherence. Combination of the critical radius model

based on Rayleigh-Plesset equation for spherical bubbles with the nominal temperature

model is successful as the other previous methods such as:

Merkle or Kunz mass transfer joined with full energy equation

Zwart mass transfer joint with nominal temperature drop and refprop

The extension of Schnerr-Sauer model with the full energy equation.

Besides, the benefits of:

It has less equations to solve

All the codes are open source

Higher temperature range

It can be provided in a USB key for any machine

The results of the model are proven to be acceptable. nitroIPCF also provides all the

thermodynamic variations beside the temperature as resulting graphs since all the variables

are defined as volumetric fields. The issues of stability and sensitivity to the mesh are the

main concerns that needs almost professional engineers who are well experiences with

CFD knowledge. However, further evaluations on different cases are needed. It was proven

that nitroIPCF can provide the industrial needs. This solver, as mentioned in scope of the

project, is provided for a larger project with a bigger scope. Hence, later on, this proven

Page 59: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

54

solver will be applied on a specific geometry. The CAD of this geometry and the primary

mesh scheme is provided by the author for the later works. However, continuing the rest

of the whole project is beyond the scope of this master thesis. Therefore, it is left for later

studies. This solver is defined as a bridge of the required CFD knowledge for the

manufacturing project. Following steps of the later works will be:

Calculating the flow with this solver in the transfer pipe.

Providing a mesh for the tool and utilizing the solver for this mesh. Afterwards,

saving the flow parameters in the outlets; this part may take months

Loading the saved data for another CFD utility modeling the spray jets over the

turning workpiece.

Calculating the effect of the cryogenic coolant over the workpiece.

Page 60: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

55

Bibliography

[1] “Musp - Macchine Utensili e Sistemi di Produzione.” .

[2] R. W. Erney, “VERIFICATION AND VALIDATION OF SINGLE PHASE AND

CAVITATING by,” 2008.

[3] G. Ferrari, INTERNAL COMBUSTION ENGINES. .

[4] B. Huang, G. Y. Wang, and H. T. Yuan, “A cavitation model for cavtating flow

simulations,” J. Hydrodyn., vol. 22, no. 5 SUPPL. 1, pp. 756–762, 2010.

[5] Y. Utturkar, S. Thakur, and W. Shyy, “Computational Modeling of

Thermodynamic Effects in Cryogenic Cavitation,” pp. 1–15, 2005.

[6] R. T. Knapp, “Recent Investigations of the Mechanics of Cavitation and Cavitation

Damage,” Trans. ASME, vol. 77, pp. 1045–1054, 1955.

[7] A. Gnanaskandan and K. Mahesh, “Large Eddy Simulation of the transition from

sheet to cloud cavitation over a wedge,” Int. J. Multiph. Flow, vol. 83, pp. 86–102,

2016.

[8] E. Roohi, M. R. Pendar, and A. Rahimi, “Simulation of three-dimensional

cavitation behind a disk using various turbulence and mass transfer models,” Appl.

Math. Model., vol. 40, no. 1, pp. 542–564, 2016.

[9] ICE, “ICE group polimi.” [Online]. Available: http://www.engines.polimi.it/.

[10] “OpenFOAM - Wikipedia, the free encyclopedia.” [Online]. Available:

http://en.wikipedia.org/wiki/OpenFOAM.

[11] M. Strano, E. Chiappini, S. Tirelli, P. Albertelli, and M. Monno, “Comparison of

Ti6Al4V machining forces and tool life for cryogenic versus conventional

cooling,” Proc. Inst. Mech. Eng. Part B J. Eng. Manuf., vol. 227, no. 9, pp. 1403–

1408, 2013.

[12] Hord and J., “Cavitation in Liquid Cryogens II Hydrofoil,” NASA CR2156, 1973.

[13] A. Hosangadi, R. J. Ungewitteif, F. Technology, and P. Scientist, “Simulations of

Cavitating Cryogenic Inducers,” AIAA J., pp. 1–11, 2004.

[14] T. Chen, G. Wang, B. Huang, and K. Wang, “Numerical study of thermodynamic

effects on liquid nitrogen cavitating flows,” Cryogenics (Guildf)., vol. 70, pp. 21–

27, 2015.

[15] EnGits, “enGrid 1.4.” [Online]. Available: http://engits.eu/en/engrid.

[16] OpenFOAM.org, “snappyhexmesh user Guide.” [Online]. Available:

http://cfd.direct/openfoam/user-guide/snappyhexmesh/.

[17] R. W. Erney and S. Engineering, “Turbulence modelling of cavitating flows in

cryogenic turbopumps Karthik Venkatesh Mani,” 2008.

[18] B. Bicer, “Implementation of Transport Model into CavitatingFoam to simulate the

Cavitation in Diesel Injector Nozzle,” Msc Rep., pp. 1–31, 2014.

[19] M. Andersen, “interphaseChangeFoam tutorial,” Report, p. 18, 2011.

[20] J. Zhu, Y. Chen, D. Zhao, and X. Zhang, “Extension of the Schnerr-Sauer model

for cryogenic cavitation,” Eur. J. Mech. B/Fluids, vol. 52, pp. 1–10, 2015.

[21] Naoki Tani and SHin-ichi TSUDA and Nobuhiro YAMANISHI and Yoshiki

YOSHIDA, “Development and Validation of New Cryogenic Cavitation Model for

Rocket Turbopump Inducer,” Proceeding 7th Int. Symp. Cavitation, no. 63, 2009.

Page 61: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

56

[22] A. Span, R.; Lemmon, E.W.; Jacobsen, R.T.; Wagner, W.; Yokozeki, “Saturation

Properties for Methane,” 2000. [Online]. Available:

http://webbook.nist.gov/cgi/fluid.cgi?PLow=1&PHigh=11&PInc=0.1&Applet=on

&Digits=5&ID=C74828&Action=Load&Type=SatT&TUnit=K&PUnit=bar&DUn

it=kg/m3&HUnit=kJ/kg&WUnit=m/s&VisUnit=uPa*s&STUnit=N/m&RefState=

DEF.

[23] M. M. Athavale, H. Y. Li, Y. Jiang, and A. K. Singhal, “Applications of the Full

Cavitation Model to Pumps and Inducers,” Int. J. Rotating Mach., vol. 8, no. 1, pp.

45–56, 2002.

[24] B. P. Merkle CL, Feng J, “Computational modeling of dynamics of sheet

cavitation.,” 3rd Int. Symp. cavitation (Cav1998), 1998.

[25] N. X. Lu, “Solve Cavitating flow around a 2D hydrofoil using a user modified

version of interPhaseChangeFoam,” Tutorial, SE, vol. 412, p. 96, 2008.

[26] W. G. Shi S, “Thermal effects on cryogenic cavitating flows around an

axisymmetric ogive.,” 2010.

[27] R. F. Kunz, D. A. Boger, T. S. Chyczewski, D. R. Stinebring, H. J. Gibeling, and

T. R. Govindan, “Multi-Phase Cfd Analysis of Natural and Ventilated Cavitation

About Submerged Bodies,” FEDSM ‘99 1999 ASME/JSME Jt. Fluids Eng. Conf.,

no. July, pp. 1–9, 1999.

[28] P. Zwart, A. Gerber, and T. Belamri, “A two-phase flow model for predicting

cavitation dynamics,” Fifth Int. Conf. Multiph. Flow, Yokohama, Japan, May 30 -

June 3, no. 152, 2004.

[29] K. Niiyama, “Study on Cavitation Instability in Subcooled Liquid Nitrogen Nozzle

Flows,” Tohoku University, 2008.

[30] S. Shi, G. Wang, and C. Hu, “A Rayleigh-Plesset based transport model for

cryogenic fluid cavitating flow computations,” Sci. China Physics, Mech. Astron.,

vol. 57, no. 4, pp. 764–773, 2014.

[31] W. Yuan, J. Sauer, and G. H. Schnerr, “Modeling and computation of unsteady

cavitation flows in injection nozzles,” Mec. Ind., vol. 2, no. 5, pp. 383–394, 2001.

[32] A. Peters, H. Sagar, U. Lantermann, and O. el Moctar, “Numerical modelling and

prediction of cavitation erosion,” Wear, vol. 338–339, pp. 189–201, 2015.

[33] X. B. Zhang, L. M. Qiu, Y. Gao, and X. J. Zhang, “Computational fluid dynamic

study on cavitation in liquid nitrogen,” Cryogenics (Guildf)., vol. 48, no. 9–10, pp.

432–438, 2008.

[34] H. F. F. Hojat Ghassemi∗, “Application of small size cavitating venturi as flow

controller and flow meter,” 2010.

[35] A. Hosangadi and V. Ahuja, “Numerical Study of Cavitation in Cryogenic Fluids,”

J. Fluid Eng., vol. 127, no. March 2005, pp. 267–281, 2005.

[36] J. Sierra-Pallares, M. T. Parra-Santos, J. Garc??a-Serna, F. Castro, and M. J.

Cocero, “Numerical analysis of high-pressure fluid jets: Application to RTD

prediction in supercritical reactors,” J. Supercrit. Fluids, vol. 49, no. 2, pp. 249–

255, 2009.

[37] I. Senocak and W. Shyy, “Interfacial dynamics based modelling of turbulent

Page 62: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

57

cavitating flows, Part 1: Model development and steady state computations,” Int. J.

Numer. methods fluids, vol. 995, no. October 2003, pp. 975–995, 2004.

[38] Y. Utturkar, S. Thakur, and W. Shyy, “Computational Modeling of

Thermodynamic Effects in Cryogenic Cavitation,” Univ. of Florida, Gainesville,

Fl, 2005.

[39] A. Hosangadi and V. Ahuja, “{A} generalized multi-phase framework for

modeling cavitation in cryogenic fluids,” 33rd AIAA Fluid Dyn. Conf., 2003.

Page 63: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

58

Appendix A; nitroIPCF source code for OpenFOAM-2.3.0

The main code #include "fvCFD.H"

#include "CMULES.H"

#include "subCycle.H"

#include "interfaceProperties.H"

//#include "phaseChangeTwoPhaseMixture.H"

#include

"./phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H"

#include "turbulenceModel.H"

#include "pimpleControl.H"

#include "fvIOoptionList.H"

#include "fixedFluxPressureFvPatchScalarField.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[])

{

#include "setRootCase.H"

#include "createTime.H"

#include "createMesh.H"

#include "readGravitationalAcceleration.H"

#include "initContinuityErrs.H"

#include "createFields.H"

#include "readTimeControls.H"

pimpleControl pimple(mesh);

#include "createPrghCorrTypes.H"

#include "../interFoam/correctPhi.H"

#include "CourantNo.H"

#include "setInitialDeltaT.H"

Page 64: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

59

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Info<< "\nStarting time loop\n" << endl;

while (runTime.run())

{

#include "readTimeControls.H"

#include "CourantNo.H"

#include "setDeltaT.H"

runTime++;

Info<< "Time = " << runTime.timeName() << nl << endl;

#include "calcFields.H" //the

initial values of the thermo-properties

// --- Pressure-velocity PIMPLE corrector loop

while (pimple.loop())

{

#include "alphaControls.H"

#include "deltaT_star.H" // added;

T and thermo-properties updated

surfaceScalarField rhoPhi

(

IOobject

(

"rhoPhi",

runTime.timeName(),

mesh

),

mesh,

dimensionedScalar("0", dimMass/dimTime, 0)

);

Page 65: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

60

if (pimple.firstIter() || alphaOuterCorrectors)

{

twoPhaseProperties->correct();

#include "alphaEqnSubCycle.H"

interface.correct();

}

#include "UEqn.H"

// --- Pressure corrector loop

while (pimple.correct())

{

#include "pEqn.H"

}

if (pimple.turbCorr())

{

turbulence->correct();

}

}

runTime.write();

Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"

<< " ClockTime = " << runTime.elapsedClockTime() << " s"

<< nl << endl;

}

Info<< "End\n" << endl;

return 0;

}

Page 66: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

61

The deltaT_star.H file {

fvScalarMatrix TEqn

(

fvm::ddt(T)

+ fvm::div(phi, T)

- fvm::laplacian(DT, T) // DT definition is slightly different than Barsi's

);

TEqn.relax();

TEqn.solve();

////////////////////////////////////////////// calculation of the latent heat:

deltaT = alpha2 / alpha1 * (rho1 + deltaRho1) / (rho2 + deltaRho2)

* (HEvap + delta_HEvap) / ( cplScalar + deltaCpl) ;

#include "calcFields.H"

} // end of while

cout<<"Temperature Field updated\n\n";

// cout<< "the loop counter is: "<<i << endl;

}

calcFields.H

{

//DT:

DT = ( klcpl + alpha2 * (kvcpv - klcpl) ) / rho; //the only variables are

alpha and rho which are constant deltaT_star for stability issues

/////////////////////////////////////////////////////////////////////////////////////////////////////////////

//defining pSat based on the polinomial estimation:

Page 67: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

62

//P_sat= 0.000000382777*C20^4 - 0.000016944973*C20^3 -

0.004397365554*C20^2 + 0.395612249718*C20 - 9.14019907814

const dimensionedScalar p_sat4("0.000000382777", dimensionSet(1,-1,-2,-4,0,0,0),

0.000000382777);

const dimensionedScalar p_sat3("- 0.000016944973", dimensionSet(1,-1,-2,-3,0,0,0), -

0.000016944973);

const dimensionedScalar p_sat2("- 0.004397365554", dimensionSet(1,-1,-2,-2,0,0,0), -

0.004397365554);

const dimensionedScalar p_sat1("0.395612249718", dimensionSet(1,-1,-2,-1,0,0,0),

0.395612249718);

const dimensionedScalar p_sat0("- 9.14019907814", dimensionSet(1,-1,-2,0,0,0,0), -

9.14019907814);

//[bar]

const dimensionedScalar p_satMin("17502.3163", dimensionSet(1,-1,-2,0,0,0,0), 17502.3163);

//// The polinomial between 88K to 126.92K range:

pSat = max( ( p_sat4 * T*T*T*T + p_sat3 * T*T*T + p_sat2 * T*T +p_sat1 * T + p_sat0 ) *

1e5 , p_satMin);// + deltaP_turb = .195 * rho * 0.016709705;

// August-Roche-Magnus formula for water based on Baris is:

//pSat = p610_94 * exp( 17.625*(T-t273_15) / max(t1, T-t30_11) );

//max(1,...) is included to avoid problems with devision by 0

/////////////////////////////////////////////////////////////////////////////////////////////////////////////

//defining deltaRho1 of LN2 based on rhol:

//Rho_l or rho 1 = -0.000000277846*C20^5 + 0.000107872727*C20^4 -

0.016874015161*C20^3 + 1.308714301503*C20^2 - 54.113188245391*C20 + 1878.46334360194

const dimensionedScalar rhol5("-0.000000277846", dimensionSet(1,-3,0,-5,0,0,0), -

0.000000277846);

const dimensionedScalar rhol4("0.000107872727", dimensionSet(1,-3,0,-4,0,0,0),

0.000107872727);

const dimensionedScalar rhol3("- 0.016874015161", dimensionSet(1,-3,0,-3,0,0,0), -

0.016874015161);

Page 68: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

63

const dimensionedScalar rhol2("1.308714301503", dimensionSet(1,-3,0,-2,0,0,0),

1.308714301503);

const dimensionedScalar rhol1("- 54.113188245391", dimensionSet(1,-3,0,-1,0,0,0), -

54.113188245391);

const dimensionedScalar rhol00("1878.46334360194", dimensionSet(1,-3,0,0,0,0,0),

1878.46334360194);

//// The polinomial between 88K to 126.92K range:

deltaRho1 = rhol5 * T*T*T*T*T + rhol4 * T*T*T*T + rhol3 * T*T*T + rhol2 * T*T + rhol1 * T

+ rhol00 - rho1;

////////////////////////////////////////////////////////////////////////////////////////////////////////////

//defining deltaRho2 of VN2 based on rhov below:

//Rho_v or rho2 = 0.000000354263*C20^5 - 0.000144413716*C20^4 +

0.023862673263*C20^3 - 1.970070467809*C20^2 + 80.876972878566*C20 - 1319.02081495752

const dimensionedScalar rhov5("0.000000354263", dimensionSet(1,-3,0,-5,0,0,0),

0.000000354263);

const dimensionedScalar rhov4("- 0.000144413716", dimensionSet(1,-3,0,-4,0,0,0), -

0.000144413716);

const dimensionedScalar rhov3("0.023862673263", dimensionSet(1,-3,0,-3,0,0,0),

0.023862673263);

const dimensionedScalar rhov2("- 1.970070467809", dimensionSet(1,-3,0,-2,0,0,0), -

1.970070467809);

const dimensionedScalar rhov1("80.876972878566", dimensionSet(1,-3,0,-1,0,0,0),

80.876972878566);

const dimensionedScalar rhov0("- 1319.02081495752", dimensionSet(1,-3,0,0,0,0,0), -

1319.02081495752);

//// The polinomial between 88K to 126.92K range:

deltaRho2 = rhov5 * T*T*T*T*T + rhov4 * T*T*T*T + rhov3 * T*T*T + rhov2 * T*T + rhov1 *

T + rhov0 - rho2;

/////////////////////////////////////////////////////////////////////////////////////////////////////////////

Page 69: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

64

//defining cp of LN2 below:

//Cp_l= 0.000000021954*C20^5 - 0.000009161795*C20^4 +

0.001526127564*C20^3 - 0.126522518062*C20^2 + 5.215300274865*C20 - 83.476772722473

const dimensionedScalar cpl5("0.000000021954", dimensionSet(0,-2,-2,-6,0,0,0),

0.000000021954);

const dimensionedScalar cpl4(" - 0.000009161795", dimensionSet(0,-2,-2,-5,0,0,0), -

0.000009161795);

const dimensionedScalar cpl3("0.001526127564", dimensionSet(0,-2,-2,-4,0,0,0),

0.001526127564);

const dimensionedScalar cpl2("- 0.126522518062", dimensionSet(0,-2,-2,-3,0,0,0), -

0.126522518062);

const dimensionedScalar cpl1("5.215300274865", dimensionSet(0,-2,-2,-2,0,0,0),

5.215300274865);

const dimensionedScalar cpl0("- 83.476772722473", dimensionSet(0,-2,-2,-1,0,0,0), -

83.476772722473);

//// The polinomial between 88K to 126.92K range:

deltaCpl = cpl5 * T*T*T*T*T + cpl4 * T*T*T*T + cpl3 * T*T*T + cpl2 * T*T + cpl1 * T +

cpl0 - cplScalar;

/////////////////////////////////////////////////////////////////////////////////////////////////////////////

//calc L (deltaH-evap)

// or deltaH_evap = -0.000000184256*C20^5 + 0.000075842191*C20^4 -

0.012636375874*C20^3 + 1.048643537273*C20^2 - 44.114584359847*C20 + 980.733352063206

const dimensionedScalar deltaH_evap5("-0.000000184256", dimensionSet(0,-2,-2,-5,0,0,0), -

0.000000184256);

const dimensionedScalar deltaH_evap4(" 0.000075842191", dimensionSet(0,-2,-2,-4,0,0,0),

0.000075842191);

const dimensionedScalar deltaH_evap3("- 0.012636375874", dimensionSet(0,-2,-2,-3,0,0,0), -

0.012636375874);

const dimensionedScalar deltaH_evap2("1.048643537273", dimensionSet(0,-2,-2,-2,0,0,0),

1.048643537273);

const dimensionedScalar deltaH_evap1("- 44.11458435984", dimensionSet(0,-2,-2,-1,0,0,0), -

44.11458435984);

Page 70: Development of a CFD solver for simulating the cavitating ... thesis...occurring during enGrid 1.4 mesh generation algorithm at the sensitive parts FIGURE 8, THE PATH OF LN2

65

const dimensionedScalar deltaH_evap0("980.733352063206", dimensionSet(0,-2,-2,0,0,0,0),

980.733352063206);

//// The polinomial between 88K to 126.92K range:

delta_HEvap = deltaH_evap5 * T*T*T*T*T + deltaH_evap4 * T*T*T*T + deltaH_evap3 *

T*T*T + deltaH_evap2 * T*T + deltaH_evap1 * T + deltaH_evap0 - HEvap;

/////////////////////////////////////////////////////////////////////////////////////////////////////////////

}