Skip to content

Commit c7b532d

Browse files
committed
Updated documentation
Updated the docs to refer to the Gaussian Mixing Layer model
1 parent 34270c7 commit c7b532d

8 files changed

Lines changed: 75 additions & 30 deletions

File tree

docs/src/equation_sets.md

Lines changed: 9 additions & 9 deletions
Large diffs are not rendered by default.

docs/src/plume.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ plume
99

1010
## Gaussian Plume Models
1111

12-
### Simple Gaussian Plumes
12+
### Simple Gaussian Plume
1313

1414
```@docs
1515
plume(::Scenario{Substance,VerticalJet,Atmosphere}, ::Type{GaussianPlume})
@@ -210,26 +210,26 @@ plot(g, xlims=(0,50), ylims=(-10,10), height=3.5, clims=(0,LEL),
210210
aspect_ratio=:equal)
211211
```
212212

213-
### Gaussian Plumes with Mixing Layers
213+
### Gaussian Plume within a Mixing Layer
214214

215215
```@docs
216-
plume(::Scenario, ::Type{GaussianMixingLayer})
216+
plume(::Scenario{Substance,VerticalJet,Atmosphere}, ::Type{GaussianMixingLayer})
217217
```
218218

219219
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.
220220

221221
```math
222-
c(x, y, z) = \frac{m_i}{u} { \exp\left(-\frac{1}{2}\left(\frac{y}{\sigma_y}\right)^2\right) \over { \sqrt{2\pi} \sigma_y} } F_z
222+
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
223223
```
224224

225225
Where $F_z$ is the vertical dispersion term. For the method of images this takes the form of the infinite sum:
226226

227227
```math
228-
F_z = {\left( \exp \left[ -\frac{1}{2} \left( { z -h } \over \sigma_{z} \right)^2 \right]
229-
+ \exp \left[ -\frac{1}{2} \left( { z + h } \over \sigma_{z} \right)^2 \right] \right) \over {\sqrt{2\pi} \sigma_z} }
228+
F_z = \frac{1}{\sqrt{2\pi} \sigma_z} \left( \exp \left( -\frac{1}{2} \left( { z -h } \over \sigma_{z} \right)^2 \right)
229+
+ \exp \left( -\frac{1}{2} \left( { z + h } \over \sigma_{z} \right)^2 \right) \right) \\
230230
\sum_{i=1}^{n} \left[ \exp\left(-\frac{1}{2}\left(\frac{z - h + 2i h_m}{\sigma_z}\right)^2\right)
231-
+ \exp\left(-\frac{1}{2}\left(\frac{z - h - 2i h_m}{\sigma_z}\right)^2\right)
232-
+ \exp\left(-\frac{1}{2}\left(\frac{z + h + 2i h_m}{\sigma_z}\right)^2\right)
231+
+ \exp\left(-\frac{1}{2}\left(\frac{z - h - 2i h_m}{\sigma_z}\right)^2\right) \\
232+
+ \exp\left(-\frac{1}{2}\left(\frac{z + h + 2i h_m}{\sigma_z}\right)^2\right) \\
233233
+ \exp\left(-\frac{1}{2}\left(\frac{z + h - 2i h_m}{\sigma_z}\right)^2\right) \right]
234234
```
235235

@@ -239,10 +239,15 @@ For the periodic boundary it takes the form of another infinite sum:
239239
F_z = ...
240240
```
241241

242-
## Simple Jet Plumes
242+
As `SimpleAtmosphere`s do not define mixing height, one is calculated based on the following:
243+
- 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)
244+
- 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)).
245+
246+
## Jet Plumes
247+
### Simple Jet Model
243248

244249
```@docs
245-
plume(::Scenario, ::Type{SimpleJet})
250+
plume(::Scenario{Substance,VerticalJet,Atmosphere}, ::Type{SimpleJet})
246251
```
247252

248253
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.
@@ -259,7 +264,7 @@ with
259264
+ $\rho_j$ - initial density of the jet material, kg/m^3
260265
+ $\rho_a$ - density of the ambient atmosphere, kg/m^3
261266

262-
### Model Parameters
267+
#### Model Parameters
263268

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

@@ -274,7 +279,7 @@ the initial concentration is calculated from the mass flowrate and volumetric fl
274279
c_0 = { Q_i \over Q } = { \dot{m} \over \rho Q } = { \dot{m} \over { \rho \frac{\pi}{4} d^2 u } }
275280
```
276281

