rsdm

package
v0.0.0-...-61a586d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SigmaY = map[byte]SigmaFunc{
	'A': sigmaY(24.1670, 2.5334),
	'B': sigmaY(18.3330, 1.8096),
	'C': sigmaY(12.5000, 1.0857),
	'D': sigmaY(8.3330, 0.72382),
	'E': sigmaY(6.2500, 0.54287),
	'F': sigmaY(4.1667, 0.36191),
}
View Source
var SigmaZ = map[byte]SigmaFunc{
	'A': sigmaZA,
	'B': sigmaZB,
	'C': sigmaZC,
	'D': sigmaZD,
	'E': sigmaZE,
	'F': sigmaZF,
}

Functions

func C

func C(x, y, z, Uz, Q, H float64, sigY, sigZ SigmaFunc) float64

Calculate concentration at distance x along plume, at perpendicular offset y and height z x [km] receptor distance downwind along plume centreline y [m] receptor perpendicular offset from plume centreline z [m] receptor height Uz m/s wind speed at stack exit conc g/m3 calculated receptor concentration

func CalcUz

func CalcUz(uzref, z, zref float64, pgcat byte, profileType string) float64

Calculate effective wind speed, using "power law" method Uz m/s estimated wind speed at target elevation z z [m] target elevation uzref m/s wind speed of actual measurment zref [m] elevation of actual measurement p [] wind profile exponent factor (based on stability cat)

func CreatePNG

func CreatePNG(grid, disp [][]float64, max float64) image.Image

func GridMax

func GridMax(grid [][]float64) float64

Extract max value from 2d grid

func IterDisp

func IterDisp(s *RSDM, met ArrayMET)

Iterate though each met hour and calculate concentrations across plan and slice grids.

Uses a single source located at the origin, at a user specified height, with a fixed emission rate of 1 g/s.

func Round

func Round(x, places float64) float64

Types

type ArrayMET

type ArrayMET []*HourMET

func GenMET

func GenMET(s *RSDM, hours int) ArrayMET

type Grid

type Grid struct {
	// contains filtered or unexported fields
}

Grid is a struct defining the output grid dimensions

type HourMET

type HourMET struct {
	Hours float64
	U     float64
	PHI   float64
	//	Temp  float64
	PGCat byte
}

type RSDM

type RSDM struct {
	// contains filtered or unexported fields
}

RSDM is a struct containing all key data variables for interfacing with the webpage

func New

func New() *RSDM

New returns a new instance of RSDM

func (*RSDM) Start

func (s *RSDM) Start()

Start sets up all the callbacks for the browser

type SigmaFunc

type SigmaFunc func(float64) float64

type Source

type Source struct {
	// contains filtered or unexported fields
}

Source is a struct defining the stack parameters (emission source)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL