54
FRIEDRICH-ALEXANDER-UNIVERSIT ¨ AT ERLANGEN-N ¨ URNBERG INSTITUT F ¨ UR INFORMATIK (MATHEMATISCHE MASCHINEN UND DATENVERARBEITUNG) Lehrstuhl f¨ ur Informatik 10 (Systemsimulation) Numerical Simulation of Quenching Process in Coal Gasification Rishi Patil Master’s Thesis

Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

FRIEDRICH-ALEXANDER-UNIVERSITAT ERLANGEN-NURNBERGINSTITUT FUR INFORMATIK (MATHEMATISCHE MASCHINEN UND DATENVERARBEITUNG)

Lehrstuhl fur Informatik 10 (Systemsimulation)

Numerical Simulation of Quenching Process in Coal Gasification

Rishi Patil

Master’s Thesis

Page 2: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Numerical Simulation of Quenching Process in Coal Gasification

Rishi PatilMaster’s Thesis

Aufgabensteller: Prof. Dr. U. Rude

Betreuer: A. Hauser

K. Iglberger

Dr. S. Kosse

Bearbeitungszeitraum: 16.3.2009 – 16.9.2009

Page 3: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Erklarung:

Ich versichere, dass ich die Arbeit ohne fremde Hilfe und ohne Benutzung anderer als derangegebenen Quellen angefertigt habe und dass die Arbeit in gleicher oder ahnlicher Formnoch keiner anderen Prufungsbehorde vorgelegen hat und von dieser als Teil einer Prufungs-leistung angenommen wurde. Alle Ausfuhrungen, die wortlich oder sinngemaß ubernommenwurden, sind als solche gekennzeichnet.

Erlangen, den 16.09.2009 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Page 4: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Abstract

This Master’s Thesis compares two computational fluid dynamics solvers: the commercialsolver ANSYS CFX and the open source code OpenFOAM. Simple benchmark cases withcompressible and incompressible flows are tested and compared. Thereafter the more complexprocess of quenching in coal gasification is simulated.

This thesis work describes the simulation of a part of the coal gasification process, namelythe water gas shift reaction or the quenching process. The quenching process involves simu-lation of a multicomponent, multiphase reactive flow system. This thesis uses the Eulerian-Lagrangian approach to simulate the quenching process.

It turns out that ANSYS CFX convinces in the first place with its robustness, especiallywhen dealing with steady state problem configurations. However OpenFOAM shows a muchbetter performance when dealing with strongly transient processes.

Zusammenfassung

Die vorliegende Masterarbeit vergleicht die Leistungsfahigkeit des kommerziellen CFD-solvers CFX und des open-source CFD-solvers OpenFOAM. Es wurden einerseits einfacheProblemstellungen kompressibler und inkompressibler Stromungen berechnet und evaluiert.Andererseits wurde der Quenching-Prozess, der einen wichtigen Teilprozess bei der Kohlev-ergasung darstellt, mit beiden Softwarepaketen simuliert und die Ergebnisse miteinanderverglichen. Das Modell zur Beschreibung des Quenching-Prozesses beinhaltet sowohl eineMehrkomponenten- als auch Mehrphasenstromung. Die Untersuchungen haben gezeigt, dassCFX vor allem durch die robusten Losungseigenschaften uberzeugt. Bei transienten Phanome-nen allerdings, bei denen kleine Zeitschrittweiten verwendet werden mssen, ist OpenFOAMnicht zuletzt durch den semi-impliziten Ansatz deutlich schneller.

Page 5: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Acknowledgment

I would like to thank Prof. Dr. Ulrich Rude for supporting the external thesis work atSiemens AG and for his guidance during the Master of Science Computational EngineeringProgram. I would also like to thank Klaus Iglberger for his assistance.

I am thankful to Andreas Hauser and Dr. Sylvio Kosse for offering me the opportunityto pursue the thesis work at Siemens AG (Corporate Technology). The help of Dr. N. Huberand Dr. T. Hammer from Siemens Corporate Technology is greatfully acknowledged for thevaluable help related to the geometry and chemical kinetics.

The developers of OpenFOAM are greatfully acknowledged for sharing their high qualitytool with the CFD community. I am thankful to the open source community (OpenFOAMforum on www.cfd-online.com) for answering my queries and giving me clues.

Many friends made my studies and stay at Erlangen memorable. Amongst them I wouldlike to especially acknowledge Cherif, Ruchika and Sunil. I would not have been able to studyat Erlangen without the care, support and motivation from my parents and sister.

Page 6: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Contents

1 Introduction 2

2 Fundamentals of Coal Gasification 42.1 Introduction to Coal Gasification . . . . . . . . . . . . . . . . . . . . . . . . . . 42.2 Quenching Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3 Modeling of Quenching Process in Coal Gasification 103.1 Physical Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.2 Mathematical Formulation : Eulerian Phase . . . . . . . . . . . . . . . . . . . . 113.3 Mathematical Formulation : Lagrangian Phase . . . . . . . . . . . . . . . . . . 13

4 Numerics and Comparison of Solvers 164.1 Physical Models: Turbulence, Multiphase and Radiation . . . . . . . . . . . . . 164.2 Discretization Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174.3 Solution Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184.4 Parallelization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204.5 Mesh Import and Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.6 Materials Library and Chemistry . . . . . . . . . . . . . . . . . . . . . . . . . . 23

5 Numerical Results 245.1 Benchmark Reactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245.2 Benchmark T-Junction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.3 Quencher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

6 Summary and Outlook 31

A Codes for incompressible mixing fluid solvers 33A.1 createFields.H . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33A.2 myInkIcoFoam.C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35A.3 myInkSimpleFoam.C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

B dieselFoam solver 39B.1 sprayProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39B.2 injectorProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

C CHEMKIN file format 44

Page 7: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

List of Figures

2.1 Simple Steam Cycle [24] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.2 Gas turbine with open cycle [24] . . . . . . . . . . . . . . . . . . . . . . . . . . 62.3 Gas turbine with combined cycle [24] . . . . . . . . . . . . . . . . . . . . . . . . 72.4 Block flow diagram of an IGCC power plant [24] . . . . . . . . . . . . . . . . . 72.5 Siemens Coal Gasification [21] . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.6 Siemens Quencher [24] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4.1 General field solution process used in the CFX-Solver [7] . . . . . . . . . . . . . 19

5.1 Cross section of the reactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.2 Temperature vs flow rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.3 Temperature profile of cross-section with OpenFOAM . . . . . . . . . . . . . . 265.4 Temperature profile of cross-section with ANSYS CFX . . . . . . . . . . . . . . 265.5 Speedup of OpenFOAM vs CFX . . . . . . . . . . . . . . . . . . . . . . . . . . 275.6 CFX Re=100 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275.7 OpenFOAM Re=100 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275.8 CFX Re=1000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.9 OpenFOAM Re=1000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.10 CFX Re=10,000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.11 OpenFOAM Re=10,000 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.12 Mixing of the tracer along the length of pipes . . . . . . . . . . . . . . . . . . . 285.13 Temperature profile at central plane (CFX) . . . . . . . . . . . . . . . . . . . . 305.14 Temperature profile at central plane (OpenFOAM) . . . . . . . . . . . . . . . . 30

iii

Page 8: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Trademarks

ANSYS is a registered trademark of ANSYS Inc.CFX is a registered trademark of ANSYS Inc.CHEMKIN is a registered trademark of Reaction Design Corporation.Fluent is a registered trademark of ANSYS Inc.Icem-CFD is a registered trademark of ANSYS Inc.Linux is a registered trademark of Linus Torvalds.OpenFOAM is a registered trademark of OpenCFD Ltd.ParaView is a registered trademark of Kitware.Star-CCM is a registered trademark of CD-Adapco.

Page 9: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Chapter 1

Introduction

In recent years, numerical simulations have become an indispensable tool for research and de-velopment activities. The classical approach of experimentally determining the performanceof a system has several disadvantages especially with respect to cost, time and parameter vari-ations. In addition, the decreasing cost of computers has made it possible to assemble a highperformance computing cluster from off the shelf computer components. Computational FluidDynamics (CFD) has become an essential part of research involving fluids. CFD can be usedas a tool in wide range of applications, from simple hydrodynamic flow to multicomponent,multiphase reacting flows.

There are various CFD tools available in the market. ANSYS Inc. is one of the largestcompanies involved in numerical simulation. Two main ANSYS fluid dynamics solvers areANSYS CFX and ANSYS Fluent. The other major CFD softwares are Star-CCM, Numeca,CFD-Ace+ and PowerFLOW. OpenFOAM is powerful, popular and object oriented (C++)open-source initiative in CFD. This has led to a considerable amount of academic and indus-trial interest in exploring the capabilities of OpenFOAM. Since it is an open-source code, theuser can verify the equations used in simulation and can create solvers based on new mod-els. This extendability is one of the prime reasons for enthusiasm in the CFD community toinvestigate OpenFOAM.

The topic of coal gasification has gained prominence in the current decade, due to theincreasing cost and dwindling supplies of petroleum products. Efforts to use renewable sourcesof energy as a replacement for fossil fuel are under progress. However, it might take a fewdecades until renewable sources become a major source of energy. On the other hand, thecoal reserves might last at least a century or two. Hence there has been a revival of interest inthe field of coal gasification as it is more efficient and environment friendly compared to theclassical method of solid coal combustion.

The aim of this thesis work is to compare the two solvers ANSYS CFX and OpenFOAMand test their capabilities, with respect to simulation of the quenching process as one importantpart of coal gasification.

This thesis is divided into the following chapters. After this introduction, the process ofcoal gasification and the thermodynamic processes involved in coal gasification are describedin chapter two.

Chapter three describes modeling process and the equations involved in Eulerian-Lagrangianapproach of simulating multiphase systems.

The numerics involved in CFD solvers are described in chapter four. Various features areavailable in the two solvers are compared.

