Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
DENSE GAS DISPERSION MODELING
FOR AQUEOUS RELEASES
A Thesis
by
ARMANDO LARA
Submitted to the Office of Graduate Studies of Texas A&M University
In partial fulfill ment of the requirements for the degree of
MASTER OF SCIENCE
May 1999
Major Subject: Chemical Engineering
DENSE GAS DISPERSION MODELING
FOR AQUEOUS RELEASES
A Thesis
by
A~O LARA
Submitted to the Otnce of Graduate Studies of Texas AdiM University
In partial fulfillment of the requirements for the degree of
MASTER OF SCIENCE
Approved as to style and content by:
Mannan (Chair of Committee)
Kenn th R. Hall (Member)
John P. W '
ner (Member)
ayford G. Anthony (Head of Department)
May 1999
Major Subject: Chemical Engineering
ABSTRACT
Dense Gas Dispersion Modeling for Aqueous Releases.
(May 1999)
Armando Lara, B. S. , University of Houston
Chair of Advisory Committee: Dr. Sam Mannan
Production, transportation, and storage of hazardous chemicals represent potential
risks to the environment, the public, and the producers themselves. The release to the
atmosphere of materials that may form mixtures denser than air is of special concern
since they disperse at ground level.
Toxic or combustible materials with boiling points below ambient temperature,
such as chlorine and ammonia, are usually stored or transported as a saturated liquid. A
release from such a system is likely to produce vaporization of much or all of the stored
liquid, leading to entrainment and/or formation of liquid droplets in the vapor release,
affecting the density of the mixture considerably.
Current dispersion models limit their study to aerosols that are made up by ideal
gases or liquids. This work proposes extending the existing HGSYSTEM, a widely used
vapor dispersion simulator and one known as a good performer in terms of dispersion
simulation, to treat non-ideal solutions. This thesis gives a description of the
fundamentals of vapor dispersion and describes how the presence of aerosols affects it.
The thermodynamic models currently used in industry and the one proposed here are
explained in detail. At the end, data collected and the statistical comparison with the
observed concentrations and the predicted ones by other simulators are given.
DEDICATION
This thesis is dedicated to my grandmother, Josefina Salce Moraies, for all the
care, patience, and love she has given me since the very first day of my life.
ACKNOWLEDGEMENTS
The author would like to thank Dr. Kenneth R. Hall and Dr. John P. Wagner for
their participation as committee members. Sincere appreciation is given to my advisor Dr.
Sam Mannan for his guidance and encouragement during my graduate studies,
Recognition is given to the invaluable and unforgettable emotional support and
encouragement of my friends while attending Texas AEcM University. Special
appreciation is given to my family for their unconditional support and love.
TABLE OF CONTENTS
ABSTRACT. . .
Page
DEDICATION.
ACKNOWLEDGEMENTS. VI
TABLE OF CONTENTS. VI I
LIST OF FIGURES. .
LIST OF TABLES.
IX
XI
CHAPTER
I INTRODUCTION.
II BACKGROUND. .
II-1, Historical Background.
II-2. Development of a Dense-Gas Cloud.
II-3. Thermodynamics of Gas Dispersion.
III NON-IDEAL THERMODYNAMICS . .
IV MODEL IMPLEMENTATION. .
18
22
26
V EXPERIMENTAL DATA 34
VI RESULTS. 38
VII DISCUSSION. . 53
CHAPTER
VIII CONCLUSIONS AND RECOMMENDATIONS. . . . .
Page
58
NOMENCLATURE. 60
LITERATURE CITED . . 62
APPENDIX A.
APPENDIX B. . . .
67
72
APPENDIX C. . . . 75
VITA. 103
LIST OF FIGURES
FIGURE
1. Generalized vapor cloud model sequence
Page
2. Dispersion stages of a heavy-gas cloud. .
3. Initial stages of dispersion of a heavy-gas cloud. . .
4. Transition from a flat concentration and velocity profile to one with a
Gaussian distribution.
5. Airborne plume, touchdown plume, slumped plume phases. . . . . . . . . . . . . . .
12
15
6. Final dispersion stages of a heavy-gas cloud. , 17
7. Thermodynamic aspects of a typical hazardous material release. . . 19
8. Flow chart for flash calculation.
9. Instrument array for Desert Tortoise experiments. . .
29
35
10. Concentrations for all data sets at 100 m for difl'erent dispersion models. . 40
11. Concentrations for all data sets at 100 m for different dispersion models. . 41
12. Concentrations for data set 1 at 100 m. . 42
13. Concentrations for data set 2 at 100 m. . 43
14. Concentrations for data set 3 at 100 m. .
15. Concentrations for data set 4 at 100 m. . 45
16. Concentrations for all data sets at 800 m for different dispersion models. . 46
17. Concentrations for all data sets at 800 m for different dispersion models. . 47
FIGURE
18. Concentrations for data set 1 at 800 m.
19. Concentrations for data set 2 at 800 m. .
20. Concentrations for data set 3 at 800 m.
21. Concentrations for data set 4 at 800 m.
Page
48
49
50
51
22. Heavy-gas dispersion model prediction. . . 52
LIST OF TABLES
TABLE Page
1 Summary of data sets from Desert Tortoise experiments. . . 37
2 Observed and predicted concentrations. . . . 39
3 Fractional absolute deviation of predicted concentrations with
respect to observed concentrations. .
4 Fractional bias of predicted concentrations with respect to
observed concentrations. 57
5 Pure component data for chemicals used in this project. . 71
6 Miscellaneous constants for components in liquid phase. . . 71
7 Parameters for pure-liquid fugacity at zero Pa. . . 71
8 Interaction parameter for components in vapor phase. . . 71
CHAPTER I
INTRODUCTION
Production, transportation, and storage of hazardous chemicals represent potential
risks to the environment, the public, and the producers themselves. The release to the
atmosphere of materials that may form mixtures denser than air is of special concern. The
fact that they disperse at ground level makes it more likely that people and structures be
affected by hazardous chemicals and to produce higher downwind concentrations, as
compared to the releases of neutral or positive buoyancy. This issue was evident in
Bhopal, India on December 3, 1984. In that instance, 2000 civilians died from a release
of 25-tons of methyl iso-cyanate vapor, a substance twice as heavy as air (Crowl and
Louvar, 1990).
The number of materials that may form dense clouds is large. High molecular
weight, low temperatures, chemical transformations, and aerosol formation can all lead to
heavier-than-air clouds.
Toxic or combustible materials with boiling points below ambient temperature,
such as chlorine and ammonia, are usually stored or transported as a saturated liquid. A
release from such a system is likely to produce vaporization of much or all of the stored
liquid, leading to entrainment and/or formation of liquid droplets in the vapor release.
The mechanisms that may introduce droplets as a chemical is released include (Britter
This thesis follows the format of the Journal Ind. Eng. Chen&. Iles.
and Griffiths, 1982);
1. Water droplet formation due to condensation fi. om the ambient air.
2. Entrainment of liquid particles into vapor from partially flashed liquid in rapid
releases from pressurized containers.
3. Break-up of liquid jets exiting at high velocity through narrow openings.
4. Bursting of vapor bubbles at the surface of a boiling pool.
The small settling velocities of the liquid droplets will result in their suspension in
the vapor cloud, increasing the density of the mixture and its spreading and dispersing
characteristics.
The work leading to this thesis consisted of the following parts:
1. Literature search to determine what the current state of the research in this
field is and where the focus of this project should be.
2. Development of a theoretical foundation where the mathematical and
computational simulation would be based.
3. Development of the computational framework necessary for the
implementation of the theoretical models.
4. Gathering of the data to be employed in the validation of the modeling work.
5. A statistical evaluation of the results and comparison to other available
models.
It was determined that the focus be on the thermodynamic aspects of the
dispersion of heavy clouds composed of more than one fluid phase. The current
dispersion models are restricted to modeling Ideal systems by applying Raoult's or
Dalton's law to the determination of the compositions and presence of the different fluid
phases. The UNIQUAC approach was utilized here to determine activity coefficients for
non-ideal liquid phases. In addition, the Peag-Robinson equation of state was employed
to determine vapor phase fugacity coefficients. This system of equations was
programmed in the subroutines of a widely used dispersion simulator, HGSYSTEM. This
work provides a comparison of these modeling techniques to those available in other
simulators.
CHAPTER II
BACKGROUND
II-I. Historical Background
Modeling of vapor dispersion has attracted the attention of many scientists and
researchers for a few decades already. Theoretical models have been developed since the
late 1950's. Experiments have also been conducted to study the properties of these
phenomena. This chapter intends to discuss the most relevant developments in the field of
gas dispersion. The presentation follows, for the most part, the stages of transport of a
released chemical while the important modeling aspects are highlighted.
Releases of hazardous chemicals can be of many different types. The release may
be instantaneous or continuous. It may be a gas or a liquid. The source of the release may
also provide another variable to the process that may yield a vapor cloud of diverse
characteristics. Figure ] shows some of the possibilities that may take place in a release
of chemicals. The number of possible pathways and options is as big as the number of
process conditions present in an industrial facility, and an exhaustive list will be
impractical to generate.
Modeling of a chemical release is in general divided in two parts. First, "source
modeling" takes into consideration characteristics of the mode of release such as type and
size of rupture and geometric configuration of the container to predict the initial velocity
and thermodynamic characteristics of the released pollutant. On the other hand, the
Runaway Reaction
Liquid Spill
Source Scenario Hole in pipe Jet wl Stack or container plume rise
Evapomtion from spill
Liquid
jet
Source Emission Mode Two-phase Gas jet Continuous instantaneous
jet
Negauvely- buoyant cloud Dense gas dispersion model.
Buovant gas dispersion model
Non-bouyant
transport model.
Figure 1. Generalized vapor cloud model sequence. In any specific case, only a portion of the sequence would be followed.
atmospheric transport of the chemical cloud is treated as part of "dispersion modeling",
where atmospheric conditions, density of the cloud, and characteristics of the terrain
where the dispersion occurs are utilized to predict the concentrations within the cloud as a
function of distance and time.
A dispersed vapor cloud may be lighter than air (positively buoyant), heavier than
air (negatively buoyant), or have the same relative density as air (neutrally buoyant). In
the first case, the cloud will tend to flow upwards and try to stay above an area of heavier
air. A heavier-than-air cloud will eventually hit the ground afler being released, while a
neutrafly buoyant cloud will flow at a level where the density of air is relatively equal.
The relevance of heavier-than-air gases is evident in terms of safety and accident
prevention. Release of these gases will involve a high probability of human beings being
affected and/or ignition sources being encountered. One must realize that many
conditions, including high molecular weight, low temperatures, chemical transformations,
and aerosol formation can lead to heavier-than-air clouds.
Bosanquet (1957) proposed one of the first significant models for plumes heavier
than air. In his paper, he modifies a theoretical model initially proposed for the dispersion
of a stack plume lighter than air. The emission is supposed to occur from a reverse stack,
with the plume drifting immediately downwind with the wind velocity afler emission
from the stack. Entrainment is assumed to be due to both the relative velocity of the
plume with respect to the atmosphere and the atmospheric turbulence. However, the
major drawback of his approach was that the entrainment due to atmospheric turbulence
was only a function of the air's mean velocity and did not take into account velocity or
temperature gradients. Hoot, et al. (1973) proposed an improved model in terms of the
velocity field, which increased in magnitude from zero at the stack exit to the wind
velocity at some distance downwind, Hoot, et al. , neglected the entrainment due to
atmospheric turbulence, and it is well known that this turbulence is an important factor in
dispersion.
Ooms (1972) provided a much more realistic description of the dispersion of a
heavy cloud. In contrast with the earlier models, Ooms' approach allowed for the
treatment of plumes with temperature different from the atmospheric temperature. A
disadvantage of the model was that the plume's cross section was assumed circular,
contrary to the experimental results that indicate that in general it is elliptical. Ooms and
Duijm (1984) corrected this in a later paper.
Development of this model by Colenbrander led to the design of the popular
model known as HEGADAS (1980). The model improved the way in which the influence
of density gradients was taken into account on the dispersion in the vertical direction. In
addition it introduced a description of crosswind spreading of the plume under gravity.
The model initially did not treat aerosols and was applicable only to continuous releases.
The earliest version is included as part of the HGSYSTEM(Post, 1994), which now
accounts for vapor-liquid equilibrium in an explicit way.
DEGADIS was a later revision of HEGADAS (Havens and Spicer, 1985). As the
parent model, DEGADIS was originafly designed to model dense gas clouds released at
ground level with no initial momentum. It was later updated to account for vertical jets
based on the model by Ooms and Duijm (1984).
Many models have been developed in the last ten years as a development of the
earlier models. Their main difference lies on the assumptions taken to solve the
fundamental equations of motion, the correlations used to model the transport of the
cloud, or the treatment of specific systems (e. g. aerosols, continuous/instantaneous
releases, high pressure/low pressure, etc). C~ FOCUS, GASTAR, INPUFF,
PHAST, SLAB, TRACE, and the two already mentioned HGSYSTEM and DEGADIS
are among the most widely used vapor-cloud-dispersion simulators. It was decided to
utilize the HGSYSTEM in the present study since, as it will be seen later, it has proven to
give the best performance when modeling dispersion of aerosols.
II-2. Development of a Dense-Gas Cloud
As shown if Figure 2, a dense-gas release can be divided into several stages
characterized by a dispersing mechanism: (1) initial acceleration, (2) internal buoyancy
dominance, and (3) passive dispersion or dominance of ambient turbulence (Crowl and
Louvar, 1990).
In the first stage, the mode of storage and type of rupture that caused the release
dominate the behavior. In catastrophic failures from pressurized vessels there will be a
rapid flash of the stored liquid. The sudden expansion to ambient pressure provokes the
evaporation of superheated liquid, followed by an immediate formation of liquid droplets
and the development of two-phase flow. It has been observed that for some materials the
violence of these processes ejects a substantial fraction of the residual liquid as fine
Initial Acceleration and Dilution
Release Source Domittance of Internal Buoyancy
Dominance of Ambient Turbulence
Transition from Dominance of Internal Buoyancy to Dominance of Ambient Turbulence
Figure 2. Dispersion stages of a heavy-gas cloud. Adapted from Steven R. Hanna and Peter J. Drivas, Guidelines for Use of Vapor Cloud Dispersion Models, The American Institute of Chemical Engineers, New York, 1987, p. 6.
droplets of the released chemical. Furthermore, high-pressure pipeline incident
investigations have indicated that high-pressure releases do not result in any liquid
accumulation on the ground, which implies that in these processes the entire liquid
fraction is thrown entirely into the vapor cloud (Mudan 1984).
To facilitate the study, the first stage may be further divided into two phases as
shown in Figure 3 (Post, 1994).
The external "flashing zone", as the name indicates, covers the area where
flashing occurs outside the vessel or pipeline where the fluid was initially contained.
Traditionally, this zone is "bridged" by solving integral conservation laws (Wheatly,
1987a; Raj and Morris, 1987), which yield the "post-flash" conditions. It is assumed that
no air entrainment occurs because of the strength of the expanding flow. Deflection in the
direction perpendicular to the flow due to ambient pressure is neglected, and a circular
cross-section is assumed. The "external flashing" phase ends when equilibrium is reached
at ambient pressure, which assumed to occur within at most 5 diameters of the release
plane.
The phase of "flow establishment" (Ooms, 1972) is next on the path of the plume.
This is a region where diffusion of air has not reached the plume centerline and the
pollutant concentration is still considered to be 100'/o. The flow, now at ambient pressure,
is considered to be in a transition from a "flat" velocity profile to one of simple Gaussian
shape (Figure 4). In the past, this issue was often neglected based on the conjecture that
this phase is not longer than 20 orifice diameters (Raj and Morris, 1987; Hoot, Meroney,
and Peterka, 1973; Forney and Droescher, 1985). Others, as the HGSYSTEM does, have
11
Plume Centre-line
Axis (x(s), o, z, (s)}
Airborne Plume
I I I
I
(u, p„, lt») (Z) Ambient Wind
I I
) ( I I
I
I I I I I I I I I
I I I I
Typical Plume Cross-section A(s)
I I I
I I I J
(D, u, p, p, c, l»
Flash Zone X Zone of Flow
Establistunent
Figure 3. Initial stages of dispersion of a heavy-gas cloud. Adapted from L. Post, HGSYSTEM 3. 0 Technical Reference Manual. TNER. 94. 059 Shell Research Limited, Thornton Research Centre, United Kingdom, 1994.
12
Pool
0, 0. 0)'g~ I c
t tnt. s, 0) gj2) .
Iso-coucentrations contours for c c„
c
'I
'I
ct(l/L)
«„'0. '0 b
S (g
$ (Kil)
I
c
/
/ /
/ /
$, (t, )
, ) Sr(t )
b(t)=0
ca(tt) ',
/
Plane of syuunetry
Figure 4. Transition from a flat concentration and velocity profile to one with a Gaussian
distribution. CA is the centerline concentration, b the crosswind half-width along which
the ground-level concentration equals Ca Sr is the crosswind dispersion coeflicient
during the Gaussian decay in concentration at larger crosswind distances, and S, the
vertical dispersion coeAicient defining the vertical decay. B is the half-width and L is the
length of the ground-level pool. Adapted from L. Post, HGSYSTEM 3. 0 Technical
Reference Manual. TNER. 94. 059 Shell Research Limited, Thornton Research Centre,
United Kingdom, 1994.
13
approximated it by empirical correlations (Ooms, 1972; Keffer and Baines, 1963). The
zone boundary is at the point where the evaporating liquid jet starts being diluted by the
entrained air and the concentration differs &om 100'/o pollutant.
The transition &om this flow, which is basically undisturbed by air (1" phase) to
one where the cloud's buoyancy is the dominating factor is oflen called the "airborne
plume" phase (Post, 1994) An interaction of plume momentum, ambient wind, and
buoyancy effects is observed. The cross-section is assumed circular and axi-symmetric.
However, the effects of turbulence and diffusion will usually result in asymmetry and
elliptic cross-sections. The influence of the ground is still negligible, except as a
generator of ambient turbulence. This is the beginning of the "established-flow" zone, as
termed by Ooms (1972). Scatzmann (1978, 1979) and McFarlane (1988) give basic
formulation of the equations. Crosswind entrainment becomes crucial at this point.
Several people (Schatzmann, 1978 and Spillane, 1983) have done work on this area.
During the dispersion of dense gas, a time comes when its buoyancy controls the
behavior of the cloud. This is the "buoyancy dominance" or "established" flow" zone.
K-theory, "top-hat", Gaussian, and advanced similarity models have all been
considered as models for the system at this stage, when momentum effects have become
unimportant. K-theory models numerically integrate constitutive equations of mass,
momentum, and energy conservation; mass transfer is proportional to gradients and
occurs by eddy diffusion. Top-hat models, also known as box or slab models, represent
the cloud as a uniformly mixed volume; mass transfer occurs by entrainment across the
density interface of a cloud with an assumed shape (frequently cylindrical, or at least with
14
vertical sides and a horizontal top). Gaussian models describe concentrations in terms of
vertical and horizontal standard deviations, each expressed as a function of distance
downward Irom the source. +his approach has proven suitable only for neutrally or
positively buoyant plumes, as for far-field dispersion. Models such as HGSYSTEM and
DEGADIS utilize a combination of simple box and Gaussian approaches, known as
advanced similarity model, which is less complex than the K-theory models. As the
dispersion progresses and entrainment increases the velocity and concentration profiles
assume the Gaussian distribution (Britter and Griffiths, 1982).
The "touchdown plume" phase (Figure 5) identifies the intersection of the ground
with the descending plume (Post, 1994). Initially, the plume material will be
redistributed, as a consequence of the impact with the solid surface. In addition, this
contact will produce forces on the plume that will create a transversal movement of the
cloud, as a result of conversion of vertical to horizontal momentum. In this region, a
transition is observed between a circular cross-section and a semi-elliptical one, which
characterizes slumped clouds. This transition had been neglected until recently (Havens
1987, 1988; Ooms 1972; Schatzmann 1979; Raj and Morris 1987). The equations of
motion are now solved assuming a circular-segment profile.
At this stage, heat transfer becomes increasingly important. The ground is added
to the other sources of heat producing different phenomena depending on the set of
conditions such as ambient temperature and the like. Competing factors may affect
further condensation/vaporization of liquid, as will be seen later,
Airborne Plume
Circular x-section Semicircular
x-section
Plume Centroid
(Axis)
I
/ /
I Ground Z = 0
Touchdown Plume I Slumped
Plume
I I
I s
I X
Figure 5. Airborne plume, touchdown plume, slumped plume phases. Adapted from L. Post, HGSYSTEM 3. 0 Technical Reference Manual. TNER. 94. 059 Shell Research Limited, Thornton Research Centre, United Kingdom, l 994,
16
Horizontal spreading of the cloud continues after touchdown. This is the zone
known as "slumped plume" due to the decrease in the velocity of the cloud because of
surface roughness. Vertical motions are small compared to horizontal ones (Havens,
1985). In addition, the negative density gradient at the top of the cloud may inhibit
turbulent mixing to the point where it may be neglected. Horizontal momentum becomes
dominant and the formulas must consider ground drag. The cloud is heated further. This
system has been modeled as a dense plume released horizontally at or near ground level
(Raj and Morris, 1987).
As the cloud flows downwind, it reaches the "stably stratified" zone. Spreading
has caused enough dilution to decrease the density of the cloud and make it to rise.
Mixing may increase as well as dilution. This is the transition to a dispersion zone where
density effects are minor.
As the cloud travels downstream (Figure 6), it will find a final phase where its
velocity is near or below the wind velocity and its density is insignificantly different from
that of the atmosphere. Diffusion is now induced solely by turbulence. All dispersion
simulators, as HGSYSTEM does, incorporate a simple Gaussian model.
Exact determination of the end of the slumped-plume phase is not an easy task.
This stage differs from neutrally buoyant plumes (passive dispersion) in three significant
ways (Havens, 1985):
1. A crosswind gravity-driven flow persists until the negative buoyancy,
acquired afler contact with ground, has been reduced by entrainment.
17
DOMINANCE OF INTERNAL BUOYANCY
DOMINANCE OF AMBIENT TURBULENCE
TRANSITION FROM DOMINANCE OF INTERNAL BUOYANCY TO
DOMINANCE OF AMBIENT TURBULENCE
Figure 6. Final dispersion stages of a heavy gas cloud. Adapted from Steven R. Hanna and Peter J. Drivas, Guidelines for the use of Vapor Cloud Dispersion Models, The American Institute of Chemical Engineers, New York, 1987, p. 6.
18
2. Vertical mixing is still present, although it as been reduced considerably by
the negative vettical concentration gradient at the top of the cloud.
3. Predominance of vertical mixing causes continuation of dilution.
All atmospheric releases eventually become dilute and attain a passive dispersion.
At this point, the source flow does not alter significantly the existing wind field.
II-3. Thermodynamics of Gas Dispersion
The following cases may be observed in terms of states of the released chemical:
1. The chemical stays in the vapor phase because of its loiv-boiling point.
2. The chemical stays in the liquidphase because of its high boiling point.
3. The chemical is present in both the liquid and vapor phases.
Evidently, the formation of the aerosol (liquid/vapor mixture) will add complexity
to the dispersion model, for its thermodynamics must account for multi-phase equilibrium
at each integrating step where properties of the cloud are determined. Phase changes and
the heat transfer associated with it must be considered, as are heat and mass transfer
between vapor cloud and the atmosphere. The "touch-down" phase adds the complication
of heat transfer with the ground since this will compete with the cooling associated with
the dilution with air. Figure 7 (DeVaull, 1995) depicts this.
Traditionally, models have avoided any detailed treatment of aerosol equilibrium
and quickly assume an ideal state (Post, 1994). This leads to the application of Dalton's
law or Raoult's law. In the first case, the chemical is assumed to form a single, separate
Entminment of warm ambient air and subsequent condensation of
water vapor
Cold temperature Chemical
gas/aerosol mixture reactions Heat loss due to
ladlatlou
Heat exchanges
by convection
Solar energy lllpllt
Ruptured vessel
Evaporaion
Heat gain/loss due to condensation/evaporation
Liquid spill
Aerosols possibly du own into cloud
Ground heat Convective heat flux flux from surface
Figure 7. Thermodynamic aspects of a typical hazardous material release. Adapted from
Steven R. Hanna and Peter I, Drivas, Guidelines for the use of Vapor Cloud Dispersion Models, The American Institute of Chemical. Engineers, New York, 1987, p. 61.
20
aerosol that does not interact with aerosols from other components. The mole fraction of
the compound in the vapor phase equals the ratio of the vapor pressure for the compound
to the total vapor pressure:
y" = P"(T )/P (II-I)
The second assumption equates the ratio of the mole fraction in both phases to the
ratio of the partial vapor pressure to the total vapor pressure.
y" =x P"(T )/P (H-2)
Compounds that have similar chemical structure (e, g. propane/butane aerosol
upon release of pollutant consisting of propane and butane into dry air. ) form nearly ideal
solutions. This is the case in many industrial processes but many important cases, such as
water/ammonia mixtures do not follow this approach.
In many other cases models do not treat aerosols explicitly but as a gas with a
corrected molecular weight and density. First, the mass fraction is calculated from the
following relation,
(II-3)
where T, is the storage temperature just before the liquid reaches the atmosphere, Tb, is
the boiling-point temperature, A is the latent heat of vaporization, and Cpi is the specific
heat of the liquid. The mass fraction f allows the calculation of the density, effective
molecular weight and volume flux mixture at the flashing temperature. The aerosol is
then assumed to evaporate so slowly that the simulation should not consider any heat
exchanges due to evaporation (API, 1992).
21
Vapor cloud dispersion modeling has been developed to a very reasonable extent
in the last few decades, and especially the last few years. Several models are capable of
predicting concentrations to a level that is acceptable in practice. Nevertheless, the
thermodynamics of aqueous systems is in a stage where more development can occur.
After the literature search that was conducted it was decided that this be the focus of this
project. The following chapters explain the steps taken towards reaching this goal.
22
CHAPTER III
NON-IDEAL THERMODYNAMICS
A robust dispersion model would account for non-idealities of the system. For a
system involving three phases, ct, P, and y the criteria for equilibrium are:
(III-I)
(III-2)
ln f ' = 1n f ~ = 1n f, " (III-3)
where T and P are the temperature and pressure of each phase, which in equilibrium are
equal as follows from the minimization of Gibbs energy, ft is the fugacity of component
ct in each phase.
This study assumes the presence of a maximum of two liquid phases, which is
reasonable in most practical cases. Water is assumed to always be part of the system due
to air humidity. Therefore, any released pollutant will have to be immiscible with water
in order to form more than one liquid phase. For formation of more than a second phase,
the pollutant components would have to be imiscible among themselves which will not
be the case in most instances if those chemicals were in the same process line or in the
same storage vessel. The mixture is also assumed to consist of air (moist or dry) and non-
reactive compounds that may be present in both liquid and vapor phases. Two approaches
are used in terms of obtaining the fugacities as functions of temperature, pressure, and
23
composition in each phase. The first one utilizes the definition of fugacity coefficient
given by (III-4), for each phase" i ".
f. '
(P 'l (III-4)
For a vapor v and a liquid P one obtains the following ratio of compositions in
each phase:
v. x
(III-5)
An equation of state would then be used to obtain the fugacities in each phase.
Therefore using the vapor compositions for the vapor phase, and the liquid compositions
for the liquid phases:
6I i
BT ln lsd = — J dV — Rln Z
T, V, IV . j (III-6)
Any cubic equation of state is in theory capable of predicting liquid phase
behavior. Nevertheless, this is common practice in the case of systems under high
pressure (Raal and Mulhbauer, 1998), which is not the case for the general dispersion
case, which occurs at atmospheric pressure. Another drawback of the approach is that, in
many cases, equations of state are not robust enough to account for non-idealities in
systems of high molecular interactions.
The second approach for estimating fugacities is the one involving the activity
coefficients for the liquid phase given by (III-7).
24
(HI-7)
Expressions (111-4) and (111-7) contain all the information about the individual
phases. After manipulation of these equations, as given by (111-3), one obtains the
following relation:
(111-8)
for species et = 1, 2 . . . N, and liquid phases p= I, 2 . M. Note that y "and x„s are the
component's mole fraction in the total mass of the gas phase and in the total mass of
aerosol t) respectively. The pure liquid fugacity at pressure P is given by:
' v. ' f ' = f. ' exp f — dP , AT (111-9)
Equation (111-9) is a function of the fugacity of the liquid at some reference
pressure. Prausnitz, et al (1986) gives a method for calculating the fugacity coetTicient at
zero pressure. The liquid molar volume is estimated using the modified Rackett equation
(Prausnitz, 1980). See Appendix A for an extension on this issue.
Several options were considered for models to be used for the fugacity and
activity coefficients. As far as activity coefficients are concerned, Margules or van Laar
equations were found to be applicable only to mixtures where the components are similar
in chemical nature, and the intention of this work is to have a methodology flexible
enough to be applied in very general cases. Wilson, NRTL, and UNIQUAC were also
considered. Unlike Wilson's equation, NRTL and UNIQUAC equations are applicable to
25
both vapor-liquid and liquid-liquid equilibria. While UNIQUAC is mathematically more
complex than NRTL, it has four advantages; (1) it has only two adjustable parameters, (2)
UNIQUAC's parameters have a smaller dependence on temperature, (3) UNIQUAC's
parameters are more widely available, (4) UNIQUAC is applicable to solutions
containing small or large molecules, including polymers (Reid, 1987).
For fugacity coefficients, it was decided to utilize a cubic equation of state, so as
to have a balanced relation in terms of the number of parameters required and the
accuracy of the method. The Redlich-Kwong equation, and its modification by Peng and
Robinson, are proven to give good results and require essentially the same number of
parameters (Reid, 1987). Peng-Robinson equation was elected.
Both of these thermodynamic models are shown in Appendix A and Appendix B,
respectively.
26
CHAPTER IV
MODEL IMPLEMENTATION
The objective is now to calculate the mixture temperature T (K), the mixture
volume V ( /kmol) as a function of time after the dispersion model has estimated the
mixture composition altered by air entrainment.
This is a listing of the model unknowns:
1. Mole fraction of each compound in the vapor phase, y ".
2. Mole fraction of each compound in aerosol j3, x S.
3. Mole fraction of each aerosol in the total mixture, Ls Where P = 1, M=2.
Given by the amount of aerosol P divided by total amount of mixture.
4. Total mole fraction of liquid in the total mixture, L, a = (1- L) is the vapor
fraction.
5. Mixture Temperature T„(K).
These unknowns must satisfy the following fundamental equations:
1. Overall Component Balance (no reactive-compounds)
F=V+Li+Lp (IV-1)
2. The sum of the molar fractions in each of the three phases must be
numerically equal to 1.
(IV-2), (IV-3), k (IV-4)
3. The total amount of liquid equals the sum of all the individual aerosols.
27
L = Lt+Lt (IV-5)
4. The equilibrium relationship between a chemical species in the vapor and
liquid phases.
y = (x K )~
K. ' = (r. f. )' ~d. p
5. An energy balance:
N
H, „= gH. = y„, 'H„, +(I- y„, )'H~z (IV-8)
where the post-mixing enthalpy of compound ct (a = I, . . . N) is given by
H, =y C T+y (C, T„— H~) (IV-9)
Parameters:
1. Released Pollutant
Mole fraction of pollutant in the mixture, ys, s The mixture is
assumed to consist of N components, including pollutants, water, and air.
Mole fraction of each compound in the pollutant, ri (et=1. . . N-I).
Pollutant enthalpy (H„, ~). Enthalpies are taken to be zero at O'C, with
unmixed gaseous compounds.
2. Ambient Data:
Humidity, ha.
Ambient Temperature, T, in K.
3. Properties of each species
Molecular weights m
Specific heats C and C"" (J/kmole/K) for vapor and liquid.
Heat of condensation H, ~d (J/kmole).
Coefficients in the formula for the vapor pressure of each compound
P'gT, „) as a function of the mixture temperature T„. Antoine equation
will be employed.
Total vapor pressure P.
Constants for UNIQUAC and Peng-Robinson Equations, as explained in
Appendix A and Appendix B.
where,
and x = L, /(L, + L, )
The individual component balances can be written as,
z = «(I — a)x' + (1 — a)(1 — «)x' + ay (IV-10)
(IV-11)
(IV-12)
The individual phase compositions can be computed with the following equations:
x. ' = z. /[ir(I — a) +(I — a)(l — «)K' /K'+ aK. '] (IV-13)
y = K„'x' z K, 'x' x' =
K' D
(IV-14) A (IV-15)
The criteria for vapor-liquid-liquid equilibrium can be written in terms of
Equations (IV-2), (IV-3), and (IV-4),
n II I n n
P x' — g y = 0; P x' — P y. = 0; g x' — g x' = 0 a a a a a a
29
START
READ T, P, z;
Assume Ideal System
Calculate l with + from Ideal System
Calculate K-values
Calculate Phase compositions Calculate
Exu-gy,
NO
Converged?
P, T converged'?
Ex, '&Ey, ?; Ex, &-y, ?
NO YES
Calculate Vm
Figure 8. Algorithm for flash calculation.
30
CD I:x, 'M;'2
Adjust i, Objective fcn IV-20
Adjust +, Objective fcn IV-19
Adjust u, Objective fcn IV-18
Figure 8 continued.
31
In a three-phase calculation, two equations chosen from (IV-16)-(IV-18) must be
satisfied for three-phase equilibrium to exist. For two-phase calculations only one of
those equations is utilized. To solve these equations, the scheme proposed by Sampath
and Lepziger (1985) will be utilized. The method is centered on the equation for the
fraction of one of the aerosols in the liquid phase, obtained by manipulating Equation
(IV-14). Since water is part of all systems,
I K'
KH, o Ks, e IC— (IV-19)
The Procedure for solving the equations is shown in Figure 8. Initially, three
equilibrium phases are assumed to exist at an initial estimate of T and P and a search is
carried out for values a or x which satisfy one of equations (IV-16), (IV-17), or (IV-18).
Equations (IV-16) and (IV-17) are used to search for a value for a and Equation (IV-18)
is used to search for a value for x. The sum of the phase compositions are used to
determine which of the equations is used, The search is carried out by a Newton-Raphson
convergence scheme. The other phase indicator x or n is determined from Equation (IV-
19). If the calculated values for x and tx are outside the bounds of 0 and 1, three
equilibrium phases do not exist and we then set the phase indicators (v. and a) at the
boundary value and the compositions of the two phases can be computed from the same
set of equations (IV-16)-(IV-18). If however a & 1 or a = 0, and x is outside the bounds,
32
only one equilibrium phase exists and in that case none of the criteria of equilibrium will
be satisfied.
The computations are initialized by assuming ideal gas behavior for the vapor and
ideal solution behavior for the liquid in order to calculate the initial set of K values. This
procedure will also yield an initial estimate for a.
Once a new estimate of the phase compositions and the distributions is obtained,
the energy equation is solved for a new temperature. If no convergence is attained the
iteration is repeated. Pressure remains constant since dispersion occurs at atmospheric
pressure.
If all compositions and temperatures have converged, Va, is calculate as follows,
Vm = — "' "A*a (T. , ) „ P
(IV-20)
The mixture density is given by the quotient of the mixture molecular weight and
V, . The mixture molecular weight is given by (IV-21).
I =QnP "z a=1
(IV-21)
This thermodynamic model will be coupled with some modules of the
HGSYSTEM vapor release simulation package. As mentioned earlier, recent methods
ignore the complications of a non-ideal system. The HGSYSTEM allows for the
replacement or coupling of their thermodynamic package, which assumes ideal solutions
in its application, with another method. In addition, the HGSYSTEM has proven to be the
most eAicient method when modeling dispersion of aerosols (Refer to Chapter VI for an
33
extension on this), This means that this transport model performs weU in these cases,
which will allow for a better evaluation of the proposed model.
For the proposed model, the ideal model provides the initial estimate of the
composition and the vapor fraction of the system, as required in the scheme of Figure g,
Among other components, the HGSYSTEM contains the following modules;
DATAPROP, SPILL, AEROPLUME, and HEGADAS, which are the relevant ones to
this study.
DATAPROP generates and stores the physical properties used within the
HGSYSTEM structure. SPILL is a module that models the transient liquid release from a
pressurized vessel. AEROPLUME treats the high-momentum jet and elevated plume
cases. For the far-field dispersion, the HGSYSTEM contains HEGADAS. Both
AEROPLUME AND HEGADAS will be interfaced with the proposed thermodynamic
model.
Appendix C shows the code written in FORTRAN of the subroutines that are
interfaced with HGSYSTEM modules. Also the two HGSYSTEM modules modified for
this project are shown.
34
CHAPTER V
EXPERIMENTAL DATA
Results Irom this approach are compared to the experimental data from the Desert
Tortoise trials (API, 1992). These trials were designed to study the transport of ammonia
from a release of liquid ammonia.
Four trials were conducted, where pressurized liquid NHs was released irom a
pipe pointing downwind at a height about 1 m above the ground. The liquid jet fiashed as
it exited the pipe, resulting in about 18'/0 of the liquid changing phase to become a gas.
The rest of the ammonia remained as a liquid, which was broken up into an aerosol by
turbulence inside the jet. It was observed that only a minor fraction of the release formed
a pool on the ground (Cederwall, et al, 1985).
Figure 9 shows the configuration of instrumentation used during this experiment.
Eleven cup-and-vane anemometers were located at a height of 2m at various positions
within the test area to define the wind field. 20 m-tall meteorological tower was located
upwind of the spill area, with temperature, wind speed and turbulence measured at three
levels. Ground heat fluxes were measured at that tower and at three locations just
downwind from the spill.
NH3 concentrations and temperatures were obtained at elevations of 1, 2, 5, and 6
m on seven towers located along an arc at a distance of 100m downwind of the source.
Additional NHs concentration observations at elevations?. 0, 3. 5, and 8. 5 m were taken at
five monitoring towers at a distance of 800m from the source. The lateral spacing of the
35
ssfr
CCDRS Treser
~ Dirpembm mray
Spill ~ int z ~Mms flux array
o
- Met. s Camera 000 m Smtmn sunrnrn
~ Gm smear stnt Ioll 0
A Armmemetm stsbnn
Fnmcbmen Laketnxf contour i3000'l
Figure 9. Instrument array for Desert Tortoise experiments. Adapted from R. T. Cederwal, et al, Desert Tortoise Series Data Report 1983 Pressurized Ammonia Spills. Lawrence Livermore National Laboratory, 1985.
36
towers was of 100 m. Finally, there were two arcs with up to eight portable ground-level
stations at distances of 1400 m, 2800 m, and 5500 m downwind. Data of the experimental
conditions and the observed concentrations at two points for the 4 trials conducted are
given in Table 1. The observed concentrations are known to have a maximum error of
20o/o
API's publication 'Hazard Response Modeling Uncertainty', volume II (1992),
gives data concerning the results of simulations conducted with several Dispersion
Models. These data will be utilized in the Results and Evaluation chapter.
37
Table 1. Summary of data sets from Desert Tortoise experiments.
Material: Ammonia
Molecular Weight Boiling Point (K) Latent heat of evaporation (J/kg) Heat capacity-vapor (J/kg-K) Heat capacity-liquid (J/kg-K) Density of liquid (kg/m'"3) Exit Pressure (atm) Source Temperature (k) Source Diameter (m) Source Elevation (m) Source Phase Spill/Evaporation Rate (Kg/s) Spill duration (s) Initial Concentration (ppm) Ambient Press. (atm) Relative Humidity ('/0) Ambient Temperature (K) Soil Temperature (k) Soil Moisture Wind speed (m/s) Roughness Length (m) Stability Class Averaging Time (s) Obs. Conc. 100 m (ppm) Obs. Conc. 800 m (ppm)
DTl 17. 03 239. 7
1. 37E+06
2190, 0 4490, 0 682. 8 10, 0
294. 7 0. 061 0. 79 L/G 79, 7 126
1. 0E+06
0. 897 13. 2
302. 03 304. 8 Water 7. 73 0. 003
D 1
63260 10950
DTZ 17. 03 239. 7
1. 37E+06
2190. 0 4490. 0 682. 8 11. 02 293. 3 0. 0945
0, 79 L/G 111. 5
255 1. 0E+06
0. 898 17. 5
303. 03 303. 8 Water 5. 54 0. 003
D 1
109580 18590
DT3 17. 03 239, 7
1. 37E+06
2190. 0 4490. 0 682. 8 11. 23 295. 3 0. 0945 0. 79 L/G 130. 7 166
I. OE+06
0. 895 14. 8
307. 07 304. 8 Moist 7 60
0. 003 D 1
97250 15630
DT4 17. 03 239. 7
1. 37E+06
2190. 0 4490. 0 682. 8 11. 64 297. 3 0. 0945 0. 79 L/G 96. 7 381
1. 0E+06
0. 891 21. 3
305. 63 304 Dry 4. 64 0. 003
E 1
84260 20910
38
CHAPTER Vl
RESULTS
The four data sets summarized in Table 1 (API), were used as input to the program HG-
AL (Modification of HGSYSTEM by Armando Lars), listed in Appendix C. Results from
similar runs in models TRACE and PHAST, and HEGADAS were obtained from API's
publication ¹ 4546 (API, 1992). Runs Irom DEGADIS and HGSYSTEM (both modified
and unmodified) were performed in our labs.
Results from these runs are presented in Table 2 Figures 10 — 21 show the
graphed results.
39
Table 2. Observed and predicted concentrations.
Marenal: Ammonia
Conc. 100 m (ppm) Observed HG SYSTEM HG-AL PHAST TRACE
DT1 DT2 DT3 DT4
63260 109580 97250 84260 71590 88890 87870 95000 72670 80770 91680 71000 48100 51100 56300 44500 59020 77200 80730 84800
Conc. 800 m (ppm) Observed HGSYSTEM HG-AL PHAST TRACE
10950 18590 15630 20910 6235 9930 8631 11770 7950 15200 14600 9960 8480 12100 12700 10900 6816 11080 10630 12800
Yp
I e I:Nil:::. ' I:!,
~ I
g ~
ki . ' ~ '. ' ~ ; ~ . ; ~ ' ' ~ '. ; ~ ' ' ~ '; ~ '
~ ' ~ ;; ~ '. '8
' ~
' ~ "~ ' ~
II,
~ 551 ~ 551 ~ SSI ~ HEI ~ REI ~ SSI ~ Sll ~ 551 ~ 551 ~ III ~ III ~ 581 ~ 551 ~ Hl ~ SN ~ RSI ~ ESI ~ Hl ~ E5 I ~ 551 SSSI
~ ESI ~ ESI ~ SSI ~ SSI ~ SSI ~ SEI ~ SSI ~ SSI ~ ESI ~ SSI ~ ESI ~ SSI ~ ESI ~ SSI ~ ESI ~ SSI SSSI
~ SEI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI $$$1
~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI
a
II
~ ~
I
e
It ~
I ~
0 ~ ~ ~ '
~ ~ ~
~ I ~ ~ I
' ' ~ . ~
; ~ , . ' ~ '. ~
' ~ '. ~ . ' ~ . '. ~ ' ~ ' ~ . . ~ . '. ~ . '. ~ . '. ~ ' ~
' ~ '. ~ ' ~ ' ~ ' ~ ' ~ '. ~ ' ~ '. ~ ' ~ '. ~
. . ~ . ~
- ~ - ~
, ~ . ~
~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ESSI
~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI WRQI
~ SSI ~ SSI ~ SSI ~ SSI ~ SSI SSSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI ~ SSI SSSI ~ SSI ~ SSI
~ 551 ~ III ~ Sll ~ 5$1 ~ SSI ~ RSI ASSI SSSI ~ III ~ 5ll uaI ~ EEI $$51
"S CHNNY+
I
I I
I II I)
I I
I I
I I
t I
~ . e t: ' s ~ s:: ~: e
53
CHAPTER VI
DISCUSSION
The average absolute fractional deviation and average fractional bias are used as
the measures of performance of the models. The absolute &actional deviation, average
absolute &actional deviation, fractional bias, and average &actional bias are defined as
follows:
ICo — Cp abs. frc. dev. = '
Co (VI-1)
Cp] avg. abs. frc. dev. = g /N
Co (VI-2)
Cp — Co frc. bias =
Co (VI-3)
Cp — Co avg, frc. bias = g /N
Co (VI-4)
The best model is the one giving the lowest standard deviation and bias.
As shown in Figure 10, HEGADAS and DEGADIS show a clear over-prediction
at short distances when modeling aerosols. As seen in Figure 16, this is not the case for at
least two of the runs when predicting the concentration at long distances. The main
reason for this is that at the point of 800 m the zone of passive dispersion is getting closer
or may have already been reached. At this point the prediction of the Gaussian model,
utilized by all simulators at this stage, is very good. In addition, by this point, in most
54
cases, the bulk of the liquid phase has already vaporized, so the prediction of the behavior
of the gas phase would not differ much (rom the ideal one.
Figure 11 shows the profile given by the rest of the models, which are those
considered to be accurate enough to consider them as an standard for comparison. The
distribution of concentrations seems now a lot more uniformly distributed.
Figure 12 shows an over-prediction of the HGSYSTEM and HG-AL. One thing
that must be kept in mind is that HGSYSTEM and HG-AL utilize the same transport
model for dispersion. HGSYSTEM, however, treats the aqueous solution as an ideal
mixture. HG-AL considers non-idealities of the system. TRACE, PHAST, and
HGSYSTEM all differ in the approach taken in the solution of the fundamental equations
of motion when modeling the dispersion. TRACE and PHAST both treat aerosols
explicitly by ideal models.
An under-prediction by all models is observed in the next two figures (13 and 14).
The last data set (Figure 15) shows an under-prediction by all, except HGSYSTEM. One
thing that is noticeable is the under-prediction of PHAST as compared to the rest of the
models. Again, this is mainly due to the capabilities of the model to simulate the
dispersion at this stage as a result of the assumptions in the transport model, as explained
earlier.
Figure 17 shows the performance of the four models of interest at 800m. The
results are a lot better distributed and not extraordinary differences are noticed. This is
due to the fact that by this point passive dispersion may already be taking place. All
55
models apply a Gaussian model at this stage so the main differences will result from the
effect of the difference in modeling the earlier stages of dispersion.
Figures 18-21 show the results for each of the four sets at 800m. Table 3 shows
the absolute fractional deviations and Table 4 shows the tractional bias at all points.
Figure 22 shows the average absolute tractional deviation and average fractional bias for
each model.
As judged from Figure 22, HGSYSTEM provides the one of the best
performances of all models that treat aqueous solutions as ideal systems. Moreover, both
TRACE and PHAST are propietary models, and they are not available for modification.
For this reason, it was decided to to implement the nonideal model in a modification of
HGSYSTEM. As predicted, HG-AL proves to perform better than HGSTYSTEM. This
due not only to the good transport model provided by HGSYSTEM, but also to the
improvement in the prediction of concentrations by the non-ideal model.
56
Table 3. Fractional absolute deviation of predicted concentrations with respect to
observed concentrations.
Material: Ammonia
Conc. 100 m (ppm)
HGSYSTKM HG-AL PHAST TRACE
DTl DT2 DT3 DT4
0. 13 0. 19 0. 10 0. 13
0. 15 0. 26 0. 06 0. 16 0. 23 0. 53 0. 42 0. 47 0. 67 0. 30 0. 17 0. 01
Conc. 800 m (ppm)
HGSYSTKM HG-AL PHAST TRACE
0. 43 0. 47 0. 45 0. 44 0. 27 0. 18 0. 07 0. 52
0. 23 0. 35 0. 19 0. 48
0. 38 0. 40 0. 32 0. 39
Average
HG-SYSTEM HG-AL PHAST TRACK
0. 29 0. 21 0. 36 0. 25
57
Table 4. Fractional bias of predicted concentrations with respect to observed
concentrations.
Materia/: Anmtonia
100 m (ppm)
DT1 DT2 DT3 DT4
HGSYSTEM HG-AL PHAST TRACE
0. 13 0. 15 -0. 24 -0. 07
-0. 19 -0. 26 -0. 53 -0. 30
-0. 10 0. 13 -0. 06 -0. 16 -0. 42 -OA7 -0. 17 0. 01
800 m (ppm)
HGSYSTEM HG-AL PHAST TRACE
-0. 43 -0. 27 -0. 23 -0. 38
-0. 47 -0. 18 -0. 35 -0. 40
-0. 45 -0. 07 -0. 19 -0. 32
-0. 44 -0. 52 -0. 48 -0, 39
Average
HG SYSTEM HG-AL PHAST TRACE
-0. 23 -0. 17 -0. 36 -0. 25
58
CHAPTER VII
CONCLUSIONS AND RECOMMENDATIONS
The importance of heavy-gas dispersion modeling is evident. The great variety of
chemicals handled in today's industry and the harm they may cause to human beings
becomes an incentive for spending resources to study these systems. The presence of
aerosols in dispersing clouds increases their potential of coming in contact with ground
structures. The present effort intends to provide an alternative for treating aqueous
solutions in a way to better approximate reality.
The results of the evaluation performed in Chapter VI show the improvement that
the non-ideal thermodynamic model provides. Taking into account the uncertainties that
the experimental method provided in data gathering, and the realization that no model, no
mater how good it accounts for non-idealities, is totally perfect, the performance of HG-
AL is very good.
The limitations that scarce data may bring are evident. No perfect evaluation may
be performed under limited experimental data. This research eA'ort was able to find one
data source, the experiments of Desert Tortoise. At that instance, the system under the
study was the same as the present one, a liquid/vapor cloud. While data for other systems
(e. g. pure vapor clouds) is quite abundant, the need for further acquisition of data in this
field is quite significant. More data will provide a better means of evaluating models such
as the one proposed in here.
59
The proposed method does prove to perform better than the existent one.
However, the lack of data in terms of the parameters required for the evaluation of the
terms in the Peng Robinson equation of state and the UNIQUAC activity coefficient
model may limit study of other cases. In this study, the existence of vapor-liquid
equilibrium data made possible the estimation of the required parameters. This may not
be the case for other systems involving non-hydrocarbon-vapor/liquid mixtures. Thus,
one drawback of the model may be the extent of empiricism involved in it.
As future research, it will be convenient to spend resources to the further
acquisition of experimental data of dispersion of heavy gases involving aqueous solutions
of non-hydrocarbons. Also, further efforts should be directed towards the development of
a database, capable of being interfaced with this model, to provide the parameters
required for the implementation of a thermodynamic model for non-ideal systems.
Nomenclature
Cp
C,
H
Ls
N
N
P„"
T&
Tm
Vm
ya
Heat Capacity (J/kg/K). Predicted concentration (ppm)
Observed concentration (ppm)
Liquid mass fraction in flashed system
Fugacity of component a in aerosol P (Pa)
Total Feed Mass (kg)
Enthalpy (J/kg)
Ambient humidity
Equilibrium constant for component a in aerosol P
Fraction of liquid in mixture
Fraction of aerosol I) in total mixture
Mixture molecular weight
Total number of species in mixture
Mole fraction of each compound in pollutant
System Pressure (Pa)
Vapor pressure of component a (Pa)
Ambient Temperature (K)
Mixture Temperature (K)
Mixture molar volume (m~3/kmol)
Molar fraction of component u in aerosol i
Molar fraction of component ct in gas phase
yt i
Pm
Mole fraction of pollutant in mixture
Mole fraction of water from substrate in mixture
Compressibility factor
Fugacity coefficient of component N
Index corresponding to mixture components k vapor
fraction in mixture
Fraction of Aerosol P in Total liquid
Activity coefficient of component u in aerosol P
Fraction of Liquid phase I in total liquid contents
Latent heat of vaporization (I/kg)
Mixture density (kg/m~3)
62
LITERATURE CITED
American Petroleum Institute. Hazard R s onse Modelin Un aint A uantitativ
M~etho . VoL 2: Evaluation of Commonly Used Hazardous Dispersion Models.
Health and Environmental Sciences, API Publication Number 4546. October
1992.
Black, C. , ed. Ex erimental Results From Th Desi n Institute for Ph sical Pro ert
ata Phase E ilibria and Pure Com onent Pro erti s AIChE Symposium
Series, Number 25, VoL 83. New York, New York, 1987.
Bosanquet, C. H. The rise of a hot waste gas plume. Jo mal of the Institute of Fuel 30
1957: 322.
Britter, R. E. , and R. F. Griffiths. The Role of Dense Gases in the Assessment of Industrial
Hazards. Dense Gas Dis ersion. Chemical Engineering Monographs, Vol. 16.
New York, New York: Elsevier Science Publishing Company, Inc. , 1982.
Cederwall, R. T. , H. C. Goldwire, D. L. Hippie, G. W. Johnson, R. P. Koopman, et al.
Desert Tortoise Series Data Re ort 1983 Pressurized Ammonia S ills. Livermore,
California: Lawrence Livermore National Laboratory, 1985.
Crowl, Daniel A. , and Joseph F. Louvar. Chemical Process Safet ' Fundamentals with
A~Hti . E 91 9 Clllt', N 1 1: 9 tl H 11, 1990.
DeVaull, George E. , John A. King, Ronald J. Lantzy, and David J. Fontaine.
Understandin Atmos heric Dis ersion of Accidental Releases. New York, New
63
York: Center for Chemical Process Safety of the American Institute of Chemical
Engineers, 1995.
Forney, L. J. , and F. M. Droescher. Reactive Plume Model: Effect of Stack Exit
Go thd Ga Ph P c sos 8 8 tphat Fo 1 tt . ~At h
E~hom t 19. 1989: 879-891.
Hanna, Steven R. , and Peter J, Drivas. Guideline for Use of Va or Clo d Di ersion
Models. New York, New York: Center for Chemical Process Safety of the
American Institute of Chemical Engineers, 1987.
Havens, Jerry A. , and Thomas O. Spicer. Develo men of an Atmos heric Dis er ion
Model for Heavier- Than-Air Gas Mixtures. Vol. 1. U. S. Department of
Transportation. Springfield, Virginia CG-D-23-85: May 1985.
Havens, Jerry A. , and Thomas O. Spicer. Develo ment of an Atmos heric Di ersion
Model for Heavier-Than-Air Gas Mixtures. Vol. 2. U. S. Department of
Transportation. Springfield, Virginia CG-D-23-85: May 1985.
Havens, Jerry A. , and Thomas O. Spicer. Develo ment of an Atmos heric Dis ersion
Model for Heavier-Than-Air Gas Mixtures. Vol. 3. U. S. Department of
Transportation. Springfield, Virginia CG-D-23-85: May 1985,
Havens, Jerry A. Modelin Tra'ecto and Dis ersion of Relief Valve Gas Dischar es.
US Environmental Protection Agency; Office of Air Quality Planning and
Standards. Research Triangle Park, North Carolina: February 1987.
64
Havens, Jerry A. A Dis er ion Model for Elevat Den e Gas Jet Chemical el s-
Vol. l. US Environmental Protection Agency. Research Triangle Park, North
Carolina PB88-20238: April 1988.
Havens, Jerry A. A Dis ersion Mod 1 f r Elevated Dense Gas Jet hemical Releases-
Vok 1. US Environmental Protection Agency. Research Triangle Park, North
Carolina, PB88-20239: April 1988.
Hoot, T. G. , R. N. Meroney, and J. A. Peterka. ind Tunnel Test of N ativel B t
Plumes. Fluid Dynamics and Diffusion Laboratory, Colorado State University.
National Technical Information Service, US Department of Commerce, Report
PB-231-590: October 1973.
Keffer, J. F. , and W. D. Baines. The Round Turbulent Jet in a Cross-Wind. Fluid
Mechanics 15. 1963: 481-496.
K pp, H, R. De I g, L. D II I h, U. Pl ke, d I. M. P lt*. ~V-Li ld
E uilibria for Mixtures of Low Boilin Substances DECHEMA Chemistry Data
Series Vol. VI: Berlin, Germany: 1982,
Marshall, V. C. Ma'or Chemical Hazards. England: Ellis Horwood Limited: 1987.
McFarlane, K. Development of Models for Flashing Two-Phase Releases from
Pressurized Containment. ECMI Conference on the A lication of Mathematics
Id t;St thdyd Ul lty, GI g, S tl 8:Rg tl998.
Mudan, K. S. Gravity Spreading and Turbulent Dispersion of Pressurized Releases
Containing Aerosols. Atmos heric Dis ersion of Hea Gases and Small
65
Particles m osium Del / The Netherl ds 1983. Springer-Verlag, Berlin:
1984.
Ooms, G. A New Method for the Calculation of the Plume Path of Gases Emitted by a
Stack. Atm s heric Environment 6. 1972: 899-909,
Ooms, G. , dN. J. D ij . Di petsio f gtaekpi H i tha Ai. A~th
Dis ersion of Hea ases and Small Particles, Simposium Deltt / The
Netherlands 1983. Springer-Verlag, Berlin: 1984.
Post, L. , ed. HGSYSTEM 3. 0 Technic Reference Manu Shell Research Limited,
Thornton Research Centre. , Chester, United Kingdom TNER. 94. 059: 1994.
Prausnitz, John M. Com uter Calculations for Multicom onent Va or-Li uid and
Li uid-Li uid E uilibria. Englewood Clifts, New Jersey: Prentice Hall, 1980.
Prausnitz, John M. , Ruediger N. Lichtenthaler, and Edmundo Gomes de Azeveo.
Molecular Thermod namics of Fluid-Phase E uilibria. 2"' edition Englewood
Cliffs, New Jersey: Prentice Hall, 1986.
Real, J. David and Andreas L. Muhlbauer. Phase E uilibrium Measurement and
C~tti . W hi gt, D. C: T yi &F 8998
Raj, P. K. , and J. A. Morris. Source Characterization and Hea Gas
Dis ersion Models for Reactive Chemicals. Technology and Management
Systems Inc. , Burlington, Massachusetts 01803-5128, AFGL-TR-88-0003(I):
1987.
Reid, Robert C. , John M. Prausnitz, and Bruce E. Poling. The Pro erties of Gases and
L~iuids. 4 ' edition. United States of America: McGraw Hill, 1987.
66
Sampath, Vijay R. , and Stuart Lepziger. Vapor-Liquid-Liquid Equilibria Calculations.
Industrial En ineerin and Chemis Process i n nd Develo ment. 1985:
652-658.
Schatzmann, M. The Integral Equations for Round Buoyant Jets in Stratified Flows.
Journal of A lied Mathematics d Ph ics 29 1978: 608-630.
Schatzmann, M. An Integral Model of Plume Rise. Atmos heric Environmen 13 1979:
721-731.
Spillane, K. T. Observations of Plume Trajectories in the Initial Momentum influenced
Phase and Parameterization of Entrainment. Atmos heric Environment 17 1983:
1207-1214.
Turner, D. Bruce. Workbook of Atmos heric Dis ersion Estimates An Introduction to
Dis ersion Modelin . 2" edition. Boca Raton, Florida: CRC Press, Inc. , 1994.
67
APPENDIX A
LIQUID-PHASE FUGACITIES
68
The liquid-phase fugacity is represented by the following expression,
f=xy f' (A-I)
In a multicomponent mixture, the UNIQUAC equation for the activity coefficient
of component a in aerosol P is given by:
Iny = lny +lny" (A-2)
c @. z where, ln y = ln — '+ — q ln — + E — — gx. I .
x 2 @ x (A-3)
and lny" =q [I — ln +8, r, J J Z6'Fa
k
(A-4)
z l = — (r, — q) — (r — 1) Z= 10 (A-5)
gq, x, ' gr, x,
' [ RT (A-6), (A-7), (A-8)
In these equations x„ is the mole fraction of component ct in the liquid phase P.
Pure component parameters r„and q are, respectively, measures of molecular van der
Waals volumes and molecular surface areas. The UNIFAC method utilizes the following
relations to obtain them (Reid et al, 1987).
r. = gv, "R, k
= gusQ~ k
(A-9), (A-10)
Reid et al (1987) gives values for Qk and Rk. The two adjustable binary
parameters x~ must be evaluated from experimental phase equilibrium data. The residual
part of the activity coefficient (Equation (A-4)) can alternatively be replaced by the
"solution-of-groups" concept; Reid et al (1987) shows this option.
Prausnitz (1980) gives a listing of z~for several binary pairs. In some special
instances, especially for non-hydrocarbons, these parameters are not readily found. Data
from Hirata (1975) and Black (1987) of VLE was fit to the UNIQUAC expression to
obtain the required parameters. For the purpose of this project, the values for constants
utilized are shown in Table 6.
The pure-liquid fugacity, f ", is obtained from multiplication of the pure-liquid
fugacity at some reference pressure, f ', by the Poynting correction (Prausnitz, et al,
1980).
P pP f" = f; exp f — dP „, RT
(A-11)
In this case, the reference pressure is taken to be zero Pascals. The required
parameter is estimated by a correlation given by Prausnitz (1980). This is given by the
following formula,
f' =exp CI+ +C3~T+C4*ln(T)+CS*T 2 C2
T (A-12)
where the fugacity is in bars and the proper correction should be made to convert it to
Pascals. T is in Kelvin. Values of the constants for the species involved in this project are
given in Table 7.
70
Assuming the liquid molar volume is not dependent on pressure and taking the
reference pressure to be zero, (A-11) becomes,
Vs f" = f" exp — P RT
(A-13)
The liquid molar volume is obtained by using the modified Rackett equation
(Reid, et al, 1987),
(A-14)
where
z =1+(1 — — )"' T,
(A-15)
for T/T. less than or equal to 0. 75, and
t; = 1. 60+ 0. 00693026~ ( — — 0. 655) '
T, (A-16)
for T/T, greater than 0. 75.
Values for z, are given in Table 6 (Reid, et al, 1987). Also, Table 5 shows the
pure component data utilized.
71
Table 5. Pure corn onent data for chemicals used in this ro ect.
S ecies Mol. Wt. Tc Pc bar Acc. factor
Ammonia Water Nitrogen 0 en
17. 03 18. 02 28. 02 32. 00
405. 54 647. 37 126. 26 154. 76
112. 80 221. 20 33. 99 50. 82
0. 250 0. 344 0. 040 0. 021
Table 6. Miscellaneous constants for corn onents in li uid hase.
Species ti ) Ammonia Water
1. 00 0. 92
1. 00 1. 40
0. 2465 0. 2380
4. 117 0. 985
Table 7. Parameters for ure-li uid fu acit at zero Pa
S ecies Cl C2 C3 C4 C5
Ammonia Water
1. 641E+01 -3. 53E+03 5. 704E+01 -7. 005E+03
-1. 852E-02 3. 580E-03
0. 398 -6. 669
9. 918E-06 -8. 505E-07
Table 8. Interaction arameter for corn onents in va or hase.
S ecies
Ammonia Water Nitrogen Ox en
k l, i
-0. 2589 0. 2193 0. 1218
k 2, i -0. 2589
0. 0102 0. 0522
k 3, i 0. 2193 0. 0102
-0. 0119
k4, i 0. 1218 0. 0522 -0. 0119
72
APPENDIX B
VAPOR-PHASE FUGACITIES
73
The fugacity for the liquid phase components is given by the next expression.
(B-1)
The Peag-Robinson equation of state will be employed to obtain fugacity
coefficients:
AT
V — b V'+ 2bV -b' (B-2)
where (Reid et al, 1987),
0. 07780AT,
P, (B-3)
0. 45724A T, [
u ]2 (B-4)
and,
far = 0. 37464+ 1. 54226222 — 0. 26992ar '
The mixture values of a and b are obtained through the following recommended
mixing rules (Reid, et al, 1987).
aP A' T'
(B-6)
bP
AT (B-7)
The fugacity coefficient is then given by (B-8), taken from Reid, et al (1987).
T, jP„ b Zy T, /P
(B-9)
I/2
J
(B-10}
Knapp (1982) gives a list of ks values. The parameters utilized in this research are
given in Table 8. Table 5 shows pure component data.
75
APPENDIX C
FORTRAN ROUTINES
This appendix contains the Fortran routines that were coupled with HGSYSTEM.
It also contains the main routine of HGSYSTEM that was modified in order to interface
the programs (ARTHRM. FOR).
The main subroutine that controls the calculations of the non-ideal
thermodynamics is called THERMAL. FOR. VALIK. FOR calculates the equilibrium
coefficients of distribution, K. PHIS. FOR, GAMMA. FOR, and PURF. FOR are all called
by this subroutine to estimate the fugacity coefficients, activity coefficients, and the
fugacity coefficient of the pure liquid. The files are mostly self-explanatory and are well
documented.
77
C C SUBROUTINES CORRESPONDING TO AEROSOL THERMODYNAJvflCS
C C— C C— C C G~ AEROSOL THERMODYNAivflCS ROUTINE C C C
C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C
C C C
TMP: reservoir temperature (on first call to ARTHRM)
SUBROUTINE ARTHRM(DMDT, DMDTPO, HTOT, HMDAMB, TAMB, PR, TMP, RMIX~LC, POLV)
Ttte geneml aerorstt thermodynamic routine
Original of Witlox modified considerably by Lourens Post
(Spring 1992)
INPUT: DMDT: total mass flow (original pollutant + mixed-in
ambient wet air) (kg/s) DMDTPO: pollutant only mass flow (kg/s) HTOT: current total mixture enthalpy (J/kg)
HMDAMB: ambient humidity (fraction between 0 and 1)) TAMB: ambient temperature (K) PR: plume pressure ( = normally ambient pressure)(Pa)
OUTPUT: TMP: mixture temperature (T in K) RMIX: mixture density (R in kg/m3) POLC: pollutant mass concentration (kg polit/m3 mixture)
POLY: pollutant volumetric conc. (m3 poll/m3 mixture)
Side-eflccts: variables from /LLBETA/, /MIXPRP/ and /ASLPRP/ are changed
From DMDT and DMDTPO we deduce the mixture composition in terms of poflutant and mixed-in wet air.
Please note HTOT is in J/kg but internally ARTHRM works with
enihalpies in J/mole
We try to have as little side-effects as possible, we do not
change /CBO/ variables in ARTHRM. Pressure and temperature are
transported to LSOLVE and LRESID via /PANDT/
SAVE
All basic aerosol properties
78
C C C C
C
INTEGER MNSPEC, MNCLAS MNSPEC: number of species including water and 0. 0 1% dry air Thus SPECIES keyword can occur at most MNSPEC-2 times in AEROPLUM
input file MNCLAS: max. number of aerosol classes occurring
PARAMETER (MNSPEC= IO, MNCLAS 9)
INTEGER NSPEC INTEGER POLCLS(MNSPEC) DOUBLE PRECISION POLFRC(MNSPEC) DOUBLE PRECISION POLPRP(1 I, MNSPEC) COMMON /PRPPL I/ NSPEC, POLCLS COMMON /PRPPL3/ POLFRC, POLPRP
CAL ADDITION OF ARMANDO LARA INTEGER NAEROS COMMON /SPECIAL/NAEROS
CAL ADDITION OF ~O LARA
C
C
INTEGER IFRQCL(MNCLAS), ICSTRT(MNCLAS), IPOINT(MNCLAS) COMMON /ASLPRP/ IFRQCL, ICSTRT, IPOINT
DOUBLE PRECISION MIXFRC(MNSPEC), MIXVAP(MNSPEC), MIXLIQ(MNSPEC)
COMMON /MIXPRP/ MIXFRC, MIXVAP, MIXLIQ
DOUBLE PRECISION L, LBETA(MNCLAS) COMMON /LLBETA/ L, LBETA
C C — — A WPROP: Dry air, water and pollutant properties
Set in INI Tf H
DOUBLE PRECISION CPA, CPWL, CPWV, CPWI, MMA, MMW, ~L, HWFF, HWV
C C C C C C C C C C C C
C
C
COMMON /AWPROP/ CPA, CPWL, CPWV, CPWI, MMA, MMW, MMPOL, HWFF, HWV
CPA - Specific heat of dry air (J/mole/K)
CPWL - Specific heat of liquid water (I/mole/K)
CPWV - Specific heat of water vapour (I/mole/K)
CPWI - Specific heat of ice (J/mole/K)
MMA - Mean molar mass of dry air (kg/kmole)
MMW - Molar mass of water (kg/kmole)
MMPOL - Molar mass of pollutant (kg/kmole)
(set in reservoir/stack calculation) HWFF - Latent heat of fusion for ice (Jhnole) HWV - Latent heat of vapourisation for water (J/mole)
LOGICAL CONDI, COND2, COND3, ERRRTN
CHARACTER PHASEsSO, STAGE sSO, FORMs 80
INTEGER J, JJ, K, NAER, ICLASS, IS, IP, ITERT, MAXIT INTEGER SCREEN, WARN, MONIT, RESULT(1:4) INTEGER SOURCE, LINKS(1: 3), SPRDBG, ERROR, DBGPRT, ERR
79
DOUBLE PRECISION DMDT, DMDTPOPIMDAMB, TAMB, HTOT DOUBLE PRECISION RMIXPOLC JOLVMMWAYPOLTOLI TOL2
DOUBLE PRECISION PV PVAP TMPO XO YO Xl, Yl TMINP TMAXP
DOUBLE PRECISION SAER(MNCLAS), PRATIO, RATIO, TERM I, TERM2, HIMOLE
DOUBLE PRECISION MMMXIR, ~YWATER, WAIR, ~ DOUBLE PRECISION RPOL, RHELPPIELPI DOUBLE PRECISION T I, T2, FACTOR, EPS, TEMPERATURA, PRESION
DOUBLE PRECISION PREF, TICE DOUBLE PRECISION PRESS, TEMP DOUBLE PRECISION PI, UGC, G
COMMON /DEVICE/ SCREEN, WARN, MONIT, SPRDBG, SOURCE, LINKS, RESULT, ERROR, DBGPRT
COMMON /REFS/ PREF, TICE COMMON /ERRFLG/ ERRRTN COMMON /PANDT/ PRESS, TEMP COMMON /C9/ PI, UGC, G COMMON /CB I I/ PHASE, STAGE, FORM
DOUBLE PRECISION D, U, PHI, DX, Z, R, T, P, H, CPOL, VPOL
COMMON /CBO/ D, U, PHI, DX, Z, R, T, P, H, CPOL, VPOL INTRINSIC MAX, ABS, MIN EXTERNAL PV, PVAP, LSOLVE, MMtvD(TR, ~OPENER, OUTPUT
CAL ADDITION OF ARMANDO LARA EXTERNAL THERMAL INCLUDE 'SPECIAL. INC'
CAL ADDITION OF ARMANDO LARA
C C C C
C C
C C C
C C C
C C
C C C
Initialize several variables
Temperature iteration parameters DATA MAXIT/100/, TOL1/1. 0D-10/, TOL2/1. 0D-12/, EPS/1. 0D-10/
Melting range of water/ice
DATA T 1/273. OODO/, T2/273. 30DO/
Set total molar fractions water YW and air YA in mixture
Molar fraction water in moist ambient air (generally valid)
WAIR = HMDAMB*PV(TAMB)/PR
Set (average) molar mass of ambient (nuxed-in) wet air
(=dry air+water) MMWA = (I. ODO - WAIR) "MMA + WAIR"MMW
Set molar fraction of pollutant (mole pollutant/mole mixture)
YPOL = MMWA" DMDTPO/(MMPOLs(DMDT-DMDTPO) + MMWAsDMDTPO)
Molar fraction of mixed-in dry air in the mixture
I - YPOL is the molar fraction of mixed-in ambient wet air
YAIR = (1. 0DO - YPOL)s(1. 0DO - WAIR)
80
C C Molar fraction of water in nuxture (from mixed-iu arubient wet air
C and pollutant) Molar fraction water in pollutant is POLFRC(1) YWATER = (I. ODO - YPOL)sWAIR+ YPOLsPOLFRC(I)
C C Start aemarl algorithm C C Set 'maximum aemsol class nuinber' NAER
NAER = POLCLS(NSPEC) C C Set mixture fractions MIXFRC(1:NSPEC), (mole / ruole of mixture)
C Number of first compound in each class: ICSTRT(NAER) C Amount of mixture compounds in each dass: IFRQCL(NAER)
C Compound I: water (from mixed-in ambient humid air and (possibly)
C from pollutant C
MIXFRC(1) = YWATER ICSTRT(1) = I IFRQCL(1) = I DO 10 J=2, NAER
IFRQCL(J)& 10 CONTIN'
DO 20 J=2, NSPEC C Correct the MIXFRC (mole of compound J per mole ~) for
C the dilution by mixed-in air
~C(J) = POLFRC(J)sYPOL ICLASS = POLCLS(J) IF (IFRQCL(ICLASS). EQ. O) ICSTRT(ICLASS)=J IFRQCL(ICLASS) = IFRQCL(ICLASS)+ I
20 CONTINUE C C Solve the enthalpy conservation equation for TMP. C C Convert HTOT from I/kg to I/mole for internal use
MMMIX = MMMXTR(YAIR, YWATER) HJMOLE = HTOT~~i'1. 0D-3
C C Initial value for TMP is value from last call, C on first call TMP = TFLASH C
ITERT = 0 Xl = O. ODO
Yl = O. ODO
C 19&2-93 L. Post C TMAXP set to 2000 K on request of Andy Prothero
C Wc consider temperatures below 0 K and above 2000 K to be unacceptable
TMINP = O. ODO
TMAXP = 2000. 0DO
C C Start iterations from here C 100 CONTINUE
C
C C C
TMPO = TMP ITERT = ITERT + I
TMPO is current guess for the temperature
ITERT is the number of temperature iterations
C C Determine which aerosols (might) form first at temp. TMP and P = PR C Aerosol forms for class j (j=1, , NAER) &=& SAER(j) & L C SAER[j]=1-PRaSUM OF SPECS IN@{&spec. gmction&/PV~)&} C TMP AND TMPO in K, PR in Pa, PV and PVAP in Pa
IS=0 DO 110 J= I, NAER
SAER(J)=0. 0DO IF (IFRQCL(J) . GT. 0) THEN
DO 105 K=I, IFRQCL(J) IS = IS+ I IF (IS. EQ. I) THEN
SAER(J) = SAER(J)+MIXFRC(IS)/PV(TMM) ELSE
SAER(J) = SAER(J)+MIXFRC(IS)/PVAP(TMl%, POLPRP(4, IS)) ENDIF
105 CONTINUE ENDIF SAER(J)=I. ODO - PRsSAER(J)
110 CONTINUE C C Order the SAER C Sct IPOINT such that SAER[IPOINT(1)j « . . . SAER[IPOINT(NAER)] C [Thus aerosol-class IPOINT(l) forms first] C We use the QUICKSORT algoritlun
C IPOINT(1)=1 IF (NAER. GT. 1) THEN
DO 120 J=2, NAER C SAER sorted for 1, . . . , J-I; add sorting for J
DO 115 K=J-1, 1, -1
IF (SAER(IPOINT(K)). GT. SAER(J)) THEN IPOINT(K+1)=IPOINT(K) IF (K. EQ. I) IPOINT(K)=J
ELSE IPOINT(K+1)=I GOTO 120
ENDIF 115 CONTINUE 120 CONTINUE
ENDIF C C Loop over aerosols (1=1, 2, . . . ) to see if they have actually formed:
C set total and aerosol liquid mole fraction L and LBETA and the number of C aerosols that actually form NAEROS C
82
C Solve for L and LBETA's C C Initialize L and LBETA: must be 0 because algorithm assumes vapour-only
C state when starting calculation. L= O. ODO
DO 130 J=1, MNCLAS LBETA(J) 0. 0DO
130 CO~ C C Set PRESS and TEMP of common /PANDT/, used by LSOLVE and LRESID
PRESS = PR TEMP = TMP
C DO 200 J=I, NAER
C aerosol does form for I, , J-I; check if aerosol J forms
IP = IPOINT(J) IF (SAER(IP) . LT. L) THEN
C Aerosol forms for class IP C Solve for LBETA: N = J unknowns. L is simply the sum of the LBETA's
CALL LSOLVE(J) C 30%6-93 L. Post C If NAESOL fails in LSOLVE, program wifl eventually stop because
C a flag is set in LSOLVE. ELSE
C Aerosol IP does not form, no other aerosols will form due to
C ordering, set NAEROS and stop loop over aerosols
NAEROS = J-I GOTO 210
ENDIF 200 CONTINUE
C C All aerosols will form
NAEROS = NAER C
210 CONTINUE C C Evaluate mole fracuons of vapour and liquid for each compound
C First compounds tltat are in an aerosol tlmt actually forms
C PR is in Pa (= N/m2) and TMPO in K C CDEBUG LTEST=O. ODO
IF (NAEROS . GT. 0) THEN DO 220 J= 1, NAEROS
IP = IPOINT(J) DO 215 IS=ICSTRT(IP), ICSTRT(IP)+IFRQCL(IP)-I
IF (IS. EQ. 1) THEN PRATIO = PV(TMPO)/PR
ELSE PRATIO = PVAP(TMPO, POLPRP(4, 1S))/PR
ENDIF C C Set molar fraction vapour of compound IS (mole/mole of mixture)
MIXVAP(IS) = MIXFRC(IS) a(L-I. DO)/
83
(L-1. DO-LBETA(IP)/PRATIO)
C Set molar fraction liquid of compound IS (mole/mole of mixture)
MIXLIQ(IS)=MAX(0. 0D0, MIXFRC(IS)-MIXVAP(IS))
C Debug tests, variables must be declared
C CHECK(IS) must be equal to MIXVAPGS)
CDEBUG CHECK(IS) = MIXFRC(18)sLBETA(IP)/
CDEBUG dt (LBETA(IP)+(I. DO-L) sPRATIO)
CDEBUG LTEST = LTEST + MIXLIQ(IS) C 215 CO~ 220 CO~
ENDIF C C Next set mole fractions vapour and liquid for compounds in vapour only
C state (aemsol does not form)
C IF (NAEROS . LT. NAER) THEN
JJ= NAEROS+ I DO 240 J=JJ, NAER
DO 230 K= I, IFRQCLGPOINT(J)) IS = ICSTRT(IPOINT(J)) + K - I MIXVAP(IS) = MIXFRC(IS) MIXLIQ(IS) = 0. 0DO
230 CONTINUE 240 CONTINUE
ENDIF
CAL ADDITION OF ARMANDO LARA
CAL CALL THERMAL TO CALCULATE NONIDEAL CONDITIONS USING IDEAL
CAL CONDITIONS AS INITIAL ESTIMATES CALL THERMAL()
CAL ADDITION OF ARMANDO LARA
C C Calculate enthalpy conservation equauon and solve for temperature
C Please note that the enttralpy reference temperature is TICE=273. 15
C K== 0C C Enthalpy equation: C TERMI(T) = TERM2(T) s (T - TICE), T is temperature where TERM1
C contains the HJMOLE term and the temperature independent
C contributions of the pollutant (see equation (5) in TNER. 92 00tt)
C (POLPRP(1-3, ISPEC) = vap. spec. heat, liq. spec. heat, heat of evap. ) C
TERM I = H JMOLE TERM2 = YAIR~CPA
C C Add contribution of water
IF (MIXFRC(1) . GT. O. ODO) THEN
IF (TMPO . LE. Tl) THEN C Ice is being formed
TERM I = TERM I + MIXLIQ(1)s(POLPRP(3, 1) + HWFF)
TERM2 = TERM2 + MIXVAP(1)*POLPRP(1, 1) + MIXLIQ(1)*CPWI ELSE IF (TMPO . GE. T2) THEN
84
C No ice formed TERM I = TERMI + MIXLIQ(l)*POLPRP(3, 1) TERM2 = TERM2+ MIXVAP(l)vPOLPRP(I, I)+MIXLIQ(I)vPOLPRP(2, 1)
ELSE C T I & TMPO & T2 C 22/6/92 To prevent the discontinuity arising hum the forming of C L. Post ice (which causes severe numerical problems in some cases)
C we introduce a melting range [TI, T2] with Tl & TICE & T2,
C With in the melting range TERMI and TERM2 change linearly
C from the value at Tl (only ice) to the value at T2 (no ice)
C C 0&FACTOR& I
C C
FACTOR=MIN(T2-TMPO, T2- Tl)/(T2- Tl) TERM I = TERM I + MIXLIQ(1) v(POLPRP(3, I) + FACTORv~ TERM2 = TERM2+ MIXVAP(1)*POLPRP(1, 1) +
MIXLIQ(1) v((I, DO-FACTOR)*POLPRP(2, 1) + FACTORvCPWD
ENDIF ENDIF
Add contribuuon of other compounds
DO 260 IS=2, NSPEC TERM I = TERM I + MIXLIQGS)*POLPRP(3, IS) TERM2 = TERM2 + MIXVAP(IS) vPOLPRP( I, IS)+MIXLIQE S)*POLPRP(2, 1S)
260 CONTINUE C C C C
C C C
C
C C C C C C C
C C C
Set new estimate for temperature
[temperature equation: Y(T) = (TERM 1(T)ffERM2(T)+TICE] - T = 0] Current value for T is TMPO, new value will be based on TMP
TMP = TERM1 / TERM2+ TICE
Update former estimates XO, Xl of temperature, YO= Y(XO), Yl= Y(XI) and lower/upper bounds TMINP, ThSVP for temperature
XO = Xl YO= Yl Xl = TMPO Note !!tat Yl = Y(TMPO)
Yl = TMP - TMPO
We know that TMPO and the root of the equation lie in the interval
[TMINP, TMAXP] (TMP can be outside this interval!)
We now improve our closing in of the root by updaung the interval
boundaries. Please note Utat Y(T) becomes negative for T larger
limn the root!
IF (Yl . GE. O. ODO) THEN TMINP = TMPO
ELSE ~ = TMPO
ENDIF
Check for convergence of temperature iterations
Difference between two successive estimates = function value of Y COND I = ABS(Y1) . GT. TOLI
85
C C Size of interval in which root lies
COND2 = ABS~ - TMIhP) . GT. TOL2
C IF (COND I . AND. COND 2) THEN
C Non-convergence C Less than MAXIT iterations
IF (ITERT . LT. ~ THEN
C C
C C C C C
Step used in Newton iteration
COND3 = ABS(YI - YO) . GT. TOLl IF (ITERT . GE. 3, AND. COND3) THEN
Find new estimate of temperature TMP by approximate
solution of Y(TMP)W using former estimates at XO, XI tYI~ Y(TMP)+(Xl-TMP)DY/DX = (Xl-TMP)(YI-YO)/(Xl-XO)]
In other words: we 'polish up' the Picard estimate using
a Newton step TMP = Xl - Yl*(XI-XO)/(Yl- YO)
ENDIF C C C
C C C
Cany out next iteration but first ensure that new estimate
TMP lies in the interval ~, ~) TMP = MAX(TMINP, MIN~, TMP))
If interval where root is in, decreases in size too slowly
then force it to halve. RATIO = ABS(TMP - TMPO)/~ - TMINP)
IF (RATIO . GT. 0. 5DO) TMP = (TMINP + TMAXP)/2. 0DO
C Start next iteration
GOTO 100 C
ELSE C C Non-converging
C Prim error messag
C lobal error fla E
afler MAXIT iterations: no proper root.
e and eventually stop program by seuing
g g RRRTN.
CALL OUTPUT('lialt') CALL OPENER WRITE(ERROR, '(/A/A/A/A/)')
'Non-converging iterative procedure for temperature. ',
'No proper root I'ound of enthalpy conservation equation. ',
'Error in aerosol thermodynamics routine "ARTHRM". ',
'Seek expert advice. '
C C 22/6/92 Special case of melting icc no longer needed due to
C introduction of melting range. Modification of Lourens Post.
C
ERRRTN = . TRUE, GOTO 9999
86
C C C C
C C
C C
C
C C
Proper root found
When process stopped because changes in TMP had become too small.
IF (. NOT. (COND2)) THEN
. . . ensure that TMP has the %est' available value
TMP ~ ~ + ~)/2. 0DO
modify tolerance to 'reasonable' value for the current mixture
TOLI = MIN(I. OD4, MAX(TOLI, (ABS(Y I)/5. DO)))
END IF
If TOLI seems to be too large, then make it smaller, but never
smaller than certain minimum
IF ((TOLI . GT. 5. 0DOsEPS) . AND. (ITERT. LE. 3)) THEN
TOLI = MAX(EPS, TOLI/5. 0DO)
END IF
C
C C
C C
C C C C C C C C C C C
C C C
C C
Update PHASE IF (L . GT. O. ODO) THEN
PHASE = 'two phase mixture'
ELSE PHASE = 'vapour phase mixture'
END IF
Update rho RMIX = ~YAIR, YWATER, PR, TMP)
Calculate the pogutant concentration (kg pollutant per m3 mixture)
POLC = DMDTPO/DMDTvRMIX
POLC is in kg pollutant per m3 mixture. Let RPOL be the density of
the pollutant in kg pollutant/m3 POLLUTANT, then the volumetric
concentration of pollutant POLV is POLC/RPOL
We calculate RPOL in a similar way as RMXIR
RHELP in m3 pollutant per kmole POLLUTANT
HELPI is mole fraction pollutant vapour per kmole POLLUTANT
(not ~) MIXFRC(1) can be 0, but then MIXVAP(1)=0. For vapour only mixture HELP I = I (checked).
Formula correcled slightly 6-11-92 HELPI = (1. 0DO- L- YAIR-(I. ODO-YPOL)sWAIRv
MIXVAP(1)/(MIXFRC(1)+1. 0D-20))/YPOL RHELP = UGCvTMPvHELPI/PR
Add liquid water contribution (pollutant part only)
Initially YWATER can be 0 (when POLFRC(1) is 0) HELPI = POLFRC(1)/(YWATER+I. OD-12)vMIXLIQ(1)
RHELP = RHELP + HELPlsMMW/POLPRP(11, 1)
Add liquid contributions of all other compounds (/kmole POLLUTANT)
87
DO 300 IS=2, NSPEC RHELP = RHELP + MIXLIQ(IS)/YPOL*POLPRP(IO, IS)/POLPRP(1 I, IS)
300 CONTINVE C C Set RPOL (kg pollutant per m3 pollutant)
RPOL = MMPO~ C C Set POLV (m3 pollutant per m3 mixture)
POLY = POLC/RPOL C 9999 CO~
C C — end of subroutine ARTHRM
END
SUBROUTINE THERMAL P SAVE
CALtiiiiiiiiliiiiiiliill iiiiiiii'iiiiiiii iiiiiii liiiiiiiiiilisiiiiiiiiiiiii CALi CAL» PURPOSE: PERFORM NONIDEAL VLLE CALCULATIONS
C ALi == — =- CALi CALi DESCRIPTION: Compute the thermodynamic conditions within
CALi the Gas - Air - Water nuxture of the etoud.
CAL» CALi PARA%%TERS: CALi ==-=-=== CALi CALi INPUT: TMP JR, MIXFRC, YAIRPCIXVAP+
CAL» CALi CALi OUTPUT: MIXLIQ, MIXVAP, L
CAL ii'iiiiii'iliiiiiiliii iii Ill i iiiiiiii iii'iiiil iiiiiiii iiiiiiiil Iiiiiiiii i
CALiiiiliiiiii iii ii ii liil iiiiii l liiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiii CALi CALi DECLARATION OF VARIABLES
CALi AND EXTERNAL FILES
CALi ( ALii iii iiiiiiiiiiiiiiiiiiiiiiiiiiitiii iiiiiiiii Iiiiiiiiiiiiiiiiiiiiiiiii
PARAMETER (MN SPEC= 10, MNCL AS= 9)
INTEGER NSPEC, POLCLS(MNSPEC), CONY, (TER, ERR
COMMON /PRPPL1/ NSPEC, POLCLS
DOUBLE PRECISION POLFRC(MNSPEC), POLPRP(11, MNSPEC)
COMMON /PRPPL3/ POLFRC, POLPRP
DOUBLE PRECISION MIXFRC(MNSPEC), MIXVAP(MNSPEC), MIXLIQ(MNSPEC)
COMMON /MIXPRP/ MIXFRC, MIXVAP, MIXLIQ
DOUBLE PRECISION LLBETA(MNCLAS)
COMMON /LLBETA/ L, LBETA
DOUBLE PRECISION XI(MN SPEC+ I), Y(MNSPEC+1), KI(MNSPEC+ I), XII(MN SPEC+ I ), Y SUM. ALPHA(100), BETA(100), ACTI(MN SPEC+ I), ACTII(MNSPEC+1), NUM, DENOM, SUMXI, SUMXII, SUMY, CHECK1, CHECK2,
CHECK3, ALPHAIN, BETAIN, KII(MN SPEC+1), DEN4, DEN2, DEN3, SUM
EXTERNAL VALIK, NEWT
INCLUDE 'SPECIAL. INC'
CALi ii'liiii i ii iiii liiiiiii liiiiiii i i ~ i'it i iiiii'iiiiiiiiili iiiiiiiii'i iiiiii CALi CONVERT TO 'NORMAL' MOLE FRACTIONS
CAL» INITIALLY, COMPONENTS 1, 2, NSPEC-I
CAL» ARE POLLUTANT COMPONENTS. NSPEC IS THE
CAL» 0. 01% DRY AIR ADDED FOR NUMEMCAL REASONS.
CAL» NOTICE THAT THE CONCENTARTION OF N2
CAL» TAKES THE PLACE OF THE CONCENTRATION
CAL» OF 0. 01% DRY AIR.
( AL»t'ttt» tttt»»ttt tt tttt» t»»tt »»1»ttt»»tttttt»tt»t» ~ t»»»»»f » ttt»»»» tt»t»t
XI(2)=1, 0 XII(l)=1. 0 YSUM&. 0
DO 10 1= 1, NSPEC-I Yg)=MIXVAP(I)/( I. O-L)
YSUM= YSUM+Yg) 10 CONTINUE
CAL» CONCENIRATION OF N2 IN VAPOR
Y(NSPEC)=(I-YSUM)»0, 79 CAL» CONCENTRATION OF 02 IN VAPOR
Y(NSPEC+ I)= l. 0- YSUM- Y(NSPEC+I)
CAL»ttttttttt»tttttt»tttt»tttttt»»ttttt»»»»»»»»»»»»»»»ttttt»»»»»»»»»»»»»»
CAL» START ITERATIONS WITH
CAL» ASSUMPTION ALPHA= I-L (FROM IDEAL SOLUTION)
CAL» AND COMPUTING BETA CAL»tttttt»»t»ttttt»ttt tt»ttt»t t»»tt»»tt»tttttfttt» tttttttttttttttttttt»»
ITER=O
ALPHA(1)=1. 0-L NUM=MIXFRC(1)»ACTI)(l)-ALPHA(1) t(KII(1)-1. 0)-1. 0
DENOM=(1. 0-ALPHA(1))*(KII(l)/(KI(1)-1. 0)) BETA(1)=NUM/DENOM
12 IF(ITER. LT. 101) THEN ITER=ITER+ I
ELSE GOTO 50
ENDIF CAL»tttt»»ttttt»ttttttttttt»»»t»ttt»tt'»»»»»»tttt»ttttttttttttttttttt»tttt
CAL COMPUTE K-VALUES CAL»tttttttt»ttttt»tttttttttttttttttt»»»»»»»»ttttt»»»ttttt»tttttt»ltttttt
CALL VALIK (N SPEC, XI. Y, KI, ACTI)
CALL VALIK (NSPEC, XII, Y, KII, ACTII)
CAL t t t » t t t t t t t t t t t t t » t t t t t »»» t t t t t t t t t » l 't t t' t t t t » t t t t t t »» »ted t I»» t t t t t » I » t t
CAL COMPUTE COMPOSITIONS
( AL»tt»»»»tt»t»tttt»ttttttttt»tt ~ »»ttttt»»t'tfttt»»ttttt»t»ttt»»»t»ttt»»tt
DO 15 I=I, NSPEC+I IF(KII(I). GT. O. O) THEN
IF(I. LE. NSPEC-I) THEN
DEN2= BETA(ITER) ~( I -ALPHA()TER))
DEN3=((1. 0-ALPHA()TER)) ~(I. O-BETA(ITER)) ~KI(I)/KII(I))
DEN4=ALPHA(ITER) "KI(I) Xl(I) =MIXFRC(I)/(DEN2+ DEN 3+DEN4)
ELSEIF(l. EQ. NSPEC) THEN
DEN2=BETA(ITER) ~(1-ALPHA(ITER))
DEN3=((1 O-ALPHA()TER))*(I. O-BETA(ITER))~KIH)/KHO))
DEN4=ALPHAQTER)*KI(I) Xlg)=(YAIR+MIXFRC(NSPE C)) ~0, 79/(DEN 2+DEN3+DEN4)
ELSE THEN DEN2=BETA(ITER) ~(I. O-ALPHA(ITER))
DEN 3=((I. O-ALPHA(ITER))*(1. 0-BETA(ITER))" KI(I)/KIIG))
DEN4=ALPHA(ITER)~KI(I) Xl(I)=(YAIR+MIXFRC(NSPEC))~0. 21/(DEN2+DEN3+DEN4)
ENDIF ENDIF
30
Y(I)=KI(I)*XI(I) IF(KII(1). GT. 0. 0) THEN XII(I)=KI(I)~XI(1)/KII(l) ENDIF
CONTINUE
SUMXI=O. P
SUMXII=P. O
SUMY=P. 0
DO 30 I= I, NSPEC+2 SUMXI=SUMXI+Xl(I) SUMXII=SUMXII+Xll(1) SUMY=SUMY+Y(I)
CONTINUE
CHECK I = SUMXI-SUM Y CHECK2= SUMXI-SUMXII CHECK3=SUMXII-SUMY
( AL'ltAIAtftt I tttf44441444844t444h"t+444 Ilf 144 Iltt+0 44 tl444448wt444th 4444th
CAL CHECK FOR CONVERGENCE 444th 444441e44448tlt1484t44I 44444 8444 f 444th 14t4484tktttt+44I444ee4440
CONV= I
IF(CHECKI. GT. I. E-06) CONV=O
IF(CHECK2. GT. I. E4)6) CONY=0
IF(CHECK3. GT. 1. E-06) CONV=O
IF(ITERGT. I) THEN
ALPHAIN=ALPHA@TER)-ALPHA(TER-I) BETAIN =BETA(ITER)-BETA@TER-I)
IF(ALPHAIN. GT. IE46) THEN
CONY' ENDIF
IF(BETAIN. GT. IE-06) THEN CONY=0
ENDIF
IF(CONV. EQ. I ) THEN GOTO 50
ENDIF CALtettttt t %eeet t tteeettttttttt tt ttttttttttt etttttt t tttttttttt teeetl ttttt CAL IF NOT CONVERGENCE I I I
CAL COMPUTATION CHECKS
CAL ADJUST MULTIPHASE
CAL EXISTANCE INDICATORS (alplm and kapa) CAL'tttttt lttttttttttttttttttttttttttltttt'ttttttt'ttt'tttttttttttttttttttttt
IF(SUMXI. GT. SUMY. AND. SUMXII. GT. SUMY) GOTO 45
IF(SUMXI. GT. SUMXII) GOTO 35
CALtttttttttttttttt lttttttttttttttttttttttttttttet'e'tt tttttttttttttttttttt CAL ADJUST ALPHA OBJECTIVE FUNCTION
CAL SUMXII-SUMY=O CALttttttttttttttttttttttttttttttttt'tttttttttttttttttttttttt'tttttttt"t'tete
CALL NEWT(NSPEC, BETA(ITER), KI, KII, MIXFRC, YAIR, ACTII(1), " AI. PHA(ITER+1), 2)
GOTO 40
( ALtttttttttttttttttttettttttttettttttttttttttttttttttttttttttttttttttttt CAL ADJUST ALPHA OBJECTIVE FUNCTION
CAL SUMXI-SUMY=O CALItetttttttttttttttttttttttete Ilttttt'tttttttttttttttttttttttttttttttttt
35 CALL NEWT(NSPEC, BETA(ITER), KI, KII, MIXFRC, YAIR, ACTII(l), t ALPHA(ITER+1), 1)
40 NUM=MIXFRC(1)tACTII(1)-ALPHA(ITER+1)t(KII(1)-1. 0)-1. 0 DENOM=(1-ALPHA(ITER+ 1)) t(KII(1)/(KI(1)- I . 0)) BETA(ITER+1)=NUMKENOM
GOTO 12
92
CALffftffffltltttttl tf III «IIII f1«11111«« tl ltttltttttlttttftJ«tfttft«III«I CAL ADJUST BETA OBJECTIVE FUNCTION
CAL SUMXI-SUMXII=O CALtl« « it«'If«i Itttl l tftftfffff 111 tftttttttftttttIItttfttftttIl I 1111 ttfl lt
45 CALL NEWT(NSPEC, BETA(ITER+1), KI, KII, MIXFRC, YAIR, ACTII(I), I ALPHAHTER), 3)
CALL NEWT(NSPEC, BETAGTER+I), KI, KII, MIXFRC, YAIR, ACTH(1), I ALP~+1), 4)
GOTO 12
CALI I I I t tt I I I I I I I I I I I I l f I I I I I I I I I I ~ I I I I I t I I I I I I I t I I I l l I I I I I I I I I I I t t I l I I I I I I CAL IF CONVERGENCE IS ATI'AINED,
CAL GO BACK TO THRMNO. 111111111 III f1 f1 ffff If JJIfl ttf ttttttttt tlttttfl tttt1111tttfl If« It« tttt
50 CO~ L= 1. 0-ALPHA(ITER)
SUMW. O
DO 60 1=1+NSPEC-1 MIXLIQU)=XI(1)«BETA(ITER)+XII(I) 1(I. O-BETA(ITER))
SUM=MIXLIQ(I)+SUM MIXVAP(I)= Y(I) I(ALPHA()TER))
60 CONTINUE
END
93
SUBROUTINE VALIK(NSPEC, X, Y, K, GAMAC)
CALttl &11111111111 111&1&&fttttttt&ttttlt111111 It&1&It&I&i t&IIIIIIIiIIIIIII&
CAL CALCULATE EQUILIBRIUM RATIOS, K CALttllltttttltlltltltttltf&tl tl&tttttltttttttttttff ll tftlttit&ttlll lIIIIII
PARAhKTER (MNSPEC= IO, MNCLAS=9)
INTEGER NSPEC
DOUBLE PRECISION X(MNSPEC+I), Y(MNSPEC+1), PHI(MNSPEC+I)
DOUBLE PRECISION GAMAC(MNSPEC+1), HP(MNSPEC+1), K(MNSPEC+I)
DOUBLE PRECISION MIXPRC(MNSPEC+I)
INCLUDE 'SPECIAL INC'
EXTERNAL PHIS JURF, GAMMA
1&1 I &I tttttttttttl I&i I&It&i 1111 lt1111111111&ttttttl ttttf ttl tfl f1tl IIIII
CAL GET VAPOR PHASE FUGACITY COEFFICIENTS, PHI
CALI&&It It&f1&i I tl I tl tttl t It&f 1 It&It&If l ftl I l I ttl tl 111111111111&&111 t&&l t&1
110 CALL PHIS(NSPEC, Y, PHI)
CAL PRINTI, 'PHIS'
CAL PRINT&, PHI(1), PHI(2), PHI(3), PHI(4)
CALtl 11&tttl f tf tttttttl IIIIIIIII &tttttttttttttttf Itttttttf IIIII't11111111111
CAL GET PURE COMPONENT LIQUID FUGACITIES, FIP
CAL&& lf tf 1&1&l'l'&'I tttttttt It&It&i IIIIII & 11'I'IIIIII I itf 111&IIi I I Itf 11&'IIIIIIII
120 CALL PURF(NSPEC, FIP) CAL PRINT&, 'FIP CAL PRINT&, FIP(1), FIP(2), FIP(3), FIP(4) CALI&&I&I&It&It i lt Ittt tttttttttl tl'I it&It&1 I I it I ttt Ill tl IIIIIIII ll'I'1tf 111 it&
CAL GET LIQUID PHASE ACTIVITY COEFFIVIENTS, GAM
CAL It& 1&IIIIIi l 11111&'& ltttttt& it&It'11&11&i It&It&ill tttl II IIIII If I&i tl l ttttt 130 CALL GAMMA(NSPEC, X, TMP, GAMAC)
PRINT&, 'GAMA S'
PRINT&, GAMAC(1), GAMAC(2), GAMAC(3), GAMAC(4)
CALI I I I I I t I t I I I & l' l' I I t I I I I I I I I I I I I I I I I I I I t I I I & l O' I I I I t I I I I I t I & I I I I I l' I I I t I I I I I
CAL CALCULATE K CAL IIII ll'l'IIIIIIII& It&It&i'IIIIIIII ll'ttttttt Ittl IIIII&'tttfftttttttl'&111&1 I I i
CAL PRINTI, PR, NSPEC CAL PRINTI, 'KS'
DO 140 I=I, NSPEC+I
K(I)=GAMAC(I)IFIP(I)/(PHI(I)IPR)
CAL PRINTI, K(I), I CALII I 11 11 tttf ttttf It&1*IIIIIIIIIIII 11 11111111111111111111111111111111 11111
CAL ON FAILURE TO FIND PHI SET K TO ZERO
CALI&&i ttttttttttttf ttf I&i I tttttl &1&i'l'tt f 111& il'tl &It&1 IIIII Ittf IIIIII tttttt
IF(K(l). LE. O. O. OR. K(I). GT. IE19) K(1)=0. 0
140 CONTINUE RETURN END
SUBROUTINE PHIS(NSPEC, Y, PHI) SAVE
CAL»»»»»»»»»»»»»»»»»»»»»»»l»»»»»»»»»l»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
CAL» CAL» PURPOSE: CALCULATE VAPOR PHASE FUGACITY COEFFICIENTS
C AL» CAL» CAL» DESCRIPTION: VAPOR PHASE FUGACITY COEFFICIENTS ARE CALCULATED AT CAL»
T(K), P(BAR), AND VAPOR PHASE COMPOSITION Y. CAL» CAL» P aVV+TERS CAL» ======- CAL» CAL» INPUT: NSPEC, Y(I), T, P CAL» CAL» OUTPUT: PHD), ERROR CAL» CAL»»»»»»»»»»»»»»»»»»»»»»l»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
CAL» CAL» DECLARATION OF VARIABLES
CAL» AND EXTERNAL FILES CAL» CAL»»»»»»»»»»»»»»»»»»»»»»»»»»»&»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
PARAhKTER (MNSPEC= I 0, MNCLAS=9)
DOUBLE PRECISION MIGUEL, AIvI, BM, ASTAR, BSTAR, Y(20) DOUBLE PRECISION PHI(20), ELENPHI(20), BIBS(20)
DOUBLE PRECISION BIB(20), TERM I, TERM2, TERM3, Z, DEL(20), PRT
DOUBLE PRECISION POLFRC(MNSPEC), POLPRP(11, MNSPEC)
COMMON /PRPPL3/ POLFRC, POLPRP
DOUBLE PRECISION A(MNSPEC), B(MNSPEC), KINT(MNSPEC, MNSPEC)
COMMON /PENG/ A, B, KINT INCLUDE 'SPECIAL. INC'
DATA R/8. 31473D6/
EXTERNAL PENGS CALL PENGS(T, NSPEC)
AM=0. O
BM=O. O
DO 10 1= 1, NSPEC+1 DO 5 J=I, NSPEC+I
AM= Y(I)»Y(J)»((A(I)*A(J))»'0. 5)»(I-KINT(I, J))+AM
5 CONTINUE
BM= Y(1)»B(I)+BM
95
10 CONTINUE
PRT=PR/(R»TMP)
ASTAR= AM»PRT/(R*TMP) BSTAR=BM»PRT
TERM I =-I-BSTAR+24BSTAR TERM2=ASTAR-(BSTAR»»2)-(24BSTAR)-(2»BSTAR442) TERM3=(-ASTARIB STAR)+(8 STAR» 42)+(B STAR»»3)
CALL SOLV(TERM I, TERM2, TERM3g)
DO 20 1= 1, NSPEC+I DEL(~. 0 BIBS(I)~0. 0
DO 15 J=I, NSPEC+I DELU)=DEL(B+Y(Jj»(A(J)»40, 5) t(I-KINT(I+)
BIBS(1)=(Y(J)ITCRIT(J)/PCRIT(J))+BIBS(1) 15 CO~
DEL(I)=DEL(I) »24(A(I)»»0 5)/AM
BIBU)=(TCRITG)/P CRIT(1))/BIB S(I) 20 CONTIN'
TERM4=0. 0 TERMSW. O
DO 30 1= 1, NSPEC+ I TERM4=ASTAR»(BIB(1)-DEL(I))/(B STAR»(8. 0»»0. 5)) TERMS=DLOG((2. 0»Z+BSTAR»(2. 0+(8. 04»0. 5)))/ I(2. 0»Z+BSTARI(2. 0/8. 04»0. 5)))) ELENPHI(I) =BIB(I) 4(Z-I. O)-DLOG(Z-B STAR)+TERM4»TERM5
PHI(I)=DEXP(ELENPHI(I)) IF(PHI(1). GT. 1. 0D+20. OR. PHI(1). LT. O. O) PHI(I)=0. 0 TERM4=0. 0 TERMS=O. O
30 CONTINUE
CAL44 I »4'»444tttttttt4444444444444»»I»I»It»44444444ltttlttttttttttt44 CALI»I» Itt»444»tttt4444444»h 'till»I ttttlllttlttttttth lttttt»444444444 CAL»'»444444»It» t»I 44444 I II I II »l»tttttt444»lt»»»»»t»»lilt»44444444444
CAL» CAL» SUBROUTINE SOLV CAI. »
CAL» THIS SUBROUTINE SOLVES THE CUBIC EQUATION PENG ROBINSON
CAL» FOR THE COMPRESSIBILITY FACTOR. CAL» CALI»I»4444444»IIIII 4 4 »t»444t»44»»III»4»44»4»I 444444»t»444444»II 44»t CAL»»4444»»»»»»»»»»»»»tt»»tt»»»»»»»»»t»»»»»»»»»»»»»44»44»444»»»»»»»» CAL»»It»»»It»44»tttt ttltttttltlttltllt»It»44444444»II II» ttttlllltt I »
96
SUBROUTINE SOLV(TERM I, TERM2, TERM3, Z)
DOUBLE PRECISION F, FPRIME, TERM I, TERM2, TERM3, V@ARRAY(5), HOLD
DOUBLE PRECISION SI(3), Z
INTEGER FIRST, K, J, PTR
Z=O. O
F=Zi~3+TERMI~Z~*2+TERM2~Z+TERM3
IF (ABS(F). LT. 0. 0000000001) GOTO 100
DO 10 K=1, 1000 FPRIME=3. 0~(Z~~2)+2. 0*TERMI~Z+TERM2
Z=Z-(F/FPRIME) F=Zi ~ 3+ TERM I iZ**2+ TERlvD~Z+TERM3
IF(Z. LT. O. O) Z=O. O
IF (ABS(F). LT. 0. 0000000001) GOTO 100
10 CONTINUE
100 ZARRAY(1)=Z
ZW. 25
F=Z~ ~ 3+TERM I ~Z~~2+TERM2&Z+TERM3
IF (ABS(F). LT. 0. 0000000001) GOTO 200
DO 110 K=1, 1000 FPRIME=3. 0~(Zi ~ 2)+2. 0 ~TERMI *Z+TERM2
Z=Z-(F/FPRIME) F=Z~ ~ 3+TERM1~Z~~ 2+TERM2~Z+TERM3
IF(Z. LT. O. O) Z=O. O
IF (ABS(F). LT. 0. 0000000001) GOTO 200
110 CONTINUE
200 ZARRAY(2)=Z
Z=O. 5
F=Z~~3+TERMI ~Z*~2+TERM2~Z+TERM3
IF (ABS(F). LT. 0. 0000000001) GOTO 300
DO 210 K=1, 1000 FPRIME=3. 0*(Z~ ~ 2)+2 0 ~TERM I *Z+ TERM2
Z=Z-(F/FPRIME) F=Z~+3+TERMI+Ze+2+TERM2+Z+TERM3
IF(Z. LT. O. O) Z=O 0 IF (ABS(F). LT. 0. 0000000001) GOTO 300
210 CONTINUE
300 ZARRAY(3)=Z
Z=0. 75
F=Z~ i 3+TERM I ~Z~ i 2+ TERM 2~Z+ TERM 3
IF (ABS(F). LT. 0. 0000000001) GOTO 400
97
DO 310 K=I, 1000 FPRIME=3. 0~(Z~ ~ 2)+2. 0*TERM I ~Z+TERM2
Z=Z-(F/FPRIME) F=Zi ~ 3+ TERM I*Z*~2+TERM2iZ+TERM3
IF(Z. LT. O. O) Z&. 0 IF (ABS(F). LT. 0. 0000000001) GOTO 400
310 CO~ 400 ZARRAY(4)=Z
Z= 1. 0
F=Zi ~ 3+ TERM I*Z~*2+TERM2~Z+TERlvG
IF (ABS(F). LT. 0. 0000000001) GOTO 500
DO 410 K= I, 1000 FPRIME= 3. 0~(Z~ ~ 2)+2. O~RM I ~Z+TERM2
Z=Z-(F/FPRIME)
F Zi i3+TERMI +2++2+'fHQIQ&Z+TERM3
IF(Z. LT. 0. 0) ZW. O
IF (ABS(F). LT. 0. 0000000001) GOTO 500
410 CONTINUE
500 ZARRAY(5)=Z
DO 700 J=1, 4
PTR=J FIRST= J+1
DO 600 K=FIRST, 5 IF(ZARRAY(K). LT. ZARRAY(PTR)) PTR=K
600 CONTINUE
HOLD=ZARRAY(J) ZARRAY(J)=ZARRAY(PTR) ZARRAY(PTR)=HOLD
700 CONTINUE
Z=ZARRAY(5)
RETURN END
98
SUBROUTINE PURF(NSPECP1P) SAVE
( ALII ~ tllll&llettfttl& IIIIIII»11111111111111&»tlll&11111111tttltttellll
CAL THIS SUBROUTINE CALCULATES PURE LIQUID FUGADITIES AT PRESSURE P
eel 111111111& te IIIIIII» I IIIIIIII lle II I I IIIIIIII I"II IIIIII II 111111
PARAMFIER (MNSPEC= I 0, MNCLAS=9)
DOUBLE PRECISION FIP(MNSPEC) jOQVlNSPEC), VIP(MNSPEC), RT,
I AT, T2, FON(MN SPEC), TAU
INTEGER I, II, NSPEC INCLUDE 'SPECIAL. INC'
DATA R, CA, CB, CC, E/8, 3 1473 D6, 1. 60D0, 0. 655DO,
* 0. 00693026D0, 0. 28571429DO/
100 RT=RITMP AT=DLOG(TMP) T2=TMPITMP
DO 110 1= 1, NSPEC+ I
( ALtle&1111 1111111111& 11111&1'11 111'»11111111111111&lltlllltlll t<ll&'ltl
CAL GET PURE COMPONENT 0-PRESSURE FUGACITIES, FO IN BARS.
C ALI I I I I I I I I I I I I tt I I I I I II I I I I I I t I & I III 'I It I I I I I I I I I I I I I » I I I t t I I I I I I I t I I I
FO(1)=EXP(CI(1)+C2(I)/TMP+C3(I)ITMP+C4(I)IAT+C5(1)IT2)
FON(I)=F0(I)1100000
( ALII»eetllllt»111 IIIII»11111»»11111111»»11111'I&l»1»11111»1111 IIIII»111
CAL GET PURE COMPONENT LIQUID MOLAR VOLUMES, VIP CALte»1»l»teeeeltt»et»11»eeeeeelltttltel»1»11»lelllett»leeelllt»tee»Ill
105 106
TR= TMP/TCRIT(I) IF(TR. GT. 0. 75) GOTO 105 TAU=1. 0 +(1. 0- TR) I IE GOTO 106
TAU=CA+CC/(TR-CB) VIP(1)=RITCRIT(1)IAP(I)1»TAU/PCRIT(I)
110 CONTINUE
CAL» CALCULATE PURE COMPONENT LIQUID FUGACITIES AT P
DO 120 1=1, NSPEC+1 FIP(I)=FON(I)»EXP(VIP(I)IPR/RT)
120 CONTINUE
99
SUBROUTINE NEWT (NSPECr BETA& KI ~ Kllr MIXFRCr YAc GAMMAtALPHAt KEY)
SAVE
CALs***see***as*+*as***a****ass***a*ss**a 4 sk**+ ssk***k+****V a***a*a*+*as
** CAL* CAL* PURPOSE GAL*
FIND ZERO OF AN EQUATION SPECIFIED BY THE KEY
CAL* CAL* DESCRIPTION : Compute the thermodynamic conditions within
CAL+ the Gas — Air — Water mixture of the cloud.
CAL* CAL* PARAMETERS
CAL * CAL* CAL* INPUT T g P ~ MI XFRC J YA~ MIXVAP ~ L
CAL" CAL* CAL* OUTPUT: MIXFRC, YA, MIXVAP, L
CAL* (Initial values of MIXFRC, YA, MIXVAP, WGL required). CAL+s****set**ask+**ass***ass+****++***As*****asa****as****ass****as*tI* **+
CAL+*+*4**+*+*++*****+4+****+++***a**+**+a*++***ssl***4+****a*****sess*+ ***
DECLARATION OF VARIABLES
AND EXTERNAL FILES
CAL**+*+ **+ s **** at s **** s ***** s s *** s + * a *** k s*+ *** I ****+ + s + *** s + **** s t s *** **+
INTEGER KEY, NSPEC
DOUBLE PRECISION ALPHA' BETA' KI (NSPEC+1) g KI I (NSPEC+1 ) g
* MIXFRC (NSPEC+1), FCNN
DOUBLE PRECISION YA GAMB%&XI XII& Flr F2~ F3 FDER
INTEGER ITER INTRINSIC ABS
ITER=O XI=0. 5 ES=. 00000001 HA=1. 1*ES
5 IF(EA. GT. ES. AND. ITER. LT. 100) THEN
ITER=ITER+1
IF(KEY. EQ. 1) GOTO 10 IF(KEY. EQ. 2) GOTO 20 IF(KEY. EQ. 3) GOTO 30 IF(KEY. EQ. 4) GOTO 40
GAL****** a s k+ **+ J l*** I t+**** s * I + *s s***** a*+**+ +**+ *** % +** a ++ +**+ * a * 4+ *** *a+
100
ADJUST ALPHA OBJECTIVE FUNCTION
SUMXI — SUMY=O CAL*tttt****tttt t***t*tttt****tt tt******r *% t*t****ttt***** tt*tt****t***t r *t
10 CALL FCN (NSPECr BETAr KIr KIIr MIXFRCr YAr XIr lr FCNN)
Fl=FCNN CALL FCN (NSPECr BETAr KIr KIIrMIXFRCr YArXI+0 05r lr FCNN)
F2=FCNN CALL FCN (NSPEC, BETA, KI, KII, MIXFRC, YA, XI-0. 05, 1, FCNN)
F3=FCNN FDER=(F2-F3)/0. 1 GOTO 50 CALtt***tttt******tt*****ttt***t**ttttt*****r*ttt****t**t*tt**t*t*tr tt*t
CAL ADJUST ALPHA OBJECTIVE FUNCTION
CAL SUMXII — SUMY=0
gJ ********t*t***t*tt*tt*tt*tt*t*****t*t******r tt*t****t*ttt tt*t**t*t ttt t*t
20 CALL FCN (NSPEC, BETA, KI, KII, MIXFRC, YA, XI, 1, FCNN)
Fl= FCNN
CALL FCN (NSPEC BETAr KI KI I r MIXFRCr YAr XI+0 05 1 r FCNN)
F2= FCNN
CALL FCN (NSPECr BETAr KI r KII MIXFRCr YAr XI 0 ~ 05r lr FCNN)
F3= FCNN FDER=(F2-F3)/0. 1 GOTO 50
CALtt*r t****** tt*tt****t t*t*t***** t tt t*ttt*t *t t**ttt*** At **t*tt t***tt*** tt*
ADJUST BETA OBJECTIVE FUNCTION
SUMXI-SUMXII=O CALttttt******tttttt*t****t*tttt******ttrt*t*****t*t****t**t**t*tt****** **t
30 CALL FCN (NSPECr XI KIr KIIr MIXFRCr YAr ALPHA lr FCNN)
Fl= FCNN
CALL FCN(NSPEC, XI+0. 05, KI, KII, MIXFRC, YA, ALPHA, 1, FCNN)
F2= FCNN
CALL FCN(NSPEC, XI — O. 05, KI, KII, MIXFRC, YA, ALPHA, 1, FCNN)
F3= FCNN FDER=(F2-F3)/0. 1 GOTO 50
gJ t ******* r, *** t t t ** t r t t ** t*t **4 *4 t t *** t *** 4 t t t t t*t ***** t t t*t**t t **** t * 4
r tt FIND ALPHA AS A FUNCTION OF BETA
g Lt*t**t **** t t t t*t****t*tt ***t******t*******t t*tt 4 tt**t***t t*t*tt****** *t*
40 CALL ABFCN (MIXFRC (1), GAMMA, XI, BETA, KI (1), KII (1), FCNN)
Fl= FCNN
CALL ABFCN (MIXFRC( 1), GAMMA, XI+0 . 05, BETA, KI (1), KII (1), FCNN)
F2 FCNN
CALL ABFCN (MIXFRC(1), GAMMA, XI — 0. 05, BETA, KI(1), KII (1), FCNN)
F3= FCNN
FDER (F2-F3) /0. 1 GOTO 50
50 XII=XI-(Fl/FDER)
FA=ABS((XII-XI) /XII)
ENDIF
IF(KEY. EQ ~ 3) THEN BETA=XII ELSE ALPHA=XII
ENDI F
IF (ALPHA. GT ~ 1 ~ 0) ALPHA=1. 0 IF (BETA. GT ~ 1. 0) BETA=1. 0 IF (ALPHA. LT. 0. 0) ALPHA=O. 0 IF(BETA. LT. O. O) BETA=0. O
RETURN END
CAL***** 4 ***** 4 ******* I ***+ *********I****+ + i **+ @ *+*i+**+ *++ + ++***4 ** 4 * + *
*** FUNCTION FCN
CAL*+ 4 + +*********A++******4 *+ *+ +***I+****+***+++***+***+**+ I*+****0 k*++* *+*
SUBROUTINE FCN(NSPEC, BETA, KI, KII, MIXFRC, YA, ALPHA, KEY, FCNN)
DOUBLE PRECISION DENZ, DEN3, DEN4, SUMXI, SUMXII, SUMY
DOUBLE PRECISION BETA, KI(NSPEC+1. ), KII(NSPEC+1) DOUBLE PRECISION MIXFRC(NSPEC+1), YA, ALPHA, FCNN
DOUBLE PRECISION XI(NSPEC+1), XII(NSPEC+1), Y(NSPEC+1) INTEGER NSPEC, KEY, I
DO 15 I=1, NSPEC-1
XI(I)=0. 0 XII(I)=0. 0 Y(I)=0. 0
IF(KII(I). GT. 0. 0) THEN
DEN2=BETA*(1. 0 — ALPHA)
DEN3= ((1 . 0-ALPHA) * (1 . 0 — BETA) *KI (I) /KII (I) ) DEN4=ALPHA*KI(I) XI(I) =MIXFRC(I) /(DEN2+DEN3+DEN4)
Y (I) =KI (I) *XI (I ) XII (I) =XI (I) +XI (I) /KII (I)
ENDIF
102
15 CONTINUE Y(NSPEC)~1-Y(1)-Y(2) Y(NSPEC)=0. 79+Y(NSPEC) Y(NSPEC+1)=1-Y(1) — Y(2) — Y(NSPEC) SUMXI=0. 0 SUNXII=0. 0 SUNY=0. 0
DO 30 I=1, NSPEC+1 SUMXI=SUNXI+XI (I) SUMXII=SUNXII+XII(I) SUMY=SUMY+Y(I)
30 CONTINUE
IF(KEY. EQ. 1) FCNN=SUMXI-SUMY
IF(KEY. EQ. 2) FCNN=SUMXII-SUMY
IF(KEY. EQ. 3) FCNN=SUMXI-SUNXII
RETURN END
GAL* * * * * * 4 * + i *+ * * * * I I + J * *+ * * * * * * 0 * + * l + * * * * * 4 * I + + + ** * * * *+ I + 1 + ** l * * * k ** * 4 +
**+ FUNCTION ABFCN
GAL*****A+ l ****** 0 *+ 4 l +*+*******+ 4 *+******** I **+**************+ ******+** ***
SUBROUTINE ABFCN ( TOTMIX, GAMMA, ALPHA, BETA, KVAL1, KVAL2, ABFCNN )
DOUBLE PRECISION TOTMIX, GA, ALPHA, BETA, KVAL1, KVAL2, ABFCNN
NUM=TOTMIX*GA-ALPHA+(KVAL2-1. 0)-1. 0 DENOM= (1. 0-ALPHA) *
( (KVAL2-KVAL1) — 1. 0)
ABFCNN= (NUM/ DENOM) — BETA* ( 1. 0)
RETURN END
103
VITA
Name: Armando Lars
Born: July 9, 1975
Brownsville, Texas
Parents: Salomon Lars and Micaela Guijarro
Permanent Address:
701 W. 41 St.
Houston, Texas, 77008
Education:
B. S. , Chemical Engineering (May 1997)
University of Houston, Houston, Texas, USA