modeling of direct contact condensation with...

60
AlbaNova Condensation Models Master Thesis Modeling of Direct Contact Condensation With OpenFOAM Roman Thiele Supervisors: Henryk Anglart Eric Lillberg Division of Nuclear Reactor Technology Royal Institute of Technology Stockholm, Sweden, June 2010 TRITA-FYS 2010:43 ISSN 0280-316X ISRN KTH/FYS/–10:43–SE

Upload: others

Post on 06-Nov-2020

4 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

AlbaNova Condensation ModelsMaster Thesis

Modeling of Direct Contact Condensation With OpenFOAM

Roman Thiele

Supervisors:Henryk AnglartEric Lillberg

Division of Nuclear Reactor TechnologyRoyal Institute of TechnologyStockholm, Sweden, June 2010

TRITA-FYS 2010:43 ISSN 0280-316X ISRN KTH/FYS/–10:43–SE

Page 2: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

ii

Page 3: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

ABSTRACT

Within the course of the master thesis project, two thermal phase change models for direct contact conden-sation were developed with different modeling approaches, namely inter-facial heat transfer and combustionanalysis approach.

After understanding the OpenFOAM framework for two phase flow solvers with phase change capabilities,a new solver, including the two developed models for phase change, was implemented under the name ofinterPhaseChangeCondenseTempFoam and analyzed in a series of 18 tests in order to determine the physicalbehavior and robustness of the developed models. The solvers use a volume-of-fluid (VOF) approach withmixed fluid properties.

It has been shown that the approach with inter-facial heat transfer shows physical behavior, a strong timestep robustness and good grid convergence properties. The solver can be used as a basis for more advancedsolvers within the phase change class.

iii

Page 4: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

iv

Page 5: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

ACKNOWLEDGEMENTS

I would like to extend my gratitude all my supervisors and listeners during the course of this work. Mostnotably to Henryk Anglart for this guidance and the support as a supervisor and Carsten ’t Mannetje forlistening and letting me bounce of ideas. Also the rest of the reactor technology department for givingvaluable input during the bi-weekly meetings.

As well I would like to thank Westinghouse Electric Sweden AB and most notably Eric Lillberg for financialsupport and guidance in understanding the OpenFOAM source code.

v

Page 6: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

vi

Page 7: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

CONTENTS

1 Introduction 1

2 Theory Behind the Solvers 3

2.1 Fluid Dynamics Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2.1.1 Interface Tracking with VOF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.2 Two Phase Change Models for One Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.2.1 The Combustion-like Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.2.2 The Inter-Facial Heat Transfer Approach . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.3 Thermophysical Model for Temperature Analysis . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 Program Code and Usage of the Solver 9

3.1 The Solver Code Explained . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.1.1 Phase Continuity Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.1.2 Velocity Equation Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.1.3 Pressure Equation Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.2 The Energy Equation Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.3 The Phase Change Model Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.3.1 Functions of AlbaNovaInterface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.4 Usage of interPhaseChangeCondenseTempFoam . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4 Sensitivity Analysis 19

4.1 The Test Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4.1.1 Grid Convergence Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4.1.2 Velocity and Time Step Dependency Test . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.1.3 The Test Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

5 Results 23

5.1 GCI Test Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

5.2 Velocity Dependence Test Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

5.3 Time Step Dependence Test Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

vii

Page 8: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

viii CONTENTS

6 Conclusion and Recommendations 27

6.1 Conclusions on the Phase Change Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

6.2 Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Appendix A Main Program Source Code 31

Appendix B Source Code Combustion Model (AlbaNovaCombustion) 35

Appendix C Source Code Interface Model (AlbaNovaInterface) 39

Appendix D High Velocity Test 43

Page 9: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

LIST OF SYMBOLS

The list of symbols include bold face symbols, which indicate a vector property.

Symbol Dimensions Description

Latin Symbols

a variable Discretization coefficientsA m2 Inter-facial areacp J/kg/K = m2/s2/K Specific heate variable Relative errorEvl J/m3/s Heat transfer between phasesfc Hz = s−1 Combustion frequencyg m/s2 GravityGCI - Grid convergence indexh W/m2/K = kg/s3/K Heat transfer coefficienti J/kg Specific enthalpyifg J/kg = m2/s2 Latent heatl m Representative grid sizeL m Characteristic lengthm kg Massm kg/s Mass flowN - Total number of cellsNu - Nusselt numberp Pa Pressurep - Apparent order of the solver for GCIq W = kg ·m2/s3 Heatq′′ W/m2 = kg/s3 Heat fluxQ J/m3/s General heat sourcer - Ratio of representative grid sizesS variable Generic source termT K or ◦C Temperatureu m/s VelocityVcell m3 Volume of a cellx m Length

Greek Symbols

α - Phase fraction of waterΓ kg/m3/s Mass transfer per unit volumeδb.l. m Boundary layer thicknessε variable Absolute error of global variableκ m2/s Thermal diffusivityλ W/m/K = kg ·m/s3/K Thermal conductivity

Continued on next page

ix

Page 10: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

x CONTENTS

Continued from previous page

Symbol Dimensions Description

µ Pa · s = kg/m/s Dynamic viscosityν m2/s Kinematic viscosityρ kg/m3 Densityτ s Pseudo timeφ m−2s−1 Flux

Subscripts

inf Bulk

l Liquid

m Mixture

v Vapor

Page 11: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

LIST OF FIGURES

2.1 Volume-of-Fluid method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.2 Energy transfer schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.3 Cell layout with interface boundary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.4 Graphical representation of the interface area model. . . . . . . . . . . . . . . . . . . . . . . . 8

3.1 Runtime command structure interPhaseChangeCondenseTempFoam . . . . . . . . . . . . . . 9

3.2 Class diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4.1 Sketch of the simulation model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

5.1 GCI comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

5.2 Velocity dependency time development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

5.3 Interface distribution velocity test of the interface model . . . . . . . . . . . . . . . . . . . . . 25

5.4 Interface distribution velocity test of the combustion model . . . . . . . . . . . . . . . . . . . 26

5.5 Time step dependency over time development . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

D.1 Condensation rate vs. time for inlet velocity 10m/s . . . . . . . . . . . . . . . . . . . . . . . . 43

D.2 Time step behavior high velocity test 0.15s . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

D.3 Time step behavior high velocity test 0.30s . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

D.4 Time step behavior high velocity test 0.80s . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

D.5 Time step behavior high velocity test 1.35s . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

xi

Page 12: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

xii List of Figures

Page 13: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

LIST OF TABLES

3.1 AlbaNovaInterfaceCoeffs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

3.2 AlbaNovaCombustionCoeffs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

4.1 Transport properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.2 Grid sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.3 Test matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

5.1 GCI test results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

5.2 Velocity dependency test results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

5.3 Time step dependency results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

xiii

Page 14: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

xiv List of Tables

Page 15: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

CHAPTER 1

INTRODUCTION

Energy is a huge topic in today’s society and with it comes nuclear energy. Nuclear power plants need tobe efficient and above all safe in all conditions. One of the more severe conditions is a large loss of coolantaccident (LOCA), which occurs if one of the main water and steam supplying pipes breaks. When thishappens, large amounts of steam are released into the containment (the so called dry well) of the powerplant. In order to keep the power plant safe, because the containment is not created for the high pressures asthey are present in pipes, the steam must be removed from the containment. The steam is guided throughpipes into so-called suppression pools (wet well), which contain large amounts of water to condensate thesteam and therefore relieve the containment from high pressures.

Experimenting with large setups and going through as many possible situations as possible is expensive andtime consuming. However, with modern computer tools, it is possible to simulate these conditions withoutexperimenting. The specialization in engineering that deals with this is called computational fluid dynamics(CFD). There are many companies and software tools available for more or less complete simulations ofdifferent phenomena. One of these software packages is OpenFOAM R©(OF). OF is an open source softwarepackage that comes with a number of predefined solvers for different tasks. However, since the package isopen source, new solvers can easily be created or existing solvers be modified. The remaining question is,why should OF perform those tasks, which other software packages maybe already perform.

OF is, due to its open source nature, scalable and completely transparent when it comes to the developmentof new solvers. The transfer of knowledge from academic use to industrial use works without hurdles andthe software can run on small and large machines (multi-core clusters) without license restrictions.

This report describes the development of a solver for direct contact condensation within the OpenFOAMframework. Two different models are developed and a sensitivity analysis is performed on both solvers. Thedevelopment is meant as a basis for more sophisticated solvers and is by far not yet a complete solver. Thesolvers are based on the assumption of saturated steam flowing onto a sub-cooled water surface. In order tofully enjoy this report, the reader should have a basic understanding of numerical simulation, thermodynamicsand fluid dynamics.

Concerning the structure of this report, chapter 2 will give an overview of the fluid dynamical and thermodynamical theory that is used to develop the solvers. In chapter 3 the program code will be explained.Chapter 4 deals with setting up and explaining the sensitivity analysis, followed by a chapter with theresults. The last chapter concludes the report and gives recommendations for further development.

1

Page 16: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

2 Introduction

Page 17: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

CHAPTER 2

THEORY BEHIND THE SOLVERS

In this chapter the theory, which makes up the solvers and the models used in the solvers is explained. Itstarts with the overall fluid dynamics model, which gives the framework for the phase change models, whichare subsequently explained.

2.1 Fluid Dynamics Framework

The fluid dynamics are based on the solver interPhaseChangeFoam which is provided by the OpenFOAM1.6 software. It is a solver for two immiscible and incompressible fluids with phase change features usinga volume-of-fluid approach for interface tracking. The phase change models are interchangeable, and twophase change models were developed within the scope of this work (see section 2.2). The solver is basedon the original work on cavitation models by Kunz [8], without the influence of non-condensible gases. Thegoverning equations are not based on mass continuity equations but on volume continuity as can easily beseen by the division by the density, ρ, of the present phases as shown below.(

1

ρm

)∂p

∂τ+∇ · u =

(m+ + m−

)( 1

ρl+

1

ρv

), (2.1)

where one can see a derivative with respect to τ , which is a pseudo-time derivative and is used for the timeiterative solution employed by Kunz. Equation 2.1 represents the volume continuity equation, where p is thepressure, ρ the density, u the velocity and m+ and m− represent the mass flow between the phases. Thepositive contribution is condensation and negative contribution comes from evaporation. Within the scopeof this paper, only the condensation is modeled and evaporation is set to 0.

The accompanying momentum equation is given by equation 2.2 as

