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

# 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.

## 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 addSource(source: Source): GaussianPlume Adds a single source to the plume public getAtmosphere(): Atmosphere | *: Atmosphere public getConcentration(x: number, y: number, z: number): number 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 getMaxRise(x: number): number The max rise of the plume at x meters downwind public getMeanHeight(x: *): number public getSource(): Source | * public getStatsForCoords(coords: Coord[]): Stat[] Same as getStatsForXs, but for 3d coordinates public getStatsForXs(xs: number[]): Stat[] 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 getStdY(x: number): number Brookhaven sigma The crosswind distance standard deviation for a distance x downwind. public getStdZ(x: number): number Brookhaven sigma The vertical distance standard deviation for a distance x downwind. public public setAtmosphere(atmosphere: Atmosphere): GaussianPlume: Atmosphere public setEffectiveSourceHeight(height: number): GaussianPlume Manually set the Effective Source Height public toString(): string
 Protected Methods protected A helper function for the StdZ calculation protected A helper function for the StdZ calculation

## Public Constructors

### publicconstructor(atmosphere: Atmosphere, source: Source) source

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

#### Params:

 Name Type Attribute Description atmosphere Atmosphere source Source

## Public Methods

Adds a single source to the plume

#### Params:

 Name Type Attribute Description source Source

#### Return:

 GaussianPlume For chaining purposes

### publicgetAtmosphere(): Atmosphere | *: Atmosphere source

#### Return:

 Atmosphere | *

### publicgetConcentration(x: number, y: number, z: number): number source

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

#### Params:

 Name Type Attribute Description 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``````

### publicgetEffectiveSourceHeight(): 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

### publicgetMaxConcentration(): number source

Calculates the maximum concentration dispersed

#### Return:

 number micrograms / cubic meters

### publicgetMaxConcentrationX(): number source

Calculates the distance downwind of the maximum concentration

#### Return:

 number micrograms / cubic meter

### publicgetMaxRise(x: number): number source

The max rise of the plume at x meters downwind

#### Params:

 Name Type Attribute Description x number distance (m) downwind

#### Return:

 number vertical standard deviation at x meters downwind (m)

### publicgetMeanHeight(x: *): number source

#### Params:

 Name Type Attribute Description x *

### publicgetSource(): Source | * source

#### Return:

 Source | *

### publicgetStatsForCoords(coords: Coord[]): Stat[] source

Same as getStatsForXs, but for 3d coordinates

#### Params:

 Name Type Attribute Description coords Coord[] a list of objects with x,y,z params

 Stat[]

### publicgetStatsForXs(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:

 Name Type Attribute Description xs number[] a list of x's

#### Return:

 Stat[] a list of stats

### publicgetStdY(x: number): number source

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

#### Params:

 Name Type Attribute Description x number distance downwind (m)

#### Return:

 number crosswind standard deviation at x meters downwind (m)

### publicgetStdZ(x: number): number source

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

#### Params:

 Name Type Attribute Description x number distance downwind (m)

### publicgetWindSpeedAtSourceHeight(): number source

#### Return:

 number m/s

### publicsetAtmosphere(atmosphere: Atmosphere): GaussianPlume: Atmosphere source

#### Params:

 Name Type Attribute Description atmosphere Atmosphere

#### Return:

 GaussianPlume For chaining purposes

### publicsetEffectiveSourceHeight(height: number): GaussianPlume source

Manually set the Effective Source Height

#### Params:

 Name Type Attribute Description height number

#### Return:

 GaussianPlume For chaining purposes

## Protected Methods

### protected_getStdYCoeffs(x: number): STD_Y_COEFF source

A helper function for the StdZ calculation

#### Params:

 Name Type Attribute Description x number distance downwind (m)

### protected_getStdZCoeffs(x: number): STD_Z_COEFF source

A helper function for the StdZ calculation

#### Params:

 Name Type Attribute Description x number distance downwind (m)