Chapter four deals with the modeling of physical and chemical processes in a multiphasereactive flow. The implementation details of a multi phase reactive flow, along with codeexamples are also explained.

2

Page 10: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

The results of simulations are discussed in chapter five. This includes the results for simpletest cases and the quenching process.

The last chapter summarizes the thesis work and further possibilities for simulation of thequenching process or a multiphase reactive flow in general are mentioned.

Most of the work of this thesis was done with OpenFOAM-1.5 and OpenFOAM-1.5.xversions. OpenFOAM-1.5.x is a SVN versions of OpenFOAM-1.5 with patches and regularupdates. Unless otherwise mentioned, OpenFOAM-1.5.x was the default version used forsimulation. ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of thefirst part of thesis work involving simple cases. ANSYS CFX Version 12.0 was used in thesimulation of coal gasification.

3

Page 11: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Chapter 2

Fundamentals of Coal Gasification

2.1 Introduction to Coal Gasification

Gasification can be defined as the process of conversion of any carbonaceous fuel to a gaseousproduct, that has an useable heating value. The technologies that form a part of the definitionof gasification are pyrolysis, partial oxidation and hydrogenation. Pyrolysis is application ofheat to the feedstock in the absence of oxygen. Pyrolysis is of lesser significance today. Partialoxidation is a as the name suggests, the process of partially oxidizing the feedstock (solid, liquidor gaseous) by pure oxygen, air and/or steam. This is used for production of synthesis gas(syngas). Syngas is a mixture of hydrogen and carbon monoxide. Partial oxidation is the mostprominent process used in gasification technologies and hydrogenation is of less significance.Combustion is not included in this definition since the product gases do not have a residualheating value [24].

Coal Gasification is an old technology, used in the town gas industry. However due to theintroduction of natural gas it had become a niche technology. In the past few years, therehas been a growing interest in coal gasification technology due to various reasons. Petroleumand natural gas resources are dwindling and might last only a few decades. On the otherhand there are coal deposits to last for at least two centuries. This has lead to rethinkingregarding the way coal is used a source of energy. Combustion of solid coal is not efficient andenvironment friendly process[24].

Gasification of coal has several applications: power, chemicals, substitute natural gas(SNG) and transport fuels. Syngas can be used for Fischer-Tropsch synthesis [41] and forthe synthesis of ammonia, mehanolacetic acid anhydride. Fischer-Tropsch technology can bedefined as the means to convert syngas into hydrocarbons products.

Syngas is an intermediate product. Syngas can be produced from various feedstock andcan be converted into a wide range of products. Theoretically there are numerous possibilitiesof feedstock and products. However not all of them are technically desirable or economicallyfeasible. Many operators of gasification plants take advantage of this fact and produce morethan one product from the same source. This is called polygeneration. These operators areable to take advantage of the market prices to vary the production of a certain product. Thereverse is also done. Some operators vary the feedstock according to the prices of feedstock,to be more economical. Feedstocks that can be used in a gasifier are anthracite, bituminouscoal, sub-bituminous coal, lignite, petcoke, tar oils, biomass, etc.

Due to environmental concerns carbon-dioxide CO2 capture has become an importantissue. Coal gasification can deal with this issue through the use of Integrated GasificationCombined Cycle 2.1 in power industry. Gasification is a good means of desulphurizing thefuel before combustion in the combined cycle plant. The removal of contaminants like sulphurfrom coal makes coal gasification more environment friendly means of energy conversion as

4

Page 12: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

compared to the normal combustion of solid coal. Gasification of coal is a way of increasingthe environmental acceptability of coal as a source of energy.

Another advantage of gasification process is that gases are easier to transport than solidfuel. There is a chemical reason that also justifies the conversion of solid to gas. By adding28% of the heating value of pure carbon in the conversion of the solid carbon into the gasphase CO, 72% of heating value of carbon is conserved in the gas. This can be seen by thefollowing reactions:

C + 1/2O2 = CO − 111KJ/mol (2.1)

CO + 1/2O2 = CO2 − 283KJ/mol (2.2)

C +O2 = CO2 − 394KJ/mol (2.3)

The gasification process takes place between 800�and 1800�. The temperature variesaccording to the feedstock used in the process.

The process of converting solid carbon to syngas is an endothermic process, called watergas reaction:

C +H2O � CO +H2 + 131KJ/mol (2.4)

By injection of water, a part of the carbon monoxide can be converted into carbon dioxide,thereby producing more hydrogen. This reaction is called water gas shift reaction (WGSR).This is an exothermic reaction:

CO +H2O � CO2 +H2 − 41KJ/mol (2.5)

The kinetics of the water gas shift reaction can be modeled using Arrhenius equations. Seeequation 3.14 for details.

Integrated Gasification Combined Cycle

The Integrated Gasification Combined Cycle (IGCC) is a combination of gasification and acombined cycle plant. Before describing the concept of IGCC, the basic principles of the steamand gas turbine cycles are described.

Steam Cycle

One of the simplest cycles for energy conversion is the open steam cycle. The thermal energyfor steam generation can be derived from various sources like coal combustion or nuclearenergy. Figure2.1 illustrates the flow scheme and Temperature-Entropy of simple steam cycle.A pump (A) is used to increase the pressure of water to the working pressure of the boiler atpoint B. Boiler supplies heat to the incoming water and raises its temperature to the boilingtemperature (C). The water is evaporated at contact temperature D. The line D-E in T-sdiagram represents superheating of steam. This superheated steam is expanded to atmosphericpressure (line E-F) in a steam turbine. The upper shaded area of the Temperature-Entropydiagram represents the output work. The input heat is represented by the shaded area andthe rectangular area below the line A-F.

If a condenser in introduced to form a closed cycle: Rankine Cycle, more work can beextracted. This additional work is represented by the lower shaded area.

5

Page 13: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Figure 2.1: Simple Steam Cycle [24]

Gas Turbine Cycles

Figure 2.2: Gas turbine with open cycle [24]

Gas turbines work according to the Brayton cycle[24]. Figure2.2 illustrates the flow schemeand Temperature-Entropy of the Brayton cycle. Compressor compresses the air (A). Thispressurized air(B) is used as oxidant for combustion of fuel. The product gases (C) enter andexpand in the turbine. Due to expansion the temperature of the flue gases decreases. Shaftwork is obtained from the turbine. However the gases leaving turbine have a high energycontent. This simple open gas turbine cycle is used in peaking power stations and aircrafts.

The hot gases leaving gas turbine can be used a heat source for steam cycle, in a heatrecovery steam generator (HRSG). This capture of heat increases the overall efficiency to about60%. Figure2.3 illustrates the flow scheme and Temperature-Entropy diagram of a combinedcycle plant. Combined cycle power plants are generally used a base load power station, dueto higher efficiency. Gas turbines used in combined cycle plants can be used with a fewselective fuels like gas and light petroleum distillates. Hence they have limited application.On the other hand gasification can be used to produce the gas required for the gas turbinein a combined cycle plant. Gasification is more robust with respect to the feedstocks such ascoal or heavy oils.

6

Page 14: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Figure 2.3: Gas turbine with combined cycle [24]

Figure 2.4: Block flow diagram of an IGCC power plant [24]

Integrated Gasification Combined Cycle

The Integrated Gasification Combined Cycle (IGCC) is a combination of gasification and acombined cycle plant. As explained in the previous section, gasification is used to convertsolid or liquid fuels into gaseous form to be used by gas turbines. Gasification also helps indesulfurizing the fuel. Thus with a gasifier and appropriate gas treatment, it is possible toobtain a fuel that can be combusted in an environment friendly manner comparable to thenatural gas. IGCC plants with coal as feedstock are generally built for a power station. IGCCplants with heavy residual fractions as feedstock are generally built in oil refineries. The flowscheme(Figure2.4) illustrates the concept.

The most important integration strategy for most IGCC plants is the integration of thesteam system. The standard steam cycle has an efficiency of 38%. The steam that derivesits heat only from a syngas cooler of a gasifier also has a low efficiency (about 38%). Thisis attributed to the difficulty of superheating the steam in a syngas cooler. Combining bothsteam sources increases the efficiency to about 40%. HRSG is releaved of a large evaporatingload and more saturated steam is superheated in the HRSG.

There are other possibilities of integration in IGCC, namely, air integration and nitrogen

7

Page 15: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Figure 2.5: Siemens Coal Gasification [21]

integration. These involve the use of an air separation unit (ASU).These are described in [24].Due to the increased environment consciousness IGCC also have to take into consideration

the possibilities of carbon capture. The current carbon dioxide sequestration technology isundeveloped for large scale deployment. However IGCC plants have to take this eventualcarbon capture possibility into account.

2.2 Quenching Process

The synthesis gas is produced at high temperatures, depending upon the process and thegasifier used for the gasification process. This high temperature of syngas also makes it difficultto transport the gas for further use in chemical or power application. With the exception ofnatural gas feeds, syngas from gasifier contains various contaminants like particulates, tar,sulphur or chlorine compounds etc. The synthesis gas has to be cleaned of these contaminantsbefore it is usable for chemical industry or as a fuel. Due to the different feedstocks that canused for gasification process, there is also a considerable variation in the contaminants presentin the gas. As an effect of cooling of syngas several heavy contaminants are removed in theform of slag.

Due to cooling of the synthesis gas, entrained ash particles will pass through the criticaltemperature range, where the ash becomes sticky. Gas cooling concept has to take this intoconsideration and quench the gas as fast as possible to a temperature at which the ash becomesdry. This is typically about 900�. There are many options for this cooling: quenching,synthesis gas coolers, syngas cooling in oil service. The important aspect of cooling is thetransition stage between slagging and non-slagging conditions. This transition stage has to be

8

Page 16: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Figure 2.6: Siemens Quencher [24]