∂ρmu

∂t+∂ρmu

∂τ+ ρmu · ∇u = −∇p+ µm∇2u + ρmg , (2.2)

where µm is the mixture dynamic viscosity and g is the gravitational acceleration. In order to track theinterface, a phase continuity equation is introduced.

∂α

∂t+

ρm

)∂p

∂τ+∂α

∂τ+∇ · αu =

(m+ + m−

)( 1

ρl

)(2.3)

Equation 2.3 represents the phase continuity equation and introduces the phase fraction α, which is boundedby 0 and 1, representing gaseous and liquid phase, respectively. The importance and function of this functionis discussed in section 2.1.1, where the volume-of-fluid approach is discussed in more depth.

The mixture density, ρm, of the governing equations is given by

ρm = αρl + (1− α)ρv , (2.4)

where the subscripts l and v denote liquid and vapor, respectively.

3

Page 18: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

4 Theory Behind the Solvers

2.1.1 Interface Tracking with VOF

As mentioned before, the solver uses a volume-of-fluid (VOF) approach to track the interface and with thisinformation derive the momentum exchange between the phases. A volume-of-fluid method was first devisedby Hirt [6] as a method to track the interface of a fluid dispersed in another continuous fluid.

The VOF uses a scheme that tracks the interface of the dispersed phase by utilizing the phase fraction withinthe cell. Every cell stores a value between zero and one, which denote empty and full of the continuousphase, respectively. This function α depends on time and position, meaning α = α(t,x), can be partiallydifferentiated and moves with the fluid, as can be seen in equation 2.3, the average phase continuity equation.A visual representation is found in figure 2.1.

α=0

α=1

n

Figure 2.1: Graphical representation of the VOF method, depicting the normal vector of the interface and the cellscontaining phase 1 (blue, α = 1) and cells containing phase 2 (no color, α = 0). The cells containing the interfacehave 0 < α < 1.

Due to the fact that the function follows the region of fluid and not the interface it is a simple and economicway to track the interface [6], since only one extra variable must be stored and can be handled as any othertransport equation. With the differentiability of the function comes the convenience that the curvature andthe normal vector of the interface can be computed. Those values can then be used to calculate the interfaceforces.

2.2 Two Phase Change Models for One Task

In this section the different models which are used for further development of the solver are introduced. Thereare two of them, which are based on different approaches. The first one being a combustion like approach,treating the mass transfer between the phases in analogy to chemical combustion. The second model takesan approach, which is closer to real physical behavior, using inter-facial heat transfer to calculate the massexchange between the phases.

For both models the energy and mass upon transfer must be conserved. This means, the energy that istransfered (with the mass) away from the saturated steam must be equal to the energy being received by theliquid.

Also, both models assume that the steam that enters the computational domain is at saturation conditions.Therefore, cooling down of the steam is not necessary before the phase change occurs.

Page 19: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

Two Phase Change Models for One Task 5

2.2.1 The Combustion-like Approach

The idea behind this approach is, that the neither heat transfer coefficient nor the heat transfer area mustbe known. This results in a simplified way of describing condensation.

As a starting point the energy per mass of the two sides of the interface can be expressed as

ml · cp · (Tsat − Tinf ) = mv · ifg , (2.5)

where ml and mv are the mass of water and steam, respectively. Tsat and Tinf represent the saturationtemperature and the temperature of the water, whereas cp is the specific heat of water at saturation conditionsand ifg is the latent heat of water. This can be rewritten for the mass of steam transferred

mv =ml · cp · (Tsat − Tinf )

ifg. (2.6)

Equation 2.6 presents how much steam is condensed given a certain amount of water.

In order to describe the mass flow across the interface a so-called combustion frequency, fc, is introduced.This frequency determines how much steam can condense within a certain amount of time. The resultingequation for the mass flow is then

m+ =ml · cp · (Tsat − Tinf )

ifg· fc . (2.7)

The obtained mass flow rate must be considered the maximum of course. There must never be more steamcondensed than the cell contains. Therefore upon programming this into the solver, one must consider this.

As can be seen in equation 2.7 for the mass flow between, m+, the phases, all but one value, fc, are easilyobtainable from the IF97 databases [14].

2.2.2 The Inter-Facial Heat Transfer Approach

The starting point for this approach is again a balanced energy equation. The balance must be at theinterface between the two fluids, as shown in figure 2.2. The energy balance is given by

q = h · (Tsat − Tinf ) ·Al = m+ · ifg , (2.8)

where h is the heat transfer coefficient, as determined within the next subsection, Al is the inter-facial areabetween water and steam, m+ is the mass condensation rate and ifg is the latent heat. From equation 2.8 itcan be seen that two parameters, namely the inter-facial area and the heat transfer coefficient are unknowns.They have to be determined or estimated within the simulation or beforehand. As the inter-facial area mainlydepends on the computational cell size, the volume ratio of steam and water and the direction of the interfacewithin the cell, this variable must be estimated during the simulation.

As for the heat transfer coefficient, h, this can be determined before hand, knowing what the approximateconditions during the simulation are, or it can be determined at runtime, based on some heat transfercoefficient model as described in the following part of this section.

Determining the Heat Transfer Coefficient

In order to complete the inter-facial heat transfer model, the heat transfer coefficient is needed. Two differentapproaches are taken. Both assume a very low velocity and laminar flow.

Pure Conduction In order to determine the heat transfer coefficient, h, some kind of model must bedevised. There are many models already available, which are more or less complicated. For this approach aneasy model based on the way the condensation is supposed to take place is devised. Taking a look at figure2.2, one can see that the condensation takes places on a mostly flat water surface at very slow laminar flow.The assumptions for the heat transfer is that the heat flux across the interface between the two fluids worksas in conduction. The Fourier law of conduction in one direction for the water side of the interface is givenby [7]

q′′ = −λfdT

dn, (2.9)

Page 20: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

6 Theory Behind the Solvers

Interface (Tsat)

}dn

Steam (Tsat)

Water (Tinf)

q

Figure 2.2: Schematic of the energy transfer at the interface of steam and water as described by equation 2.8.

where q′′ is the heat flux, λf is the thermal conductivity of the material (in this case water). dTdn is the

temperature gradient. Assuming that most of the water is at bulk temperature, Tinf , and that there is athin boundary region close to the interface equation 2.9 can be rewritten to

q′′ = λfTsat − Tinf

δb.l., (2.10)

where δb.l. represents the boundary thickness. As one can notice, the minus sign has disappeared. This isdue to the fact that the temperatures have been switched as well.

The heat flux due to convection is given by [7]

q′′ = h · (Tsat − Tinf ) . (2.11)

Equating equations 2.10 and 2.11 and solving for h gives the following expression for the heat transfercoefficient

h =λfδb.l.

. (2.12)

Therefore, the total mass transfer from vapor to liquid is given by inserting 2.12 into the energy balance fromequation 2.8 and solving for m+, which results in

m+ =λf ·Al · (Tsat − Tinf )

δb.l. · ifg. (2.13)

Nusselt Number for Flat Rectangular Plate Condensation Bejan [3] gives the following relation forcondensation of steam on a flat horizontally placed plate, which is a similar configuration to the one foundwithin the inlet channel of the condensation tank.

Nu =hlL

λl= 1.079

[L3 · ifg · g (ρl − ρv)

λl · νl (Tsat − Tinf )

] 15

, (2.14)

where Nu is the Nusselt number, hl the heat transfer coefficient, λl the thermal conductivity of the liquid,L the characteristic length of the plate, g is gravity and ρl and ρv are the densities of the water and steam,respectively.

The only unknown in this relation is the characteristic length L. However, in this case it is set to the diameterof the inlet channel. Rewriting it gives the heat transfer coefficient hl as

hl =λLL· 1.079

[L3 · ifg · g (ρl − ρv)

λl · νl (Tsat − Tinf )

] 15

. (2.15)

Page 21: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

Thermophysical Model for Temperature Analysis 7

Inserting equation 2.15 into 2.8 the mass transfer rate across the inter-facial boundary is given as

m+ =hl ·Al · (Tsat − Tinf )

ifg, (2.16)

where hl is given by equation 2.15.

Both models should give approximately the same results, but in order to keep the model as close as possibleto physical behavior, the Bejan relation will be implemented into the solver.

Interface Area Model

For this model to work, the last thing left to do is to specify the heat transfer area, Al, from equation 2.16.In order to avoid complex geometric modeling a simple model is developed. It is assumed that most cellsare regular in size. Meaning that the hexahedral cells have approximately the same length dimension in alldirection. It is further assumed, that the size of the inter-facial area depends on the liquid volume fractionα, which ranges between 0 and 1, as can be seen in figure 2.3. This means that at α = 0.5, the area is largestand that at 0 and at 1 no inter-facial area is present. For a good estimate of the largest inter-facial area, thelargest area within a regular cube is assumed.

α

1-α

Interface

Cell boundary

Figure 2.3: Description of a regular cell with internal inter-facial boundary between the fluid (α) and the gaseousphase (1 − α).

The maximum area Amax is therefore given as

Amax =√

3 · V23

cell , (2.17)

where Vcell is the cell volume. And the linear function for the increase and decrease of the area is given by

Al =