277-
### Example
282+
#### Example
278283

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

@@ -294,7 +299,8 @@ plot(j, xlims=(0,100), ylims=(-10,10), height=2)
294299
```
295300

296301

297-
## Britter-McQuaid Model
302+
## Top-Hat Models
303+
### Britter-McQuaid Model
298304

299305
```@docs
300306
plume(::Scenario, ::Type{BritterMcQuaidPlume})

docs/src/puff.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ A simple gaussian puff model assumes the release is instantaneous, and all mass
1919
```math
2020
c_{puff} = { m_i \over { (2 \pi)^{3/2} \sigma_x \sigma_y \sigma_z } }
2121
\exp \left( -\frac{1}{2} \left( {x - ut} \over \sigma_x \right)^2 \right)
22-
\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)
22+
\exp \left( -\frac{1}{2} \left( {y} \over \sigma_y \right)^2 \right) \\
23+
\left[ \exp \left( -\frac{1}{2} \left( {z - h} \over \sigma_z \right)^2 \right)
2324
+ \exp \left( -\frac{1}{2} \left( {z + h} \over \sigma_z \right)^2 \right)\right]
2425
```
2526

@@ -320,7 +321,7 @@ in the provided equationset are for windspeed.
320321
### SLAB Jet Model
321322

322323
```@docs
323-
puff(::Scenario, ::Type{SLAB})
324+
puff(::Scenario{Substance,VerticalJet,Atmosphere}, ::Type{SLAB})
324325
```
325326

326327
The SLAB jet model is derived from the SLAB software package developed by

src/models/gaussian_mixing_layer.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ function vertical_term(z, h, σz, ml::SimpleMixingLayer)
2424
end
2525

2626
@doc doc"""
27-
plume(::Scenario, GaussianMixingLayer[, ::EquationSet]; h_min=1.0, n_terms=10)
27+
plume(::Scenario, GaussianMixingLayer[, ::EquationSet]; **kwargs...)
2828
2929
Returns the solution to a Gaussian plume dispersion model with a simple reflective mixing layer.
3030
3131
```math
3232
c(x, y, z) = \frac{m_i}{u} { \exp\left(-\frac{1}{2}\left(\frac{y}{\sigma_y}\right)^2\right) \over { \sqrt{2\pi} \sigma_y} } F_z
3333
```
3434
35-
where \(F_z\) is the vertical dispersion term, a function of the mixing height \(h_m\), \(n\) is the number of image terms, and other symbols are as defined for a Gaussian
35+
where $ Fz $ is the vertical dispersion term, a function of the mixing height $ h_m $, *n* is the number of image terms, and other symbols are as defined for a Gaussian
3636
plume model.
3737
3838
# Keyword Arguments
@@ -95,15 +95,15 @@ function plume(scenario::Scenario, ::Type{GaussianMixingLayer}, eqs=DefaultSet()
9595
end
9696

9797
@doc doc"""
98-
plume(::Scenario{AbstractSubstance,VerticalJet,Atmosphere}, GaussianPlume[, ::EquationSet]; **kwargs...)
98+
plume(::Scenario{Substance,VerticalJet,Atmosphere}, GaussianMixingLayer[, ::EquationSet]; **kwargs...)
9999
100100
Returns the solution to a Gaussian plume dispersion model with a simple reflective mixing layer.
101101
102102
```math
103103
c(x, y, z) = \frac{m_i}{u} { \exp\left(-\frac{1}{2}\left(\frac{y}{\sigma_y}\right)^2\right) \over { \sqrt{2\pi} \sigma_y} } F_z
104104
```
105105
106-
where \(F_z\) is the vertical dispersion term, a function of the mixing height \(h_m\), \(n\) is the number of image terms, and other symbols are as defined for a Gaussian
106+
where $ Fz $ is the vertical dispersion term, a function of the mixing height $ h_m $, *n* is the number of image terms, and other symbols are as defined for a Gaussian
107107
plume model.
108108
109109
# Keyword Arguments