crossed directly in a way that gas does not contact the wall before it is sufficiently cooled.There are several options for quenching:

� Radiant gas cooler

� Water quench

� Gas quench

� Chemical quench

This thesis work is based on water quenching process. This syngas coming out of gasifier iscooled by injecting cold water. Gasification scheme is illustrated in Figure2.5 and a quencherby Siemens is illustrated in Figure 2.6. Water changes from liquid to vapor state. This latentheat of evaporation is extracted from the synthesis gas. There are two type of water quench:partial quenching and total quench.

In partial quench, only just enough water is evaporated to decrease the gas temperatureto 900�. The advantage of partial quench is that it allows the sensible heat below 900�inthe syngas to be used for high pressure steam raising in a downstream syngas cooler.

In total quench sufficient water is evaporated to saturate the gas with water vapor. It is alow cost and effective solution. However a disadvantage is that heat energy is lost in generatingwater vapor instead of using it productively for some other process or heat exchange. Thiswater vapor is available as contaminated steam and requires extensive cleaning. However ifthe final product is ammonia or hydrogen gas, the water vapor due to total quench is anadvantage, as it avoids the necessity of steam generation for carbon monoxide shift process.The solids present in syngas have to be removed and this can be done by a hot water wash orcandle filters.

An important point about water quench (partial or total quench) is that due to water gasshift reaction, carbon dioxide and hydrogen content are increased to some extent.

9

Page 17: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Chapter 3

Modeling of Quenching Process inCoal Gasification

This chapter describes the procedure of numerical simulation of the quenching process in coalgasification. The process involves spraying of water from injectors into a chamber containingthe feedgas. The water droplets evaporate and react with the syngas (water gas shift reaction2.5). This process can be described in a sentence as: a turbulent multiphase flow with phasechange and reacting species.

3.1 Physical Processes

The simulation of quenching process in coal gasification is a complex process. This involvesproblems of chemistry and the corresponding thermodynamics, turbulence and multiphaseflows. These problems are tightly coupled and non-linear with very small time scales. Sincewater is injected as a high pressure spray in the high temperature gas domain, water evaporatesto form water vapor. This evaporation process takes the energy from the gas phase. Thisinterphase heat transfer requires suitable modeling of energy equations and exchange of energybetween different phases. In addition there is interphase mass transfer. Syngas is generatedat a high temperature.

Ideally, thermal radiation should be taken into account to describe the physics as accuratelyas possible. These flows are turbulent in nature. Turbulence can be accounted by variousmeans from direct numerical simulation (which is currently not feasible due to high computingrequirements) to modeling using Reynolds average Navier Stokes equations [13].

The Navier-Stokes equations form the basis of the flow. Other conservation equationsare required to describe the reacting flow. A reacting gas is a non-isothermal mixture ofmultiple species which must be tracked individually. The thermodynamic data required forsuch varying temperature is complex and quantities like heat capacity change significantly withtemperature and composition. Different species react and the chemical reaction rates have tobe modeled accordingly. The reacting species also means that the composition of the mixtureis also continuously varying. The problem of chemical reactions tend to be numerically stiff.

Different species are characterized by their mass fractions Yk for k = 1toN , where N is thenumber of species in the reacting mixture. The mass fractions Yk are defined as: Yk = mk/m

where mk is the mass of species k present in a given volume V and m is the total mass ofgas in this volume.

10

Page 18: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Mathematical Formulation

The governing equations for multiphase flow using Eulerian-Lagrangian approach are explainedin this section. The continuous phase and the dispersed phase are governed by differentequations. The Eulerian phase equations are modified form of the Navier-Stokes equationwith additional source terms to account for the multiphase nature of the flow.

In fluid mechanics, there are two approaches of dealing with fluids- Eulerian approachand Lagrangian approach. According to Eulerian approach various fields like temperatureor pressure field, can be described as a function of position and time. The field values arephysical properties of position, i.e. every point in the domain has properties as a functionof time. This approach is practically very useful. The Lagrangian approach describes themovement of individual particles by the coordinates dependent on time. The Lagrangianapproach is computationally more expensive.

3.2 Mathematical Formulation : Eulerian Phase

The governing equations of multi component mixtures(gas phase) are as follows:

Continuity Equation

A modified form of continuity equation is used for species transport. The continuity equationis solved for each of the components of the multi component mixture.

∂ρm∂t

+∇ · (ρmu) = ∇ ·[ρD∇

(ρmρ

)]+ fm + ˙ρsmδm1 (3.1)

where ρm is the mass density of the species m, ρ is the total gaseous mass density, u is the gasvelocity, fm the source or the sink term term due to chemistry and ˙ρsm the source term dueto evaporation of the liquid. D is the mass diffusion coefficient and it includes the turbulentdiffusion.

The global continuity equation is obtained by summing up the component densities ρ =∑m ρm

∂ρ

∂t+∇ · (up) = ρs (3.2)

Momentum Equation

The averaged momentum equation for the gas is given by:

∂ (ρu)∂t

+∇.(ρuu) = −∇p+∇.σ + F s + ρg − 23

(ρk) (3.3)

where p is the gas pressure, σ is the viscous stress tensor, fs is the rate of momentum changeper unit volume due to the spray and g is the specific body force, which is assumed to beconstant.

σ = 2µS + λ∇ · uI (3.4)

whereS =

12

[∇u + (∇u)T ] (3.5)

where µ and λ are the first and second coefficients of viscosity.

11

Page 19: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Energy Equation

The internal energy equation is as follows:

∂ (ρe)∂t

+∇.(ρue) = −p∇ · u−∇ · J + ρe+ Qc + Qs (3.6)

where e is the specific internal energy (without chemical energy). The source terms Qc andQs are due to the chemical heat release and the spray interaction respectively.

J is th heat flux vector, which includes head conduction and enthalpy diffusion.

J = −κ∇T − ρD∑m

hm∇(ρmρ

)(3.7)

where T is the gas temperature and hm is the specific enthalpy of species m.

Turbulence Equation

The Reynolds number is a characteristic number used to define the turbulent nature of theflow. It is defined as follows:

Re =ρUD

µ(3.8)

where ρ is the density of the fluid, U is the velocity of the fluid, D is the characteristic diameterof the flow channel and µ is the dynamic viscosity of the fluid.

There are various approaches to account for turbulence in a flow: Reynolds Averages NavierStokes equations (RANS), Large Eddy Simulation(LES) and Direct Numerical Simulation(DNS). The computational complexity and demands of LES and DNS are quite high, therebymaking them not appropriate for industrial simulations. These approaches are typically usedin academic environment for simplified geometries. RANS is the preferred method in industryto deal with turbulent flows. Within RANS approach there are several models to solve theturbulence closure models. [13]

Amongst the various models in RANS approach, k− ε is the most popular model[13]. Thismodel involves two transport equations: one for turbulent kinetic energy k and the secondfor dissipation ε. A modified version of the standard k − ε equations which incorporates thecompressibility effects is used. It is given by the following equations:

∂ (ρk)∂t

+∇ · (ρuk) = −23ρk∇ · u + σ∇u−∇ ·

[(µ

Prk

)∇k]− ρε+ W s (3.9)

∂ (ρε)∂t

+∇·(ρuε) = −(

23Cε1 − Cε3

)ρε∇u+∇·

[(µ

Prε

)∇ε]

k

[Cε1σ∇u− Cε2ρε+ CsW

s]

(3.10)

Chemistry Equation

A multicomponent mixture involving chemical reactions may be written as

Ns∑j=1

v′jkcj Ns∑j=1

v′′jkcj , k = 1, Nr (3.11)

where v′ is the matrix of the stoichiometric coefficients for the forward reactons, v′′ is thematrix of the stoichiometric coefficients for the backward reactons and cj is the molar numberfor the jth species, Nr is the number of reactions and Ns the number of species.

12

Page 20: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

The chemical source term in the species transport equation 3.1 is given by the following:

fm = Mm

Nr∑r=1

(v′′mr − v′mr

)ωr (3.12)

where

ωr = krf

Ns∏s=1

cv′srs − krb

Ns∏s=1

cv′′srs = krfΠf − krbΠb (3.13)

and the Arrhenius equation for forward and backward reaction rate coefficients is

kr = ArTnr .exp(

−ETaRT

) (3.14)

kr is the backward reaction coefficient, Ar is pre exponential factor, nr is temperaturecoefficient, Ea is activation energy, R is ideal gas constant, and T is temperature.

Using the Arrhenius equations for chemical reaction is a common method. Both CFXand OpenFOAM support the use of Arrhenius equations. The actual chemical process how-ever involves complex intermediate species and intermediate reactions. This thesis work usesthe following simplification of the water gas shift reaction 2.5. The corresponding chemicalproperties are specified using the NASA format[28].

REACTIONSCO + OH = CO2 + H 4.390E+06 1.500 -7.4100E+02H + H + CO = H2 + CO 1.370E+18 -1.000 0.0000E+00H + H + CO2 = H2 + CO2 2.740E+18 -1.000 0.0000E+00H + H + H2 = H2 + H2 9.700E+16 -0.600 0.0000E+00H + H + H2O = H2 + H2O 1.190E+18 -1.000 0.0000E+00H + H2O = H2 + OH 4.502E+08 1.600 1.9314E+04H + OH + CO = H2O + CO 1.600E+23 -2.000 0.0000E+00H + OH + CO2 = H2O + CO2 3.200E+23 -2.000 0.0000E+00H + OH + H2 = H2O + H2 2.150E+23 -2.000 0.0000E+00H + OH + H2O = H2O + H2O 1.400E+23 -2.000 0.0000E+00

END

3.3 Mathematical Formulation : Lagrangian Phase

The Lagrangian(discrete) phase is modeled by the following equations.

Equation of Motion

The equation of motion for the discrete phase is given by Newton’s second law of motion.

mdduddt

