Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/src/equation_sets.md

Large diffs are not rendered by default.

70 changes: 50 additions & 20 deletions docs/src/plume.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ independent, this includes, for example, emissions from elevated stacks.
plume
```

## Gaussian Plumes
## Gaussian Plume Models

### Simple Gaussian Plume

```@docs
plume(::Scenario{Substance,VerticalJet,Atmosphere}, ::Type{GaussianPlume})
```

The gaussian plume model assumes that concentration profile in the crosswind (y) and vertical (z) directions follow gaussian distributions with dispersions $\sigma_y$ and $\sigma_z$, respectively. This model can be derived from an advection-diffusion equation, or simply taken as a given.
The simple gaussian plume model assumes that concentration profile in the crosswind (y) and vertical (z) directions follow gaussian distributions with dispersions $\sigma_y$ and $\sigma_z$, respectively. This model can be derived from an advection-diffusion equation, or simply taken as a given.

The basic gaussian would have the plume expand downward beyond the ground, to correct for this an additional term for *ground reflection* is added. This is equivalent to adding a mirror image source reflected across the x-z plane, and causes mass to accumulate along the ground instead of simply disappearing (as would happen in the naive case).

Expand All @@ -37,7 +39,7 @@ with

Three important parameters are determined from correlations, which are functions of the atmospheric stability: the windspeed at the release point, the crosswind dispersion, and the vertical dispersion. The model converts the final concentration to volume fraction, assuming the plume is a gas at ambient conditions.

### Crosswind dispersion correlations
#### Crosswind dispersion correlations

The crosswind dispersion, $\sigma_{y}$ is a function of downwind distance, $x$ as well as stability class

Expand All @@ -59,7 +61,7 @@ Where $\delta$, $\beta$, and $\gamma$ are tabulated based on stability class ([S
| F | 0.0674 | 0.9 |


### Vertical dispersion correlations
#### Vertical dispersion correlations

The vertical dispersion, $\sigma_{z}$ is a function of downwind distance, $x$ as well as stability class

Expand All @@ -80,7 +82,7 @@ Where $\delta$ and $\beta$ are tabulated based on stability class ([Seinfeld 198
| E | 0.02275 | 1.3010 | -0.0450 |
| F | 0.01122 | 1.4024 | -0.0540 |

### Example
#### Example

Suppose we wish to model the dispersion of gaseous propane from a leak from a storage tank, where the leak is from a 10mm hole that is 3.5m above the ground and the propane is at 25°C and 4barg. Assume the discharge coefficient $c_{D} = 0.85$. This scenario is adapted from CCPS *Guidelines for Consequence Analysis of Chemical Releases*([AIChE/CCPS 1999](references.md), 47)

Expand Down Expand Up @@ -149,15 +151,6 @@ And then pass it to the `plume` function
```jldoctest gaussplume; output = false, filter = r"(\d*)\.(\d{4})\d+" => s"\1.\2***"
g = plume(scn, GaussianPlume)

# output

GasDispersion.GaussianPlumeSolution{Float64, GasDispersion.NoPlumeRise, ClassF, BasicEquationSet{DefaultWind, Nothing, Defaultσy, Defaultσz}}(Scenario{Substance{String, GasDispersion.Antoine{Float64}, Float64, Float64, Float64, Int64, Int64, Int64}, HorizontalJet{Float64}, SimpleAtmosphere{Float64, ClassF}}(Substance{String, GasDispersion.Antoine{Float64}, Float64, Float64, Float64, Int64, Int64, Int64}("propane", 0.044096, GasDispersion.Antoine{Float64}(9.773719865868816, 2257.9247634130143, 0.0), 1.864931992847327, 526.13, 288.15, 101325.0, 1.142, 231.02, 425740, 1678, 2520), HorizontalJet{Float64}(0.08991798763471508, Inf, 0.01, 208.10961399327573, 3.5, 288765.2212333958, 278.3846872082166, 0.0), SimpleAtmosphere{Float64, ClassF}(101325.0, 298.15, 1.5, 10.0, 0.0, ClassF)), :gaussian, 0.08991798763471508, 0.9999999999999998, 1.8023818673116125, 1.150112899011524, 3.5, GasDispersion.NoPlumeRise(), ClassF, BasicEquationSet{DefaultWind, Nothing, Defaultσy, Defaultσz}())

```

Where `g` is a callable which returns the concentration (in vol fraction) at any point. For example at 100m downwind and at a height of 2m

```jldoctest gaussplume; output = true, filter = r"(\d*)\.(\d{4})\d+" => s"\1.\2***"
g(100,0,2)

# output
Expand All @@ -166,7 +159,7 @@ g(100,0,2)

