Los Alamos: KIVA-II: A Computer Program For Chemically Reactive Flows With Sprays

Download as pdf or txt
Download as pdf or txt
You are on page 1of 163

LA-11560-MS

KIVA-II: A Computer Program for Chemically


Reactive Flows with Sprays

Los Alamos
N A T IO N A L L A B O R A T O R Y

Los Alamos National Laboratory is operated by the University of California for the United States Department of Energy under contract W-7405-ENG-36.
Prepared by Adrienne Rosen, Group T-3

This work was supported by the US Department of Energy, Division of


Energy Conservation and Utilization Technologies.

An Affirmative Action/Equal Opportunity Employer

This report was prepared as an account of work sponsored by an agency of the United States
Government. Neither The Regents of the University of California, the United States
Government nor any agency thereof, nor any of their employees, makes any warranty, express
or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or
usefulness of any information, apparatus, product, or process disclosed, or represents that its
use would not infringe privately owned rights. Reference herein to any specific commercial
product, process, or service by trade name, trademark, manufacturer, or otherwise, does not
necessarily constitute or imply its endorsement, recommendation, or favoring by The Regents
of the University of California, the United States Government, or any agency thereof. The
views and opinions of authors expressed herein do not necessarily state or reflect those of
The Regents of the University of California, the United States Government, or any agency
thereof. Los Alamos National Laboratory strongly supports academic freedom and a
researcherÕs right to publish; as an institution, however, the Laboratory does not endorse the
viewpoint of a publication or guarantee its technical correctness.
LA-11560-MS

UC-96
Issued: May 1989

KIVA-II: A Computer Program


for Chemically Reactive Flows
with Sprays
A. A. Amsden
P. J. OÕRourke
T. D. Butler

Los Alamos
N ATION AL LABOR ATOR Y

Los Alamos, New Mexico 87545


TABLE OF CONTENTS

ABSTRACT ............................................................... 1
I. INTRODUCTION AND BACKGROUND ................................ 1
n. THEGOWRNINGE QUATIONS ...................................... 7
~,
Tk-e-~5.kic2Phase==..=, =. =. ==. . ...=... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. T
IL. ‘The@ray.Dr@ets-:..=..=
. . ... ... ... . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-
C.. Boundary-Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. . .. .....,.,.:.=.=.=........=.. 20.
m. THEN~QT3mRIcALs+IwFim= . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ~q=
A. Telmporal”D ”iffweneing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24-
B. Sp_atial Differencing . . . . . . . . . . . . . . . . . . .-.. -.. =–.,–..–. ...=.. ...’.. . . . . . . . 24
~: StOc-ha-sti?Parti5ie’~e&nique . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.
D; State IReiations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
E. ~~~dII~fid~-~h”aS~ ~iI~erenCe ~qUatiOns . . . ,. . . . .. . . . . . . . . . .
. . . . . .. . .. 34.
Mass Density Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
;: MomentumEquation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 36
3. C41Fa~h T-ormall#eloeities- . . . . . . . . . . . . . . . . . . . . . . . . ...—. ..—,—,—,— ,—=—=— 3-7
4.. bterndfier~.Eq.ution .,..... . .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . 39-
5; T--ur*ulen~e-Equa~i~n~- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..—. —,—,—,—,— ,—:— 41
6. VolumeChang&Equation and Equations ufState . . . . . . . . .... .... .... .. 42.
P
~tiopkt-~quatiims. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43.
~. $olutionP>oeAur~forbplieitPhase B-~@uatiom. . . . . . . . . . . . . . . . . . . 43-
G. Phase C . . . . . . . . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . . 47
H. Accuracy Conditions and Automatic Timestep C&nt;~i . . . . . . . . . . . . . . . . 52
12v-.. TEECICIWH!l/%31L~OGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . W-
_A”.- (@nera~ S&ru@~re . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ..—, —,.,.,.,.=.:........ ..... ~&.
B-. The Computing Mesh . . . . . . . . . . . . . . . . . . .. .. .................... ...... .... .. .. .. . . . . . . . 60
L T-he Fiv@&sh .T=y~*-*ailab}e. . . . . .......–:–,—,—= .=.=... .................... . . . . . ~&
~: 2-D “tO3-D(jjnv~r~ion .-.-.. –-–-–= –~–=–=–.–=–.–. –.–.–.—.–.=.–==.=..=..=.. 53
c. The Indexing Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..~-.l-..~”..~:.lL1 63
D. &orageolZel]”13ata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
~. Me~hGene~+,ion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ~q=
1. T~e15stm-.Face ................................ P.
08
2. The Cylinder Head . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ::::::::: 74
--
J!. Celland Vertex Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
G. F-uelSprays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Spray. Origjn, Profile, and Orientation .,, . . . .. s..=..,.. =..=....’ ....’. ~~
;: Spray Flow Definition . . . . . . . . . . . ... ... ... . . . . =. . =.. . .. . . . . . . . . . . . ‘?9
3.
~: Particle Radius . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
stockiastiikjdjo~ ... .. ..... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . S1
H; Spar!! Ignition=. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
L. kitial.Be~elElmcti~ nSWirlProfiie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Om-
J-.
Fuel Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . --.-.-.-.,.,.=.=.=.=.=.=.-.---.-....=.,z=
K: LaP.-ew.andGutfiow.B oundaities- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85”-
L. output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
M. ~WS~@tiV~-~~OtS....... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
N. Chopper . . ... .. ..–.–.—=—=—=—=
—=–=–=—=—=—,.... .... .. .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . ... 94.
0. Ikq22m~Rf#x
3r~
. . . . . . . .. . .. .. ..... ...... ..... ..... . ... ... .. .. .. 94

ACKNOW-LEDG~NTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

v
A.PPENDIX A. DETERMJ.NATION OF THE PGS PARAMETER ........... 96

A.PPENDIX B. TURBULENT BOUNDARY LAYER TREATMENT ........ 98

APPENDIX C. NUMERICAL SOLUTION OF THE EQUATIONS


GOVERNING SPRAY DYNAMICS . . . . . . . . . . . . . . . . . . . . . . . 107

APPENDIX D. PARTICLE RADIUS SELECTION AT INJECTION ........ 113

APPENDIX E. THE DROPLET COLLISION CALCULATION ............. 115

A.PPENDIX F. THE DROPLET OSCILLATION AND BREAKUP


CALCULATION ........................................ 117
APPENDIX G. CALCULATION OF DROPLET TURBULENT DISPERSION 120

APPENDIX H. THE VARIABLE IMPLICITNESS PARAMETERS ......... 122

APPENDIX I. KINETIC CHEMICAL REACTIONS ...................... 128

AJ?PENDIX J. EQUILIBRIUM CHEMICAL REACTIONS ................ 129

APPENDIX K. CALCULATION OF VELOCITY GRADIENTS AND


VISCOUS STRESSES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
APPENDIX L. THE ALTERNATE NODE COUPLER .................... 137

APPENDIX M. QUASI-SECOND-ORDER UPWIND DIFFERENCING ..... 142

APPENDIX N. PARTIAL DONOR CELL DIFFERENCING ............... 149

APPENDIX O. ROBIN HOOD ALGORITHM ............................ 151

APPENDIX P. ANGULAR MOMENTUM CONSERVATION LOGIC ...... 152

REFERENCES .. .. ..... .... .. ........ .......... ........ ... .. .. .. .. .. .. .. 155

vi
KIVA-11: A COMPUTER PROGRAM FOR CHEMICALLY
REACTIVE FLOWS WITH SPRAYS

by

A. A. A-msden; P; J. (3’Ruurke; and--T. II: i3utier

ABSTRACT

T.hi~rePor~- documents the-K! VA--11-computer-pro-gram for the


numerical calculation of transient, two- and three-dimensional?
chemically- reactive- tl-uid- fl-ows with sprays. K-IVA-H extendsand:
enii~ the-earlier. KI..V..cde,e, impro%’-ing-~t%eomputatio nal -aam-
racy and efficiency and its ease-of-use. The KIVA-11 .equatiuns.and-
numerical solution procedure are very general and can be applied
to. ia~ina~ oc tur-bulent- flow% subsonic-or supersonic- flows; anti-
skgk-pka-o-r dkqxrrsed-- two-phase fio ws. A-rbitrary numbers of-
speck and chemica.r.etikms .ars -ak-wda.. .A4KM4R3*% gm-%ie+e
method is used to calculate evaporating.liquid sprays, includingthe-
effects of-”di-oplet-collisions and aerodynamic breakups. Although
the initial and boundary conditions and mesh generationhamxbeen-
written for internal combustion engine calculations, the logic for
tlmse- specificatio-ns- c-an- be easily modified: for a variety of- oth-er
applications= Eolluwlng--an=o\’ecview of-ihe=pl+uci~l=tiiul-es-of=the
KIVA-11 program, we describe. in-detail. the equations- solved$ t,h~
numer-ical solution- procedure, and- the- structure of the computer
pr~gr-am, Six%een -appendices provide additional- cietails co.nccnm-
; ngthe -numetical :s0Iuti unqxa-ce-d u re.

1. INTRO DUC-1’IW.AND.BACK.GROUND-

The in-cylinder dynmicsoftianc~d ~nternal.mbustion en@ne~j saeh as--the


direct-injection stratified-ehargdDISC) engine, involve anumber&compkx, closely

t
~mupledphysic%l and-chemical processes These include &lietransiimt three-dimensional
@n=~m .. e
u~-evapra%ifigf tiei’sprays i“nteractfng witii fIowing multicomponent gases

k
L
undergoing inixing; ignition; chemical reactions, and “heat transfer.. ‘The KIYF.-codei ‘J“has
the ability to calculate such flows in engine cylinders with arbitrarily shaped piston
geometries, including.the.effeckcdkmhulence and wall heat transfer. In response to the
L needs of a kirg~- user community and to reeentdeveloprnents imthefieids-of -numerical

E
fluid dynamics -mdinternal combustion engjne mocieiing> we ‘kiave-irnpkmemted .many.
improvements to ‘KIVA- .since.ikpuhlk release in 1985. T-he than ggs~e&cor~ratedin a~

1
new version of the code, called KIVA-11, that is documented in this report. KIVA-11 builds
on the capabilities of I-UVA and is quite similar in structure. Current users of KIIVA will
find the transition to KIVA-11 to be straightforward.
An excerpt from Ref. 1 explains the basis under which IS(VA was written: ‘<Since
KIVA was developed with applications to internal combustion engines in mind, it contains
several features designed to facilitate such applications. However, the basic code structure
is modular and quite general, and most of the major options (chemical reactions, sprays,
etc.) can be individually activated or deactivated by setting appropriate values for the
associated input switches. The code is therefore applicable to a wide variety of multi-
dimensional problems in fluid dynamics, with or without chemical reactions or sprays.”
Indeed, KIVA has been used for numerous studies besides internal combustion engines,
including cold flow analyses in complicated geometries, continuous spray combustors,
Bunsen burner flames, nonreacting sprays, and hydrogen-oxygen flames propagating in
long tubes, to name just a few. It is impractical to cite all such studies here because of the
widespread distribution and use of the code in industry and universities. For internal
combustion engines, besides the studies of the DISC engine that have been carried on at
General Motors Research Laboratories, Princeton University, and Los Alamos National
Laboratory,4-7 it has been used as the basis for numerical investigations of diesel
engines8-10 and of coal-fired dieselsl 1as well.
From a historical perspective, KIVA-11 is the latest in a series of multidimensional
codes that we have produced since we began work on numerical simulations of internal
combustion engines 12 years ago, under the sponsorship of what has become the
Department of Energy’s Energy Conversion and Utilization Technologies (ECUT)
program. All of them are multidimensional finite-difference codes that solve the transient
equations of motion. The first of these was the RICE code. 12 RICE was a two-dimensional
Eulerian code that utilized rectangular computing zones for its mesh, eddy diffusivity to
model the turbulence, Arrhenius kinetics with an arbitrary number of reactions and
species to represent the chemical kinetics, and a partially implicit finite difference formu-
lation to efficiently treat the acoustic terms for low Mach number flows. Bracco et al. at
Princeton modified RICE and produced the REC code,*3 which included the effect of piston
motion in the unresolved third dimension of the calculations. Another two-dimensions
Eulerian code, APACHE,14 followed RICE. This had the capabilities of RICE and the
generality of arbitrarily shaped cells. CONCHAS15 followed APACHE, and it likewise
utilized arbitrarily shaped cells but offered the feature of an arbitrary Lagrangian-
Eulerian formulation that allowed the computing zones to follow the piston motion. In
addition the turbulence effects were included in the calculations by use of a subgrid scale
model. CONCHAS-SPRAY*G replaced CONCHAS. As its name implies, it included a
model for the spray dynamics, a statistical representation that accounted for a spectrum
2
of droplet sizes and the effects of evaporation. The turbulence was calculated by means of
u-ubgrid-s~de -model that used a transportequa-tion for turbulent kinetic energy anda
kwv-ef-the-wall .treatientfo~turbulent Emm&dry ‘layers; ‘Me-chemistry was generalized”
to irdudeboth kinetic and equilibrimrewtim~-~-A1’2 the.n&dliMvecl.In addi tion=to=
retaining the capabilities oFC”O-N--C-H-AS-b~AY,it featured the ability to do either two-
or three-dimensimmdl problems-with the same code. Furthermore, it had “an expanded-
spray. nmdel tbat:&~*+s=;lli&c=s-+md<ma3Wa~i .~=~~a~musti-eswbeye}ifig
.rm3t%imFwas-
aiiopted to permit t.keffkient &computationoflow-Mach-numh~-fiows;
Table I gives the ways in-which-Kl_VA-11 differs from KIVA-. These fall into four gen-
erai ‘categories: computational efficiency improvements, numerical accuracy improve-
ments, new or improved physical submodels, and improvements in ease-of-use and
versatility.
While.somefamiliarity-withI.CI!LA1-3 orthe CONCIWS-SI?RAY codel%vcmld-be
helpfhl”; itis- notneeessary FOrund”~mtal&n@is~eportor using KIVA--IL ‘This report is
intended to fuil.y document the KII-A--H-COde. Accordingly we..now.summari-. the equa-
tions .soiti~& the numerical solution procedure, and some special features desi~ed to
fa&li tate in terrml .~=mbustio~l-en~e-a~pii cationa
ICIIA--H-soives the unsteady equations of ‘motion of a turbulent, chemically reactive
mixture of ideal-gases, coupled to the equations for a single.-component vapor.izing.fuel
spray. The gas-phase solution procedure is based on a finite volume method called the
M.&l {arbitrar~r-Laym@ m,M~ian)”method.17’is S>atitil differences-a-r~fomed ona
finite-difference mesh that subdivides the computational region into a number of small
cell~thtare hexahedrons. T-he corners of the cells-arecalled vert,iee~ -~ti.bepositia~~s-of=
the vertices may. be.mbitr=ily.spetified.functi~ns of=time, thereby, allo}ving=a-La~an@ =;.
Euierian j or mixed”d~seri”ptiafi.
-— ‘Tlie arbitrary mesfictinco~titimzh:cu~ed boundaries
andcan-~movetofullowcham-ges in combustion chamber geometry. A strength oftlie
method”is that the mesh need-no$ be orthogonal. The spatial differeneingis- made conserv-
ative wherever possible. The procedure used is to difference the basic equations in inte,
gal form, w-ith the volume of a typical ceil used-as-the control volume, and with diver-
gence -terw.atraraf6rme&to&f%c&i+ite~als utingthe divergence theorem.;$
The Cartesian components of the velocity vector are stored at cell vertices, and the
momentu~n-e~ations-a~e-d ifierenced” in a strict]~ conservative tashlon. fi c.ontr.asLti tthe
original ALE method, 17’18however, cell. faced velocities are used during a portion of the
mrnputa-tion al -eye}e.2 Their use -greatly mx-lucesthe-temiency of the A-LE method “to p.ara-
sitic velocity modes, .tl-mrebylarge.iy. elimindhg th&nfHLffQr.rlQde CcMq3k.

Tiie transient soitition is marched-out in a sequence of finite time increments called


cycles or timesteps. On each cycle the values.of.the dependent variables are cakmlatei

3
TABLE I

KIVA-11 FEATURES

1. Computational Efficiency Improvements


. Coupled, implicit differencing of diffusion terms and terms associated
with pressure wave propagation
. Subcycled calculation of convection
● Stochastic spray particle injector
. 2-D to 3-D converter

2. Numerical Accuracy Improvements


● Optional quasi-second-order upwind convection scheme
. Generalized mesh diffusion algorithm
. Method for computing turbulent droplet dispersion when At exceeds
turbulent correlation time
. Convection of length scale in place of the turbulence dissipation rate e

3. New or Improved Physical Submodels


. k-g turbulence model
. Model for droplet aerodynamic breakup

4. Improvements in Ease-of-Use and Versatility


Nonflat cylinder head option
Inflow/outflow boundaries
Simplified velocity boundary conditions
Alphabetized epilogue listing FORTRAN variables and their definitions
Gravitational terms
Eulerian and Lagrangian options
Library of thermophysical properties of common hydrocarbons
Initial Bessel function swirl profile
Optional tabular input of spray injection velocity

from those on the previous cycle. As in the original ALE method,17*18each cycle is divided
into two phases - a Lagrangian phase and a rezone phase. In the Lagrangian phase the
vertices move with the fluid velocity, and there is no convection across cell boundaries.
In the rezone phase, the flow field is frozen, the vertices are moved to new user-specified
positions, and the flow field is remapped or rezoned onto the new computational mesh.
This remapping is accomplished by convecting material across the boundaries of the com-
putational cells, which are regarded as moving relative to the flow field.

4
Immntrast.to.KIVA, the temporal difference scheme in mA-~ is largely implicit.
Because of this, the timesteps used by KIVA-11 are calculated based on accuracy, not
stability, W3‘ixwii+andean-be considerab]~’-~arger.than.the t.iinesteps Jdsed.by.~-A-.. T!is
has resulted in considerable savings of computational time in many problems. In the
Lagrangian phase, implicit differencing is used for all the diffusion terms and the terms
associateibvith pressure wave propagation. me coup~~d-i-rnpi~~ltequatl~ns are so~ved”b~
a method’sirniia~ ti-the-SI?@LE-l Q’algotithm; w-itb-individual:equations being solved-by
the conjugate residual method.20
Explicit methods are used to-calculate convection in the rezone phase; but the con-
vection calculation can be subcycled an arbitrary number of times, .and.thus the.main.
cmnputationa-1 timeskep iS not restricted by the Courant stability ~mndition of explicit
methods.21 The convection timestep is a submultiple of the main computational time-step
and does satisfy the Courant condition. In addition to the partial donor cell-differencing--
in KIVA,l KIVA-11 can use a quasi-second-order upwind (QSOU ) scheme for convection.
Based on the ideas-of Van her, 22this scheme is monotone and approaches second-order
amuracywhem~-onve~%i~zg~o~t?~=~fi}es. Vi%i}e more a~mtira%=thanpm%hd donor cell
differencing, QSOU is also more time-consuming, and thus it is included as an option.
The number of species and chemical reactions that can be accounted for in KIVA-11
are arbitrary; they are limited only-by ~mmputertime and-storage ccmsideraticms.. The
mde distinguishes between-slow reactions-, which proceed Mnetica-lly, and fast re-ac-tionsr
which are assumed to be in equilibrium. 23 Chemical rate expressions for the kinetic reac-
tions, which are Arrhenius in form, are evaluated by a partially implicit procedure. Two
implicit equation solvers are available to compute chemical equilibria-- a fast algebraic
solver for hydrocarbon/air combustion24 and an iterative solver for more general
circumstances.25
!Ikvo.modekmre-available to represent the effects of turbulence. The user has the
option to use a standard-version-of the k .– c.turbulencemodel,2G modified to include volu-
metric expansion -effeets27and spray/turbulence interactions,4 or +~use-a-modified version
oi%he subgrid-s~mde (SGS) turbulence model of K117A.1 The S(%3model reduces-to the k —e-
mmtel-near watlk -wh~--all ‘tur+iulenc~ %q@ seaI&s are too small to be resdied by the-
computational-mesh. Kound-ary layer drag and-”wali-”heattransfer are cakuiated””by
inatchingto a~mmli~led+mrbulentlaw of thewall. KII~A-11-does-not
. -, have a model for the
effeets.oftwbulence on the -mean ehemieal reaetion ra-tes~butthe user c-aneasily modify
the code to include a mixing-controlled chemistry model.2$-31
E~’apora%ing-liduidspraj!s-are represented byadiscrete-part.icle technique,32 in-
which ea-ch computational particle -represents a number of droplets ofidentiiiaisiie, ve-
lb.city, and. %em~erature.
L Probability-distributions often govern .tlie assi~ment:of”drop~ ~t:

5
properties at injection or the changes in drop properties at downstream locations. When
this is the case, droplet properties are determined by using a Monte Carlo sampling tech-
nique. The particles and fluid interact by exchanging mass, momentum, and energy. The
momentum exchange is treated by implicit coupling procedures to avoid the prohibitively
small timesteps that would otherwise be necessary. Accurate calculation of mass and
energy exchange is ensured by automatic reductions in the timestep when the exchange
rates become large. Turbulence effects on the droplets are accounted for in one of two ways.
When the timestep is smaller than the droplet turbulence correlation time, a fluctuating
component is added to the local mean gas velocity when calculating each particle’s mass,
momentum, and energy exchange with the gas. 32 When the timestep exceeds the turbu-
lence correlation time, turbulent changes in droplet position and velocity are chosen ran-
domly from analytically derived probability distributions for these changes.33 Droplet
collisions and coalescence are accounted for,34 and a new model for droplet aerodynamic
breakup has been installed.35 Volume displacement32 and thick spray effects on the
exchange rates34 are neglected.
Because of improvements to the code’s ease-of-use and versatility, for many applica-
tions, all required geometrical specifications, initial conditions, and boundary conditions
may be specified using the standard input alone. This is particularly true for internal
combustion engine applications. The mesh generation logic allows the computational
region to include cupped pistons and domed cylinder heads and to offset these relative to
the axis of the cylinder. In addition to two- and three-dimensional Cartesian and cylin-
drical meshes, the code allows the calculation of the flow in a single “sector” of certain
three-dimensional cylindrical configurations in which there is an n-fold symmetry about
the axis of the cylinder. This symmetry is often found in engine cylinders with multihole
injectors. For initial conditions, one can specify an axisymmetric swirl-velocity field with
a Bessel function profile and a specified swirl ratio. Standard boundary conditions and
rezone logic allow the mesh to follow the motion of a piston.
In response to many users outside the automotive engine design community, a num-
ber of other features have been incorporated in KIVA-11. These include gravitational
terms, the options to calculate with purely Eulerian or Lagrangian meshes, and inflow
and outflow boundaries. The latter are included only for the special case of inflow at the
bottom and outflow at the right or top of the mesh, but it is hoped that using these as
examples the user can easily modify the code for other inflow/outflow conditions. The user
is aided in the task of code modification by the modular structure of the program and a
new alphabetized epilogue that allows one to easily find the definitions and uses of
FORTRAN variables within the code.

6
II. THE GOVERNING EQUATIONS

In this section we give the equations.ofmoiionfor. t.hefluid.phase, followed .byt,hose


Emthe spay cimplets, .a_lld’final!y thelleumky. Cmlciitiolls. ~-~r.~mpactness--ti~s= ar=
written in vector notation with bold symbols representing vector and tensor quantities.
‘I%e unit-vec+kn-s-Inthe x-~y~ andz-~r.w-tion~e-dematedby. ii j_iandk.ws~ecti~rel~~: ‘l%e-
position vector x is defined by

~ =;&_-+ -J+.-+
~k.-
,

the=veeto?operator? is givemby

.3..
y.= ;-_ +++ ~,
&- &
W

and thdluid velocity veetor=ti=isgiven-by

u = u(x,y,z, t)i+ u(x,y,z, t)j + uky,z,


t)k ,

where t.is time.

A. The Fluid Phase


The KIVA-11 equations can be used to solve for both laminar ardturhlent.flows..
The mass, momentlw,and.emer~. equationsf~r. the two e-asesdiffer.primarily.i nthe form
and .magnitu(kof thetransport bmeffkients-(i.e., viscosity; thermal ‘cumhxtivity; an&spe-
ci~sdifllisitiity); which are much larger in the turbuiimt ~msebecause ofl.he addition a-1
transpcdc-aused by turbulmtfluetuations. In the tu~ulelti-case-the-tr amsportcoel~ici-
~nt~.ared=i%l~ from .a-turb~lentdif fu~ivity that-&pn*on-th-e-tur’n ulent”kinetic energy
an&itmlissipation rate;
‘~ecmi.inuii.y. equatibn for species m is

ap.,,r.
~“+ v“. (pmu)=-v.
l’wal+’:+’’’~l’

w.her.e.pmeiskhema~de~~~.Y_Qf.sn~rie~
-f----”” m. n.t~.t-o~m~.~a% A+=.: ~~?.
..->~ v .Q .U”u. . . . u -uwu 3TU.Y_l &aid ‘H
J? I..
‘t-il~--iiu”iu
:A=
‘VW}W=