= F (3.15)

where md is the droplet mass, ud is the droplet velocity and F is the force acting on the droplet.When the difference between the densities of the discrete phase and the continuous phase isof the order 102 or higher, the force term consist of the drag force and the gravitational force.

F = −πD2

8ρCD | ud − u | (ud − u) +mdg (3.16)

where CD is the drag coefficient. This is given as follows:

13

Page 21: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

CD =

{24Red

(1 + 1

6Re2/3d

)Re < 1000

0.424 Re > 1000(3.17)

.where

Re =ρ|ud − u|D

µ(3.18)

In the code Lagrangian code the equations 3.15 and 3.16 are combined to get the followingform:

duddt

= −ud − uτu

+ g (3.19)

where τu is the momentum relaxation time defined as:

τu =8md

πhoCdD2|ud − u|=

43

ρdD

ρCD|ud − u|(3.20)

Droplet Energy Equation

The liquid water droplets receive energy from the gas. This heat is used up in increasing thetemperature of the liquid droplets and eventually leads to evaporation. The heat transfer fromgas to liquid is given by:

mddhddt

= mdhv(Td) + πDkNu(T − Td)f (3.21)

wheref =

z

ez − 1, z = − cp,vmd

πDkNu(3.22)

Here f is a factor which corrects the rate of heat exchange due to the mass transfer. Nusseltnumber is defined as:

Nu = 2.0 + 0.6Re1/2Pr1/3 (3.23)

where Prandtl number is defined as:

Pr = µcpκ

(3.24)

and all properties are evaluated using the film temperature,

Tf =2Td + T

3(3.25)

A characteristic heat transfer relaxation time τh is used to solve equation 3.21. It is definedas,

τh =mdcl,dπDkNu

(3.26)

where cl,d is the specific heat of the liquid. Rearranging 3.21 where

hd = cl,d(Td − Tref) (3.27)

and using equation 3.30 for the mass transfer yields,

dT

dt=T − Tdτh

f − 1cl,d

hv(Td)τe

(3.28)

where τe is defined in equation 3.33.

14

Page 22: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Droplet Mass Equation

Due to the high temperature of the feedgas, it is assumed that condenstation of water vaporto liquid water does not take place. Accordingly no model for condensation is used. Only theheat transfer from liquid to gas phase is assumed. The D2 law [29] is used for evaporationfrom a spherical droplet:

dD2

dt= Cevap (3.29)

where D is the diameter of the droplet.It is more common to give the rate of evaporation in terms of mass or diameter. The rate

of evaporation for a single droplet is given by:

dmd

dt= md = πDDρvSh ln

p− pv,∞p− pv,s

f = πDDρvSh ln

(1 +

Xv,s −Xv,∞1−Xv,s

)(3.30)

where ρv is the density of the water vapor close to the surface. The ideal law is used tocalculate the density:

ρv =p

RvTm(3.31)

where p is the gas pressure. The evaporation rate is taken into consideration by the Ranz-Marshall correlation. The Sherwod number is defined as:

Sh = 2.0 + 0.6Re1/2Sc1/3 (3.32)

The equation 3.30 is solved by using an evaporation relaxation time τe :

τe =md

πDDρvShln(1 +B)(3.33)

whereB =

Xv,s −Xv,∞1−Xv,s

(3.34)

The evaporation rate is given by:

dmd

dt= −dmd

τe,dD

dt= − D

3τe(3.35)

The above equations are solved implicitly as it prevents the reducing mass or diameterfrom becoming negative, in case of large time steps.

15

Page 23: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Chapter 4

Numerics and Comparison ofSolvers

ANSYS CFX and OpenFOAM are based upon finite volume method[18].ANSYS CFX is available for various operating system(Windows, Linux, Unix, HPUX,

Solaris, IRIS64 etc). The commercial solvers have several advantages especially with respectto documentation and technical support. However, the rising cost of licenses is a limitingfactor.

OpenFOAM is an open source CFD solver developed and maintained by OpenCFD. Open-FOAM is a library of solvers and not a single binary application. OpenFOAM is availableas source code and binary packages for Linux (32-bit and 64-bit). Due to the availability ofthe source code it is possible to compile it for almost any *nix platform (including MacOS).There are compatibility issues with Windows operating system, due to the lack character casedistinction in file names under Windows.

CFD simulation involve three main stages: pre-processing (mesh generation, setting upthe boundary conditions and solver parameters), solving and post-processing (evaluating theresults of the simulation). ANSYS CFX provides a different GUI(graphical user interface) foreach of these stages: CFX-Pre, CFX-Solve and CFX-Post. OpenFOAM-1.5 does not includea GUI. Boundary conditions and solver parameters are specified by means of ASCII text files[1]. Depending on the complexity of the solver, the number of files to be edited varies fromapproximately five to twenty. This text editing is an advantage when a parameter study isrequired. ParaView is used as a visualization software for mesh and results.

4.1 Physical Models: Turbulence, Multiphase and Radiation

Turbulence Models

Many of the OpenFOAM solvers for simple flow problems have a turbulence model implemen-tation. However certain solvers like mhdFoam for magneto hydrodynamic flows, do not have aturbulence model. Since turbulence models are implemented as a library, it would be possibleto incorporate turbulence models in such solvers with additional programming efforts. Theturbulence parameters have to be explicitly calculated and given as input boundary conditions.This can be done by a script.

In contrast turbulent intensity can be easily specified as a percentage in ANSYS CFX.ANSYS CFX is not so restrictive about the usage of turbulence models. Almost any simulationcan be simulated with turbulence models.

16

Page 24: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Multiphase Models

Multiphase flow are flows involving more than one fluid. Phase can also refer to different ther-modynamic phase of the same substance. Example, water and water vapor form a multiphasesystem, although they are chemically same. In multiphase flow, each fluid may posses its ownflow field or all fluid can have a common flow field. The fluids are not mixed on a microscopiclevel but at a macroscopic level (larger than molecular level) with an interface region. Differ-ent velocity, temperature fields are solved for each phase. These may interact with each otherdue to interfacial forces and heat and mass transfer across the phase interfaces.

Whereas in a multicomponent flow, the constituents are chemically different substancesmixed at the molecular level. Hence they posses common flow characteristics and a singlemean velocity, temperature fields etc. are solved for the fluid.

Multiphase flows involves at least two phases. A continuous phase or fluid is one whichforms a continuous connected region. The other phase called dispersed or discrete phase orfluid is a fluid which is present only in certain discrete regions which are not connected. Whenmodeling air bubbles in water, water is the continuous phase and air bubbles are dispersedphase.

There are two approaches to model multiphase flows: Eulerian-Eulerian approach andEulerian-Lagrangian approach. In the former both phases are considered according to theEulerian transport model. In the latter the dispersed phase are discretely distributed in acontinuous phase.

According to the Eulerian-Lagrangian approach, each particle interacts with the fluid andother particles discretely. To reduce the computation cost, each particle (sometimes calledparcel) represents a sample of particles that follow the identical path.

Radiation Models

When high temperatures are involved, the effects of thermal radiation have a significant role.Hence modeling thermal radiation can lead to better accuracy in the numerical simulation.

Radiation models are available only in a few solvers in OpenFOAM (e.g.buoyantSimpleRadiationFoam). P1 model and Finite volume discrete ordinate method (fv-DOM) are available in OpenFOAM [1].

Whereas radiation model can be used in almost all simulations involving energy equation inANSYS CFX. The various radiation models available in ANSYS CFX are Rosseland model, P1model, Monte Carlo model, Discrete Transfer model and several sub models: Spectral(Gray,Multiband and Multigray) and Scattering[8].

4.2 Discretization Methods

The governing equations have to be discretized to obtain a linear system of equations, whichcan be solved by the CFD solver. Discretization plays a significant role in simulation results.

Both OpenFOAM and CFX offer similar choice of methods for time discretization:

� Euler : First order, bounded, implicit

� Backward : Second order, implicit

� Steady state : Does not solve for time derivatives

In addition to these common methods, OpenFOAM offers Crank-Nicholson scheme. AlthoughOpenFOAM offers the option of steady state for time discretization, this does not imply thatall transient solvers can be used directly as steady state solver [1].

17

Page 25: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

For the discretization of the convective term, OpenFOAM offers more options that CFX.OpenFOAM has linear (second order, unbounded), skewLinear (second order, unbounded,skewness correction), cubicCorrected (fourth order, bounded), linearUpwind (first/second or-der, bounded), QUICK (first order, bounded), Total Variable Diminishing (TVD : first/secondorder, bounded), Normalized Variable Diminishing (NVD : first/second order, bounded) schemes.CFX offers upwind, Numerical Advection Correction scheme, centred, and high resolutionTVD scheme. In terms of numerical discretization schemes, OpenFOAM has a significantadvantage over CFX. The wide variety of schemes and the options within these schemes,allows the usage of appropriate scheme, thereby getting more accurate results. These addi-tional settings of OpenFOAM are especially useful in academic environment where accuracyis important. For industrial environment, robustness is more important.

4.3 Solution Algorithms

Pressure-Velocity coupling

ANSYS CFX has a coupled solver [7]. The linear set of equations that arise by applying thefinite volume method to all elements in the domain are discrete conservation equations. Thecoupled solver strategy implies that the hydrodynamic equations (for velocities and pressure)are solved as a single system. The coupling is done at the equation level. This solutionapproach uses a fully implicit discretization of the equations at any given time step. Thiscoupling strategy has several advantages over segregated approach, like robustness, efficiency,simplicity and the ability to use larger time steps.

The coupled solver strategy is shown in the figure 4.1. The solution of each set of fieldequations shown in the flow chart consists of two numerically intensive operations. For eachtime step:

� Coefficient Generation: The non-linear equations are linearized and assembled into thesolution matrix.

� Equation Solution: The linear equations are solved using an Algebraic Multigrid method.

When solving fields in the CFX-Solver, the outer (or time step) iteration is controlled bythe physical time scale or time step for steady and transient analysis, respectively. Only oneinner (linearization) iteration is performed per outer iteration in steady state analysis, whereasmultiple inner iterations are performed per time step in transient analyzes.

In contrast, OpenFOAM does not have a coupled solver. It uses Semi-Implicit Method forPressure Linked Equations (SIMPLE) [38] for steady state. SIMPLE algorithm is a guess andcorrect algorithm for calculation of pressure. It starts with a guess value for pressure field andsolves the discretized momentum equations to yield velocity components. After solving thepressure correction equation, the values of pressure and velocity fields are corrected. Othertransport equations (if any) are solved based upon these corrected values. OpenFOAM uses anextension of SIMPLE algorithm called Pressure Implicit with Splitting of Operators (PISO)[25] for transient calculations. s It involves one predictor step and two corrector steps.

These semi-implicit schemes imposes certain limitations, especially with respect to theCourant number and consequently the time step increments. The Courant-Friedrichs-Lewy(CFL)condition [18] is a necessary condition for explicit time marching scheme for solving partialdifferential equations. The Courant number is a measure of the portion of cell that a variablewill travel in one time step. For one dimensional case, Courant number is defined as:

Cr =u.4 t

4x(4.1)

18

Page 26: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Figure 4.1: General field solution process used in the CFX-Solver [7]

19

Page 27: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

where u is the velocity, 4t is the time step and 4x is the length interval or dimension of cell.Lower Courant number(0 < Cr < 0.5) means better stability but more time is required

to reach the final solution. The recommended maximum value of the Courant number is 0.3.For certain solvers like dieselFoam the recommended value is 0.1. This implies using verysmall time steps, which increases the amount of time required for simulation. Many physicalphenomenon can be treated as steady state, however OpenFOAM has many transient solvers.This implies using a transient solver, where a steady state solver would been appropriate. Thisleads to increased time to reach a quasi-stationary solution.

Many solvers in OpenFOAM can handle time stepping in two different ways[1]. The firstoption is to set the timestep manually, but choosing a too large time step often leads toexponentially increasing Courant number, thereby causing divergence. Choosing very smalltime steps leads to increase in simulation time. The second approach is using an adjustabletime steps where OpenFOAM automatically sets the time step based on the maximum Courantnumber entered in the control dictionary file. This adjustable time step control feature, basedupon maximum Courant number is not available in all solvers. However it is possible to extendthe solver codes to include this feature.

Matrix Solvers Algorithms

ANSYS CFX uses a particular implementation of Algebraic Multigrid called Additive Correc-tion [7]. This approach is ideally suited to the CFX-Solver implementation because, it takesadvantage of the fact that the discrete equations are representative of the balance of conservedquantities over a control volume. The coarse mesh equations can be created by merging theoriginal control volumes to create larger ones.

OpenFOAM has several options for solving each discretized equation. There are differentmatrix solvers for symmetric and asymmetric matrices. Three kinds of solvers available:

� Conjugate Gradient solvers (preconditioned conjugate gradient(symmetric) and precon-ditioned bi-conjugate gradient(symmetric)),

� Smooth solvers(Gauss-Seidel, Diagonal Incomplete Cholesky(symmetric) and DiagonalIncomplete Cholesky with Gauss-Seidel(symmetric))

� Generalized geometric-algebraic multi-grid (GAMG)

A detailed description of the named solvers is available in [1] and [43].

4.4 Parallelization

In the recent years, computer science is witnessing dramatic changes. The processor technologyhas shifted from higher clock frequencies to parallel architecture. One of the reasons for thisshift has been the lower power consumption by using multiple cores at lower clock frequenciesto get the same computing performance. A quad core desktop is common market commoditytoday. This shift towards multicore technology combined with the ease and affordability toassemble a compute cluster, has become a challenge for application developers. To take theadvantage of this multicore architecture, simulation softwares need to perform well in parallelrun.

To measure the performance of an application in parallel environment a measure calledSpeedup is used. It is defined as follow:

Sp =T1

Tp(4.2)

20

Page 28: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

where T1 is the execution time with a single processor and Tp is the execution time with pprocessors. In an ideal case (linear speedup) Sp should be equal to the number of processorsp. This implies that doubling the number of processors will half the execution time.

Parallelization is an essential feature for any simulation software. Both ANSYS CFX andOpenFOAM offer various domain decomposition strategies. These are listed in the followingtable.

ANSYS CFX OpenFOAMMeTiS MeTiSRecursive Coordinate Bisection DirectOptimized Recursive Coordinate Bisection HierarchicalSimple AssignmentUser Defined DirectionDirectional Recursive Coordinate BisectionJunction BoxRadialCircumferential.

The public domain decomposition tool MeTiS is one of the advanced mesh partitioningalgorithms and it is the default partitioner used by ANSYS CFX due to robustness andspeed [30]. ANSYS CFX provides more options for domain decomposition []. This can beadvantageous for certain geometries. As an example, for domain decomposition of a cylinderof small height and large radius, circumferential splitting could be the best strategy.

OpenFOAM-1.6 introduces another domain decomposition strategy Scotch [39]. Scotch isa general multi-level decomposition method originating from the ScAlApplix project (Inria).It is a framework for general recursive partitioning methods and a such comparable to MeTiSbut with a permissive license.

A parallel simulation with OpenFOAM involves first decomposing a mesh. Then running inparallel and finally reconstructing the solution files. All these operations have to be performedmanually, as described below. In contrast, ANSYS CFX has automatic procedure for parallelsimulations.

decomposeParDict file is used to specify the number of subdomains and distributed harddisk paths.

� decomposeParThis generates several directories from processor0 to processor(N-1), for N number ofprocessors.

� The following command is used to run an application (here icoFoam) in parallel.foamJob -p icoFoam

� After the simulation is complete, the results from various processor* directories have tobe combined, to reconstruct the case.reconstructPar

4.5 Mesh Import and Conversion

CFD softwares work with a meshed geometry. Both solvers offer a wide range of importoptions.

21

Page 29: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

OpenFOAM has two inbuilt utilities for mesh generation blockMesh and snappyHexMesh.blockMesh is an utility for creating elementary geometry and the corresponding hexahedralmesh. It is relevant and easy for cases of academic interest with a very simple geometry. Oneof the advantages of this utility is that it creates parametric meshes with grading and curvededges. This gives OpenFOAM a significant advantage compared to ANSYS CFX, as simplegeometries can be defined easily. The corresponding mesh can be refined or coarsened usingblockMeshDict file, without any aid from external meshing tools.

snappyHexMesh can read a STL(stereo lithiography) format and can be used to gener-ate meshes containing hexahedra (hex) and split-hexahedra (split-hex) automatically fromtriangulated surface geometries in STL format.

The meshes for this work were created using a meshing software ANSYS ICEM CFD.ANSYS CFX can directly import the meshes generated in ICEM CFD. For OpenFOAM, theICEM mesh is first exported as fluent meshes in ASCII format. According to the discussionsin OpenFOAM forums[19] and also as per the author‘s own experience, fluent3DmeshToFoamis the most reliable format for complicated mesh conversion process. The command to converta Fluent mesh into OpenFOAM format is :

$ fluentMeshToFoam . case Fluent-mesh-file.msh -scale 0.001

CAD and meshing softwares generally use millimeters as length unit. To convert themesh into metres, the option -scale 0.001 is necessary. The surfaces in the imported meshare defined as walls. The boundaries are defined in constant/polymesh/boundary and it isnecessary to edit this file to get the desired boundaries. The surfaces that have to be used asinlet or outlet need to redefined as a patch.

In contrast, ANSYS CFX is able to read mesh from most of the popular mesh formatswithout any manual intervention. The following table gives an overview of the supportedmesh import options. ANSYS CFX has better support for meshes from commercial pack-ages(NASTRAN, PATRAN) whereas OpenFOAM is more inclined towards support for meshfrom open-source packages (e.g. NetGen and Gmsh).

ANSYS CFX OpenFOAMANSYS Meshing ansysToFoamCFX-Mesh ccm26ToFoamCFX-Solver Input files tetgenToFoamICEM CFD gmshToFoamANSYS Files gambitToFoamANSYS FLUENT fluentMeshToFoamCGNS kivaToFoamCFX-TASCflow netgenNeutralToFoamCFX-4 Grid cfx4ToFoamCFX-BladeGenPlus plot3dToFoamPATRAN Neutral sammToFoamIDEAS Universal ideasUnvToFoamGridPro/az3000 Grid starToFoamNASTRANPointwise Gridgen Files

22

Page 30: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

4.6 Materials Library and Chemistry

OpenFOAM has a library of materials that includes liquids like water, nHeptane, nOctaneand some other hydrocarbons. To add additional materials to the database, it is necessaryto define these material properties and compile the source code. On the other hand, ANSYSCFX has a database of most common solids, liquids and gases. Additionally, it is easier todefine new materials and their characteristics in CFX, without the need for compilation.

Both codes have support for temperature dependent data specified according to the NASApolynomial format. When two reactants undergo a reaction, in case of an exothermic reaction,heat will be produced. To account for this heat release and calculate some properties basedon new temperature the NASA polynomial format is used. By default this is located inchemkin/therm.dat file. This format is explained in Appendix C.

An alternate chemistry library, CANTERA is under development [20]. This library hasthe capability of running in both steady and transient conditions, which would be an give theflexibility of running the current solvers for chemical kinetics as steady state solvers.

23

Page 31: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Chapter 5

Numerical Results

This chapter describes the results of the simulated test cases. Two simple problems dealingwith compressible and incompressible flows are discussed. This is followed by the results ofsimulation of the quenching process in coal gasification.

5.1 Benchmark Reactor

The first test case involves compressible flow with heat transfer in a reactor geometry. Thecross section of the reactor is shown in the figure 5.1. This reactor consists of a multiple pipes,with the aim of increasing the surface area. The increased surface area is beneficial for catalyticreactions. The inner pipe walls are modeled as adiabatic and the outer circumferential wallof the reactor is at a constant temperature of 473 K. Air at 298K enters the reactor frominlet located at the top. An atmospheric pressure outlet condition was fixed for the outlet.Turbulence is set to 5% intensity applying the standard k− ε model. Different inlet mass flowrates were simulated and the corresponding average outlet temperatures were plotted (Figure5.2).

OpenFOAM solver used for this simulation is rhoSimpleFoam. This solver is a steady stateSIMPLE solver for laminar or turbulent flow of compressible fluids. Another OpenFOAMsolver buoyantSimpleFoam, that is meant for steady state buoyant and turbulent flow ofcompressible fluids, was tested for this case. Although this solver is supposed to be capableof handling this flow scenario, it turned out to be very unstable. Hence, it could not be usedsuccessfully.

Parallel Speedup

Both ANSYS CFX and OpenFOAM were tested with the same reactor mesh containing1,119,664 cells. The case involves compressible hot gas flow through the complex reactorgeometry. When 36 processors are used the number of cells per processor is approximately30,000. This is the minimum recommended value for running the simulation in parallel[19].

For the parallel performance study, AMD Opteron 2.3 Ghz sQuad cores were used. TwoQuad cores are combined to form one computing node. This implies that up to eight computingcores can be used with shared memory configuration.

ANSYS CFX offers several parallel run modes. These include Parallel Virtual Machine(PVM), Message Passing Interface (MPI) open-source version called MPICH and a proprietaryvendor specific version of MPI called HPMPI. According to the tests conducted for the reactorcase, HPMPI proved to be the fastest of all the three strategies (see Table 5.1).

As seen in Figure 5.5 both software packages scaled well up to eight processors (i.e. withshared memory). OpenFOAM performs slightly better than ANSYS CFX for parallel run

24

Page 32: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Figure 5.1: Cross section ofthe reactor Figure 5.2: Temperature vs flow rate

CPU PVM HPMPI MPICH4 1045 790 9548 535 391 48116 298 246 275

Table 5.1: Performance of different parallel run strategies in ANSYS CFX (Wall Clock Timein seconds).

with shared memory (i.e. up to 8 CPUs). Beyond eight processors both solvers did not scalethat well on the compute cluster. OpenFOAM was underperforming compared to ANSYSCFX. A sensible explaination for the weaker performance of OpenFOAM is the slow internodeconnection. This seemed to be handled more efficiently by ANSYS CFX.

5.2 Benchmark T-Junction

A T-shaped intersection of two pipes was used to test the mixing of water entering the domainfrom perpendicular inlets. The setup consists of two inlets and one outlet. This configurationis common in piping system (household drinking water supply or industrial plants). Theknowledge about mixing characteristics of fluids at T-junctions can be useful. For example,the study of contamination scenarios in a pipe network.

It is assumed that both fluids have the same physical properties like density, viscosity, etc.It was easy to include two liquids say blue water and red water in ANSYS CFX. OpenFOAMlacks this capability. Hence the solvers of OpenFOAM were extended by including additionalscalar transport equations. Specifically the incompressible transient solvers icoFoam (for lam-inar flow) and turbFoam (for turbulent flow) were modified. These solvers use the PISOscheme for pressure-velocity coupling. The code for myInkIcoFoam is given in Appendix A.2.

25

Page 33: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Figure 5.3: Temperature profile of cross-sectionwith OpenFOAM

Figure 5.4: Temperature profile of cross-sectionwith ANSYS CFX

Similarly, turbFoam was modified to myInkTurbFoam solver. The incompressible steady statesolver simpleFoam, based on the SIMPLE scheme was modified to include additional scalartransport equations. The code for myInkSimpleFoam is also given in Appendix A.3.

The following table shows the comparison of the wall clock time of ANSYS CFX andOpenFOAM using a single CPU.

For the steady state problem with Re=10, we can conclude that convergence rate of ANSYSCFX is better than OpenFOAM. Although both software packages apply a multigrid method(ANSYS CFX solves the full matrix, OpenFOAM was set to solve only the pressure matrixby multigrid).

For the transient simulations with Re=1000 and Re=10,000 it has to be noted that Open-FOAM is restricted by the CFL-condition and hence only very small time steps can be applied.Applying the same time steps for both software packages, we observe a much better perfo-mance of OpenFOAM. However as ANSYS CFX is a full implicit solver, much larger timessteps can be applied leading to a faster convergence of the result.

Re OpenFOAM CFX10 (steady-state) 30 min (myInkSimpleFoam) 20 min1,000(transient) 120 min(myInkIcoFoam) 30 min

10,000 (transient)26 hours(myInkTurbfoam) 5 hours(with default time step)- 3 weeks (with deltaT=10−6s)

26

Page 34: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Figure 5.5: Speedup of OpenFOAM vs CFX

Figures 5.6 and 5.7 show the steady state scalar fraction of the tracer computed by CFXand OpenFOAM respectively. Although the same mesh and the same equations are applied,a considerable difference of results can be observed. One can also see large differences in theresults for transient simulation with Re=1000 as shown in Figure 5.8 and 5.9. Finally, theresults of the transient simulation for Re=10,000 are shown in Figure 5.10 and 5.11. Theseresults cannot be compared directly, as teh time step sizes are not the same. With small timesteps (Figure 5.11) it can be observed that no steady state solution is reached. These resultsindicate that ANSYS CFX is very robust, but less accurate (Figure 5.10 and 5.11). Thisconclusion is preliminary and must be confirmed in further studies.

Figure 5.6: CFX Re=100 Figure 5.7: OpenFOAM Re=100

The scalar fraction of the mixing fluid is shown in Figure 5.12. This figure shows themixing characteristics for flow with different Reynolds number. Normalized length is used forplotting purpose.

27

Page 35: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Figure 5.8: CFX Re=1000 Figure 5.9: OpenFOAM Re=1000

Figure 5.10: CFX Re=10,000 Figure 5.11: OpenFOAM Re=10,000

Figure 5.12: Mixing of the tracer along the length of pipes

5.3 Quencher

Boundary Conditions

The boundary conditions for the simulation of the quenching process were obtained froman industrial gasifier. It is 175 megawatts (thermal) capacity oil conversion plant with fullquench system. The inlet syngas temperature is 1774 K and the mass flow rate is 10 kg/s.The operating pressure is 25 bar. In total nine injectors are used to spray water into the

28

Page 36: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

chamber to cool the syngas. The total mass flow rate for injected water is 15 kg/s at 403 K.Eight injectors are located at the top of the chamber, arranged in a circular fashion. Figure2.6 shows one of such injectors at the top right hand side. The ninth injector is located nearthe outlet pipe section. The walls are modeled as adiabatic walls and the water surface at thebottom of the quencher is also treated as adiabatic.

Solvers

The two approaches for multiphase flows: Eulerian-Eulerian and Eulerian-Lagrangian wereevaluated. Various solvers of OpenFOAM library were evaluated to test the suitability forthe simulation of the quenching process. Amongst them various multiphase solvers such as:interFoam and eulerFoam, etc. were tested. These solvers were limited to isothermal case.Eulerian approach requires the fine resolution of the spray injectors. This fine resolution of theboundary also implies refining the mesh in the volume region as well. In contrast Lagrangianapproach can be used by specifying the coordinate points of the injectors and it does notrequire further mesh refinement.

The simulation of the quenching process of coal gasification demands a multiphase solvercapable of handling chemical reactions. As such reactingFoam and dieselFoam are theonly solvers in OpenFOAM-1.5 capable of handling chemical reactions. The only Eulerian-Eulerian solver in OpenFOAM capable of handling chemical reaction is reactingFoam and itwas tested for the given quencher scenario. reactingFoam was found not appropriate for thegiven scenario, due to its inability to deal with large density differences that exist due betweenthe densities of the injected water and the feedgas. After exploring all options for multiphaseflows in OpenFOAM, it was determined that dieselFoam is suppose to be the best choice forsimulating the quenching process.

dieselFoam parameters

There are nine sprays in the quencher. They are modeled in the sprayProperties as describedin B.2.

In addition to the sprayProperties, injectorProperties file is used to specify the pa-rameters associated with the injectors like injector position, mass flow rate profile, velocityprofile, temperature, injection pressure, etc. of the injected liquid. This is described in B.1

OpenFOAM’s dieselFoam solver does not include a mass flow rate (kg/s) boundary condi-tion for the Eulerian gas phase inlet. It can be specified as volume flow rate or as velocity at theinlet. To overcome this limitation, a test simulation was performed with ANSYS CFX to getthe velocity at the inlet. This was based upon the given mass flow rate and the correspondingproperties (NASA format).

Results

The simulation time for steady state simulation with CFX was 14 hours with 8 CPUs. On theother hand the transient OpenFOAM code dieselFoam required about 30 days with 8 CPUsto simulate 3 seconds of flow. This long time is due to the small adaptive time steps of theorder of 10−6 − 10−5 seconds.

The transient nature of the temperature at the outlet computed by OpenFOAM showsno steady state situation, in contrast to the result obtained by CFX. If this problem has nosteady state solution, then OpenFOAM may need small time step sizes but delivers correctresults. If there exists a steady state solution, then CFX has proved to be much more efficient.

29

Page 37: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

As this question cannot be answered within this thesis, further investigations with this respecthave to be undertaken.

The average temperature at the outlet of the quencher was 828 K and 908 K for Open-FOAM and CFX respectively. Both these values are quite far away from the expected outlettemperature of 450-500 K. This can be attributed to the fact that the Lagrangian liquid phasehas more than twice the mass flow rate, as compared to the Eulerian phase gas. The classicalEulerian-Lagrangian models currently implemented in OpenFOAM and ANSYS CFX are notsuitable for handling more than 10% volume fraction of dispersed phase[8].

Figure 5.13: Temperature profile at centralplane (CFX)

Figure 5.14: Temperature profile at centralplane (OpenFOAM)

30

Page 38: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Chapter 6

Summary and Outlook

The two software packages OpenFOAM and ANSYS CFX solvers were compared for differenttest scenarios relevant in an industrial environment. To begin with test cases involving in-compressible flow and compressible flow with heat transfer (without chemical reaction) wereinvestigated.

It can be concluded that although OpenFOAM is transparent as it is an open source tool, itwas less robust as compared to ANSYS CFX. As per author’s experience with the two solvers,there is an order of magnitude difference with respect to the time required for preprocessingand getting results. ANSYS CFX generally works well with the default settings. OpenFOAMrequires the user to set all the solver parameters. These parameters can be adapted fromthe given tutorials. However for complicated cases, solver setup can be a tedious procedureinvolving editing of dozens of text files. This also implies that the user needs to have agood amount of understanding of the physics and the numerics. According to the author’sexperience and several posts on the OpenFOAM forum, getting the correct parameters forsolvers is a challenging and time consuming task.

OpenFOAM has severe limitations with respect to the CFL number. This leads to smallertime steps and hence increases the overall time required to reach a converged solution or aquasi steady state solution. ANSYS CFX offers the advantage of running a simulation assteady state or transient. In contrast OpenFOAM is limited by the nature of solvers. Thesolvers which were implemented as transient in OpenFOAM cannot be used as a steady statesolver and vice versa, due to such different schemes used (e.g. SIMPLE for steady state andPISO for transient).

With regard to the test cases it can be concluded that both software packages differ mainlywith respect to the robustness and accuracy. As already mentioned in chapter five, CFXprovides even for a rather large Reynolds number (e.g, T-junction) a steady state solution.This underlines its strong robustness. However, OpenFOAM may not reach steady statesolutions in comparable settings. With this regard, the fundamental question has to be asked,whether CFX produces steady state solutions though there may be no steady state solutionat all and where OpenFOAM gives the correct solution. Unfortunately, this question will bepostponed and has to be addressed in future investigations.

Both OpenFOAM and ANSYS CFX results for quenching process are quite far off fromthe expected values of temperature. This is due to the limitations of the current multiphasemodels implementation in the solvers. Dense dispersed particle model(DDPM) like the oneimplemented in ANSYS Fluent are under development in OpenFOAM [19]. This model couldhelp in improved stability and reliable solution for simulation of quenching process in coalgasification and other similar cases involving high volume fraction of discrete phase. As re-ported in [15], DDPM delivers results comparable to the experiments as compared to standarddiscrete particle models.

31

Page 39: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

OpenFOAM-1.6 was released on 29th July 2009. There are significant changes in manysolvers and some new solvers are introduced within this version of the code. The new solverrhoReactingFoam could be used for Eulerian-Eulerian multiphase phase flows with reactingmixtures. Typically Eulerian-Eulerian simulations demand lesser computing power comparedto Euler-Lagrangian simulations. This solver could lead to substantially shorter simulationtime.

32

Page 40: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Appendix A

Codes for incompressible mixingfluid solvers

For the test case with a T-section as described in section 5.2 three OpenFOAM solvers(icoFoam,turbFoam and simpleFoam) were modified. The codes and the appropriate changes are men-tioned in the following sections.

A.1 createFields.H

Additional scalar fields were created as given below. This is a common step for all threemodified solvers.

Info<< "Reading transportProperties\n" << endl;

IOdictionary transportProperties(

IOobject(

"transportProperties",runTime.constant(),mesh,IOobject::MUST_READ,IOobject::NO_WRITE

));

dimensionedScalar nu(

transportProperties.lookup("nu"));

Info<< "Reading field p\n" << endl;volScalarField p(

IOobject(

"p",runTime.timeName(),

33

Page 41: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

mesh,IOobject::MUST_READ,IOobject::AUTO_WRITE

),mesh

);

Info<< "Reading field U\n" << endl;volVectorField U(

IOobject(

"U",runTime.timeName(),mesh,IOobject::MUST_READ,IOobject::AUTO_WRITE

),mesh

);

/************* BEGIN: Read the additonal scalars **************/Info<< "Reading field c\n" << endl;volScalarField c(

IOobject(

"c",runTime.timeName(),mesh,IOobject::MUST_READ,IOobject::AUTO_WRITE

),mesh

);Info<< "Reading field s\n" << endl;volScalarField s(

IOobject(

"s",runTime.timeName(),mesh,IOobject::MUST_READ,IOobject::AUTO_WRITE

),mesh

);/************* END **************/

34

Page 42: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

# include "createPhi.H"

label pRefCell = 0;scalar pRefValue = 0.0;setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);