src/models/gaussian_plume.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function plume(scenario::Scenario, ::Type{GaussianPlume}, eqs=DefaultSet(); h_mi
8484
end
8585

8686
@doc doc"""
87-
plume(::Scenario{AbstractSubstance,VerticalJet,Atmosphere}, GaussianPlume[, ::EquationSet]; kwargs...)
87+
plume(::Scenario{Substance,VerticalJet,Atmosphere}, GaussianPlume[, ::EquationSet]; kwargs...)
8888
8989
Returns the solution to a Gaussian plume dispersion model for a vertical jet. By default the Briggs
9090
plume rise model is used.

src/models/palazzi_puff.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ downwind dispersion, σx, is calculated:
3737
- `:tno` follows the TNO Yellow Book eqn 4.60b, using the distance *x* while the plume is still attached and the distance to the cloud center, *ut*, afterwards
3838
3939
# Arguments
40-
- `plume_model::Type{Plume} = GaussianPlume` : the plume model $\Chi$
40+
- `plume_model::Type{Plume} = GaussianPlume` : the plume model $\chi$
4141
- `disp_method = :default` : the method for calculating the downwind dispersion
4242
4343
# References

src/models/simple_jet.jl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,29 @@ function plume(scenario::Scenario, ::Type{SimpleJet}, eqs::EquationSet=DefaultSe
6565

6666
end
6767

68+
@doc doc"""
69+
plume(::Scenario{Substance,VerticalJet,Atmosphere}, SimpleJet; kwargs...)
70+
71+
Returns the solution to a simple turbulent jet dispersion model for a vertical jet.
72+
73+
```math
74+
c\left(x,y,z\right) = k_2 c_0 \left( d \over z \right) \sqrt{ \rho_j \over \rho_a }
75+
\exp \left( - \left( k_3 { r \over z } \right)^2 \right)
76+
```
77+
78+
where *r* is the radial distance from the jet centerline. Assumes a circular jet
79+
with diameter equal to the jet diameter. Ground-reflection is included by method
80+
of images.
81+
82+
# References
83+
+ Long, V.D. 1963. "Estimation of the Extent of Hazard Areas Round a Vent." *Chem. Process Hazard*. II:6
84+
85+
# Arguments
86+
- `release_angle::Number=π/2`: the angle at which the jet is released, in radians
87+
- `k2::Number=6` parameter of the model, default value is recommended by Long
88+
- `k3::Number=5` parameter of the model, default value is recommended by Long
89+
90+
"""
6891
function plume(scenario::Scenario{<:AbstractSubstance,<:VerticalJet,<:Atmosphere}, ::Type{SimpleJet}, eqs::EquationSet=DefaultSet(); release_angle::Number=π/2, k2::Number=6.0, k3::Number=5.0)
6992
# Density correction
7093
ρj = _release_density(scenario)

src/models/slab_puff.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,21 @@ function puff(scenario::Scenario, ::Type{SLAB}, eqs::EquationSet=DefaultSet();
128128
AkimaInterpolation(out.cc.betax[tperm], out.cc.t[tperm]))
129129
end
130130

131+
132+
@doc doc"""
133+
puff(::Scenario{Substance,VerticalJet,Atmosphere}, SLAB; kwargs...)
134+
135+
Returns the solution to the SLAB vertical jet dispersion model for the given
136+
scenario.
137+
138+
# References
139+
+ Ermak, Donald L. 1990. *User's Manual for SLAB: An Atmospheric Dispersion Model For Denser-Than-Air Releases* Lawrence Livermore National Laboratory
140+
141+
# Arguments
142+
- `t_av::Number=10`: averaging time, seconds
143+
- `x_max::Number=2000`: maximum downwind distance, meters, this defines the problem domain
144+
145+
"""
131146
function puff(scenario::Scenario{<:AbstractSubstance,<:VerticalJet,<:Atmosphere}, ::Type{SLAB}, eqs::EquationSet=DefaultSet();
132147
t_av=10, x_max=2000)
133148
c_max = 1.0

0 commit comments

Comments
 (0)