```

Which is ~612ppm (vol). Beyond simply having a number, we may want a plan-view of the plume at a given height, say 2m.
Where `g` is a callable which returns the concentration (in vol fraction) at any point. For example at 100m downwind and at a height of 2m the result is ~612ppm (vol). Beyond simply having a number, we may want a plan-view of the plume at a given height, say 2m.

```@setup gaussplume
using ..GasDispersion
Expand Down Expand Up @@ -217,10 +210,46 @@ plot(g, xlims=(0,50), ylims=(-10,10), height=3.5, clims=(0,LEL),
aspect_ratio=:equal)
```

## Simple Jet Plumes
### Gaussian Plume within a Mixing Layer

```@docs
plume(::Scenario{Substance,VerticalJet,Atmosphere}, ::Type{GaussianMixingLayer})
```

The gaussian mixing layer model allows for the plume to be contained entirely within a mixing layer of a given height. This can be done using either the method of images or a periodic boundary.

```math
c(x, y, z) = \frac{m_i}{u} \frac{1}{\sqrt{2\pi} \sigma_y} \exp\left(-\frac{1}{2}\left(\frac{y}{\sigma_y}\right)^2\right) F_z
```

Where $F_z$ is the vertical dispersion term. For the method of images this takes the form of the infinite sum ([Beychok 1994](references.md) p 123)

```math
F_z = \frac{1}{\sqrt{2\pi} \sigma_z} \left( \exp \left( -\frac{1}{2} \left( { z -h } \over \sigma_{z} \right)^2 \right)
+ \exp \left( -\frac{1}{2} \left( { z + h } \over \sigma_{z} \right)^2 \right) \right) \\
\sum_{n=1}^{\infty} \left[ \exp\left(-\frac{1}{2}\left(\frac{z - h + 2n h_m}{\sigma_z}\right)^2\right)
+ \exp\left(-\frac{1}{2}\left(\frac{z - h - 2n h_m}{\sigma_z}\right)^2\right) \\
+ \exp\left(-\frac{1}{2}\left(\frac{z + h + 2n h_m}{\sigma_z}\right)^2\right) \\
+ \exp\left(-\frac{1}{2}\left(\frac{z + h - 2n h_m}{\sigma_z}\right)^2\right) \right]
```

For the periodic boundary it takes the form of another infinite sum ([Seinfeld and Pandis 2006](references.md) p 858)

```math
F_z = \frac{2}{h_m} \left( \frac{1}{2} + \sum_{n=1}^{\infty} cos\left( {n\pi z} \over h_m \right) cos\left( {n\pi h} \over h_m \right) \exp\left(-\frac{1}{2}\left(\frac{n\pi \sigma_z}{h_m}\right)^2\right) \right)
```

The periodic boundary layer approach can be very slow to converge, in which case the number of terms given by the keyword argument `n_terms` should be increased. By default the sums terminate early if the solution converges, e.g. if `n_terms=100_000_000` or some other huge number but the sum converges after 5 terms, only 5 terms will be calculated. The simple mixing layer approach converges much more quickly, and typically 10 terms are more than enough.

As `SimpleAtmosphere`s do not define mixing height, one is calculated based on the following:
- for stable atmospheres (class E and F) the mixing height is assumed to be infinite, and the model defaults back to a [Simple Gaussian Plume](@ref)
- for unstable and neutral atmospheres (classes A through D) the mixing height is calculated from the friction velocity $u^{*}$ and the coriolis parameter $f$: $h_m = 0.3 \frac{u^{*}}{f}$ where $f$ is calculated at a default latitude of 40°N (consistent with [US EPA 1995](references.md)).

## Jet Plumes
### Simple Jet Model

```@docs
plume(::Scenario, ::Type{SimpleJet})
plume(::Scenario{Substance,VerticalJet,Atmosphere}, ::Type{SimpleJet})
```

Simple jet dispersion models are a useful tool for evaluating dispersion near the region where a jet release is occurring. They are based on a simplified model where the air is stationary and all of the momentum needed to mix the release is supplied by the jet. This is in some ways the opposite assumptions than are used in the Gaussian Plume model -- where the release is assumed to have negligible velocity and the momentum is entirely supplied by the wind.
Expand All @@ -237,7 +266,7 @@ with
+ $\rho_j$ - initial density of the jet material, kg/m^3
+ $\rho_a$ - density of the ambient atmosphere, kg/m^3

### Model Parameters
#### Model Parameters

The model parameters $k_2$ and $k_3$ are per [Long (1963)](references.md)

Expand All @@ -252,7 +281,7 @@ the initial concentration is calculated from the mass flowrate and volumetric fl
c_0 = { Q_i \over Q } = { \dot{m} \over \rho Q } = { \dot{m} \over { \rho \frac{\pi}{4} d^2 u } }
```