A.2 myInkIcoFoam.C

#include "fvCFD.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[]){

# include "setRootCase.H"# include "createTime.H"# include "createMesh.H"# include "createFields.H"# include "initContinuityErrs.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Info<< "\nStarting time loop\n" << endl;

for (runTime++; !runTime.end(); runTime++){

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

# include "readPISOControls.H"# include "CourantNo.H"

fvVectorMatrix UEqn(

fvm::ddt(U)+ fvm::div(phi, U)- fvm::laplacian(nu, U)

);

solve(UEqn == -fvc::grad(p));

// --- PISO loop

for (int corr=0; corr<nCorr; corr++){

volScalarField rUA = 1.0/UEqn.A();

U = rUA*UEqn.H();

35

Page 43: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

phi = (fvc::interpolate(U) & mesh.Sf())+ fvc::ddtPhiCorr(rUA, U, phi);

adjustPhi(phi, U, p);

for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++){

fvScalarMatrix pEqn(

fvm::laplacian(rUA, p) == fvc::div(phi));

pEqn.setReference(pRefCell, pRefValue);pEqn.solve();

if (nonOrth == nNonOrthCorr){

phi -= pEqn.flux();}

}

# include "continuityErrs.H"

U -= rUA*fvc::grad(p);U.correctBoundaryConditions();

}//myIcoFoam additions/************* BEGIN **************/// solve a scalar transport equationsolve(fvm::ddt(c)==- fvm::div(phi,c));// solve a second scalar transport equationsolve(fvm::ddt(s)==- fvm::div(phi,s));/************* END **************/