ity. We assume Fick’s Law diffusion with asin~e.fiffti~n.eae~ lcient D., Equations -fcmD-
and.source terms due tQ chemistry. PC.~.. and .th~~pl%l~~s Will b @V&l i~t~R ~E?Ci(5S “1-
iS-

the-species of which the spray dropiets are composed, and”ti is the Dirac delta function. By
summing-Eq. (1>.over-all speeiGs.-weobitif ithe:tntal-fiuid=d@nsity--equation

7_
de (2)
~+v. (pu)= b’,

since mass is conserved in chemical reactions.


The momentum equation for the fluid mixture is

a(pu) (3)
—+v. (puu)= –&p- AOV(2/3pk)+V-o+~’+pg,
at cl’

where p is the fluid pressure. The dimensionless quantity a is used in conjunction with
the Pressure Gradient Scaling (PGS) Method.3G This is a method for enhancing computa-
tional efficiency in low Mach number flows, where the pressure is nearly uniform. The
user may opt not to use the PGS method, in which case a - 1. If the PGS method is used,
then a, which varies only in time, is determined in a manner described in Appendix A.
In Eq. (3) the quantity AO is zero in laminar calculations and unity when one of the
turbulence models is used. The viscous stress tensor is Newtonian in form:

a=p
[
Vu+(Vu)T
1
+AV” U1. (4)

The first and second coefficients of viscosity, p and L, are defined later. The superscript T
denotes the transpose and I is the unit dyadic. F’ is the rate of momentum gain per unit
volume due to the spray, to be defined later. The specific body force g is assumed constant.
The internal energy equation is

a(pl-1 (5)
—+v Q(pul-l=-pv”u+O– AO)O:VU–V”J+AOPC+QC+QS,
at

where I is the specific internal energy, exclusive of chemical energy. The heat flux vector
J is the sum of contributions due to heat conduction and enthalpy diffusion:

J=–KVl’-PD~h~V(p~/p), (6)
m

where 2’ is the fluid temperature and hm the specific enthalpy of species m. The source
terms due to chemical heat release Qc and spray interactions Qs will be defined later.
When one of the turbulence models are in use (AO = 1), two additional transport
equations are solved for the turbulent kinetic energy k and its dissipation rates:

8
(7)

and

(8)

These are standard k – e equations ‘~-with some added terms. The source term (c~~.-~.c~l)
V*Uin the-s=eg@ionaccnunts for. length .sde-Am~s.>~h.Ikw_is-v4.asiIy.dila*a$JaR.
Source terms involving the quantity Ws arise due to interaction with the spray. Later we
.
will defhe W-sand@~’~it~@y4eAM~ifimnm.
m.] . .
1 mqua-ntltles-cL ~,ctz, ct~, F’r~,and Prt are constants whose vaiues are determined-
from experiments and some-theoretical considerations. Standard values of these constants
are often used in engine.cahmlatkms, and ‘these are g5ven- imT-abie-Ilbeknv: Avalue @f”cs.
equal to 1:50 has ‘been suggested,37 based on the.postulate.oflmgt.hscale conservation in
spray/turbulence interactions, and has been found to give good agreement with measure-
ments of diesel sprays.4
W-hen -the SGS -turbulaemodel is:use~the.value.dk is ~anstr-ti~~:rti.u-s=tisf~’the
inequality

(9)

L~~%~is-an-input-SGS iength scale whose value is typicail~ taken to be 48x, where 8X is.a
representative-comptiatitmai .rmlldimension. Inequality (9) isemforc~xl by integrating
Eqs. (7) and (8) in time at all points and then setting c equal to the right-hand side of Eq.
(9) atpints-where the inequality is violated; Since. k”?f2/e.iiJmn~ti6naitQ the k-e len@.h
scale;.Eq;.(9) "isa..#~ti*tit+be:t'Mbden&3m@.hsa2&be-less-$baR.9F eq13*l’L~~~-i

STANDARD VALUES OF k–c TUR33ULENCE MODEL CONSTANTS

9
Near rigid walls this constraint is always satisfied (see the Boundary Conditions section),
and thus the standard k-e equations are solved near walls. In regions where the length
scale is LSGS, the model reduces to a one-equation SGS model similar to that of KIVA.l
The state relations are assumed to be those of an ideal gas mixture. Therefore,

P = ROT I fP#$’~) , (lo)


m

1(TI = ~ (pm/p)zm(’rl, (11)


m

CP(T-)
= ~ (pm/P)Cpm
(n , (12)
m

and

hm (T) = Im(’~ + ROT/Win , (13)

where Ro is the universal gas constant; Wm, the molecular weight of species m; lm(T), the
specific internal energy of species m; and Cpm, the Specific heat at constant pressure Of
species m. The values of hrn(~ and cprn(T) are taken from the JANAF tables.38
The chemical reactions occurring in the system are symbolized by

(14)
m m

where Xmrepresents one mole of species m and amr and bmr are integra stoichiometric
coeffkients for reaction r. The stoichiometric coefficients must satisfy

~(amr-bm)w =0, (15)


m
m

so that mass is conserved in chemical reactions. Chemical reactions are divided into two
classes: those that proceed kinetically and those that are assumed to be in equilibrium.
Kinetic reaction r proceeds at a rate d, given by

A,= kf, n (pm/wm; m’ - kbr n (pm/wml”mr. (16)


m m

10
Here,the,rewtion.tmdws.a! ,%rand. b!,=-r-neednotequal a~-r and bmr, sa that emplriea-1
reaction orders can be used. The-coefilcients k~~arid k~~are assumed to beo~a- generalized
A-rrlleniusrf”ornx

and

(.~7j
. .

‘whemE~~ an*E~j- are-activation temperatures.


Therties-nf-e@libtiulmr~a-ti-m-s a-reimplicitly determined by Wwcms%rai-nt=
conditions

where Kc’(T.., the concentration equilibrium constant, is assumed to be of the form

.K; = EZJL{.A
, e.QT.A B;!
-!- TA +.C7r+ DrTA +E,T:} ,

-where TA = 271000 K.
Withtke .reacticms,rate~ch+ d~er.mined.by-E-qs . :U3)”OP.”(”1”8)7
the Clremit%fl”sxraree
term in the species continuity equation is given by

-c
P m-= ‘m.~ ‘b.ti – ‘J+, ,
r

and the chemical heat relea-sdermin -the energy equaticm is -g-ven by

where Qr is the negative of the heat of”reaction at absolute zero,

(Jr = ~ (Lmr – !h#hprn ,


m

and-( ~hj-”),%is the heat of formation of speciesnmtahmiute m.ro.


The transport coefficients in KIVA are taken to be

l.l=(l.o– AO)PVO+ pti, + AOCP


k21e ,

A= A3P,

K=:,

and

D=~. (23)
psc

The diffusivity U. is an input constant, and cp is an empirical constant with a standard


value of 0.09. A Sutherland formula is used for ~a~r:

Al#2
—— (24)
‘oir– T+A2’

where A 1 and AZ are constants. The constant A3 is taken to be – ~ in calculations of tur-


bulent flow but can be arbitrarily specified in laminar flows. The Prandtl and Schmidt
numbers, Pr and Sc, are input constants.

B. The Spray Droplets


Solving for the essential dynamics of a spray and its interactions with a gas is an
extremely complicated problem. To calculate the mass, momentum, and energy exchange
between the spray and the gas, one must account for a distribution of drop sizes, velocities,
and temperatures. In many sprays, drop Weber numbers3g are larger than unity, and drop
oscillations, distortions, and breakup must be considered. Drop collisions and coalescence
have also been found to be important in many engine sprays.34*~0-A2
A mathematical for-
mulation that is capable of representing these complex physical processes is the spray
equation formulation. 43 In this formulation we solve for a droplet probability distribution
function f, and in KIVA-11 f has ten independent variables in addition to time. These are
the three droplet position components x, three velocity components v, equilibrium radius
r (the radius the droplet would have if it were spherical), temperature T~ (assumed to be
uniform within the drop), distortion from sphericity y, and the time rate of change dy/dt =
y. We keep track of the fundamental mode of oscillation corresponding to the lowest order

12
.. . .
Sphw”ic-ai“Zm-d :;h~~~~~~&~~‘-w.l~fi
.~& ~li@~~:-~it~y-~h~-~i ~~iv~-velOCityvector between the
droplet and gas. The dimensionless quantity y is proportional to the displacement of the
droplet surface from its equilibrium position divided by the droplet radius r. Droplets
-bleahl@%mEc@v. ii:j. > lll-?~=
The droplet distribution function fis defined in such a way that

,f(xr v, .r, :!d, y, j, t) dv-dl- &rd dy dj

is the ~mbabie-mrtir-of -d~opiets-per unitvoiume at position x and time t with vei0citi6s


in .t.hehterva] {v, v -Edv)~ radii in the interval (T-$-
r--i- ch-)}temperatures in the interval”
(.Pdi Ttj. + dTd.), and dis~] at~ent parameters.in the .intermds {Y~Y‘~ dY) an~(.1~.~ ~ d~~).
T-wo moments of f have important physical significance. The liquid volume.frmtinm(l,
given by

is assumed to be small compared to unity in our equations. The.liq.tidmmcrnsmpic density.


p’tt given-by

wherq~ is-t}l~li~ikimie roscopicdensity, c%n-llevetiileiess-’tie-comparable to or iarger


than the gas density p because of the large ratio of p~ to p. ‘The density p~ is assumed-
mns+ant.
The ti-me evoiution of fis obtained by solving a form of the spray equation,

In Eq. (25), the quantities l?, R, $~, and y are the time rates of change, following.an
individual drop, of its velocity, radius, temperature; and oscillation velocity y. E-xpres-
Sions forthese -will b-=given-lat.er.=‘I%e terms ~co~~
ad ‘~~Uare sources dtie to dfoplet coili:
sions ana’breakups, and”we now def~ne these.
The collision source term ~COl~
is given by

Feel{
= ;. (j ,
f(x, VI,rlt7diJY:7 j12t) f(x, v2,r2,7’ y j ,t)rr(rl
dj’‘ 2’ I
+ rz~lvl- vJ
-.

13
{u (v, r,T~,Y,jI,VI,rl,l“dl,Y1,jI1,
V2,r2,TdiY2,~2)

–8(v–vl)6(r –r1)8(Td –Td)6@–~1)6(j-jJ}


1

dvl drl dTd dyldjl dvz drz dTd dyz djz . (26)
1 2

The collision transition probability function a is defined so that odv dr dTd dy dy is the
probable number of drops with properties in the implied intervals that result from a colli-
sion between a droplet with subscript 1 properties and one with subscript 2 properties.
Two types of collisions are accounted for. If the collision impact parameter b is less than a
critical value bcr the droplets coalesce, and if b exceeds bcr the droplets maintain their
sizes and temperatures but undergo velocity changes. The critical impact parameter bcr
is given by

b:, = (rl + r2)2min (1.0, 2.4/Xy)/WeL) ,

f(y) = y3 – 2.4 y2 + 2.7 y ,

y=rJrl where rl < r 2’

(27)

The quantity a is the liquid surface tension coefficient, which is assumed to vary
linearly between reference value ao at reference temperature To and zero at the fuel
species critical temperature Tcr. The precise form for o is

14
where

and

b —bcr
r~vl + r~v2 + r; (v2_– v])
r1+r2—b
cr
V2=
r3_+ r3-
12

JiustifYcation for Eqs. (26)-(28) is given in Ref. 34.


The breakup source term ~~~is given by

(29)”
fbU = ~ f(x, VI, rl, Td , l,jl, t)jl~ (v, r,~d,.y,j, Yl, rl, T~ , jl, x,tl dvldrl dTd djl .
1 1 1

The breakup transition probability function B is defined so that Bdv dr dTd dy dy is the
probable number of droplets with prop_@esin the i.mplihdintervzds thatare wacbxxdh.y
the ‘breakup ofa dropkt with subsmipt 1 properties. The mwuring-of%q. (29) is-the-follow=
ing-: whena droplet’sdistortion yexceeds-’unity, itbreaks-’up into a-distribution of%mller
drops given by If. We obtain the totai source to f by multiplyin~the local flux of droplets
through. the.~~rface. ~ S ~-by E and ~fi+e~atiflgO_Ve~:th@.~~tiE~-~-E~s ~~.
. .
.Afterbmakup we assume the dropletrdiifo]lo~va-x-squarddistribution:

1- .{SQ)
g(r) = =e.–r’r ,.
.%
15
where the Sauter mean radius r32 s given by

‘1 (31)
=3;=
’32
7 1 pdr~ .2
;+-—
8 a(Td ) ‘1
1

The product droplet velocities also differ from that of the parent droplet by a velocity with
magnitude w and with direction randomly distributed in a plane normal to the relative
velocity vector between the parent drop and gas. The quantity w is given by

(32)

The precise form for B is

B=g(r)~(Td –Td)8@)6(j)~ NV – (vl + wn)ldn , (33)


1 \

where the integral is over normal directions to the relative velocity vector. Justification
for Eqs. (30) - (33) is given in Ref. 35.
We now define the functions F, R, Td, and y that determine the trajectories of indi-
vidual droplets. The droplet acceleration F has contributions due to aerodynamic drag
and gravitational force:

3 p \u+u’–v[
F=–— (u+u’–v)cD+g. (34)
8 pd r

The drag coefficient CD is given by


~ (1 + l/6 Re~) Red < 1000
CD= d (35)

0.424 Red > 1000

where

2p\u+u’–vlr
Red =
lltir @) ‘

16
and ~a~ris given by Eq. (24). The gas turbulence velocity u’ is added to the local mean gas
velocity when caicui”ati”ng_adropiktk dragand vaporization rate. It is assumed that.each.
component .u’ follo.ws.a.Gaussiandiatrihution -with mean square deviation 2/3 -k-.T-bus-we
assume

T-hevalue of-u’ k &osammce-wery turbulence-correlation time ttUrband “isotherwise iieid”


constant. The droplet correlation timeisgivem hy

/. ~.. &J2 ~ \
t =min -,c — (37)
turb ( & ~ & /u+u’–v[ ) ‘

.-.
(pD)tir(T) Y;-– Y1
R=– Shd , (38)
2Pdr 1–Y;

where $lh~ is the S-herwood number for mass-transfer, ‘YI* is the fuei vapor mass fraction
at the di-opiet’s surface, Y1 = pi/p, and (pD)air(~ is the fuel-vapor diffusivity in air. The
Sherwood number is given by

Sh
d = (2.0

Pair(?) Y; – Y1
where SCd_z ~d Bd = . The-surface.massfrm3iomYi* is obtained .frorn
pllar(ti ~._y.*
1

[40)

17
*I
where Wo is the local average molecular weight of all species exclusive of fuel vapor and
pu(!l!’~)is the equilibrium fuel vapor pressure at temperature T~. To obtain Eq. (40), we
have assumed that the droplet temperature is uniform and that the partial pressure of
fuel vapor at the droplet’s surface equals the equilibrium vapor pressure. For the vapor
diffusivity in air we use the empirical correlation

‘2
(pD)tir(T)= ~1~ >

where D 1 and D2 are constants.


The rate of droplet temperature change is determined by the energy balance equation

43.,
pd; nr ct7d– pd4nr2RL(Td) = 4rzr2Qd , (41)

where Ceis the liquid specific heat, L(T~) is the latent heat of vaporization, and Q~ is the
rate of heat conduction to the droplet surface per unit area. Equation (36) is a statement
that the energy conducted to the droplet either heats up the droplet or supplies heat for
vaporization. The heat conduction rate Q~ is given by the Ranz-Marshall correlation:45

Ktir@’) (T – Td)
(42)
Qd = Zr Nud ,

where

tn(l + Bd)
‘Ud = ‘2”0 + O“6R’H ~ ‘
d

lldr(ficp(a
Prd =
K@) ‘

cP is the local specific heat at constant pressure and at temperature ~ = (T + 2T~)/3, and
K1 and K2 are constants.

18
Consistent with the approximation that the liquid density is constant; we also
assume its internal energy 1/.is a function of temperature.alone.. Thust.heliquid-enthalpy-
‘will.h&Jea.small.pressdre”depe3deflce;

he(~d,p) = Ze(Td) + p/Pal. (43)

Si.nee-tlhe ki+tent~hea%
of ‘~aporhtbn L is tile energy reqyired- to convmti.= =un-itmassof.
liquid to vapor at constant pressure equai “to the equilibritim vapor pressure, .the.liquid
and-vapor. enthalpies and internal ene-rgies-and L a-rerela%d by-

L(Td) = hl(rd) – ~#’d,P#’d)) = I1(Td) + RTd/W1 – z$Td) – Pu(~d)/Pd . (44)

The equation for the acceleration of the droplet distortion parameter is

.. 2 p (U+ U’– V)2 8 a(T~)


.—
5P$T~)
Y=3pd --Y– 5’, (45)
~2 pd?-s pdrz

-WhEW~e(Td) isrthe-viscosity ofthe-iiquid. Equation (45), which is based ‘on the analogy
between an oscillating droplet and-a spring=m~~y.4m,4G.i=tha.equation..of.a-furcedj
damped harmonic oscillator. The external force is supplied by the gas aerodynamic forces
on the droplet. The restoring .force is supplied by. surface tension forces. _Damping issup.
pl iedhy Ii@& viscnsity. ..kietied.diwwssion.=of Eq. (.* ) .m=~~. -.-u~l,<.~
~a f~t~~> . .. ...=&.
.. . . ““.
2s..
. .
~,~.~a~~new in .~-positi~~.~o@v~ ~h~ e~~~~ng~furrctionsp, FS;QS;aM”d””’WS: (i%ese are
obtained- ‘bysmlm in@he_raksmf.cliange of.mass,. mmnemtum$ and energy of--a-lldio~kts
at position x and time t.34 Thus one obtains

F%=-r
! f pd( 4/3 rrr3F’ + 4nr2R v) dv drdTd dy dj , (46)

and=

*s=_i-
j~ fp.d.arm3 $:. ii dv.dr d.Td .~zy.a’j.-,
~~.
where F’ =F–g. Physically, ~sisthen egativeo ftheratia twhicht heturbulent
eddies are doing work in dispersing the spray droplets. Since u’ follows the Gaussian dis-
tribution (36) it can be shown that W <0, and thus this term always depletes turbulent
kinetic energy.

c. Boundary Conditions
In this section we give the physical boundary conditions that are available as
standard options in the ICi_VA-11code. There are also numerical boundary conditions used
by the program in conjunction with inflow and outflow boundaries. Numerical boundary
conditions are extra conditions that are not required by the equations themselves but that
have been found through experience to be necessary in implementing computational
boundaries in fluid flow codes. 14 To understand these numerical conditions requires some
familiarity with the numerical solution procedure in KIVA-H, and for this reason we defer
discussion of inflow and outflow boundaries until Sec. IV.K of this report.
In addition to inflow and outflow boundaries, two types of physical boundaries are
available in KIVA-H -- rigid walls and periodic boundaries. There are, in turn, several
types of rigid walls depending on velocity and temperature boundary conditions. The
velocity boundary conditions on rigid walls can be free slip, no slip, or turbulent law-of-
the-wall. Temperature boundary condition options are adiabatic walls and fixed tempera-
ture walls. In engine calculations one ordinarily uses turbulent law-of-the-wall velocity
conditions with fixed temperature walls. We now give in detail the rigid wall boundary
conditions for the gas-phase equations.
Velocity boundary conditions on rigid walls are introduced either by imposing the
value of the velocity on walls or the value of the wall stress OW= an, where n is the unit
normal to the wall. On no slip walls, the gas velocity is set equal to the wall velocity:

(47)
u = ‘wCdlk,

where the wall is assumed to be moving with speed Wwazzin the z-direction. The wall
stress is then determined implicitly through Eq. (3). On free-slip and turbulent law-of-
the-wall boundaries the normal gas velocity is set equal to the normal wall velocity,

k.n, (48)
‘“n=wud

and the two tangential components of OWare explicitly specified. For free-slip walls the
tangential components of Oware zero. For turbulent law-of-the-wall conditions the tan-
gential components are determined by matching to a logarithmic profile:

20
(49)

p~” is the Revnolds.number


where- <G ———— . base.d.o.nthe_gaavelmi$y relativetQ thew~
pairtn

(50)

where v = u — WWaZ/iL
In Eqs. (49) and (50) it is assumed that y is small enough to be in the logarithmic
region -m%lmlamina~sublayer~@on-of the turbulentbmmdary laye~n The Reyrrolds
nu.m-br.-~e dd-in~.the.-b~undary. -hetwthmhtwowo mgibns.- The rmnstants ~, c<w,.R~,and
J%mE’q: (49):am-lYiateNtiu the-%- emocWcmlStantsby

/
K=-vc:(c –Ce )17:
?2 -1

and

~or, ~~~~ly ~~~~~~~dV~lU~S Of ~h~k.+. canstantsi B =S.s j and .C~tiG().IJ5 ; W~obta-in


K = .4W7 am-l?c =114. A der=vaticmof-i3qs~ (49) -(Y1-)isgive-rTi~z-A-~zl*x-B.
‘Temperature boundary conditions on ri~d”wails are introduced”by specifying either
the wall temperature or the wall heat flux Jw = – kvZ’”n. For adiabatic walls, we set Jw
equal ‘mzeru. Futilxed-tel~erdtum--walls that-am--alsoeitilerfme-sli~or-no-sfiip; the--wall
temperature is prescribed; and “J~ is determined ”irnpiicity from Eq. (5). For fixed ”temper-
ature walls using the turbulent law-of-the-wall condition, Jw is determined from the mod-
ified Reynolds analogy formula

where.TW isthe.wdl.tempratme.m~rt isthe.P~andtlnumber. of.the.laminar. fluirL .-A.


derivation ofEq. (52) is-givainAppendix-B,
~-1
In addition to the wall heat loss, there is a source to the internal energy due to fric-
tional heating. Frictional heating occurs whenever turbulent law-of-the-wall velocity
conditions are used and has the form

= P(U*)2U ,

where fWis the heating rate per unit area of wall.


In calculations of turbulent flow, boundary conditions are also needed for the turbu-
lent kinetic energy k and its dissipation rate e. These are taken to be

Vk. n=O

and

where k and c are evaluated a distance y from the wall and

c k
c
Pc = [ Pr$cc2
P

-ccl) 1 “

Periodic boundaries are only used in KIVA-11 when the flow field is assumed to have
an N-fold periodicity about the z-axis. When this assumption is used, the computational
region is composed of points in the pie-shaped sector O~ @~ 2dN, where 6 satisfies
cm 6 a x/_ and sin 0 = y/-. The periodic bolmdaries are those for which
(3 = Oand (1 z 2dN. The conditions imposed on these boundaries can be inferred from the
assumed N-fold periodicity. For a scalar quantity q the requirement is that q(r, (3,z) =
q(r, 0 + 2rdN, z), where r = g. For a vector v the requirement is that v(r, (3 +
2rt/N, z) = J1.v(r, (3, z), where R is the rotation matrix corresponding to the angle 211/iV.
Boundary conditions are also needed for the spray equations, and we indicate here
what these are for a spray injector and for a rigid wall. When a spray droplet impinges on
a rigid wall, we set its velocity equal to the wall velocity, and for purposes of calculating
heat and mass transfer with the gas, we set Re[f = Oin Eqs. (39) and (42). There is no heat
transfer between the droplet and wall. This is a provisional model for spray/wall interac-

22
tmns-wmt wil’l=unabufitedllyciian-ge as-tii3=iin@TtipTm:titim-re~WFteS-IfiOm at%-entiefi=
firam.engine.researchers.
Armther typed physical bmmdary for the spray equation.is thespray.injectm.. This
is-a.point in. space at w-MA w.e.spedy dmpkt-mass. flow rate and a distribution of drop-
letsizes, velocities, temperatures, and oscillation parameters.. An arbitrary number of
spray injixtors.may be used’in a singlefiTA-fic%tcuiatio~li T-lE-mass fimv rate =foreaeb
~nland TZ in and is-=zrmothemvi~e: ‘W~~“t.~P~llf~il=
ifijiix%or-ii ~mnstant”between times-”Tl -. j

jeetor- size <is+ributicm a-rea-vailable: mcmcxiisperse (Mr — ?.)) Orx-squared .(L@ Exp(—n’fi))=
. ~ged radius -E.is inde.pemk!rlt.=mf.iime.T!!e velhr~lfijs d:
In either ease, the ~amxber-ave~~
injextedlimps-all “have magnitude U~~j, which can be ma-de-an-atitra~ functiorrof time
through tabular inputto t-h~program. T-he dGtribution of angl% oi%lie dropietveibc~i:i~.
are defined relative to a spherical coordinate system in which the positive z’-axis is the
spray axis, as depicted-in Fig; 1. The directionof the spray axis can be arbitrarily speei -
fi-ticlnee~-not .coincide with the z=axis-ofit,ke-flow field=cootiinate-syste~n: ‘Thepolar-
angle @of the droplet veloeity mla-tive +Wthe spray axis is distributed unifor.mly.in the
interval [O.in,o.~~~l,and the azimuthal angle 6 is distributed uniformly in the interval
[0, 2n]. The temperatures of all injected drops have the same value T~inj. If the droplet
breaklqmod.e~kin use, then all injected- dro@mve-;~ =0 -aml<~= ~~nj, ‘where ~~njis the
produetof aninputdimmsionl~ s-=plitude and dimensional frequency. .A-.moredetailed
dese~lption of-the dropletirrjeetion prne~Auretis@Yenin.the.C-omputer Program section of
*his-repo A.

F&.. i: S@ieri6ai’cocwainate system-useftu define the distribut~cm ofdireetiorumf=


droplet-velocities at a spray. injector.
~~
III. THE NUMERICAL SCHEME

KVA-11 solves finite-difference approximations to the governing equations of Sec. II.


The equations are discretized both in space and time. Before specifying the numerical
scheme in detail, we discuss some of its general features and the principal ways in which
it differs from the KIVA numerical scheme.

A. Temporal Differencing
The temporal differencing is performed with respect to a sequence of discrete times
@(~ = O, 1,2, ...). The time interval Atn = tn+ 1 – tn is the timestep, and the integer n is
the cycle number. The latter is displayed as a superscript, so that Qn denotes the differ-
ence approximation to the quantity Q at time tn. When At appears without a superscript,
Atn is understood. The difference approximation to the derivative ~Q/iltis the first-order
expression (Qn+ 1 — Qn)/At.
It is in its temporal difference scheme that KIVA-D differs most from KIVA. Just as
in KIVA, a cycle is performed in three stages, or phases, but the terms difference in each
phase and their temporal differencing have changed considerably. Phases A and B to-
gether constitute a Lagrangian calculation in which computational cells move with the
fluid. Phase A is a calculation of spray droplet collision and oscillatiordbreakup terms and
mass and energy source terms due to the chemistry and spray. Phase B calculates in a
coupled, implicit fashion the acoustic mode terms (namely the pressure gradient in the
momentum equation and velocity dilatation terms in mass and energy equations), the
spray momentum source term, and the terms due to diffusion of mass, momentum, and
energy. Phase B also calculates the remaining source terms in the turbulence equations.
In Phase C, the flow field is frozen and rezoned or remapped onto a new computational
mesh. For the detailed description of each phase that is given later, it is convenient to
define intermediate quantities that have been partially but not fully updated. Such
quantities are identified by superscripts A and B. Thus, for example, QA is the computed
value of Q at the end of Phase A. (Superscript C is not needed because it is equivalent to
superscript n + 1.)

B. Spatial Differencing
The spatial differencing is based on the ALE method, 17’18which in three dimensions
uses a mesh made up of arbitrary hexahedrons. Spatial difference approximations are
constructed by the control-volume or integral-balance approach, 17which largely preserves
the local conservation properties of the differential equations.
The spatial region of interest is subdivided into a number of small cells or zones,
the corners of which are the vertices. Together, the cells constitute the mesh with
respect to which spatial differences are formed. The vertices need not be stationary, but

24
may move in an arbitrarily Prescri’bed’manner. “TItiiS-ca_pability
includes-th&La-grangJan
and Eulerian descriptions-as special cases. In the gener.aIcase, the cells are asy.rnmetri~
cal; a typical cell is shown in Fig. 2. The vertices are conventionally numbered-as shown.
The Pdk areindexed by integers (i,j, k), which may tie regarded as coordinates-in-
klgica..spac% T!~ndicM~i,j, .k).also label the vertices, with the understanding that
ve.rkx (i, j,. k)is-vert.ex 4 for cell (i, j, k). The CartesiticQordi nates of”vertex (i, j, k) a~e-
(X~~,y~k, Z~k), Whkh in genera~”depen~ on”~h~-ti~me”t. Thus the position .vec-+arto vertex-
[i:j, k).is

X.. = x.. i-+y. j+ z,, k (54)


LJ k lJ k k
LJ lJ k

The “center” of cell (i, j, k) is defined as the point with coordinates

-— 1. .:
z:, = — (55)
LJ k g “+1‘. ‘
-----

,.
5
I 1

k.

j
.—
k
i

Fig; 2: Typical ikite-differencecell,


where (xa, ya, Za) are the coordinates of vertex a of cell (i, j, k). In general, the point (xcijL
YCW, ZWJ of mass or volume of cell (i,.j, k).
is not the center
It is convenient to define auxiliary cells centered about the vertices. These cells are
called moment urn cells as their main use is in differencing the momentum equations.
Momentum cell (i,j, k) is centered about vertex (i,j, k). In contrast to regular cells, which
have six faces, momentum cells have twenty-four faces, each of which is comparable in
size to one-fourth of a regular cell face. Three of these twenty-four faces lie within each of
the eight regular cells which share common volume with the momentum cells. The
portion of momentum cell (i,j, k) lying within regular cell (z,j, k) is shown in Fig. 3. The
points of intersection of the momentum cell faces with the regular cell edges are defined as
the midpoints of the regular cell edges. The points of intersection of the momentum cell
edges with the regular cell faces are then defined implicitly by the requirement that the
regular cell face be partitioned into four subfaces of equal area by the momentum ceil
faces. The corners of the momentum cells are then implicitly defined by the requirement
that the overlap volume between a regular cell and a momentum cell centered at one of its
corners be one-eighth of the regular cell volume. In general, the momentum cell corners
do not coincide with the cell centers defined by Eq. (55). The momentum cell corners and
the intersection points of momentum cell edges with regular cell faces are not actually
solved for as they are not needed.
The location of velocities at cell vertices in the ALE method is convenient because no
interpolation is required when determining vertex motion in the Lagrangian phase of the
calculation, but it has a major drawback. This is that ALE method solutions are notori-
ously susceptible to parasitic modes in the velocity field. A major reason for this is that
pressure waves tend to propagate along cell diagonals rather than via adjacent cells.t7J8
A “checkerboarding” effect is thereby created in the pressure field, with associated irregu-
larities in the velocity field that are usually suppressed by the introduction of a numerical
damping called node coupling. 16’17In a major improvement to the ALE method, we have
alleviated the susceptibility to parasitic modes by the introduction of velocities centered
on cell faces.2 Vertex velocities are retained, and momentum associated with the vertices
is conserved, but normal velocity components on cell faces are used to compute cell volume
changes in Phase B and fluxing volumes in Phase C. The resulting scheme greatly reduces
the need for node coupling, and many problems can be run with no node coupling at all.
Accelerations of the cell-face velocities due to pressure gradients are calculated by
constructing momentum control volumes centered about the cell faces. Like the momen-
tum cells the cell-face control volumes have twenty-four faces. Referring to Figs. 2 and 3,
the cell-face control volume for the left face of cell (z,j, k) is composed of those portions of

26
<. /

/
/’ 1.
i

I
.—
I /
[
[

,- .– (-

Mg; 3. T-he-portioRofi mo.mefitum”cell {i; j; k)


lying within regular cell (z,j, k]. The
three nmn-rentum-cdl faces l.yi w
within the re=alar cell are shaded,
Each momentum cell has twenty-
four such faces in all.

the momentum cells of vertices 3,4,7, and 8 that lie in regular cells (z,.j, k) and (i – I,j, k).
Control volumes associated.with.the-other-cell.faces are defined analogously.
The volume of any mmnentum amtrol volume may be calculatedomce-the-volumes of”
the main computational cells are known. The volume of cell (i,.i, ~) is denoted by Vijk ad
is calcuiated”by the following formula:4g”

c: = – (Y2Z3-t- y@4 – y2z5 – Y’$6 – 3’3.Z2


+ Y3Z4 – -– Y4%-+Y&
3’4~~

+ 3’4ZS + Y5Z2. – 3’5!4 -. + ~.$fi – Y.&~ + Y&~ – Y&~ – Y8~4_+ Y8ZJ >
C6 = (Y1Z2– Y1Z5 – yfl + ’223 – Y.2Z5+ Y~7 – Y3Z2 + y327 + yfl

+ Y5Z2 – Y&.7 – y5zg – y~z – Y#3 + y#5 + Y#/3 + y<5 – Y~z7) ,

C7 = b&3 – Y3Z 2 + y#4 — Y3Z6 + ’328 – Y4Z3 + y4z~ + Y5zf3


– 3“2zf5

– y5zfj+ Y&2 + Y&3 – Y#5 – Y&8 – Y8Z3 – Y8z4 + Y&5 + YBz6) ,

C8 = – (y124 – y1z5 – y3z4 + y3z7 – y4z1 + y4z3 – y4z5 + y4z7 + Yfl

+ Y<4 – Y&~ – Y5Z7 + 3’&5 – Y(F7 – yf3 – Yef4 + Y#5 + y’f@ J


(57)

and the summation extends over the eight corners of cell (i,.j, k).
It is also necessary to know the x-, y-, and z-projections of the surface areas of the cell
faces. Since each face is common to two cells, there are three independent faces per cell.
These are conventionally taken to be the left, front, and bottom faces of the cell as viewed
from the perspective of Fig. 2. These faces are shown in Fig. 4. The conventional direction
of their vector area elements is outward from the cell, as shown in Fig. 4. The area projec-
tions of these faces are calculated as follows:49

AeX = –0.5[(y3 –Y4)(Z8– 24) – (Y8–Y4)(Z3 – 24)+ tY8-Y7)(z3– 27)– b’3‘y7)(zj3– ‘7)1>

Aty= +0.5 [(x3 – Z~(Z8– Z~ – (X8– X4)(Z3– Z4) + (X8– ~7)(z3– Z7)– (X3– ~7)(z8– 27)!,

A~== -0.5[(x3- zJ@8-yJ -(z8-xJ@3- YJ+(X8- X7)@3-Y; -(X3 -X7) b8-Y/1 ,

Af== +0.5 [(yl –y4)(ZB– Z4)– (y8-y4)(Zl –Z4) + (y8-y5)(zl-z5) – (y, –Y5)(z8–z5)] ,

28
X5)(Z8
%Y = – X4)(Z8
–o:5T(xl – 24) – (X8 – %C4)
(Zl – 24) + (Z8 – X5) (Zl– 25) – (Zl – – 25)] ,

A%_= +0.5 [(ZQ – 24) (%1 – X4) - (Zl - 24)(X3 – X4) + (Zi – 22).(X3– X2) – (23 – 22) (X1 — .X.-J] ,
.

A
(58)
bz = – 0.5 [(.Y3 – Y*) (xl – X4! – (Y, – 3’4! @ –-:4? +“q – 3’2) (xa_– Q – b~ .– Y2) (~~ – X2)1 ,

where subscripts f, L and b refer respectively to the.left,frnnt, and.b~ttom.faw~.. W-hen-


neede~.thesuhscripts r, d, and t will be used fa refer respectively’~ the right, back; md
top faces-of a-ucomputational cell. T-hese-area-projections enable us to define area vectors
A-aassociated with the faces a o~eacli regular cell; 13is convenient to associate Aa with
both the face and the cell; so tha-t.~ may bemmsidered ‘to always poinhutward-from the
eellundermnsideratio~~ Thus; fora-g-iven face, the sign Of”A-adepends on the side of the
face from which it is viewed: Gonsider, for example, the left face of cell (z,j, k), as shown
in Fig. 4, and compute AtX, Aey, and Atz by Eq. (58). From the point of view of cell (i,j, k),
the vector Aa for this face is A~Xi + A@_+ A~Zk. But.of.cell.(i.– I,j, M, the.veetor. .4mfor
this face -is-– A~Xi – A~Yj- Atzk.. Similar considerations applyto right, front, back,
bottom, and top faces.
Similarly, the outward area vector associated .withface.cmf.ti-par
.titular mmnentun-
cell i@moied.hy..A!a, .ancLthe cmtward area vector offae+w of’ a -~dl-face ~controlvo]umeis

8-

I?ig. 4; Cell”faces associated-with cell (z,j,k).

2
ylJ
denoted by A“a. We sha not write out explicit expressions for the components or projec-
tions of these momentum cell-face area vectors, as it will always be possible to eliminate
them in favor of the Aa as discussed below.
In the finite-difference approximations of KIVA, velocities are fundamentally
located at the vertices, so that

u. ). (59)
lJk = u (Xtik, Yijk,Zijk

Thermodynamic quantities are located at cell centers:

(60)

where Q = p, p, T, 1, or pm, as well as k and c. Quantities needed at points where they are
not fundamentally located are obtained by averaging neighboring values.
Spatial differences are usually performed by integrating the differential term in
question over the volume of a typical cell (or momentum cell). Volume integrals of gradi-
ent or divergence terms are usually converted into surface area integrals using the diver-
gence theorem. The volume integral of a time derivative maybe related to the derivative
of the integral by means of Reynolds’ transport theorem. 50 Volume and surface area inte-
grals are usually performed under the assumption that the integrands are uniform within
cells or on cell faces. Thus area integrals over surfaces of cells become sums over cell faces
(or subfaces):

I ~’.dA+~F a
.A
au”
(61)

When differencing diffusion terms for cell-centered quantity Q, it is necessary to


evaluate (vQ)a” Aa. Referring to Fig. 5, this quantity is approximated as follows. The
points xt and x, are the centers of the cells on either side of face a, and xt, xh, XL and x~
are the centers of the four edges bounding face a. We first solve for coefficients aer, ath,
and afd such that

atr(xf — Xr) + atb(xt – Xb) + afd(xf – Xd) = Aa (62)

Note that since the mesh may be nonorthogonal, the vector x~ – xr need not be parallel to
Aa, and thus ath and af~ maybe nonzero. The finite-difference approximation to (vQ)a” A(,
is obtained by dotting both sides of Eq. (62) with (VQ)a and ignoring terms of second and
higher order in the cell dimensions:
30
h-Eq.(63) “Q.is.t.hesiinpk awx-ag$ OftLie vdms.ofQ>Mlie fbur-c+lI&w*reuHdiRg-.%4l-
edge “t,” and Q~, Q~ and Q~ are defined analogously.
.4reainte~als~\’er.m ommtum cell faces are ordinarily Converted into area inte-
grals-Oveme@a~-mil ‘fiims-byt.he ftillbwifig procedure: Eet Q-’be a quantity that is uni
t6m-witfiiil-regmitir-cei13, and’considix the volume of overlap between regular cell”(i; Jlk)
and the momentum cell associated with one of its vertices. Three .faces of.this.overlap
vo~ume-(call them a,b,c) are faces of-the momentum call “in question, with outward ‘area
vectors A’a, while the other three (call them cl,e,fl are surfaces of regular cell (i, j,k), with
outward area vectors ~ Aa. But .the.divergence .theorernshows that the inte=~al 1 dA over-
the entire surface of this overlap volume is-zero, so.that.

Thus t.he--inte-grd -i-QdAzover the- three-momentum cell “faces in question my be repre--


sented by

so that the area veetors A’-a never need to be expll-cit3y eva-iuated’. A similar procedure is
used “toexpress the outward-normal-areas A’7aof faces of the cell-face control volumes in
terms of the regular cell face areas Aa.
The mass of cell (i,j,k) is denoted by M~h and is given by

Fig. 5. Tine six points used”to define the


gradient of cell-centered quanti-
ty Q_on cell face a.
(66)
‘ij~ = PLJ~vQ~ -

The mass of momentum cell (i, j,k) is given by

M;k = : (Mijk+ Mi_l j,k +M, l–l,j-l,k+M. .


l, J- I,k
+M, .
L,j,k– 1

(67)
+M
t–1,j,k–1 +M, t-1,j–l,k–1 +M, z,j-1,k–1
. ).

The mass of left cell-face control volume of cell (i, j,k) is given by

M; = : (Mtjk + Mi_l ~,k) , (68)


and the mass of other cell-face control volumes are defined analogously.

c. Stochastic Particle Technique


A very efficient and accurate method for solving for the spray dynamics is based on
the ideas of the Monte Carlo method and of discrete particle methods. In discrete particle
methods, the continuous distribution fis approximated by a discrete distribution ~’:

f’= ~ NP6(x-xJi5(v -vJ6(r- rJi5(Td -Td)i5(y-yJ6(j-9J. (69)


~=1 P

Each particle p is composed of a number of droplets NP having equal location XP, velocity
VP,size rP, temperature Z’~P,and oscillation parameters yP and yP. Particle and droplet
trajectories coincide (thus, for example, dx~dt = VPand dv~dt = FP), and the particles
exchange mass, momentum, and energy with the gas in the computational cells in which
they are located. The finite-difference approximations to the ordinary differential equa-
tions for the particle trajectories and for the exchange rate functions of Eq. (46) are given
in Appendix C.
Our method is a Monte Carlo method in the sense that we sample randomly from
assumed probability distributions that govern droplet properties at injection and droplet
behavior subsequent to injection. We now show how this random sampling is done. Let us
assume that we are given the distribution function fix) corresponding to the random vari-
able x (xl ——
< x < x2). The distribution function is defined by dN = fix) dx; i.e., this is the
number of droplets in the interval dx about the value x. Let us define the random variable

32
[x
y = I /’(x’)&’ ,
JX
1

and we note that dN = dy. Hence,the number of droplets is uniformly distributed with
mspect-’m--thvatiabieyey. Commonly one has availabk randommum-heqymrators with a
uniform dtiribtiiti~n.the.range.from=v+va &aone. We therefm~=arnp]e fromthidist=~
bution, scale by

to obtain y, and then invert to obtain x, which then will be distributed according taflz).
Depending on the form of the distribution function, the integral and its inversion maybe
performed analytically or, failing that, by a numerical method. This sampling procedure
iS-USed~tithe-~O@A.~njW$l~n.~QICUlati.On; ‘whie-h-is-4aswi’u@-in-.@pmdix-D; in-the thmp=
lel~ollition.r~lculation, which isdesc-ribed in ..Appendix-E; in the dmpletbmaku~calcula--
ticm; de*+#ned=in=A-~ntix=F; ‘a~~d-when-a-newvalue oftiie gas turbulence velOcity U’P
must=bechosen. in the latter case, since each componentof ‘u’P follows a Gaussian dis-
tribution G(u’) and since

(x

erf(x/# 4q13 ) = 2 ! G (u’) du’ , (70)


J lrj

it follows that we must invert the error function erf. This is done by storing values of the
inverse error function erf– 1 (y) evdutitiint~als~f.~.~~ .frewly =0 .%3 ~ = 1.90,
* 9
TJe value of er~– 1 (1-.0) is -talzen+Abe -. 0: ~vra~u~-oferf-~ ~“
@at intermediate-vaflues-ofy
are found by linear-interpolation-. If-y is-a-random number between 0.0 and”i-.O-,theu Zy — 1
is a random number between – l. O-and-l.O whose magnitude and sign determine the mag-
nitude and sign of u’:

(71)
u! = ti4q/3 sign (’2Y–– l)e#–’(12y –-14) .

~f.~~r~e, a.ne\v-u!P-is4nly -s@pl&-once eve~-umfielatiOfi-til~trUr~-.[See-Eq-= (37)11.


W-hen the turbulenemmelation timetlU,~ Ifl=spraypatiicie-isless-than the canpu--
tational timestep At, the droplet equations cannot be integrated directly since the particle
‘<sees” many values of u’ ~ in a single timestep. Instead-we add random turbulent .~iicle..
mmand-v-elocity chan~s.that.=e.chm~-fr~m disMmtimw der~~’edassuming,ti}l=

33
droplet experiences a linear drag law. When At s ttUrh,we also set U’P = Owhen differ-
encing the droplet equations. Appendix G discusses briefly how the distributions of turbu-
lent displacements are obtained, and a detailed derivation maybe found in Ref. 33.

D. State Relations
The quantities Im(7’) are obtained from the JANAF tables38 and are stored in tabu-
lar form at intervals of 100 K. A simple linear interpolation is used to determine the
lm(T) at temperatures within the range of the tables. The quantities cUm(T)are simply
approximated by differences between adjacent tabular values of Im(Z’), divided by 100 K.
The temperature 2’ determines the internal energy I via Eq. (11). Conversely, I deter-
mines T via the inverse of this relation. This inversion is performed by a simple linear
search algorithm which takes advantage of the fact that (tW~T)Pmis always positive. Let
Tn = 100 n (n = O, 1,2, ...). and choose the initial value of n so that Tn is a reasonable esti-
mate of the correct T. One then evaluates In = I(TU) from Eq. (11). If In s 1, n is reduced,
and if In + 1 <1, n is increased. The search proceeds in this way until I is bracketed by In
and In+ 1; T is then evaluated by linear interpolation between Tn and Tn+ 1.
The liquid fuel internal energy 18(T), the liquid viscosity pe(T), and the equilibrium
vapor pressure pu(T) are also stored in tabular form. The liquid latent heat L(T) is first
stored at intervals of 100 K, and then the values of I~(T) are calculated at intervals of
100 K from Eq. (44) and known values of L(T), pU(T), and ll(T). Because the vapor pres-
sure pUand liquid viscosity pt vary rapidly with temperature, their values are stored at
intervals of 10 K up to the fuel critical temperature Tcr~t. Latent heat, vapor pressure,
and liquid viscosity tables for many fuels can be found in Refs. 51-53.

E. Lagrangian Phase Difference Equations


With the above background, we are now in a position to specify the KIVA difference
equations. It is convenient to give these first for the Lagrangian phase and then for
Phase C or the rezone phase. In the equations of this section, we use implicit methods to
difference the terms associated with acoustic pressure wave propagation and diffusion of
mass, momentum, and energy. In the next section we tell how these coupled implicit
equations are solved.
1. Mass Density Equations. The Lagrangian phase difference approximation to
Eq. (1) is

(P&k V:k – (P& V;k


At

(72)

34
The mass fractions are related to the densities by.

(’73)

where-x = ,nj A, or B: The Phase Amass densities will b--k~lned-shortly=. A-n important
feature of Eq. (72) is the use of variable implicitness parameter $D in differencing the dif-
fusion term. Parameter @D varies in space and time and is defined at cell centers. Its
value, which lies between zero and one, depends on the local diffusion Courant number

where A-xis a measure of”the ceil ”siie. ‘WIien Cd is small compared-to unity, @~ is zero and
a fully expiicit difference approximation is used. When Cd is large compared to unity, _@~
is c-dose--to--unity-and-animp_licit formulation is used. ‘The exact expression-d’tir.~.~,-which is
chosen to ensure. numerical stability, is ~~venin .4ppendix-H.
The PhaseA density ofspeeies n-vinehdes mntributioms=dm.e-tnchemistry. and spray
~TJ
~~d~~~~~~:

The c-hemistry source-term (p~c)ti~


... . _ is given by E-q, (20) -with-hr replaced by (ti.~:4)ti~.The.
irrte-gration methodfor ‘kinetic. mactiim rates hr,is described=~nAppendix 1, and- thatfbr
equilibrium reactions is described in AppendixJ, Thdlnite-differenm approximatiomto
thespray mass sxmree terrr-~tik‘-is-@ven-in-Appendix C.
Summing Eq. (72) “over ail ‘species m gives the following Lagrangian phase
difference approximatitm to the mass dimsity equation {2):

(75)

This shows the total gas_mmsin~ell.cAanges cmly-due.to the spray smmce. %milarly
slumming. (3’4Joverall speei~-and cmnparlng with (75) shows t!rmt=Phasw-B--cell
masses are
kinown after-PhaseA:

(76)

35
Equation (76) can be combined with (72) - (74) to obtain

(77)

Equation (77) is solved in Phase B.


2. Momentum Equation. The Lagrangian phase difference approximation to the
momentum equation (3) is the following:

(78)

– ~ @~~ + S;ku;k) + g(M’)~.k – (M’):.k (ANC)ij~/A~.

The index ~ refers to the faces of momentum control volume (z,j,k), whose normal area
vectors at time t~ are (A’)~ ‘. The pressure p, turbulent kinetic energy k, and viscous
stress tensor o are regarded as being uniform within the regular cell in which face ~ lies.
Thus the A’ can be eliminated in terms of regular cell face areas A as described in Sec. B
above. This makes it convenient to evaluate momentum changes due to surface stresses
by sweeping over cells rather than vertices in the computer program.
In differencing the pressure gradient term, variable implicitness parameter @p is
used. Parameter @Pplays a role for the acoustic mode terms analogous to that of @D for
the diffusion terms. Appendix H gives the exact expression for @p, which depends On the
sound speed Courant number

where c is the isentropic speed of sound.


The PGS parameter an, which is used to artificially raise the Mach number in far
subsonic flows,3Gdepends on time but not on space. The formula used to determine an is
given in Appendix A.
The viscous stress tensor a is a weighted average of the stresses based on time level n
velocities and those based on the Phase B velocities. This weighting employs the same

36
xv~ri~b~~ irnp~i ~-it~~SS-p~r~~er +~ thti nmss-diffusicm terms: ~~e- VZdUe d
S--used=foPthe
-.=..—.
G depends-on-velocity ~adknts- whose -aMerence- approximation&m~@ Yen~n-Appendix-_K.
T&quantities .Rlti~.and.S’~~-are associated with the-implieit~wtiplingo f-the vain=
putdgas-and drop vekwities. one ean-~nteWre@’ ~-ka~-a~-a-ddedmass that arises “be-
cause forces on momentum cell”( i,j,k”) must accelerate the droplets in ad~ltion to the gas in
tliat:cdl: Tllie appearance ofS’~~-in (78) “is-rekted “totbweiljknown h.vering of the scmrrcl
speed -intwo-phase flmvs.q~ The evaluationof-i%~~u.
jk and S~~~_is
. described in A-ppenciix C-I
A-lthougE we have greatly retie~thea=~ptihiliiy-of..~-.s~lutionsntoto parasitic
veioci ty modes .or ail,ernaknock uncmnp~ imsome .pdile.ms the veloci=tyfield m~y de-
velop persistent alternative-vertex irregularities of small amplitude, Such irregularities.<
can usually. be.eliminated_by usingt,healternate node coupler deseribed in -.Appendix L.
The effects of the alternate node coupler me.r.eWe~nted.by. the.term .(ANC)~~, which is-
the-sum-over-atl re-gwlar cells surrounding vertex (i,j,k”) of the terms 5u~kanC”gitienifi
Eq. (E-4),
The Phase A vertex velocities include changes due to the spray momentum source,
grayitationai .accekation, and the aiternate ncik Coupl-&:

(79)

~. e ~] 1 .~_a&:&tom~=~J~
u.
c[e~t~a:. ~ll-~& wriex. veioe.i
ti~m-.~o- ties jin Ph as&3 ‘we

use face-centered normal velocities. We compute accelerations of these velocities due to


th~$hermod’ynarnicami tiirbulence presswresp anti-%pk;and the-resnitingftie.cemi.~ed:
nQrmd-velQcitiesNe.thaq -used .te.~ekukte the .Lagrangifm phase cdl w lwrwichanges.
This procedure has been found to reduce dramatically the susceptibility of computed solu-
tions to alternate node uncoupling. 1~17The reasons. for thisimprmememt.are diiwussed in.
Refs. 47 and 48.
Wenow describe-how the fam-centered-velocitie~ -am-computed. Rather than deaiing
directiy with- face-centered normai “velocities, it is more convenient to introduce a factor of-
tlie.cell-fice.are~. TAusthe.variables we use are

(tif%)a= “d- =-A--


us

An equation for u.” Ammybdexived.as follows. Consider the momentum balaned’or ccm-
tro~ ~~a]umeT,I$ha-t.mov~-ivi th the-fluid:

; [ puf.iu=F, (81)
J
v ‘27’
U3
where F’ is the sum of all forces on V. By dotting this equation with area element A that is
moving with the fluid, we obtain

D DA (82)
pu. Adu=F. A+—. pU du .
z I Dt \
v v

In curved meshes, the last term in this equation gives rise to Coriolis and centrifugal force
terms.
Equation (82) is difference in the following manner.. We initialize (uA)a using
vertex velocities ut that differ from the Phase B velocities only in that terms in (78) are
omitted that are associated with the thermodynamic and turbulence pressures p and ~ pk:

u!. —u!.
[(M’):h + S;jk] ‘JkAt ‘Jk = – ~ ~ [@/B + (1 – @) Pnl$A’)~– A. ~ 3 P#$M’)~ . (83)
(an)2 ~ B

Alternatively, ut differs from UAby the addition of the viscous term contributions:

Ut —u!
[(M’):k + S;.k] ‘JkAt ‘Jk = >7 [~~~ (UB) + (1 - *D) o (Un)lp.(A’); . (84)
7

The quantities (uA)a are initialized by

(85)
(uA):=Hu: +u; +u:+u; )”A:,

where a, b, c, and d label the vertices that form the four corners of cell face a. This label-
ing convention will be understood in what follows.
The finite-difference approximation to (82) is then given by

(uA): – (u/i)t
[(m: + s:] At “ = – ~ {[@#B+(1- 4JpnV(an)2
+ A03 pAkA} Yya
(A’’)n.A
Y

At – A; U:+u; +u:+u;
+a. [(M”): + S:] (86)
Al 4

The indices y refer to the faces of cell face control volume a, whose normal area vectors at
time tn are (A”)Y‘. In computing (uA)aE the A“ that do not coincide with regular cell faces
38
are eliminated in favor of the regular cell face areas as.is.describetinS@-. -aboveve. F-or=
faces.y thatlie-emtirely- within.a.regular cdl, the pressures-and valu~-af @p a-retaken-to be
tbe~~a~.th~r~~lar.~~~l .u~nte~. F~~fac~- y th~t-lie-on- a-re~lar ceil “face, the pressure. on.
face -Y.isobtained-by. averaging.the values.of.@B + (l– ~~.,)p~associated witithe regu.-
lar-c~lls cmeither. side of.the cell face.
Itis neeessary ‘mdefi~~e--arrad-d-ed-mass
Sanassociated with the spray dropids in cell=
face control “volume a. This quantity is given by

,
“ .~—a + s;
~fi-c
+.$+i+ & . .

s —— (iWf”.
“ (My +-(M’);+ (M’)g
c
+ (34’):
u

‘ToappmXirna&-d&d.IkEq
..(82 we.have used”an -are-admnge-basdon thtkiie
kvel”n vertex velocities,

(83)
.A:= -Ai (d! -!- t!nh) ;

that is, the areas A-~~are-computed usingEq. 158) withlhevertices lo~mtedatx~-+ u~ At,
4. Internal Energy Equation. The Lagrangian phase finite-difference approxi-
ma$ioa .~tothe internal energy equation- is%iiefcdlowing:

-t (1 – @Ja (u’’):vu”l..k_v;k + ~ K: V!@_DTB


+ (1.– @J fio “A:
a

(89)

Tine temperature used-for tlie heat conduction calculation is a weighted average, using-
variable implicitness parameter @~, of the Phase B temperature TB and an intermediate
temper*”e.T that Wedefineslmr$ly.
‘The Phase- A ifiternai-energy IA”contains changes due.to-chemicallieat.rdease and.
the spray energy source:.

Cwi
M:kI;.k – M;.kI;k
= v!&(Q;k + Q;k) . (90)
At

The chemical source Qtikc is given by Eq. (21) with 6, replaced by (ch~A)tih.The method for
approximating (d.I~A)U~
is described in Appendices I and J, and the difference formula for
Q’ is given in Appendix C.
The temperature $ used in the diffusion term differencing is based on an internal
energy that also includes updates due to enthalpy diffusion and turbulence dissipation:

(91)

To calculate T it is assumed that all heat addition up to this point in the computational
cycle has occurred at constant pressure. Thus the temperature change is related to the
enthalpy change by

(92)

where

(93)

By substituting for h~kt in (93) using (92), solving for ~~~, and using the fact that h~kn =
I@n + pQknlf3gk n, we obtain the following equation for T~k:

1
?..k = T~.&+ — <jk. I;k+p;k +.~ (94)
(P,.k )“
(Cp);k [ P:k
u

By using (89) - (91) we can derive

I:k – I:jk P;k + P;k V:k – V;k


M:h + (1 – AO)[@~u (U*): vu B+ (1 –@D)du”):vu”l
At ‘– 2 At

(95)

40
an equa~icm -that=is-solvwl in Z%aselhmd ‘-willbe-referred-=tc--
when we-desmille- the solution
procedure. I?cnthe differencing of-the viscous stresses o and the velocity gradients Vu in
[~; -thumdti.iir&d:fa.@@iz-K=.
“Si Turbulenc@fmation~. Tile-Eagrangi2mpfiase diffhmce approximation %o
the inmbuiemtkinet.ic energy equation (7) ‘is

M:kk;k. - M;kk;k v?.. – wk.


lJk
=– +p;k At i(~ “– ~[jk)k~k + ‘Ljk L?8”]-+
ijk (VDI
ijk
At

The difference approximation to the dissipation rate equation (8) is

‘The quantity f~h is zero-or unity depending on the sign of the cell volume change
Vijp – vgk~:

~- if @
–v;k>o (98)
f -= [ ijk
‘ijk. ~
0 otkerwise .

ThiS prescription for f~h is chosen to avoid”negatitie computed-values of k ands when there
are l-kqge-vohnne cha-nges during the Lagrangian phase.
Viscous dissipation of mean flow kinetic energy is represented by the term (VD)~h:
The difference approximations to the viscous stresses o and velocity gradients VUare
given in Appendix K.
In differencing the diffusion term, we use a weighted averaged of the Phase A values
kA and CAand the Phase B values k~ and cB. The amount of implicitness is specified by
the parameter @, which is chosen in a manner described in Appendix H.
The Phase A values kA and @ differ from the time n values because they include the
effects of spray source term %s:

(loo)

and

(101)

6. Volume Change Equation and Equations of State. The volume change of a


computational cell in the Lagrangian phase is computed using the Phase B cell face
normal velocities:

V:k = V:~ + At ~ (uA~ .


(102)
u

This approximates the following equation for volume change of volume V moving with the
fluid:

Dv
—= u.dA, (103)
19t \
s

which can be derived using the Reynolds transport theorem.50


The equations of state (10) and (11) are approximated by

(104)

and

4.2
(106)

‘TheI?i%e A eak!fi%timi i3f&3@3t, plSitiOilSi.ddind-’Uy

(107)

where 8X’P is a random position change that is added when timestep At exceeck-the-pm-.
title-tmbde~ce..eurelation .time-t~~r~.
givemby-Eq. <37) with all .quantities+va-lua%d at
timdewl n. The dispkwement8x’P, and -an-associate*ve-lo-city-chamW-8v’D2
. are chosen
from distributions given in A-ppenciix G. The partidie then exchanges mass, momentum,
andemergywith the gas in the computational cell .inwhich .xDAis-located.
‘T15~PHase-A-cai~tiiiiti6n of the ~remaitiiirgparticl~quarltit ie=is-azcompiished by
splitting or differencing sequentially the terms associated with each physical effect,
always using the most recently obtained droplet properties when calculating changes due
‘~ the next physical effect. The random velocity changes h’p are first added to the parti-
cle velocities V403:Then the droplet oscillation and “breakup caifiui~tl~n~i.m~f~~e~(~~-
Appendix F), followed by the droplet collision calculation (cf. Ap~_endix E). The Phase A
calculation is completed with the updates of particle radii and temperatures due to evap-
oration (cf. A-pp_endixC) “and”the addition of ~avitationai-acceleration terms to the par.
title velocities.
The only particle properties that are altered in Phase B are the particle velocities.
The Calculation of VPPis intimately- connec-ted.\vith.the.-'dua4ionnf.the.terms..R~~~.and
S’”~~,and hence is described in ..Appendix-C-.
None of the particle properties are altered in Phase C.
n.
Li. ScduticmPro-cedure- for YhrmiicitPhase B ‘Equations.
TA.Phase-Ilvduesd the fl~~fieid~~~r~ab~es-ar~ fk)~~dbY ~~~’+ing-th~im~]i~it
equations of the previous section. ~e.solution.proced~e.i=Lmttanetit~.theSI~LE

43
method, 19with individual equations solved using the conjugate residual method.20 In this
section we describe the solution procedure and give the roles of the various subroutines
that are involved.
Basically, the SIMPLE method is a two-step iterative procedure. After selecting a
predicted value of the Phase B pressure p~, in step 1 we freeze the predicted pressure
field and solve for other flow quantities using finite difference equations that difference
the diffusion terms implicitly. In the original SIMPLE method, the convection terms are
also difference implicitly, and their effects are included in step 1. In KIVA, convection is
calculated in Phase C in a subcycled explicit fashion that offers some significant advan-
tages over implicit methods. In step 2, we freeze the values of the diffusion terms obtained
in step 1 and solve for the corrected pressure field using equations that difference pres-
sure terms implicitly. Sometimes a Poisson equation for the pressure is derived and solved
in step 2. In ISIVA, for step 2 we simultaneously solve the cell-face velocity equations, the
volume change equations, and a linearized form of the equation of state. By algebraically
eliminating the volumes and cell-face velocities from these equations in favor of the pres-
sures, one can show we are also solving a Poisson equation for the pressure in step 2. l?ol-
lowing step 2, the predicted and corrected pressures are compared. If they agree to
within a specified convergence tolerance, the equations have been solved, and we proceed
to Phase C. If the difference between the pressure fields exceeds the convergence toler-
ance, the corrected pressure field becomes the new predicted pressure field, and we return
to step 1 and repeat the process. Each pass through the two steps will be called an outer
iteration.
In Ref. 54 it is argued that one should be able to stop after a small, predetermined
number N of outer iterations and have a sufilciently accurate solution of the equations.
Such a solution procedure is noniterative and therefore very attractive, but we have found
the argument to be flawed. The argument is based on the fact that each outer iteration in-
creases by one order in At the accuracy of the computed approximations to the exact solu-
tion of the finite difference equations. By stopping after N outer iterations, one introduces
temporal truncation errors whose formal orders are equal to or greater than other trunca-
tion errors of the difference equations. We have found through computational experience,
however, that it is better to iterate to a prescribed convergence tolerance. Although the
errors incurred by stopping after N iterations may formally be of high order, they can be
unacceptably large in practice.
Because the equations for (Ym) B, kn, and c~ are weakly coupled to the flow field solu-
tion, these equations are not included in the outer iteration. The mass fractions (Ym)~
are used in the calculation of the Phase B pressure p~ in Eq. (104), but the values of the
Phase B pressures and velocities do not influence the solution of the (Ym)~ through

44
13qi.(T?-).,‘Thus .F&.( .7-7.;
& -Sdved=”fklrthe”
(“Y~.)‘%fi-subro~titie Y$XXVE%e15Fe begirming
tkie.outer iteratiim. ‘I%is results in a ccmskkwabk cm-nputatiomd time savings over
schemes, Sm3has those that~=lculatei~icit-convection in step_i; that include the mass
f’km.%ion-equa-tionsin the outer iteration. ‘We often have ten or more chemical species in
our. applications and to scdv43equations:for M %heseinthe outer ik.ratkm :wd~-g~-atly
ifi~rea% “CXIZTIpUhtiOWd~ “~kTf3S

h the cases of”k’9”and-cBjthe flow i%ek-influences their values through the turbu-
kzme- production-terns-in Eqs; (96 ) and ( 97); but the values of~ and -#%u not-emterinto-
the flow field equations. Thus Eqs. (96) and (97) are solved after completion of the outer
iteration in subroutine KESCILVE. The finite-difference equations have been designed, of
tours% ‘mgivethis-one-way ~mtipling. Mathematically; the-vaiues-of-k and 8 inrluence the
flowthrough the turbulent diITusivity and “the turbuient pressure #@k-.Thiii coupling
could be accounted for by using Phase B values of k and c to evaluate the turbulent diffus-
ivityand jjp~ butthis -would-greatly incm-ase-computai,ional times, is not=necessary for
stability, and is usually not necessary for accuracy whentimesteps are.lused.that satisfy
the constraints of Sec. 111.H.
Thin-the-only equationsin.the outer- iteration.are the momentum equa-tioa; internal
energy equation, and-the pressure equation. We now describe in more detail the outer
iteration. The predicted pressure ptik~is first initialized by linear extrapolation using_ the
l?h~se=ll:pr~sures-frorn .%he.previow-two eye-lQs:

This extrapolation has been found to reduce both the number of outer iterations and the
number ofiterations required”to soive the pressure equation.
The fIrs@quatiomscdYd h-..step -1 ..
i=.tl=
.J.“ .~e~a.tu-m.ev~a.ti~.
... {78). T.% p=die++
pressures ptih~ are used in place of the unknown Phase B pressures, and predicted velocity
field u~j~
.. is solved “forin piiice ot the Phase B velocities. This calculation is.performefin.
subrcmtineVSOLVE.
T-}m--~e&cte~temperature fieki is next found “by using a combination ofEqs. (9-5),
(105), (104), and (76). Equation (105) is used to eliminate 1~ in favor of 7% in (95).
E.quations<l@Q “a-rid“(n? “ar~m”~ihed:to @+e

45.
which is then used to eliminate V~hB from (95). After some rearrangement and replace-
ment of superscripts B with superscripts p to denote we are solving for predicted values,
we obtained the following equation for the predicted temperature field:

+ (1 – Ao)[(#)Dduq: Vup+ (1 – @l))O(Un) :Vuniijk


II

}
(110)

This equation is solved in subroutine TS LVE. After solving for the predicted tempera-
tures, the predicted cell volumes V~hPare found from (109) with superscripts p again
replacing the superscripts B:

M! (Y ):
wk = +to X*
IY’;k. (111)
P;k m m

Finally, we solve for the corrected pressure field p~hc. This involves simultaneous
solution of Eq. (86) for the cell face velocities, Eq. (102) for the corrected cell volumes, and
a linearized, isentropic equation of state that relates the corrected pressures and volumes.
In Eq. (86) the corrected pressures are used on the right-hand side of the equation in place
ofp~. In (102) the corrected volume v~hc is used in place of v~h~. The equation of state is
obtained by combining (109) and (110), neglecting the diffusion and dissipation terms in
(110), and linearizing about the predicted cell volumes and pressures. The result is

wk
v;k=v!lk-+— ‘~;k – P;k) , (112)
Yljk p~k

where

, (Y”,):k ~,_ v..nlJ k ~

1
2(cu);k + 1?”
I>

m
y

m V:,k
Y;h (Yn,):k - (113)

Im
‘:k + ‘;k ~. y
2(c,):Jk+ _
P;k wrn

46
T}ze-com-cte&pmssures-are-found in subroutine I?N3LVE,
‘Tile predicted and-corrected-pressure fields are then compared to see if convergence
h-as-been a-tteined. Th~uter-iteration isjmlged’t have cxmverged-if

for. all Cells<i,jjkj. The Convergeneet.okranee :~ is typiixdly taken “to“be0.10; If-(”1”14)is”-


notsatisfled-il~eve~ ‘cell; then- the-corrected pressure fieki “becomes the new predicted
pressure. field, .ad.we.reiun.tQstep.l..
If canvergene+has-b~ attained; then ptik~ is setequal to p~kC; u~kR:1s1’
ioun&from-
(78) -with-the-most-recently predicted velocity field used to evaluate the vi&mwstresse~.
anclljjk~ Ldmmdfkom .(95J vrith the .mmtre~<~nti~~.~edietedve]oeities-and temperatures
Usd$t.evallmte the dissi.pathm “and’di.til&sieR’+&.ws+Rlmlly; tile-Pk’=*B-’=fatex-.p3titi;ms.
are gjven ‘by.

~i Phase G
Phase. [Cis the re.zxme~hase, ~n-which -’We.Sa-leU12*e$h-nYeeii5e=t~*SpOti=amf3ei-
ate~withmcwing.the .mesli relative to the fluid. T-his-is-accomplished in a-subeyeled, ex.
plieiteal~dlationu ~ng atimest.ep A& that is an-integral tisubmultiple-ofttre main-comp:
utatiuna-l timestep-A-t: “Tinetimestep A-tCmust satisfji the-~nrantr..nditibn .ufAtC/Ax.<.1.,
where Ur ii+the +Iuid-velimity -reiative-to-the grid velocity, but-’because there is-no upper
!mwadoathe nurnberofsubeyeles, th~~~d~~~I~i~~-titb-~rAt/A~ >1: Tine-exactfbrmula-
for -A-tcis-given in-the next section. Convective subcyciifig saves computational time_
ber~use the rezone calculation .takes~ulyabout ten percent of the -time of the Lagrangian
p-h-aw~aletilation.
Tine user of’IIA-lThas the option ofusing one of-two convection schemes: quasi-
second-order upwind (QSOU) differencing, described in Appendix M, and partial donor
cell O?BC) differ-mming; described- in-Appendix N. In addition, when using PDC ‘differ-
encing, the user can vary the..=o}mt~ti-’’lapwi ndi>g’> through two P_aramete.rs~~a~Id-fl~..
W-hen a. ==1-and=jjl.-==0; dmmreell or=full up~’inddiffereneing is used: When-aG =0 -anti
Po = 1; i~~te~olate-&knor-cell Wferencing, or Leith’s method;%5is used. ‘The algorithms
are fully descr~Dedin.t’ne*m&-c+ ~Dut.herewe wHI derncmstrate some offheir- proper--
ties through a computational example. Because ofpoorresolution, the example problem
is a severe test of”the convection schemes and exaggerates many of their shortcomings-

47
In the example we convect a scalar field through a two-dimensional mesh of square
cells with a uniform velocity directed at a 45 degree angle to the mesh directions. The
initial conditions are plotted in Fig. 6. The scalar field is initially unity on a square that
has five cells to a side and is zero otherwise. Also shown in Fig. 6 are the results for five
different convection schemes after one timestep At such that uAt/Ax = 5, where u is one
component of the velocity, The five schemes are subcycled explicit QSOU, donor celI, and
interpolated donor cell, each using uAtJAx = 0.2, and fully implicit donor cell and the
QUICK scheme,5G both using uAtJAx = uAt/Ax = 5. The latter two schemes are not
available in KIVA-11, but are included in the examples in order to illustrate the accuracy
of commonly used implicit schemes. Given in Fig. 6 for each convection scheme are con-
tour plots of the final computed scalar field, the maximum and minimum computed

Qc1
Sou Donor Cell
uAt. ?Ax = 0.2 uAtc/Ax = 0.2
Max = 0.’87 Min = 0.0 Max = 0.63 Min = 0.0
Error = 0.36 Error = 0.53

Inter~A~~A~ Donor Cell Implicit Donor Cell Implicit QUICK


c = 0.2 uAt. \Ax = 5.0 uAtcjAx = 5.0
Max = 1.41 Min = –0.35 Max = 0.’51 Min = 0.0 Max = 0.66 Min = –0.05
Error = 0.41 Error = 0.83 Error = 0.75

Fig. 6. Isopleths from calculations of convection of a square-shaped scalar profile.


48
values,. and the root-mean-square error between the computed swlution and the exact solu-
tion; wxhie’his j_@ a -anifomtm~~siati-on-f~ve-ceii-s-in eac’h direction. The.ermmisaverag_ed:
over the -twenty-five cells where the scalar field-is-unity in the exact so~ution.
‘Thernost acmrate method-i-s @3t3bT, even-though-it-km T?rst~order sp.atial
truncation errors and therefore is formally less.accnrate.than~ nterpdated-dcmor cell:
which .is-se~~nd,mder. accurate in space. T=helea-s%
.aceurate,methods-a-re theirnplieit
methods. This illustrates the fact that although the imp~icit methods are unconditionally.
stable, they can have large errors-when-tihk> L.
Amonotmm xcimme has the property that it introduces no new mimima or maxima
in the computed solution. Tfie donor cell and Q,SOU schemes are monotone, .and.th~their
mnqmtdmaximaand-.
minima Jie between those of the initia-1amditiomx Interpolated
donor cell and QUICK are not monotone. C.omp.utational oscillations.in r~gions ofsteep.
Wadierits are obtained with nonmormtone schemes and canhe.especially pronounced i-n
calculations using pure interpolated donor cell.
Although PDC differencing is less accurate than QSOU, we retain it as an option in
fiTA-H-lmcause-ittis-si~ificantly faster than the QSO’U scheme. W-e recommend “useof-
P33G diffemlcin~n-calculations in which speed”is more important than accuracy or in
calculations in which cell Reynolds numbers are less than two. In the latter case physical
di~ffiusionis large enough to render negligible the numerical errors associated with PDC
differencing. When using PIIC diflerencing; we recommend taking Do = 1.0 and a. = 0.1
orO;2 ‘to suppress -computation a-ioscillations. Tine QEKYU”
scheme shOuid “be used”to oijtaj n
the most accurate caicuitititm for a given mesh” resolution. Both schemes can be used in
separate caiimlations-of the.samqrnldern+s a.paxtjal .te.st.of.eanv.er.genee. .If.tb.e CQWA--
pute&salutioms-are-thes me, then numerical errors associated “with convection are sma. 1:
We now d%cribe the convection calculation in more-detaili The transport of cell-
~mntered quantities-i s<anptited by using a-volume 6Va tliatis s-wept outby regulti~-ceil
face a each convective subcycle, as it moves from its Lagrangian position (defined by the
corner positions.xti~?) tmiisfinal .pmition [defined by-the user-specified X-tifin
+ 1). It is-
conve.nient. to a-sscmia%ti Vawi th beth the I&w -andthe -regularcell -under.mmid-emtt.iun,.sa~
that.~~a .i~positi~~~if.the volume of.the+dl in question is-increased by lmovingface a-frcmr
its Lagrangian to its final position. Thus, for a given face, the sign of 6 Va depends on the
sid&&tbe -f%e from +iidi i tii viixvedi T%is eulme~ltion-is-entim
l.y analogous to that
adopted in subsection B ‘above for the area vect,ors-Ae,. The.tWa are.evaluated.in terms of
~h~r>e]l-fa~. velocities and the old- and new-time ~gridpos;tions:

8v a = 6vG
a
At !Al
c.
– .&4)B
a_
At
c“

49-
In (116), 8VaG is the volume swept out by cell face a when the four vertices defining the
face are moved from their old-time positions xijknto their new-time positions Wjkn+ 1. The

/5VaG,which are computed using Eqs. (56) and (57), are positive if the volume of cell (i,j,k)
is increased by the grid motion. It can be verified using Eq. (102) that the 6Va satisfy

(117)

where NS = At/AtCis the number of convective subcycles.


The species densities (pm)~k” after u convective subcycles are given by

(Pm);y’.k = (Pm);;y’.; 1+ ~ (pm):- lWO


, (118)
a

where the summation is over the faces of cell (z,j,k). The species densities are initialized
at the beginning of Phase C by their Phase B values

(Pm);k= (Pm):k ,
(119)

and the subcycle volumes Vtik” are given by

V;~ = [u V;; l + (NS – u) Vf!k]/Ns , (120)

where NS is the number of convective subcycles and Vtikn+ * is the cell volume based on
the final coordinates. The cell face densities (Pm)auare evaluated either by the quasi-
second-order upwind scheme described in Appendix M or by the partial donor cell proce-
dure described in Appendix N. The total density after u convective subcycles is given by

P;, = ~ (Pm);, ) (121)


m

and the vertex masses after u subcycles are found from Eqs. (66) and (67) using these total
densities of (121) and the volumes of Eq. (120).
The specific internal energy ~~k”after u convective subcycles is determined from

“-l U–I.–1+ ~ (pna


‘~k ‘~k~jk = ‘ljk ‘Qk lijk ~
‘-’tiv u’
(122)

50
wl-we..therd face ermrgy.dimsities <p~av are evaluated eltherby Ouasi=sxjcend=order--
upwind=dirTem~mir~g< A=ppenaix-~fi) or by partial “donor ceil’diff~rencing (A-pp.endik N).
The f’armula for updating turbulence quantity qtik” in the subcyele-is

p;kv;.kq;k = p;; ‘Vljk u-l”+ ~ (pq):-iwa,


:–1qijk
,1 *.-.

where q = k or q = k3’2/c = L. We convect turbulence length scale L rather than c be-


eaus+ee.gem%%dly=
has.s!!eep.: ‘gra&”ent&-.:m&ihe4wfm-la3~:mmwi-a31:eYrors-a-r:se -w-ken‘
comvm~. W:cellke.quan.ti.ties (pq)au are evaluate d cit.her by quati%eccmd-ordsr
differencing (Appendix M) or by partial donor cell differencinglAppendix N) using-the. full.
--.--—.. .
donor celi limlt (aO = 1, ~~ = O). Since partial donor cell differencing is not monotone
exwpt=wheruo = land Do = 0; this limit is Used-Atensure ‘tkat-rlegative-va-lues ofk and”L
ammot:cdbtaineci in the convection phase.
After completion of all convective subcycles, the final values of cell-centered quanti-
ties are set equal ‘m their-values aftert&NS- subcycles: Tine final value of temperature is
computed by inverting J@ [113 lusing final “values of%ternal energy an&rrass&nsit.ies..
‘I’lie final pressure is given by

~+i-_ ROT;,:’ ~“ (pm);;;/ Wm .


(124)
P~j~ –
m

Convective transport of momentum on subcycle. U.is calculated in terms of the mass


increments across momentum cell .fac.esIwhit-h an+related to the mass increments across
regulm-ce-ii faces in the following way. ‘The mass increment across ceil face a of-a particu-
lar momentum cell-is definedliy

where o and i are the regular cell faces on either side.of .the.momentum.cell -fa~. a.
(between which face a is ‘<sandwiched”), of which i (“inner”) is the one that actually cuts
into the Lmon-wnturncellirrquestion; -whiie-fare-o-(~touter”)does not. & usuai; it is conven-
ient to associate-Wf’ ~.-with-’both-the-fa-ce-and-themomemimrnreil i n .q.uesticm. ‘Wherr i%cs Q.
is viewed from the other momentum cell to which it is common, o and i are interchanged
and the sign of ?3M’a re~er.~s.. Clne.readily.veri fies that Eq,_{125) is amsistentwith the.
definition of vertex masses, in the sense that
(M$’.k = (M’)”-1 +
ijk x wf:)”-1,
a
(126

where the summation extends over all faces of momentum cell (i,j,k).
Before fluxing momentum the mass increments t5M’a corresponding to the twenty-
four faces of momentum cell (i,j,k) are added in groups to obtain mass fluxes SMf through
six composite faces ~ of the momentum cell. Each composite face is formed from the four
cell faces a that touch a common regular cell edge that emanates from vertex (i, j,k). The
momentum fluxing is then computed by

(127)

where the velocities up”– 1 are evaluated by the quasi-second-order upwind scheme of
Appendix M or the partial donor cell scheme of Appendix N.
Two special features are provided in conjunction with the convection calculation.
The use of partial donor cell differencing sometimes results in the development of unphys-
ical small negative species densities. We therefore provide a reapportionment algorithm
which tends to preserve the positivity of these densities, as described in Appendix O. This
algorithm is not needed when quasi-second-order differencing is used, since this scheme is
monotone.
In an axisymmetric swirling flow with free-slip boundary conditions, the total angu-
lar momentum should be conserved. However, the K.IVA difference approximations to the
momentum equations simply conserve the three Cartesian components of momentum,
and this does not imply angular momentum conservation because of truncation errors. In
practice, we have found that the only such truncation errors that are significant are those
arising from the rezone calculation of Phase C. For this reason, an optional angular mo-
mentum correction procedure has been included in Phase C, as described in Appendix P.

H. Accuracy Conditions and Automatic Timestep Control


The timesteps At and Atc are selected automatically at the beginning of each cycle.
Because diffusion terms are difference implicitly and convective terms are subcycled,
there are no stability restrictions on At, but there are several accuracy conditions upon
which the automatic selection of At is based. These will be given in this section. The con-
vection timestep Atc must satisfy the Courant condition for stability, and we also describe
how this is generalized to an arbitrary mesh.
The accuracy conditions we use to determine At cannot give a universally reliable
selection because there are many accuracy conditions we have not taken into account. It
has been our experience, however, that the criteria we use for determining At give tempo-

52
rally= aeelura-tesdu tiorwi n most eahm lati mm T+heuse:rismamtiimm ‘ -f&t’ Oihe~ a-ccu.rac.y
conditions could be important in his application and the timestep shoddalways.be.varied
ta .test.ftir.temporal accuracy=
The.&r~t a~~~rae~ ~~~ditiofi on At is that,

(128)

where ,Fais swne positive real number oforder- unity and Ax-is anaver=ge--ceil dimension.
This.ccmdition. arisedecau-adermsdo rder higher. than At.are igncweAh-Eq-(115),. The
accnracy. cmxstraint< 128) is the only-one we use in which the cdl sizeAx appears. We note
that Ai - Az@w eendi tie~.-(1-28) j in -Cofitrftstto-eqli d C%%lVeC..k’e--SM3~
lity.-cz=ittnri-zq
W’hic’n
give At- Ax, and exp~icit diffusional stability criteria, which give At - AX2. Thus while (128)
will reduce the timestep as the mesh is refined, it will not do so as much as the two stabili-
ty criteria, which bad to-be observed by theflrst version ofKfVA.~ Constraint (i%).is
implemented by. calculating a timestep Atacc:

and the subscripts-in (lillqj refex=ta.the=ver~i~~sof ~mll(i ,j,k) as numbered in-Pig. 2: We-
then constrain At.fi+ ] h kwlkss.ttan- Atticen-+1; as described below. ‘Ike default va!tie-of !ra_
is 0.5.
The second accuracy condition on At is that

IAI At <f, , (131-)

where fr is oforcler unity-and A is an eigenva-lueofthe-rate ofstraintensor. This criteti-


on-lhnits theanmunt-of-deil ai~tortion that can occur due to mesh movement in the
Lagrangian phase. -When.ceJls hemme very-distorted, the spatial accuracy of thediffer-
~nc.e ~p~_~ox~m~tio~s.~~ff&~j one ~xfHI-Iple ofhow (13-1) ‘w-or*SisthKf~ilOting.” In .apkme
parallel shear flow, there isone nonzero eigenvalue.+ tlui~y,.wherml~is.the sdreamwise ve-
Iimity component amdy is the crwss-stream direction. As-depicted” in Fig. 7-for a rectangu-

53


1------ -
I I
I Fig.7. Cellshapes before (dashed
tiy : lines) and after (solid lines)
I Y
1 i t the Lagrangian phase in a
1 I plane, parallel shear flow.
1/ I /

lar cell aligned with the flow, constraint (131) limits the distance upper and lower cell
vertices can move relative to one another, divided by the cell height. Constraint (131) is
enforced by calculating a timestep AtrS~:

f, (132)
At~sl= min
(i,j,k) 2d~ ‘

where

(133)
aijk = ~(p~k – 3qtjk)

and pijk and qijk are given in terms of the rate of strain tensor sem in cell (i,j,k):

PIJk = ‘see
(134)

+ et.ms1es3nL + cem3s1es2n, .
‘LJk = ‘l f?msZt%n

In (134) C{mnis the alternating tensor,57 and stm is given by

~ due au
(135)
‘t’rn= ; ( —+J
ax~ dxe ) ijk ‘

where the velocity derivatives are evaluated using time level n velocities and the approxi-
mations of Appendix K. It can be verified from the formula for the roots of a cubic polyno-
mial that the denominator of (132) is greater than the magnitudes of all eigenvalues of
Stm, and therefore if we select Atn < AtrStnthe constraint (131) will be satisfied. Using
f.= U=has given sufficient accuracy in calculations we have made.
Two other accuracy criteria for At are obtained from the need to couple accurately
the flow field and source terms due to chemical heat release and mass and energy ex-
change with the spray. For the chemical heat release, the requirement is that

54
Vtik (i..
“iJ”k.
Llt <-fch ,
MGkItik

where fc~ is an input constant typically taken to be 0.1. Constraint (136) is the require-
ment that the total heat release from all chemical reactions in a cell should not exceed a
small fracticnr~c~ ofthe-totzd internal energy in the cell. “Toenforce (136) “we caicuitite
timestep A-tc}tby

and choose A-tn-+~”~ A-tC~E-+


i. ‘This formula assumes that the fractional rate of energy
reiease varies SIOwly from cycle to cycle. Spray timestep At~Pis calculated. from a similar
formula:

‘~-~R-”I~diU-~~m~Sk~” used for cycle n +1-is then given by

Atn+l = ,mk(Ab~~l, &~~~l, At~h+l ,At~P+l, Atn+l, At;X, At ) .


s I?LXcc

T=h&imestep Atgr n+ 1 limits the anmunt=by ‘which-the-timestep can grow:

At rt+l _
—1 .Q2 Atn .
(139)
@

‘Tirnesteps Atmz and Atmxcaare, respectively, an input maximum timestep and a maxi-
mum timestep based on an input maximum crank angle in engine calculations.
The-initial guess for Aioncycle O-is givemby input-quantity llTL Tnis is then com-
pared with Atrsto, Atmx, and Atmx-a to determine the actual initial timestep At”. (If the
IYITsspplied--on a-subsequent restart ditffers firom the DITat cycle O; the current At will.be.
reset to this new EiTE)
T-heconveetion timest-ep Atc k based-on-the--Courant-stability condition. in a rectan-
gmlarmesk, this condition is

~z .
) (140)
‘ [w –hzl~’
where & bY,and bz are the components of the grid velocity b. Constraint (140) limits the
magnitude of the flux volume in any coordinate direction to a value less than the cell vol-
ume. To generalize this to an arbitrary mesh, it is natural to replace (140) by the similar
criterion

(141)

where the i5Vaare the flux volumes calculated for cell (i, j,k) using timestep Atcn– 1. In
practice, for accuracy we also reduce the timestep determined from (141) by a factor fc~u,
typically taken to be 0.2.

IV. THE COMPUTER PROGRAM

A. General Structure
The KIVA-11 computer program consists of a set of subroutines controlled by a short
main program. The general structure is illustrated in Fig. 8, showing a top-to-boti%m flow
encompassing the entire calculation. Beside each box in the flow diagram appears the
name(s) of the primary subroutines(s) responsible for the associated task. In addition to
the primary subroutines, Fig. 8 also identifies a number of supporting subroutines that
perform tasks for the primaries. Comments at the beginning of each subroutine in the
listing describe its purpose, where it is called from, and what subroutines or functions it
calls, if any.
KIVA-11 is an advanced experimental computer program, not a “black box” produc-
tion code. Its use requires some knowledge of and experience with numerical fluid dynam-
ics, chemistry, and spray modeling.
ICIYA-11 was written specifically for use on the CRI Cray family of computers, oper-
ating under the Cray Time Sharing System (CTSS) and using the Cray FORTRAN (CFT)
and CFT’77 compilers. We have several observations concerning our experience with the
CFT compilers currently available to us:
● CFT 1.11 k the compiler of choice for short runs and scoping studies using KIVA-11.
It will compile the program in about 20s on a Cray X-MY, and the compiled code will
run the baseline sample calculation in about 63s.
● CFI’ 1.14 requires about 55s to compile KIVA-11. The baseline calculation still re-
quires 63s to run. A principal feature of CFT 1.14 is vectorization of loops contain-
ing indirect addressing, utilizing hardware features of the Cray X-MP. While this is
quite attractive for some of our codes, it is of minor consequence in KIVA-11, which
contains very little indirect addressing.
56
* CFT77, ‘written-inPascal rather than machine kmguage, requires over 3-rein to com-
pile-~A=btish~t.r~er.ved .f~r.long&rruns In which one sa-nrecover tbcorn--
pilationtiinepenalty. The baseline runtime is dowrrLtabout-52 ‘s; 21% faster than
with*he-CFTcorr@hws. Clearly, it is advisable-in create.tiibrar.y of~docatabi-e bi~
nari~.when using CJCTL D4.andXMT7.7j +Aminimiz~th~tim~~pmt-in t,he~mmpiler.
At present, CITI’77 is not a good compiler to use for debug@ ng,.as many variables
reside in registers. Therefore, symbolic namesare.freqmmtly- inaccm.ssible to the debuggw.
W.e.m&r<a&that3he-C~-77-developers plan -+~.bac-k.ofis.m~vhat.in regkter utiliza.
tion, so thatfuture.versions -will he more com~atible with interactive.dehggex-~. As..
things now staml; dQvei6pem:ofl~~.co&=e-rdtic.tant.ta use ICXT7?-because ofthis.
Most Cray users outside the Los Alamos-Livermore environment have available the
Crziy-Operating System .(COS) and.willfindK~J.4-Hg~ ~aJly compatible. Tile.prirmipk
incompatibility with outside Cray systems lies in the calls that communicate with the
opera-ting-syskxn. T-he-functions of all ~mdls‘tosystem-muti~~s-are-d-esctibed-in the
EI?HXX3 at-the end ofthe FGRTRAN listing. ‘WRITE “(59;-) statements refer to the user’s
remote terminal.
Users who do not have a C!ray computer face an additional task adapting_K.I_VA-H to
run on whatever computer they have. This is because K.IVA-11 contains statements pecul-
iar to the (WI’ compilers that permit vectorization of many of the.lon@n.thehydro sub.
~routines. Oul~ffotis-at-vectotimtion resulted in making the hydro portion oi’the code run
nearly five times as fast. (Unfortunately, .the.chemistr.y. and-spray-subroutines are not
amenable to Sue-htreatment; this is because each cell in the chemistry and each droplet in
the spray follows a unique logic path dependent upon local conditions.)
‘The unfamiliar statements in KD7A-IFare the CFT vector merge functions CVMGT,
CVMGP, CVMGM, and CVMGZ, and the vectorization directive CDIR$ IVDEP. The
vectormerge-furmtions-allow many loops to vectorize, in that they can repiace IF ‘tests,
. .. . . . .
wlmh cm not vectkrize. 13riefTy,tlie-fourveetor merge functions perform as follows:
> CVMC-’T (X-,Y-,L) results-in .X-if L is true, Y-ifL is nottrue.
* CV.MGP {>~,xX’,P)~es~~tsin X if”p’>
— ~, y ifp <9.
@ CVMGM-(X;Y,M) results in X-ifM < O“,Y-ifM — >0.
s G’VMGZ {X-,Y-,Z) -results in X-if Z-is zero; Y ifZ is ilO1~TO;
CX31R$IVDEP instructs-Cl?T to ignore apparent vector depend&ci@s mrecursiims.
Ifk.mhnagineckxmrsion.ca uses the 10-opndto-beautomatieally vector%e&by CWT, the
~v~DE~ dir~~i~e -instructs the ~mp~l~r~~ ~reate ve-cturto-&-aHyway: NO~~ that thiS
directive begins in column 1, which will cause it simply to be treated as a.comment by
other compilers.
9
START
PRIMARY
SUBROUTINES:

BEGIN
SUPPORTING
SUBROUTWES:

\ READ INPUT. COMPUTE DERfVED QUANTITIES RltWUT, TAPERD

CREATE MESH AND CELL VAMABLESI SETUP, TAPERD VOLU15 PISTON,


k STATL BC

~ CALCULATE GAS WSCOSITY I Vlsc


I
CALCULATE AREA PROJECTIONSI APROJ
I
I CALCULATE At FOR NEXT CYCLE I TIMSTP

] PEW CYCLE: WTPUT, CELL lNITIALiZA~ NEwYc DMPOUT, FULOUT,


p&t, print routlms
I
TAPEWR
Imo
1 MOVE P{STON, CALC. ITS tWW VELOCITY I
I 1

~ NJQ2T FUEL DROPLETS, IF APWOPRIATE INJECT FRAN

DROPLET TRANSPORT AND TURBULENCE\ PMOVTV FRAN, WIND,


REPACK

I DROPLET BREAKUP I BREAK FRAN

I DROPLET COLLISIONS / COALESCENCE \ COL~E FRAN REPACK

[ DROPLET EWPORATION ] mP

WLL SHEAR STRESSES, HEN TRANSFER LAWALL BC


I
! OPTiONAL NODE COUPLER NODCPL BC

KNEllC CHEMISTRY,tGMTION CHEM


,,I

EQULBRIUM
CHEMISTRY CHEtmof (tnocr system sdvor’)
I, cwQGM

[ BODY ACCELERATIONS GRAVITY BC

PwM, BC
PCOUPL

Fig. 8. General flow diagram for the KIVA-11 program.


58
PRIMARY
SUBROUTF4ES:

ml?wic
1

[ MASSDIFFUSB2N I Ysfx!a YIT,.RESY


1

Exfm= Bc-

Pwr

i ADD PRESSUREACCELERATIONTO VELOCITIES i PGRAD BC, APROJ


I
!..
1
j _iMPLICtTWMENTUki DIFFCKTON 1“ VSOWET REsuvw, m-
I
TSOWE DRDT, REST, TINVRT

~~g~’+~. FwAD, U!wT, PEWS


DRDP, REsP, WC

D=QQ~ . Be=.APRoJ
,. I i

[ ADO PRESSUREACCELmATION TO VELOCtTIES I PGRAD BC, APROJ

PHASEW

j :ikfPUC4T-DIFFUSION OF”TKE- APWEPS ] KMW DRllKc REsK. REsG


BcEm BcRE$E
j UPDATE DROPLET VELOCITIES !.= PACCEL
..
1
~ CALC’UEATE-me vE+,.oems* j RE20W
I REZOKGMD COORDUWES I
I
voLLJii4E

_x*-_
htouFLx

,
@mmxETsmNEABovE- [ CNOP Bcr BcEPsr DoML
I tF A?PRomATE
?FM, vokuME

STATE

Fig.- 8. continued
59
The non-Cray user can quickly modify the program by installing functions that emu-
late the vector merges. For example, CVMGT can be emulated by
FUNCTION CVMGT (X,Y,L)
LOGICAL L
IF (L) THEN
CVMGT = X
RETURN
ELSE
CVMGT = Y
RETURN
ENDIF
END
Once the program is running properly, the functions should be replaced by in-line
coding for greater efficiency.
Overall subroutine architecture also shows the effects of vectorization. For example,
the user may ask why we break some logical task into a set of contiguous separate DO
loops, when a single DO loop would appear to sui%ce. The reason is that excessively long
DO loops will not vectorize because of optimization-block size limitations in some CFT
compilers predating CFT77. It is not easy to define just how long ‘(too long” is, as it depends
not on the number of statements, but rather on the extent of computations involved.
These cases were determined empirically; if there was no other reason why a long loop
failed to vectmize, we broke it up and achieved vectorization.
The dimensions in the release version allow up to 12 species, 966 vertices, and 2000
computational spray particles. These dimensions may easily be altered via the
PARAMETER statement (lines COMD.18 - COMD.19).
The input quantities always required to setup a problem are described in the
EPILOG at the end of the listing and are read according to the formats appearing in sub-
routine RINPUT. The mesh generation is automated for a broad range of engine geome-
tries, and is discussed in Sec. IV.E.
I
B. The Computing Mesh
The KIVA-11 formulation is based on (x,y,z) Cartesian geometry and is applicable to
cylindrical (CYL = 1.0) or planar (CYL = 0.0) calculations in either two or three space di-
mensions. The mesh is composed of a block of cells in logic space, NX cells in the i-direction,
by NY cells in the j-direction, by NZ cells in the k-direction.
1. The Five Mesh Types Available. Figure 9 shows the five mesh types availa-
ble, determined by the specification of NY, CYL, JSECTR, and THSECT in the input data.

60
..
E

~y *

IsEC-m
=1

JSECTR
“ =0

I.—
. . .. . . . -
Fig. 9. Tne_five-meA.ty~vailableln.-~=.A-D~
The 2-D cylindrical option (NY =1, CYL = 1.0, JSECTR = 1) offers an effkient
means of calculating fully symmetric cylindrical geometries. In three dimensions, the cy-
lindrical case results in a pseudo-polar grid. If NY >1 and JSECTR = 1, the resulting
mesh is some sector of a full circle. Figure 10 illustrates a 72° sector, which has been ap-
plied to an engine geometry in which the on-axis fuel injector has 5 evenly-spaced nozzles,
directed radially. The sector option allows us to model the 5-nozzle feature easily and far
more efficiently than zoning a full 360° by taking advantage of the symmetry. The
JSECTR = Ooption is used when features of th(’ geometry or spray require zoning the full
360°. As shown in Fig. 11, the Cartesian block of cells is curved around and joined to itself.
In all three cylindrical cases, the front and back (derriere) boundaries are periodic.
The neighboring-cell relationships between cells facing the front and derriere boundaries
are built into KIVA-11, and velocities are mass-averaged across corresponding points.
The left boundary is shrunk to zero size to become the central axis, where our prescription
at each axial level is to separately mass average each velocity component. For engine
applications, the top boundary becomes the cylinder head, which may be flat or domed,
and the bottom boundary is the moving piston face, which maybe flat or contain a bowl for
DISC or diesel designs.

Fig. 10. Perspective view of the outline Fig. 11. The KIVA-11 3-D pseudo-polar
of a KIVA-11 sector mesh. grid is formed from a Cartesian
NX = 20, NY = 5, NZ = 10, block of cells through the use of
and THSECT = 72°. periodic boundary conditions.

62
The a-zhnuthal dimension oftheeylindrhxd options is-given by T-HSECT, ~measured-
imdeg-mes; ‘1’HSECT is-required to be 3tW-for the full-circle mesh, or an even fraction of”
360C for a sector mesh, so that the symmetry condition is satisfied. For example, the mesh
in-Fig. 10-has T-HSECW = 72°, as there are 5 -spray nozzles Imingmodele-ck lWmm-NY =- 1-,
subroutine ‘RINITT ensures thatTHSECT = 0.50=.
For whichever of the five mesh confi~rations-thatthe user ~deetsj KIIJA-H-auto-
matieally ~mmptitesthe ccorrec~bmmdmy cdtiom-tmatients-forno~slip, free-slip, or
free-slip law-of-the-wall, .requiringno code.modificationdy. the.usw, -e~c~@.f’onspecial.
omsessuch as- inflmv=and outflow=treatments; whic=h+mAise=ussed in See. IV. K-.
2. 2-D to 3-D Conversion. Further efficiency in the use of 3-D sector and full
circle meshes is made possible through the use ofa 2-D to 3-D converter supplied in KIVA–
II. IzTImdrlyan@~aTFlieaiionsj a=si~ifieantportiono fthe cahmiationis the cold’fltnv
afterlIVC amd-beforethe spray event, while the flow is truly axisymmetric. ‘Tiiis portion
cmheno&ldlting. the L-D.cylindriml option .(NY- = 1)j then .forc-ing-arestartdump just
befort%hvsray. begins. The-user- then~~~ti~tirm:t.hisdump; sugplyir~~ane.w-vatie=&f
NY and-an a~propriate
-- value of THSEC:T in the-input .&t&. WbrnntindUNIZUZnotes.
that NY has changed and calls subroutine TRAN3D to convert the 2-D mesh with its cur-
rent=solution ‘to a 3=13sectururfull circie-mes%--with-the-same currents oiution. “Tile-3~i3
run then proceeds justas if it had been 3-D ail”along, and the user can initiate a nonaxi-
symmetric- spray eventj having
rea-lized a-signifieantreduetion in ~mmpater time to reach”
this pointifi-the ~dcrdatiom T-}m--oTm:msttiction:un-thisfedWe is thatilre-parameter NV,
which is the dimension of a cell stora~.array, rntik.adeqa~e.frn m.t.ime
t. = o to aw.om.
rnc&te-the.%-Ihnesh.

c. The Indexing Notation


As-discussed in Sec. 13X13;some.variatiles are.iocded at.vertices and”some at ceil”
centers. iii FOR TRAN-notation x~k becomes X(I,J,K), p~k becomes W,J,W, and so on.
‘Thus; th&ndices(&JJQ refer- ~tm
the cell ~~nterforee]l-c~ntemd-va fiaMes-orto-vetiex-
(i; j;k) for vertex quantities.
I&cause the number. of.vertices inanydiree-tion is one greater than th~numberof
~~.ls~itis=apparent that the-grid in mmputemt-orage n-mst-’b@tX- +-1-)by{NY+- 1-)by
(NZ + 1) in-size: Since our index (1, J;K) refers-to both cell-center=~vext.ices, -we -must.
allow- extra .storage planes ac-ross -the right j back, and top Qfthdogiealmesh.
In K-TVA-II we replace the tri@e_(I,J.K) ti.wri@hy.tin@esubw~ipt, which allows.
statements to be compactly written. Traditionally single subscripts have. also be.enmore.
ei%ien~, but this isbemrning less-of arvadvantagewitk ti~~inc~~+n-g-’mT-hi~ica%ion of
the newer compilers. When referencingthe eight vertices of a cell, .we use the 1 through 8
shorthafidnetiefio fFig. 2. In”this rmtzatiori:‘T-4”r&erstu.ve-rteX4; $hef3;J-;lK3vefiex. l~is

63“
computed as (K – l)* NXPNYP + (J – l)*NXP +1, where NXPNYP = (NX + l)*(NY + 1) =
the number of vertices in a plane and NXP = (NX + 1) = the number of radial vertices.
When referencing the six neighboring cells to obtain cell-centered variables, we use sub-
scripts with the letter P for + and M for —, when necessary. Thus, we write
IMJK for (i – 1, j,k),
11 for (i +1, j,k),
IJMK for (i, j–1, k),
13 for (i, j + l,k),
IJKM for (i, j, k–l), and
18 for (i, j,k+l).
In vector loops that update the 8 vertices of a cell, such as for pressure accelerations
or the calculation of vertex masses, note that the sequence is always 6-7-5-8-2-3-1-4. This
is dictated by the rule that senior array elements must appear before junior array elements
in order to avoid vector dependencies of the results-not-ready or value-destroyed types.

D. Stora~e of Cell Data


For many applications, KIVA-11 can make heavy demands on computer storage.
Even with minimal cell resolution, three-dimensional calculations require several
thousand cells, and the multiple species and spray model capabilities add to the demand.
Because we operate today in a time-sharing environment, reasonably efficient use of com-
puter storage becomes imperative. Accordingly, we have equivalence as many storage
arrays as possible in KIVA-11. The idea is to retain quantities during a calculational cycle
only as long as they are needed, and then to reassign the available storage to other quanti-
ties. In this version of KIVA-11, the full calculational cycle requires 217 variables of sub-
script (i,j,k), plus species densities (12 arrays) and species masses (another 12 arrays). As
part of the equivalencing, the species densities and species masses share the same storage.
The final storage scheme requires 100 arrays rather than 241, a 59% reduction. Figure 12
shows the allocation of these 100 arrays. The ordering from left to right corresponds to the
sequence in which subroutines are called during a cycle. Reading down a particular
column, the appearance of a variable name signifies reference to it in the associated
subroutine.

E. Mesh Generation
Although the features in KIVA-11 provide a general capability, applications to inter-
nal combustion engine modeling were the principal reason for writing the program. With
this in mind, we have included an automated mesh generator in subroutine SETUP that
will create a usable 2-D or 3-D cylindrical grid for a wide variety of piston and head shapes
for both DISC and diesel engines. The generator requires the use of tabular information
as part of the input data.
64
SUB- I
\ RoUTINE 1 SSTWP VISC APROJ TIMSTP NEWCYC INJECT PN@mv mZAK coLIm ZVA?. WALL WM3CPL
I voLm!s PVLOUT P?’IND RZPACX. Bc– 2X2
\ ~Em.
i I TAmwT- F@PACX
\l DuPOUT
.AMAY - ‘, :
............................ .. .........................e- .....-m... - .. ... . .. . ...............

x x --------- x x x --------- .x-.. ---------------------------- -— ~— x-


Y Y --------- Y Y Y --------- f ---------------------------- . Y Y
z 74 --------- z z z z z
~_ -...:-. -.----;----::::::::::: “ z.
ti-
.
.. “c ---.------ -----z-- u-- U --------- Lr u !3 =----------- :
~. ------------ ----— v ./ — ------
v v
w w ------------------
g. ~.
--------- ~. _~, ?+ =---------- -w w
Ro Ro no. ------------------ r!o
=----------------- xo– --.---..- Ro RO ----------
VOL ------------------ VOL VOL
--------------------------- VOL VQL Vo%
p.
VOL.
--------------------------- --------- ----------- .----- .---------— p ----------
AK ANv ------------------ Arm ------------------------------------------------------------------
? T ------------------- ? ? --------- ? ----. ............. F. ~ p.
n’ --------------------------- Pv
~_ ::::::::: --=-.-::::::::::::::::::...;=..-.. 4P ~-
?ZNP &- m- .................. ----------
SIE ---------------------- ----- --------- ........------------------- SIE SIE ---------
2X5 ------------------ Txz -..---.-- Tm ........------------------- ---------------------
XT%B --------------------------- STAS ‘-------- ITAB ------------------------------------------------
JTAB ‘-------------------------- JTAB-
~&- ‘-------- .~~- ‘-------— --------------------------- .JTAB-
.XT3iE --------------------------- ......... =r’– ---------------------------
.........................-------------------- ........ . ... ...... ................................-
.................----------- -------------------------------------- ........--------------------- .s--
~- ..........-.--.. -.--.— ----- ----------------- w UN
w -------------- -------- -------------------- W.. w-
.w- ...........-------- .-— ---------------------
Bznw SUvw -------------------- --------------------------- Sk s%
SPD ..........................- Sm. ........- ..-------s-=-------- ...-.--– sFD- -------------------

1KVmrw ........................... Pnv ................ ... ... .... .. .............- Rxv Pnv
GAwxA--------------------------- GAmLA .-. ..--... -.-. -.----— .--- ......... GAtQ6A GAmIA ----------
izPs 23PS ------------------ laps --------- ms -----------------------------------------------
ALX ALK
........ .. . .. . . .. . ... . .. . .. . . . . .. .. ... .. .. .. . . .. .. ... ... AM ALY
--------------------------- -------------------- ---------
i?x . . . . . . . . . . . . . . . . . . . . . . . . . . . ----------------------- ...... APx APx
AsY,- ~r.
~- ---------------------------- ... ........ ................. APz A?Z
ABX ------------------ -..-------- &*— ~~ ,
ABY”
- ABY MY
ABZ -------------------------------------------------------- As?. .AB3.

E16
E17-
Els”

E22-
Z23
E24-
E23- SUN3 DUDX
E26 W?(2 12vDY
E27 CONQ DUDZ
E2S VAPX DVDX
ZNTnO DVDY
DVDZ
XL OWDX
Y21 WDY
ZL nimz
.--z------..--.--.– ?XL
=---e-----..-... --— mm
------------------ ?XB–
AUGNV

247
24s
!?49

2+2
Es]
TvrCN
-~– -------------------
TQTN
DSIEP -------------------
CAL
P.OM ------------ .— -—-.—
SIEN ------------------------ ------------------------ ------------------

E63 ‘TKSN --------- ---------------------------- ---------------------------- -—


M 4 EPs!/ --------- ----------------------------------------------------------

&J
slJa-
\ RoUTINE ! CNEN C56ENEQ PUOM Pco(iPL YSOLVE .ZXOIF PINIT PGRAD VSOLVZ TSOLVE
\ I (OR Bc YIT Bc (1.0) REsbw TINVRT
\ CNHCCM ) RESY sic Elc REST
\; APRoJ OROT
APJUY \I
......... . . . .. ................................................ ........ ........................
I
x -------------------- -------- x x x x x x ------------
Y I --------------------------- - Y Y Y Y Y Y ------------
z I ---------------------------- z Z z z ------------
u I---------------------------- U -------------- : -------.- U : ------------
v I ---------------------------- v -------------- v --------- v v ------------
I ---------------------------- w -------------- w --------- w 54 ------------
R!I IRo RO RO RO RO RO RO RO RO
VOL .........------------------- VOL VOL VOL ---~:------------- VOL VOL
P 1 .........- P ------------------------ -------- ---------- P
Anu .— ----- --------------------------- Ado AL ----:--------:---- Anw Awu
I
1? ? --------- ? r ? ? ? F r
: 1 --------------------------- Fw -------------- ......... ------------
TZHP IT=?TZ?I?ITZZ’SP --------- TENP T~P ------------: ------------- TEt5P
S1S! SIX -.------- SIE SIE SIE ---------------------------- SIE
I — ------------------------- TzCS -------------- TRS --------- mot ----------------------
1% — ------------------------- -------- ITAB ITAB ‘-------- ITAB ---------- ITAB
JTAS 1— ---------------------------------- JTAB JTAB --------- JTAB ---------- JTAB
KTAB I —.-— -------------------------- KTAB FiTAB --------- 3(TAB ---------- KTAB
PIT --------------------------- -------------------------------- PIT “ --------------------------- ----
PIT1 I— ------------------------------------- . . . . . . . . . . . . . . . . . .
------------------------------- PIT1
UN I-—-.......-—- UN ----------------------- UN .........-. .-.---- ..........------------
w I--—..--.....---- VN ----------------------- VN ............................------------
NW --. -... --- ......... NN ----------------------- WN ...........---------- .......------------
Suvw I------------------- Suvw Suvw -------------- SUV64 --------- Suvw ------------
SPD I ●m SPD --------- SPO SPD -------------------------------??!!--- SPD
El I--------------------- ------ Nv,Pnv -------------- R2tv .-...---- Rxv 3U4V ------------
E2 1------- CA2uA -------------------------------- GAMA GAsuA ..-.-..------------~- ,~~-
I.....-— ------------------ ZPS -------------- ---
rue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..-
:: I ----— -------------------------- - ALX ALx --------- A x
. . .
A x ------------
Es i -—.— --------------------- ---- ALY ALY --------- A ,Y A ,Y ------------
l!.s -- —— ---------------- ---------- ..-
AU ......... A .2 A ,2 ------------
m ,.----—-. ------------------------ AFx AFx ......... A x A ‘x ------------
n ,----— ---------------------------- AFY .-------- A ? A Y ------------
n .---— -------------------- -.------ AFZ AFz .-------- A ~z A ‘z ------------
Elo . ..--- —- . . . . . . . . ------------------ ABX ASS --------- A )% A lx ------------
Eil .- — ----------- -------------------- ABY ASY --------- 1 iY A IY ------------
I!12 .-------------------------- -------- ADZ ADZ . . . . . . ..- a M A 12 ------------
EC! CLI Cz.z CLI
E14 CLT CIJ . . . . . . ..- . . . . . . . . . --------- - CLZ
Zls CLK CLX . . . . . . . . -------------- ------ CLX
EILZ CFI CFI CFI
X17 CFJ CFJ ---------------------------- CFJ
Eln CFK C?K . . . . . . . . . . . . . ------- ------.- CFK
Z19 CBI cBI CBI
E20 CB2 CBJ . . . . . . . ..--. -.-. . . . . . . . . . . . . C5U
E21 CBK CBX ---------------------------- CBK
E22 FSUN14 ,RFSUM14 RFSU9S14 RFSUN14
E23 FSUN34,RFSUN34 RFSU3634 ------------------------- --- RFSUN34
E24 FSUM4 ,RFsUNS4 RFSUXB4 ---------------------------- RFSUN$4
X25 YSPWOUDX WDX
E26 YSPDWDY W9Y Cv
E27 DUDZ C4JDZR
Z28 XCENOVDX DVDX
SIETIL
X29 OVDY
YCEN DVDY
IE30 DVDZ
ZCS34 DVDZ
E31 D41DX C44DX
CVTERN
E32 04?DY c4mY
E33 C44DZ DWDZ
PHID PHID ......------------ PNID PHID
E34 ------------
E35 SNTHDF DISPTIL ------------------ DISPTIL
E36 SPD14, DYP14 TU14 Msu TZN14
E37 sPD34, DYP34 TSK34 Rssv TZM34
.s38 RU RU SPD84 ,DYP84 TE16S4 2WSW TZWS 4
RV RV HISP UTIL ---------------------- ------------------
E39 --------------------------- -------------
E40 RW RW SPNTIL VTIL
ENTHTIL NTIL ------------------------ ----------------
241
E42 00Y Rnvsu --------- Rnvsu RNvsu ------------
E43 Rzsuo Rzs
IZ44 3$%: LO Rs9vo ~sOLD
E45 DAM Rzswo ORSS
5246 RDRDY DRSSU RDRDT
X47 D!2LTAY DRZSV oTE14P
E48 TNZ14 DRZSW
TKZ34 PN PN ---------- PN
E49
Eso TKZ84 PNIP P!61P ----------------------
EPS14 UB ---.---..---
E51
E52 ZPS34 VB ------------
EPS84 WE ------------
lx)]
E54 DISSXP DISSIP
Hs ------------------- DuTOT DNToT DUHAT HTC
ES6 DVHAT ,VOLB VOLB
E57 ------------------- DSIEP DSIEP WHAT
OTNZP oTnP CPC --------------------------- - CPC
E5a
.-------. ---------. --------------------------------RON,~~IL --------------------------- - HTGI’IL
E59 ---------
E60 ---------. ---. ---. ---------------------------------SIEN,~IL I TTIL
E61 TKZTIL ----------------------------------------
E62 EPSTIL ‘---------------------------------------
E63 ------------ ------------------------------------------- ----------------- ----------------------------
E64 -----------------------------------------------------------------------------------------------------

Fig. 12. continued


66
---
\ ROUTINE i PSOLVZ PCMD PORAD
~i.t:
PNASEB. KZSOLY
~fi; ~.
PACCEL !?EzowE– V2Z2XS CCHXA xe%2FLx asp 5TxT-z-
‘.. ! X’22A4.:2.3}. (s:?! SCZ* 2C vem-
\ 1BC ,APRCLJ,BCFC UC “SC RZSE ,UCEPS BC.BCE2S.
... !CFxifm. FEXF3:7= J@R~– APRG!J L!=REsE= GIQ3u&
ARPAY\l MDP ,Rzs P WHZ ,P?IND

x i x x x x x --------- x x x x x ---------
Y Y Y Y Y. Y_ --------- y Y y. :– “_
.
-------- .
z z z z z z --------- z -------- -,
u u u u -----------
u u : -~--: --------: ---- : u ---------
v v v v -----------
v v
~. v ------------------ v v ----..---
% *. ,.
“ .“. -----------
w ------------------ ---------
w w
RO --------------------------- ----------- RO R~ RO RO
VOL I-----:-:: ----:::::::::::::::~: ---~-::-- .mL= ---------
Vcz VOL
P P P P P --??-- --:::::::::::::::::: ”-..::::-- P .-------- F P
AmlJ Anu ---------------------- ----------------------- Am- ---------
F. ~- ~- -.
F r- r . . . . . . . . . . . . . . . . . . r. ~. p. .
~- ~
~ FY ------------------------- . . . . . . . ------------- . ---------- ; Pv ---------
TEMP , --------------------------- -------------------------------- --------- --------- - ---------
TSMP_ TEKP
S1.2 ! ------------- BY*- . . . . . . . . . . . . . . . . . . . . . . . . . . . . --------- SIX --------- S1’S S1)3
1 TKE --------- ‘Tsz . . . . . . . --------------- ---- --------- T= ---------
I;~B I:~B ITAl! 1% --------- ITAB --------------------------- XTAS . . . . . . ..- ITAB ---------
JTAB I JTAB JTAB JTAB. --------- .~AB .--. - . . . . . . . . . . . ..=. ---.--— “y~— --------- JTXB– ---------
I(TAB XTAB 3(TAP. Q!&s --------- .&TAs - .-. --.-a .-a -—- ---------
PIT 1---------------------------- --- . . . . . . . . . . . . . . . . . . . . . . . . . . ..- .-. --. -.. -.-..— ---------- ~“ -------- -
Prm i------------------------------- P!X ---... --.. .-.-.-... --....-.. e --------------------------- hTI ---.-----
UN IUN ------------------ UN
VN I’m ------------------ VN
w. Nn ------------------ wl-
Suvn 1 Sbi Suvw Suvw 1-----.-- Euvu SUVN
~pD. --------- .SPD; SPU
SPD --------------------------- ---- SW -----------------------------=--------– SPD
XI P3w Sxv RIw -------------------------------------- ..------------_-- P31v nv, m ---------
n ROA)MA ‘----------------- RGNDLA ---------------------------------------------------- mamm ~-–
Z3 ---------------------------- ----------- EPS ------------------ -—--- me, SCL --------- me --.-.----
E4 Ala Au ALx ---------------------------- . . . . . . . . . .e.---..- 7$$.
X5, . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . —.-..
AxN AM I&Y Axx
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..- H-....- ~-
E6 ?&2 us. AL2
E7 APx -------------------------------------- .-------
E8 A?Y m. -------------------------------------- .-s.---- ASK
m A?z AFz . ------------------------------------- .-.----- An
E1O ABX Asx % . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ------.- Asx
Ell AEY ABY Am . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -------- Am
~z- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -------
=J.2- As% ASS– m.
~13. . . . . . . . . . . . . . . . . . . . . . . . . . . . ------------ CLX
El& .- . . ..-... ---= --------- G ----------------
Cxs
EIS --------------------------- ------------
CIX
E16 ---------------------------- ------------
CFI-
~~7 --------------------------- . . . . . . . ----- c~J:
EII --------------------------- ------------
C?x
E19 --------------------------- ------------ cm
E2G --------------------------- ------------ Cn.r
E21 -------------------- CBK
--------------------

Xo --------- Xo
E22 ---------------------------- R?SU)114 -----------

E23. ------- --------- ------------------- RFseM34- Y*. ---------– -----— W


20 --------- Zo
E24 --------------------- R?SUM4
-------------------

E25 UAL -------------------------------------------------------------- UAL


E26- Uh? --------------------------- ---------------------- .-.-.---—--- m3L
E27 Ins ...........................----------------------- ..-.---.-------
------------------ Xgmn .-.---.-
E2S
~23.
RPA
~-
RPA
Ycm --------1
. -------
E30 3UI,3WL0’T ZCLS 1
E31- Hs’P3@m- XL --------------------- XL ------------------- =
.s32. !!!.PMDT YL =-------------------— Yr4 ----------------=– =
........------------ ZL
E33
----------------------------------------
ZL
PHXD. FxL .. . . . . . . . PXL- ---------
E34
--------------------- .-------- Fxi ---------
E35 I
iii ---------
E36 UAU
VU33” Vou -------------------------- you” -------- I %%
E37 gxFx-
~*- s083E- ~--- ,-
23a: VKO16
Vnon
E39 ------------- UTXL
3!oSCL. !!no6– H160H–
E&o_ =------------- VTXL
E41 ------------- Wrxr&
ROS13EV SXO16 T’rsx
E42 Rnvsu NnYsu SxYsu NDp.ol! itoTxN TEPS
ROSCLV Fxvn zc3ioP
E43
Z44
E4S
F&su DRES
Rzsora
DRZS Im _-
ZNUCNP
UP
Fxw- iiosxl-
Ex6- RDXDK :eexz
?3m=
Z47 TXB66 WORK3
E4 n !X3DS–
E49 =N. =% n. I=N=
ESO R-UP PHIP PHIP Tlo184
D61DS
ESi ua- EPS>4
0s0s DSM
E52. VB EPS34 -------- I
DVOL-
EPS84
Es] WB PXI
E54 ------------------------------- DISSIP DISSIP
~x=
E55 ------------------------ ------- Nm RTzR3u””
ES 6 VOLB ------------------ VOLE RTZR31S s
E57 RXOVOLL RROVOLL
--------------------- t
i58–
~~~= --------------------- I
E60– ---------------------
E61 ------------------ ---------------------- TKETIL
E62 ------------------------ ---------------- EPSTIL
E63 ----------------------- ------------------ TKEN
E64 ----------------------------- ----------- EPSN

Fig. 12”. continued


67
1. The Piston Face. Given the dimensions of the desired piston geometry, the user
lays out a half cross section on graph paper, as shown in Fig. 13. At this point, one must
decide on the level of resolution available and, based on it, define grid points along the
piston silhouette, starting at the bowl axis and ending at the cylinder wall. The outline is
required to follow cell edges in the logical mesh and not cut diagonally across a cell. With
these points defined, it is a simple matter to create the input table. For each point, the
generator requires the logical coordinates (i and k) and the physical coordinates (r and Z)
in cm, relative to z = Obeing the lowest z-coordinate. In the input data, NPO is the num-
ber of points, and the coordinates are in the arrays IPO, KPO, RPO, and ZPO. In addition,
NUNIF specifies how many zones out from the centerline are to remain uniform in r from
the bottom of the mesh to the top (NUNIF z O). This feature allows one to maintain the
best possible resolution in the spray region. Figure 14 lists the tabular information asso-
ciated with Fig. 13. The mesh generator first assigns the vertices that have been specified
in the table, then places remaining vertices, those within the fluid region, at average posi-
tions of their neighbors. The averaging in the code uses equal-weight springs. If this is
found to create a less-than-optimum grid, it is a simple matter to modify the algorithm to
use unequal-weight springs to shrink or expand cells selectively in the piston bowl.

0
0 1 2 3 4 5
r (cm)

Fig. 13. Chamfered bowl piston silhouette showing grid points to be used by the auto-
matic mesh generator.
68
NPO 22
NLIJNIF c)
11 0.o- 0-.0-
2 i 0.28125 0.0
~-- ~.
3 i- 0.562?i
4 1 0.84375 0.0
5 1 1.125 0.0-
0.0
0.03
n 4-C
“.,,k~
0.275
0.5 Fig:M. (t’alml arinputda tacorresponding
0.90.
1.35 to Fig. i3:
!,8
2, 375
2.55
~.. ~.5-
3.3
10 9 3.4875 3.3
11 9 3.975 3.3
3.3
3.3
~.~.

Note that up to this point, we have been discussing.the geometry ina-pnrdy twcE
dirnensiimake.nse. In.fid, K.IVA-ILinitiallysets up only the j =- 1-a-zimuthalpkmei
treating. the mesh generation a-s-two-dimensional, Theni for-cylindrical meshes, theggrr-
erator-sirnply rotate~thisj = -1 confi~ation.do..ut.the.=is.t,a.c.reate the rwnaifiifig
azimuthal planes, j = 2t?m-oughj = lNYP: Figure-15-shows-the axisymmetric mesh that
results after rotation through 360°. Deactivated vertices lying entirely within the piston
are not drawn. For a 2-D geometry with cylindrical symmetry, only the j = 2 plane is
create.d ~yt,he rotation process=
Some piston&ti~s-have-an-off set-bowl in the piston face, not concentric with the
axis of”the cyiinder. ‘This is common iti diesei engines and represents a truly three-
dimensional geometry. Subroutine SETUP automatically allows this option, through the
-useof the quantity OFFSET in”the input ciata. If-OFFSET-= O~O;the result is.an axiiym:
metric geometry? .asin-the.example.j ust=discmxsed..If CWFS13.T.tiO .0, however, the bowl -is-
offset in the x-direction by thedistarw specified by the value ofOFFSS-T.
An example is shown in Fig. 16a, which shows a bowl offset – 0.546 cm from the cy-
linder midline. To setup this geometry, the user starts by pretending it is an axisymme-
tric confi=gwation, as in Fig.. 16b, ~d.supphefi.~~e..t~h~l~r.i~~~ti~~~.ba ..-*A
s- .nn.+be~-.a~.
.... .
justed dimensions. T%e axisynunetric layout-is shown ifi Fig. IT and-the. asso-cMaM.ata
~di&ed3n.~_g. .1-8, .SETUP-first creates a @din the same=~na-~~~~=-as~n-
the-previous
exampl~ then cheeks the value of~l%%%%. Because--0 l?FSET =- — 0.546, the bowl and
allvertices above it are displaced”to the left (negative x-direction) by this amount. The
_radiallines are then straightened-from the new center out to theeyiinder wall. I%extj x-
and y-coordinates between the bowi-lip and the cylinder wall are uniformly. distributed.
Figure 19 shows three views of the final mesh SIiUIIP creates.

69
,,,,,,,,,, ,,,, ,,,,,, !,,,, ,!, !,,,,,,,,,,,,,,,,,,,!!!

Fig. 15. The KIVA-11 computing mesh


created using the tabular data of
Fig. 14. The top view is a cross
section through the mesh; at the
bottom is a perspective view of the
grid, in which the fluid region is
outlined. NX = 13, NY = 16, and
NZ = 16.

,,,,
,,,

El

Fig. 16. (a) A piston cup with a bowl


offset 0.546 cm to the left.

I
I
(b) The user pretends that the
desired configuration is axi-
symrnetric and supplies the
offset as a separate
b parameter.

,,, ,,, ,,,,, ,, ,,,,,,,, ,,,,,,,,,,,,,,,,,1,,,

70
2

‘i

NPcl 28
NUN I F 0.
0.0 0.8
D. i 25 0-. !57-5
0.25. 0.425
0.375 0.325
0.5 o_. 22
~_=
O;-!=
0:75 0.09”
0.875 0.05
:.o~. ~ ; ~3-
1.125 0.01
1 ,S 0.0
1.5 0.02
1.75- 0.1
2.0 0.. 225_
2“. 25- v. 43=
2.4-75 0.75
2.563 1.0
2.604 1.35
2.836 1.35
3.068 1.35
3.301 1.35
~:. ~ ~ :’.s
3. m 1.35
~> CyJ& 4;.~+
4%23Q ;..Z
4. 463_ 1,-35
4.695 1.35
4-. SEz& i.35

Fig: 18. Tabular input data corresponding to Fi~.lJ’.

71
,,

Fig. 19. Perspective, overhead, and cross-sectional views of the KIVA-11 computing
mesh created from the tabular data of Fig. 15, with the bowl subsequently
offset. The mesh dimensions are NX = 20, NY = 24, and NZ = 20.

In the previous examples, the piston cups have been round, as are indeed most cup
designs in common use. Some designs, however, employ a square cup, the purpose being
to enhance turbulent mixing. A square cup option is included in the KIVA-11 mesh gener-
ator and requires a 90° sector geometry (JSECTR = 1, CYL = 1.0, THSECT = 90.0, and
OFFSET = 0.0). The example shown in Fig. 20 has NX = 13, NY = 12, and NZ = 20. It
was created using the input data listed in Fig. 21, which shows three additional variables:
. SQUARE = 1.0 indicates the square cup; SQUARE = O.0 for the round cups of
the previous examples.
. RCORNR is the radius of the corner in cm; at present we require RCORNR >0.
. NSTRT is the number of zones with straight sides before the corner radius
begins. A relationship between NY and NSTRT is implied, and the code checks to ensure
that NY – (2* NSTRT) z 1.
The mesh generator has been successfully applied to a wide variety of bowl designs.
In addition to the chamfered, Mexican-hat, and square bowls of the above examples, we
have modeled deep curved and reentrant bowls. The bowl volume is printed by SETUP as
a check for the user, along with the total mesh volume.
At the other extreme, a flat-topped piston is obtained by defining IWO = 1 and
ZPO = 0.0 for all tabular points. For a fixed Eulerian grid, input ATDC = – 180°,
SQUE3H = 0.0, and STROKE equal to the desired mesh height. (The result is the same
with ATDC = 0°, STROKE = 0.0, and SQUISH equal to the mesh height.) Unless
72
,,

,,,,,,

Fig. m Overhead~ front, and perspective


view~-of-a-sqgare-cup mesh. ~ne
mesh dimensions are NX = 13,
?Vx -_ ~~; ~1*~+~--=~~:
~~-~-—

NPO 24
NUN I F o
1 0.. Oreo. o_.CKX3Q.
; 1 0.3442 0. 0000“
3 1 0.6883 c .0000
~. ~ j-..~~~~- 0. Wof.f.
5 1
1.3767 0.0000
~ j
j ,72QB 0.0000
7 1
2.9650 0.0000
7 2Z Q650.. Q.. 3Qm-
7 32.0650 0.6160
7 42.0650 0.9240
7 52.0650 1.2320
7 ~~.Q650 i .5400
7 7~.. 0650 ! . e4E$o_
7 e2.0650 2.1560
7 Q~ . Q550 2-. 4640 Fig. 21. ‘I!aMax.input.data.for. the-square-
7 10 2.0650 2.7?20 cup example of Fig. 20.
7 11 Z-AQE5Q. 24 OfQ)_
8- I I2-.27-15- 3.0800
9- 11 2“. 47%0 3.0800
10. 11 2_u_l@_ -3_ clsocl
11 It 3.3040 3.0800
?2 ~: 2-.7t7o 3 i 0s00
13 11 3.9235 3.0800
14 11 4.1300 3.0800
modified by the user, the generator will create uniform SZ’S. The result is a simple cylin-
der, which is also useful for other purposes besides engine applications. The piston motion
may be turned off to maintain the fixed grid simply by setting RPM = O.0 in the input
data. This will also automatically turn off the swirl, because the swirl ratio is defined as
the ratio of air r.p.m. to crankshaft r.p.m. If a swirl is desired in an RPM = 0.0 case, the
user will have to patch the ANGVEL statement in subroutine SETUP. A nonzero value of
OFFSET can be used with a flat-topped piston if one wishes to place the axis of rotation to
one side of the axis of the cylinder. Thus, all planes would have an appearance similar to
that illustrated in the overhead view of Fig. 19.
The simple plane coordinates (CYL = 0.0) meshes shown in Fig. 9 are also created
automatically. In 2-D, the j = 2 plane is identical to the j = 1 plane, but is at depth Sy (DY
in the input data) behind the j = 1 (y = 0.0) plane. In 3-D, the j planes behind the j = 1
plane have uniform tiy (DY in the input data). This may be easily overridden if nonuni-
form tiy’s are desired.
2. The Cylinder Head. Analogous to the definition of a piston silhouette, the
generator uses tabular input data when the cylinder head is not perfectly flat. In the in-
put data, NHO is the number of points in the head outline data, again starting at the axis
and ending at the cylinder wall. The limiting case is, of course, the flat head, as in the pre-
vious examples. Here the use specifies NHO = O, with no further mesh generation data
required after the NHO line.
For a nonflat head, NHO >0, and the coordinates are in the arrays IHO, KHO,
RHO, and ZHO. ZHO is relative to a value of zero at the lowest point. The head shape,
typically a dome, maybe cylindrically symmetric, ellipsoidal, or semi-ellipsoidal when
viewed from above. In addition, the dome maybe offset, again using OFFSET in the input
data. If NHO >0, the head is offset rather than the piston bowl, if a bowl exists.
An example that uses all of these features is the mesh shown in Fig. 22. Let us
examine the sequence of steps in its creation. First, the piston silhouette is defined, as
discussed in the previous section. This is a simple cylindrically symmetric shape with a
slightly arched top, as illustrated in the bottom of Fig. 23. The first set of 11 tabular lines
in Fig. 24 provide the definition. If we were done, the mesh would appear as shown in
Fig. 25a. Second, the basic head shape supplied to the code neglects for the moment offset
and ellipsoidal adjustments. This starting profile, drawn at the top of Fig. 23, and entered
as the set of 17 lines following NHO in Fig. 24, modifies the mesh to the appearance shown
in Fig. 25b. Third, the head is offset 1.20 cm to the left, specified by OFFSET = – 1.20 in
the input file (Fig. 25c). Finally, the head dome is made semi-ellipsoidal. Whenever
NHO >0, NEO must be specified. If NEO = O, no tabular data follow, and the head defi-
nition would be complete. Otherwise, NEO is the number of ellipsoidal or semi-ellipsoidal

74
k-pianes in the dome. The four columns-of tabular. infcmmatian.that.fcdlow. MEO-.are-the.
tirays.lSC.~R;~-X;.SE~MJ~ and EH3MINIFKlNCX-VtKisthe index-of the correspond--
ing line in the NHO table. For a perfect ellipse both left and right; the value of IEMAX.is
zero, using the semi-major (SEMINJ) and semi-minor (SEMIMN) axes specified at that
ievei: Points along the.ellipse.are. determinexLhy. their. intersection. with.eachradial~ -id
line in turn, which origjnate at the ellipse center. If IEMAX = 1,.as in this example, the.
co-de again creates a perfect eilipse on the left, but on the right chooses the shorter of”the
ellipse distance and a eirc-’ular arc ‘.vhos~radius-is-theRxHO -atthatlk-ievel. ‘This ensures
that the ellipsoid on the left will smoothly join the circular arc on the right, as evident in
the overhead”view of Fig. 22. The final mesh is also shown in-the m=-timofl-Fig..Md.

Fig. 22. Perspective views o~a K1l-A-H”mesh with a domed head: An overhead view is
drown at.the lowerleft, aml a c-ut with pkmesj ~~
= 11 through j = 16 removed at
the lower right. The mesh dimensions are NX = 10, NY = 16, andNZ= I-6..

75
5

0
o 1 2 3 4 5
2

1
N

0
0 1 2 3 4 5

r (cm)

Fig. 23. Grid points used by the mesh generator for the mesh of Fig. 22.

F. Cell and Vertex Flags


In many engine applications, of which the examples in the preceding section are
typical, a number of cells are deactivated, as they lie entirely within the piston or the
head. In order that calculational DO loops may easily recognize such ‘fobstacle” cells, in
addition to the ‘tghost” cells in the i = NXP, j = NYP, and k = NZP planes, we use a cell
flagging scheme. Cells with F = 0.0 are deactivated, whereas cells with F = 1.0 partici-
pate as fluid cells. In a vectorized DO loop over all cells (e.g., Do 1014 = 1, IJKVEC),
F(14) is used as a coefficient, thus permitting vectorization, as no testing is required.
SETUP also defines a set of vertex flags FV. Analogous to the cell flags, FV = 0.0
describes a vertex lying entirely within an obstacle, and FV >0.0 describes a fluid vertex.
Used in the automatic mesh generator and retained for use thereafter are unique flags for
each of the following possible cases:
FV = FLFACE = 1.0 for all vertices on the piston face,
FV = FLBOWL = 2.0 for bowl vertices not on the piston face,

76
*1
o
0:0 0.86
0.5 0.84
%-.Q 0:87
0.77
;:: 0.71
~,~ ~ ~&-.

3.ct 0.54
3.5. 0.42
4.0 D. 29
4.5 0.16
5.0 0.0

::0 ~,o~
~,~~
e . 3-3-
(-). ~? 4.00
q. ~a. 3—, 95
1.20 3.90
1.50 3.75
1.8s2 ~.~~
2.20 3.00
2.55 2.50
~: ~5-
2:00
2.55. i .32-
2:63: 0..64.
3.18 0.54
3.66 0.42
4.05. 0.29.
4.50 0. ?6
5.0 0.0
i4-
0.33 0.33
0.67 0.67
0.94 0.84
1.20 1.00
1.50 1.20
%.80 1.50
2.20 1.80
2.48 1.95
2.68 2.00
2,93 2.00
~., ~o:
3.i6

Fig. 24. Tabular input data for the mesh of Fig. 22.

-, - -,--
FV = l?hQbH = S.0 for all-of”sqgisfi region above the piston,
FV = FLDONIE = 4.O.for.vm~icesuwithin the head.volume butnoton the head, a-rid
FV = F-LIEEA-D’= 5:0 fonetiices-on-the- head surface itself.
In a vectorized-DO- loop over all vertices .(e.g., D-O 1014- = 1, IJKALL), CV-MG- statements
are used “that embody FV-information in such a way as to ensure that deactivated vertices
have ml effed. .

G. Fuel Sprays

T-he fuel spray injection model in ~WrA-~is Siifficientiy ~e”lm~d] “~b~:a- wicie.variet.y
of engine injectors or continuous sprays maybe specified through input data alone. For
many users, subroutine INJECT should require no modification. Features of the injection
~mod&l=i~mi-u&-a-multiple-ormultihole nozzle capability, with continuous or puised hollow
cone or solid cone sprays whose origin, profile, and orientation are easily specified. Pulsed
sprays ray be sinusxkla-1; ~qu~r~~+ave; or-be swpplied -with a tabula~-~elocit y-~ofiie-
a~ptiate-for=hoi e-type nozzle injectors. Either a fixed “particie radius or a distribution
of~adiimay. heinjec.ted..

77
,,,,,,,
,,

a) b)

,,,
!!,,,,,,,,,,,

c) d)

Fig.25. The fourstages inthegeneration of themeshin Fig.22:


(a) The original mesh with an arched piston top,
(b) The addition of a domed head,
(c) The offset of the domed head,
(d) The adjustment of the head shape to a semi-ellipsoidal form, when viewed
from above.

These features are now discussed in detail.


1. Spray Oritin, Profile, and Orientation. (See Fig. 26.) The input quantity
NUMNOZ specifies the number of spray nozzles (1 to 12). For each nozzle, the radius in cm
to its location is specified by DRNOZ, measured from (XO,YO), which is the cylinder axis,
or in the case of a planar mesh, the front-left-bottom corner of the mesh. The azimuthal
rotation in degrees is given by DTHNOZ, measured counterclockwise from the y = Oline.
DZNOZ, in cm, locates the nozzle in the axial direction. If DZNOZ <0, it is interpreted as
a distance below the topmost point of the head. This is generally appropriate for engine
applications. IF DZNOZ >0, it is interpreted as a distance above Z(l). This is the
appropriate choice for a spray in a fixed mesh, such as a spray combustor or burner.
In order for momentum exchanges with vertices to take place properly, subroutine
INJECT ensures that the spray is at least one half cell out radially from the axis in sector

78
I
-—
* x.
-Dzw
I\
I /“ \

I
I
I
!. .

+.
_TH.Tx2 “\x z

~.
Y /“
~.

t.

XY
II

l?ig: 26. The input quantities DRNOZ, DTHNOZj and D-ZNOZiocate each spray nozzle;
TIUIXY and TIITXZ-define the spray axis in 3-D-space; C“ONE and DCONE
ail~lv=for=hollaw cone or-solid %mesqways

meshes-a-rid either at least a half mll below=the topmost-poird-ofthe head or a iiaifcell


above Z“(1) .
CONE, 13CONE, TILTXZ, and TILTXY, all supplied in degrees, define the profile
and orientation of each spray jet. CONE and DCONE provide either a hollow cone spray
or a solid cone or pencil spray. C.ONE is-the.meanmmeangle for hollow-~cne Spraysj and
DCO.NEis.fte thick-ness of the spray. If CON-E ii+input identically equai to DC!ONE, a
sol.ickpray results.
“The orientation of the-spray axis fiireaeh nozzle is defined by TILT-XZ and’HLTXY,
where TIL’ITXZ gives the x-direction inclination from vertical in the x-z plane and
TWTXY- specifi~=stire-mtation-ofi”he-spray axis in the x-y pl”ane. A-swit-hlYI133WUZ~
‘TH-f17X-Y
is .measuredcoMterc16 ck-wi&e~rom the positive x-axis.. In the ease-of’ a-seetor
mesh with .NY =13 the model assumes- thatthe spray jetis azirnuthally -centered-in the
half-degree sector; by enforcing TILTXY = THS13CYT/2:
x_ !$EyI!3Qw13efimiti-a~-. Sev~ral input quan tities~-baraetw~zethe-k~o;w The
quantity PULSE differentiates between continuonsanc@lse.ay. injection. PULSE =
7+
0.0 is used for a continuous spray, for which TSPMAS is the mass flow rate in g/s, and
TNPARC is the number of computational particles injected per second. Alternatively,
PULSE >0 defines a pulsed spray, for which TSPM-AS is the total mass in grams to be
injected, and TNPARC is the total number of computational particles to be injected.
Clearly, the accuracy of the spray model improves as the number of computational
particles is increased, but the code can be significantly slowed down, especially by the par-
ticle collision subroutine. The code automatically calculates the mass per computational
particle to ensure that the correct total mass or mass flow rate is injected regardless of the
choice for TNPARC, which is governed solely by computer time and storage constraints.
Some typical values for TNPARC that we have used in engine calculations are 500-1000
(2-D) and 2000-5000 (3-D). For a continuous spray, we typically inject TNPARC =
40000/s. Because of evaporation and an outflow boundary, particles are continuously
being destroyed, so that we can get by with a dimension NPAR of only 5000 for the
particle storage arrays.
Computational particles are injected with speed VELINJ cm/s, and the angular
distribution of particle velocities is uniform within the internal DCONE. The density of
the fuel in g/cc is supplied as RHOP, and TPI is the fuel temperature in Kelvin. Particles
are moved in subroutine PMOVTV, which will also add the effects of turbulent velocity
fluctuations ifTURB = 1.0.
Three types of pulsed sprays are available: PULSE = 1.0 defines a spray whose
mass is injected in a single half sine-wave pulse. PULSE = 2.0 defines a spray whose
mass is injected in a single square-wave pulse. PULSE = 3.0 defines a pulse whose veloc-
ity profile is supplied by VELINJ, which here is a table of NUMVEL (up to 100) entries.
For this case, subroutine RINPUT calculates the total fuel mass predicted by the velocity
table, using the sums of the nozzle areas ANOZ( ), and corrects the velocity profile up or
down by the ratio of mass desired to mass predicted. This case is appropriate for hole-type
nozzle injectors, rather than pintle nozzles, as the nozzle areas at present are assumed to
remain constant with time.
For the cases PULSE =0.0, 1.0, or 2.0, however, NUMVEL should be 1, the velocity
being assumed constant at VELINJ(l),. (A comment in subroutine INJECT lists a one-
line modification to allow the sinusoidal case to have a sinusoidal velocity profile, in
addition to the mass profile.) In addition, ANOZ( ) can be input simply as 1.0 for these
three cases.
Injection commences at crank angle CAIINJ and has a duration of CADINJ degrees.
CAIINJ is given in degrees ATDC, and hence usually has a negative value. Injection may
also be controlled in terms of problem time, which is more convenient for continuous sprays
and other nonengine applications. In this case, the appropriate starting time and dura-

80
tion are supplied as TIINJ and TDINJ. For a continuous spray, TDINJ should be set to m.
A-negative value for TIINJ-inciicates to the code that CAIINiTand-CADINJ are to be used
instead;
3: Par&4e-Radius. E-ith-eradistrfuutio~rof-patiicle- radii (INJ131ST-= I) or
particles-of a fixed radius (INJDIST = 0) maybe injected. ‘When a drop size distribution is
spacified, we sample randmnly from a--dis~ribation abeutthe-Sautermean-radiusiS?tiR),
inputin-crm T-hedistltiktiom-is –pattemed after experimentally o’bserved “data and “is
described in AppendixJl.
In the c-ase o&FIxed raditisj tlievaltie supplied:i-mder-the nme&ltiRisinteW
_reted
as the fixed nozzle radius, in cm. The aerodynamic breakup model shoultie.~-wd.
(BREAKU.P = 1.0) .to.crAaa~&rum-of.tim%.ti.@.t~..kreskup .nmdd.&appsops:-
ate in general for both the INJDIST = 1 and INJDIST = Ooptions. AMTO is the initial
amplitude of droplet oscillation at the injector, based upon a Weber-numbex.eetimate.
After injection, the particle size is.reducecWy-break~ M3113EAKIJP = 1-.0,and
through evaporation, if EVAPP = 1.0. Liquid fuel particles disappear as they. evaporate,
as sukirouti-ne REIPACKdestroys any. particle~who~-mass falls below- 10-3 of.the .massaf
an injected particle. Conversely, particle size increases through coalescence from colli-
sions, if IH31.iI13E-==1. Particles-are splitin REPA-CK into two identitai particles, each
with fiaifthe number of’droplets, if”tlieir mass grows to twice the mass of an injected
particle.
4. Stochastic In.iection. When using the large timesteps possible in K.IVA-11, the
tendency iS to inject in bursts, resuiting”in discrete clumps ofiomputational particles.
T=heseclumps-ma-y=then mav~ma~e -than o~e-e~ll pereyc}e; causing-
armmevmr coupiir~-g-
with the mesh cells and vertices along the particle path.
‘Ihnitigaiat.hissource of.computational inaccuracy, .KW.4-11 injects-eswh particle at
some random point along the particle trajectory behind the injector. The particles are
then immediately moved forward in subroutine PMOVTV to.their.effective initial hma.
tions. This stochastic injection offers a smoother and more uniform particle distribution,
resulting in .improveci “coupling- wit-hthe-mesh j and better- statistiVw‘Whefi=spiay.Wdrticle
---
positions and radii are averaged over time.

H. Spark Ignition
Spark i~ition is provided by a special energy depositionat.the .end-of.the kinetic
chemistry mI’broutirm-CHEMT Tiie i~ition window is specified either by crank angle
(CAIIGN to C.ZWIGN-+ C“ADIGN) or problem time (TTIGN- to TIIG-N + TDIG-N), “in a
manner analogous-to th~=pedieation of the injeetion -window discussed-above: During
ignitio~ the spedlc internal emxgy in *&.e-
specified ign~tio~.cell(s) is increased by a
factor of (1.0 + XIGNIT*DT) on.each.timestep. If-the temperature in the ignition cell(s)
~~
reaches 1600 K before the end of the ignition window, as it ordinarily does, then the spe-
cial energy deposition is terminated at that point. The ignition cell(s) are specified in the
input data as the DO-loop range defined by llGNL(l) to llGNR(l), J_IGNF(l) to JIGND(l),
and KIGNB(l) to KIGNT(l). This allows the choice of a single cell or a block of cells. If
JIGNF(l) = 1 and J_IGND(l) = NY, ring ignition will result in a 3-D cylindrical run.
Dual ignition is an optional feature, as a second ignition region may be specified by
setting IIGNL(2), IIGNR(2), JIGNF(2), JIGND(2), KIGNB(2), and KIGNT(2) to nonzero
values.
Spark ignition in our UPS-292-SC engine calculations was accomplished in a
unique manner. In the UPS engine, a pencil spray of fuel impinges on a spark plug which
commences firing when the spray starts and continues firing for 35 crank angle degrees.
Our procedure was to not allow fuel and oxygen to coexist in the cells containing the spark
plug tip during the 35° period. Each cycle, any available fuel or oxygen was consumed
through direct conversion to COZ and HzO in accordance with the oxidation reaction, with
appropriate heat release. While quite satisfactory, this procedure is applicable only in
such specialized circumstances and would be totally inappropriate in more general appli-
cations in which the fuel has experienced significant evaporation and premixing prior to
ignition.

I. Initial Bessel Function Swirl Profile


Internal combustion engines are designed to impart a significant amount of swirl in
the incoming air, to aid in turbulent mixing and enhance combustion efficiency. The
simplest model assumes that the swirl velocity has a wheel-flow profile, but this is not
usually a realistic assumption, as the turbulent wall boundary layer forces the swirl
velocity to decrease in the wall region. From experimental observation, modelers have
determined that a Bessel function profile more accurately represents the flow.
Figure 27 illustrates the Bessel function velocity profile provided in KIVA-11 and
compares it with wheel flow for the same swirl number. The quantity a (input as
SWIPRO) is a dimensionless constant that defines the initial azimuthal velocity profile
and lies between 0.0 (the wheel flow limit) and 3.83 (zero velocity at the wall). A value
suggested by Wahiduzzaman and Ferguson 58 for typical engine applications is about 3.11.
We define our Bessel function profile to give the same angular momentum as wheel flow
with the same swirl number. Thus the initial slope of the a = 3.11 curve is necessarily
higher than the corresponding slope for wheel flow.
A second input quantity, SWIRL, is the initial swirl ratio of air r.p.m. to crankshaft
r.p.m. When viewed from above, the swirl is clockwise if SWIRL >0 and counterclock-
wise if SWIRL <0.

82
h ;. :. :. :. :. :. :.
,- 1- V=Z513
a=3.11
(~4339)= –—. ,.,
I / \ i ,a,,..’.’
j.s!A!iRL= ‘- ..: ,-/
~~~-si~o~ I.
/- ,..,’><
/
,:.- \
~~$o+.:’’””.’.’”. \
/ *?.+!,:,:’”’..
q,,,:=.
...
/ ,.,.
,/ ,.,
1.
...

... ,.,.&;3;3--.\_
/’
/

.Y’ (vm=762j” “\
../! ./ \
\%
\

V=O.90
O+Q M- 0’2 03 M- cm 0.6- o.?- 0.8- CM- !.0

#R=

Fig. 2’7. B-essel-function swirl velocity profile provided in KIVA-11 setup,

J. Fuel Library
“Tile release version o~KIIVA-H”assumes that 12-chemical-species are present, al-
though .thi~ number can .be increased Or deerea-sed as-needed. T%e12speeies, appropriate
ifma varie~-ufmmbustionapplicatiolm; arc-l--=fuel, 2 = 02, 3“ = N2, 4- = C-G-2,5 = E2GY
6=-H- Y = H7, 8 = c); 9 = It, io. = OH; _W= C33.andIZ= ND-..T.he sample input data
deck=c;ntains kinetic and equilibrium e-hemis~ry data-that correspond to these- Uspeeies.
Enthalpy tables are required for all species, and because species 2-12 have been defined,
enthalpies for them are provideiLhdlATTA&a@nents in.subroutine IUNPUT..
~ ., which requires a-number ofother- prop-
What remains is to define the fuel, specie~.1
erties in addition to its enthalpy. For this purpose, KIVA-11 contains a library of the
m... a ~.. — .
thermop.hysicai’plwpel%i~s-of~~’c~-on- hydro-carbon fuek, emboded in J31AU~K KJ-ll”-A
FUELIB. At present, the 12 fuel choices are
methane (CH~),
propane (C3~s),
n-heptane (C7H16),
n-octane (C8H18),
n-dodecane (C12H2G),
~=$~:~~.~fi~ (~ ~&f2x);
n-tetradecane (C14H30),
n-hexadecane (C16H34),

83
acetylene (C2H2),
ethylene (C2H4),
benzene (C6H6),
and diesel fuel (DF2).

To select from this list, the user supplies the fuel formula as a mnemonic in the input data.
Subroutine RINPUT then calls FUEL, which performs the following steps:
1) The fuel formula is correlated with an entry in a tabular set of mnemonics, to verify
that the requested fuel is one of the 12 available and simultaneously to obtain an
index for accessing the data associated with that particular fuel.
2) The fuel enthalpy table is loaded.
3) The molecular weight, critical temperature, and heat of formation are defined for
the fuel.
4) If the fuel is normally gaseous (methane, propane, acetylene, or ethylene), the input
flags for parcel evaporation, collisions, and breakup (EVAPP, KOLIDE, and
BREAKUP) are checked. If they are all off, FUEL has completed its task and control
returns to RINPUT. If any of the three flags is on, the run is terminated with a mes-
sage that the input data are inconsistent.
5 If the fuel is a liquid, several more quantities are set. These are the tables of liquid
latent heat of vaporization and liquid vapor pressure, for use in droplet evaporation,
along with a table of liquid viscosity, for use in droplet breakup. In addition, the
slope and y-intercept of the surface tension vs temperature linear fit are defined.
These are based on the surface tension at 350 K, which is a typical fuel temperature,
and the critical temperature of the fuel. These are used in the surface tension linear
fits in droplet collisions and breakup. Finally, the coefficient for fuel diffusivity in
air is set, for use in droplet evaporation.
The tabular information in FUELIB has been drawn from a number of
sources.ss~sl-ss~sg
In several cases, these sources do not contain suffkient data to complete
the tables at one end or the other of the temperature range. This is true at the low temper-
ature end for some of the latent heat tables, and at the high temperature end for some of
the liquid viscosity tables. The comment lines in FUELIB identify the sources of the
various tabular data and note where extrapolations from published data were made in
order to complete the tables.
The user should thus be aware that development of the library for less-completely
documented fuels is an ongoing project. Contributions would be welcomed for inclusion in
future code versions, both for improving the data for the existing 12 fuels and for fuels not
presently included.

84
Thefinal consideration concerning fuel”is its inciusion in.akine-tic.chemical reaction.
To accomplish this, the user must supply an appropriate input data set; as required for
each kinetic reaction. The data set is comprised of forward and backward pre-exponential
fac.tm~,.activation temperatures and temperature expommts~ akmg with stoiehiometric
species coefT12ients on the left and=right sides of the reaction and exponents of species
mneentraiion -in-bath-the -forward -and-baekwa~d-~-=tes-o-fthe-reattion. Kinetic chemistry
idismsse-d:in -detail in .Appendix-I;

K“. Inrlow and outflow Boundaries


Some engine and rmnengine applications-have geometries thatrequire useof-irdlow-
and outflow bmmdaries, Acwrdingj:y, ‘we-l~ave-provided-in
~low and-out~lo.w-o~~~n-s.me-a-
type that may be.encounterexL. ~Input..~ag.B.O-T.IN-= LO, .tlm entire bottom !mundary of
the mesh is an inflow boundary. If BOTIN = 0.0, then a rigid wall is used for the bottom
boundary. At the inflow boundary the normal velocity WIN is specified. Either one, or
both, of”the ri~ht and.to.p tmun&u&s oiltke.mesh may- be outflow- boundaries. Input flag
RTOUT controls the right boundary specification, -with .RTOUT = 1..0denotingoutflow
and RTOtTT= 0.0 denoting a rigid wail. ‘The boundary lies between the I = NX and
1= NXP-planes of”cells. Input fIag TOPOUT performs an analogous role for the top bound-
ary, ‘whiell is the imundlwy betwe-emthe-K- —-lti~’and-.~= ~Y27P
p~anes. A-toutflow bound-
aries, the pressure is speci~~ed “to ‘be 1npul v.ahe F51h!H3. A!t kth. lWIUnd-a-rkSj we assIwme
the flbw.is subsonic. We now-descr~be the inflow and outflow options ii-detail; telhvhat-
subroutines-are modified -t-ail~eu~umte-them; amd-tell how they may be modified “for
superson ic-~fbva. A-lthm@tie._~hw..am.&~.u.tllaw.o .-~ ..--.%. -->
nthn~ a w –--L ..-. 1i
r.a.thQ.R.. .... “W.A,.i ~.;S..he~~
n-.iid
~~at ~~eycan be used ~s-a ~ide-t~ in~~rporating
-. boundaries -withdifferentflocatic}ns-amd-.
different conditions.
in.additiim to the-normd.velcxity WIN j at in flowboundaries -wespeeify referene~
speeies-,mass densities SPDINTO(M))specific turbulent kinetic energy TKEAM.B, and tur-
bulence length scale SCLAMB ( - k3’2/e). The reference densities are at reference pressure
EWNH3;-the valties that- are actually imposed at.thsinflow boundary are obtaine~crrm-

Ifyanlb
SPDfN(M) = SPDINO(M) [P/PAMB) ,

where P is the computed pressur~.in.the.cell .with .-Kindex .equal to one immediately abov+
the inflow cell and Yambis the ratio of specific heats of the inflow mixture. Thus at an in-
flow. hrmndary. we are imposingthe species .mass-fractions-a-nd th~tropy of the.inmrning.
fl-tichncLoM.aining. the .pressure-by-extr.apolation zmd the derwiticx-fram an isentropieg~s -
equation of state. The inflow internal energies are obtained from pressure P and densities
SPDIN(M) using the-equations-of state (10) and”(l13. One ififl-ow tangentitil-velocity com-
85
ponent is specified and the other is calculated. In cyl ndrical mesh geometries, the azi-
muthal or swirl component is specified to be zero. In planar geometries, the y-component
of the velocity is specified to be zero.
We note here that the values SPDIN are used for computing mass fluxes but are not
used to compute diffusive fluxes at the inflow. In fact, the diffusive fluxes of all cell-
centered quantities are taken to be zero at the inflow boundary. This will introduce little
error if the Peclet numbers, which give the ratios of the convective to diffusive fluxes, are
greater than unity. If this condition is not satisfied, then the appropriate coding changes
should be made to calculate diffusive fluxes at the inflow boundary.
The above inflow boundary assumes subsonic flow. If the flow is supersonic, then all
thermodynamic conditions and all three components of the velocity should be specified.
At the outflow boundary, the pressure PAMB is specified a distance DISTAMB out-
side the outflow boundary. This is accomplished in the following manner. For a regular
cell face a that lies on the outflow boundary, one of the faces y of cell-face control volume a
also lies on the outflow boundary. In differencing Eq. (86) to find (uA)a}3, we take the
pressure on cell face y to be

&/2 . PAMB + D[SY’AMB . [@ppB + (1 – @p)pnlLjk


p=. . ,
fid2 + DISTA MI]

where 6Z = V~k j IAal and cell (i,.j,k) is the interior cell containing face a. When
DISTAMB = O, this gives p = PAMB. This is a true specified pressure condition, which
unfortunately reflects acoustic waves perfectly and can affect the upstream flow in sub-
sonic calculations. Taking DISTAMB to be a characteristic dimension of the computation-
al region greatly reduces acoustic wave reflection at the outflow boundary. This also al-
lows more rapid convergence when computing steady state flows, by reducing the problem
time required to reach steady state. In addition to the above pressure specification, to im-
plement an outflow boundary we set the vertex velocities equal to those one vertex in from
the boundary: u~,j,~~}~ = u~,j,~~ at an outflow boundary across the top, and u~x~j,k =

ujvx,j,k at an outflow boundary across the right. We also use donor cell differencing to
compute outflow convective fluxes.
When the flow at the outflow boundary is directed out of the computational region,
no further specifications are needed. Occasionally, however, the pressure condition will
generate velocities directed into the computational mesh. When thi#’dccurs, it is also nec-
essary to prescribe the mass fractions, entropy, turbulent kinetic energy, and turbulent
length scale of the incoming fluid. This is accomplished through input reference species
densities SPDAMB(M), referenced to pressure PAMB. The inflow densities and internal

86
energy are then found in a manner analogous to that used at the inflow boundary.
( The.
infIow turbulence quantities are taken to be TKEA-MB and SCLA”MB.
No nmdificzitiorrof-this-outfiowtxmndary treatment is required “when the flow IS
siipersonic.- Although-sW-cification- of-the pressure is incorrect in this case, the errors
incurred by this specification.wi llmcd+uqmgate upstream in -the supersonic flow.
.Anumberofsubroutin~-aremodified to allow fortlw inflow anchutflow-options.
Vertex and cell face.velo.cities .are.prescribed in subroutinesBCa-milMl&G... Sin~.-s isnot.
specified near inflow or outflow bom-dariesusing Eq. (53), this specification mustbe-dis-
abled in subroutines BCEPS and 13CR13SE. Similarly, law-of-the-wall velocity and tem-
perature conditions siiouid’fie diisabled””insubrouti-ne LA-WALL. Convective fluxes are
modifTed-in subroutine C-CFLUX~ and the pressure is specified at the outflow boundary in
subroutines PEXDIF and R13SP. In making any modifications for inflow or outflow
b-mndnries; the-user shouktconsider tlie~.subrcmti-nes carefiuiTj-and use the existingcade
asa.gy~ide.
1-
d.
Qu@Jt

Monitor prints are produced on the user’s.remote.terminal jQur-unit 59) atleast


e~e..y. 25th cycle. The variables -~J.4-Dprints-a~~listd
( in subroutines NETvV-CW aniF
cp~~~~qy.
I
In ~d& tio~i in formatiol~a] -an~errormessages are always Sent to the USer’S
terminal. Except for the above, all ‘KIVA-11 output-is wri tten .tofile PLC)T.,which can be
scanned on a CRT-equipped terminal mderdisposed to the opera-ting system to be proc-
essed” onto microfiche. A fbur-line monitor print is written on PLOT every. cycle, inaddi,
ticm h-copies-of any messages sent to the remote terminal.
Numerical cell data are opticma]-]y a-va;lable, being-producedo niyif.the-in~t.fl-ag
llP*R = 1. The ‘v$%H% statementstin-subroutine LNGFTTI’ indicate the variabies listed;
whiclh may. eas~1~.‘bech smge&. 13&eausemi.thevast~a~naunt=of:num’~ers-a .multi dimensional
~mdepmduces$ we almost alwa-y-s-setLPR = Oand rely on-plots, excephvhen-d-ebugging.
,

Even then, an interactive debugging utility is generally more useful than a blanket cell.
pri~3*.bWawse=tiw-=d&i3
itiy-c=n-print seieete& mir.nkrsrat the user% termi-nai’ at any iksireci
point in the calculation.
GiaphiEs-are-tfie- mostusefu] form of”out_p=ut,
and “information for computer-
generated’plbts % ako -written-to filii PHYIT. ‘TIIis-is-ibllowe dbya short summary of
system totals, -computed by-subroutine-GLOBAL.
S-ubrouti-ne FIJIXJUT is responsible for callin~the.variousgdot.and-print.submu-
tines. Output is automatically. provided for cycles Oand 1, and thereafter at cyclic inter-
vais (NCFIL-Ni).~time intervals (TWPLT), or crank angle fi.terv.al~
--------
(CA FILM), as specified-.
irr the input data.

87
KIVA-11 can provide three different types of plots -- zone and spray, velocity vector,
and contour. The first set of zone plots are simple two-dimensional views through (x-z)
plane j = 1 and the opposite (or closest to opposite) j plane if 3-D. The first plot is a mesh
cross section that shows all zone edges. The second plot is the mesh outline plus only those
spray particles currently in the j = 1 plane and the opposite j plane if 3-D. The third plot
is again the mesh outline, but with all spray particles plotted regardless of their j plane. A
fourth zone plot is an overhead view of the mesh that also includes all the spray particles.
If there are no spray particles present at the time the plots are drawn, the second and
third plots are omitted, as is the fourth plot unless the output is for cycle O. For 2-D
applications, only the first two zone plots described above are created, as the third and
fourth plots would be meaningless.
The remaining zone plots, in addition to all the velocity vector and contour plots, em-
ploy our perspective plot logic. For 2-D applications this is automated, but for 3-D applica-
tions the logic requires specification of input data. This is all described in Sec. IV.M.
The plotting routines provided in KIVA-11 are adequate for the needs of many users.
Because these routines require only graphics primitives (point plotting and vector
drawing), they are adaptable to other systems without too much difficulty. Other users,
however, will want to use KIVA-D with their own graphics post-processors. Accordingly,
we have provided the basic connective linkage for post-processing in KIVA-11, which will
simplify the task. It is controlled by the following three input quantities:
● IPOST is the post-processor flag, where Omeans no post-processor file is desired, 1
means to make post-processor dumps onto file TAPE9 starting with this run, and 2 means
to continue dumping onto a previous TAPE9, which must exist in local file space.
9 CADUMY is the crank angle at which to start dumping onto TAPE9.
● DCADMT is the crank angle interval between dumps, after crank angle CADUMJ?
has been reached.
TAJ?E9 is initialized or resumed by subroutine DMI?INT; writing of file TAPE9 is
performed by subroutine DMPOUT. Because each user of a post-processor has their own
specific needs, the variables written in the DMPOUT routine provided in KIVA-11 are
intended only as an example of those quantities that are generally useful.

M. Perspective Plots
The development of three-dimensional computing techniques has brought particular
difficulties in the effective presentation of results. We have attempted to display as much
useful information as possible by offering perspective pictures, made in the same manner
as a photographic record of a three-dimensional scene on a two-dimensional negative.
The perspective plot logic described below is used in producing zone, velocity vector,
and contour plots for both 2-D and 3-D applications. However, for 2-D applications,

88
fi~JA-~=~~bm-utineRTAINJT- autam~timlly-specifies simpk ha-d-cm HI yiews-fdr eadi
quantity plotted; and the user needfiot3e-cmwerne&wi tli supp@ing perspec-tive view
data.
The plot-generating subroutines ZONPLT, VELPLT, PVPLOT, and CONTUR can
create a variety of perspective views of the computing grid with spray particles, in addi-
tiwrAwflui&velovity vector; spray parcei velocity vector, and “contour plots of selected-cell-
vatiables; F-orthe grid=plots, some-selected “number of the three ‘bounding faces of our
~ti=Adw.Wid.are..to. he.&awn.. Em-the vec+ar.and wntour plotx+however, we shnply
. .
outhneth~ges-of the grdand presenka Slect&ld~pzc#Tf&t~rs-ar. cmnixmrs-wiiJ-&Ythis-
framework.
O-nly-a-few-simple concepts are required+~ deseribehow a-perspective view is gene~
ated; ‘The fundamental cu~me@fisth=A-af2he.transparent image plane, anaiog~us-to tb
fihllima.~ .m.whiEM.he .pspectitie J&la@ . .t!zwed (-Fig. 282. ~.G__~a~.pL~~>;z*-&;*t*a-
. -m= G
tion~ however., We eho~e-a-nirnag~pkme -perpendietilar-’~ the averagelimmf>tight; which
. \ , ,—
exten&fmn-some-point-( xC.,yc,zcJnear the mesn center out.to the eye point (Xe,ye,Zz),
assmned.to.lie.we--lxmtside the mesh.

—-—..
.—
. .-%
-4,...,, L. A,.., w— “- —., . ~.

.. M.Gik

Fig. 28. Cons-truetion ofperspective picture onan irnagg pkme~ From New Principles of
Linear Perspective by Brook Taylor, published in 1715.

“89
A pair of perspective coordinates (e,q) relates a point on the image plane to a point
(x~,y~,zo) in the mesh region and can be obtained by performing suitable transformations.
In our case, these are

in which

x =(x —xc)cos o+(y-yc)sino ,

; =ccJs@[(y-yc)cos El –(x–zc) sinol–(z–zc) sin@ ,

; =Shz($[(y- yc)coso -(x- xc)sino l+(z-zc)cos(o .

The two angles 6 and@ measure the rotation and the ti lt, respectively, of the line of sight
with respect to (x,y,z) space as indicated in Fig. 29.

Fig. 29. Relationship of the rotation angles@ and 6 to the (x,y,z) coordinates.

90
From the figure, it isevident that

g= [(xe –XC)WYe –y)v,


c

r= [[z —z)~+gy,
e c

from which

if viewed “from the firont, (ye — yc) < O; Ifv” lewed from beliind~ .(ye —ye.) >0, then

m.1
L.ae-Jltigln-amd.Sraie-Of-the (~,q) coordinates-are not .req.uire&bee~wfdmi3se a~
~mm%antshiftthateenters the inesh outii~~e--i~~t~l~-~
ot~crame-and a-constantsca~e factor
that maximizes the size of the mesh drawn in-the.wailaMqdQt.frame area. T-his scaling
is done-in KIYA.11 by first computing the (~,q) coordinates of all mesh vertices and then
testing fiirtl-ieir maximum and minimum values.
Because a straight line segmentin-three. dimensional .space transforms into a
straight line segment-in the perspective view, only the end points require transformation
accmdi~~gtuthe-ahve-e~ations; and the resulting points are connected “by a straight
]ine.
h .K2WA-11;+@’&laV&kfined xc = yc = ‘0;3”Yan&zC = “(zOf the ~yii-n~e-~l~a&minus-
half+k--ssroke), assumingcode applications will “’beto internal “combustion engines. For
3~D-plme-coorfintie~ .the.l~sw.&auid.redefifie Xc,.yc,.andzc to lie at the center of the
mesh. These sta-tements~-an beeasily changed ii KIVA-13subrcmtine RINPUT-. Current=
ly, we allow up to five views each for grid plots; velocity vector plots; and contour plots, as
the per:t.lie~paramete~ LV attbe begkning -code: Requi redi nput-qu antitiesfor eaeh
individual 3=B=plot=a~w-asfbilmmx
Grid Plot: XEZ, YEZ, ZEZ, IFACE(6), IEDG, in which the first three refer to
(z,,y~,z~) in (x,y,z) space. IFACE is a set of six integer flags that correspond to the six
bounding faces of the logical mesh: left, right, front, derriere, bottom, and top, respective-
ly, where a value of 1 means to include and a value of Omeans to exclude the face in the
plot. For the 3-D pseudo-polar mesh, appropriate perspective-view values are O, 1,0,0, 1,
1 to draw the right (cylinder wall), bottom (piston face), and top (cylinder head). Finally,
IEDG = Owill draw line segments between all vertices lying on selected faces, and I13DG
= 1 will draw only the outlines of the selected faces. The IEDG feature is intended for use
in 3-D plane coordinates.
Velocity Vector Plot: XEV, YEV, ZEV, ISLV, JSLV, KSLV. Again, the first three
refer to (Xe,ye,Ze). The last three are integers of which only one can be nonzero. The non-
zero choice identifies the I, J, or K index of some plane in the logical mesh where we make
a “slice” and draw vectors of the vertex velocities as they would appear normalized in the
plane. For an I slice [0 < ISLVs (NX + 1), JSLV = KSLV = O], the plane is in (y,z)
space. In a 3-D pseudo-polar grid, an I slice plot would be a wraparound at some radius
and probably would not be too useful. Of real value for this grid, however, are J and K
slice plots. For a J slice [0 < JSLVs (NY + 1), ISLV = KSLV = O], the plane is in (x,z)
space. In a 3-D pseudo-polar grid, the velocity vectors for thej plane JSLV are drawn on
the right side of the frame, and vectors for the opposite (or closest to opposite) j plane are
drawn on the left side of the frame. For a K slice [0 < KSLV ~ (NZ + 1), ISLV =
JSLV = O], the plane is in (x,y) space. In all cases, the vector length drawn is scaled to the
maximum velocity in the plane being plotted.
Contour Plot: XEC, YEC, ZEC, ISLC, JSLC, KSLC. These are analogous to the
quantities defined above for the velocity vector plots, except that individual contour plots
are drawn for each view specified. Contour plots may be drawn for up to 26 different cell
variables, selected according to the set of 26 binary flags in the ICONT input line. The
DATA statement in subroutine CONTUR and the comments in subroutine FULOUT
describe the sequence. The same remarks concerning slices apply to contour plots, but
because contour plots relate to cell-centered variables rather than velocities, the ‘c+ 1“ on
the range is inapplicable. As provided here, contour plots are composed of vector segments
joining points of equal value and are linear in contour increment. Contours are automati-
cally connected across the center (at I = 1) in both J and K slice views in the 3-D pseudo-
polar grid, and are drawn to the j = 1 andj = NYP boundaries in K slice views of a 3-D
sector mesh.
In both velocity vector and contour plots, it is best to define the eye point such that
the line of sight will be as perpendicular as possible to the selected plane. When the eye is

92
not ;ocated-too-far above the mesh, .a more pleasing .appearmce-iiofien..mo.duc~d.hy.setting.
Ze = Zc. As a result, @ = O,which keeps the image ~kme perpendicular to the (x,y) plane.
Often we prefer to eliminate perspective entirely. For example, a set of (x,y) velocity
vector and’contour plots at various k-plane ieveis viewed-from straight overhead general-
ly proves more usefui”than views from some artistic angle, To produce a straight overhead
.
=-’ye = 0:0 ~ndz@ = ~(101‘ kadequatej.
VIew, Sek-xg.- l+Oi~.hW.~Te~,.~fiat~e = 0.0 ~-iii
cause -the3=13-peub=~mla~p.lotto-’~e rotated.45~ wh.thti-the-pwi odic.houndar~~-(J-= 1)
will appear at the 4:30 position. To mentally orient ourselves, we prefer to always have
the periodic ~ound~ry at t.~~ 3 ~’ci~c~ position. This is achieved-autom-atica-lly if-we
ill~tead ‘SPe~ifYye = – RP(.XNI?O>rather ttian ye = 0.0.
The eaordina%~~ystem on our CRT face has its cn+gim(OyO)atfihe-upper ieft-corner,
m.&the-values-ofthe two raster indices increase to the.ri~t-tiwn.ta. maximum values
of”l”02-4..A conversion from image- plane. cmndinates t~.ccwrespcmding CRT mordinates-is -
thus-required for all plotting. In KIIWA=II;the view ‘on-the-ima-~eplane extends from EL.to
5fi_and from q~ 10 qT, with CRT counterparts-FGW to FIXR and31Y”B.to.lTYT. To leave
ro~rnfbr-lfidin~ .welimit.the available CRT-face to 1022 ras%erpoints-wide -and 900-
- .-s. -. ,.

points high. ~lthm this rectangular region, we maximize the image-plane view drawn,
which requires the ratio

If the image-plane view is higher than it is.wide-[thati~~ll <.(1022/900)], then the CRT
plot range is given by
~~z~.~= ~~.1 _ 450(X”-D”),
FIXR = 511 + 450(XD) ,
FIYB = 900 ;
and
FIYT-= u- .

In-either”case, we can now calcuiate the two conversion factors


x~o~: -m~~)/(&R _~lA;
= (EIXR —..-=
93
and
YCONV = (FIYB – FIYT)/(q~ – q~) ,
required to translate image-plane coordinates for the view being drawn. Thus, if (\,q)
represents some point on the image plane, the corresponding CRT position (IX,IY) is given
by
IX = FIXL + (~ – ~L)(XCONV)
and
IY = FIYB – (q – q~)(YCONV) .

N. Chopper
In engine calculations, the cells can become very thin in the z-direction in the squish
region between the piston face and cylinder head, resulting in severe timestep restric-
tions. To alleviate this condition, subroutine CHOP is used to strip out or add planes of
cells across the mesh above the piston, thus providing a control on cell heights in the
squish region.
When the chopper is used, grid lines are required to be vertical (z-direction) through
the squish region, although radial grid lines are not required to be horizontal. An exam-
ple of a mesh that meets these criteria is shown in Fig. 22. The volume-of-overlap logic in
the chopper accounts only for vertical displacement of vertices. A truly arbitrary volume-
of-overlap algorithm for three-dimensional space would be significantly more complex
and has not been required for any application so far.
The input quantity NCHOP specifies the minimum number of planes to be left in the
squish region and is usually equal to 2 or 3. CHOP automatically removes planes on the
compression stroke and restores them on the power stroke. The parameter LNZP pre-
vents the number of cells added on the power stroke from exceeding the available storage.
The quantity DZCHOP, calculated in RINPUT, is a function of NCHOP. The 6Z’Sin
the squish region are always uniform, and each cycle tizis compared to DZCHOP to deter-
mine if a plane is to be added or deleted. The current algorithm for DZCHOP is fairly con-
servative: in typical engine calculations that begin at ATDC = – 90°, chopping will occur
between about –45° to – 27°, at which time our specified minimum number of planes
(NCHOP = 3) is reached.

o. Dump and Restart


Provision is made for running a problem in segments. If the input quantity
TLIMD = 1.0, the code compares the job time limit to the time used and writes a restart
dump on file TAPE8 when less than 90 seconds of time remain, and the run terminates.
In addition, a dump is produced on TAPE8 every NCTAP8 cycles during a run. This
feature is provided to minimize time lost due to system or hardware crash. Each time a
dump is written TAPE8 is rewound, so that the last dump is the only one saved.

94
TOmfitinue-thqmobkron a-subsequent-run, the quantity iItlIfYl? “ininput data file
is set equal to .the.dump-numbmz. ‘IMedurnp .flle is read as T.APE-7-..4fter readingthe re’
start dump, -~-A-11 reads the remainder of the input data file. This allows the user-to
imodify datai~~-d~cal~tiatian ifdesire-d; if this is a~ne} e-me.mmye.taka.not..t~.i htro-
duce inwmsistencies,
&~~i+~-ca~ls-a-built= in-,wndom-numbe~elmrdturatxevera"i"p~aces in the spray
subroutines. This generator is intended -inbe.asportableas possible for. use on other- cmn--
puters having different word lengths and attempts-h g&a&same.number seqgence
regardle~~-o-f=cmqmter: ‘Gccasimmdly; the-user ma y ii nci“it desira’bie to restart from a
dump and”calculate identical numbers to those that would result from a single longer run
with no restart in the middle. To allow for this, KIVA-11 includes the current seeds RANB
an&R#@W ftn%he-ramiorn number generator in the dump data and ‘resets them aa.part.of.
the.restar@rme&me..

Tine-authors wish ta give speciai “acknowledgment.tQ.~~= .McKinley-of C.ummins -


Engine.Ccnnpany, who .helpedinformulating-someof-the finite differenceequaticm~
and their numerical solution procedure and who recommended many additional
improvements to the computer program. We also thank many users of the preliminary
versiims -of.the.code who have found “bugs~ an-dsuggested improvements. Among th-ese
users-are John Rarnshaw ofyda}~o--l+ationa-lEn~neering Laboratory, Rbif R@itmd
Rarnachan&a I_Ji.wti&r&-~~NG@rSF~SekLabQ=a&~ie~ ard Kerm%+Mtr~=uf
Sandia -.Natiomal.Laboratories. Rina-lly-}w%hank Adrienne Rosefi -fo~--lmrgood-~
nature-d-
perseverance inteyping$he manuscr@..

95
APPENDIX A

DETERMINATION OF THE PGS PARAMETER

The objective of the pressure gradient scaling (PGS) method is to scale Up the magni-
tudes of the pressure fluctuations in far subsonic flows and thereby increase computational
effkiency without changing other flow features of interest. The method is implemented
by solving equations that are modified only in that the pressure gradient term in the mo-
mentum equation is multiplied by a factor l/az. The quantity a is called the PGS param-
eter and is constrained to be greater than or equal one. It is shown in Ref. 36 that if the
solution to the modified system has pressure fluctuations that are small, in the sense that
8pa/Fis small compared to unity where p is an average pressure, then the modified system
will have nearly the same solution as the unmodified system, except that the pressure
fluctuations will be increased by a factor az; that is

(A-1)

where Spa are the pressure fluctuations of the modified system.


Since in many problems 6p/F is approximately equal to the square of the Mach
number,GOone suspects that the PGS method is in effect increasing the Mach number by a
factor of a. That this is true can be shown by examination of the acoustic wave equations
with the factor l/az multiplying the pressure gradient term. It is easily shown that sound
speeds are reduced by a factor I/a. Computational efficiency is improved because the
efficiency of many numerical methods for solving the pressure equation is improved when
the sound speed Courant number cAt/Ax is lowered, 36and the PGS method lowers the
Courant number by the factor l/a. The PGS method should not be used in problems where
it is important to calculate acoustic waves accurately. In many subsonic problems, how-
ever, the acoustic mode is not important and the PGS method can be used to enhance com-
putational efficiency.
We now discuss the method for choosing a. The derivation of Ref. 36 shows that a
cannot vary in space but can be time-dependent. It follows from the above brief discussion
that to optimize computational efficiency one should take a as large as possible while still
maintaining tipip small compared to unity. In K.IVA we choose a to maintain ~pa)p s0.04,
unless the value of a so chosen becomes less than unity. In this case, the pressure fluctua-
tions of the unmodified equations, which are those that pertain when a = 1, have become
larger than 0.04, and we set a = 1 and thereby deactivate the method.

96
-

Irmmrwdetaii; .tise-algorithm for choosing-a is_the-foNimring.. Eacli .cy& we.caicdiite.

whe-re

‘n—
P–

Accordin~to Eql (A-l), in order to make the maximum relative pressure-fluctuation.on


the next cycle equal to 0.04, we should take an + 1 = a*, where

@.3)

We have found, however, that taking a R+-I = a* can resu~t in severe oscillations in the
computed values ofa. Tine algorithm in “&IVA-,which works weil “in practice, is to take

Thus if a* > an we allow a to relax to its desired valu..a* witkrelaaxation thrne~r..The


time ~r is taken to be the maximum of 20Atn and four times a characteristic acoustic wave
transitthne aerms the ~mmputatiomd mesh; ‘mdseuLon-
a-scaled average sound “sp_eed“c”/afi.
Hence, .we take

(A-5)

w-here

97=
and F and F are the volume-averaged pressure and mass density in the computational
mesh. If the value of an + 1 from Eq. (A-4) is less than unity, we set an + 1 = 1.

AJ>PENI)[X B

TURBULENT BOUNDARY LAYER TItEATMENT

Wall functions are analytic solutions to simplified turbulence equations and are
used to infer wall shear stresses and heat losses in lieu of numerical solution near walls of
complete turbulence equations. Numerically, one accomplishes this by matching the com-
puted fluid velocities and temperatures at grid points closest to walls to the wall func-
tions, which then determine the wall shear stresses and heat losses. Numerical solution
of complete turbulence equations is usually impractical because one cannot provide suffi-
cient resolution. Although it makes computations affordable, the alternative of using
wall functions can introduce large errors because in practice many of the assumptions are
violated that one needs to obtain analytic solutions. In the first section of this appendix,
we derive the wall functions used in K.IVA-11 and give the assumptions used in the deriva-
tion. In the second section, we tell how the wall function approach is implemented numer-
ically in KIVA-D.

I. DERIVATION OF WALL F’LJNCTIONS

In this section we first give the assumptions that are needed to derive the wall func-
tions and the simplified equations that result from making these assumptions. We next
nondimensionalize the equations and thereby introduce a dimensionless wall heat loss <.
The quantity <is equal to (J&r)/(pu*cPTJ, where Jw is the wall heat loss per unit area,
u* is the shear speed, and Tw is the wall temperature. It is assumed that< is small com-
pared to unity, and we obtain a perturbation solution for the boundary layer profiles with
<as the perturbation parameter. Finally, we introduce a change of independent variable
that makes the wall functions easier to implement numerically.
We use the following assumptions to derive the wall functions:
1. the flow is quasi-steady;
2. the fluid velocity is directed parallel to a flat wall and varies only in the direc-
tion normal to the wall;
3. there are no streamwise pressure gradients;
4. there are no chemical reactions in the gas or on the wall surface;
98
&

S&
there-al-eino-sp=ay -m.mrw%;
6. the-dimensionless waH “heat 10ss.<iS.smtilcom~edtO.unl ~y,
‘7. Reynolds numbers are large (i.e., p >->- pt wherept is the kmimmvkcosity);-
and
8. ‘Mach numbers are smail~ so that dissipation of turbulent kinetic energy is a
negligible source to the internal energy.
T%eabuve--lisl-leai3Sti-provisionalwall"functions that closeiy resembie those commonly
used’ii~ cor@nctiim with the k-– c turbulence model.z~’ Assumptions 1--6are frequently
vi~~ated .-a.t.
~~d .pe~~t~-~~~-~a~~s-in .~n~er~~i~~m~&,iorI ‘enQIle:C~lcUl~tiOHS: SOIIie&3ie
assumptions can be made more valid by providing .more-resoluticmnear. walls... For. exam,
pie, the measure of-the flatness ofa wall is the ratio ofy, the normal distance.frmnihe-g~id-
point%o the-wall; “b r; the-wtiii’~=dius-of’tiuwature: 13ytilminishing y, one lessens this
ratio, and the wall looks .flatter to.the.flom.. TJe-validity-of.other= assum@ionsj for-exarnpb
assumption 3, will not be improved with increased resolution. To obtain more universal
wall f%mcticms,it ‘would-bedesi~~bie- to rehaxtiro-se-assumptions whose validity does not
depend.on meslumiolution, -and-the analysis thatfollcnvscan serve as-a-basis-forf uture
extensions of the theory.
With assumptions 1-8 abo~ej the-k – c equations neara wall become

~_ al’ . Jw = constant , @3-2)


+]

(B.3)

and

(B-4)

-where

k’ (B--5)
p=cpp.— ,
&

99
p Cp (B-6)
K=—,
Pr

(B-7)

In these equations y is the nomnal coordinate to the wall and u is the velocity component
tangent to the wall. In the absence of chemical reactions, the species mass fractions are
constant, and hence the mean molecular weight W is constant. Although it is not neces-
sary for the analysis that follows and does not alter the results in any fundamental way,
for simplicity we also assume that CPis constant.
We now nondimensionalize the equations. The dimensional quantities character-
izing our problem are the wall shear stress ~W,the wall heat loss Jw, the wall temperature
Tw, the wall density pw, and the specific heat CP. From these a characteristic velocity, the
shear speed, is defined by

Tw
U* = J —. Pw
(B-8)

The only quantity with dimensions of length is the distance y from the wall, and accord-
ingly when a length scale is needed, we use y. We nondimensionalize u by u*, T by Tw, k
by (U*)2, and e by (u*)3/y. Written in terms of dimensionless dependent variables (for
which we use the same symbols as their dimensional counterparts), but retaining dimen-
sional independent variable y, the equations become

k2 au (B-1’)
Cpp—y—=l,
&?Y

(B-2’)

2
a Cp k2 au 2
1 (B-3’)
ak
–P: =()>
~ [- Prk p;y~ +cp P~y
t! () —
?Y Y

c ~2
k2a& au 2
J-P
Pr
E
~Y— -
()1
?YY
+ccpk
81 P ()

a
–ce P—=o)
2 y2k
(B-4’)
pzr=l

We now assme-the.dmentionle=..wall.heat.loss<i~~mall. 12ac-hofthe dependent


variables is expanded in a power series in <:

~-= u- + ~ 1?”’
7:-+. .
0. “

T= TO+ T1<+ ...,

k=ko+kl< +...,

where ui, Ti, ki, &i, and pi are functions ofy alone. Now note that dividing (B-2’) by (B-l’)
yields

from which we immediately obtain

cn!o
(B-n)
—=0
dy.

and

Consequently To = 1-and

Ti+l-= u+ + cl ,
where c~is a constant. Our strategy will be to solve the equations for an isothermal
boundary layer for uo, ko, and co. These zero-order terms in <will be the wall functions for
u, k, and e. Then the temperature wall function will be obtained from the expansion to
first order in<,

T=l+(UO+CJ<, (B-13)

where we have used (B-9) and (B-12).


Solutions for the zero-order terms are

&o = k –
[c+ c. )Pre]-* = l/K ,
P &2 Cl

and

= l/Kt’ny + const . (B-14)


‘o

Thus a logarithmic velocity profile is obtained, and the analysis shows that the Karmann
constant K is related to the other k —e model constants and cannot be independently speci-
fied. For the standard values of the model constants given in Table II, we have K = 0.4327,
which differs slightly from the commonly accepted value of 0.40.61 Determination of the
constants in the velocity formula of (B-14) requires consideration of the laminar sublayer,
wherein the laminar kinematic viscosity vt becomes important. A dimensional argument
gives

[B-15)

where the constant B has the experimentally determined value of 5.5 for smooth walls.Gl
In dimensional terms, the wall functions fork, e, and u become

A?= c–*(U*)2, (B-16)


P

Cwi .J.2
1 (U*)3 p k
&=——.—— (B-17)
K Y KY’

102
and

From (B: 1-6),we obtain

which -is the boundary- ~mnditionusedikr. the-k=equation4 n_KXV_AIL.Equation (B- I?) is.
‘used-diirectly todetermime the vzdu-e-ofs af the centers of computational” ceils next to
-walls. 13ecauseof@-1-7), -whenever”a-length scale L-is needed in the ICilWA--~-inputor
equations, it is.relatecLtdand.a hy.

We do not use (B-l%) directly ftir the velbcitywall-function beeause this would re-
quire iterative solution for the unknown shear speed u*. Instead we change the independ-
ent variable by replacing_ yu*/vt by its l/7-power law valueG3

yu* yu y~
—=%

H VP j
W., , (B-20)
.-..
~~ .

w-here ctW = 0;15. We obtain

which can be easily solved for u*, once y and u are known.
Equation (B-21>”is oniy vaiid”in the logarithmic region, where (yu*)/vg >>1. If
yu*/ve < II then we are in the kuninar sublayer-and another formula-must be used.
Although the ilow in the k.minar subiayer is not trui~ h.minar, we use the.laminar.
formula
The transition between (B-21) and (B-22) is made at the point Re = yu/ve where they
predict the same u*. Solving

(B-23)

for I?c gives RC = 114. Strictly speaking, we should also not apply (B-17) in the Iaminar
sublayer, but we continue to use it for lack of a better alternative.
Although we obtain the wall shear stress from (B-21), note that if assumptions 1-8
are valid we could also obtain this stress from Eq. (B-16) and the computed value of k at a
grid point in the logarithmic region. Some authors2b use (B-16) to eliminate U* in the
argument of the logarithm in (B-18) and thereby obtain an equation that can easily be
solved for u* once u and k are known a distance y from the wall. To our knowledge, no one
has tested the relative accuracies of these different equations for u*.
We now turn our attention to the temperature wall function. From (B-13), in the
logarithmic velocity region, the dimensional temperature equation is

T JwPru*
—=1+ :+CO ,
(B-24)
T CPGWTW ()
w

where co is a constant whose value must be determined from experiment. Unfortunately,


good experimental evidence for co is lacking, and we determine co by matching to a lami-
nar temperature profile in the laminar sublayer region. More precisely we assume that

T JU JwPreu* u
—=1+ —y .1+ — (B-25)
T KtTw CLT U*
w pww

for yu/vt < Rc, where Ke and Prgare the laminar heat conduction coefilcient and Prandtl
number. By equating (B-24) and (B-25) at yu/ve = I?c, where u/u* = Rc+, we obtain

(B-26)

This is only a provisional value for co that must be tested in experimental comparisons.

104
II;- IfJUMEEUC-AL .IMP”LEME NT-A-T-ION-

We now describe the numerical-implementation of the turbulent boundary layer


.
equa-t~onssfhst- for-tkrrmrnenturn eQ-U
ati on -and-thenfm%b-:intxmmlene~
bggr k- ~.aQd.-S-
equations. Consider a typical cell adjacent to the.wall, .asshowninEi~ 13.1 .-V-ertices e, f,
g, and-h lie on the wall, and vertices a, b, c, and d are in the fluid. To evaluate the shear
stress -weinee.d-Atn
know the veloc+t y u tzmgemtti-ihe- wa-11,evaluated a distance y from the
wall; and the hminar kinematic.viscmity Vt..TJfitangentiid ..velocity-u.ls evaluated bJ’-

u=ii(ua +ub+uc+ud)i.

Equation (B=27) assumes the nmrmd velocity at points a; b, c, and d is negli-gilble, so that
the-tangential component may be replaced by the magnitude of the velocity. Tne distance
y from the wall is.calculatedly

(B-28)

where Aa is the area vector of the face of the cell that lies on the wall. The kinematic
viscosity is evaluated by

11 (g’!)
“’-iiir‘ 7 (B-29)
‘vP =—
.
P’”

c b

d
where pair is given by Eq. (24) and p and T are the density and temperature of the cell.
The shear stress ~Wis evaluated using Eq. (B-8) and either Eq. (B-21), if yu/Vts I?c, or
Eq. (B-22), ifyulve < Rc.
With rWthus determined, the product ~@At gives the total change in fluid momen-
tum occurring on a timestep due to wall friction associated with the cell in question. One-
fourth of this change is apportioned to each of the vertices e, f, g, and h. These changes are
effected by taking the change in momentum of vertex i (i = e, f, g, h) to be parallel to the
velocity at the vertex next to it and in the fluid. For example the vector momentum
change for vertex e is then

a’i’eth.l= –+T “AAtu~llu~l> (B-30)


e

where lkf~’are the vertex masses. These momentum changes are added in Phase A. It
should be noted that the momentum changes at vertices i = e, f, g, and h are only those
changes due to the particular wall cell in question. Similar changes to the momentum of
each of these vertices will result from the other wall cells to which it is common.
The formulation given above assumes the wall is stationary. If the wall is in motion
(e.g., a moving piston), it is necessary to transform the velocities into a coordinate frame
moving with the wall before applying the equations. The new velocities must then be
transformed back into the laboratory frame.
The wall heat flux Jw is computed from Eqs. (B-24) and (B-26), if ydve > Rc, and
from Eq. (B-25), if yu/ve < Rc. The specific heat CPis given by its value in the wall cell in
question, and the temperature 2’ is given by the average of the temperatures in the wall
cell and the fluid cell above it. The product J~At then gives the energy lost to the wall,
which is therefore subtracted from the internal energy of the cell.
It is also necessary to allow for the kinetic energy dissipated by the wall friction.
This frictional dissipation is approximated by ~WuAAt, which is added to the internal
energy of the wall cell in question.
Implementation of the boundary conditions for the turbulence equations is straight-
forward. The k-equation condition, Eq. (B-19), is enforced by allowing no diffusive flux of
k through the face of the wall cell that lies on the wall. The value of e in the wall cell is
determined by Eq. (B-17) using the computed value of k in the wall cell and y equal to one-
half the value of Eq. (B-28).

106
A-PFwNDm c.”

NLLMFXICALSOLUT.TQN.OF T.HE .E~IJA!NQIW


GOVERNING-SPR-A-Y”DYNA-MICS-

Irrthis-appendix, we-give-the- finite-ditfference approximations to the ordinary differ-


ential equations governing droplet trajectories and to the integrals that give the rates of
mass, momentum, and energy exchange between the gas and spray. We also describe the
soiutionproceciure and the FO16SOfthe.subio.uEiWtifi: w:k125;:t-he-S~-ay-
~~[~ti-lhtitmsare
performed.
The calculated spray source terms are added to the gas mass, momentum, and ener-
gy equations in subroutine I?CQUPL. The source term Oijhs,which
.-, .
gives the rate of mass
addition tmthe gas per unit volume due to spray evapora-tion, is difference as follows:

./\

The summation is over all particles located in computational ceil (z,j,k). The quantities

P -.. u :F’p-a.w”pv.isiond .~J~+..~.~#.~~=fi&~:~~*.


.M:--=d --.2 :.-.iw-
I am 1au~H“@””~~-~-~”&~~-~dl%i6i~~~
These may ai~fflerfrom iV~7anfip~”%ecause oft.he dropkt.collision andbreakup ealeula--
tions. The liquid density p~-is-asswned to beams%ant and equal for-all droplets. T-hc-
finite-difference approximation for rLDAis gjven below.
Tlie source term ~~~s in the internal-energy equation is difference as follows:

@;:k = _ L ~ N>d; rt”{(pr’4)3 Ie (N;”)~ – (r’$ [t (T; )


Vn,kAt .mi i, j.k) P
~J”

.-
+ (rqJ<k7! —–\7-
) , (\r.~_~ !
PPPp t?mn —U) +-H(f) 3-- (r~l(v+
P
- i.tfmn)2} .

IIr Eq. (C-2) r’p,


T’dp, and V’P are droplet radii, temperatures, and-velocities that have been
parti-iiii~ -ed~d’u~ .to.dQ@”#. mlii-~-~as and~-b~ea~=~~s:The ..~.~a~.i
ty. v’P-~i~:~~ta-i ~~.
the Wavitati6nal:accelerati5n upda-te~ ‘The ealiul-ation of the Phase A dmplet-te~nperature
T~P~’-isdescribed below, and U’Pis calculated as in Sec. 111.C.The subscript (t,rn,n) denotes
tlie-indiies~f.the -momentum (cellin.whiehpar$iele p is-located. The -velcmit,yvP~is a par=
tially updated “particle velocity that is obtained by solving the following finite-difference
approximation to the particle acceleration equation:

m?
,
V;—v (C-3)
P
= Dp (ll;nl~i- u; – Vi) .
At

In this equation Dp is the particle drag function, which is defined below.


The source term W~ks to the turbulent kinetic energy equation is difference in the
following manner:

1 ,,
w;k=– —
v;kAt
z
pe(ijk)
N; ~ Izpd(r~)3(v~ – Vp) . u
P’
(c-4)

where vpt is obtained from Eq. (C-3).


The gas and droplet momentum equations are difference in an implicit fashion that
circumvents timestep limitations due to the strong coupling of gas and droplet velocities.
The finite-difference approximation to the gas momentum equation can be written

(c-5)

where E~k represents all contributions to the Lagrangian phase momentum change of
vertex (i,j,k) except those due to spray momentum exchange. The finite-difference
approximation to the droplet acceleration equation is implicit in the gas velocity and
linearly implicit in the droplet velocity:

V;–v
P
= Dp(u;k + u; – v;) ,
(C-6)
At

where the drag function DP is given by

~ p;k Ill;k + u; - v“ ~ (R, ~


Dp=-— (C-7)
8 Pd ~A Dp”
P

The particle velocity VIPhas already been updated due to gravitational acceleration. The
drag coeftlcient CD and droplet Reynolds number ReP, which are defined in Sec.11.B, are
evaluated using time level n values of the fluid variables.
When Eq. (C-6) is solved for v> and the result is substituted into Eq. (C-5), one
obtains, after some manipulation,

108
((3-8)

where

(c-9)

and

depend-on-explicitly -knmvmvalues-oftbe gas and droplet variables. ‘These arrays are


Cdi.Xllati”iilSUhlWthf2 .PM.~.I _~.h~n.-th~ ~~~~~ ~..&~&xJ~~@+~Jr. ~~~+~~wfi~ ~~~~~~s~ ----

droplet’:e!oeiti~ -a~~thmmmputed fron--Eq: {C-6) in-submutir~e-PACCEL.


The particle radius and temperature changes. are.obt,ainetiy evaporating the par.-
ticies sequentially at constant pressure. By coupling the particle evaporation rates more
closely, the sequential evap_amtio~~-ea3c
ulation allows the use of larger timesteps than.a
simultaneous evaporation calculation.. The..difference approximations afthe evapcma%icm
cdculaticm .ar.e.irnplicit in the droplettemp~a%urebutexplieitin the gas temperatureanti
vap~r. ma=s+fkc-tien. !h=e. %h~agFr-tr%WZ=+~e-}=-a-~-e
ewqmrated scxqwerrtiwiii; thti--ezpti cit.:
ness can produce Unphysical”changes in the computed gas temperature and vapor mass
fraction when heat and .ma.ss,transfer.r~des-t.oa=single particle.ardarge.. ~h~~ez~tthis;
for -each particle wecompute an evaporation tin-restep8teUba-sed on heat and-mass transfer
rates, and subcycle-the.e~ apm-ation .emlculation a number of times~qua-1 to A#8teu = AZ2U.
T-heevaporation calculation is performed in-subroutine EVAP.- We ilrst solve imp-
licitly fortheupbte-ttipiet~emperature. Tine equation we approxirnate.iiobtaihe~
from Eq. (41) by eliminating R using~q.. (NY)ancieliminating_Q~ using_Eq, (42):

(C-II)
0.. .

Pd%r’ceTd
= KtirO’ – Td) Nud – L(Td) (pD)air Bd(Td) Shd ,

where

(C-12)

109
and Y*l(z’d) is given by Eq. (40). The finite-difference approximation tOEq. (C-II) iS

, U+l t’rz [1 + Bd (7’;+ 1)]


rd – 1’;
P P P
Pd 2 k)2 cer~jp) at = K:ir(?ijh – l’;+ 1, V;u
ev P Bd (T:+ 1,
P

– L(T; ) (pD):, V:h en[1 + BdO’:+ 1)1


, (C-13)
P P

where superscript u denotes the value of a quantity after v evaporation subcycles. We


initialize T~PO= Z“~P and rpo = The quantity 11~is calculated from the formula
“P”

Y;(T;+ 1) – (qtik
P
Bd(T:~ 1, = (C-14)
P I – y;cr:+ 1,
P

Cell (i, j,k) is the cell in which particle P is located, and (~I)ijk in (c-14)and ~tjkin(c-13)
are intermediate values of the vapor mass fraction and gas temperature that have been
modified due to evaporation of particles with subscripts less than p and evaporation of the
current particle p on subcycles less than U. Formulas for these quantities are given below.
The heat conductivity .Ka~rU
and mass diffusivity (pD)air” are calculated using ~~h and
Tdpv. The quantities V~~Uand VAT.”are given by

V~~= 2.0 + 0.6 Re@;

and

V;u = 2.0 + 0.6 Re~Pr~ , (C-15)

where the drop Reynolds number Red, Schmidt number Sc~, and I?randtl number Pr~ are
calculated using rPU,Td. Uand the intermediate gas temperature ~~~.
Following implici~solution of (C-13) for T~pu+ 1, the drop radius rPu+ 1 is obtained
from

(pD):r
{n[l + Bd(T: )1+ en [1 + BJI$+l)I
P P (C-16)
(r “+ 1)2= mm 0.0, (rj)2 – 81eU — V;h
P [ P~ 2

110
which approximate- 438) fm.therate of-drop radius change.
‘The intermediate temperatures and species densities are obtained as follows. BefGre
the particle e’Japo~Q-tionealeulation -vwinitialize

n
n:
r .j*
Wo)..k = I;k + —-.
P;k

‘dlmr.as-each-.p_afi.icle is evapmatex-”we rnedif~.%he.-abo:ie=mrqs-by

and

(C-18)

if particle.zq liesin-cell.(i, j,k).. Finally., .we.caladate.

(%-l).k =(”al)ijkl’l%i~k
and

?..,
lJa
= T:k +
These new intermediate temperatures and species densities are then used when calcula-
ting the radius and temperature changes for particle p on the next subcycle or for particle
p+ 1 if we have completed the evaporation calculation for particle p.
The choice for 6teUis based on the idea that the heat transfer to a computational par-
ticle in one timestep should not exceed some fraction of the energy available for transfer.
The heat transfer rate to a computational particle on the first evaporation subcycle is
approximately

QP = NuPKair (?ij& – T; ) 2m-’N’


(C-21)
PP”
P

The gas energy available for transfer is approximately

Eg = (Cp);k (?..k – T; ) p;kv;h . (c-22)


P

The criterion for Stevis thus

Qp~teus P g’
(C-23)

where f < 1.0. Using f = + and substituting from (C-21) and (C-22) gives

‘;kvijk
n (cp )?.
ilk
~te” < (C-24)
NupKtir 4rcr~N~

A similar criterion based on mass transfer considerations gives

(C-25)

Since ShP = NUP < Vsh, where V~his given by (C-15), and (pD,)air = K~ir/(cp)~~n = Fair,

where Pair is the viscosity of air, we replace (C-24) and (C-25) with the single criterion

(C-26)

112
More precisely, we set 6teU= At/Neu, where the number of subcycles NeUis the smallest
positive int.eger such that &teu satisfies (C-26).

A-PIW-NBIX- D-

PA-RTICLE RA-DiUS SE LECTK)N A-’T-INJECTK)N

Through input switch INTJDIST,the user specifies one of two size distributions-
associated “with dropiets injected-into the’ computational mesh. If INJDIST = O, a mono-
disperse distribution is used ”[ti(r– t-Oj]Ywith the injected-drop size r. given by inpt
parameterSMR. This option canbe-used in conjunction with the breakup-model
(Appendix F) to calculate atomization accordingto the method of Reitz.4 One injects drop-
lei~with~e apalto.the nozzle radius for. hole nozzlesar equal to half th~nozzle~pening
size for nozzles with pintles. The “atomization” of these large injected drops into smaller
tiopieti--is--thec aleulatti”byby the breakup model.
If.”INiHNST = 1, ax-squared dis+ributicm is-used for- the sizes ofinjeeted-draplets:-

f(r) = Le-ri; ,.
r

... –..-..
where Pis the number-averaged ‘drop radius, which tor the distriliutitioflll-.
to the-input:~duterzne”mnam-r.:~ by:

r =*r39.

ways to obtain a specified size distribution when injectingy.articles because one has the
freedom to choose the number of drops per particle. The method we use, which is also used
in the droplet. breakup c-alc-ulation, samples-mm$f%quently those portions of the size
distribution where the most mass occurs. These drops will usually exchange the most.
mass; momentum, and ‘energy with the gas. in the remainder oftliis appendix, we detail
how-the radii ofinjeeted pa-rtiel~-a~~hosato obtain the specified drop size distribution-
(.~__~,
In addition to the drop siizedistribution (D-1), we can define another distribution g(r)
in sue-h -a-~v-a-ytha%g{r)dr is- the-probability. that a parti de has dro.m-.-witradiiii in=th-e=

113
range (r, r + ok). The number of drops per particle is then proportional to the ratio
f(r)/g(r). Best resolution of the drop-size distribution is obtained where the values ofg(r)
are largest, and it follows that to obtain the best resolution of the size distribution where
the most drop mass is located, g(r) should be proportional to the mass distribution rsf(r)

and the number of drops per particle should be proportional to I/r-a. From this it follows
that the total droplet mass associated with each particle should be constant. This con-
stant is determined by dividing the input total spray mass to be injected TSPMAS by the
input total number of parcels to be injected TNPARC.
The distribution g(r) is normalized to unit total weight by taking

t-’ -
g(r) = Y4 e-r” . (D-3)
6r

According to our procedure for selecting radius values randomly with the distribu-
tion g(r), we must first find the cumulative distribution h(r) associated with g(r), and then
apply the inverse of h(r) to random numbers uniformly distributed in the interval (0,1).
The distribution h(r) can be seen to be

h(r)= 1 –e-r”
‘1 1 +r/F + ~(r/F)2+ ~(r/F)3
I . “’-
(D-4)

The inversion of h(r) is performed numerically. We store values of h(r) in increments of


0.127 between r = Oand r = 127 = 4 raz. The value of lz(12 F)is taken to be unity. (This
involves only a slight inaccuracy since h(12 7) is in reality greater than 0.997.) IfXX is a
random number in the interval (0,1), we find that value of n for which

(D-5)
h[o.12; (n – l)]sxx<h[o.12; n] .

Then the corresponding drop radius is

r=0.12rn=0.04r32n. (D-6)

114
Consistent wi~h the viewpoint of the stochastic particle method, drop collisions are
calculated by a sampling procedure. The alternative is to try to represent the complete
di~~~butienof”d~op properties tiiat”ari~e citietcdiwpcuiiiiiiims. I@ exampie,. having_cal~
~l~la~ed,the=cO~li~im.frWu@ey be~~~en-a drop associated -witl~-pzzP~ie]e-Aand ‘all “dFop_s
associated with another particle, we could proceed in two ways. In the first way, we could
use-the-collision frequency ti.cdcldde.the.~~bable number ofdi-ops -inparticle.kthat
lunderga collisions-with drops-in the other-particle. ‘h mpresent-the-dsttibution ofcoHi-
sion behavior, this number of drops would be subtract.edfrom=w&icle._A, and-one or.more
new particles would be created having the properties of the drops resulting from the colli-
sions. We tried such a-procedure with the result that we quickly -had more particles than
mndd ‘be acmmmociateci ‘by-camp uter a$or~. k.these,cond~-<y-, -d~~c~~:is~.+m-’m~-.v~~-’~~
the collision frequency is .used:to caldulate the probability P that a drop in particle A will-
undergo a-~wllision-witk-atipi~~-the-othwp_ articie. Tinen ail-the drops in paxtieie,k
13ehave-inthe samemmmer; they eitherd~ ordo rmtccdiicieq smd’tiie-probability o“fthe
fm.mer.ewedis.~.. Since a-nt.hdrop~-in =partie]e-.lkbehave =i~l=th--sarne--wa~;
no new ~d~:
titles have to be-created. T-hen the probability distribution-of ouhomesisr~avered.by.
ense.m’ti ammaghg. over -many=.cwqmtations-or; in a Aedy-Aa+e=calculatiofij by time
mmrag@g=wer a kmgtirn~ Theabo~'e.briefAc~ti@,i~n=@vesthe-'m~~ic-id-ea--ofour wdliL-
sion calculation, which we will now describe in more detail .-
For each pair of particles, the collision calculation proceeds as follows. The.ccdlisior.
calculation is performed for the pair of ~articles if. and only. if, they. are~n.the..samemrn.
Putaticnml ceil. TO facilitate-the description of”the collision calculation, we will call-the
drops of larger radius “collectors” and those of smaller radius “droplets.” For purposes of
tk~lli~m=~aleulati~n~ the dro~~a~aei atw%%th eaelkpartiele -ari~mnsid~rdtu :beTami~
forrnly distributed-throughout the computationaikdl .in-whi~b they-are kwated. T-husj we
calculate the collision-frequency v of a collector drop with all droplets according_ to

‘I’he subscripts i-and 2 refer to the properties of the collectors and droplets, N# is the
number of”droplets in particle 2, and V~~n is the volume efthe c~ll in--which-both particles

Iili
are located. The probability Pn that a collector undergoes n collisions with droplets
follows a Poisson distribution,


n
Pn= e-z!-, (E-2)

with mean value fi = VAtwhere At is the computational timestep. Thus, the probability of
no collisions is PCI= e – fi. A random number XX is chosen in the interval (0,1). If XX <
Po, then no collisions are calculated between the drops in particles 1 and 2.
If XX —> Po, we chose a second random number YY, O < YY <1, that determines the
outcome of the collision. ~(rl + rz) is the collision impact parameter b. If b < bc~,
where bcr is the critical impact parameter below which coalescence occurs, then the result
of every collision is coalescence. If b z bcr, then each collision is a grazing collision. The
value of bcr depends on the drop radii, the relative velocity between the drops, and the
liquid surface tension coefilcient. The expression we use for bc, can be found in Sec. 11.B.
Suppose the outcome of the collision is coalescence. Then the number of coalescence
n for each collector is determined by finding the value for n for which

n—1

xPksxx<~Pk. (E-3)
k=O k=O

For each collector drop, n droplets are subtracted from their associated parcel, and the
size, velocity, and temperatures of the collector drops are appropriately modified. If there
is an insufilcient number of droplets to have n coalesce with each collector, then n is
recomputed so that all Nzn droplets coalesce, and the particle associated with the droplets
is removed from the calculation.
There is a timestep limitation associated with the above calculation of drop
coalescence, and this is that the computational timestep At be small compared to the
collision time At~ for the droplets. The latter is given by

1 N;
(E-4)
—=vd=— n (r: + r~)21v1 – V21 ,
Atd V;k

where Nln is the number of collector drops. When At << Ltd, the probable number of
droplets that coalesce in a timestep, which is VdAt N2 ‘, will be less than N#. Hence, most
of the time the number of droplets in particle 2 will not be depleted in one timestep due to
collisions.

116
This timestep limitation is much less severe than that-we would have required 11we
had’%.l.limrefii~.-one coales~<.nce per tiines%ep. With one ~malescence-per timestep, we
would have had to compute v6t << L wherev is g&zrL by Eq. .(GQ,. Theeqm+-ims fore;.
aml:v~ diIffer in that: the number ofthopN4WV& is used in mmputhl-g-v. In Appendices D
andlrit is shown thatwe usua-lly have -N# >-> -.l’-+ln-amHnencev >> v~.
Suppose now that the outcome of each collision iwgrazing rwdlision. Inthist-as~
only-orm+ollision .is ealeulatecHbrwzchdmp: Tlnis-in$rodlxxisan addi~iimal-t%-msteq
~anstraint-that~ tb~=mall ~mmpared-’t thecollision-times between drops of neariy equal-
,— . . . ..
Sizej wnce grazin.gcolhs~ons usually ocmu.rh~@~~Y._d~.~E~~.~~~r]~l~yaa.~.~~~.. .C..=.=.b
u Laaklcg
collisions are calculated between N pairs of drops, where N is the minimum of N1 n and
~Fn. ml
~12 ~m#J collectors and’diwpletxrare-then returned”to their particles in such a way that
mass, moment- and ‘emr.~..8_re.eQQse.m7ed,

In this appendix we-describe-the numerical -solution.~o~~ure foethe eqrmtions=g-ov:


erning spray dfipi~osci-litition and breakup. A detailed-description of the.br-kup-nmdel
pan be found in Ref. 35. ‘h ealetitiedraplet. oscillation.and %HWakUpi
we -require two addi=
tional =particlemm ys-yz~ami jP_ Tine quantity.yp iiqprqmrt.iimal to -the dispkwrnentof-the
droplet’s surface from its equilibrium position, divided by the droplet radius. Droplet
breakup occurs if and only if yP exceeds unity. The time rate of change of yP is yp, and the
time rate of change of jP_is given by Eq. (45).
To -uplate-the-vaiues ofyP and y~ each computational-cycle, we make use of the exact-
soltition ofEq, (4-5).assumi-ng~wnstallt-co-efflcien@:

(F-1)

‘where

(F-2)

117
is the Weber number, u is the relative velocity between the gas and droplet, a is the sur-
face tension coeffkient,

2 edr2 (F-3)
~d=– _
5 P~

is the viscous damping time, pt is the liquid viscosity, and

a 1
CI.)2=8— —— (F-4)
~2
Pdr3 ~

is the square of the oscillation frequency. For each particle we first calculate We, td,and
~2. A value of ~2 — < () occurs only for Very small drops for which distortions and oscilla-
tions are negligible. Thus if @ ~ O, we set yP~+ 1 = yP~+ 1 = O.
If GJ2>0, we next calculate the amplitude A of the undamped oscillation:

(F-5)

If We/12 + A —
<1.0, then according to Eq. (F-l), the value of y will never exceed unity and
breakup will not occur. Most particles will pass the test We/12 + A ~ 1.0, and for these
we simply update Yp and yp using Eq. (F-1):

fl+l _ w’
- ~+e.r,GAti,~)[(yj- :)cosoA,+ ~(,J+Y~j,%)si.oA,) (F-6)
Yp

and

We
.n+l = We t-z
(F-7)
Yp ‘+1 /td + exp(-At/td) j; + ~ MJsaAt-co(y~- ~)sintiAl\
( G–yp ) [(
d
)

If We/12 + A >1.0, then breakup is possible on the current timestep. We calculate


the breakup time t~u assuming that the drop oscillation is undamped for its first period.
This will be true for all except very small drops. The breakup time t~Uis the smallest root
greater than tn of the equation

118
:+ Aces Ico(H”)+Q] .=1 ,
(F-8)

where

and

If.time in+ ‘-is-less-than tbu, then no breakup oc~urs-om-the-cwent”.iimestep, and “we-use


Eqs..(.F-@ ZmliL(l?-’z)tA=u#a!% jy,aadjp
Breakup is calculatedonlyif t~U<— P+ ~. When this is true, the Sauter mean radius
raz of the product drops is calculated from Eq. (31), and Eq. (32) is used to calculate the
velocity w of the product drops norrnai-ti the relative velocity between the parentidrnp
and gas. When evaluating r3z and w, Ypis evaluated at tbu using_Eq, (F-1). The radius r~~~.
of-th~praduet:drops is the~~-ekosen-ramdomly from ax-square di~tributiimwith Sauter
meamradius-r~~. h .ehcm4B&n~M-wesa.rnpltimokf’r%qmmtiy. from %hose-portions of’tlie
x-sqgared disiritmtion where +Aemosimass nxides~ aS is deseribed- in .Amem%x
---- 9.- 3%
~wnserve mass; the--numlxxofdrops N associated “with the computational particle is
adj.ustedaccordin~tc.

We also add to the particle velocity a component.wii,hma~it.ude w anddires%ienra~de~m,


]Y -chosen-in-a-~]an-e-normal to tfie relative velocity vector between the p_arentdrop and
gas.. !This.prncedure does not conserve .mmnentumin detail; but itdoesw-onthe average.
Following breakup, we assume the product drops are not distorted or oscillating, and.
,.—
a-cmralnglj we-set:yp%+~- = jP:-+ ~-= O.

119
APPENDIX G

CALCULATION OF’ DROPLET TURBULENT DISPERSION

Turbulence effects on the spray particles are modeled by adding to the gas velocity u
a fluctuating velocity U’p, where each component of U’p is randomly chosen from a
Gaussian distribution with standard deviation _ and k is the specific turbulent
kinetic energy of the gas in the computational cell in which particle p is located. The
fluctuating velocity U’Pis a piecewise constant function of time, changing discontinuously
after passage of turbulence correlation time ttUr~,which is determined by Eq. (37). The
sum u + U’Pis then the gas velocity that the particle “sees” when calculating its drag,
heat and mass exchange with the gas and its oscillation and breakup. We also subtract
from the turbulent kinetic energy the work done by the fluctuating components in
dispersing the spray droplets.
For each computational particle, we chose one of two numerical procedures for
solving the equations of this model. The choice depends on the relative magnitudes of At
and tturb.When At < t~urb,which is most often the case, it is possible to solve for particle
positions XPBand velocities Vp~ by straightforward difference approximations:

x:-x; (G-1)
= Vn
At P

and

v: -v;
(G-2)
= DP(L$ +U; –v;)+g,
At

where Dp is the particle drag function (see Appendix C) and the particle is located in
momentum cell (i,j,k). The gas turbulent velocity U’p is held fixed for a number of
computational cycles k such that

tn+k-l
– tn <tturbd’+k – tn > (G-3)

where U’p was last chosen on cycle n and tturb is the turbulence time evaluated at the

position of the particle on cycle n+ k. Section IH.C gives the method used for randomly
sampling for U’p. The velocity U’p also enters in a straightforward fashion in the differ-
ence approximations to the equations for mass and energy exchange given in Appendix C
and the difference equations for droplet oscillation and breakup of Appendix F.

120
‘When A-t”> tiu,~ it.is.no.lon~r. ~titie.ta-la=.the= difference approxirnatiwx-
because the particle “sees” more than one turbulent velocity U’P on the current cycle.
-—
~ossitie-=a~-aches~~=this~robiem- are-‘R restri’c%A’ti”ti-~be-
some fracti-on Of”~~ur~ or to
~cycle.the.ti~~e~ations.lming subeych.timestep ~tsuc-h that M< t~ar~.‘I%ess
methods are computation ally inefficient, however, when tlurhis smaller than At, and are
unusatile when tturhbecomes Ord@S Ohagnitude Smailer than Ant.
Char..
apprmachto this -problem fomak=s-sem~aevaraey to obtain mrnptitationaleffi-
~ie~~_y._
. W-=.> Q~Y~
, “~we.~Q~~c .r~nd~. v~l a~i@ and ps~l~iea.:ckaP.ge#’r9mA=pzb ah$]ity-
clistributiims-that we have dixi~edss””far the dioplet turbulent ve-locity an-dposition
c-hanges~.T=hu~..ti+*&.ti-b.w=’~M.”is=eelatik’e”*A:t~r~; cmrmethu&rq@%SiR5
Choim &0K4JT-!W4M%HX141ZB
>WWdXMH?.Wll
-&MH*, i3WAA&f3%Ri~i~- %~s–*fi-*ti-leYfi-ve-’mci&
change and one to determine its turbulent position change.
This approach is-inaccurate-in several respects. First, when-At > ttubi .we ignore the

effects of the fluctuating velocity u ‘P on heat and mass exchange and on droplet breakup.
Second, in deriving the probability distributions for turbuient velocity and position
Gliamgq -we liave =am--dmekthat~bhe-b~”um~tion D;J k, .amd=tjurh are constant for a given

particle on the current timestep. In particular, the effects of a nonlinear drag law are not
ineludedin th-~probability distributions. T-here a~pears t-obe no “alteWmdh-b-th~-
assurn@imr of-a-linear cirag..iaw bec-ause-use afa.nmdbar “M. rend~rtifitr.adahldlie.
probi&m ofd&riviti-g~obaMlity distributiomfor turbulent velocity and position changes.
T-hederiva$icm ofthedis%ributiof is~@venin&~: S3; .and:hem--we-only-~umaulm-
the-resuits: Tne- assumption ofa hear drag law aHows us to treat.each.componemt~fthe
velocity and position changes independently. For each component the distributions are
Gaussian; the velocity distribution has variance

an-d:the p_osition distribution has variance

~
Zt (3,
0:, = t~urbAt – +[1 –exp(-D9At)l+ ~ U2 , (G-5)
[ .— q62 }
‘P

where 02-= ~lz. An additional quantity, a turbulence persistence time trmr,is used in
ehoosingthe-tuAulentpos ition-ch1~e--antentem'ue=use-tb-e distrillution ofvelocity and.
position changes are not independent. Thisquantity isgiYemby-
(3:,
L~U,Jl– eXP(-DPAOl– —
z) (T2
P“ (G-6)
t=
per
0:,/02

When At > t~Ur6the particle velocity and position are updated using

.; -x; 6X’ (G-7)


=v; +—
At At

and

“B _ Vn
PP (G-8)
=Dp(u:k–v:)+ g+:,
At

where 8x’ and tiu’ are the turbulent position and velocity changes. First, each component
of 6u’ is chosen from a Gaussian distribution with variance OU’2. Then 6x’ is calculated
from

8X’ = twrm + 6X; , (G-9)

where each component of bx’h is chosen from a Gaussian distribution with variance OX’2 —
tper%u’z.

APPENDIX H

THE VARIABLE IMPLICITNESS PARAMETERS

Variable implicitness is used in KIVA-11 when differencing the diffusion terms and
terms associated with pressure wave propagation. The amount of implicitness is chosen,
in part, to ensure numerical stability of the difference approximations to the individual
terms in question. If stability were our only concern, fully-implicit schemes would be used.
Computational efficiency can be gained, however, by minimizing the amount of implicit-
ness. When the timesteps are small enough, KIVA-11 will automatically use stable ex-
plicit schemes for which no costly iterative solution is required. When implicitness is
required, K-TVA-II uses a partially implicit difference scheme in whwh there is some

122
weighting of both the old- and new-time values of the solution variable. It has been our
experience that most iterative procedures for implicit equations, including the conjugate
resJdtial:method ”d*d-in .RIIVZA-II;~umvergemore slowly for fully irnplieitthan for
partially implicit schemes. A fiuily implicit scheme is only used”by KNA-11 in the limit. of”
an “Mh-ti&elj l&rfge_tiiBWzp; .Iil -w-~”-we.@.v.e:’&:mdym~ :-wHcktisfcLm.K&:
the implicitness parameters are 13aseck Imaclditiorrto rnotivatingtk-forrns ‘we-usc-f%w+ke-
implicitness parameters> the analyses are.interestingin that.they reved.the.natnm.of.
some of the numerical errors inherent in KIVA-11 solutions.
‘~e-fimt-&e-the-anatysis-fOr determiningthe implicitness parameter @~ for the
pressure gradient terms. The form of-@Pis.obtained%y considering tlie.KIXA,lI finite
difference equations applied to the problem of one-dimensional inviscid acoustic wave
motion in a gas with nearly uniform density p. and pressure po. We use a computational
mesli with uniform cell ‘si~e & and ‘cross-secti~nal ‘area A. IE cme diineriskm th”eapproxi~
mations to the vertex momentum equation (78) and cell face velocity equation (86) both
reduce to the same form:

In (H-1) uj+ ~is the velocity at a vertex or a cell face between cells~ and~ + 1. All Phase B
quantities equal their advanced-time values (e.g., PjB = Pjn + 1) since convection terms are
negligible for acoustic waves. An equation for tiie.pressure-ii-ohtti-nefiy combi-ni-ng
Eq. {102) for-the celhdurne change and the linearized form (112) of the equation of state:

(H-2b)

In (H-2) VjB is the Phase B cell volume. and VOik the initial-uniform.cell .vcdurne..~o. =
A Ax. Combining (H-2a) and (H-2b) gives

n+l n.+ L a.+i_


p, –-p; ai4A—ui_4_
Jr
‘+yp
o
‘“= “=0.
At Ax.
By using (H-1) to eliminate the velocities in (H-3), we could derive and analyze the differ-
ence approximation to the pressure equation. Our approach is to keep (H-1) and (H-3) in
their present forms and solve for both u-+ ~ and Pj.
Numerical solutions of (H-1) and (H-3) can be found in terms of the Fourier compo-
nents of Pj and uj + ~. Substituting the values

P: = An YPO~P (ikj Ax)

and

n
=Bncoezp[ik (j+~)Ax] (H-4)
‘j++

into (H-1) and (H-3) and solving for An+ 1 and Bn+ 1 yields

1 + a2(l – @p) ~

()(
n+l
A An

— 1 –a2f$p 1 –CZ2+P
— ,
n+l
(H-5)
B a 1 )() Bn
1 –d~p 1 –a2@P
\
wlfere

a=–2i C!~sinqs12,

coAt
c*=—
Ax’

1 YPO
co=— f —2
a P*

and

y=k Ax.

Numerical solutions will be stable if and only if both eigenvalues of the above matrix are
less than or equal unity.
The eigenvalues L of the matrix in (H-5) can be seen to be

1 – 2(1 – @p) c~sin2 qs12 + 2c~ sinq5/2 J(l – @P)2C2 sin2 qd2 – 1
s
A= (H-6)
1+ 4@p C~sin2y12

124
If (1 – @P) Cs <1, the two A are complex conjugates and have common magnitude:

{~.7)
i hi =-H -i 4Q”PC?:
siTL2
@21- ‘- .

Thus $hese.hwne isstable if.(1 —+P)C. <-l:or, equivakmtly, if@p-.—>-1 – UC.S.


ltiotivated-bythis-result; we calculate the value of $~ based “on the itwii Courant
number C’s:

(H-8)

where

Ax = min (Axi , Axj , Axk) ,

Ax::=*[lx;-– x:~~+ lx;. – x;i21-,

(H-it))

and the xi~’s refer to the vertex locations of cell (i,j,k) as numbered in Fig. 2. The quantity
~is an empirically determined safety factor. The above analysis gives f> 1.0 as a suffi-
eied-cwltition-for~tatiilityinone-dimensional “pmWlems-with-unifom-ceilti~sa&
material-properties. Using f = 2.5 has been found to give stable results in all our test
@]&c&*;erls.
When C. < 0.4,.@P will-he zero and an explicit difference approx-imation will be used
by KIIJA-H. Thec~llfac*=velocities-am-fimt+ound=fl-om WI. (86); and then the Fha-se B-ceil
volumes and Phase B pressures are found from Eqs. (102) and (112). Since the magni-
tudes of the eigenvalues give the amount of numerical damping, Eq. (H-7) shows acoustic
waves are not numerically. &rnpe&by thik.esc.plid~kiherne, .aitk-mglhthere. is some numer-
.
icai di sp&wsion-ot+wous+ie kvaves. ‘TW3 R the difllirence scheme used:iil-tlie-oti~inai ‘KlIA-
codel to calculate pressure.~ve.~-pagatim.

125-
We now motivate the choice for @D, the variable implicitness parameter for the diffu-
sion equations. The form of @D is indicated by an analysis of the KIVA-11 difference approx-
imation to the one-dimensional diffusion equation with constant diffusion coefficient v:

Y;+l – Y; Yn 2Y; + Y;_l Y;:; – 2Y; +1 + Y;:;


=v(l–(#)D)
J+l —

+ +D
(H-n)
At [ Axz AX2 1

Substituting

Y; = An exp (ikj ~)

into (H-n) gives the following equation for An+ 1“.

1 + 2(1 –@D)cd(a-JsqJ
– 1)
A ‘~l/An =
(H-W _. .
1 –2@Jcosy-1) ‘

where

VAt
cd=—
AX2

and

y=kAx.

Now we require that the approximation not only be stable, but that the amplitudes not
change sign:

n-l-1
A (H-13)
()<— =1.
An

It is easily seen that the right-hand inequality in (H-3) is always satisfied. To satisfy the
left-hand inequality, since the denominator of (H-12) is always positive, we need the
numerator to be positive. The numerator is minimized for Y = rzand has the value
1 – 4(1 – @D)C~. This leads to the criterion
or

1
QD=-I- ~ . (H= 1-4)
~.

Motivated by this result, we compute $D from the equation

where

and Axi, Axi, and kk are defined in (H-1 O). In (H-17), As.is the ratio of the second to first
cQefTIZ-ititsQfvi&QQiy; 32 ii+:theStimidt number; .and-lr., -Pi-k,and-.Prt ar.e,l%andtl num,
be.rs fordiffusion-ofheatY turbulence kinetic energy, and-turbulence dissigg-dkn~--mte: For
real gases; the arguments in- (II-17) are normally near unity, and one value-of @D is-used
to calculate diffusion of all quantities. If one has an application for which there is a large
variation in the values of’these arguments, then it is advisable to use separate vaiues of”-
*D for diffusion of each quantity.
Note-tktif we-had requiretijust stability of the difference ‘approximation: .thatis.
.4P + ~j~? —>. _ ~j from .(H-1~.)it w~~ld ha-v~bw~ sufflei~t ~0 ?Ak+

or even OD.= *._ ~isi"atter-Mheme-igt"ne-i5~aK.IN"icQl"~me.thQd?i" anu:iS wwmd-cmder.


aec’uratein time; Although more am.mate in time; the &ank-~Nicokon method and-other
methods that violate (“H~14-)have “overshoots” “and“are inaccurate for large val”ues of”-C;.
APPENDIX I

KINETIC CHEMICAL REACTIONS

Here we specify the procedure for evaluating the progress rates 6A for the kinetic
chemical reactions. Since there is no direct chemical coupling between different cells, we
may focus attention on a representative cell (z,j,k) and suppress the subscript ~k.
The progress rates chrfor the kinetic reactions are computed under the assumption
that, for each reaction r, every participating species is either inert (amr = bmr) or appears
on only one side of the reaction (amrbmr = O). We first calculate the quantities

‘f, = $ ~[ (;m/Wm)amr
m

and

%r = k~r n @JWm)bmr, (I-1)


m

where kfrn and kbrn are evaluated from Eq. (17) with T replaced by Tfl and ~nl denotes an
intermediate value of pm that has been updated due to kinetic reactions < r but not reac-
tions >r. We next identify the species, call it species K, for which

Wm(bn,r – ant, ) (i2fr – QJ /p m

is a minimum. This species is called the reference species for reaction r; it is the species
whose densitY is in greatest danger of being driven negative. Once K is identified, we define

AB = FK + ‘tw~[aK~ !2fr + bKrQbr] (I-2)

Then tirA is given by

FK(ATIAB – 1)
if =
AtWK(bK, – aKr)

This prescription makes the part of Jp}J~tthat is due to reaction r linearly implicit in pK,
I
I
which prevents pK from being driven negative no matter how large At k.
128
Irr this-appendix-we describe the two ‘procedures for evaluati ngtkie.pmgressrates.
cbr-4fix the equilibrium reactions. For hydrocarbon combustion, a fast, aigebraic solver is
provided in subroutine CHIViQ@Ij~or more general-circumstances, an iterative.solyer. is.
provided in sulmo.utine HUiMZQ, The dkmieeof subro~tin~-is-d~~tiine~by”inpatiqag
KWIKEQ: If-KWIKEQ -=0; CHEMEQ is-used; if KWHSEQ- = i; CHMQGM-is used. in
the latter case one does not need to input the stoichiometric coefficients and constants
used-’t compute equilibrium-cmtiarltsin-Eq, (19); these are stored in data statements for
t.he~pe~ifi~.W.t..~’_tiQaGtiGnS=l~edi
lti..CHMQ@&LW% !!!&t describ+ ~hemer+gene%al, itera-
tive solver.

I* SUBROUTINE CHEME-Q

Hemwe-&scfib-the-procedurein subroutine CIHKMiiK-for evaluating the progress


rates cbrAfor the equilibrium reactions during Phase A. The cbrAare implicitly determined
by the reqtiirement that the Phase A species densities pm~ must satisfy an approximation
tath~e~tilibrium .constraint conditions of.lTq. (18):

where

and-T and-TA -are partially -u@dtettemperatures-t hat- will be defined shortly. In (J: i) we
have fineariied”f% KCr”about its starting value $; (The spatial indite ijk will be suppressed
tlirougficmt .tliis appemlik~ as there G-m direct ehemieal muplingbetween different ~~lls-.)
These constraint conditions constitute a coupled nonlinear equation system which is solved
by afi iteraQve-procedfifie.? s--T;heiterafionschaeused -is-azr hrrprovcmren-tover the eariier
sehwne=used -in=CON~CI~A&-WRAxiZ-]Q
arz&includ~s%he-eff
ectson the e-quiliiiri urn con-
straints KcF-”of”heatreiease.from the eq.uilibriurnreactions. ‘iZ For
. . simplicity-, we assume
that the fuel species.(speciesl), .of.which.thesp-ay-particles are ~mmposed, does not parti -
eip ate hnany G1-tke:eal.ti”li”bri
iml~rfmctifis

129
The iteration scheme consists, in essence, of the following ingredients: (a) precondi-
tioning of the equilibrium constraint conditions to make them more nearly linear in the
progress variables, (b) application of a one-step SOR-Newton iterationG3 to the precondi-
tioned system, followed by (c) switching to a full Newton-Raphson iteration if the simpler
SOR-Newton iteration fails to converge in a specified number of steps. If the equilibrium
reactions are weakly coupled, convergence usually occurs before the full Newton-Raphson
iteration is called into play. However, if the reactions are not weakly coupled, the interac-
tion between them is properly accounted for by the matrix inversion in the Newton-
Raphson procedure.
Within this appendix, we denote by pm and ~ partially updated species densities and
fluid temperatures that contain the contributions due to kinetic chemical reactions on the
current timestep. ? is given by

where the sum is over kinetic reactions.. These values serve as initial values for the itera-
tion procedure. The final converged values of the species densities are the pmA. The
species densities are related to their initial values by

em = pm+wm~(b – ant,)
0.,
(J-2)
rns
s

and the partially updated temperatures are related to there initial values by

(J-3)

where OS = At hs and the summations are over all equilibrium reactions. We denote by
USAthe values of us for which pm = pmA and T = TA. The values of h~A are then simply
~8A = m~A/At. Because of Eqs. (J-2) and (J-3), we may regard Eqs. (J-1) as a coupled non-

linear system of equations for the unknown quantities @S‘. Since these equations will be
solved iteratively, we introduce an iteration index v, which will be displayed as a super-
script. Thus the approximation to USA after iteration v is denoted by QSV,and the corre-
spending approximations to pJnAand TA are

130
and

T’ =?+f~
I (@j(pn
I C;) (J-5)
s

It is understood-that co.s0“= 0-, so thatpk o”= pi and-’~ = ‘fi It will-also be necessary to


refer ‘Q intermediate species densities defined by

andintermediate temperatures ‘T(v,s) ddi”ned -by

‘Whf3R”iY is the numbenfequilibr+um- reactions.


One further notational convention will prove useful. We introduce a vector p = (pl,
Pj> ...9P-MS,T) -who~e ~~mp~nents am the SPeGieSdensities P.h and-temperature T. F~~~=
tions of the pm and “’Tcan then be compactly written sirnpiy as functions of”the vector vari~
able p. The notation pVrefers; ofccmrse, to the vector-whose components are the pmVand-
~~, andp(v,sjrefers to the vector with components pm(v,s) andT(~,sj.
We now proceed to consider how the equilibrium constraints of Eq. (J-l) might be
preconditioned”to make them more nearly linear in the m~. The first step is to identify the
principal or-dominant dependence of the left member-of Eq. .(J-1) upon the m~~i.The form
uflhis-quantity suggRststhat-we-&temine; for-earh-reattimrs; the-species-m for which:
the factor (pfi/Wm)b~~ ‘a~~ depends mostsensitively, in some appropriate sense, on the
QS. Let-this be-the- species wit~l-index m-=- p(s) and-denote- bu(s),s — aufs),s by q~, The
spe&s .m.= p(~j Will ~bem!=ErredtQas the r-&Sr-ume-speeiEs fiir-reac.ti6n -s. ‘The .cbminant.
dependence of the left member of Eq. (J-1) on the tiSAis now regarded as being contained
ifi-the-fh-ctor-@AYi@
.“ /Wu@.i.
‘ Sifice-.~iSj it=if.i~ifiem.iti.the.(~s, .thiifiminant.cQencL
en-ce-c=n-b-e-m-de- tu m-anife-stitself Iin-e-arly-by-raisin-g-b-oth- s<-de-s
of Eq. ($1) to-the-p-o-wer
p~.= llg~, We therefore replace the constraint conditions of Eq, (J-1)M the precondi-
titmeii:coms%raitit-cmditions-
It is convenient to introduce quantities F~(p) and G~(p) defined by

–b
Gg =@? ~(pmiwm)”ms ‘s (J-9)
m

and

I?. = G-P’ – exp [p~Ds(TA – fi] , (J-1O)


8

in terms of which Eq. (J-8) becomes simply

F$pA) = 0. (J-11)

We have yet to specify how the reference species are to be determined. For simplici-
ty, we define the reference species for reactions as the species for which the factor
(pm/Wnl)h~S-a~S depends most sensitively on co. alone, without regard for the other prog-
ress variables. That is, p(s) is the value of m for which the quantity

Pm arns-bms d Pm bms-ams
R— (J-12)
ms ‘w
— () <w H
m m

is largest in magnitude. This quantity is easily eva uated from Eq. (J-2), with the result

R ~s = (Wmlpm) (bms – an,s)2 . (J-13)

This depends on pm, so it is necessary to specify which species densities are to be used in
the evaluation of the reference species. This will be done below.
In the subsequent development, we shall require the partial derivatives dFJdut,
which are also easily evaluated from Eqs. (J-2) and (J-3). The result is

aF -P,
s (J-14)
— = psGs ‘Ast – (p$DsQ/pcP) eXp @8 Ds(Tk – ?)} ,
a~l

where the matrix ASl(p) is defined by

(J-15)

132


%&vitiaec&Eqs-. (J-2) an*(LT-3’)”,the quantities-F~(fi), G;(p), ad~~~(~”may.altern ati~]el~r-
be regardedm-ftictibnsd.the progress variables -s j and this-will bedone without”special
comment when it is appropriate or convenient to do so.
The- iteration sch~e.as a-whole is structured M.f611b3v&.TAefirst.iV-0iterations-are
performed }vitha-on~~ep SOR-h~ewtonalgofithn; If-convergence has notalready occur-
red, all subsequentiteratimm are-perfmmed-with a Newton-Raphson algorithmie~cept..as
noted in the description below). We currently take NO = 7. The iteration scheme is con-
s%iinwdtulitive converged” when ~GsPWs~< s fdr-ail”s. Gm-rezWy z istake~,-te-be G:3z: ‘wTe
now proceed to a detailed description of the SOR-Newton and Newton-Raphson algo-
I%tkms-thdt-am--used-:
.Aone-s%p SOR-N%vton iteration procedure; applie&to--the-system of Eq. (J-i-l-j,
taJX&heUfQrmW

where Q is the overrelaxation parameter. Equations (T-14), (J-IQ), .(J-6), and (J-?) allow
us to rewrite Eq= (J-16) in the more useful form

where G~ and A$~ are evaluated at p(v + 1,s) and T is evaluated at Z’(Y+ 1,s). It.is not neces,
sa~fxxa-ctually evaluatep(if + 1;s) by means-of Eq. (V~6],because ifthe pm are ccmtinua-lly
updated as running sums then P(V+ 1,s) is simply the “current” value of p just prior to the
evaluation.of @sV+ 1;
Strictly speaking, since ps is considered constant in evaluating dF~/~0~, p. (and
.—.
-..
therefbre.qs) should be held-constant and not allowed to vary with V. This mi@t seem all
the-i~ advisiideimview -oftfie-fact-thatp~ varies discontinuous~y with the p= or ~~. In
practice; ho.wewe~5.-we:h-ave found that convergence is-slightly accekrated-if ~~ and q$in
Eq. (J-1.7) are allowed to varyby reevaluating p(s) in terms cfthe P;m(v.+us.)
... or.every,
iteration No-problems have ydleeme~erienced.”ifi. dbitig soj but if such pr3Mems were.
to occur it woui”d”merel”ybe necessary to ho~dp~ and q~ fixed with the values determined by
the initial .spw~-iadmsities-~w:
Tine value of co~%’+
1 – ms”~given by Eq. (J~lT) is subjected to the restriction
where

~in Wm(a – bm~) -1


66)srnin _–
I m’
ms

pn,(’v+ 1,s) ‘
(J-19)

–1
~ax Wm (a – bn,s)
ms
tkll- = (J-20)
s [ m Pm(v + 1 ,s)

are the minimum and maximum values of QSv+l _ COSV


that preserve the nonnegativity of
the pm.
A standard Newton-Raphson iteration applied to the systemofEq.(J-11) yields

~ [aF,(m;,.... ti~)lao~l(O;+l - 0;) = -F,(GI;,


....mj). (J-21)
t

Using Eqs. (J-14), (J-1 O), (J-4), and (J-5), we may rewrite this as

~ [A
St– (D,Q/p CP)I$ q) @$Ds(?’v– ?)}] ((J);+1– (i-))
= (/s[G: (MJI Q)$DS(TV
– m}– 11, (J-22:
t

where GS and AS~are evaluated using p~. To obtain the OS”+ 1, it is necessary to invert an
N X N matrix. This maybe done using any of the standard methods, one or more of which
are usually available as modular library subroutines in large computer centers.
Again, ps and qs should strictly be held constant in Eq. (J-22). In practice, however,
we find it slightly advantageous to allow them to vary with v by reevaluating the refer-
ence species in terms of the pmVon every iteration.
In spite of the preconditioning, Eq. (J-22) occasionally yields values of us’ + 1 that
drive one or more of the pm”+ 1 negative. (In particular, this may happen when a single
trace species of very small concentration is involved in two or more reactions, as the ma-
trix then becomes ill-conditioned.) When this occurs, the values of OS”+ 1 – ~SVgiven by
Eq. (J-22) are all reduced in magnitude by a factor a(O < a < 1), and the pm”+ 1 are recom-
puted accordingly. If any of them are still negative, the reduced values of coSV+ 1 – USVare
further reduced by another factor of a, and the pmV+ I are recomputed again. If necessary,
this procedure is repeated up to Na times, whereupon if negative values of the pm’+ 1 still
persist, the Osv+ 1 given by Eq. (J-22) are simply discarded, The iteration is then repeated
as an SOR-Newton iteration, with the QS‘+ 1 obtained from Eq. (J-17). We currently use
the values a = 0.3 and Na = 6.

134
II. SUBROUTINE CHMQGM

Subroutine CHM~GM-utilizes an algorithm devised “by Nieintjes and Morganz~ for


the solution for the simultaneous equilibria of”sixxe~tibntirn~l.an t.in-hydro~arbon
oxidation:

N2$2N

2H20 + 2H2 -t 02

‘m-mntmi~t=taCXii!3M33Qj;which so”ives for reaction progre.<tincrements car~,.CHM~C.M


solves fiir the equilibrium molar concentrations ofthe-chemical species. Four additiomd
equations-are needed”’t solve for+l~ete~rconcentrations; and these are just the eiement-
eonservation reiationsfor carbon, hytio~n,.oxy~m, andnitrogen. The temperature T
used .+mevaluate the equilibfiumcatiallts-~zc! forreartions (J-23) is given by

(J-24)

where the sum is over all kinetic chemicai “reactions. Because the formulation does not
include the effects on the equilibrium constants of heat release from the equilibrium reac-
ticm~ srrall.cycle to Cycle osei lla-tions=lnkmperature a-ml.sp~-i~--cmnc~nt~-atio~m-can--oecul-
in some-aTpiications. ‘z These oscillations are small in most hydrocarbon combustion
problems, however, and it is better to use subroutine CHMQGM-instead of CHEMEQ
because itis-muehfaskr.
The”increase in speed of subroutine LCHE?IIG2-iSachieved-because the ten equations
for the concentrations.are. algebraically reduced-to a much simpler systemj which-can be
quickly solved. The details of this reduction can be found in Ref. 24, and here we only
summarize the simple system that is solved. First the equilibrium and element-
rmnservation equations involving-nitrogen; which are uneotipled -from the rernaindernf-
the system, are easily solved for the concentrations of molecular and atomic nitrogen. The
remaining eight equations are then combined algebraically to obtain two cubic equations
in two unknowns. These are scaled concentrations of atomic hydrogen and carbon mon-
oxide. The simultaneous cubic equations are solved by Newton-llaphson iteration, using
the scaled concentrations from the previous cycle as a first guess. Because of the manner
in which the equations are scaled, it is always necessary to have at least trace amounts of
carbon present.
The values of reaction rates d,A are not needed when subroutine CHMQGM is used:
The mass and energy source terms are difference by

(J-25)

and

where pm is the initial density of species m before equilibrium reactions and Eq. (J-26)
follows from combining Eqs. (20), (21), and (22).

APPENDIX K

CALCU ,ATION OF VELOCITY GRADIENTS AND VISCOUS STRESSES

According to Eq. (4), evaluation of the viscous stress tensor requires evaluation of
the velocity gradients. These gradients and stresses are taken to be cell-centered quanti-
ties and are considered uniform within regular cells.
Velocity gradients are obtained in the following manner. We begin with the identity

au~
— =V. (utem) , (K-1)
axm

where Ueis the velocity component in the tth Cartesian coordinate direction and em is
the unit vector in the mth Cartesian coordinate direction. After integrating Eq. (K-1)
over computational cell (i,j,k) and using Gauss’ Divergence Theorem, one obtains

136
where S~k is the surface of cell (z,j,k). The left-hand side of this equation is difference as

and the right-hand side is approximated by

~ (u,)aem Aa , (K-4)
a

-where:(ut)a is-.the.equal-wtighted average of the fciur vaities Oftit -associated-with the


four vcr~ices bordering face a, and Aa is the outward area projection vector of face a.
.After.eai~-uiatitig-th%e~~doeity gradients, the stress Lmmponemtsin-cell (i, ,~,k)are
obtained from

(K-5)

-where -the superscript-v denot~-.to.tim~-’~vdtitv.eiociiyiy. fieid;

~n tlhis appendix -wede scribe the aitern-ate n-o-decoupier used in IWV’A. This i“sa pro-
cAtief6r=b@ngihe~ 50Wg1~s.veiGeity-madGs $hat-o-ccurinnumw;eal fluid dynamim
calculations that have velocities located at computational cell vertices. The basic idea of
our pocedure is to detect and subtract, in each computtiionakdl, .velocity-.nmdes fbr.
which the finite-difference approximations to the mean velocity and velocity gradients are.
zero. ‘Tliiisis done in sucii a way that linear momentum is conserved. Since these modes
have no caicuiateci “mean veiocity. or veiocity ~dEnt~.nQ.~.ytiml”form.s are~nt.rodueed ~
iiy.tkmme_calv; procedure. ‘I%e pZ0e4Zlrde*.in$20d~~ ~-SlllZiiintinleriC~l dtiH@ng-
whose nature is discussed in Ref. 16.
In typical hourglass velocity modes, the average velocity and velocity gradients at
each cell center are zero when these are calculated from centered differences involving
just the vertex velocities of the cell. Thus in the absence of an alternate node coupler, no
force will be calculated to damp the hourglass mode.
In order to detect the hourglass modes in KIVA, for each computational cell, we con-
struct a set of vertex velocities with approximately the same computed mean velocity and
velocity gradients as the velocity field in the KIVA calculation, but which does not have
the hourglass modes. This velocity for vertex t’ of computational cell (i,j,k) is given by

z M’ Un
mm

U: =
‘z% ‘
m

where the summation is over the vertices m of cell (ijk); M’ ~ is the mass associated with
vertex m;

are the velocity gradients calculated as in Appendix K; ~~~is the center-of-mass


x-coordinate

x M’ x
mm
(L-2)

and ~~k and ~~kare center-of-mass y- and z-coordinates defined in an analogous fashion.
It is seen that u~ is the sum of four terms. The first is independent of t’ and is the mass-
averaged vertex velocity. The remaining three sets of velocities vary linearly in physical
space, have mass-averaged velocity equal to zero, and, as we will show below, each has a
derivative approximately equal to that of u~ in one Cartesian coordinate direction and
derivatives equal to zero in the other two directions. It is natural to assume that velocity
fields that vary linearly in space do not possess hourglass modes.
The hourglass modes for computational cell (i,j,k) are then given by

anc _ n (L-3)
‘t ‘Ue– u’?.

138
ThequantityAJJC is auser-inputpa~etenbse-va~ue-is%~jca-]ly taken to be 0.05. A
factor of+ is inserted into Eq. (L-4) so that the effect of our alternate node coupler con-
forms.in some simple cases to that of previous node couplers.49
Itis easy ‘m ‘verify ~hdt-OUr~Od-e-COU@er
conserves momentum. Indeedj hy. summing
M’t8utanC over all vertices t and substituting from Eqs. (L-4), (L-3), and (L-1), one obtains

(L-5)

We now-show tha%.the.com~tidvdoe~ ty-derivatives ofbut~nc incell (i,j,,k-) areapproxi-


mately zero. -The.finite=dffermw-ap~oximatims to -these vehe-ity der~v-ative-aregi~~en
in.4ppendix-K-. ltcanb~enthat

where @l~zlg~ denotes.the.fi-nite. diffi%mceapproxirnation to the derivative in the


x-direction in cell (ijk), ~1 and P2 are constant, and U1and uz are two sets of velocity
values associated with the vertices of cell (i, ~,k).. Usin.~the.kfining.eq.nation~of.@UnC
and Eq. (L-6), it is seen that in order to show

m-?)

[.:],,= [:],,.
lJ lJ

Using Eqs. (L-1) and (K-2) -(K-4), we see that


=—
l–l ax ijk V;k [ u

aun
+— (L-9)
[ ?Y

where


u.. =
cJk

the sums are over the faces a of cell (i,j,k), and Za, ja, and Za are the arithmetic averages of
the x-, y-, and z-coordinates of the four vertices bordering face a. By using the identity

~A~=O, (L-1O)
a

Eq. (L-9) can be reduced to

Now ~a2aAa” i is a finite-difference approximation to the surface integral fs~k xi” dA,
where S~k is the surface of cell (i, j,k). Applying Gauss’ Divergence Theorem to this
surface integral gives

I s,,LJk
xi.dA=
v..lJk
V o(xi)dV = V,jk .

Hence we obtain

Similarly one can show

140
and

Using Eqs. (L-12), (L-13), and (L-14) in Eq. (L-n) gives

(L-15)

which is the desired result. The analogous results for the derivatives in the y- and
~.diree-ti~~~–a~~btai ned ~~.M ~..
T.hu~the ~amputed .deri~~.ati%res~f5ut~~~
in cdl(ijj~k) are nearly zero. Notallprevi=
ous alternate node couplers have had this desirable property.. For example, consider. the-
node.co.-.~ft~j.~~~~~~ ~.33Tc~w.pl~.t~r_
pr~.~~a’ @ l-P=
.a.t.l~d.i.~wpl~.iepra.~
.ea~e-a~.a~.i
~fi..~fi.
which-the solution is invariant in-the k-direction, SALE-313 superimposes on the vertex
velmities-u.kell (i;ej;k) a-veiocityfleldof the-forn_-

where.kmc = 14- + ua. — U~.- IUA..If the x- and “i-mmdinaie


computation cells are rectangular, and if centered differencin~is used to calculate
il(t3u~@/dx, the resuit”is

Thus [a(i5uu~c)/ax]~~is nonzero if this sum is nonzero..


Most..pre~iiMMalternate nwk couplers-have als.e had theundesirable property that
they sometimes subtract hourglass modes even when these are not present. Consider a
computed “veiocity fkid in which u = ax. By our assumption this velocity field has no hour-
glass nmdes... The alternate node coupler in CONCHAS-SPRAW8 subtracts a-velocity field
where again Aa~ = U1 + U3 —U2 —u4. Hence Aaflc- xl + x3 — X2 — x4, and the algo-
rithm superimposes a nonzero hourglass mode in cells where xl + x3 – X2 —x4 is not zero.
A node coupler similar in spirit to ours has been proposed by Margolin.G4 His node
coupler has in common with ours the property that the superimposed vertex velocities
have no associated mean velocity or velocity gradients. His method, however, introduces
undesirable hourglass modes when the cell vertices do not satisfy x 1 + x3 — X2 — x4 = O.

QUASI-SECOND-ORDER DIFFERENCING

In this appendix we describe the quasi-second-order upwind (QSOU) differencing


scheme that can be used in Phase C to calculate convection. Many methodsG5~‘GS’7have
been proposed for obtaining what are called monotone finite difference schemes. The
QSOU method is a modification of a scheme proposed by van Leer,22 and the basic idea is
perhaps best understood by considering the family of upwind differencing schemes for
one-dimensional convection that are represented in Fig. M-1. In each scheme we assume
the density profile within a cell is linear and has a value at the cell center equal to the
computed old-time value of density for that cell. The old-time densities in cells i —1, i,
i +1, and i + 2 are plotted using dots in Fig. M-1, and the density profiles in cells i and i + 1
are the solid lines. The four schemes of Fig. M-1 differ only in the slope used for the densi-
ty profile within each cell. For each scheme, the mass convected across a boundary
moving from point A to point B is the area under the density profile between points A and
B. Because of this method for calculating convection, the new-time total mass in a cell is
just the area under all the old-time density profiles between the new boundaries of the
cell. Assuming the left boundary of cell i + 1 does not move, the new-time mass of cell z+ 1
is the area crosshatched in Fig. M-1.
Before discussing the four schemes of Fig. M-1 we need to define some terms. A func-
tion p is monotone increasing (decreasing) if xl < X2implies P(XI ) < P(x2) [p(w)>

p(zz)). A monotone function is one that is either monotone increasing or monotone


decreasing. Now let xi denote the location of computed density pi. A difference scheme for
convection is weakly monotone if it has the following property: if pi + In lies between pin
and pi+2n and ~j+ 1‘+ 1 lies between Xjnand xi + Zn, then pi+ 1n+ 1 lies between pin and
pi+2n. A difference scheme is strongly monotone if it has the following property: if
and”

# ~ ~:ni-1 < ~.,n+l<rn


c. 1.+1. 1_+2_ i +S .>

then

(?>
‘pi –p~+ln+l> –?i+2n+l> n
-P~+# h. .
p: ‘Pi+ ‘+1 ~ ~pf~~ S Pf+3

l%e-strong~y rnonutom-p~opert yisvery desirabie because strongly. monotonaschemesdb.


ncd.have the undershoots and m7ershcmtsof-many higherordermethcxk.,2 1 Itis-easy to show
that for the family of schemes of Fig. M-1, a suffkient condition for strongzmonotonicity. is
the-fo-ilowing: if”pi ~ ~.a iies between pj~-”andj+~ . ~R-j
.tha.the.d~tity- pro~=s in .~dls i! i+- 13
.~.~~-.:.+ =->
!-?.+
-+---
.“.. -.+.-flse+=k-
uu~ “L.u. , .r~.rlyi
. ~ .~.mAm
a.+=.-~.
s=.=--
tiuLL1uZ.l&i-G”n.
‘-’e” Ca+”l
“th”iscofi”dition”the-rncmOtimm-
profiles ”condition:
Lel-usnow.rcnsidar. each .of.the schemes of Fig. M-1. In donor cell -differ~eingj the
~~ape%%-;
tki ~ =~-~ c‘+1 is-take~’~-~be=zem~ ~ano~mildifiemneing satisfies tltemmmtone=
profiies-condition and hence is strongi~. monotine.. Dbrmr.celldifferencing G first-order
accurate in space, however, and has too much numerical diffusion for many applications.
To remedy this accuracy problem, one might consider the centered-gradient scheme
ofl?ig, M-1b. H=eth~-lop*pl~x-=within eaeh ~Al is given-by

y~ !zi+l–!?i=~
(M:~j
axli= %.. ‘

T.hi~~.keme is ~tab~e-a~d=se~~~d.~
~~~accum~e; but-not- weakly monotone. “Tlfiereason is
shown in Fig. M-lb. The density profiles in regions of large change in i@/tkrcan have large
undershoots m overshoots.. In Fig. M-1b the density profile-in cell i+- 1 has-values less
tlmm:p$ and-henc~p~+ ~‘+ ~, which -is=theaverage vaiue of’p und~~ihec~hatched-’a~ea-
of the profile, is less than pin.
Va- =Leer’s-scheme remeets this problem-by limiting-— t]~e-~r~~itu~-of-tbe siope-.zz-If
p~=-ii~s-between pi _ 1‘and”pi + ~‘i, then the magnitude of the sibpe ~p/azli iS required-to be
small enough that the density profile in cell i assumes values between pi_ ~n and pi+ ~_
‘. If
pin does not lie between pi_ ~~andpi+ ~~,then-the slope ~p/~x!jis taken to be zero. The
resulting change in the slope in cell i + 1 is shown in Fig. M-lc. The slope in cell i is not
lirnitedl%ca-use-the density profile in this cell already assumes values-between pi_ ~_nand
n ‘tcan be-&omn=that=xJ.a~~le&~.heme-isweakly-monotone
~;+~=..l and is-sewmd-mxi~
accurate for computed densities for which the slope-limiting. procedure is not used. The

1-43-

a. Donor cell b. Centered-gradient

w

i—1 i i+2
I 1 1 I
B A B A

c. van Leer d. QSOU

i—1 i 1 i+2
I t {

CDBA B A

Fig. M-1. Density profiles for a family of upwind convection schemes.


144
SC&YIldS=11.QkSl’KCM@;llMM3.0tQEMk
FOE =Siill~l~j iftbf) l~ftb~tllld~~’ Qf”L~ll’i”iS~GWd’flW=
pointC’~ point-12 -inFigi M-le, then we=would-have p;!+ 1->-p;..-,.-.
~, n+ 1-evemthoqlr the-”
values-~i _ 1‘; p~~~~
pi+1‘j amd-’p~+ A%are monotone increasing.
Tine QSOU scheme was devised ti.satisf”y themonoti~WQfilK mnditidn.and.hen~
‘w be Strongly mmmtuna T-h@SObT sckeme-mig~t-also be called the minimum gradient
scheme because if pin lies between pi_ ~~and pi+ in then the slope is taken to be

(M-2)

Aswiti.vanhr%dwne,.if ~.ifldORSmd ~i~h~t~-e~~.-~i_ .I-n.a-d ~i + ~rz+h~n.A


v..... .~ /A..
..lt is $a.kep.
to bezero. In the~xamp2e ofFig. M-ldj the slopes in-cells i and-i-+- 1-am-’mth-limited’oy-
thi s-TIwse.~1
p%icm.
We now show the-QS-CllIprescripticm f~r.d@d~{isatisfies the monotone-profiles ccmdi-
tion. Suppose pi_ IV .S Pin S Pj.+~.‘“Jthe monotone-decreasing.case is handled similarly.
‘Tiien: according-ti-the.~0.11-lmeWri@.ifiY6r.thed6p~,.

and

(M-3)

From (M-3) we see that the density profiles are monotone increasing within cells i – 1, i,
and i +1: It ~emains-tx-slmw that

ap Ax (3PI Ax
Pi< + u
til~.l;<p;--’ dxll. 7

and
Ax ap Ax
pi+: ‘SPi+l–~ i+~ —
2 ‘ (M-4)
12

and these inequalities are easily proven to be true by using the inequalities (M-3).
The QSOU scheme is second-order accurate in space only when (pi+ ~ – pi)/Az is a
constant independent of i, but the scheme will be nearly second-order accurate when
(Pi+l – pi)/A~ varies S1OW1Y on the scale of the mesh spacing. When (pi + 1 – pi)/A~ is con-
stant, the scheme reduces to interpolated donor cell differencing (see Appendix N). When
ilp/ikcli= O, the scheme reduces to donor cell differencing. The QSOU scheme is method for
selecting an amount of upwind differencing that maximizes accuracy while maintaining
strong-monotonicity.
For future reference, we summarize here the QSOU scheme for a one-dimensional
mesh with variable cell sizes. Let Axl = xi+ 1 — ~~andApi = pi+l — pi. One first calcu-
lates the slopes in each cell according to

lApil lAP,_l]

d (
sign (Api) rnin — — if Api Api_l >0
ap — Ax. ‘ Axi_l ) (M-5)
L
Zi, –
0 if Api ApL_l <0 .

Then the density pa, used for fluxing through cell face a between cells i and i +1, is given
by

(M-6)

In Eq. (M-6) Xais the location of cell face a, 6Va is the flux volume, taken positive if cell i is
the upwind cell, and Vi is the volume of cell i.
There are many possible ways to extend this method to a three-dimensional mesh of
arbitrary hexahedrons, and we have chosen a simple extension in which the fluxes in each
coordinate direction depend only on gradients in that coordinate direction. Consider the
determination of the quantities pa”, where p is one of the cell-centered quantities to be
convected (p = pm, pI, pk, or pk 3/2/8), ~is the convective subcycle number, and a is the
common face between cells (i, j,k) and (i+ l,j, k). Fluxes in the j- and k-coordinate direc-
tions are treated analogously. Using a straightforward extension of (M-5), we first calcu-

146
late the cell-centered derivatives-of p.withre~ect.ti.ddmce.s.in.the~.c~mdinate
direction:

Ir@vf-7 );

where the Cell-centered Iwatimwx-c jkc are~-aleulated -usingEq. (55) and the new-time
vertex locations. Then pa~ is obtained from an extension of (M-6):

.“. ~-+r
[

ill
X;j,kl 1 – — if tiVa >0
a— , ( Vv )
L,JJ?1X
LjA
(M-9)
1. _.@v
‘f+ l,j,k z
[ Ii+l,j,k lxa-x:+ljkl[’ + v~j,k~ ‘f 6va<o
,.

h- (M-8) Xa is-the-simple-average of the new-time locations of the four vertices of dell”face


a, .Vj,~,~Vis the cell volume-after-~ conYectiY-~cl~.and.is_@ ven.by.Eq. (Idll), and.5VG.
is-the ilux-vohne asscx%%ted‘with .Keea Tfi~Uantit@517a is positive Wvolurne is kieing-
ack.led“tocell ‘(z+ I-,j, .k)by the movement of face.a, in whi~h.case cell (z,j,k) is the -upwind.
cell, and tiVQis-negative.if.cell.( i.+.Lj,k) LAming-volurne,.in which .omsecdl (i-+ l~jjk) is-
the ‘upwind cell.
Speciai-prescriptions are needed-when cells are located next to computational bound-
:. ri~a ~_facea~l~ on .a.wai~=or.an outtToW.-bound-arjr.
and-~~11--(
ij~jj,%)i-S-thefluid cell j OnHf
whose -faces is aj then
where the derivative s with respect to distance in the coordinate direction going into the
wall. The derivatives in the other coordinate directions are unaffected, unless other faces
of cell (z,j,k) lie on computational boundaries. If face a lies on an inflow boundary, then
(M-7) is used with modification to calculate the derivative with respect to the coordinate
direction going into the inflow boundary. The modification is that the density and loca-
tion of the cell center on the other side of the inflow boundary are taken to be the pre-
scribed inflow density and center Xa of cell face a, respectively. If face a lies on an inflow
or outflow boundary, we also replace prescription (M-8) with pure donor cell differencing.
Prescriptions are also required for the velocities u~~used for fluxing momentum
across the composite faces of the momentum cells. We describe fluxing of u-momentum in
the i-coordinate direction; fluxing of other velocity components in the other coordinate dir-
ections is treated similarly. First, using a straightforward extension of (M-5), we calcu-
late for each vertex the derivatives with respect to distance in the i-coordinate direction:

IAu:I \Au:-ll ,~ AUV Auv

au v —
sign (Au;) min
(

lAxil

‘ lAxi_ll )

1
~_l>o
(M-9)
~ijk–
0

In (M-9)

Au: = U* —Uv.
i i- I,j,k l,J,k

and

n+l
Axi = X:;; j,k — x.,
l,J,k “

When vertex (i,j,k) lies on a computational boundary, then the derivative, with respect to
distance in the coordinate direction going into the boundary, is taken to be zero.
In order to calculate u~~by extending (M-6), we also need a quantity analogous to
6Va/Vi. In a one-dimensional calculation with constant cross-sectional area, this quantity
is the Courant number based on the fluid velocity relative to the grid velocity. It is con-
venient to base its counterpart for momentum fluxing on the ratio of the mass flux
(6Mpc)V, defined in Sec. JILG, to an open-flow-area mass (M@V that is defined by

(M-1O)

148
The mass flux (bikf~c)’ is taken to be positive if mass is being added to vertex (i+ l,j,k) by
the-mo~ematfi~~~ jn.which~a~ .nmmentum .c~ll (z,j,k) is the upwind cell. If.@M#).?
i%itegZdiV~Yi~-~-e~~~-c”e-il’.(’i+ i’YJ“;@ ‘is t’ih~‘Up~ind’ ceii.

APPENDIX N

ITARZITAL .IJCHWJR.CELL .DIFFE REIYCING-

Here we describe the partial donor cell differeneing procedure that can be used to
evaluate the cell:f”ce quantities~~~, where Qs%a-nds-fimany o~thevaria-bl~~ pfi, pI~ph-,
pL, or u. We first describe the procedure for the cell-centered quantities pm, pf, pk, and
pL. Letthe regularee]l in-question-be c=lled-ce-ill; arlWlet~he-nei@b~ring;cell that is
common tn the face a be called cell 2.. The quantity QQ! is-valuated as-an upstream-
weighted average. ofQ~~ and Q~~. The firststep is-therefor~to determine which ~mllis the
‘Upstreamordimm%eell; ~- - =i=~lt%d~
. m= ---- Merrnified””’by the -sig~ i3f”3-V~if”tixi~>- O;.thell-ceil
2 is the upstream or donor cell ”wliile ceil “l-ii the-dbwnstrearn-or acceptor cell, and vice
versa. Tiius we define

v.
~: =\’Q2. ‘f ~v= > g
1 (N-1)
Q; if i5Va < 0

and

,Q~ if 8V” > 0


Q:={ ‘- -

Q; if 6VG <- 0,

149
where the subscripts “d” and “a” refer to “donor” and “acceptor” respectively. The partial
donor cell prescription for Q.V is then given by

(N-2)
Q~=4Qj(l+aO+900+*Q~(l–aO– POQ,

where ao and POare adjustable coefficients (O —


< ao + ~oC —
< 1), and

216VJ
c= (N-3)
VI + V2

is an effective Courant number based on fluid speed relative to the mesh.


If ao = PO= O, the above prescription reduces to centered differencing of the convec-
tive terms, which is unconditionally unstable unless compensated by a sufficient amount
of diffusion. If ao = 1 and PO = O, pure donor cell or upwind differencing results. This
scheme is stable, but is too diffusive for most applications. Its effective numerical diffu-
sivity is # UIAXin the x-direction, &lulAy in the y-direction, and # WIAZin the z-direction.
If ao = O and PO= 1, the so-called interpolated donor cell scheme results. This is effec-
tively a weighted average of centered and donor cell differencing, with the weighting
factor set at the value for marginal stability. This scheme is less diffusive than pure donor
cell differencing but is not monotone (see Sec. DIG). The optimum values of ao and Do in
any particular calculation must be determined empirically, usually with reference to the
nominal values ao = 0.1, Do = 1 as a starting point.
To prevent the possible development of negative turbulent quantities, the values
ao = 1, PO = O are used instead of the input values when Q = pk or pL, That is, the con
vective transport of turbulent energy and length scale is always done by pure donor eel”
differencing.
The procedure for evaluating upon the momentum cell composite faces is entirely
similar but is based on Nllpc instead of 8Va. Let the vertex in question be called vertex 1,
and let the neighboring vertex which shares face j3be vertex 2. Define

u; if (M4jv > 0
v—
‘d – [ (N-4)
u; if (M4~)v < 0

and

u; if (t3it4jv > 0
u: =
{
u; if (&14jv < 0 .
150
Then uawis given by

VFFrf.m’

‘whmva-, b; e; and-d-refer’mthe fcmr-reg@ar cells-sharing the regular cell edge joining


vertices 1 and 2.

T-hePhase C mm~rir~g-al~wtithm-mimics the acivection terms of”the Navier-SlOkefi


equations and consequently suffers from the usual numerical difficulties associated with.
those terms. T-he womktwo problms-are-numerieal diffuskm and -dispersiontmrmation-
errors. The first of these is well known, and the KIVA program allows the user the option
of using interpolated donor cell differencing or quasi-second-order upwind (QSOU) differ-
~nc.ing.to .redu~~this-a-rtifl~-ialsmoothing’~ more or less ae~~ptable levels ‘ihile--retainin~-
stability. Dispersion errors can be significant when using interpolated donor cell-diffem-
~_he.~ia@G ~ge..c.;harae.te
ri~$;~--i~.sp
a%i:a;-:
elmi.n~ .m.lsi=n~ar4i.51cia~
“+
.a.~@sin-.t.ke*iutien-J
oseilla%ions-’,vith -a-period-of’a%veml cells; ‘wbieh %em=to%e-mostsevere-irr re@cmsoi%tee~-
gradients such as shock waves or flames. These oscillations can be severe enough to drive
species masses negative in some cells, and it is this behavior that the Robin Hood (RH)
algorithm was designed -’~ prevent: If tl~e-m-levant-~antities-are posi tive in a cell; it is
unaffected by RHj and “ItH-isnot needed, and therefore not used; if QSOU differencing is
used.
RH is a primitive form of the flux limiter that derives its name from the fact that it
steals from rich cell~-md@tiesto. the.wm.. STupposethat.a .~lven .~dl has a neg+tive
species mass. RI-Isearches.the.six facing. neighb.oring.cells and picks the one with.the
lZmgpst-mass-of’tiie particuiiar species. Einou.qtispecies mass is removedlrom.thti~ejlta-
‘tifigits .paarmeighbaraptO--T~To-;ma3sforthatspec-ies= Tine s~eeifle
-. internal ‘energies-and’
turbulent kinetic energies and length scales of the two cells must be adjusted for this mass
exchange. If the rich cell does not have enough species mass to bring its neighbor up to
zero, all of the mass of that species is transferred to its neighbor. In this way, negative
values are reduced without introducing new ones.
While the RH procedure may seem ad hoc, it probably does more good than harm.
The diffusion that it represents is typically localized in space and time, and it does reduce
the magnitude of dispersive errors slightly. Most importantly, it represents a simple
attempt to limit convective fluxes to physically realistic values, maintaining positivity in
quantities that must be positive to allow calculation of other quantities such as chemical
reaction rates.

APPENDIX P

ANGULAR MOMENTUM CONSERVATION LOGIC

In an axisymmetric swirling flow with free-slip boundaries, the total angular mo-
mentum should be conserved. However, in their basic form the KIVA difference approx-
imations to the momentum equations simply conserve the three Cartesian components of
momentum, and this does not imply angular momentum conservation because of trunca-
tion errors. This lack of conservation is a serious problem for calculations of swirling flow
in internal combustion engine cylinders because the truncation error effects are typically
larger than the legitimate physical swirl decay due to boundary layer drag. In practice,
only the truncation errors in the rezone calculation are found to be significant. We have
therefore devised an optional angular momentum correction procedure which is incorpor-
ated into the rezone calculation of Phase C.
The essence of the procedure is most easily explained in the context of a model prob-
lem, namely the pure Eulerian convection of momentum represented by the differential
equation

a (PU) (P-1)
—+v. (puu)=o.
al

Consider the augmented differential system

a(pu) (P-2)
— + V.(puu) = ~[(y–Yo)i – (X– zo)jl ,
at
152
*psj
— + T.(p_suj= O ,
dt

s=(x_xGju–(y_–yJu, (P-4)

. .
-fk+k
‘w&e.kisAu~-’E-regaded--aa-5y.s&.m:Qf:?f’?.ve “eq=z.”n%xw. fkdefwdez% .Vi+rla’b:ks.Zi, v>
w, ~, ands. Equation (P-4), which shows thats is the angular momentum per unit mass
aboutth~ax-is4x@ = {x~,y~); plays-th~role efa-~wnstraint’which implicitly determines
. ..—.—
the depenc.kmt”variabie ?”= ~(x,t). A-n equation for ~ “canbe obtained “by combmmg~
(P-2)-(P-4j; andwhen tihisis done one finds that ~is identically zero. Thus the system of-
Eqs. (P-2) and (P-4) is precisely equivalent to the origjnal Eq, (P-l).
‘The idea now- is to write di ff~mtme---a~xitiati~nsti=ti~qs;s; @2)-(P=4) instead “of”the
equivalent Eq. (P-1). These difference equations will of course not be equivalent to those
datained.by.naively -differencing .Eqg(P-1) because oftrumeation errors, 13ifferenein~
(lZ~-(P-4) ii pref~rable because this system .explic-itl~r-containsac~nser~~atlon equation
for-t“heangular momentum d“ensitys; am% aco~enati-ve-dlT6renci-n-g-of=thi”s equation
will automatically conserve angular momentum.
.A.suitable difference scheme fcwEqs~ (P-1) -(P-4)is-

(pu)n+l – (pU)” ~+ lrLv __ ~L_)~=—


(Z.- .-=~.s. z
+ <Y. ..> (PL!&# = ~. -v w) iL
At “o

~n+l
(psJ — (psln
+ <V-. >-(pstl)n =0,
At

n+l , n+l , .n+l


.$. =- (z:— -Z.O)B.. _.@_ydQ. ,

where <V-. ->-k the s@ki] diffe~nceoperdto~se~~o-approximate the dirfferentiai “d.iver~


gemce operator. T%is scheme may”be rewritten as

(pH)’r+i =-pm+i~-+~t.pn+ i[(y.–.yo~= (p:gj


*– (~-– %;)jl ,

(ps)‘+l=(pS)n –A~KV. >(pSU), (P-9)

sn+l=(x– xo)v”+l–@y)u”+l (P-lo)


0’

where ii is the value.of u~ + 1 that.woultieAstf lmEq. .(P.-5).if.~~+ 1 were ~ro= This of.
,m~me-is-the-:.zalue Ofti~+~=tbat-.voul#
we-Obtain&%y~imply diIffere~mingEq. (P-1>. Z%
vertic=l Ccmqmnent-oi%q. (I%) isjust-

153-
n-i-1 (P-11)
W= ii,

which shows that the procedure does not affect w, as one would expect. The component of
Eq. (P-8) in the direction of (x – xo)i + (y – yo)j is

(x–xo)un+l +(’y-yo)un +l=(x-xo)u +( Y-yJ;. (P-12)

We now observe that Eqs. (P-1O) and (P-12) are two equations for the two unknown quan-
tities U.fl+1 and u~+ 1 in terms of s~+ 1, which is obtained from Eq. (P-9). Notice that it is
not necessary to explicitly solve for ~n+ 1. The solution of these equations is easily found
to be

u ‘+1 = d-l[(x_xo)%+ (x _xo)@–yo)fi -@-yo)s’’+ll , (P-13)

u“+l=d-l[(x –zJ@–yo)fi +@-yo)2; +(x-xo)s”+ll, (P-14)

where d = (x – XO)2 + (y – YO)2.Once u“+ 1and un+ 1 have been determined, s~+ 1 is.of
no further interest and need not be retained.
The net result of the procedure maybe described in the following way. One first cal-
culates a provisional value of u~ + 1 using the basic difference scheme that one would
adopt on other grounds, without regard to angular momentum conservation, and one
further calculates sn+ 1 using the same scheme. One retains the vertical and radial com-
ponents of this un+ 1 but discards the tangential or azimuthal component and replaces it
by the value that agrees with sn+ 1. Described in this way, the procedure sounds ad hoc
and unjustified, but the preceding development shows that it is in fact a well-defined and
consistent difference approximation to the differential problem,
Application of this procedure to the rezone phase of KIVA is simple and straight-
forward. At the start of the rezone phase, the vertex-centered quantity s~~ is initialized in
terms of the Phase B velocities using Eq. (P-4) above:

(P-15)

The angular momentum density s~~’+ 1 is computed by replacing u~k with sijk in Eq. (127)
of the main text, so that angular momentum is fluxed in the same way as linear momen-
tum. The corresponding values of u~k~+ 1 and v~k~+ 1 then serve as the provisional values
ili.jkand ~~k, and the final values of u~k~+ 1 and u~k~+ 1 are obtained from Eqs. (P-13) and
(P-14) with x and y replaced by x~k~+ 1 and y~k~+ 1, u and u replaced by ii~k and fi~~, and

154
W+ 1 and u~+ 1 replaced by u~~v+ 1 and u~~v+ 1. The intermediate vertex positions are
@Yen=kly=

X;k = [(NS – V)x!?k+ v x;: lYNS ,

wh-em-NS is-the number of convective subcycles.. ~e.corr~.ti~n.pQmdure.i~.optional and


is activated -byan input-flag. It is-al~vay-sd-e-ti~’atd ifinputflagCY-L is zero.

REFERENCES

4.
1. A-.A-.Amsden, J; D: Iknshaw, PIJ; -0-’Rtmrl@ and.J. .31 ITukowiq %IV.A: A.-
Computer Program for Two- and Three-Dimensional Fluid Flows with Chemical
Reactions andl?iuei-Sprays,’’Iios Alamos National Laboratory report LA-10245-MS
(February 1985).
s-. ~.. ~.. ~=&n-
L. , J. D. IWmshaw, E. .D:-CJoutmm,mdK-~Z.CYKGurtie, ‘%nprovernents
and Extensions to the KIVA Computer Program,” Los Alamos National Laboratory
report LA-10534-MS (October 1985).

3..

4. R. D. Reitz and R. Diwakar, “Structure of High Pressure Fuel Sprays,” SAE


Technical Paper 870598 (1987).

5. IL Lliwakar, “T-hree=Dim~sionall dodding-of theIn=GylinderGasB xtia~~ge--


Processes in a Uniflow-Scavenged Two-Stroke Engine,” SAE Technical Paper
870596 (1987).

6. F. Grasso, M. -J. Wey, F. V. Bracco, and J. Abraham, “Three Dimensional


Computations of.lilows in a Stratified Cha+gd30tary Engine,” SA.ETeehnical
Paper 870409 (1987 )..

7. P. J. O’Rourke and A. A. Amsden, ‘Three-Dimensional Numerical Simulations of


the UPS-292 Stratified ”Charge Engine,’T3AWTechniLallZaper 870597 (1987).

&. M: A-.Tlleoba-ld; “A-Numerical ‘Simulation ofDiesei ‘Autoignition,’~ Ph.Di thesis,


?tia-xachusetts-InstitutMf:T*hnolQ~~ (1986).
Q,

10. W. K. Chen~and- R: A. Gentry, ~Effects of”Charge Non-lJniformity cmlli@seKHiiiat..


Release .Aniilysisj “ S~ T~-h~”iea] Papw-86156~(19%):

11. R. A. Gentry. B. J. Daly. and A. A. Amsden. “IClVA-COAL: A Modified Version of


the KIVA P“rogram for”dalculating the Combustion Dynamics of a Coal-Water
Slurry in a Diesel Engine Cylinder,” Los Alamos National Laboratory report
LA=l1045-?flS(August- 1987).

155
12. W. C. Rivard, O. A. Farmer, and T. D. Butler, “RICE: A Computer Program for
Multicomponent Chemically Reactive Flows at All Speeds,” Los Alamos Scientific
Laboratory report LA-5812 (March 1975).

13. H. C. Gupta and S. A. Syed, “REC-P3 (Reciprocating Engine Combustion, Planar


Geometry, Third Version): A Computer Program for Combustion in Reciprocating
Engines,” W Report No. 1431, Mechanical and Aerospace Engineering
Department, Princeton University (1979).

140 J. D. Ramshaw and J. K. Dukowicz, “APACHE: A Generalized-Mesh Eulerian


Computer Code for Multicomponent Chemically Reactive Fluid Flow,” Los Alamos
Scientific Laboratory report LA-7427 (January 1979).

15. T. D. Butler, L. D. Cloutman, J. K. Dukowicz, and J. D. Ramshaw, “CONCHAS: An


Arbitrary Lagrangian-Eulerian Computer Code for Multicomponent Chemically
Reactive Fluid Flow at All Speeds,” Los Alamos Scientific Laboratory report
LA-8129-MS (November 1979).

16. L. D. Cloutman, J. K. Dukowicz, J. D. Ramshaw, and A. A. Amsden, “CONCHAS-


SPRAY: A Computer Code for Reactive Flows with Fuel Sprays,” Los Alamos
National Laboratory report LA-9294-MS (May 1982).

17. C. W. Hirt, A. A. Amsden, and J. L. Cook, J. Comput. Phys. 14,227 (1974).

18. W. E. Pracht, J. Comput. Phys. 17,132(1975).

19. S.V. Patankar, Numerical Heat Transfer and Fluid Flow (Hemisphere Publishing
Corporation, Washington D. C., 1980).

20. P. J. O’Rourke and A. A. Amsden, %nplementation of a Conjugate Residual


Iteration in the KIVA Computer Program,” Los Alamos National Laboratory report
LA-10849-MS (October 1986).

21. P. J. Roache, Computational Fluid Dynamics (Hermosa Publishers, Albuquerque,


New Mexico, 1982).

22. B. van Leer, J. Comput. Phys. 32,101 (1979).

23. J. D. Ramshaw, Phys. Fluids 23,675 (1980).

24. K. Meintjes and A. P. Morgan, “Element Variables and the Solution of Complex
Chemical Equilibrium Problems,” General Motors Research Publication GMR-5827
(April 1987).

25. J. D. Rarnshaw and A. A. Amsden, J. Compzd. Phys. 59,3, 48A (1985).

26. B. E. Launder and D. B. Spalding, Mathematical Models of Turbulence (Academic


Press, New York, 1972).

27. W. C. Reynolds, “Modeling of Fluid Motions in Engines -An Introductory


Overview,” in Combustion Modeling in Reciprocating Engines, Eds. J. N. Mattavi
and C. A. Amann (Plenum Press, New York 1981).

28. D. B. Spalding, Chemical Engineering Science 26,95 (1971).

156
~
IL lCIR@nu.ssenand= .E_~ti$agW,-Sxteenth-S~posium.(International) m
Combustion (The Combustion Institute, Pittsburgh, Pennsylvania, 1977)
pp. 719-729.
#yfJ:_

31. J. Abraham, F. V. Bracco, and R. D. Reitz, Combustion and Flame 60,309 (1985).

32. J. K-. Dukowic-zj J, Co?nput: Phys. 35,229 {19$30).

33. P: J. O’Rourke, %.tatistical Properties_andNumerical linplementationd~f~r.


DropletDispersion -in-a-TurbulentGas,” Los Ahwnos iWational kdmratmy repoti-
~=gJ~_pTQ9m:
..< .W2 x.,M%%@e?cEb@:cizmpi. R@%.

34. P. J. .O’Rourke, U’Collective .Drop Effectk in-Vaporizing Liquid Sprays,” Ph. D.thesis
15S2’T,” Rincet.On.University @ugust 1981)=.

35 P: J: O’Rourke and”A. A. Arnsc.kn, ‘The ‘TAKM~thod-for Numerical-~alculation of


~ raY Drop~et.Brea~~p;” SW. ‘I%ehnieal Pape~G72089 {198q)i
UP
36. J-.D. R-amshaw, .F. J-.O’RourkeY .andL. R: Stein, .J; Comput: i%ys. 58; 361-(1985),

37. P. J. O’Rourke, oral presentation to the Twenty-third Direct Injected Stratified


Charge Win-king Group Meeting; Los Alarms .Naticmal:Labor~to~J~;Marck19f%.

3*. 13:It Stull-aniFH: Prophet; “JA-NAF TnemochemicalTables,’’2nded;


(U. S. ~eparti~ntafC6mer~-,National -Bureau of S$amiards~ I?SRWWW3S 87 j
June i972=). N. “W.Chase-et-al., .J: P@s: Chem. Refi-Duta 3; 311-(1974).

39. J. O. Hinze, .Appl. Sci. Research 1,.263,.273 (1948),

40. L. lvlartinelli~ .Ft.D-.Reitz, and-F. V. 13racco, “Comparison of Computed and Measur-ed ~


Dense Spray Jets:’ Ninth-International Collo~immDy~icSof-E~~osions-and
Iteactive Systems, Poitiers, France, 1983.
~~.. .4. U. Chatwani and??. V-,Braca , “ComputationofDensApray- JetsJ” ICZAS$3-85;
London; 1-9%%

42. 1?.V. Bracco, “MadQiifigof-Etigifie S@ays,’’EXiH%aper 85M34 (i985).

43. F. A. Williams, Phys. Fluids 1,541 (1958).

4!!.

45,

46. G. I. Taylor, ‘The Shape and Acceleration of a Drop in a High Speed Air Stream” in
mk.setinfifa.~qers,o~~s. Hk@?r;.E&.G, K:. &helm:’Jd.m-[-Il~i~M=tit.y.-Ers7.
Ctibridge, Efigland; 1963).
~!;
48. A. Brandt, J. E. Dendy, and H. Ruppel, J. Comput. Phys. 34,348 (1980).

49. A. A. bsden and H. M. Ruppel, “SALE-3D: A Simplified ALE Computer Program


for Calculating Three-Demensional Fluid Flow,” Los Alamos National Laboratory
report LA-8905 (November 1981).

50. P. A. Thompson, Compressible-fluid Dynamics, (McGraw-Hill, New York, 1972).

51. N. B. Vargaftik, Tables on the Thermophysical Properties of Liquids and Gases


(John Wiley 8ZSons, Hemisphere Publishing Corporation, Washington, D. C., 1975).

52. F. Rossini, et al., Selected Values of Physical and Thermodynamic Properties of


Hydrocarbons and Related Cornpounds (Carnegie Press, Pittsburgh, Pennsylvania,
1953).

53. R. C. Reid and T. K. Sherwood, The Properties ofLiquids and Gases (McGraw-Hill,
New York, 1966).

54. R. I. Issa, J. Comput. Phys. 62,1,40 (1986).

55. C. E. Leith, Methods in Comput. Phys. 4,1 (1965).

56. B. P. Leonard, Comput. Meths. Appl. Mech. Eng. 19,59 (1979).

57. H. Jeffreys, Cartesian Tensors (Cambridge University Press, Cambridge, England,


1965).

58. S. Wahiduzzaman and C. R. Ferguson, “Convective Heat Transfer from a Decaying


Swirling Flow within a Cylinder,” 8th International Heat Transfer Conference,
paper #86-IHTC-253 (August 1986).

59. J. W. Rose and J. R. Cooper, Eds., Technical Data on Fuel (John Wiley & Sons, New
York, 1977).

60. F. A. Williams, Combustion Theory (Benjamin/Cummings Publishing Company,


Menlo Park, California, 1985).

61. H. Schlichting, Boundary-Layer Theory, 6th ed. (McGraw-Hill, New York, 1968).

62. J. D. Ramshaw and A. A. Amsden, J. Comput. Phys. 71,1,224 (1987).

63. J. M. Ortega and W. C. Rheinboldt, Iterative Solution of Nonlinear Equations in


Several Variables (Academic Press, New York, 1970).

64. L. G. Margolin, “A Method for Treating Hourglass Patterns,” in Los Alamos


National Laboratory report LA-9196-PR (April 1982).

65. S. T. Zalesak, J. Comp. Phys. 31,335 (1979).

66. M. Chapman, J. Comp. Phys. 44,84 (1981).

67. L. D. Cloutman, “Numerical Experiments with CONCHAS-SPRAY: Installation of


the FLOE Algorithm,” Los Alarnos National Laboratory report LA-10626-MS
(February 1986).

158

You might also like