{2 · α 0 ≤ α < 0.52 · (1− α) 0.5 ≤ α ≤ 1

. (2.18)

A graphical representation is given in figure 2.4.

2.3 Thermophysical Model for Temperature Analysis

The last part that will be added to the solver is a thermo-physical model for the water. In order to achievethis, the energy equation for the water side must be solved. The general governing energy equation for theliquid phase is given by [1]

∂t(αρlil) +∇ · (αρluil − αλl∇Tl) = Ql + Γc · ifg + Evl , (2.19)

where il is the enthalpy of the water, T is the temperature, α is the phase fraction of water, ρl is the densityof water, u is the velocity of the water, λl is the thermal conductivity of water, Ql is a general heat source

Page 22: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

8 Theory Behind the Solvers

Amax

A

αα=0.5

Figure 2.4: Graphical representation of the interface area model.

to the water, Γc is the condensation rate from steam to water per unit volume, ifg is the latent heat and Evl

is the energy transfer from vapor to liquid phase from conduction.

In order to have an easily solvable expression to implement, simplifications can be performed. The firstsimplification is that there is no general internal heat source, meaning QL = 0. Since only the water sideshould be solved for, the added factor of α may be dropped. Dividing both sides by cp in order to have onlytemperature leaves the following expression.

∂ρT

∂t+∇ · ρuT −∇2ρκT =

Γcifgcp

+ Evl , (2.20)

where κ is the thermal diffusivity resulting from κ = λf/ρ/cp. Equation 2.20 leaves two terms that need to bemodeled, namely Evl and Γc. The mass condensation rate per unit volume is modeled as described in section2.2. For the conduction, which is also the boundary condition for the water side of the equation, a modelhas to be devised. The temperature on the steam side should always be kept at saturation temperature Tsat.When discretizing equation 2.20 around the point of interest (subscript p), the result is

apTp +∑all

Tnan =Γcifgcp

+ Evl , (2.21)

where the a gives the coefficients of all cells and the subscript n gives the nodes around node p. At theboundary, the cell temperature should be at saturation temperature, giving Tp ≈ Tsat. This can be achievedby modeling Evl with large numbers in a way that

Evl = SlargeTsat − TpSlarge , (2.22)

where Slarge is a large number, much larger than the reciprocal of the precision of the computational system(for double precision, the precision is ∼ 10−8). Inserting equation 2.22 into equation 2.21 and solving for Tpresults in

Tp =SlargeTsatap + Slarge

−∑

all Tnanap + Slarge

≈ Tsat (2.23)

This source Evl is conditionally applied for α = 0.

Page 23: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

CHAPTER 3

PROGRAM CODE AND USAGE OF THE SOLVER

This chapter treats the program code and gives an explanation of which parts have been edited and/or newlywritten to accomplish the goal of the new solver interPhaseChangeCondenseTempFoam. The programmingwas done in C++ with help of the libraries that are included in the OpenFOAM 1.6.x (OF) package andcompiled with a gcc version higher than 4.3.3.

interPhaseChangeCondenseTempFoam – runtime commands

Reading: PISO Time

Output: Courant number delta t (calculated depending on CFL-condition)

alphaSubCycle.HPerforms analysis of αCreates ρ (from weighted average of mixture)Creates (flux)ϕRuns alphaEqn.H

Co

rre

ctio

n lo

op

AlphaEqn.Hα transport equations with source terms from phase change modelsSolves bounded α equation

UEqn.HCreate tensor for solution of U with source from phase change modelIf momentum predictor is set, solves the velocity equation

PIS

O lo

op

pEqn.HUses U tensor variable to create USets up with ϕ U and volume flux from phase change modelSets up pressure equation with and volume flux ϕSolves pressure equationUpdates velocity field accordingly

continuityErrs.HCorrects the introduced continuity errors

TEqn.H (if energy equation is switched on)Sets up energy equation with mass flux and

energy source term from phase change model for water sideSolves the energy equation

run

time

loo

p

Figure 3.1: A graphical representation of the runtime command structure of interPhaseChangeCondenseTempFoam.

9

Page 24: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

10 Program Code and Usage of the Solver

The solver is an enhanced version of the solver interPhaseChangeFoam, which is delivered with OF. The orig-inal solver includes three different phase change models that are used to simulate cavitation. The new solveromits these phase change models and only includes the two new phase change models that were developed inchapter 2. In order to comply with the programming grammar, the solvers are called AlbaNovaCombustion

and AlbaNovaInterface, representing the combustion analysis approach (see section 2.2.1) and the inter-facial heat transfer approach (see section 2.2.2), respectively. A graphical representation of the code can beseen in figure 3.1. The figure omits the phase change models and only states at which part the phase changemodels give data back to the main code, since the phase change models are a class on their own.

The newly added features compared to the original code include a preparation the solving of the energyequation for the water side for the main class interPhaseChangeCondenseTempFoam and two new classescalled AlbaNovaCombustion and AlbaNovaInterface. The energy equation is not completely implemented,see section 3.2 for more information.

3.1 The Solver Code Explained

Within the following section, the line numbers correspond to the line numbers in the solver source files, asthey can be found in the solver and the appendix.

All equations that can be solved separately, e.g. pressure, velocity and phase continuity, are treated inseparate .H files containing the setup of the necessary variables and the equation, as well as solving ofthe equation. OF handles differential equations and the solving of such, such as transport equations, in atemplate class called fv<type>Matrix. This class allows an easy set up and solving of the equation withdifferent solution schemes which can be set on runtime. The code to solve a differential equation in OF issimilar to the mathematical representation as it is given in the theory chapter.

3.1.1 Phase Continuity Code

As one can see in figure 3.1, the solver starts by solving the continuity equation for the liquid volume fraction.This is done in two steps. At first the alpha sub cycle is started. It first creates a field for the mass flux andsets it to zero. This is done with every start of the time loop. Meaning that a new mass flux is written atevery start.

01: surfaceScalarField rhoPhi02: (03: IOobject04: (05: "rhoPhi",06: runTime.timeName(),07: mesh08: ),09: mesh,10: dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0)11: );12:

The next fields it creates is the flux due to interface compression phic in

38:

39: surfaceScalarField phic = mag(phi/mesh.magSf());40: phic = min(interface.cAlpha()*phic, max(phic));41:

After creating all those necessary fields for the phase continuity equation, the phase continuity equation isset up and solved in alphaEqn.H. The first step is to set up the relative flux. Since the solver relies onmixed properties and one equation models. This is achieved by multiplying the compression flux with thenormalized normal vector of the interface.

04:

05: surfaceScalarField phir("phir", phic*interface.nHatf());

Page 25: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

The Solver Code Explained 11

06:

The solver enters a loop, in which first the actual explicit flux due to phase fraction α, phiAlpha, and thenthe sources which result from the phase change are set up and inserted into the bounded multiphase solverthat is supplied by OpenFOAM. The loop runs a predefined number of correction iterations, which is set onrun time by the user.

The explicit flux of α is set up via

09: surfaceScalarField phiAlpha =10: fvc::flux11: (12: phi,13: alpha1,14: alphaScheme15: )16: + fvc::flux17: (18: -fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),19: alpha1,20: alpharScheme21: );22:

where the first term is due to the water phase and the second term is due to the gas phase. The “schemes”determine how to discretize the field.

During the next step, the source terms for evaporation and condensation are retrieved from the class thathandles the phase change. This can be one of the models handling phase change (AlbaNovaCombustion orAlbaNovaInterface) and will explained at a later stage. The template data type Pair stands for two values,which can be in any form of a field or a scalar, depending on the definition given after tmp. The values canbe read as from an array as shown below in line 25 and 26.

23: Pair<tmp<volScalarField> > vDotAlphal =24: twoPhaseProperties->vDotAlphal();25: const volScalarField& vDotcAlphal = vDotAlphal[0]();26: const volScalarField& vDotvAlphal = vDotAlphal[1]();27:

28: volScalarField Sp29: (30: IOobject31: (32: "Sp",33: runTime.timeName(),34: mesh35: ),36: vDotvAlphal - vDotcAlphal37: );38:

39: volScalarField Su40: (41: IOobject42: (43: "Su",44: runTime.timeName(),45: mesh46: ),47: // Divergence term is handled explicitly to be48: // consistent with the explicit transport solution49: divU*alpha150: + vDotcAlphal

Page 26: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

12 Program Code and Usage of the Solver

51: );

The two source terms volScalarField Su and volScalarField Sp represent the sources due to the differ-ence between condensation and vaporisation and due to convective transport of the water phase, respectively.After forming and establishing all fields necessary for the MULES solver that is supplied with OpenFOAM[9, MULES], it is run. The MULES code is described as a “Multidimensional universal limiter with explicitsolution”, which solves convective-only transport equations with upper and lower limits, as required by theα-transport equation. The call for the MULES solver is given by

55: MULES::implicitSolve(geometricOneField(), alpha1, phi, phiAlpha, Sp, Su, 1, 0);

The next step is to correct the mass flux for the new found α-values. Which is done in line 57:

57: rhoPhi +=58: (runTime.deltaT()/totalDeltaT)59: *(phiAlpha*(rho1 - rho2) + phi*rho2);

After the correction loop, the condensation rate is written into the condensation rate field, which can be usedat a later stage, for example within the source term of the temperature equation.

63:

64:

65: Pair<tmp<volScalarField> > mDotAlphal =66: twoPhaseProperties->mDotAlphal();67: const volScalarField& mDotcAlphal = mDotAlphal[0]();68: mDotCondense = mDotcAlphal*(1-alpha1); // multiply by (1-alpha1) because given back that way

After leaving the alphaEqn.H file the mixture density is updated with the appropriate α values, as line 52in the alphaEqnSubCycle.H shows.

53: rho == alpha1*rho1 + (scalar(1) - alpha1)*rho2;

3.1.2 Velocity Equation Code

After solving the phase continuity the equation for solving the velocity distribution is set up in UEqn.H. Dueto the coupling of the velocity and pressure equation, the velocity equation is only set up, but not solvedinstantly, as can be seen below.

01: surfaceScalarField muEff02: (03: "muEff",04: twoPhaseProperties->muf()05: + fvc::interpolate(rho*turbulence->nut())06: );07:

08: fvVectorMatrix UEqn09: (10: fvm::ddt(rho, U)11: + fvm::div(rhoPhi, U)12: - fvm::Sp(fvc::ddt(rho) + fvc::div(rhoPhi), U)13: - fvm::laplacian(muEff, U)14: - (fvc::grad(U) & fvc::grad(muEff))15: //- fvc::div(muEff*(fvc::interpolate(dev2(fvc::grad(U))) & mesh.Sf()))16: );

The muEff scalarField, represents the mixture dynamic viscosity of the fluid. The velocity equation is set upso that all sources end up on the LHS and the whole equation is set to zero. The first, the second and thefourth term in the equation correspond to the full partial derivatives that involve u that are present in themomentum equation 2.2. The third and fifth, lines 12 and 14, respectively, are the negative of part of the

Page 27: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

The Solver Code Explained 13

product rule of differentiation in order to obtain only the derivative with respect to u.

Consider the following derivative as it is given in line 10,

d(ρ · u)

dt= u

dt+ ρ

du

dt. (3.1)

In line 12, however, the time derivative of rho is multiplied with U and subtracted. Leaving only

ρdu

dt(3.2)

within the equation. The same is true for all the other derivatives that include rho (muEff contains amultiplication with rho in line 5). This avoids a problem that would arise due to the interface within thefield. At the interface, the density changes abruptly, in real life this is a discontinuity. Due to this abruptchange, the gradients become very steep, and would introduce velocity sources that are not actually presentacross the interface, because the fluid in front of the interface moves with the same velocity as the fluidbehind the interface.

3.1.3 Pressure Equation Code

With the velocity equation fully set up (note: velocity is not yet solved for), the solver enters the pressuresolution step within pEqn.H. The first step is to predict the velocity, since it is needed to set up the flux forthe pressure equation. This is achieved in lines 1 to 5.

01: {02: volScalarField rUA = 1.0/UEqn.A();03: surfaceScalarField rUAf = fvc::interpolate(rUA);04:

05: U = rUA*UEqn.H();

At first the central coefficient of the velocity equation matrix are retrieved and inverted (line 2), whereUEqn.A() give the central coefficients [9, fvMatrix]. Line 5 then predicts the velocity by multiplying thereciprocal of the central coefficients with the operation source from the same matrix.

With the predicted velocity the flux that depends solely on the velocity is created.

07: surfaceScalarField phiU08: (09: "phiU",10: (fvc::interpolate(U) & mesh.Sf())11: + fvc::ddtPhiCorr(rUA, rho, U, phi)12: );

The term ddtPhiCorr() introduces a correction for the divergence of the face velocity field (the velocityfield was interpolated from cell central stored to cell face stored) by taking out the difference between theinterpolated velocity and the real flux [9].

Within the next step, the complete flux is constructed, by taking into account not only the flux due tovelocity, but also due to other forces.

16: phi = phiU +17: (18: fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf()19: + fvc::interpolate(rho)*(g & mesh.Sf())20: )*rUAf;

where the first term accounts for the flux due to velocity, the second term accounts for the interfacial forces(sigmaK) and the third term account for buoyancy forces (ρ · g).

After setting up the flux, the sources due to the phase change are set up. This is done in lines 22 to 25.

Page 28: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

14 Program Code and Usage of the Solver

22: Pair<tmp<volScalarField> > vDotP = twoPhaseProperties->vDotP();23: const volScalarField& vDotcP = vDotP[0]();24: const volScalarField& vDotvP = vDotP[1]();

Following getting the necessary values for the source, the pressure equation is set up. This is done in afor-loop, which calls different steps depending on the number of iterations and how far the for-loop hasprogressed. The steps in line 38 and 47 are always performed, and are necessary to solve the problem as theyrepresent the final solving and the correction of the flux, respectively.

26: for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)27: {28: fvScalarMatrix pEqn29: (30: fvc::div(phi) - fvm::laplacian(rUAf, p)31: - (vDotvP - vDotcP)*pSat + fvm::Sp(vDotvP - vDotcP, p)32: );33:

34: pEqn.setReference(pRefCell, pRefValue);35:

36: if (corr == nCorr-1 && nonOrth == nNonOrthCorr)37: {38: pEqn.solve(mesh.solver(p.name() + "Final"));39: }40: else41: {42: pEqn.solve(mesh.solver(p.name()));43: }44:

45: if (nonOrth == nNonOrthCorr)46: {47: phi += pEqn.flux();48: }49: }

Finally, an updated velocity field is calculated by only adding/removing the change that was made to phi,without the contribution to phi due to the velocity field (phiU).

3.2 The Energy Equation Problem

For the energy equation, no solution could be found to implement it for one side only. The theory behindthe equation assumes that a discrete interface is available within the code. This, however, is not the casewith the framework provided. The solver is prepared to be compiled with an energy equation added to thesource code and has the necessary switches built-in on the user side. Nevertheless, at this point the energyequation it not functional and it might be necessary to provide a two equation model in order to implementthe energy equation.

If an implementation can be found, it only needs to be programmed into the TEqn.H file and the coderecompiled.

3.3 The Phase Change Model Classes

The phase change model classes, AlbaNovaCombustion and AlbaNovaInterface directly inherit from thebase class phaseChangeTwoPhaseMixture, which is delivered with the OF package. The class provides virtualfunctions for the functions mDotAlphal() and mDotP(), which give the mass flows between the phases as apair. A virtual function is a function that can be overwritten on inheritance [13]. Within the scope of thissolver development, only the mass flow from the vapor to the liquid side is modeled, whereas the flow inopposite direction is set to 0. The pairing of those mass flows was not completely removed in order to further

Page 29: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

The Phase Change Model Classes 15

develop the model to include evaporation due to boiling or alternative mechanisms.

Both functions return mass flow rates as a coefficient to be multiplied with a pressure term (mDotP()) or an α-term (mDotAlphal()). mDotP() is used to calculate the pressure changes that occur due to this condensationmass flow, whereas mDotAlphal() serves its purpose in the bounded α-phase transport equation. Thefunctions were overwritten to include the temperature based phase change models described in chapter2. These mass flow function have a non-virtual counterpart, which gives back the volume flow rates ascoefficients, instead of the mass flow rates. This is necessary since, as described in the theory section, thefluid dynamical framework is based on volume continuity.

In figure 3.2 the class diagram for the two new classes AlbaNovaInterface and AlbaNovaCombustion areshown. As one can see, the models directly inherit most of their functions from the base class. There are noextra public functions implemented, but the virtual functions were overwritten, as described before. For theinterface model, two new private functions have been added, which calculate the heat transfer coefficient,hCoeff(), and the heat transfer area, interfaceArea(). The decision to run separate functions for thesetwo parameters is based on the fact, that with this method, the underlying models are easily exchangeable.The full source code of the two models can be found in appendix B and appendix C, respectively.

AlbaNovaCombustion- combFrequency_ : dimensionedScalar- Tsat_ : dimensionedScalar- Tinf_ : dimensionedScalar- ifg_ : dimensionedScalar- cp_ : dimensionedScalar- mcCoeff_ : dimensionedScalar

AlbaNovaInterface- lambdaF_ : dimensionedScalar- Tsat_ : dimensionedScalar- Tinf_ : dimensionedScalar- ifg_ : dimensionedScalar- charLength_ : dimensionedScalar- g_ : dimensionedScalar- mcCoeff_ : dimensionedScalar- interfaceArea() : tmp<volScalarField>- hCoeff() : tmp<volScalarField>

phaseChangeTwoPhaseMixture# phaseChangeTwoPhaseMixtureCoeffs_ : dictionary# pSat_ : dimensionedScalar+ phaseChangeTwoPhaseMixture()+ ~phaseChangeTwoPhaseMixture()+ pSat() : dimensionedScalar+ virtual mDotAlphal() : Pair<tmp<volScalarField> >+ virtual mDotP() : Pair<tmp<volScalarField> >+ vDotAlphal() : Pair<tmp<volScalarField> >+ vDotP() : Pair<tmp<volScalarField> >+ correct()+ virtual read() : bool

Figure 3.2: Class diagram of the AlbaNova phase change models with inheritance from the base classphaseChangeTwoPhaseMixture. “-” denotes private attribute/operation, “#” denotes protected attribute/operationand “+” denotes public attribute/operation.

3.3.1 Functions of AlbaNovaInterface

The first function that was newly written for AlbaNovaInterface is for the heat transfer area A, as outlinedbelow.

069: Foam::tmp<Foam::volScalarField>070: Foam::phaseChangeTwoPhaseMixtures::AlbaNovaInterface::interfaceArea() const071: {072: // return the interfacial area based on model for interfacial area073: // returns dimensions Area074:

075: // model based on regular volume cells, taking the largest cut area076: // as maximum for area, linear increase and decrease with alpha077: const volScalarField& cellVolume =078: alpha1 .db().lookupObject<volScalarField>("cellVolu");079: volScalarField limitedAlpha1 = min(max(alpha1 , scalar(0)), scalar(1));080:

081: const dimensionedScalar

Page 30: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

16 Program Code and Usage of the Solver

082: areaFactor("areaFactor",dimensionSet(0,2,0,0,0,0,0), 0.0);083:

084: volScalarField interfaceArea = alpha1 * areaFactor;085: volScalarField maxArea = alpha1 * areaFactor;086:

087: maxArea = sqrt(3.0)*pow(cellVolume,(2.0/3.0));088: return tmp<volScalarField>089: (090: (neg(limitedAlpha1-0.5)*maxArea*2.0*limitedAlpha1) +091: (pos(limitedAlpha1-0.5)*maxArea*(-2.0*( limitedAlpha1 - 1.0)))092: );093:

094: }

Since this class is not part of the runtime environment, it can only gain access to variables via input or viainput variables, or they need to be created somewhere along the programming code. This means that thecell volume cellVolu, needs to be accessed via the passed variable alpha1. The variable contains a database that can give access to the run time variables. The access to those is created in lines 77 and 78. Afterthis, two new volume scalar fields are created to store the interface and maximum area of the each cell, theyare initialized with 0.

The other newly introduced function is the function to calculate the heat transfer coefficient. The heattransfer coefficient is based on equation 2.15. The function is given by the following.

096: Foam::tmp<Foam::volScalarField>097: Foam::phaseChangeTwoPhaseMixtures::AlbaNovaInterface::hCoeff() const098: {099: // from [Bejan, Convection heat transfer, 1995]100:

101: return102: (103: 1.079 * lambdaF / charLength * pow(104: (pow3(charLength ) * ifg * g * (rho1()-rho2()) ) /105: (lambdaF * nuModel1().nu() * (Tsat - Tinf ) ) , 0.2 )106: );107: }

3.4 Usage of interPhaseChangeCondenseTempFoam

For the following section it is assumed the reader has a basic understanding of how to set up simulation casesin OF, as only the most important steps for setting up a case for the new solver are explained. For moreinformation on how to set up cases, the reader is also referred to the user guide of OF [10, ch. 1 and ch. 2]and the test cases on the CD.

Each of the models has its own set of parameters that are to be adjusted depending on the case that is run.Three files need to be checked for consistency. The first one if the transportDict file, which contains all pa-rameters concerning water and steam properties, as well as general fluid properties and switches. Both modelsuse the general switches and overall fluid properties. The phases need their respective density and kinematicviscosity set, where phase one is the continuous phase. The switch for phaseChangeTwoPhaseMixture canbe set to either AlbaNovaInterface or to AlbaNovaCombustion, as those are the only models that areavailable with the solver. For the coefficient for each model tables 3.1 and 3.2 are to be consulted for theAlbaNovaInterface and AlbaNovaCombustion model, respectively. The switch for the temperature equation,temperatureEquation needs to be set to off, since the equation has not been implemented yet.

In order to have the solver work properly, the solvers for the following variables need to be specified withinthe fvSolution dictionary: alpha1, U, p, T (only in case the solver needs to run the temperature equation,meaning temperature is switched on), pCorr, pFinal and PISO. Also, relaxation factors may be specified foralpha1, U, p and T, but these are optional.

With each solver, certain schemes need to be specified. The specification for the schemes can be found within

Page 31: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

Usage of interPhaseChangeCondenseTempFoam 17

Table 3.1: Input coefficient for AlbaNovaInterface with sample values for ambient conditions. The dimensionscorrespond to the dimensions that need to be given to OF.

Label Dimensions Value Name

lambdaF [1 1 -3 -1 0 0 0] 0.6 Thermal conductivity of waterTsat [0 0 0 1 0 0 0] 373 Saturation temperatureTinf [0 0 0 1 0 0 0] 293 Bulk temperature waterifg [0 2 -2 0 0 0 0] 2256.4e3 Latent heat

charLength [0 1 0 0 0 0 0] 0.18 Characteristic lengthgravity [0 1 -2 0 0 0 0] 9.81 Gravitational acceleration

nuL [0 2 -1 0 0 0 0] 1.004e-6 Kinematic viscosity watercp [0 2 -2 -1 0 0 0] 4.1813e3 Heat capacity waterPr [0 0 0 0 0 0 0] 5.5 Laminar Prandtl number

Table 3.2: Input coefficient for AlbaNovaCombustion with sample values for ambient conditions. The dimensionscorrespond to the dimensions that need to be given to OF.

Label Dimensions Value Name

combFrequency [0 0 -1 0 0 0 0] 0.8 Combustion frequencycp [0 2 -2 -1 0 0 0] 4.1813e3 Heat capacity water

Tsat [0 0 0 1 0 0 0] 100 Saturation temperatureTinf [0 0 0 1 0 0 0] 20 Bulk temperature waterifg [0 2 -2 0 0 0 0] 2256.4e3 Latent heat

lambdaF [1 1 -3 -1 0 0 0] 0.5 Thermal conduction water

the provided test case within system/fvSchemes.

Page 32: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

18 Program Code and Usage of the Solver

Page 33: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

CHAPTER 4

SENSITIVITY ANALYSIS

The following chapter describes the sensitivity analysis conducted on the code that is described in chapter3. The main input parameter that are believed to change the behavior of the code are the velocity, the cellsize and the time step. The OF framework handles automatic time step adjustment on runtime, but this canalso be switched off.

4.1 The Test Cases

Both models are tested and compared. As for the combustion model, the combustion frequency needs tobe tuned to a value, so that the condensation rate is approximately the same as it is for the interface areamodel. This is done only once for the base case and kept at this value for all following cases. After the basecases have been set up, the input parameters concerning the condensation and transport behavior will notbe altered. The observed quantity is the integrated condensation rate over all cells, m+.

The sensitivity analysis consists of 18 test cases. All tests are carried out on the same model with differentgrid sizes, different inlet velocities and different time step setups. Each of the tests is run with three differentparameter values, except for the velocity. There three different velocities are chosen and a fourth velocityfrom the grid convergence test is added.

Except for the time step dependency tests, the so called Courant number is kept at 0.25. The Courantnumber gives the ratio of the time step, ∆t, to the characteristic convection time u/∆x [5]. The ratio is usedto automatically determine the time step on runtime without input by the user.

In figure 4.1 the model that is used throughout the tests is shown. The model is based on the POOLEXfacility set up with a reduced main tank diameter from 2.4m to 1.33m and a reduced height of the wet wellcompartment from 3.61 to 3.11m [11]. This was done in order to decrease the number of cells needed todescribe the model, since the steam is not expected to leave the pipe which reduces the impact on the meshsurrounding the pipe.

4.1.1 Grid Convergence Index

For the grid test a parameter called the grid convergence index (GCI) is calculated based on the methodgiven by Celik [4] as outlined below. The first step is to specify a representative grid size, l, by

l =

[1

N

N∑n=1

Vn

]1/3, (4.1)

where N is the total number of cells, and Vn is the volume of the nth cell. A sum is used to describe the totalvolume, because with different mesh sizes the total volume of the domain changes slightly, due to better orworse representation of the edges. The different mesh sizes will be considered, where the l3 > l2 > l1 and theratios between to grid sizes is above 1.3. The ratios are given by r21 = l2/l1 and r32 = l3/l2. The apparent

19

Page 34: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

20 Sensitivity Analysis

Ø 1.33m

3.1

1m

2.5

5m

Ø 0.22m

0.2m

Water Atmosphere

Inlet

Pipe

Steam

Figure 4.1: Simulation model used for all simulation, based on the POOLEX facility set up with reduced volume.

order, p, of the of the code can be calculated by the following three equation using a fixed point iteration.

p =1

ln(r21)|ln |ε32/ε21|+ q(p)| , (4.2)

where q(p) is given by

q(p) = ln

(rp21 − srp32 − s

)(4.3)

and s being given as

s = 1 · sign(ε32/ε21) , (4.4)

where the absolute errors between the global variables of different grids are ε32 = m+3 − m+

2 and ε21 =m+

2 − m+1 . The condensation rates are obtained on the different grid size test runs. The next step is to

calculate the extrapolated values by

m+,21ext =

rp21m+1 − m

+2

rp21 − 1. (4.5)

In order to now find the GCI, the approximate relative error between the finest and second finest grid arecalculated, by

e21a =

∣∣∣∣m+1 − m

+2

m+1

∣∣∣∣ (4.6)

and inserted into the equation giving the grid convergence index,

GCI21fine =1.25e21arp21 − 1

. (4.7)

The GCI21fine gives the error band for the calculated global variable on the finest grid [12], in this case thecondensation rate, m+.

Page 35: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

The Test Cases 21

4.1.2 Velocity and Time Step Dependency Test

In case of the velocity dependency test, the influence of the velocity on the condensation rate is examined.This is done by changing the inlet velocity. It is expected that due to higher velocities a break up of theinterface can occur, which might change the condensation behavior. One lower and two higher velocity areselected. The lower velocity is set to 0.05 m/s, which simulates falling steam. The higher velocities are 0.2m/s and 0.5 m/s, which simulate a slowly pumped insertion of steam into the water basin.

In the time step dependency test, the time step behavior is changed from automatic to fixed time steps.The influence of this change on the condensation rate is also examined. From the aforementioned tests withautomatic time step control, it is known that in order to fulfill a Courant number of 0.25 on the finest grid,a time step of 0.001s is sufficient. The chosen time steps are 0.001, 0.005 and 0.01.

4.1.3 The Test Cases

All test cases run with a predetermined set of parameters for it transport properties. The transport propertieswere acquired from the IF97 database for water properties [14]. The pressure was chosen close to ambientand a sub-cooling of 80K was chosen. The transport properties are listed in table 4.1.

Table 4.1: Transport properties of the test cases, from the IF97 data base [14].

Property Value

psat 1.1 barTsat 375.29 Kρl 997.71 kg/m3

ρv 0.65 kg/m3

ifg 2250.4·103 J/kgTl 295.29 Kλl 0.603 W/m/Kcp 4183.3 J/kg/Kνl 9.5·10−7 m2/sνv 1.9·10−5 m2/s

As mentioned before, the combustion model was tuned and the combustion frequency was set to 0.8 Hz. Thecharacteristic length for the heat transfer coefficient, L, was set to the pipe diameter, 0.22m.

The chosen grids are given in table 4.2 and the test matrix is given in table 4.3. The ratios between the gridsare given as r21 = 1.3089 and r32 = 1.6348. Where the indices represent the grid numbers which are givenin table 4.2.

Table 4.2: Grid sizes for obtaining the GCI, including the representative grid size in m.

Grid name Cell count Representative grid size [m]

Grid 1 626914 1.981 · 10−2

Grid 2 279808 2.593 · 10−2

Grid 3 63964 4.239 · 10−2

Page 36: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

22 Sensitivity Analysis

Table 4.3: Test matrix, where auto means that the time step is regulated automatically corresponding to a Courantnumber of 0.25

Case # Model Grid Inlet velocity Time step

1 Interface 3 0.1m/s auto2 Interface 2 0.1m/s auto3 Interface 1 0.1m/s auto4 Combustion 3 0.1m/s auto5 Combustion 2 0.1m/s auto6 Combustion 1 0.1m/s auto7 Interface 1 0.05m/s auto8 Interface 1 0.2m/s auto9 Interface 1 0.5m/s auto10 Interface 1 0.1m/s 0.00111 Interface 1 0.1m/s 0.00512 Interface 1 0.1m/s 0.0113 Combustion 1 0.05m/s auto14 Combustion 1 0.2m/s auto15 Combustion 1 0.5m/s auto16 Combustion 1 0.1m/s 0.00117 Combustion 1 0.1m/s 0.00518 Combustion 1 0.1m/s 0.01

Page 37: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

CHAPTER 5

RESULTS

This chapter treats the results of the sensitivity analysis. It treats all tests separately. Firstly, the GCI testis presented, followed by the tests for velocity and time step size dependency.

5.1 GCI Test Results

The grid convergence test runs each ran for 5 seconds real time over which the global mass condensationrate, m+, was recorded and averaged over time. The average is used, because as one can see from the graphsof the condensation rate against time in figure 5.1, the condensation rate changes with passing through thecells in a sinusoidal fashion. This makes it hard to compare the various time steps and therefore an averagedapproach is considered.

From the graph it becomes apparent that with increasing grid density, the global condensation rate of theinterface model varies about a constant value. This value is reached shortly after initiating the simulation,with a respective shorter time for a finer grid. For the combustion model however, no stable value is reached.The condensation rate rises steadily over the 5 seconds of the simulation with spikes which are similar to thesinusoidal variations seen in interface model graph in figure 5.1a.

The calculated apparent order of the interface model and the combustion model are 5.7 and 3.58, respectively.The calculated GCI for the combustion model results in 82.35% and for the interface model in 2.02%, meaningthat for the finest grid with the combustion model, the acquired value is accurate to 82.35% and for theinterface model to 2.02%, neglecting the computer rounding errors. The full test results can be viewed intable 5.1.

Table 5.1: Test results of the grid convergence index test.

Case # Avg. m+ [kg/s]

Interface model

1 1.933 · 10−3

2 2.3897 · 10−3

3 2.2574 · 10−3

Combustion model

4 1.5137 · 10−3

5 1.774 · 10−3

6 0.8576 · 10−3

23

Page 38: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

24 Results

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.5

1

1.5

2

2.5

3x 10

−3

Total Time [s]

Tota

l C

ondensation R

ate

, [k

g/s

]

Grid 3, case 1

Grid 2, case 2

Grid 1, case 3

Time smoothed case 2

Time smoothed case 3

(a) Interface Model

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.5

1

1.5

2

2.5x 10

−3

Total Time [s]

Tota

l C

ondensation R

ate

, [k

g/s

]

Grid 3, case 4

Grid 2, case 5

Grid 1, case 6

(b) Combustion Model

Figure 5.1: Graphs showing the condensation rate vs. time on different grids used for GCI calculations. In figure(a) the time smoothed combustion rates have been added for comparison.

5.2 Velocity Dependence Test Results

As for the other test runs, the velocity test ran for 5 second, over which the average condensation rateis calculated, these results are listed in table 5.2. The three different velocities chosen are complimentedby a fourth, which is taken from the GCI tests (cases 3 and 6). Figure 5.2 shows the development of thecondensation rate over time.

One can see that with higher velocities, the condensation rate is larger as well. This can be explained bylooking at the distribution of the interface in figures 5.3 and 5.4. Both models base their condensation on theproperty of 0 < α < 0, meaning with more cells being occupied by α unequal to unity or zero, condensationoccurs at a larger rate.

For the interface model, a theoretical maximum condensation rate can be calculated. This maximum is4.429·10−4kg/s. This mass flow corresponds to an inlet velocity of 1.79·10−2m/s. As one can see, thetheoretical maximum is lower than than the maximum that is obtained during the lowest velocity of 0.05m/s,which results in a steady condensation.

Table 5.2: Test results of the velocity dependency test.

Case # Avg. m+ [kg/s]

Interface model

3 2.2574 · 10−3

7 1.8246 · 10−3

8 2.8212 · 10−3

9 3.8715 · 10−3

Combustion model

6 0.8576 · 10−3

13 0.6746 · 10−3

14 1.105 · 10−3

15 1.6147 · 10−3

5.3 Time Step Dependence Test Results

For the analysis of the time step dependency, four different cases are compiled for each model; three differenttime steps and the auto time step run from the GCI tests. The results of the average condensation rate isshown in table 5.3.

Page 39: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

Time Step Dependence Test Results 25

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.5

1

1.5

2

2.5

3

3.5

4

4.5x 10

−3

Total Time [s]

Tota

l C

ondensation R

ate

, [k

g/s

]

Interface

Case 7, 0.05m/s

Case 3, 0.1m/s

Case 8, 0.2m/s

Case 9, 0.5m/s

Time smoothed rate

Theoretical Max

(a) Interface Model

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2x 10

−3

Total Time [s]

Tota

l C

ondensation R

ate

, [k

g/s

]

Case 13, 0.05m/s

Case 6, 0.1m/s

Case 14, 0.2m/s

Case 15, 0.5m/s

(b) Combustion Model

Figure 5.2: Graphs showing the global condensation rate development over time depending on different inlet veloc-ities. In figure (a) the time smoothed condensation rates as well as the theoretical maximum condensation rate havebeen added for comparison.

Figure 5.3: The interface distribution during the velocity dependency tests at time 2.5 s after initiation for all fourcases for the interface model.

In case of the interface model, it is easily recognized, that a change of the time step in this case, does nothave such a big impact. In fact, the change in condensation rate between case 10 and 11 is only 0.49% andbetween case 10 and 12 only 0.54%, whereas the time step is multiplied by 5 and 10, respectively. This smallchange is also verified by looking at the graph of the condensation rate versus time as depicted in figure 5.5a.

For the combustion model, the behavior is slightly different. With increasing time step size, the condensationrate increases as well. After some time into the simulation, the condensation rate starts to divert from theoriginal value that is obtained with an auto adjusted time step behavior, as can be seen in figure 5.5b.

Page 40: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

26 Results

Figure 5.4: The interface distribution during the velocity dependency tests at time 2.5 s after initiation for all fourcases for the combustion model.

Table 5.3: Overview of the average condensation rates for the time step dependency test including one auto adjustedtime step run.

Case # Avg. m+ [kg/s]

Interface model

3 2.2574 · 10−3

10 2.2593 · 10−3

11 2.2482 · 10−3

12 2.2471 · 10−3

Combustion model

6 0.8576 · 10−3

16 0.8541 · 10−3

17 0.8732 · 10−3

18 0.8809 · 10−3

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.5

1

1.5

2

2.5

3x 10

−3

Total Time [s]

Tota

l C

ondensation R

ate

, [k

g/s

]

Case 10, ∆ t = 0.001s

Case 11, ∆ t = 0.005s

Case 12, ∆ t = 0.01s

Case 3, auto

(a) Interface Model

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.2

0.4

0.6

0.8

1

1.2x 10

−3

Total Time [s]

Tota

l C

ondensation R

ate

, [k

g/s

]

Case 16, ∆ t = 0.001s

Case 17, ∆ t = 0.005s

Case 18, ∆ t = 0.01s

Case 6, auto

(b) Combustion Model

Figure 5.5: Graphs showing the global condensation rate development over time depending on different time steps,where auto means that the time step is adjusted with a given Courant number (0.25).

Page 41: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

CHAPTER 6

CONCLUSION AND RECOMMENDATIONS

This chapter presents the conclusions that have been drawn from the results with respect to the theorychapter. The latter part of this chapter presents the recommendations and how further research can beconducted using the results of this work.

6.1 Conclusions on the Phase Change Models

The first conclusion that can be drawn is that the one equation model that is implemented with the VOFmethod employed by OF is unsuitable for implementing the energy equation. The interface spread that hasbeen observed in the velocity dependency tests (see section 5.2) of both models, makes the method that wassupposed to be employed invalid. For this to work, a sharper interface must be present.

The results of the GCI, the velocity dependency and the time step dependency test give an indication of thephysical validity of the proposed models. The range of condensation rates is close to what is expected fromprevious experiments, like TransAT at LUT, Finland [2]. However, due to the absence of extensive test data,the validity of the models cannot be completely confirmed.

The interface model shows great time step stability, because even with a time step increase by one magnitude,the results only differ by 0.54% from the smallest time step used, which gives a Courant number of approxi-mately 0.25. The grid convergence index shows that convergence for finer grids exists, with a GCI of 2.02%for the finest grid used within the tests carried out. However, with higher velocities, the condensation rateincreases with higher velocities. This is a valid physical behavior (higher velocities give rise to turbulence,which increases the heat transfer coefficient), but should have not occurred with the developed model. Thebehavior stems from the fact, that with higher velocity, there is a higher numerical diffusion from the originalVOF framework employed by OF. Overall, including visual inspection, it can be said that the developedinterface model behaves in a physical sense and can be used for further development.

The combustion model on the other hand does not show a physical behavior. It was not possible to show agrid convergence. The GCI remained at 82.35% for the finest grid. In addition, there is no stable condensationrate present, as should be expected. This means that the current implementation of the combustion modelis not capable of predicting direct contact condensation behavior.

6.2 Recommendations

There are several aspects that need to be addressed in further work on this topic. The first one being thevalidation of the interface model with data from experiments. This is crucial, since otherwise the model cannot be used for condensation prediction. After validation or even during validation of the interface modelwith data from experiments reflecting the conditions it is implemented for now (low velocity steam injection),improved models for the heat transfer and the interface model should be devised.

It is envisioned that an improved interface model includes information about the angle at which the interface

27

Page 42: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

28 Conclusion and Recommendations

advanced through the cell in order to have a better estimate of the interface area within a cell. The next stepwould be to write a new class for the heat transfer coefficient in order to chose the coefficient modeling beforethe simulation starts. This however, can also lead to an automatic selection of the heat transfer coefficientmodel based on velocity consideration by the phase change model itself.

The combustion model approach should not be completely disregarded at this point. With a model forthe so-called combustion frequency, based on velocity, pressure, temperature and/or additional information,which can be retrieved from within the simulation, this approach might lead to a valid model, that doesneither need to include a complicated heat transfer coefficient model, nor a model for the interface area.

Further work also includes the implementation of the energy equation, which is crucial, since the predictionof the temperature within the water is of great importance for safety systems. As stated before, this mightonly be possible by implementing the devised phase change model into a two-equation model, in which everyfluid is treated separately.

Page 43: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

BIBLIOGRAPHY

[1] Henryk Anglart. Thermal Hydraulics in Nuclear Systems (KTH, Stockholm, 2008).

[2] Henryk Anglart, Djamel Lakehal, Vesa Tanskanen, and Mikko Ilvonen. BWR thermal-hydraulic issues:dryout, core transients and steam injection to pressure-suppression pool, Dec. 2009. NURISP presenta-tion, retrieved from personal conversation with Henryk Anglart.

[3] Adrian Bejan. Convection heat transfer (Wiley, New York, 1995), 2nd ed. edn. ISBN 9780471579724.

[4] Ismail B. Celik. Procedure for estimation and reporting of discretization error in CFD applications.Journal of Fluids Engineering, 130, Jul. 2008. Editorial of JFE, Retrieved March 12, 2010.

[5] Joel Ferziger. Computational methods for fluid dynamics (Springer, Berlin ;;New York, 2002), 3rd, rev.ed. edn. ISBN 9783540420743.

[6] C Hirt and B Nichols. Volume of fluid (VOF) method for the dynamics of free boundaries1. Journal ofComputational Physics, 39(1):pp. 201–225, 1981. ISSN 00219991. doi:10.1016/0021-9991(81)90145-5.

[7] M Kaviany. Principles of heat transfer (Wiley, New York, 2002). ISBN 9780471434634.

[8] R Kunz. A preconditioned NavierStokes method for two-phase flows with application to cavitation predic-tion. Computers & Fluids, 29(8):pp. 849–875, 2000. ISSN 00457930. doi:10.1016/S0045-7930(99)00039-0.

[9] OpenCFD Limited. OpenFOAM programmer’s c++ documentation.http://foam.sourceforge.net/doc/Doxygen/html/, 2010. Retrieved May 10, 2010.

[10] OpenCFD Limited. OpenFOAM user guide. http://www.openfoam.com/docs/user/, 2010. RetrievedMay 05, 2010.

[11] Eija Puska. Safir2010 : the Finnish research programme on nuclear power plant safety 2007-2010 :interim report (VTT, [Espoo], 2009). ISBN 9789513872663.

[12] John W. Slater. Examining spatial (Grid) convergence. http://www.grc.nasa.gov/WWW/wind/valid/

tutorial/spatconv.html, Jul. 2008. Retrieved May 25, 2010.

[13] Bjarne Stroustrup. Programming : principles and practice using C++ (Addison-Wesley, Upper SaddleRiver NJ, 2009). ISBN 9780321543721.

[14] Milton Venetos. Excel engineering. http://www.x-eng.com/, 2007. Downloadable database.

29

Page 44: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

30 Bibliography

Page 45: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

APPENDIX A

MAIN PROGRAM SOURCE CODE

001: /*--–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–--*\002: ========= |003: \\ / F ield | OpenFOAM: The Open Source CFD Toolbox004: \\ / O peration |005: \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.006: \\/ M anipulation |007: --–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–008: License009: This file is part of OpenFOAM.010:

011: OpenFOAM is free software; you can redistribute it and/or modify it012: under the terms of the GNU General Public License as published by the013: Free Software Foundation; either version 2 of the License, or (at your014: option) any later version.015:

016: OpenFOAM is distributed in the hope that it will be useful, but WITHOUT017: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or018: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License019: for more details.020:

021: You should have received a copy of the GNU General Public License022: along with OpenFOAM; if not, write to the Free Software Foundation,023: Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA024:

025: Application026: interPhaseChangeCondenseTempFoam027:

028: Description029: Solver for 2 incompressible, immiscible fluids with condensation030: phase-change. Uses a VOF (volume of fluid) phase-fraction based interface031: capturing approach. It also incorporates the solution of the energy032: equation.033:

034: Based on interPhaseChangeCondenseFoam and the phase change models associated035: with this solver.036:

037: The momentum and other fluid properties are of the ”mixture” and a038: single momentum equation is solved. The energy equation is only solved for039: the water phase.040:

041: Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.

31

Page 46: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

32 Main Program Source Code

042:

043: \*--–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–--*/044:

045: #include "fvCFD.H"

046: #include "MULES.H"

047: #include "subCycle.H"

048: #include "interfaceProperties.H"

049: #include "phaseChangeTwoPhaseMixture.H"

050: #include "turbulenceModel.H"

051:

052: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //053:

054: int main(int argc, char *argv[])055: {056: #include "setRootCase.H"

057: #include "createTime.H"

058: #include "createMesh.H"

059: #include "readGravitationalAcceleration.H"

060: #include "readPISOControls.H"

061: #include "initContinuityErrs.H"

062: #include "createFields.H"

063: #include "readTimeControls.H"

064: #include "correctPhi.H"

065: #include "CourantNo.H"

066: #include "setInitialDeltaT.H"

067:

068: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //069:

070: Info<< "\nStarting time loop\n" << endl;071:

072: while (runTime.run())073: {074: #include "readPISOControls.H"

075: #include "readTimeControls.H"

076: #include "CourantNo.H"

077: #include "setDeltaT.H"

078:

079: runTime++;080:

081: Info<< "Time = " << runTime.timeName() << nl << endl;082:

083: #include "alphaEqnSubCycle.H"

084:

085: turbulence->correct();086:

087: // --- Outer-corrector loop088: for (int oCorr=0; oCorr<nOuterCorr; oCorr++)089: {090: #include "UEqn.H"

091:

092: // --- PISO loop093: for (int corr=0; corr<nCorr; corr++)094: {095: #include "pEqn.H"

096: }097:

098: #include "continuityErrs.H"

099: }100:

101: if(temperatureEquation == "on")

Page 47: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

33

102: {103: #include "TEqn.H"

104: };105:

106: twoPhaseProperties->correct();107:

108: runTime.write();109:

110: Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"

111: << " ClockTime = " << runTime.elapsedClockTime() << " s"

112: << nl << endl;113: }114:

115: Info<< "End\n" << endl;116:

117: return 0;118: }119:

120:

121: // ************************************************************************* //122:

Page 48: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

34 Main Program Source Code

Page 49: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

APPENDIX B

SOURCE CODE COMBUSTION MODEL (ALBANOVACOMBUSTION)

001: /*--–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–--*\002: ========= |003: \\ / F ield | OpenFOAM: The Open Source CFD Toolbox004: \\ / O peration |005: \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.006: \\/ M anipulation |007: --–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–008: License009: This file is part of OpenFOAM.010:

011: OpenFOAM is free software; you can redistribute it and/or modify it012: under the terms of the GNU General Public License as published by the013: Free Software Foundation; either version 2 of the License, or (at your014: option) any later version.015:

016: OpenFOAM is distributed in the hope that it will be useful, but WITHOUT017: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or018: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License019: for more details.020:

021: You should have received a copy of the GNU General Public License022: along with OpenFOAM; if not, write to the Free Software Foundation,023: Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA024:

025: \*--–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–--*/026:

027: #include "AlbaNovaCombustion.H"

028: #include "addToRunTimeSelectionTable.H"

029:

030: // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //031:

032: namespace Foam033: {034: namespace phaseChangeTwoPhaseMixtures035: {036: defineTypeNameAndDebug(AlbaNovaCombustion, 0);037: addToRunTimeSelectionTable(phaseChangeTwoPhaseMixture, AlbaNovaCombustion,038: components);039: }040: }041:

35

Page 50: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

36 Source Code Combustion Model (AlbaNovaCombustion)

042: // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //043:

044: Foam::phaseChangeTwoPhaseMixtures::AlbaNovaCombustion::AlbaNovaCombustion045: (046: const volVectorField& U,047: const surfaceScalarField& phi,048: const word& alpha1Name049: )050: :051: phaseChangeTwoPhaseMixture(typeName, U, phi, alpha1Name),052:

053: combFrequency (phaseChangeTwoPhaseMixtureCoeffs .lookup("combFrequency")),054: Tsat (phaseChangeTwoPhaseMixtureCoeffs .lookup("Tsat")),055: Tinf (phaseChangeTwoPhaseMixtureCoeffs .lookup("Tinf")),056: ifg (phaseChangeTwoPhaseMixtureCoeffs .lookup("ifg")),057: cp (phaseChangeTwoPhaseMixtureCoeffs .lookup("cp")),058: mcCoeff (rho1() * cp * (Tsat - Tinf ) / ifg )059:

060: {061: correct();062: }063:

064:

065: // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //066:

067: Foam::Pair<Foam::tmp<Foam::volScalarField> >068: Foam::phaseChangeTwoPhaseMixtures::AlbaNovaCombustion::mDotAlphal() const069: {070: volScalarField limitedAlpha1 = min(max(alpha1 , scalar(0)), scalar(1));071:

072: // create value for the second return, that it is zero but right dimensions073: const dimensionedScalar074: secondValue("2ndValue",dimensionSet(1,-3,-1,0,0,0,0),0.0);075:

076: const scalar smallValue = scalar(1e-10); // can be used to remove division by zero077:

078: return Pair<tmp<volScalarField> >079: (080:

081: // must be written in a way that (1-alpha) is missing to be multiplied082: // with (1 - alpha), might have to be a max(1-limitedAlpha1,smallValue)083: // but does not matter because it will be multiplied with (1-alpha) anyway084:

085: min(rho2()*(1-limitedAlpha1), mcCoeff *limitedAlpha1) * combFrequency086: / max(1-limitedAlpha1,smallValue),087:

088: limitedAlpha1 * secondValue * 0.0 //return value with 0 and right dimensions089:

090: );091: }092:

093: Foam::Pair<Foam::tmp<Foam::volScalarField> >094: Foam::phaseChangeTwoPhaseMixtures::AlbaNovaCombustion::mDotP() const095: {096: const volScalarField& p = alpha1 .db().lookupObject<volScalarField>("p");097: volScalarField limitedAlpha1 = min(max(alpha1 , scalar(0)), scalar(1));098: // create 2nd value for return to be 0 but right dimensions099: const dimensionedScalar100: secondValue("2ndValue",dimensionSet(0,-2,1,0,0,0,0),0.0);101: const dimensionedScalar

Page 51: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

37

102: smallPressure("smallPressure",dimensionSet(1,-1,-2,0,0,0,0),10.0); // small value forcomparison against dividing by 0103:

104: // return dimensions [s/m2]105: // return mass flow divided by pressure106: return Pair<tmp<volScalarField> >107: (108:

109: min(rho2()*(1-limitedAlpha1), mcCoeff *limitedAlpha1) * combFrequency110: / max(p, smallPressure ),111:

112: limitedAlpha1 * secondValue * 0.0 // return value with appropriate dimensions and value 0113:

114: );115: }116:

117:

118: void Foam::phaseChangeTwoPhaseMixtures::AlbaNovaCombustion::correct()119: {}120:

121:

122: bool Foam::phaseChangeTwoPhaseMixtures::AlbaNovaCombustion::read()123: {124: if (phaseChangeTwoPhaseMixture::read())125: {126: phaseChangeTwoPhaseMixtureCoeffs = subDict(type() + "Coeffs");127:

128: phaseChangeTwoPhaseMixtureCoeffs .lookup("combFrequency") >> combFrequency ; // [1/s]129: phaseChangeTwoPhaseMixtureCoeffs .lookup("Tsat") >> Tsat ;130: phaseChangeTwoPhaseMixtureCoeffs .lookup("Tinf") >> Tinf ;131: phaseChangeTwoPhaseMixtureCoeffs .lookup("ifg") >> ifg ;132: phaseChangeTwoPhaseMixtureCoeffs .lookup("cp") >> cp ;133: mcCoeff = rho1() * cp * (Tsat - Tinf ) /ifg ;134: return true;135: }136: else137: {138: return false;139: }140: }141:

142:

143: // ************************************************************************* //144:

Page 52: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

38 Source Code Combustion Model (AlbaNovaCombustion)

Page 53: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

APPENDIX C

SOURCE CODE INTERFACE MODEL (ALBANOVAINTERFACE)

001: /*--–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–--*\002: ========= |003: \\ / F ield | OpenFOAM: The Open Source CFD Toolbox004: \\ / O peration |005: \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.006: \\/ M anipulation |007: --–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–008: License009: This file is part of OpenFOAM.010:

011: OpenFOAM is free software; you can redistribute it and/or modify it012: under the terms of the GNU General Public License as published by the013: Free Software Foundation; either version 2 of the License, or (at your014: option) any later version.015:

016: OpenFOAM is distributed in the hope that it will be useful, but WITHOUT017: ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or018: FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License019: for more details.020:

021: You should have received a copy of the GNU General Public License022: along with OpenFOAM; if not, write to the Free Software Foundation,023: Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA024:

025: \*--–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–-–--*/026:

027: #include "AlbaNovaInterface.H"

028: #include "addToRunTimeSelectionTable.H"

029:

030: // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //031:

032: namespace Foam033: {034: namespace phaseChangeTwoPhaseMixtures035: {036: defineTypeNameAndDebug(AlbaNovaInterface, 0);037: addToRunTimeSelectionTable(phaseChangeTwoPhaseMixture, AlbaNovaInterface,038: components);039: }040: }041:

39

Page 54: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

40 Source Code Interface Model (AlbaNovaInterface)

042: // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //043:

044: Foam::phaseChangeTwoPhaseMixtures::AlbaNovaInterface::AlbaNovaInterface045: (046: const volVectorField& U,047: const surfaceScalarField& phi,048: const word& alpha1Name049: )050: :051: phaseChangeTwoPhaseMixture(typeName, U, phi, alpha1Name),052:

053: lambdaF (phaseChangeTwoPhaseMixtureCoeffs .lookup("lambdaF")),054: Tsat (phaseChangeTwoPhaseMixtureCoeffs .lookup("Tsat")),055: Tinf (phaseChangeTwoPhaseMixtureCoeffs .lookup("Tinf")),056: ifg (phaseChangeTwoPhaseMixtureCoeffs .lookup("ifg")),057: charLength (phaseChangeTwoPhaseMixtureCoeffs .lookup("charLength")),058: g (phaseChangeTwoPhaseMixtureCoeffs .lookup("gravity")),059: mcCoeff ( (Tsat -Tinf ) / ifg )060: {061: correct();062: }063:

064: // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //065:

066: // function to calculate the interface area when needed067: Foam::tmp<Foam::volScalarField>068: Foam::phaseChangeTwoPhaseMixtures::AlbaNovaInterface::interfaceArea() const069: {070: // return the interfacial area based on model for interfacial area071: // returns dimensions Area072:

073: // model based on regular volume cells, taking the largest cut area074: // as maximum for area, linear increase and decrease with alpha075: const volScalarField& cellVolume =076: alpha1 .db().lookupObject<volScalarField>("cellVolu");077: volScalarField limitedAlpha1 = min(max(alpha1 , scalar(0)), scalar(1));078:

079: const dimensionedScalar080: areaFactor("areaFactor",dimensionSet(0,2,0,0,0,0,0), 0.0);081:

082: volScalarField interfaceArea = alpha1 * areaFactor;083: volScalarField maxArea = alpha1 * areaFactor;084:

085: maxArea = sqrt(3.0)*pow(cellVolume,(2.0/3.0));086: return tmp<volScalarField>087: (088: (neg(limitedAlpha1-0.5)*maxArea*2.0*limitedAlpha1) +089: (pos(limitedAlpha1-0.5)*maxArea*(-2.0*( limitedAlpha1 - 1.0)))090: );091:

092: }093:

094: // function to calculate the heat transfer coefficient095: Foam::tmp<Foam::volScalarField>096: Foam::phaseChangeTwoPhaseMixtures::AlbaNovaInterface::hCoeff() const097: {098: // from [Bejan, Convection heat transfer, 1995]099:

100: return101: (

Page 55: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

41

102: 1.079 * lambdaF / charLength * pow(103: (pow3(charLength ) * ifg * g * (rho1()-rho2()) ) /104: (lambdaF * nuModel1().nu() * (Tsat - Tinf ) ) , 0.2 )105: );106: }107:

108:

109: Foam::Pair<Foam::tmp<Foam::volScalarField> >110: Foam::phaseChangeTwoPhaseMixtures::AlbaNovaInterface::mDotAlphal() const111: {112: // return dimensions [kg/m3/s]113: // return condensation divided by (1-alpha)114: const volScalarField& cellVolume =115: alpha1 .db().lookupObject<volScalarField>("cellVolu");116: volScalarField limitedAlpha1 = min(max(alpha1 , scalar(0)), scalar(1));117:

118: const scalar smallValue(1e-5); //small value to avoid division by 0119:

120: // create scalar for second value121: const dimensionedScalar122: secondValue("secondValue",dimensionSet(1,-3,-1,0,0,0,0),0.0 );123: const dimensionedScalar124: volFactor("volFactor",dimVol,1.0);125:

126: volScalarField interfaceArea = this->interfaceArea();127: volScalarField hCoeff = this->hCoeff();128:

129: Info << "Max interFaceArea: "

130: << max(interfaceArea).value() << " m2" <<endl;131: Info << "Max Heat transfer coefficient: "

132: << max(hCoeff).value() << " W/m2/K" << endl;133:

134: return Pair<tmp<volScalarField> >135: (136: // has to be divided by (1-limitedAlpha1) due to function definition137: // division (pos(-cellVolume)*volFactor + cellVolume) saves from dividing by138: // zero, because at boundary field, cellVolume = 0, division by volume is139: // to ensure that the mass transfer rate is given by kg/m3/s140:

141: (hCoeff * mcCoeff * interfaceArea)/ (142: max(1.0-limitedAlpha1, smallValue)143: * (pos(-cellVolume)*volFactor + cellVolume)),144:

145: limitedAlpha1 * 0.0 * secondValue146:

147: );148: }149:

150: Foam::Pair<Foam::tmp<Foam::volScalarField> >151: Foam::phaseChangeTwoPhaseMixtures::AlbaNovaInterface::mDotP() const152: {153: const volScalarField& p = alpha1 .db().lookupObject<volScalarField>("p");154: const volScalarField& cellVolume =155: alpha1 .db().lookupObject<volScalarField>("cellVolu");156:

157:

158: volScalarField limitedAlpha1 = min(max(alpha1 , scalar(0)), scalar(1));159: //small value for comparison in case of division by 0160: const dimensionedScalar161: smallValue("smallPressure",dimensionSet(1,-1,-2,0,0,0,0),10.0);

Page 56: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

42 Source Code Interface Model (AlbaNovaInterface)

162:

163: const dimensionedScalar164: volFactor("volFactor",dimVol,1.0);165: // create scalar for second value166: const dimensionedScalar167: secondValue("secondValue",dimensionSet(0,-2,1,0,0,0,0),0.0 );168:

169: volScalarField interfaceArea = this->interfaceArea();170: volScalarField hCoeff = this->hCoeff();171:

172: return Pair<tmp<volScalarField> >173: (174: // return dimensions [s/m2]175: // return mass flow divided by pressure176: // division (pos(-cellVolume)*volFactor + cellVolume) saves from dividing by177: // zero, because at boundary field, cellVolume = 0178: (hCoeff * mcCoeff * interfaceArea)/179: (max(p, smallValue ) * (pos(-cellVolume) * volFactor + cellVolume)),180:

181: limitedAlpha1 * 0.0 * secondValue182:

183:

184: );185: }186:

187:

188: void Foam::phaseChangeTwoPhaseMixtures::AlbaNovaInterface::correct()189: {}190:

191: bool Foam::phaseChangeTwoPhaseMixtures::AlbaNovaInterface::read()192: {193: if (phaseChangeTwoPhaseMixture::read())194: {195: phaseChangeTwoPhaseMixtureCoeffs = subDict(type() + "Coeffs");196:

197: phaseChangeTwoPhaseMixtureCoeffs .lookup("lambdaF") >> lambdaF ;198: phaseChangeTwoPhaseMixtureCoeffs .lookup("Tsat") >> Tsat ;199: phaseChangeTwoPhaseMixtureCoeffs .lookup("Tinf") >> Tinf ;200: phaseChangeTwoPhaseMixtureCoeffs .lookup("ifg") >> ifg ;201: phaseChangeTwoPhaseMixtureCoeffs .lookup("charLength") >> charLength ;202: phaseChangeTwoPhaseMixtureCoeffs .lookup("gravity") >> g ;203: mcCoeff = (Tsat -Tinf ) / ifg ;204:

205: return true;206: }207: else208: {209: return false;210: }211: }212:

213:

214: // ************************************************************************* //215:

Page 57: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

APPENDIXD

HIGH VELOCITY TEST

This appendix chapter describes a high velocity test, where the inlet velocity is increased to 10m/s from theup to 0.5m/s in previous tests. The velocity corresponds to a mass flow of 0.988kg/s. All other parameterscorrespond to the ones mentioned before. The test was only carried out with one of the two models, namelythe interface area model. This is due to the conclusions drawn, that this model has the better physicalbehavior of the two developed models. The test has been stopped after 166 hours of simulation, whichresulted in 2.2s real time data.

In figure D.1 one can see the total condensation rate developing over time. It is to note that the typicalbehavior of a sinusoidal increase or decrease is not present, as the interface passes through the cells. Thiscan be due to the high velocity. It has been shown before that with higher velocities the frequency ofincrease/decrease increases, therefore, the increase decrease is probably still there, but not visible due to therapid change. Another reason can be that the interface is spread even more, due to the higher velocity andthat the sinusoidal phenomena is smoothed.

0 0.5 1 1.5 2 2.50

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

Total Time [s]

Tota

l C

ondensation R

ate

, [k

g/s

]

u

in = 10m/s

Figure D.1: Graph of the total condensation rate over time for an inlet velocity of 10m/s.

The time at which the steam exists the lower end of the pipe can be clearly made out in the graph, as itcorresponds to a sharp increase of the condensation rate. When the bubble starts forming, the interface areaincreases and more steam is allowed to condense.

43

Page 58: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

44 High Velocity Test

Figures D.2 through D.5 show extraction of the behavior at different time steps. It is clearly visible that thebehavior is rather violent and for a better simulation, a turbulence model should have been selected.

Figure D.2: Figure showing the pressure, the velocity, alpha and the condensation rate per volume at time step0.15s.

Page 59: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

45

Figure D.3: Figure showing the pressure, the velocity, alpha and the condensation rate per volume at time step0.30s.

Figure D.4: Figure showing the pressure, the velocity, alpha and the condensation rate per volume at time step0.80s.

Page 60: Modeling of Direct Contact Condensation with OpenFOAMkth.diva-portal.org/smash/get/diva2:460410/FULLTEXT01.pdfgoverning equations are not based on mass continuity equations but on

46 High Velocity Test

Figure D.5: Figure showing the pressure, the velocity, alpha and the condensation rate per volume at time step1.35s.