runTime.write();

Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"<< " ClockTime = " << runTime.elapsedClockTime() << " s"<< nl << endl;

}

36

Page 44: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Info<< "End\n" << endl;

return(0);}

A.3 myInkSimpleFoam.C

#include "fvCFD.H"#include "incompressible/singlePhaseTransportModel/singlePhaseTransportModel.H"#include "incompressible/RASModel/RASModel.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[]){

# include "setRootCase.H"# include "createTime.H"# include "createMesh.H"# include "createFields.H"# include "initContinuityErrs.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Info<< "\nStarting time loop\n" << endl;

for (runTime++; !runTime.end(); runTime++){

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

# include "readSIMPLEControls.H"# include "initConvergenceCheck.H"

p.storePrevIter();

// Pressure-velocity SIMPLE corrector{

# include "UEqn.H"# include "pEqn.H"/************* BEGIN **************/// solve a scalar transport equationsolve(fvm::ddt(c)==- fvm::div(phi,c));// solve a scalar transport equationsolve(

37

Page 45: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

fvm::ddt(s)==- fvm::div(phi,s));/************* END **************/

}

turbulence->correct();

runTime.write();

Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"<< " ClockTime = " << runTime.elapsedClockTime() << " s"<< nl << endl;

# include "convergenceCheck.H"}

