Home Reference Source Test Repository
import GaussianPlume from 'dirtybomb/src/Dispersion/GaussianPlume.js'
public class | source

GaussianPlume

Indirect Subclass:

src/Dispersion/DynamicGaussianDecayPuff.js~DynamicGaussianDecayPuff, DynamicGaussianPuff, GaussianDecayPuff

A Simple Gaussian Plume. For resources, please see the github repo. Calculates spread for one hour with constant conditions.

http://www.cerc.co.uk/environmental-software/assets/data/doc_techspec/CERC_ADMS5_P10_01_P12_01.pdf

Constructor Summary

Public Constructor
public

constructor(atmosphere: Atmosphere, source: Source)

For now, each Plume contains a constant atmosphere and a single Source

Method Summary

Public Methods
public

Adds a single source to the plume

public
public

Calculates the concentration at a given x,y,z coordinate.

public

Takes into account the wind and other factors into account.

public

Calculates the maximum concentration dispersed

public

Calculates the distance downwind of the maximum concentration

public

The max rise of the plume at x meters downwind

public
public

getSource(): Source | *

public

getStatsForCoords(coords: Coord[]): Stat[]

Same as getStatsForXs, but for 3d coordinates

public

Calculates the stdY, stdZ, and concentrations for a list of x coordinates directly downwind of the _source Useful in creating graphs / processing large amounts of data at once

public

Brookhaven sigma The crosswind distance standard deviation for a distance x downwind.

public

Brookhaven sigma The vertical distance standard deviation for a distance x downwind.

public
public
public

Manually set the Effective Source Height

public
Protected Methods
protected

A helper function for the StdZ calculation

protected

A helper function for the StdZ calculation

Public Constructors

public constructor(atmosphere: Atmosphere, source: Source) source

For now, each Plume contains a constant atmosphere and a single Source

Params:

NameTypeAttributeDescription
atmosphere Atmosphere
source Source

Public Methods

public addSource(source: Source): GaussianPlume source

Adds a single source to the plume

Params:

NameTypeAttributeDescription
source Source

Return:

GaussianPlume

For chaining purposes

public getAtmosphere(): Atmosphere | *: Atmosphere source

Return:

Atmosphere | *

public getConcentration(x: number, y: number, z: number): number source

Calculates the concentration at a given x,y,z coordinate. Must be downwind

Params:

NameTypeAttributeDescription
x number

Meters downwind of _source, greater than 0

y number

Meters crosswind of _source

z number

Meters vertical of ground

Return:

number

micrograms / cubic meter

Example:

getConcentration(200, 300, 10)
Calculates at 200 meters downwind, 300 east, 10 high

public getEffectiveSourceHeight(): number source

Takes into account the wind and other factors into account. Should potentially move this to the Source class

Return:

number

the effective source height

public getMaxConcentration(): number source

Calculates the maximum concentration dispersed

Return:

number

micrograms / cubic meters

public getMaxConcentrationX(): number source

Calculates the distance downwind of the maximum concentration

Return:

number

micrograms / cubic meter

public getMaxRise(x: number): number source

The max rise of the plume at x meters downwind

Params:

NameTypeAttributeDescription
x number

distance (m) downwind

Return:

number

vertical standard deviation at x meters downwind (m)

public getMeanHeight(x: *): number source

Params:

NameTypeAttributeDescription
x *

Return:

number

public getSource(): Source | * source

Return:

Source | *

public getStatsForCoords(coords: Coord[]): Stat[] source

Same as getStatsForXs, but for 3d coordinates

Params:

NameTypeAttributeDescription
coords Coord[]

a list of objects with x,y,z params

Return:

Stat[]

public getStatsForXs(xs: number[]): Stat[] source

Calculates the stdY, stdZ, and concentrations for a list of x coordinates directly downwind of the _source Useful in creating graphs / processing large amounts of data at once

Params:

NameTypeAttributeDescription
xs number[]

a list of x's

Return:

Stat[]

a list of stats

public getStdY(x: number): number source

Brookhaven sigma The crosswind distance standard deviation for a distance x downwind. To be used in a Gaussian distribution

Params:

NameTypeAttributeDescription
x number

distance downwind (m)

Return:

number

crosswind standard deviation at x meters downwind (m)

public getStdZ(x: number): number source

Brookhaven sigma The vertical distance standard deviation for a distance x downwind. To be used in a Gaussian distribution

Params:

NameTypeAttributeDescription
x number

distance downwind (m)

Return:

number

public getWindSpeedAtSourceHeight(): number source

Return:

number

m/s

public setAtmosphere(atmosphere: Atmosphere): GaussianPlume: Atmosphere source

Params:

NameTypeAttributeDescription
atmosphere Atmosphere

Return:

GaussianPlume

For chaining purposes

public setEffectiveSourceHeight(height: number): GaussianPlume source

Manually set the Effective Source Height

Params:

NameTypeAttributeDescription
height number

Return:

GaussianPlume

For chaining purposes

public toString(): string source

Return:

string

Protected Methods

protected _getStdYCoeffs(x: number): STD_Y_COEFF source

A helper function for the StdZ calculation

Params:

NameTypeAttributeDescription
x number

distance downwind (m)

Return:

STD_Y_COEFF

protected _getStdZCoeffs(x: number): STD_Z_COEFF source

A helper function for the StdZ calculation

Params:

NameTypeAttributeDescription
x number

distance downwind (m)

Return:

STD_Z_COEFF