### Example
#### Example

Suppose we wish to model the dispersion of gaseous propane using the same scenario, `scn`, worked out above.

Expand All @@ -272,7 +301,8 @@ plot(j, xlims=(0,100), ylims=(-10,10), height=2)
```


## Britter-McQuaid Model
## Top-Hat Models
### Britter-McQuaid Model

```@docs
plume(::Scenario, ::Type{BritterMcQuaidPlume})
Expand Down
5 changes: 3 additions & 2 deletions docs/src/puff.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ A simple gaussian puff model assumes the release is instantaneous, and all mass
```math
c_{puff} = { m_i \over { (2 \pi)^{3/2} \sigma_x \sigma_y \sigma_z } }
\exp \left( -\frac{1}{2} \left( {x - ut} \over \sigma_x \right)^2 \right)
\exp \left( -\frac{1}{2} \left( {y} \over \sigma_y \right)^2 \right) \left[ \exp \left( -\frac{1}{2} \left( {z - h} \over \sigma_z \right)^2 \right)
\exp \left( -\frac{1}{2} \left( {y} \over \sigma_y \right)^2 \right) \\
\left[ \exp \left( -\frac{1}{2} \left( {z - h} \over \sigma_z \right)^2 \right)
+ \exp \left( -\frac{1}{2} \left( {z + h} \over \sigma_z \right)^2 \right)\right]
```

Expand Down Expand Up @@ -320,7 +321,7 @@ in the provided equationset are for windspeed.
### SLAB Jet Model

```@docs
puff(::Scenario, ::Type{SLAB})
puff(::Scenario{Substance,VerticalJet,Atmosphere}, ::Type{SLAB})
```

The SLAB jet model is derived from the SLAB software package developed by
Expand Down
4 changes: 3 additions & 1 deletion docs/src/references.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

AIChE/CCPS. 1999. *Guidelines for Consequence Analysis of Chemical Releases*. New York: American Institute of Chemical Engineers

Beychok, Milton R. 1994. *Fundamentals of Stack Gas Dispersion* 3rd Ed. Irvine, CA: Milton R. Beychok.

Bakkum, E.A. and N.J. Duijm. 2005. "Chapter 4 - Vapour Cloud Dispersion" in *Methods for the Calculation of Physical Effects, CPR 14E* (TNO Yellow Book) Edited by C.J.H. van den Bosch and R.A.P.M. Weterings. The Netherlands.

Businger, J. A., J. C. Wyngaard, Y. Izumi, and E. F. Bradley. 1971. "Flux-Profile Relationships in the Atmospheric Surfaace Layer." *Journal of the Atmospheric Sciences*. 28, 181-189. [doi:10.1175/1520-0469(1971)028<0181:FPRITA>2.0.CO;2](https://doi.org/10.1175/1520-0469(1971)028<0181:FPRITA>2.0.CO;2)
Expand Down Expand Up @@ -30,7 +32,7 @@ Paulson, C. A. 1970. "The Mathematical Representation of Wind Speed and Temperat

Spicer, Thomas O. and Jerry A. Havens. 1988. *Development of Vapor Dispersion Models for Non-Neutrally Buoyant Gas Mixtures--Analysis of TFI/NH3 Test Data*. Tyndall Air Force Base, FL: USAF Engineering & Services Laboratory

Seinfeld, John H. 1986. *Atmospheric Chemistry and Physics of Air Pollution*. New York: John Wiley and Sons
Seinfeld, John H. and Spyros N. Pandis. 2006. *Atmospheric Chemistry and Physics* 2nd Ed. New York: John Wiley and Sons.

Turner, D. Bruce. 1970. *Workbook of Atmospheric Dispersion Estimates*. United States Environmental Protection Agency.

Expand Down
3 changes: 2 additions & 1 deletion src/GasDispersion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export SourceModel, JetSource

# plume models
export PlumeModel, Plume, plume
export GaussianPlume, SimpleJet, BritterMcQuaidPlume
export GaussianPlume, GaussianMixingLayer, SimpleJet, BritterMcQuaidPlume

# puff models
export PuffModel, Puff, puff
Expand Down Expand Up @@ -90,6 +90,7 @@ plume(s; kwargs...) = plume(s, GaussianPlume; kwargs...)

# plume models
include("models/gaussian_plume.jl")
include("models/gaussian_mixing_layer.jl")
include("models/simple_jet.jl")
include("models/britter_mcquaid_plume.jl")

Expand Down
Loading
Loading