Info<< "End\n" << endl;

return(0);}

38

Page 46: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Appendix B

dieselFoam solver

B.1 sprayProperties

The modeling of sprays is described here (only two spray are shown here).

/*---------------------------*- C++ -*--------------------------------*\| ========= | || \\ / F ield | OpenFOAM: The Open Source CFD Toolbox || \\ / O peration | Version: 1.5 || \\ / A nd | Web: http://www.OpenFOAM.org || \\/ M anipulation | |\*---------------------------------------------------------------------*/FoamFile{

version 2.0;format ascii;class dictionary;object sprayProperties;

}// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

interpolationSchemes{

U cellPointFace;rho cell;p cell;T cell;

}

subCycles 2;atomizationModel off;includeOscillation yes;breakupModel ReitzKHRT;injectorModel hollowConeInjector;collisionModel off;evaporationModel standardEvaporationModel;heatTransferModel RanzMarshall;dispersionModel off;dragModel standardDragModel;wallModel remove;

specConstAtomizationCoeffs

39

Page 47: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

{dropletNozzleDiameterRatio( 0.4 );sprayAngle( 10 );

}

ReitzKHRTCoeffs{

B0 0.61;B1 40;Ctau 1;CRT 0.1;msLimit 0.2;WeberLimit 6;

}

trajectoryCoeffs{

cSpace 1;cTime 0.3;

}

standardDragModelCoeffs{

preReFactor 0.166667;ReExponent 0.666667;ReLimiter 1000;CdLimiter 0.44;Cdistort 2.632;

}

standardEvaporationModelCoeffs{

evaporationScheme explicit;preReScFactor 0.6;ReExponent 0.5;ScExponent 0.333333;

}

RanzMarshallCoeffs{

preRePrFactor 0.6;ReExponent 0.5;PrExponent 0.333333;

}

hollowConeInjectorCoeffs{

dropletPDF //first spray: top{

pdfType RosinRammler;RosinRammlerPDF{

minValue 1.00e-6;maxValue 1.50e-4;

40

Page 48: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

d(

1.5e-4);

n(

3);

}}//first inj: topinnerConeAngle(

0.0//other seven angles are specified here

0.0);outerConeAngle(

90.0//other seven angles are specified here

120.0);

//******************First Injector*****************************//{

pdfType RosinRammler;

RosinRammlerPDF{

minValue 1.00e-6;maxValue 1.50e-4;

d(

1.5e-4);

n(

3);

}}

// Rest of the sprays are specfied similarly ////******************Ninth Injector*****************************//

{pdfType RosinRammler;RosinRammlerPDF{

minValue 1.00e-6;maxValue 1.50e-4;

d(

1.5e-4

41

Page 49: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

);

n(

3);

}}

} //hollowConeInjectorCoeffs// ******************************************************** //

B.2 injectorProperties

/*--------------------------------*- C++ -*----------------------------------*\| ========= | || \\ / F ield | OpenFOAM: The Open Source CFD Toolbox || \\ / O peration | Version: 1.5 || \\ / A nd | Web: http://www.OpenFOAM.org || \\/ M anipulation | |\*---------------------------------------------------------------------------*/FoamFile{

version 2.0;format ascii;class dictionary;object injectorProperties;

}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

({//******************First Injector*****************************//injectorType definedInjector;definedInjectorProps{

position (0.8 1.0.0.0);direction (1 0 0);diameter 4.2e-4;mass 15;temperature 404.0;nParcels 5000;X(

1.0);massFlowRateProfile(

(0 15000.0)(10.0 15000.0)

);velocityProfile(

(0.0 30.0)(10.0 30.0)

);

42

Page 50: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

}}

// Rest of the injectors are specfied similarly //{//******************Ninth Injector*****************************//

injectorType definedInjector;definedInjectorProps{

position (2.5 0.3 0); //9th injector, near outletdirection (0 1 0);diameter 4.2e-4;mass 15;temperature 404.0;nParcels 5000;X(

1.0);massFlowRateProfile(

(0 18000.0)(10.0 18000.0)

);velocityProfile(

(0.0 30.0)(10.0 30.0)

);}

})// *********************************************************** //

43

Page 51: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Appendix C

CHEMKIN file format

Example of chemkin/therm.dat file is:

C7H16 P10/95 C 7H 16 0 0G 200.000 5000.000 1391.0002.22148969e+01 3.47675750e-02-1.18407129e-05 1.83298478e-09-1.06130266e-13

-3.42760081e+04-9.23040196e+01-1.26836187e+00 8.54355820e-02-5.25346786e-051.62945721e-08-2.02394925e-12-2.56586565e+04 3.53732912e+01

chemkin/therm.dat file uses an old Fortran style parsing pattern. This has several re-strictions in the way the data in entered.

1. The first row contains species name, date (not used in the code), atomic symbols andformula, phase of species (S, L, or G for gas), low temperature, high temperature andcommon temperature (if needed).

2. The second row contains coefficients a1 to a5 in equation C.1 for upper temperatureinterval.

3. The third row contains coefficients a6, a7 for upper temperature interval, and a1, a2,and a3 for lower temperature interval.

4. The fourth row contains coefficients a4, a5, a6, a7 for lower temperature interval.

From these constants, (NASA) polynomials for specific heat Cp , enthalpy H and entropyS can be calculated. These values are used to solve the conservation equations.

CpR

= a1 + a2T + a3T2 + a4T

3 + a5T4 (C.1)

H

RT= a1 +

a2T

2+a3T

2

3+a4T

3

4+a5T

4

5+a6

T(C.2)

S

R= a1lnT + a2T + +

a3T2

2+a4T

3

3+a5T

4

4+ a7 (C.3)

44

Page 52: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

Bibliography

[1] OpenFOAM User Guide version 1.5. OpenCFD Ltd., 2008.

[2] OpenFOAM User Guide version 1.5. OpenCFD Ltd., 2008.

[3] ANSYS CFD-Post User’s Guide. ANSYS Inc., 2009.

[4] ANSYS CFX-Pre User’s Guide. ANSYS Inc., 2009.

[5] ANSYS CFX Reference Guide. ANSYS Inc., 2009.

[6] ANSYS CFX-Solver Manager User’s Guide. ANSYS Inc., 2009.

[7] ANSYS CFX-Solver Theory Guide. ANSYS Inc., 2009.

[8] ANSYS CFX-Sovler Modeling Guide. ANSYS Inc., 2009.

[9] ANSYS CFX Tutorials. ANSYS Inc., 2009.

[10] C. Andersen and N. E. L. Nielsen. Numerical investigation of a BFR using OpenFOAM.Institute of Energy Technology, Aalborg University, 2008.

[11] J. D. Anderson Jr. Computational Fluid Dynamics, The Basics with Applications.McGraw-Hill Inc., 1995.

[12] Andrew F. Bennett. Lagrangian Fluid Dynamics. Cambridge University Press, 2006.

[13] M. Breuer. Numerische Stroemungsmechanik. Vorlesungsskript, 2007.

[14] Felipe Bustamante-Londono. The high-temperature, high-pressure homogeneous water-gasshift reaction in a membrane reactor. PhD thesis, 2004.

[15] M. Ehmann. Anwendung der Stroemungssimulation beim Design von Kraftwerken. Fach-tagung : Energie- Umwelt- und Verfahrenstechnik, 2009.

[16] R. M. Enick et al. Kinetics of the Homogeneous Water Gas Shift Reaction at high tem-perature. University of Pittsburgh.

[17] R. M. Enick et al. Uncatalysed and wall-catalyzed Forward Water Gas Shift Kinetics.University of Pittsburgh.

[18] J. H. Ferziger and M. Peric. Computational Methods for Fluid Dynamics. Springer-Verlag,2001.

[19] OpenFOAM Forum. http://www.cfd-online.com/Forums/openfoam/.

[20] B.F.W. Gschaider, M. Rehm, P. Seifert, and B. Meyer. Implementation of an AlternateChemistry Library into OpenFOAM. Open Source CFD International Conference, Berlin,2008.

45

Page 53: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

[21] F. Hannemann, M. Schingnitz, and G. Zimmermann. Siemens IGCC and GasificationTechnology – Today’s solution and Developments. 2nd International Freiberg Conferenceon IGCC and XtL Technologies, 2007.

[22] Anna Margrete Hansen. CFD simulation of a fin-and-tube heat exchanger. Group forChemical Fluid Flow Processes, Aalborg University, 2008.

[23] Dan S. Henningson and Martin Berggren. Fluid Dynamics: Theory and Computation.2005.

[24] C. Higman and M. Burgt. Gasification. Gulf Professional Publishing, 2008.

[25] R I Issa. Solution of the implicitly discretised fluid flow equations by operator-splitting.J. Comput. Phys., 62(1), 1986.

[26] Hrvoje Jasak and Aleksandar Jemcovand Zeljko Tukovi. Openfoam: A c++ library forcomplex physics simulations. International Workshop on Coupled Methods in NumericalDynamics., 2007.

[27] F. P. Karrholm. Numerical Modelling of Diesel Spray Injection, Turbulence Interactionand Combustion. Department of Applied Mechanics, Chalmers University of Technology,2008.

[28] R.J. Kee et al. CHEMKIN-III: A FORTRAN Chemical Kinetics Package for the Analysisof Gas-Phase Chemical and Plasma Kinetics.

[29] C. K. Law. Combustion Physics. Cambridge University Press, 2006.

[30] MeTiS. http://glaros.dtc.umn.edu/gkhome/views/metis/.

[31] R. W. Missen, C. A. Mims, and B. A. Saville. Introduction to Chemical Reaction Engi-neering and Kinetics. John Wiley and Sons, Inc., 1999.

[32] Hakan Nilsson. PhD course in CFD with OpenSource software, 2007.http://www.tfd.chalmers.se/hani/kurser/OS-CFD-2007.

[33] Hakan Nilsson. PhD course in CFD with OpenSource software, 2008.http://www.tfd.chalmers.se/hani/kurser/OS-CFD-2008.

[34] N. Nordin. Complex Chemistry Modeling of Diesel Spray Combustion. PhD thesis, 2001.

[35] OpenCFD. http://www.opencfd.co.uk.

[36] Elaine S. Oran and Jay P. Boris. Numerical Simulation of Reactive Flow. CambridgeUniversity Press, 2001.

[37] A. Ortwein, M. Grabner, and B. Meyer. CFD Modelling of Coal and Oil Gasification. In-stitute of Energy Process Engineering and Chemical Engineering, Technische UniversitatBergakademie Freiberg, 2007.

[38] S. V. Patankar. Numerical heat transfer and fluid flow. Hemisphere Publishing Corpora-tion, 1980.

[39] Francois Pellegrini. PT-Scotch and libScotch 5.1.http://www.math.drofnats.edu/riemann.ps.

46

Page 54: Lehrstuhl fur Informatik 10 (Systemsimulation) · ANSYS CFX version 11.0 with Service Pack 1 was used for simulation of the rst part of thesis work involving simple cases. ... Chapter

[40] V. Rivola. Comparative Study of the CFD codes: Mistral and OpenFOAM. Parc Tech-nologique Cap Delta, Verniolle, France, 2007.

[41] A. Steynberg and M. Dry. Fischer-Tropsch technology. Elsevier, 2004.

[42] M. E. Taskin. CFD simulation of transport and reaction in cylindrical catalyst particles.PhD thesis, 2007.

[43] U. Trottenberg, C. W. Oosterlee, and A. Schueller. Multigrid. Academic Press, 2001.

[44] H. K. Versteeg and W. Malalasekera. An introduction to computational fluid dynamics:the finite volume method. Pearson Education Limited, 2007.

[45] P. Wesseling. Principles of computational fluid dynamics. Springer-Verlag, 1991.

[46] B. Wuethrich. Simulation and validation of compressible ow in nozzle geometries andvalidation of OpenFOAM for this application. Institute of Fluid Dynamics, ETH Zurich,2007.

47