Skip to content
Environmental Engineering

environmental-engineering-ai999x

Gaussian plume dispersion and plume rise, BOD and Streeter-Phelps oxygen sag, water and wastewater treatment design, activated sludge, disinfection CT, Henry's law and air stripping, noise and solid waste.

99capabilities
7topics
99formulas typeset
4ways to run: desktop app, command line, browser, Python
1.0.0version
What it does

What Environmental Engineering does

Environmental Engineering (environmental-engineering-ai999x) is an offline Python package for environmental engineering. It covers Gaussian plume dispersion and plume rise, BOD and Streeter-Phelps oxygen sag, water and wastewater treatment design, activated sludge, disinfection CT, Henry's law and air stripping, noise and solid waste.

It has 99 capabilities — 99 computational procedures — in 7 topics, the largest being Water treatment, Air pollution, Wastewater, Water quality, Noise and Gas transfer. Ask a question in words with ask(), or call a capability by name with typed inputs with solve(). Every answer carries its value and unit, the steps that produced it and the formula in LaTeX.

When a question is not determined — a value is missing, an input is out of range, or the request is outside the package — it says so and names what it needs, instead of guessing. It runs on an ordinary CPU without a network connection (Python >=3.10), and the same question always gets the same answer.

What it covers

Get it

Use Environmental Engineering your way

The AI999X desktop app and the command-line program environmental-engineering run on Windows and Linux; together with the browser they run the same compiled program on your own device: offline, with no Python and nothing sent anywhere. The Python package, with the same capabilities for your own code, is coming soon. Or compute in your browser, with nothing to install.

Desktop app

Desktop app for Environmental Engineering: this model in its own app, with search, ask in words, input forms, live figures and explanations. Version 1.2.0.

All models in one app · every AI999X model, this one included

Install guide · Quick start · All models: quick start

Command line

Every model's program in one download, for terminals and scripts. This model's program is environmental-engineering.

Linux commands · Windows commands · Usage

Python

The Python package, for notebooks and your own programs, is coming soon: pip install environmental-engineering-ai999x will work once it is published.

What it will look like

Version 1.2.0 · SHA-256 checksums · Latest downloads · Desktop & command-line guide: downloads, installing, asking and searching, figures, offline use, versions and checksums

From download to first answer

Every command can be copied.

Windows

Download ai999x-environmental-engineering-1.2.0-windows-x86_64.zip, right-click it → Extract All, then open the folder and start ai999x-environmental-engineering.exe. If Windows SmartScreen asks, choose More info → Run anyway.

Linux
curl -LO https://www.ai999x.com/downloads/desktop/1.2.0/ai999x-environmental-engineering-1.2.0-linux-x86_64.tar.gz
curl -LO https://www.ai999x.com/downloads/desktop/1.2.0/SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS
tar xzf ai999x-environmental-engineering-1.2.0-linux-x86_64.tar.gz
./ai999x-environmental-engineering-1.2.0-linux-x86_64/ai999x-environmental-engineering
Then
  1. Start the app: it opens on Environmental Engineering.
  2. Type a question in words, or search for a capability and fill in its form.
  3. Press Compute: the answer, its explanation and live figures appear; change an input and they follow.
In your browser

Compute something now

Ask a question in words, or choose a capability and open its calculator: the inputs come filled in with a worked example; change any of them (any unit of the right kind) and press Compute. It runs on your device; nothing is sent anywhere.

The same capabilities as the desktop app and the command line, as WebAssembly in this page. Every capability below also has its own Compute in your browser button.

Worked examples

One example, every way to run it

Each worked example with its answer, then the same question on the command line, from Python and in your browser. A command-line output is exactly what the program printed for that command.

Water quality

Streeter-Phelps oxygen deficit: kd = 0.23 1/d, ka = 0.46 1/d, L0 = 10 mg/L, D0 = 1 mg/L, t = 2 d, DOsat = 9.1 mg/L

D = \frac{k_d L_0}{k_a – k_d}\left(e^{-k_d t} – e^{-k_a t}\right) + D_0 e^{-k_a t}
D = 0.002726165085 kg/m^3
DO = 0.006373834915 kg/m^3
D_mgL = 2.726165085
DO_mgL = 6.373834915
How it was worked out
  1. Streeter-Phelps oxygen deficit and dissolved oxygen at a travel time
    D = \frac{k_d L_0}{k_a – k_d}\left(e^{-k_d t} – e^{-k_a t}\right) + D_0 e^{-k_a t}
    with kd = 0.23 1/day, ka = 0.46 1/day, L0 = 10 mg/L, D0 = 1 mg/L, t = 2 day, DOsat = 9.1 mg/L
    → D = 0.002726165085 kg/m^3, DO = 0.006373834915 kg/m^3, D_mgL = 2.726165085 kg/m^3, DO_mgL = 6.373834915 kg/m^3
Terminal
$ environmental-engineering solve enveng_streeter_phelps_deficit "kd=0.23 1/day" "ka=0.46 1/day" "L0=10 mg/L" "D0=1 mg/L" "t=2 day" "DOsat=9.1 mg/L"
D = 0.002726165085 kg/m^3
DO = 0.006373834915 kg/m^3
D_mgL = 2.726165085
DO_mgL = 6.373834915
  by: Streeter-Phelps oxygen deficit and dissolved oxygen at a travel time  (D = kd L0/(ka - kd) (e^(-kd t) - e^(-ka t)) + D0 e^(-ka t); for ka = kd, D = (kd L0 t + D0) e^(-kd t))
  kd = 2.662037037e-06 1/s
  ka = 5.324074074e-06 1/s
  L0 = 0.01 kg/m^3
  D0 = 0.001 kg/m^3
  t = 172800 s
  DOsat = 0.0091 kg/m^3
  assumes: first-order deoxygenation and reaeration; plug flow; deficit stays below saturation
Air pollution

Briggs plume rise: vs = 15 m/s, d = 3 m, Ts = 420 K, Ta = 288 K, u = 5 m/s, hs = 100 m

F = \frac{g v_s d^2 (T_s – T_a)}{4T_s},\quad \Delta h = \frac{1.6F^{1/3}x_f^{2/3}}{u}
F = 104.0205375
x_f = 762.7717477 m
dh = 125.6375355 m
H = 225.6375355 m
How it was worked out
  1. Briggs plume rise and effective stack height (neutral or unstable air)
    F = \frac{g v_s d^2 (T_s – T_a)}{4T_s},\quad \Delta h = \frac{1.6F^{1/3}x_f^{2/3}}{u}
    with vs = 15 m/s, d = 3 m, Ts = 420 K, Ta = 288 K, u = 5 m/s, hs = 100 m
    → F = 104.0205375 m, x_f = 762.7717477 m, dh = 125.6375355 m, H = 225.6375355 m
Terminal
$ environmental-engineering solve enveng_briggs_plume_rise "vs=15 m/s" "d=3 m" "Ts=420 K" "Ta=288 K" "u=5 m/s" "hs=100 m"
F = 104.0205375
x_f = 762.7717477 m
dh = 125.6375355 m
H = 225.6375355 m
  by: Briggs plume rise and effective stack height (neutral or unstable air)  (F = g vs d^2 (Ts - Ta)/(4 Ts); x_f = 49 F^(5/8) (F < 55) or 119 F^(2/5); dh = 1.6 F^(1/3) x_f^(2/3)/u)
  vs = 15 m/s
  d = 3 m
  Ts = 420 K
  Ta = 288 K
  u = 5 m/s
  hs = 100 m
  assumes: Ts > Ta; neutral or unstable air (classes A-D); buoyancy-dominated plume
Air pollution

Gaussian plume concentration at a receptor (ground reflection)

C = \frac{Q}{2\pi u\sigma_y\sigma_z} e^{-\frac{y^2}{2\sigma_y^2}}\left[e^{-\frac{(z-H)^2}{2\sigma_z^2}} + e^{-\frac{(z+H)^2}{2\sigma_z^2}}\right]
C = 1.042805659e-06 kg/m^3
C_ugm3 = 1042.805659
How it was worked out
  1. Gaussian plume concentration at a receptor (ground reflection)
    C = \frac{Q}{2\pi u\sigma_y\sigma_z} e^{-\frac{y^2}{2\sigma_y^2}}\left[e^{-\frac{(z-H)^2}{2\sigma_z^2}} + e^{-\frac{(z+H)^2}{2\sigma_z^2}}\right]
    with Q = 0.1 kg/s, u = 4 m/s, sigma_y = 60 m, sigma_z = 30 m, H = 50 m, y = 20 m, z = 0 m
    → C = 1.042805659e-06 kg/m^3, C_ugm3 = 1042.805659 kg/m^3
Terminal
$ environmental-engineering solve enveng_gaussian_plume_concentration "Q=100 g/s" "u=4 m/s" "sigma_y=60 m" "sigma_z=30 m" "H=50 m" "y=20 m" "z=0 m"
C = 1.042805659e-06 kg/m^3
C_ugm3 = 1042.805659
  by: Gaussian plume concentration at a receptor (ground reflection)  (C = Q/(2 pi u sy sz) exp(-y^2/2sy^2) [exp(-(z-H)^2/2sz^2) + exp(-(z+H)^2/2sz^2)])
  Q = 0.1 kg/s
  u = 4 m/s
  sigma_y = 60 m
  sigma_z = 30 m
  H = 50 m
  y = 20 m
  z = 0 m
  assumes: Q, u, sigma_y, sigma_z > 0; H, z >= 0; steady state, flat terrain
Wastewater

Activated sludge complete-mix design: Y = 0.5, k = 5 1/d, Ks = 60 mg/L, kd = 0.06 1/d, SRT = 10 d, HRT = 6 h, S0 = 250 mg/L

S = \frac{K_s(1 + k_d\theta_c)}{\theta_c(Yk – k_d) – 1},\quad X = \frac{\theta_c Y(S_0 – S)}{\theta(1 + k_d\theta_c)}
S = 0.004102564103 kg/m^3
S_mgL = 4.102564103
X = 3.073717949 kg/m^3
X_mgL = 3073.717949
Y_obs = 0.3125
How it was worked out
  1. Activated sludge (complete mix) effluent substrate and biomass (Lawrence-McCarty)
    S = \frac{K_s(1 + k_d\theta_c)}{\theta_c(Yk – k_d) – 1},\quad X = \frac{\theta_c Y(S_0 – S)}{\theta(1 + k_d\theta_c)}
    with Y = 0.5, k = 5 1/day, Ks = 60 mg/L, kd = 0.06 1/day, SRT = 10 day, HRT = 6 h, S0 = 250 mg/L
    → S = 0.004102564103 kg/m^3, S_mgL = 4.102564103 kg/m^3, X = 3.073717949 kg/m^3, X_mgL = 3073.717949 kg/m^3, Y_obs = 0.3125 kg/m^3
Terminal
$ environmental-engineering solve enveng_activated_sludge_cstr_design Y=0.5 "k=5 1/day" "Ks=60 mg/L" "kd=0.06 1/day" "SRT=10 day" "HRT=6 h" "S0=250 mg/L"
S = 0.004102564103 kg/m^3
S_mgL = 4.102564103
X = 3.073717949 kg/m^3
X_mgL = 3073.717949
Y_obs = 0.3125
  by: Activated sludge (complete mix) effluent substrate and biomass (Lawrence-McCarty)  (S = Ks (1 + kd SRT)/(SRT (Y k - kd) - 1); X = (SRT/HRT) Y (S0 - S)/(1 + kd SRT))
  Y = 0.5
  k = 5.787037037e-05 1/s
  Ks = 0.06 kg/m^3
  kd = 6.944444444e-07 1/s
  SRT = 864000 s
  HRT = 21600 s
  S0 = 0.25 kg/m^3
  assumes: steady state, complete mix; SRT above the washout limit; S < S0
Noise

Adding sound levels in decibels

L = 10\log_{10}\sum_i 10^{L_i/10}
L_total = 92.1284136
How it was worked out
  1. Adding sound levels in decibels
    L = 10\log_{10}\sum_i 10^{L_i/10}
    with L = [85, 85, 90]
    → L_total = 92.1284136
Terminal
$ environmental-engineering solve enveng_decibel_addition "L=[85, 85]"
L_total = 88.01029996
  by: Adding sound levels in decibels  (L = 10 log10(sum 10^(Li/10)))
  assumes: incoherent sources
Gas transfer

Air stripping tower: Qw = 0.05 m^3/s, Qa = 1.5 m^3/s, H = 0.2, Cin = 200 ug/L, Cout = 5 ug/L, HTU = 1 m

NTU = \frac{R}{R-1}\ln\!\left[\frac{(C_{in}/C_{out})(R-1) + 1}{R}\right],\quad Z = HTU\cdot NTU
R = 6
NTU = 4.213854527
Z = 4.213854527 m
air_to_water_min = 4.875
How it was worked out
  1. Packed-tower air stripping: stripping factor, transfer units and height
    NTU = \frac{R}{R-1}\ln\!\left[\frac{(C_{in}/C_{out})(R-1) + 1}{R}\right],\quad Z = HTU\cdot NTU
    with Qw = 0.05 m^3/s, Qa = 1.5 m^3/s, H = 0.2, Cin = 200 ug/L, Cout = 5 ug/L, HTU = 1 m
    → R = 6 m, NTU = 4.213854527 m, Z = 4.213854527 m, air_to_water_min = 4.875 m
Terminal
$ environmental-engineering solve enveng_air_stripping_tower "Qw=0.05 m^3/s" "Qa=1.5 m^3/s" H=0.2 "Cin=200 ug/L" "Cout=5 ug/L" "HTU=1 m"
R = 6
NTU = 4.213854527
Z = 4.213854527 m
air_to_water_min = 4.875
  by: Packed-tower air stripping: stripping factor, transfer units and height  (R = H Qa/Qw; NTU = R/(R - 1) ln[((Cin/Cout)(R - 1) + 1)/R] (Cin/Cout - 1 when R = 1); Z = HTU NTU)
  Qw = 0.05 m^3/s
  Qa = 1.5 m^3/s
  H = 0.2
  Cin = 0.0002 kg/m^3
  Cout = 5e-06 kg/m^3
  HTU = 1 m
  assumes: Qa/Qw above the minimum; clean inlet air; dilute, linear equilibrium
Solid waste

Dulong heating value: C = 0.48, H = 0.064, O = 0.376, S = 0.004, N = 0.008

HHV = 337C + 1419\left(H – \frac O8\right) + 93S + 23N\ \ [\mathrm{kJ/kg},\ \%]
HHV = 18643900 J/kg
HHV_kJ_per_kg = 18643.9
HHV_MJ_per_kg = 18.6439
How it was worked out
  1. Heating value of waste from its elemental composition (modified Dulong)
    HHV = 337C + 1419\left(H – \frac O8\right) + 93S + 23N\ \ [\mathrm{kJ/kg},\ \%]
    with C = 0.48, H = 0.064, O = 0.376, S = 0.004, N = 0.008
    → HHV = 18643900 J/kg, HHV_kJ_per_kg = 18643.9 J/kg, HHV_MJ_per_kg = 18.6439 J/kg
Terminal
$ environmental-engineering solve enveng_dulong_heating_value C=0.48 H=0.064 O=0.376 S=0.004 N=0.008
HHV = 18643900 J/kg
HHV_kJ_per_kg = 18643.9
HHV_MJ_per_kg = 18.6439
  by: Heating value of waste from its elemental composition (modified Dulong)  (HHV (kJ/kg) = 337 C + 1419 (H - O/8) + 93 S + 23 N, mass per cent)
  C = 0.48
  H = 0.064
  O = 0.376
  S = 0.004
  N = 0.008
  assumes: fractions on the same (dry) basis, sum at most 1
Water treatment

Backwash bed expansion: L = 0.7 m, eps = 0.42, vb = 50 m/h, vs = 300 m/h

\varepsilon_e = \left(\frac{v_b}{v_s}\right)^{0.22},\quad L_e = \frac{L(1-\varepsilon)}{1-\varepsilon_e}
eps_e = 0.6742279077
Le = 1.246270045 m
expansion = 0.780385778
How it was worked out
  1. Filter bed expansion during backwash
    \varepsilon_e = \left(\frac{v_b}{v_s}\right)^{0.22},\quad L_e = \frac{L(1-\varepsilon)}{1-\varepsilon_e}
    with L = 0.7 m, eps = 0.42, vb = 50 m/h, vs = 300 m/h
    → eps_e = 0.6742279077 m, Le = 1.246270045 m, expansion = 0.780385778 m
Terminal
$ environmental-engineering solve enveng_backwash_bed_expansion "L=0.7 m" eps=0.42 "vb=50 m/h" "vs=300 m/h"
eps_e = 0.6742279077
Le = 1.246270045 m
expansion = 0.780385778
  by: Filter bed expansion during backwash  (eps_e = (vb/vs)^0.22; Le = L (1 - eps)/(1 - eps_e))
  L = 0.7 m
  eps = 0.42
  vb = 0.01388888889 m/s
  vs = 0.08333333333 m/s
  assumes: the bed is fluidised: eps < (vb/vs)^0.22 < 1
Command line

Use it from the command line

Every command below was run as shown, and the text under it is exactly what environmental-engineering printed. The same commands work in a Linux terminal and in Windows PowerShell. Install it in a minute.

1

Check the install

Prints the model, its version and that this is the Rust build.

Terminal
$ environmental-engineering --version
environmental-engineering-ai999x 1.0.0 (Rust build, ax-engine 0.1.0)
2

Ask in words

Write the question as you would say it: the program reads the quantities and their units, picks the capability and answers.

Terminal
$ environmental-engineering ask "Streeter-Phelps oxygen deficit: kd = 0.23 1/d, ka = 0.46 1/d, L0 = 10 mg/L, D0 = 1 mg/L, t = 2 d, DOsat = 9.1 mg/L"
Read as: Streeter-Phelps oxygen deficit and dissolved oxygen at a travel time
D = 0.002726165085 kg/m^3
DO = 0.006373834915 kg/m^3
D_mgL = 2.726165085
DO_mgL = 6.373834915
  by: Streeter-Phelps oxygen deficit and dissolved oxygen at a travel time  (D = kd L0/(ka - kd) (e^(-kd t) - e^(-ka t)) + D0 e^(-ka t); for ka = kd, D = (kd L0 t + D0) e^(-kd t))
  D0 = 0.001 kg/m^3
  DOsat = 0.0091 kg/m^3
  L0 = 0.01 kg/m^3
  ka = 5.324074074e-06 1/s
  kd = 2.662037037e-06 1/s
  t = 172800 s
  assumes: first-order deoxygenation and reaeration; plug flow; deficit stays below saturation
3

Find a capability

Search the capabilities by what you want to know; the first column is the id to pass to info and solve.

Terminal
$ environmental-engineering search "streeter-phelps oxygen deficit and dissolved oxygen at a travel time"
enveng_streeter_phelps_deficit       Streeter-Phelps oxygen deficit and dissolved oxygen at a travel time  (water quality / oxygen sag)
enveng_oxygen_sag_distance           Dissolved oxygen at a distance downstream (Streeter-Phelps)  (water quality / oxygen sag)
enveng_streeter_phelps_critical_point Critical (minimum) dissolved oxygen of the oxygen sag  (water quality / oxygen sag)
enveng_aeration_do_curve             Dissolved oxygen during aeration and the transfer rate  (wastewater / aeration)
enveng_do_saturation                 Dissolved oxygen saturation concentration (Benson-Krause)  (water quality / dissolved oxygen)
enveng_kla_two_point                 Overall oxygen transfer coefficient KLa from two DO readings  (wastewater / aeration)
enveng_theoretical_oxygen_demand     Theoretical oxygen demand of an organic compound  (water quality / oxygen demand)
enveng_aeration_oxygen_requirement   Oxygen requirement of an activated-sludge process  (wastewater / activated sludge)
… 12 more
4

List the capabilities

Every capability the program answers: its id (what you pass to solve) and its name.

Terminal
$ environmental-engineering list
enveng_activated_sludge_cstr_design      Activated sludge (complete mix) effluent substrate and biomass (Lawrence-McCarty)
enveng_aeration_do_curve                 Dissolved oxygen during aeration and the transfer rate
enveng_aeration_oxygen_requirement       Oxygen requirement of an activated-sludge process
enveng_air_stripping_tower               Packed-tower air stripping: stripping factor, transfer units and height
enveng_anaerobic_methane_yield           Methane production from COD removed (anaerobic digestion)
enveng_background_noise_correction       Source level after removing background noise
enveng_backwash_bed_expansion            Filter bed expansion during backwash
enveng_bod_dilution_test                 BOD from a dilution test (with optional seed correction)
… 91 more
5

What a capability needs

The equation or method, every input and output with its SI unit. Read this before solve: it tells you the input names.

Terminal
$ environmental-engineering info enveng_streeter_phelps_deficit
Streeter-Phelps oxygen deficit and dissolved oxygen at a travel time
  D = kd L0/(ka - kd) (e^(-kd t) - e^(-ka t)) + D0 e^(-ka t); for ka = kd, D = (kd L0 t + D0) e^(-kd t)
  in   kd       deoxygenation rate constant [1/s]
  in   ka       reaeration rate constant [1/s]
  in   L0       ultimate BOD of the mixed river water at the outfall [kg/m^3]
  in   D0       oxygen deficit at the outfall (DOsat - DO) [kg/m^3]
  in   t        travel time from the outfall [s]
  in   DOsat    saturation dissolved oxygen [kg/m^3]
  out  D        oxygen deficit at t [kg/m^3]
  out  DO       dissolved oxygen at t [kg/m^3]
  out  D_mgL    deficit in mg/L []
  out  DO_mgL   dissolved oxygen in mg/L []
6

Solve

Inputs as name=value, each with any unit of the right kind. The answer lists every output, the method used, each input converted to SI, and the conditions the answer assumes.

Terminal
$ environmental-engineering solve enveng_streeter_phelps_deficit "kd=0.23 1/day" "ka=0.46 1/day" "L0=10 mg/L" "D0=1 mg/L" "t=2 day" "DOsat=9.1 mg/L"
D = 0.002726165085 kg/m^3
DO = 0.006373834915 kg/m^3
D_mgL = 2.726165085
DO_mgL = 6.373834915
  by: Streeter-Phelps oxygen deficit and dissolved oxygen at a travel time  (D = kd L0/(ka - kd) (e^(-kd t) - e^(-ka t)) + D0 e^(-ka t); for ka = kd, D = (kd L0 t + D0) e^(-kd t))
  kd = 2.662037037e-06 1/s
  ka = 5.324074074e-06 1/s
  L0 = 0.01 kg/m^3
  D0 = 0.001 kg/m^3
  t = 172800 s
  DOsat = 0.0091 kg/m^3
  assumes: first-order deoxygenation and reaeration; plug flow; deficit stays below saturation
7

Machine-readable answer

–json prints the same answer as one line of JSON (values in SI): for scripts and other programs.

Terminal
$ environmental-engineering solve enveng_streeter_phelps_deficit "kd=0.23 1/day" "ka=0.46 1/day" "L0=10 mg/L" "D0=1 mg/L" "t=2 day" "DOsat=9.1 mg/L" --json
{"outcome":"SOLVED","message":"","value":0.00637383491469,"unit":"kg/m^3","solved_for":"DO","si":[["kd",2.662037037037037e-6],["ka",5.324074074074074e-6],["L0",0.01],["D0",0.001],["t",172800.0],["DOsat",0.0091]],"values":[["D",0.00272616508531,"kg/m^3"],["DO",0.00637383491469,"kg/m^3"],["D_mgL",2.72616508531,""],["DO_mgL",6.37383491469,""]],"target":"DO","phrase":"oxygen deficit at t","assumptions":["first-order deoxygenation and reaeration","plug flow","deficit stays below saturation"],"name":"Streeter-Phelps oxygen deficit and dissolved oxygen at a travel time","equation":"D = kd L0/(ka - kd) (e^(-kd t) - e^(-ka t)) + D0 e^(-ka t); for ka = kd, D = (kd L0 t + D0) e^(-kd t)"}
8

When an input is missing

No number is guessed: the answer names what is missing, shows a complete call, and the program exits with status 1.

Terminal
$ environmental-engineering solve enveng_streeter_phelps_deficit "kd=0.23 1/day" "ka=0.46 1/day" "L0=10 mg/L" "D0=1 mg/L" "t=2 day"
NEEDS_INPUT: enveng_streeter_phelps_deficit needs DOsat (saturation dissolved oxygen). Example: solve('enveng_streeter_phelps_deficit', kd='2.66204e-06 1/s', ka='5.32407e-06 1/s', L0='0.01 kg/m^3', D0='0.001 kg/m^3', t='172800 s', DOsat='0.0091 kg/m^3').
9

Many questions at once

One JSON request per line in, one JSON answer per line out, in order: for scripts, notebooks and agents (the program starts once). In PowerShell: Get-Content cases.jsonl | environmental-engineering batch

Terminal
cases.jsonl
{"key": "enveng_streeter_phelps_deficit", "inputs": {"kd": "0.23 1/day", "ka": "0.46 1/day", "L0": "10 mg/L", "D0": "1 mg/L", "t": "2 day", "DOsat": "9.1 mg/L"}}
{"key": "enveng_briggs_plume_rise", "inputs": {"vs": "15 m/s", "d": "3 m", "Ts": "420 K", "Ta": "288 K", "u": "5 m/s", "hs": "100 m"}}
$ environmental-engineering batch < cases.jsonl
{"outcome":"SOLVED","message":"","value":0.00637383491469,"unit":"kg/m^3","solved_for":"DO","si":[["kd",2.662037037037037e-6],["ka",5.324074074074074e-6],["L0",0.01],["D0",0.001],["t",172800.0],["DOsat",0.0091]],"values":[["D",0.00272616508531,"kg/m^3"],["DO",0.00637383491469,"kg/m^3"],["D_mgL",2.72616508531,""],["DO_mgL",6.37383491469,""]],"target":"DO","phrase":"oxygen deficit at t","assumptions":["first-order deoxygenation and reaeration","plug flow","deficit stays below saturation"],"name":"Streeter-Phelps oxygen deficit and dissolved oxygen at a travel time","equation":"D = kd L0/(ka - kd) (e^(-kd t) - e^(-ka t)) + D0 e^(-ka t); for ka = kd, D = (kd L0 t + D0) e^(-kd t)"}
{"outcome":"SOLVED","message":"","value":125.637535501,"unit":"m","solved_for":"dh","si":[["vs",15.0],["d",3.0],["Ts",420.0],["Ta",288.0],["u",5.0],["hs",100.0]],"values":[["F",104.0205375,""],["x_f",762.771747653,"m"],["dh",125.637535501,"m"],["H",225.637535501,"m"]],"target":"dh","phrase":"buoyancy flux, m^4/s^3","assumptions":["Ts > Ta","neutral or unstable air (classes A-D)","buoyancy-dominated plume"],"name":"Briggs plume rise and effective stack height (neutral or unstable air)","equation":"F = g vs d^2 (Ts - Ta)/(4 Ts); x_f = 49 F^(5/8) (F < 55) or 119 F^(2/5); dh = 1.6 F^(1/3) x_f^(2/3)/u"}

All commands

CommandWhat it does
environmental-engineering ask "<question>"answer a question written in words
environmental-engineering search "<words>"find the capabilities that match
environmental-engineering listevery capability: its id and name
environmental-engineering info <capability>the equation or method, its inputs and outputs with their units
environmental-engineering solve <capability> name=value …the answer; add –target X to solve an equation for X, –json for JSON
environmental-engineering figures <capability> name=value … --out DIRthe live figures for those inputs, as SVG files in DIR
environmental-engineering batch < requests.jsonlone JSON answer per line, for scripts and agents
environmental-engineering catalogevery capability with its inputs, as JSON
environmental-engineering --versionthe model and its version

Exit status: 0 when the question was answered, 1 when it was not (the message says why: a missing input, an invalid value, a question outside the model), 2 for a command it does not know.

Python

Use it from Python

The Python package is coming soon. Once it is published: pip install environmental-engineering-ai999x, ask in words or call a capability. Every snippet was run as shown; the output under it is what it printed.

import environmental_engineering_ai999x as m

a = m.ask("Streeter-Phelps oxygen deficit: kd = 0.23 1/d, ka = 0.46 1/d, L0 = 10 mg/L, D0 = 1 mg/L, t = 2 d, DOsat = 9.1 mg/L")
print(a.outcome)
print(a.values)
for step in a.steps:
    print(step["name"])
Output
SOLVED
{'D': 0.00272616508531, 'DO': 0.00637383491469, 'D_mgL': 2.72616508531, 'DO_mgL': 6.37383491469}
Streeter-Phelps oxygen deficit and dissolved oxygen at a travel time
Capabilities

Every capability, explained

Search by name, formula, input or topic. Each capability opens to say what it does, what it needs, what it gives back and why, with its worked example, how to run it (on the command line, from Python, in your browser) and its figures.

99 capabilities

Air pollution 21

Box model of an air basin (well-mixed, time-dependent)1 fig.enveng_box_model

The concentration over a city treated as a well-mixed box: emission flux per area, wind through a box of length L under a mixing height, background air; the concentration after time t and at steady state.

C(t) = C_{ss} + (C_0 – C_{ss})e^{-ut/L},\quad C_{ss} = C_b + \frac{qL}{uH_m}

You give

MeaningUnitExample
q
Emission rate per unit ground areakg/(m^2*s)4 ug/(m^2*s)
L
Box length along the windm15000 m
u
Wind speedm/s3 m/s
\text{Hm}
Mixing heightm600 m
\text{Cb}
Background (upwind) concentrationkg/m^320 ug/m^3
\text{C0}
Concentration at t = 0kg/m^320 ug/m^3
t
Elapsed times2 h

You get

MeaningUnitExample
C
Concentration at time tkg/m^34.543574138e-08 kg/m^3
C_{\mathrm{ss}}
Steady-state concentrationkg/m^35.333333333e-08 kg/m^3
C_{\mathrm{ugm3}}
Concentration at t in micrograms per cubic metre—45.43574138

Values with a unit may be written in any unit of the right kind.

Applies when

  • well-mixed box
  • constant wind, mixing height and emissions

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Air basin box model: q = 4 ug/(m^2*s), L = 15000 m, u = 3 m/s, Hm = 600 m, Cb = 20 ug/m^3, C0 = 20 ug/m^3, t = 2 h
C = 4.543574138e-08 kg/m^3
C_ss = 5.333333333e-08 kg/m^3
C_ugm3 = 45.43574138

Run it

Terminal
$ environmental-engineering solve enveng_box_model "q=4 ug/(m^2*s)" "L=15000 m" "u=3 m/s" "Hm=600 m" "Cb=20 ug/m^3" "C0=20 ug/m^3" "t=2 h"
C = 4.543574138e-08 kg/m^3
C_ss = 5.333333333e-08 kg/m^3
C_ugm3 = 45.43574138
  by: Box model of an air basin (well-mixed, time-dependent)  (dC/dt = q/Hm - u (C - Cb)/L, so C = Css + (C0 - Css) e^(-u t/L) with Css = Cb + q L/(u Hm))
  q = 4e-09 kg/(m^2*s)
  L = 15000 m
  u = 3 m/s
  Hm = 600 m
  Cb = 2e-08 kg/m^3
  C0 = 2e-08 kg/m^3
  t = 7200 s
  assumes: well-mixed box; constant wind, mixing height and emissions

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Briggs dispersion coefficients sigma_y and sigma_z1 fig.enveng_briggs_dispersion_coefficients

The horizontal and vertical plume spreads (Pasquill-Gifford curves in Briggs' formulas) at a downwind distance for a stability class, open-country or urban.

\sigma_y = \frac{a_y x}{\sqrt{1 + b_y x}},\quad \sigma_z = a_z x\,(1 + b_z x)^{p_z}

You give

MeaningUnitExample
x
Downwind distance from the sourcem1000 m
\text{cls}
Pasquill stability class A-F (urban: A and B share A-B, E and F share E-F) choice—d
\text{terrain}
Rural (open country) or urban coefficients choice—rural

You get

MeaningUnitExample
\sigma_{y}
Horizontal (crosswind) dispersion coefficientm76.27700714 m
\sigma_{z}
Vertical dispersion coefficientm37.94733192 m

Values with a unit may be written in any unit of the right kind.

Applies when

  • 100 m <= x <= 10 km

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Briggs dispersion coefficients: x = 1000 m, cls = d, terrain = rural
sigma_y = 76.27700714 m
sigma_z = 37.94733192 m

Run it

Terminal
$ environmental-engineering solve enveng_briggs_dispersion_coefficients "x=1000 m" cls=d terrain=rural
sigma_y = 76.27700714 m
sigma_z = 37.94733192 m
  by: Briggs dispersion coefficients sigma_y and sigma_z  (Briggs (1973) interpolation formulas sigma = a x (1 + b x)^p for each class and terrain)
  x = 1000 m
  cls = d
  terrain = rural
  assumes: 100 m <= x <= 10 km

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Briggs plume rise and effective stack height (neutral or unstable air)2 fig.enveng_briggs_plume_rise

The buoyancy flux, the final plume rise by Briggs' 2/3 law (neutral or unstable air) and the effective stack height.

F = \frac{g v_s d^2 (T_s – T_a)}{4T_s},\quad \Delta h = \frac{1.6F^{1/3}x_f^{2/3}}{u}

You give

MeaningUnitExample
\text{vs}
Stack gas exit velocitym/s15 m/s
d
Stack inside diameter at the exitm3 m
\text{Ts}
Stack gas temperatureK420 K
\text{Ta}
Ambient air temperatureK288 K
u
Wind speed at the stack topm/s5 m/s
\text{hs}
Physical stack heightm100 m

You get

MeaningUnitExample
F
Buoyancy flux, m⁴/s³—104.0205375
x_{f}
Distance to final risem762.7717477 m
\text{dh}
Plume risem125.6375355 m
H
Effective stack height hs + dhm225.6375355 m

Values with a unit may be written in any unit of the right kind.

Applies when

  • Ts > Ta
  • neutral or unstable air (classes A-D)
  • buoyancy-dominated plume

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Briggs plume rise: vs = 15 m/s, d = 3 m, Ts = 420 K, Ta = 288 K, u = 5 m/s, hs = 100 m
F = 104.0205375
x_f = 762.7717477 m
dh = 125.6375355 m
H = 225.6375355 m

Run it

Terminal
$ environmental-engineering solve enveng_briggs_plume_rise "vs=15 m/s" "d=3 m" "Ts=420 K" "Ta=288 K" "u=5 m/s" "hs=100 m"
F = 104.0205375
x_f = 762.7717477 m
dh = 125.6375355 m
H = 225.6375355 m
  by: Briggs plume rise and effective stack height (neutral or unstable air)  (F = g vs d^2 (Ts - Ta)/(4 Ts); x_f = 49 F^(5/8) (F < 55) or 119 F^(2/5); dh = 1.6 F^(1/3) x_f^(2/3)/u)
  vs = 15 m/s
  d = 3 m
  Ts = 420 K
  Ta = 288 K
  u = 5 m/s
  hs = 100 m
  assumes: Ts > Ta; neutral or unstable air (classes A-D); buoyancy-dominated plume

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Briggs plume rise in stable air1 fig.enveng_briggs_stable_plume_rise

The final rise of a buoyant plume in stable air (classes E, F) from the buoyancy flux, wind speed and potential-temperature gradient, and the effective stack height.

\Delta h = 2.6\left(\frac{F}{u s}\right)^{1/3},\quad s = \frac{g}{T_a}\frac{\partial\theta}{\partial z}

You give

MeaningUnitExample
\text{vs}
Stack gas exit velocitym/s15 m/s
d
Stack inside diameter at the exitm3 m
\text{Ts}
Stack gas temperatureK420 K
\text{Ta}
Ambient air temperatureK288 K
u
Wind speed at the stack topm/s4 m/s
\text{dtheta}
Potential temperature gradient d(theta)/dzK/m0.02 K/m
\text{hs}
Physical stack heightm100 m

You get

MeaningUnitExample
F
Buoyancy flux, m⁴/s³—104.0205375
s
Stability parameter g/Ta dtheta/dz, 1/s^2—0.0006810173611
\text{dh}
Plume risem87.55352869 m
H
Effective stack heightm187.5535287 m

Values with a unit may be written in any unit of the right kind.

Applies when

  • Ts > Ta
  • stable air: dtheta/dz > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Briggs stable plume rise: vs = 15 m/s, d = 3 m, Ts = 420 K, Ta = 288 K, u = 4 m/s, dtheta = 0.02 K/m, hs = 100 m
F = 104.0205375
s = 0.0006810173611
dh = 87.55352869 m
H = 187.5535287 m

Run it

Terminal
$ environmental-engineering solve enveng_briggs_stable_plume_rise "vs=15 m/s" "d=3 m" "Ts=420 K" "Ta=288 K" "u=4 m/s" "dtheta=0.02 K/m" "hs=100 m"
F = 104.0205375
s = 0.0006810173611
dh = 87.55352869 m
H = 187.5535287 m
  by: Briggs plume rise in stable air  (s = (g/Ta) dtheta/dz; dh = 2.6 (F/(u s))^(1/3))
  vs = 15 m/s
  d = 3 m
  Ts = 420 K
  Ta = 288 K
  u = 4 m/s
  dtheta = 0.02 K/m
  hs = 100 m
  assumes: Ts > Ta; stable air: dtheta/dz > 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Cyclone cut diameter and fractional efficiency (Lapple)1 fig.enveng_cyclone_lapple

The cut diameter (50 % efficiency) of a cyclone from the gas viscosity, inlet width, effective number of turns, inlet velocity and densities, and the collection efficiency of a particle size by Lapple's curve.

d_{50} = \sqrt{\frac{9\mu W}{2\pi N_e V_i(\rho_p – \rho_g)}},\quad \eta = \frac{1}{1 + (d_{50}/d_p)^2}

You give

MeaningUnitExample
\mu
Gas viscosityPa*s1.8e-05 Pa*s
W
Inlet widthm0.25 m
\text{Ne}
Effective number of turns—6
\text{Vi}
Inlet gas velocitym/s15 m/s
\rho_{p}
Particle densitykg/m^31500 kg/m^3
\rho_{g}
Gas densitykg/m^31.2 kg/m^3
\text{dp}
Particle diameterm10 um

You get

MeaningUnitExample
\text{d50}
Cut diameterm6.912648602e-06 m
\eta
Collection efficiency of particles of diameter dp—0.6766599842

Values with a unit may be written in any unit of the right kind.

Applies when

  • rho_p > rho_g

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Cyclone efficiency Lapple: mu = 1.8e-05 Pa*s, W = 0.25 m, Ne = 6, Vi = 15 m/s, rho_p = 1500 kg/m^3, rho_g = 1.2 kg/m^3, dp = 10 um
d50 = 6.912648602e-06 m
eta = 0.6766599842

Run it

Terminal
$ environmental-engineering solve enveng_cyclone_lapple "mu=1.8e-05 Pa*s" "W=0.25 m" Ne=6 "Vi=15 m/s" "rho_p=1500 kg/m^3" "rho_g=1.2 kg/m^3" "dp=10 um"
d50 = 6.912648602e-06 m
eta = 0.6766599842
  by: Cyclone cut diameter and fractional efficiency (Lapple)  (d50 = sqrt(9 mu W/(2 pi Ne Vi (rho_p - rho_g))); eta = 1/(1 + (d50/dp)^2))
  mu = 1.8e-05 Pa*s
  W = 0.25 m
  Ne = 6
  Vi = 15 m/s
  rho_p = 1500 kg/m^3
  rho_g = 1.2 kg/m^3
  dp = 1e-05 m
  assumes: rho_p > rho_g

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Electrostatic precipitator efficiency (Deutsch-Anderson)1 fig.enveng_esp_efficiency

The collection efficiency and penetration of an electrostatic precipitator from the drift velocity, collecting area and gas flow.

\eta = 1 – e^{-wA/Q}

You give

MeaningUnitExample
w
Effective drift (migration) velocitym/s0.1 m/s
A
Collecting plate aream^25000 m^2
Q
Gas flow ratem^3/s200 m^3/s

You get

MeaningUnitExample
\eta
Collection efficiency (fraction)—0.9179150014
\text{penetration}
Fraction passing (1 – eta)—0.08208499862

Values with a unit may be written in any unit of the right kind.

Applies when

  • w, A, Q > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Electrostatic precipitator efficiency: w = 0.1 m/s, A = 5000 m^2, Q = 200 m^3/s
eta = 0.9179150014
penetration = 0.08208499862

Run it

Terminal
$ environmental-engineering solve enveng_esp_efficiency "w=0.1 m/s" "A=5000 m^2" "Q=200 m^3/s"
eta = 0.9179150014
penetration = 0.08208499862
  by: Electrostatic precipitator efficiency (Deutsch-Anderson)  (eta = 1 - exp(-w A/Q))
  w = 0.1 m/s
  A = 5000 m^2
  Q = 200 m^3/s
  assumes: w, A, Q > 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Electrostatic precipitator plate area for a target efficiency1 fig.enveng_esp_area

The collecting plate area an electrostatic precipitator needs to reach a stated efficiency (Deutsch-Anderson).

A = -\frac{Q}{w}\ln(1-\eta)

You give

MeaningUnitExample
w
Effective drift velocitym/s0.1 m/s
Q
Gas flow ratem^3/s200 m^3/s
\eta
Required collection efficiency (fraction or %)—0.99

You get

MeaningUnitExample
A
Required collecting aream^29210.340372 m^2

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0 < eta < 1

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Electrostatic precipitator area: w = 0.1 m/s, Q = 200 m^3/s, eta = 0.99
A = 9210.340372 m^2

Run it

Terminal
$ environmental-engineering solve enveng_esp_area "w=0.1 m/s" "Q=200 m^3/s" eta=0.99
A = 9210.340372 m^2
  by: Electrostatic precipitator plate area for a target efficiency  (A = -Q ln(1 - eta)/w)
  w = 0.1 m/s
  Q = 200 m^3/s
  eta = 0.99
  assumes: 0 < eta < 1

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Gas concentration: mass concentration to ppm (by volume)1 fig.enveng_mass_concentration_to_ppm

The volume mixing ratio (ppm and ppb) of a gaseous pollutant from its mass concentration, molar mass, temperature and pressure (ideal gas).

\text{ppm} = \frac{C R T}{P M}\times10^{6}

You give

MeaningUnitExample
C
Mass concentrationkg/m^3100 ug/m^3
M
Molar masskg/mol46.006 g/mol
T
Air temperatureK298.15 K
P
Air pressurePa101.325 kPa

You get

MeaningUnitExample
\text{ppm}
Volume mixing ratio in ppm—0.05317872386
\text{ppb}
Volume mixing ratio in ppb—53.17872386

Values with a unit may be written in any unit of the right kind.

Applies when

  • ideal gas

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Convert mass concentration to ppm: C = 100 ug/m^3, M = 46.006 g/mol, T = 298.15 K, P = 101.325 kPa
ppm = 0.05317872386
ppb = 53.17872386

Run it

Terminal
$ environmental-engineering solve enveng_mass_concentration_to_ppm "C=100 ug/m^3" "M=46.006 g/mol" "T=298.15 K" "P=101.325 kPa"
ppm = 0.05317872386
ppb = 53.17872386
  by: Gas concentration: mass concentration to ppm (by volume)  (ppm = C R T/(P M) 1e6)
  C = 1e-07 kg/m^3
  M = 0.046006 kg/mol
  T = 298.15 K
  P = 101325 Pa
  assumes: ideal gas

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Gas concentration: ppm (by volume) to mass concentration1 fig.enveng_ppm_to_mass_concentration

The mass concentration of a gaseous pollutant from its volume mixing ratio in ppm, its molar mass and the air temperature and pressure (ideal gas).

C = \text{ppm}\times10^{-6}\,\frac{P M}{R T}

You give

MeaningUnitExample
\text{ppm}
Volume mixing ratio in parts per million—0.14
M
Molar mass of the pollutantkg/mol64.066 g/mol
T
Air temperatureK298.15 K
P
Air pressurePa101.325 kPa

You get

MeaningUnitExample
C
Mass concentrationkg/m^33.666091151e-07 kg/m^3
C_{\mathrm{ugm3}}
In micrograms per cubic metre—366.6091151
C_{\mathrm{mgm3}}
In milligrams per cubic metre—0.3666091151

Values with a unit may be written in any unit of the right kind.

Applies when

  • ideal gas

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Convert ppm to mass concentration: ppm = 0.14 ppm, M = 64.066 g/mol, T = 298.15 K, P = 101.325 kPa
C = 3.666091151e-07 kg/m^3
C_ugm3 = 366.6091151
C_mgm3 = 0.3666091151

Run it

Terminal
$ environmental-engineering solve enveng_ppm_to_mass_concentration ppm=0.14 "M=64.066 g/mol" "T=298.15 K" "P=101.325 kPa"
C = 3.666091151e-07 kg/m^3
C_ugm3 = 366.6091151
C_mgm3 = 0.3666091151
  by: Gas concentration: ppm (by volume) to mass concentration  (C = ppm 1e-6 P M/(R T))
  ppm = 0.14
  M = 0.064066 kg/mol
  T = 298.15 K
  P = 101325 Pa
  assumes: ideal gas

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Gaussian plume concentration at a receptor (ground reflection)1 fig.enveng_gaussian_plume_concentration

The steady concentration downwind of a continuous point source at crosswind distance y and height z, given the dispersion coefficients at the receptor's distance and the effective stack height, with full reflection at the ground.

C = \frac{Q}{2\pi u\sigma_y\sigma_z} e^{-\frac{y^2}{2\sigma_y^2}}\left[e^{-\frac{(z-H)^2}{2\sigma_z^2}} + e^{-\frac{(z+H)^2}{2\sigma_z^2}}\right]

You give

MeaningUnitExample
Q
Pollutant emission ratekg/s100 g/s
u
Mean wind speed at the stack heightm/s4 m/s
\sigma_{y}
Horizontal dispersion coefficient at the receptor distancem60 m
\sigma_{z}
Vertical dispersion coefficient at the receptor distancem30 m
H
Effective stack height (stack height plus plume rise)m50 m
y
Crosswind distance from the plume centrelinem20 m
z
Receptor height above the groundm0 m

You get

MeaningUnitExample
C
Concentration at the receptorkg/m^31.042805659e-06 kg/m^3
C_{\mathrm{ugm3}}
Concentration in micrograms per cubic metre—1042.805659

Values with a unit may be written in any unit of the right kind.

Applies when

  • Q, u, sigma_y, sigma_z > 0
  • H, z >= 0
  • steady state, flat terrain

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Gaussian plume concentration: Q = 100 g/s, u = 4 m/s, sigma_y = 60 m, sigma_z = 30 m, H = 50 m, y = 20 m, z = 0 m
C = 1.042805659e-06 kg/m^3
C_ugm3 = 1042.805659

Run it

Terminal
$ environmental-engineering solve enveng_gaussian_plume_concentration "Q=100 g/s" "u=4 m/s" "sigma_y=60 m" "sigma_z=30 m" "H=50 m" "y=20 m" "z=0 m"
C = 1.042805659e-06 kg/m^3
C_ugm3 = 1042.805659
  by: Gaussian plume concentration at a receptor (ground reflection)  (C = Q/(2 pi u sy sz) exp(-y^2/2sy^2) [exp(-(z-H)^2/2sz^2) + exp(-(z+H)^2/2sz^2)])
  Q = 0.1 kg/s
  u = 4 m/s
  sigma_y = 60 m
  sigma_z = 30 m
  H = 50 m
  y = 20 m
  z = 0 m
  assumes: Q, u, sigma_y, sigma_z > 0; H, z >= 0; steady state, flat terrain

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Gaussian plume concentration from the stability class1 fig.enveng_plume_concentration_stability

The concentration at a receptor (x, y, z) downwind of an elevated point source, with the dispersion coefficients taken from Briggs' formulas for the stability class and terrain.

C = \frac{Q}{2\pi u\sigma_y(x)\sigma_z(x)} e^{-\frac{y^2}{2\sigma_y^2}}\left[e^{-\frac{(z-H)^2}{2\sigma_z^2}} + e^{-\frac{(z+H)^2}{2\sigma_z^2}}\right]

You give

MeaningUnitExample
Q
Pollutant emission ratekg/s200 g/s
u
Mean wind speed at the stack heightm/s5 m/s
H
Effective stack heightm80 m
x
Downwind distancem2000 m
y
Crosswind distance from the centrelinem0 m
z
Receptor heightm0 m
\text{cls}
Pasquill stability class A-F choice—c
\text{terrain}
Rural or urban dispersion coefficients choice—rural

You get

MeaningUnitExample
C
Concentration at the receptorkg/m^33.935687085e-07 kg/m^3
C_{\mathrm{ugm3}}
Concentration in micrograms per cubic metre—393.5687085
\sigma_{y}
Horizontal dispersion coefficient at xm200.8316044 m
\sigma_{z}
Vertical dispersion coefficient at xm135.2246808 m

Values with a unit may be written in any unit of the right kind.

Applies when

  • 100 m <= x <= 10 km
  • Q, u > 0
  • H, z >= 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Plume concentration with stability class: Q = 200 g/s, u = 5 m/s, H = 80 m, x = 2000 m, y = 0 m, z = 0 m, cls = c, terrain = rural
C = 3.935687085e-07 kg/m^3
C_ugm3 = 393.5687085
sigma_y = 200.8316044 m
sigma_z = 135.2246808 m

Run it

Terminal
$ environmental-engineering solve enveng_plume_concentration_stability "Q=200 g/s" "u=5 m/s" "H=80 m" "x=2000 m" "y=0 m" "z=0 m" cls=c terrain=rural
C = 3.935687085e-07 kg/m^3
C_ugm3 = 393.5687085
sigma_y = 200.8316044 m
sigma_z = 135.2246808 m
  by: Gaussian plume concentration from the stability class  (Briggs sigma_y(x), sigma_z(x) for the class, then the reflected Gaussian plume)
  Q = 0.2 kg/s
  u = 5 m/s
  H = 80 m
  x = 2000 m
  y = 0 m
  z = 0 m
  cls = c
  terrain = rural
  assumes: 100 m <= x <= 10 km; Q, u > 0; H, z >= 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Gaussian plume trapped below an inversion lid (multiple reflections)1 fig.enveng_plume_mixing_lid

The concentration of a plume reflected both at the ground and at the base of an elevated inversion (mixing height), by the image-source series, with the fully mixed limit for comparison.

C = \frac{Q e^{-y^2/2\sigma_y^2}}{2\pi u\sigma_y\sigma_z}\sum_{n=-\infty}^{\infty}\left[e^{-\frac{(z-H+2nL)^2}{2\sigma_z^2}} + e^{-\frac{(z+H+2nL)^2}{2\sigma_z^2}}\right]

You give

MeaningUnitExample
Q
Emission ratekg/s100 g/s
u
Mean wind speedm/s4 m/s
\sigma_{y}
Horizontal dispersion coefficientm900 m
\sigma_{z}
Vertical dispersion coefficientm600 m
H
Effective stack heightm80 m
\text{Lm}
Mixing height (inversion base)m500 m
y
Crosswind distancem0 m
z
Receptor heightm0 m

You get

MeaningUnitExample
C
Concentration with ground and lid reflectionskg/m^32.219531498e-08 kg/m^3
C_{\mathrm{ugm3}}
In micrograms per cubic metre—22.19531498
C_{\mathrm{mixed}}
Uniformly mixed limit Q/(sqrt(2 pi) u sy Lm) e^(-y^2/2sy^2)kg/m^32.216346002e-08 kg/m^3

Values with a unit may be written in any unit of the right kind.

Applies when

  • H, z <= Lm
  • sigma_z <= 10 Lm

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Plume below an inversion lid: Q = 100 g/s, u = 4 m/s, sigma_y = 900 m, sigma_z = 600 m, H = 80 m, Lm = 500 m, y = 0 m, z = 0 m
C = 2.219531498e-08 kg/m^3
C_ugm3 = 22.19531498
C_mixed = 2.216346002e-08 kg/m^3

Run it

Terminal
$ environmental-engineering solve enveng_plume_mixing_lid "Q=100 g/s" "u=4 m/s" "sigma_y=900 m" "sigma_z=600 m" "H=80 m" "Lm=500 m" "y=0 m" "z=0 m"
C = 2.219531498e-08 kg/m^3
C_ugm3 = 22.19531498
C_mixed = 2.216346002e-08 kg/m^3
  by: Gaussian plume trapped below an inversion lid (multiple reflections)  (image sources at z = +-H + 2 n Lm summed until the terms vanish)
  Q = 0.1 kg/s
  u = 4 m/s
  sigma_y = 900 m
  sigma_z = 600 m
  H = 80 m
  Lm = 500 m
  y = 0 m
  z = 0 m
  assumes: H, z <= Lm; sigma_z <= 10 Lm

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Gravity settling chamber collection efficiency1 fig.enveng_settling_chamber_efficiency

The Stokes settling velocity of a particle in a gas and the collection efficiency of a horizontal-flow settling chamber with N trays (laminar plug-flow model).

\eta = \frac{v_t L W N}{Q},\quad v_t = \frac{g(\rho_p – \rho_g)d_p^2}{18\mu}

You give

MeaningUnitExample
\text{dp}
Particle diameterm50 um
\rho_{p}
Particle densitykg/m^32000 kg/m^3
\rho_{g}
Gas densitykg/m^31.2 kg/m^3
\mu
Gas viscosityPa*s1.8e-05 Pa*s
L
Chamber lengthm5 m
W
Chamber widthm2 m
Q
Gas flow ratem^3/s10 m^3/s
N
Number of trays (1 for a single chamber)—1

You get

MeaningUnitExample
\text{vt}
Stokes terminal settling velocitym/s0.151246389 m/s
\eta
Collection efficiency (fraction, at most 1)—0.151246389
\text{Re}
Particle Reynolds number—0.5041546301

Values with a unit may be written in any unit of the right kind.

Applies when

  • Stokes regime Re < 1
  • laminar plug flow

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Settling chamber efficiency: dp = 50 um, rho_p = 2000 kg/m^3, rho_g = 1.2 kg/m^3, mu = 1.8e-05 Pa*s, L = 5 m, W = 2 m, Q = 10 m^3/s, N = 1
vt = 0.151246389 m/s
eta = 0.151246389
Re = 0.5041546301

Run it

Terminal
$ environmental-engineering solve enveng_settling_chamber_efficiency "dp=50 um" "rho_p=2000 kg/m^3" "rho_g=1.2 kg/m^3" "mu=1.8e-05 Pa*s" "L=5 m" "W=2 m" "Q=10 m^3/s" N=1
vt = 0.151246389 m/s
eta = 0.151246389
Re = 0.5041546301
  by: Gravity settling chamber collection efficiency  (vt = g (rho_p - rho_g) dp^2/(18 mu); eta = min(1, vt L W N/Q))
  dp = 5e-05 m
  rho_p = 2000 kg/m^3
  rho_g = 1.2 kg/m^3
  mu = 1.8e-05 Pa*s
  L = 5 m
  W = 2 m
  Q = 10 m^3/s
  assumes: Stokes regime Re < 1; laminar plug flow

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Ground-level centreline concentration of a plume1 fig.enveng_ground_centerline_concentration

The ground-level concentration directly below the plume axis (y = 0, z = 0) from the emission rate, wind speed, dispersion coefficients and effective stack height (H = 0 for a ground-level source).

C(x,0,0) = \frac{Q}{\pi u\sigma_y\sigma_z}\exp\!\left(-\frac{H^2}{2\sigma_z^2}\right)

You give

MeaningUnitExample
Q
Pollutant emission ratekg/s150 g/s
u
Mean wind speedm/s5 m/s
\sigma_{y}
Horizontal dispersion coefficientm80 m
\sigma_{z}
Vertical dispersion coefficientm40 m
H
Effective stack height (0 for a ground-level source)m60 m

You get

MeaningUnitExample
C
Ground-level centreline concentrationkg/m^39.688133431e-07 kg/m^3
C_{\mathrm{ugm3}}
Concentration in micrograms per cubic metre—968.8133431

Values with a unit may be written in any unit of the right kind.

Applies when

  • Q, u, sigma_y, sigma_z > 0
  • H >= 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Ground-level centreline concentration: Q = 150 g/s, u = 5 m/s, sigma_y = 80 m, sigma_z = 40 m, H = 60 m
C = 9.688133431e-07 kg/m^3
C_ugm3 = 968.8133431

Run it

Terminal
$ environmental-engineering solve enveng_ground_centerline_concentration "Q=150 g/s" "u=5 m/s" "sigma_y=80 m" "sigma_z=40 m" "H=60 m"
C = 9.688133431e-07 kg/m^3
C_ugm3 = 968.8133431
  by: Ground-level centreline concentration of a plume  (C = Q/(pi u sy sz) exp(-H^2/(2 sz^2)))
  Q = 0.15 kg/s
  u = 5 m/s
  sigma_y = 80 m
  sigma_z = 40 m
  H = 60 m
  assumes: Q, u, sigma_y, sigma_z > 0; H >= 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Holland plume rise1 fig.enveng_holland_plume_rise

Plume rise by Holland's formula (momentum term plus a buoyancy term with the pressure in millibars) and the effective stack height.

\Delta h = \frac{v_s d}{u}\left(1.5 + 2.68\times10^{-3}\,p\,d\,\frac{T_s – T_a}{T_s}\right)

You give

MeaningUnitExample
\text{vs}
Stack gas exit velocitym/s10 m/s
d
Stack inside diameterm2 m
u
Wind speed at the stack topm/s4 m/s
p
Atmospheric pressurePa101.325 kPa
\text{Ts}
Stack gas temperatureK400 K
\text{Ta}
Ambient air temperatureK290 K
\text{hs}
Physical stack heightm50 m

You get

MeaningUnitExample
\text{dh}
Plume risem14.9676525 m
H
Effective stack heightm64.9676525 m

Values with a unit may be written in any unit of the right kind.

Applies when

  • Ts > Ta

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Holland plume rise: vs = 10 m/s, d = 2 m, u = 4 m/s, p = 101.325 kPa, Ts = 400 K, Ta = 290 K, hs = 50 m
dh = 14.9676525 m
H = 64.9676525 m

Run it

Terminal
$ environmental-engineering solve enveng_holland_plume_rise "vs=10 m/s" "d=2 m" "u=4 m/s" "p=101.325 kPa" "Ts=400 K" "Ta=290 K" "hs=50 m"
dh = 14.9676525 m
H = 64.9676525 m
  by: Holland plume rise  (dh = vs d/u (1.5 + 2.68e-3 p[mbar] d (Ts - Ta)/Ts))
  vs = 10 m/s
  d = 2 m
  u = 4 m/s
  p = 101325 Pa
  Ts = 400 K
  Ta = 290 K
  hs = 50 m
  assumes: Ts > Ta

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Maximum ground-level concentration (constant sigma_y/sigma_z)1 fig.enveng_max_ground_concentration_ratio

The largest ground-level centreline concentration of an elevated source when sigma_y/sigma_z is taken constant along the plume, and the vertical spread at which it occurs (sigma_z = H/sqrt 2).

C_{max} = \frac{2Q}{\pi e\,u H^2}\frac{\sigma_z}{\sigma_y},\quad \sigma_z = \frac{H}{\sqrt 2}

You give

MeaningUnitExample
Q
Emission ratekg/s100 g/s
u
Mean wind speedm/s5 m/s
H
Effective stack heightm100 m
k
Ratio sigma_y/sigma_z (constant along the plume)—2

You get

MeaningUnitExample
C_{\mathrm{max}}
Maximum ground-level concentrationkg/m^32.341993261e-07 kg/m^3
C_{\mathrm{max},\mathrm{ugm3}}
Maximum concentration in micrograms per cubic metre—234.1993261
\sigma_{z,\mathrm{max}}
Vertical dispersion coefficient at the maximumm70.71067812 m

Values with a unit may be written in any unit of the right kind.

Applies when

  • Q, u, H, k > 0
  • sigma_y/sigma_z constant along the plume

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Maximum ground-level concentration with constant sigma ratio: Q = 100 g/s, u = 5 m/s, H = 100 m, k = 2
C_max = 2.341993261e-07 kg/m^3
C_max_ugm3 = 234.1993261
sigma_z_max = 70.71067812 m

Run it

Terminal
$ environmental-engineering solve enveng_max_ground_concentration_ratio "Q=100 g/s" "u=5 m/s" "H=100 m" k=2
C_max = 2.341993261e-07 kg/m^3
C_max_ugm3 = 234.1993261
sigma_z_max = 70.71067812 m
  by: Maximum ground-level concentration (constant sigma_y/sigma_z)  (maximise C = Q/(pi u k sz^2) exp(-H^2/2sz^2) over sz: sz = H/sqrt2, Cmax = 2Q/(pi e u H^2 k))
  Q = 0.1 kg/s
  u = 5 m/s
  H = 100 m
  k = 2
  assumes: Q, u, H, k > 0; sigma_y/sigma_z constant along the plume

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Maximum ground-level concentration and its distance (Briggs coefficients)1 fig.enveng_max_ground_concentration_briggs

The distance of the largest ground-level centreline concentration of an elevated source and that concentration, found exactly on Briggs' dispersion curves for the stability class (no constant-ratio shortcut).

\frac{d\ln C}{dx} = -\frac{\sigma_y'}{\sigma_y} + \frac{\sigma_z'}{\sigma_z}\left(\frac{H^2}{\sigma_z^2} – 1\right) = 0

You give

MeaningUnitExample
Q
Emission ratekg/s100 g/s
u
Mean wind speedm/s5 m/s
H
Effective stack heightm50 m
\text{cls}
Pasquill stability class A-F choice—c
\text{terrain}
Rural or urban dispersion coefficients choice—rural

You get

MeaningUnitExample
x_{\mathrm{max}}
Downwind distance of the maximumm459.3930757 m
C_{\mathrm{max}}
Maximum ground-level concentrationkg/m^31.333568186e-06 kg/m^3
C_{\mathrm{max},\mathrm{ugm3}}
Maximum concentration in micrograms per cubic metre—1333.568186
\sigma_{y}
sigma_y at the maximumm49.41102781 m
\sigma_{z}
sigma_z at the maximumm35.17120532 m

Values with a unit may be written in any unit of the right kind.

Applies when

  • the maximum lies between 100 m and 10 km

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Maximum ground-level concentration with Briggs coefficients: Q = 100 g/s, u = 5 m/s, H = 50 m, cls = c, terrain = rural
x_max = 459.3930757 m
C_max = 1.333568186e-06 kg/m^3
C_max_ugm3 = 1333.568186
sigma_y = 49.41102781 m
sigma_z = 35.17120532 m

Run it

Terminal
$ environmental-engineering solve enveng_max_ground_concentration_briggs "Q=100 g/s" "u=5 m/s" "H=50 m" cls=c terrain=rural
x_max = 459.3930757 m
C_max = 1.333568186e-06 kg/m^3
C_max_ugm3 = 1333.568186
sigma_y = 49.41102781 m
sigma_z = 35.17120532 m
  by: Maximum ground-level concentration and its distance (Briggs coefficients)  (root of d ln C/dx = -sy'/sy + (sz'/sz)(H^2/sz^2 - 1) by a log-spaced scan and bisection)
  Q = 0.1 kg/s
  u = 5 m/s
  H = 50 m
  cls = c
  terrain = rural
  assumes: the maximum lies between 100 m and 10 km

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Pasquill-Turner atmospheric stability class1 fig.enveng_stability_class

The Pasquill stability class (A very unstable to F stable) from the surface wind speed and the daytime insolation or night-time cloud cover.

\text{class} = T(u,\ \text{insolation or cloud cover})

You give

MeaningUnitExample
u
Surface wind speed at 10 mm/s2.5 m/s
\text{condition}
Daytime insolation (strong, moderate, slight), overcast (day or night), night_cloudy (at least 4/8 low cloud) or night_clear (at most 3/8 cloud) choice—strong

You get

MeaningUnitExample
\text{stability}
Pasquill stability class (A-F; A-B etc. for intermediate cases)—A-B

Values with a unit may be written in any unit of the right kind.

Applies when

  • u > 0
  • no class is defined at night with u below 2 m/s

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Pasquill stability class: u = 2.5 m/s, condition = strong
stability = A-B

Run it

Terminal
$ environmental-engineering solve enveng_stability_class "u=2.5 m/s" condition=strong
stability = A-B
  by: Pasquill-Turner atmospheric stability class  (Turner's table: wind-speed rows < 2, 2-3, 3-5, 5-6, > 6 m/s against insolation or cloud-cover columns; heavy overcast is D)
  u = 2.5 m/s
  condition = strong
  assumes: u > 0; no class is defined at night with u below 2 m/s

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Stack plume: effective height, dispersion and ground-level concentration1 fig.enveng_stack_plume_ground_concentration

The whole chain for a buoyant stack in neutral or unstable air: Briggs plume rise to the effective height, Briggs dispersion coefficients at the receptor distance, then the ground-level centreline concentration.

C = \frac{Q}{\pi u\sigma_y\sigma_z}\exp\!\left(-\frac{(h_s + \Delta h)^2}{2\sigma_z^2}\right)

You give

MeaningUnitExample
Q
Emission ratekg/s100 g/s
u
Wind speed at the stack topm/s6 m/s
\text{vs}
Stack gas exit velocitym/s10 m/s
d
Stack inside diameter at the exitm1.5 m
\text{Ts}
Stack gas temperatureK400 K
\text{Ta}
Ambient air temperatureK290 K
\text{hs}
Physical stack heightm50 m
x
Downwind distance of the receptorm3000 m
\text{cls}
Pasquill stability class A-D choice—c
\text{terrain}
Rural or urban dispersion coefficients choice—rural

You get

MeaningUnitExample
H
Effective stack heightm77.44719963 m
\sigma_{y}
sigma_y at xm289.4291464 m
\sigma_{z}
sigma_z at xm189.7366596 m
C
Ground-level centreline concentration at xkg/m^38.888445322e-08 kg/m^3
C_{\mathrm{ugm3}}
In micrograms per cubic metre—88.88445322

Values with a unit may be written in any unit of the right kind.

Applies when

  • Ts > Ta
  • class A-D
  • 100 m <= x <= 10 km

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Stack plume ground-level concentration: Q = 100 g/s, u = 6 m/s, vs = 10 m/s, d = 1.5 m, Ts = 400 K, Ta = 290 K, hs = 50 m, x = 3000 m, cls = c, terrain = rural
H = 77.44719963 m
sigma_y = 289.4291464 m
sigma_z = 189.7366596 m
C = 8.888445322e-08 kg/m^3
C_ugm3 = 88.88445322

Run it

Terminal
$ environmental-engineering solve enveng_stack_plume_ground_concentration "Q=100 g/s" "u=6 m/s" "vs=10 m/s" "d=1.5 m" "Ts=400 K" "Ta=290 K" "hs=50 m" "x=3000 m" cls=c terrain=rural
H = 77.44719963 m
sigma_y = 289.4291464 m
sigma_z = 189.7366596 m
C = 8.888445322e-08 kg/m^3
C_ugm3 = 88.88445322
  by: Stack plume: effective height, dispersion and ground-level concentration  (Briggs final rise (2/3 law) -> H; Briggs sigma_y, sigma_z at x; C = Q/(pi u sy sz) exp(-H^2/2sz^2))
  Q = 0.1 kg/s
  u = 6 m/s
  vs = 10 m/s
  d = 1.5 m
  Ts = 400 K
  Ta = 290 K
  hs = 50 m
  x = 3000 m
  cls = c
  terrain = rural
  assumes: Ts > Ta; class A-D; 100 m <= x <= 10 km

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Sulfur dioxide emission from fuel sulfur1 fig.enveng_so2_emission

The SO2 emission rate from a fuel burning rate and its sulfur mass fraction (all sulfur to SO2), before and after a control device.

E = \dot m_{fuel}\,S\,\frac{M_{SO_2}}{M_S}(1-\eta)

You give

MeaningUnitExample
m_{\mathrm{fuel}}
Fuel burning ratekg/s36 t/h
S
Sulfur mass fraction of the fuel (fraction or %)—0.02
\eta
SO2 control (removal) efficiency (fraction or %; 0 if uncontrolled)—0.9

You get

MeaningUnitExample
E
Controlled SO2 emission ratekg/s0.03995870887 kg/s
E_{\mathrm{uncontrolled}}
Uncontrolled SO2 emission ratekg/s0.3995870887 kg/s
E_{\mathrm{kg},\mathrm{per},\mathrm{day}}
Controlled emission in kg per day—3452.432447

Values with a unit may be written in any unit of the right kind.

Applies when

  • all fuel sulfur oxidised to SO2

Outside these conditions it says what is wrong instead of returning a number.

Worked example

SO2 emission from fuel sulfur: m_fuel = 36 t/h, S = 0.02, eta = 0.9
E = 0.03995870887 kg/s
E_uncontrolled = 0.3995870887 kg/s
E_kg_per_day = 3452.432447

Run it

Terminal
$ environmental-engineering solve enveng_so2_emission "m_fuel=36 t/h" S=0.02 eta=0.9
E = 0.03995870887 kg/s
E_uncontrolled = 0.3995870887 kg/s
E_kg_per_day = 3452.432447
  by: Sulfur dioxide emission from fuel sulfur  (E = m_fuel S (M_SO2/M_S)(1 - eta))
  m_fuel = 10 kg/s
  S = 0.02
  eta = 0.9
  assumes: all fuel sulfur oxidised to SO2

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Wind speed at height (power law)1 fig.enveng_wind_power_law

The wind speed at another height from a measured speed with the power-law profile u2 = u1 (z2/z1)^p (p from the stability class and terrain, e.g. 0.15 rural neutral).

u_2 = u_1\left(\frac{z_2}{z_1}\right)^p

You give

MeaningUnitExample
\text{u1}
Measured wind speedm/s4 m/s
\text{z1}
Measurement heightm10 m
\text{z2}
Height of interest (e.g. the stack top)m100 m
p
Power-law exponent (0 < p < 1)—0.15

You get

MeaningUnitExample
\text{u2}
Wind speed at z2m/s5.650150178 m/s

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0 < p < 1

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Wind speed at height: u1 = 4 m/s, z1 = 10 m, z2 = 100 m, p = 0.15
u2 = 5.650150178 m/s

Run it

Terminal
$ environmental-engineering solve enveng_wind_power_law "u1=4 m/s" "z1=10 m" "z2=100 m" p=0.15
u2 = 5.650150178 m/s
  by: Wind speed at height (power law)  (u2 = u1 (z2/z1)^p)
  u1 = 4 m/s
  z1 = 10 m
  z2 = 100 m
  p = 0.15
  assumes: 0 < p < 1

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Gas transfer 5

Dissolved concentration in equilibrium with a gas (Henry's law)1 fig.enveng_henry_law_equilibrium

The equilibrium molar (and, with the molar mass, mass) concentration of a gas dissolved in water from its partial pressure and the Henry's volatility constant.

C = \frac{p}{H}

You give

MeaningUnitExample
p
Partial pressure of the gasPa0.21 atm
H
Henry's volatility constantPa*m^3/mol0.79 atm*m^3/mol
M
Molar mass (for the mass concentration) optionalkg/mol31.9988 g/mol

You get

MeaningUnitExample
C
Dissolved molar concentrationmol/m^30.2658227848 mol/m^3
C_{\mathrm{mass}}
Dissolved mass concentrationkg/m^30.008506010127 kg/m^3
C_{\mathrm{mgL}}
In mg/L—8.506010127

Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.

Applies when

  • dilute solution, equilibrium

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Henry's law equilibrium: p = 0.21 atm, H = 0.79 atm*m^3/mol, M = 31.9988 g/mol
C = 0.2658227848 mol/m^3
C_mass = 0.008506010127 kg/m^3
C_mgL = 8.506010127

Run it

Terminal
$ environmental-engineering solve enveng_henry_law_equilibrium "p=0.21 atm" "H=0.79 atm*m^3/mol" "M=31.9988 g/mol"
C = 0.2658227848 mol/m^3
C_mass = 0.008506010127 kg/m^3
C_mgL = 8.506010127
  by: Dissolved concentration in equilibrium with a gas (Henry's law)  (C = p/H)
  p = 21278.25 Pa
  H = 80046.75 Pa*m^3/mol
  M = 0.0319988 kg/mol
  assumes: dilute solution, equilibrium

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Henry's law constant conversion between forms2 fig.enveng_henry_constant_conversion

A Henry's law constant converted between its common forms: volatility (Pa m³/mol, atm m³/mol), dimensionless gas/liquid ratio at temperature T, mole-fraction form (atm) and solubility forms (mol/(m³ Pa), mol/(L atm)).

H_{cc} = \frac{H_{pc}}{RT},\quad H_{px} = H_{pc}\,c_w,\quad H_{cp} = \frac{1}{H_{pc}}

You give

MeaningUnitExample
H
The Henry's constant value in the stated form—0.0055
\text{form}
Form of H: pa_m3_per_mol, atm_m3_per_mol, dimensionless (Cg/Cl), atm (p = H x), mol_per_m3_pa or m_per_atm (mol/(L atm)) choice—atm_m3_per_mol
T
Temperature (for the dimensionless form)K298.15 K

You get

MeaningUnitExample
H_{\mathrm{pa},\mathrm{m3},\mathrm{per},\mathrm{mol}}
Volatility constant, Pa m³/mol—557.2875
H_{\mathrm{atm},\mathrm{m3},\mathrm{per},\mathrm{mol}}
Volatility constant, atm m³/mol—0.0055
H_{\mathrm{dimensionless}}
Dimensionless gas/liquid ratio at T—0.2248072449
H_{\mathrm{atm}}
Mole-fraction form, atm—304.395245
H_{\mathrm{mol},\mathrm{per},\mathrm{m3},\mathrm{pa}}
Solubility constant, mol/(m³ Pa)—0.001794405939
H_{m,\mathrm{per},\mathrm{atm}}
Solubility constant, mol/(L atm)—0.1818181818

Values with a unit may be written in any unit of the right kind.

Applies when

  • dilute aqueous solution (water 55344.59 mol/m³)

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Henry's constant conversion: H = 0.0055, form = atm_m3_per_mol, T = 298.15 K
H_pa_m3_per_mol = 557.2875
H_atm_m3_per_mol = 0.0055
H_dimensionless = 0.2248072449
H_atm = 304.395245
H_mol_per_m3_pa = 0.001794405939
H_m_per_atm = 0.1818181818

Run it

Terminal
$ environmental-engineering solve enveng_henry_constant_conversion H=0.0055 form=atm_m3_per_mol "T=298.15 K"
H_pa_m3_per_mol = 557.2875
H_atm_m3_per_mol = 0.0055
H_dimensionless = 0.2248072449
H_atm = 304.395245
H_mol_per_m3_pa = 0.001794405939
H_m_per_atm = 0.1818181818
  by: Henry's law constant conversion between forms  (all forms through the volatility constant Hpc: Hcc = Hpc/(R T), Hpx = Hpc rho_w, Hcp = 1/Hpc)
  H = 0.0055
  T = 298.15 K
  form = atm_m3_per_mol
  assumes: dilute aqueous solution (water 55344.59 mol/m^3)

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Overall liquid-phase transfer coefficient and flux (two-film theory)1 fig.enveng_two_film_transfer

The overall liquid-side mass-transfer coefficient from the liquid- and gas-film coefficients and the dimensionless Henry's constant, the share of resistance in the liquid film, and the flux from water to air (negative when the gas dissolves).

\frac{1}{K_L} = \frac{1}{k_l} + \frac{1}{Hk_g},\quad N = K_L\left(C – \frac{C_g}{H}\right)

You give

MeaningUnitExample
\text{kl}
Liquid-film coefficientm/s2e-05 m/s
\text{kg}
Gas-film coefficientm/s0.005 m/s
H
Dimensionless Henry's constant (Cg/Cl)—0.2
C
Bulk liquid concentrationkg/m^31 mg/L
\text{Cg}
Bulk gas concentrationkg/m^30 ug/m^3

You get

MeaningUnitExample
\text{KL}
Overall liquid-phase coefficientm/s1.960784314e-05 m/s
\text{flux}
Flux from liquid to gaskg/(m^2*s)1.960784314e-08 kg/(m^2*s)
\text{liquid\_resistance\_fraction}
Fraction of the resistance in the liquid film—0.9803921569

Values with a unit may be written in any unit of the right kind.

Applies when

  • linear equilibrium

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Two-film mass transfer: kl = 2e-05 m/s, kg = 0.005 m/s, H = 0.2, C = 1 mg/L, Cg = 0 ug/m^3
KL = 1.960784314e-05 m/s
flux = 1.960784314e-08 kg/(m^2*s)
liquid_resistance_fraction = 0.9803921569

Run it

Terminal
$ environmental-engineering solve enveng_two_film_transfer "kl=2e-05 m/s" "kg=0.005 m/s" H=0.2 "C=1 mg/L" "Cg=0 ug/m^3"
KL = 1.960784314e-05 m/s
flux = 1.960784314e-08 kg/(m^2*s)
liquid_resistance_fraction = 0.9803921569
  by: Overall liquid-phase transfer coefficient and flux (two-film theory)  (1/KL = 1/kl + 1/(H kg); flux = KL (C - Cg/H))
  kl = 2e-05 m/s
  kg = 0.005 m/s
  H = 0.2
  C = 0.001 kg/m^3
  Cg = 0 kg/m^3
  assumes: linear equilibrium

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Packed-tower air stripping: stripping factor, transfer units and height2 fig.enveng_air_stripping_tower

The stripping factor, number of transfer units, packed height and minimum air-to-water ratio of a countercurrent packed tower stripping a volatile compound with clean air.

NTU = \frac{R}{R-1}\ln\!\left[\frac{(C_{in}/C_{out})(R-1) + 1}{R}\right],\quad Z = HTU\cdot NTU

You give

MeaningUnitExample
\text{Qw}
Water flowm^3/s0.05 m^3/s
\text{Qa}
Air flowm^3/s1.5 m^3/s
H
Dimensionless Henry's constant (Cg/Cl)—0.2
\text{Cin}
Influent concentrationkg/m^3200 ug/L
\text{Cout}
Required effluent concentrationkg/m^35 ug/L
\text{HTU}
Height of a transfer unitm1 m

You get

MeaningUnitExample
R
Stripping factor H Qa/Qw—6
\text{NTU}
Number of transfer units—4.213854527
Z
Packed height HTU NTUm4.213854527 m
\text{air\_to\_water\_min}
Minimum air-to-water ratio (Cin – Cout)/(H Cin)—4.875

Values with a unit may be written in any unit of the right kind.

Applies when

  • Qa/Qw above the minimum
  • clean inlet air
  • dilute, linear equilibrium

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Air stripping tower: Qw = 0.05 m^3/s, Qa = 1.5 m^3/s, H = 0.2, Cin = 200 ug/L, Cout = 5 ug/L, HTU = 1 m
R = 6
NTU = 4.213854527
Z = 4.213854527 m
air_to_water_min = 4.875

Run it

Terminal
$ environmental-engineering solve enveng_air_stripping_tower "Qw=0.05 m^3/s" "Qa=1.5 m^3/s" H=0.2 "Cin=200 ug/L" "Cout=5 ug/L" "HTU=1 m"
R = 6
NTU = 4.213854527
Z = 4.213854527 m
air_to_water_min = 4.875
  by: Packed-tower air stripping: stripping factor, transfer units and height  (R = H Qa/Qw; NTU = R/(R - 1) ln[((Cin/Cout)(R - 1) + 1)/R] (Cin/Cout - 1 when R = 1); Z = HTU NTU)
  Qw = 0.05 m^3/s
  Qa = 1.5 m^3/s
  H = 0.2
  Cin = 0.0002 kg/m^3
  Cout = 5e-06 kg/m^3
  HTU = 1 m
  assumes: Qa/Qw above the minimum; clean inlet air; dilute, linear equilibrium

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Temperature dependence of Henry's constant (van 't Hoff)1 fig.enveng_henry_temperature_dependence

The Henry's solubility constant at a temperature T from its value at a reference temperature and the van 't Hoff coefficient B = -d ln Hcp / d(1/T) (the form tabulated in solubility compilations).

H^{cp}(T) = H^{cp}(T_{ref})\exp\!\left[B\left(\frac1T – \frac{1}{T_{ref}}\right)\right]

You give

MeaningUnitExample
\text{Hcp}
Henry's solubility constant at Trefmol/(m^3*Pa)1.3e-05 mol/(m^3*Pa)
B
Temperature coefficient d ln Hcp/d(1/T), in K—1500
T
Temperature of interestK283.15 K
\text{Tref}
Reference temperature (usually 298.15 K)K298.15 K

You get

MeaningUnitExample
\text{Hcp\_T}
Solubility constant at Tmol/(m^3*Pa)1.697039196e-05 mol/(m^3*Pa)
\text{Hpc\_T}
Volatility constant 1/Hcp at TPa*m^3/mol58926.15813 Pa*m^3/mol

Values with a unit may be written in any unit of the right kind.

Applies when

  • constant enthalpy of solution over the range

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Henry's constant temperature dependence: Hcp = 1.3e-05 mol/(m^3*Pa), B = 1500 K, T = 283.15 K, Tref = 298.15 K
Hcp_T = 1.697039196e-05 mol/(m^3*Pa)
Hpc_T = 58926.15813 Pa*m^3/mol

Run it

Terminal
$ environmental-engineering solve enveng_henry_temperature_dependence "Hcp=1.3e-05 mol/(m^3*Pa)" B=1500 "T=283.15 K" "Tref=298.15 K"
Hcp_T = 1.697039196e-05 mol/(m^3*Pa)
Hpc_T = 58926.15813 Pa*m^3/mol
  by: Temperature dependence of Henry's constant (van 't Hoff)  (Hcp(T) = Hcp(Tref) exp(B (1/T - 1/Tref)))
  Hcp = 1.3e-05 mol/(m^3*Pa)
  B = 1500
  T = 283.15 K
  Tref = 298.15 K
  assumes: constant enthalpy of solution over the range

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Noise 7

Adding sound levels in decibels1 fig.enveng_decibel_addition

The combined sound pressure level of several incoherent sources, added on an energy basis.

L = 10\log_{10}\sum_i 10^{L_i/10}

You give

MeaningUnitExample
L
Sound levels in dB vector—[85, 85]

You get

MeaningUnitExample
L_{\mathrm{total}}
Combined level, dB—88.01029996

Applies when

  • incoherent sources

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Add sound levels: L = [85, 85]
L_total = 88.01029996

Run it

Terminal
$ environmental-engineering solve enveng_decibel_addition "L=[85, 85]"
L_total = 88.01029996
  by: Adding sound levels in decibels  (L = 10 log10(sum 10^(Li/10)))
  assumes: incoherent sources

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Day-night (Ldn) and day-evening-night (Lden) sound levels1 fig.enveng_day_night_level

The day-night average level (10 dB night penalty, 22:00-07:00) or the day-evening-night level (5 dB evening 19:00-23:00, 10 dB night 23:00-07:00) from 24 hourly equivalent levels.

L_{dn} = 10\log_{10}\frac{1}{24}\left(\sum_{day}10^{L_h/10} + \sum_{night}10^{(L_h+10)/10}\right)

You give

MeaningUnitExample
L
24 hourly Leq values in dB, the first for 00:00-01:00 vector—[50, 50, 50, 50, 50, 50, 50, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 60, 60, 60, 55, 55]
\text{metric}
Ldn or lden choice—ldn

You get

MeaningUnitExample
L
Ldn or Lden, dB—63.54363682

Applies when

  • exactly 24 hourly levels

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Day-night sound level: L = [50, 50, 50, 50, 50, 50, 50, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 60, 60, 60, 55, 55], metric = ldn
L = 63.54363682

Run it

Terminal
$ environmental-engineering solve enveng_day_night_level "L=[50, 50, 50, 50, 50, 50, 50, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 60, 60, 60, 55, 55]" metric=ldn
L = 63.54363682
  by: Day-night (Ldn) and day-evening-night (Lden) sound levels  (L = 10 log10((1/24) sum 10^((L_h + penalty_h)/10)))
  metric = ldn
  assumes: exactly 24 hourly levels

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Equivalent continuous sound level Leq1 fig.enveng_equivalent_sound_level

The equivalent continuous sound level of a period made of intervals at different levels (energy average weighted by duration).

L_{eq} = 10\log_{10}\frac{\sum_i t_i10^{L_i/10}}{\sum_i t_i}

You give

MeaningUnitExample
L
Levels of the intervals in dB vector—[70, 85, 60]
t
Durations of the intervals (any one unit) vector—[4, 1, 3]

You get

MeaningUnitExample
\text{Leq}
Equivalent continuous level, dB—76.52279911

Applies when

  • one duration per level

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Equivalent sound level: L = [70, 85, 60], t = [4, 1, 3]
Leq = 76.52279911

Run it

Terminal
$ environmental-engineering solve enveng_equivalent_sound_level "L=[70, 85, 60]" "t=[4, 1, 3]"
Leq = 76.52279911
  by: Equivalent continuous sound level Leq  (Leq = 10 log10(sum t_i 10^(L_i/10)/sum t_i))
  assumes: one duration per level

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Occupational noise dose and 8-hour TWA (OSHA, 5 dB exchange)1 fig.enveng_occupational_noise_dose

The daily noise dose (per cent of the permissible exposure) and the 8-hour time-weighted average from levels and exposure times, with the 90 dBA criterion, 5 dB exchange rate and 80 dBA threshold.

D = 100\sum_i\frac{C_i}{T_i},\ T_i = \frac{8}{2^{(L_i-90)/5}},\ TWA = 16.61\log_{10}\frac{D}{100} + 90

You give

MeaningUnitExample
L
A-weighted levels in dBA vector—[90, 95, 85]
\text{hours}
Exposure time at each level in hours vector—[4, 2, 2]

You get

MeaningUnitExample
\text{dose\_percent}
Noise dose, per cent—112.5
\text{TWA}
8-hour time-weighted average, dBA—90.8496434

Applies when

  • levels below 80 dBA excluded

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Occupational noise dose: L = [90, 95, 85], hours = [4, 2, 2]
dose_percent = 112.5
TWA = 90.8496434

Run it

Terminal
$ environmental-engineering solve enveng_occupational_noise_dose "L=[90, 95, 85]" "hours=[4, 2, 2]"
dose_percent = 112.5
TWA = 90.8496434
  by: Occupational noise dose and 8-hour TWA (OSHA, 5 dB exchange)  (T = 8/2^((L - 90)/5); D = 100 sum C/T; TWA = 16.61 log10(D/100) + 90)
  assumes: levels below 80 dBA excluded

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Sound level at another distance (point or line source)1 fig.enveng_noise_distance_attenuation

The sound level at a second distance from a point source (6 dB per doubling) or a line source such as a busy road (3 dB per doubling), free field.

L_2 = L_1 – 20\log_{10}\frac{r_2}{r_1}\ \text{(point)}

You give

MeaningUnitExample
\text{L1}
Level at distance r1, dB—90
\text{r1}
First distancem10 m
\text{r2}
Second distancem80 m
\text{source}
Point or line source choice—point

You get

MeaningUnitExample
\text{L2}
Level at distance r2, dB—71.93820026

Values with a unit may be written in any unit of the right kind.

Applies when

  • free field, no absorption

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Noise distance attenuation: L1 = 90 dB, r1 = 10 m, r2 = 80 m, source = point
L2 = 71.93820026

Run it

Terminal
$ environmental-engineering solve enveng_noise_distance_attenuation L1=90 "r1=10 m" "r2=80 m" source=point
L2 = 71.93820026
  by: Sound level at another distance (point or line source)  (L2 = L1 - 20 log10(r2/r1) (point), L1 - 10 log10(r2/r1) (line))
  L1 = 90
  r1 = 10 m
  r2 = 80 m
  source = point
  assumes: free field, no absorption

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Sound pressure level from sound power level1 fig.enveng_sound_power_to_pressure

The sound pressure level at a distance from a source of given sound power level and directivity factor (1 free field, 2 on a hard floor, 4 at a wall-floor edge, 8 in a corner).

L_p = L_W + 10\log_{10}\frac{Q}{4\pi r^2}

You give

MeaningUnitExample
\text{Lw}
Sound power level, dB re 1 pW—110
r
Distance from the sourcem20 m
\text{Qd}
Directivity factor (1, 2, 4 or 8)—2

You get

MeaningUnitExample
\text{Lp}
Sound pressure level, dB—75.9976014

Values with a unit may be written in any unit of the right kind.

Applies when

  • far field, no absorption
  • rho c taken as 400 rayl (Lp = LI)

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Sound power to pressure level: Lw = 110 dB, r = 20 m, Qd = 2
Lp = 75.9976014

Run it

Terminal
$ environmental-engineering solve enveng_sound_power_to_pressure Lw=110 "r=20 m" Qd=2
Lp = 75.9976014
  by: Sound pressure level from sound power level  (Lp = Lw + 10 log10(Q/(4 pi r^2)))
  Lw = 110
  r = 20 m
  Qd = 2
  assumes: far field, no absorption; rho c taken as 400 rayl (Lp = LI)

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Source level after removing background noise1 fig.enveng_background_noise_correction

The sound level of a source alone from the total measured level and the background level (energy subtraction).

L_s = 10\log_{10}\left(10^{L_t/10} – 10^{L_b/10}\right)

You give

MeaningUnitExample
\text{Lt}
Total measured level, dB—85
\text{Lb}
Background level, dB—80

You get

MeaningUnitExample
L_{\mathrm{source}}
Level of the source alone, dB—83.34911461

Applies when

  • Lt > Lb

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Background noise correction: Lt = 85 dB, Lb = 80 dB
L_source = 83.34911461

Run it

Terminal
$ environmental-engineering solve enveng_background_noise_correction Lt=85 Lb=80
L_source = 83.34911461
  by: Source level after removing background noise  (Ls = 10 log10(10^(Lt/10) - 10^(Lb/10)))
  Lt = 85
  Lb = 80
  assumes: Lt > Lb

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Solid waste 5

Heating value of waste from its elemental composition (modified Dulong)1 fig.enveng_dulong_heating_value

The higher heating value of a waste or fuel from its dry mass fractions of carbon, hydrogen, oxygen, sulfur and nitrogen by the modified Dulong formula.

HHV = 337C + 1419\left(H – \frac O8\right) + 93S + 23N\ \ [\mathrm{kJ/kg},\ \%]

You give

MeaningUnitExample
C
Carbon mass fraction (fraction or %)—0.48
H
Hydrogen mass fraction—0.064
O
Oxygen mass fraction—0.376
S
Sulfur mass fraction—0.004
N
Nitrogen mass fraction—0.008

You get

MeaningUnitExample
\text{HHV}
Higher heating valueJ/kg18643900 J/kg
\text{HHV\_kJ\_per\_kg}
In kJ/kg—18643.9
\text{HHV\_MJ\_per\_kg}
In MJ/kg—18.6439

Applies when

  • fractions on the same (dry) basis, sum at most 1

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Dulong heating value: C = 0.48, H = 0.064, O = 0.376, S = 0.004, N = 0.008
HHV = 18643900 J/kg
HHV_kJ_per_kg = 18643.9
HHV_MJ_per_kg = 18.6439

Run it

Terminal
$ environmental-engineering solve enveng_dulong_heating_value C=0.48 H=0.064 O=0.376 S=0.004 N=0.008
HHV = 18643900 J/kg
HHV_kJ_per_kg = 18643.9
HHV_MJ_per_kg = 18.6439
  by: Heating value of waste from its elemental composition (modified Dulong)  (HHV (kJ/kg) = 337 C + 1419 (H - O/8) + 93 S + 23 N, mass per cent)
  C = 0.48
  H = 0.064
  O = 0.376
  S = 0.004
  N = 0.008
  assumes: fractions on the same (dry) basis, sum at most 1

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Landfill life with daily cover and waste growth1 fig.enveng_landfill_life

The landfill volume used in the first year (waste at its in-place density plus cover soil) and the life of a landfill of given capacity when the waste grows at a constant yearly rate.

n = \frac{\ln\left(1 + \frac{C g}{V_0}\right)}{\ln(1+g)},\quad V_0 = \frac{M(1 + c)}{\rho}

You give

MeaningUnitExample
\text{capacity}
Available landfill volumem^32000000 m^3
M
Waste delivered in the first yearkg/s50000 t/yr
\rho
In-place (compacted) waste densitykg/m^3600 kg/m^3
\text{cover}
Cover soil volume per volume of waste (e.g. 0.25)—0.25
g
Yearly growth of the waste quantity (fraction or %; 0 for none)—0

You get

MeaningUnitExample
V_{\mathrm{first},\mathrm{year}}
Volume used in the first year, m³—104166.6667
\text{life\_years}
Landfill life, years—19.2

Values with a unit may be written in any unit of the right kind.

Applies when

  • growth compounded yearly, life read continuously

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Landfill life: capacity = 2000000 m^3, M = 50000 t/yr, rho = 600 kg/m^3, cover = 0.25, g = 0
V_first_year = 104166.6667
life_years = 19.2

Run it

Terminal
$ environmental-engineering solve enveng_landfill_life "capacity=2000000 m^3" "M=50000 t/yr" "rho=600 kg/m^3" cover=0.25 g=0
V_first_year = 104166.6667
life_years = 19.2
  by: Landfill life with daily cover and waste growth  (V0 = M (1 + cover)/rho per year; capacity = V0 ((1 + g)^n - 1)/g, so n = ln(1 + capacity g/V0)/ln(1 + g))
  capacity = 2000000 m^3
  M = 1.584404391 kg/s
  rho = 600 kg/m^3
  cover = 0.25
  g = 0
  assumes: growth compounded yearly, life read continuously

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Landfill methane generation (first-order decay, constant acceptance)1 fig.enveng_landfill_gas_generation

The methane generation rate and the cumulative methane of a landfill receiving waste at a constant rate for its operating life, each deposit decaying at first order (LandGEM-type model in continuous form), and the landfill gas flow at 50 % methane.

Q(t) = \int_0^{\min(t,t_c)} kL_0M\,e^{-k(t-\tau)}d\tau = ML_0\left(e^{-k(t-\min(t,t_c))} – e^{-kt}\right)

You give

MeaningUnitExample
M
Waste acceptance ratekg/s100000 t/yr
\text{L0}
Methane generation potentialm^3/kg100 m^3/t
k
Methane generation rate constant1/s0.05 1/yr
\text{tc}
Operating (filling) periods20 yr
t
Time since openings25 yr

You get

MeaningUnitExample
Q_{\mathrm{CH4}}
Methane generation rate at tm^3/s0.1559991844 m^3/s
Q_{\mathrm{CH4},\mathrm{m3},\mathrm{per},\mathrm{year}}
In m³ per year—4922959.862
V_{\mathrm{CH4}}
Cumulative methane generated up to tm^3101540802.8 m^3
Q_{\mathrm{LFG}}
Landfill gas rate at 50 % methanem^3/s0.3119983688 m^3/s

Values with a unit may be written in any unit of the right kind.

Applies when

  • constant acceptance from opening to tc
  • first-order decay of every deposit

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Landfill gas generation: M = 100000 t/yr, L0 = 100 m^3/t, k = 0.05 1/yr, tc = 20 yr, t = 25 yr
Q_CH4 = 0.1559991844 m^3/s
Q_CH4_m3_per_year = 4922959.862
V_CH4 = 101540802.8 m^3
Q_LFG = 0.3119983688 m^3/s

Run it

Terminal
$ environmental-engineering solve enveng_landfill_gas_generation "M=100000 t/yr" "L0=100 m^3/t" "k=0.05 1/yr" "tc=20 yr" "t=25 yr"
Q_CH4 = 0.1559991844 m^3/s
Q_CH4_m3_per_year = 4922959.862
V_CH4 = 101540802.8 m^3
Q_LFG = 0.3119983688 m^3/s
  by: Landfill methane generation (first-order decay, constant acceptance)  (Q(t) = M L0 (e^(-k (t - min(t, tc))) - e^(-k t)); cumulative volume by integrating Q)
  M = 3.168808781 kg/s
  L0 = 0.1 m^3/kg
  k = 1.584404391e-09 1/s
  tc = 631152000 s
  t = 788940000 s
  assumes: constant acceptance from opening to tc; first-order decay of every deposit

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Moisture content of mixed solid waste1 fig.enveng_waste_moisture_content

The moisture content (wet and dry basis) and the dry mass of a waste mixture from the masses of its components and their moisture fractions.

M_{wet} = \frac{\sum m_iw_i}{\sum m_i}

You give

MeaningUnitExample
m
Wet masses of the components (any one unit) vector—[40, 25, 15, 20]
w
Moisture fractions of the components, wet basis vector—[0.7, 0.06, 0.02, 0.2]

You get

MeaningUnitExample
\text{moisture\_wet}
Moisture content, wet basis—0.338
\text{dry\_mass}
Dry mass, in the unit of m—66.2
\text{moisture\_dry}
Moisture content, dry basis—0.5105740181

Applies when

  • moisture fractions below 1

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Waste moisture content: m = [40, 25, 15, 20], w = [0.7, 0.06, 0.02, 0.2]
moisture_wet = 0.338
dry_mass = 66.2
moisture_dry = 0.5105740181

Run it

Terminal
$ environmental-engineering solve enveng_waste_moisture_content "m=[40, 25, 15, 20]" "w=[0.7, 0.06, 0.02, 0.2]"
moisture_wet = 0.338
dry_mass = 66.2
moisture_dry = 0.5105740181
  by: Moisture content of mixed solid waste  (water = sum m_i w_i; M_wet = water/sum m; M_dry = water/(sum m - water))
  assumes: moisture fractions below 1

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Municipal solid waste generation and collection trucks1 fig.enveng_solid_waste_generation

The daily and yearly mass of municipal solid waste of a population, its compacted volume and the number of truck loads per day.

\dot m = P\,r,\quad n = \left\lceil\frac{\dot m}{\rho V_t}\right\rceil

You give

MeaningUnitExample
\text{pop}
Population served—50000
\text{rate}
Generation rate in kg per person per day—1.5
\rho
Compacted density in the truckkg/m^3400 kg/m^3
\text{Vt}
Truck body volumem^315 m^3

You get

MeaningUnitExample
m
Waste generationkg/s0.8680555556 kg/s
m_{\mathrm{kg},\mathrm{per},\mathrm{day}}
In kg/d—75000
m_{t,\mathrm{per},\mathrm{year}}
In t per 365-day year—27375
V_{\mathrm{m3},\mathrm{per},\mathrm{day}}
Compacted volume per day, m³—187.5
\text{trucks\_per\_day}
Truck loads per day (rounded up)—13

Values with a unit may be written in any unit of the right kind.

Applies when

  • full truck loads at the stated density

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Solid waste generation: pop = 50000, rate = 1.5 kg/cap/d, rho = 400 kg/m^3, Vt = 15 m^3
m = 0.8680555556 kg/s
m_kg_per_day = 75000
m_t_per_year = 27375
V_m3_per_day = 187.5
trucks_per_day = 13

Run it

Terminal
$ environmental-engineering solve enveng_solid_waste_generation pop=50000 rate=1.5 "rho=400 kg/m^3" "Vt=15 m^3"
m = 0.8680555556 kg/s
m_kg_per_day = 75000
m_t_per_year = 27375
V_m3_per_day = 187.5
trucks_per_day = 13
  by: Municipal solid waste generation and collection trucks  (m = P r; V = m/rho; trucks = ceil(V/Vt))
  rate = 1.5
  rho = 400 kg/m^3
  Vt = 15 m^3
  assumes: full truck loads at the stated density

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Wastewater 18

Activated sludge (complete mix) effluent substrate and biomass (Lawrence-McCarty)2 fig.enveng_activated_sludge_cstr_design

The effluent soluble substrate, the mixed-liquor biomass and the observed yield of a complete-mix activated-sludge reactor with recycle, from the kinetic coefficients, the SRT and HRT and the influent substrate.

S = \frac{K_s(1 + k_d\theta_c)}{\theta_c(Yk – k_d) – 1},\quad X = \frac{\theta_c Y(S_0 – S)}{\theta(1 + k_d\theta_c)}

You give

MeaningUnitExample
Y
True yield coefficient, kg VSS per kg BOD—0.5
k
Maximum specific substrate utilisation rate1/s5 1/day
\text{Ks}
Half-saturation constantkg/m^360 mg/L
\text{kd}
Endogenous decay coefficient1/s0.06 1/day
\text{SRT}
Solids retention times10 day
\text{HRT}
Hydraulic retention times6 h
\text{S0}
Influent substrate (BOD)kg/m^3250 mg/L

You get

MeaningUnitExample
S
Effluent soluble substratekg/m^30.004102564103 kg/m^3
S_{\mathrm{mgL}}
In mg/L—4.102564103
X
Biomass concentration in the reactorkg/m^33.073717949 kg/m^3
X_{\mathrm{mgL}}
In mg/L—3073.717949
Y_{\mathrm{obs}}
Observed yield Y/(1 + kd SRT)—0.3125

Values with a unit may be written in any unit of the right kind.

Applies when

  • steady state, complete mix
  • SRT above the washout limit
  • S < S0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Activated sludge complete-mix design: Y = 0.5, k = 5 1/d, Ks = 60 mg/L, kd = 0.06 1/d, SRT = 10 d, HRT = 6 h, S0 = 250 mg/L
S = 0.004102564103 kg/m^3
S_mgL = 4.102564103
X = 3.073717949 kg/m^3
X_mgL = 3073.717949
Y_obs = 0.3125

Run it

Terminal
$ environmental-engineering solve enveng_activated_sludge_cstr_design Y=0.5 "k=5 1/day" "Ks=60 mg/L" "kd=0.06 1/day" "SRT=10 day" "HRT=6 h" "S0=250 mg/L"
S = 0.004102564103 kg/m^3
S_mgL = 4.102564103
X = 3.073717949 kg/m^3
X_mgL = 3073.717949
Y_obs = 0.3125
  by: Activated sludge (complete mix) effluent substrate and biomass (Lawrence-McCarty)  (S = Ks (1 + kd SRT)/(SRT (Y k - kd) - 1); X = (SRT/HRT) Y (S0 - S)/(1 + kd SRT))
  Y = 0.5
  k = 5.787037037e-05 1/s
  Ks = 0.06 kg/m^3
  kd = 6.944444444e-07 1/s
  SRT = 864000 s
  HRT = 21600 s
  S0 = 0.25 kg/m^3
  assumes: steady state, complete mix; SRT above the washout limit; S < S0

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Dissolved oxygen during aeration and the transfer rate1 fig.enveng_aeration_do_curve

The dissolved oxygen after an aeration time from the starting DO, the saturation DO and KLa, and the oxygen transfer rate KLa (Cs – C) at that moment.

C = C_s – (C_s – C_0)e^{-K_La\,t}

You give

MeaningUnitExample
\text{Cs}
Saturation DOkg/m^39.1 mg/L
\text{C0}
Starting DOkg/m^31 mg/L
\text{KLa}
Volumetric transfer coefficient1/s10 1/h
t
Aeration times10 min

You get

MeaningUnitExample
C
DO at tkg/m^30.007570107617 kg/m^3
C_{\mathrm{mgL}}
In mg/L—7.570107617
\text{OTR}
Oxygen transfer rate at tkg/(m^3*s)4.249701064e-06 kg/(m^3*s)
\text{OTR\_mg\_per\_L\_h}
Transfer rate in mg/(L h)—15.29892383

Values with a unit may be written in any unit of the right kind.

Applies when

  • C0 <= Cs
  • no oxygen uptake

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Aeration DO curve: Cs = 9.1 mg/L, C0 = 1 mg/L, KLa = 10 1/h, t = 10 min
C = 0.007570107617 kg/m^3
C_mgL = 7.570107617
OTR = 4.249701064e-06 kg/(m^3*s)
OTR_mg_per_L_h = 15.29892383

Run it

Terminal
$ environmental-engineering solve enveng_aeration_do_curve "Cs=9.1 mg/L" "C0=1 mg/L" "KLa=10 1/h" "t=10 min"
C = 0.007570107617 kg/m^3
C_mgL = 7.570107617
OTR = 4.249701064e-06 kg/(m^3*s)
OTR_mg_per_L_h = 15.29892383
  by: Dissolved oxygen during aeration and the transfer rate  (dC/dt = KLa (Cs - C), C = Cs - (Cs - C0) e^(-KLa t))
  Cs = 0.0091 kg/m^3
  C0 = 0.001 kg/m^3
  KLa = 0.002777777778 1/s
  t = 600 s
  assumes: C0 <= Cs; no oxygen uptake

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Field (actual) oxygen transfer rate of an aeration system1 fig.enveng_field_oxygen_transfer

The actual oxygen transfer rate in the process from the standard (clean water, 20 degC, zero DO) rate, corrected by alpha, beta, the temperature coefficient, the site saturation and the operating DO.

AOTR = SOTR\,\alpha\,\theta^{T-20}\,\frac{\beta C_{s,T}F – C_L}{C_{s,20}}

You give

MeaningUnitExample
\text{SOTR}
Standard oxygen transfer ratekg/s100 kg/h
\alpha
alpha factor (process/clean water KLa)—0.6
\beta
beta factor (process/clean water saturation)—0.95
\theta
Temperature coefficient (1.024)—1.024
\text{CsT}
Clean-water saturation DO at the process temperaturekg/m^38.26 mg/L
\text{Cs20}
Clean-water saturation DO at 20 degCkg/m^39.09 mg/L
\text{CL}
Operating DOkg/m^32 mg/L
T
Process temperatureK25 degC
\text{Fp}
Pressure (elevation) correction of saturation optional—

You get

MeaningUnitExample
\text{AOTR}
Actual oxygen transfer ratekg/s0.01207029108 kg/s
\text{AOTR\_kg\_per\_h}
In kg O2/h—43.45304789
\text{ratio}
AOTR/SOTR—0.4345304789

Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.

Applies when

  • beta CsT Fp > CL

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Field oxygen transfer rate: SOTR = 100 kg/h, alpha = 0.6, beta = 0.95, theta = 1.024, CsT = 8.26 mg/L, Cs20 = 9.09 mg/L, CL = 2 mg/L, T = 25 degC
AOTR = 0.01207029108 kg/s
AOTR_kg_per_h = 43.45304789
ratio = 0.4345304789

Run it

Terminal
$ environmental-engineering solve enveng_field_oxygen_transfer "SOTR=100 kg/h" alpha=0.6 beta=0.95 theta=1.024 "CsT=8.26 mg/L" "Cs20=9.09 mg/L" "CL=2 mg/L" "T=25 degC"
AOTR = 0.01207029108 kg/s
AOTR_kg_per_h = 43.45304789
ratio = 0.4345304789
  by: Field (actual) oxygen transfer rate of an aeration system  (AOTR = SOTR alpha theta^(T - 20) (beta CsT Fp - CL)/Cs20)
  SOTR = 0.02777777778 kg/s
  alpha = 0.6
  beta = 0.95
  theta = 1.024
  CsT = 0.00826 kg/m^3
  Cs20 = 0.00909 kg/m^3
  CL = 0.002 kg/m^3
  T = 298.15 K
  assumes: beta CsT Fp > CL

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Food-to-microorganism ratio (F/M)1 fig.enveng_food_to_microorganism_ratio

The food-to-microorganism ratio of an aeration tank from the flow, influent BOD, tank volume and mixed-liquor volatile suspended solids.

\frac FM = \frac{QS_0}{VX}

You give

MeaningUnitExample
Q
Influent flowm^3/s10000 m^3/day
\text{S0}
Influent BOD (or COD)kg/m^3200 mg/L
V
Aeration tank volumem^33000 m^3
X
Mixed liquor volatile suspended solids (MLVSS)kg/m^32500 mg/L

You get

MeaningUnitExample
\text{FM}
F/M ratio1/s3.086419753e-06 1/s
\text{FM\_per\_day}
F/M in kg BOD/(kg MLVSS d)—0.2666666667

Values with a unit may be written in any unit of the right kind.

Applies when

  • Q, S0, V, X > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Food-to-microorganism ratio: Q = 10000 m^3/d, S0 = 200 mg/L, V = 3000 m^3, X = 2500 mg/L
FM = 3.086419753e-06 1/s
FM_per_day = 0.2666666667

Run it

Terminal
$ environmental-engineering solve enveng_food_to_microorganism_ratio "Q=10000 m^3/day" "S0=200 mg/L" "V=3000 m^3" "X=2500 mg/L"
FM = 3.086419753e-06 1/s
FM_per_day = 0.2666666667
  by: Food-to-microorganism ratio (F/M)  (F/M = Q S0/(V X))
  Q = 0.1157407407 m^3/s
  S0 = 0.2 kg/m^3
  V = 3000 m^3
  X = 2.5 kg/m^3
  assumes: Q, S0, V, X > 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Hydraulic retention time and volumetric organic loading1 fig.enveng_hrt_organic_loading

The hydraulic retention time of a reactor and its volumetric organic (BOD) loading rate from the flow, influent BOD and volume.

\theta = \frac VQ,\quad L_v = \frac{QS_0}{V}

You give

MeaningUnitExample
Q
Influent flowm^3/s10000 m^3/day
\text{S0}
Influent BODkg/m^3200 mg/L
V
Reactor volumem^33000 m^3

You get

MeaningUnitExample
\text{HRT}
Hydraulic retention times25920 s
\text{HRT\_h}
HRT in hours—7.2
\text{OLR}
Volumetric organic loading ratekg/(m^3*s)7.716049383e-06 kg/(m^3*s)
\text{OLR\_kg\_per\_m3\_day}
Loading in kg BOD/(m^3 d)—0.6666666667

Values with a unit may be written in any unit of the right kind.

Applies when

  • Q, S0, V > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Hydraulic retention time and organic loading: Q = 10000 m^3/d, S0 = 200 mg/L, V = 3000 m^3
HRT = 25920 s
HRT_h = 7.2
OLR = 7.716049383e-06 kg/(m^3*s)
OLR_kg_per_m3_day = 0.6666666667

Run it

Terminal
$ environmental-engineering solve enveng_hrt_organic_loading "Q=10000 m^3/day" "S0=200 mg/L" "V=3000 m^3"
HRT = 25920 s
HRT_h = 7.2
OLR = 7.716049383e-06 kg/(m^3*s)
OLR_kg_per_m3_day = 0.6666666667
  by: Hydraulic retention time and volumetric organic loading  (HRT = V/Q; OLR = Q S0/V)
  Q = 0.1157407407 m^3/s
  S0 = 0.2 kg/m^3
  V = 3000 m^3
  assumes: Q, S0, V > 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

KLa fitted to a reaeration test2 fig.enveng_kla_regression

The volumetric oxygen-transfer coefficient KLa from a series of dissolved-oxygen readings during a reaeration test, by linear regression of ln(Cs – C) against time.

\ln(C_s – C) = \ln(C_s – C_0) – K_La\,t

You give

MeaningUnitExample
t
Times in minutes vector—[2, 4, 6, 8, 10, 12]
C
DO readings in mg/L (same order) vector—[2.5, 4.1, 5.4, 6.3, 7, 7.6]
\text{Cs}
Saturation DOkg/m^39.1 mg/L

You get

MeaningUnitExample
\text{KLa\_per\_min}
KLa in 1/min—0.1469891116
\text{KLa}
KLa1/s0.002449818526 1/s
\text{KLa\_per\_h}
KLa in 1/h—8.819346694
\text{r2}
Coefficient of determination—0.9991806961

Values with a unit may be written in any unit of the right kind.

Applies when

  • every reading below Cs
  • at least three distinct times

Outside these conditions it says what is wrong instead of returning a number.

Worked example

KLa regression: t = [2, 4, 6, 8, 10, 12], C = [2.5, 4.1, 5.4, 6.3, 7, 7.6], Cs = 9.1 mg/L
KLa_per_min = 0.1469891116
KLa = 0.002449818526 1/s
KLa_per_h = 8.819346694
r2 = 0.9991806961

Run it

Terminal
$ environmental-engineering solve enveng_kla_regression "t=[2, 4, 6, 8, 10, 12]" "C=[2.5, 4.1, 5.4, 6.3, 7, 7.6]" "Cs=9.1 mg/L"
KLa_per_min = 0.1469891116
KLa = 0.002449818526 1/s
KLa_per_h = 8.819346694
r2 = 0.9991806961
  by: KLa fitted to a reaeration test  (least squares of ln(Cs - C) = ln(Cs - C0) - KLa t)
  Cs = 0.0091 kg/m^3
  assumes: every reading below Cs; at least three distinct times

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Methane production from COD removed (anaerobic digestion)1 fig.enveng_anaerobic_methane_yield

The methane gas flow from an anaerobic process from the COD removed less the COD converted to biomass (1.42 kg COD per kg VSS), at a stated temperature and pressure (64 g COD per mole of methane).

Q_{CH_4} = \frac{\mathrm{COD} – 1.42P_x}{64\ \mathrm{g/mol}}\,\frac{RT}{P}

You give

MeaningUnitExample
\text{COD}
COD removedkg/s5000 kg/day
\text{Px}
Biomass (VSS) producedkg/s300 kg/day
T
Gas temperatureK308.15 K
P
Gas pressurePa101.325 kPa

You get

MeaningUnitExample
Q_{\mathrm{CH4}}
Methane flow at T and Pm^3/s0.02091695562 m^3/s
Q_{\mathrm{CH4},\mathrm{m3},\mathrm{per},\mathrm{day}}
In m^3/d at T and P—1807.224965
Q_{\mathrm{CH4},\mathrm{stp},\mathrm{m3},\mathrm{per},\mathrm{day}}
In m^3/d at 0 degC and 1 atm—1601.958459

Values with a unit may be written in any unit of the right kind.

Applies when

  • ideal gas
  • COD balance

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Methane production from COD: COD = 5000 kg/d, Px = 300 kg/d, T = 308.15 K, P = 101.325 kPa
Q_CH4 = 0.02091695562 m^3/s
Q_CH4_m3_per_day = 1807.224965
Q_CH4_stp_m3_per_day = 1601.958459

Run it

Terminal
$ environmental-engineering solve enveng_anaerobic_methane_yield "COD=5000 kg/day" "Px=300 kg/day" "T=308.15 K" "P=101.325 kPa"
Q_CH4 = 0.02091695562 m^3/s
Q_CH4_m3_per_day = 1807.224965
Q_CH4_stp_m3_per_day = 1601.958459
  by: Methane production from COD removed (anaerobic digestion)  (n = (COD - 1.42 Px)/(64 g/mol); Q = n R T/P)
  COD = 0.05787037037 kg/s
  Px = 0.003472222222 kg/s
  T = 308.15 K
  P = 101325 Pa
  assumes: ideal gas; COD balance

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Minimum (washout) solids retention time1 fig.enveng_minimum_srt

The washout SRT of a complete-mix biological reactor: below it the organisms are lost faster than they grow on the influent substrate.

\frac{1}{\theta_{c,min}} = \frac{YkS_0}{K_s + S_0} – k_d

You give

MeaningUnitExample
Y
True yield coefficient, kg VSS per kg BOD—0.5
k
Maximum specific substrate utilisation rate1/s5 1/day
\text{Ks}
Half-saturation constantkg/m^360 mg/L
\text{kd}
Endogenous decay coefficient1/s0.06 1/day
\text{S0}
Influent substratekg/m^3250 mg/L

You get

MeaningUnitExample
\text{SRT\_min}
Minimum SRTs44168.86544 s
\text{SRT\_min\_days}
Minimum SRT in days—0.5112137203

Values with a unit may be written in any unit of the right kind.

Applies when

  • Y k S0/(Ks + S0) > kd

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Minimum solids retention time: Y = 0.5, k = 5 1/d, Ks = 60 mg/L, kd = 0.06 1/d, S0 = 250 mg/L
SRT_min = 44168.86544 s
SRT_min_days = 0.5112137203

Run it

Terminal
$ environmental-engineering solve enveng_minimum_srt Y=0.5 "k=5 1/day" "Ks=60 mg/L" "kd=0.06 1/day" "S0=250 mg/L"
SRT_min = 44168.86544 s
SRT_min_days = 0.5112137203
  by: Minimum (washout) solids retention time  (1/SRT_min = Y k S0/(Ks + S0) - kd)
  Y = 0.5
  k = 5.787037037e-05 1/s
  Ks = 0.06 kg/m^3
  kd = 6.944444444e-07 1/s
  S0 = 0.25 kg/m^3
  assumes: Y k S0/(Ks + S0) > kd

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Monod specific growth rate1 fig.enveng_monod_growth_rate

The specific growth rate of microorganisms at a substrate concentration by the Monod equation, and the net rate when the endogenous decay coefficient is given.

\mu = \frac{\mu_{max}S}{K_s + S}

You give

MeaningUnitExample
\mu_{\mathrm{max}}
Maximum specific growth rate1/s3 1/day
\text{Ks}
Half-saturation constantkg/m^360 mg/L
S
Substrate concentrationkg/m^310 mg/L
\text{kd}
Endogenous decay coefficient optional1/s

You get

MeaningUnitExample
\mu
Specific growth rate1/s4.96031746e-06 1/s
\mu_{\mathrm{per},\mathrm{day}}
In 1/d—0.4285714286
\mu_{\mathrm{net}}
Net specific growth rate mu – kd1/s
\mu_{\mathrm{net},\mathrm{per},\mathrm{day}}
Net rate in 1/d—

Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.

Applies when

  • Monod kinetics

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Monod growth rate: mu_max = 3 1/d, Ks = 60 mg/L, S = 10 mg/L
mu = 4.96031746e-06 1/s
mu_per_day = 0.4285714286

Run it

Terminal
$ environmental-engineering solve enveng_monod_growth_rate "mu_max=3 1/day" "Ks=60 mg/L" "S=10 mg/L"
mu = 4.96031746e-06 1/s
mu_per_day = 0.4285714286
  by: Monod specific growth rate  (mu = mu_max S/(Ks + S); mu_net = mu - kd)
  mu_max = 3.472222222e-05 1/s
  Ks = 0.06 kg/m^3
  S = 0.01 kg/m^3
  assumes: Monod kinetics

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Overall oxygen transfer coefficient KLa from two DO readings1 fig.enveng_kla_two_point

The volumetric mass-transfer coefficient KLa from two dissolved-oxygen readings during reaeration toward a known saturation concentration.

K_La = \frac{\ln\frac{C_s – C_1}{C_s – C_2}}{t_2 – t_1}

You give

MeaningUnitExample
\text{Cs}
Saturation DOkg/m^39.1 mg/L
\text{C1}
DO at the first timekg/m^32 mg/L
\text{C2}
DO at the second timekg/m^36 mg/L
\text{t1}
First times2 min
\text{t2}
Second times10 min

You get

MeaningUnitExample
\text{KLa}
KLa1/s0.001726443068 1/s
\text{KLa\_per\_h}
KLa in 1/h—6.215195044

Values with a unit may be written in any unit of the right kind.

Applies when

  • C1 < C2 < Cs
  • t2 > t1

Outside these conditions it says what is wrong instead of returning a number.

Worked example

KLa from two DO readings: Cs = 9.1 mg/L, C1 = 2 mg/L, C2 = 6 mg/L, t1 = 2 min, t2 = 10 min
KLa = 0.001726443068 1/s
KLa_per_h = 6.215195044

Run it

Terminal
$ environmental-engineering solve enveng_kla_two_point "Cs=9.1 mg/L" "C1=2 mg/L" "C2=6 mg/L" "t1=2 min" "t2=10 min"
KLa = 0.001726443068 1/s
KLa_per_h = 6.215195044
  by: Overall oxygen transfer coefficient KLa from two DO readings  (KLa = ln((Cs - C1)/(Cs - C2))/(t2 - t1))
  Cs = 0.0091 kg/m^3
  C1 = 0.002 kg/m^3
  C2 = 0.006 kg/m^3
  t1 = 120 s
  t2 = 600 s
  assumes: C1 < C2 < Cs; t2 > t1

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Oxygen requirement of an activated-sludge process1 fig.enveng_aeration_oxygen_requirement

The carbonaceous oxygen requirement: ultimate BOD removed (BOD5 removed divided by the BOD5/BODu ratio) less 1.42 times the biomass wasted.

\dot m_{O_2} = \frac{Q(S_0 – S)}{f} – 1.42P_x

You give

MeaningUnitExample
Q
Flowm^3/s10000 m^3/day
\text{S0}
Influent BOD5kg/m^3250 mg/L
S
Effluent soluble BOD5kg/m^35 mg/L
f
BOD5/BODu ratio (e.g. 0.68)—0.68
\text{Px}
Biomass wasted (VSS)kg/s800 kg/day

You get

MeaningUnitExample
\text{O2}
Oxygen requiredkg/s0.02855255991 kg/s
\text{O2\_kg\_per\_day}
In kg O2/d—2466.941176

Values with a unit may be written in any unit of the right kind.

Applies when

  • carbonaceous demand only (no nitrification)

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Aeration oxygen requirement: Q = 10000 m^3/d, S0 = 250 mg/L, S = 5 mg/L, f = 0.68, Px = 800 kg/d
O2 = 0.02855255991 kg/s
O2_kg_per_day = 2466.941176

Run it

Terminal
$ environmental-engineering solve enveng_aeration_oxygen_requirement "Q=10000 m^3/day" "S0=250 mg/L" "S=5 mg/L" f=0.68 "Px=800 kg/day"
O2 = 0.02855255991 kg/s
O2_kg_per_day = 2466.941176
  by: Oxygen requirement of an activated-sludge process  (O2 = Q (S0 - S)/f - 1.42 Px)
  Q = 0.1157407407 m^3/s
  S0 = 0.25 kg/m^3
  S = 0.005 kg/m^3
  f = 0.68
  Px = 0.009259259259 kg/s
  assumes: carbonaceous demand only (no nitrification)

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Return activated sludge ratio1 fig.enveng_return_sludge_ratio

The return sludge ratio and flow needed to hold the mixed-liquor concentration, from a solids balance around the aeration tank (influent solids neglected).

R = \frac{Q_r}{Q} = \frac{X}{X_r – X}

You give

MeaningUnitExample
X
Mixed liquor suspended solidskg/m^33000 mg/L
\text{Xr}
Return sludge concentrationkg/m^310000 mg/L
Q
Influent flowm^3/s10000 m^3/day

You get

MeaningUnitExample
R
Return ratio Qr/Q—0.4285714286
\text{Qr}
Return sludge flowm^3/s0.0496031746 m^3/s

Values with a unit may be written in any unit of the right kind.

Applies when

  • Xr > X
  • influent solids negligible

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Return sludge ratio: X = 3000 mg/L, Xr = 10000 mg/L, Q = 10000 m^3/d
R = 0.4285714286
Qr = 0.0496031746 m^3/s

Run it

Terminal
$ environmental-engineering solve enveng_return_sludge_ratio "X=3000 mg/L" "Xr=10000 mg/L" "Q=10000 m^3/day"
R = 0.4285714286
Qr = 0.0496031746 m^3/s
  by: Return activated sludge ratio  ((Q + Qr) X = Qr Xr, so R = X/(Xr - X))
  X = 3 kg/m^3
  Xr = 10 kg/m^3
  Q = 0.1157407407 m^3/s
  assumes: Xr > X; influent solids negligible

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Sludge volume after thickening or dewatering1 fig.enveng_sludge_thickening

The sludge volume after thickening or dewatering from one solids fraction to another (same specific gravity), and the fractional volume reduction.

V_2 = V_1\frac{P_1}{P_2}

You give

MeaningUnitExample
\text{V1}
Sludge volume rate beforem^3/s100 m^3/day
\text{P1}
Solids fraction before (fraction or %)—0.01
\text{P2}
Solids fraction after (fraction or %)—0.05

You get

MeaningUnitExample
\text{V2}
Sludge volume rate afterm^3/s0.0002314814815 m^3/s
\text{reduction}
Fractional volume reduction—0.8

Values with a unit may be written in any unit of the right kind.

Applies when

  • P2 > P1
  • same specific gravity

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Sludge thickening: V1 = 100 m^3/d, P1 = 0.01, P2 = 0.05
V2 = 0.0002314814815 m^3/s
reduction = 0.8

Run it

Terminal
$ environmental-engineering solve enveng_sludge_thickening "V1=100 m^3/day" P1=0.01 P2=0.05
V2 = 0.0002314814815 m^3/s
reduction = 0.8
  by: Sludge volume after thickening or dewatering  (V2 = V1 P1/P2)
  V1 = 0.001157407407 m^3/s
  P1 = 0.01
  P2 = 0.05
  assumes: P2 > P1; same specific gravity

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Sludge volume index (SVI)2 fig.enveng_sludge_volume_index

The sludge volume index from the 30-minute settled volume and the mixed-liquor suspended solids, with the customary estimate of the return sludge concentration (10^6/SVI mg/L).

SVI = \frac{V_{30}}{MLSS}

You give

MeaningUnitExample
\text{V30}
Settled sludge volume after 30 minutes, mL/L—300
\text{MLSS}
Mixed liquor suspended solidskg/m^32500 mg/L

You get

MeaningUnitExample
\text{SVI}
Sludge volume index, mL/g—120
\text{Xr\_estimate}
Estimated maximum return sludge concentrationkg/m^38.333333333 kg/m^3
\text{Xr\_estimate\_mgL}
Estimate in mg/L—8333.333333

Values with a unit may be written in any unit of the right kind.

Applies when

  • V30 <= 1000 mL/L

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Sludge volume index: V30 = 300 mL/L, MLSS = 2500 mg/L
SVI = 120
Xr_estimate = 8.333333333 kg/m^3
Xr_estimate_mgL = 8333.333333

Run it

Terminal
$ environmental-engineering solve enveng_sludge_volume_index V30=300 "MLSS=2500 mg/L"
SVI = 120
Xr_estimate = 8.333333333 kg/m^3
Xr_estimate_mgL = 8333.333333
  by: Sludge volume index (SVI)  (SVI = V30 (mL/L)/MLSS (g/L))
  V30 = 300
  MLSS = 2.5 kg/m^3
  assumes: V30 <= 1000 mL/L

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Solids retention time (mean cell residence time)1 fig.enveng_solids_retention_time

The solids retention time (sludge age) of an activated-sludge system from the biomass in the tank and the biomass leaving in the waste sludge and the effluent.

\theta_c = \frac{VX}{Q_wX_w + Q_eX_e}

You give

MeaningUnitExample
V
Aeration tank volumem^33000 m^3
X
MLVSS in the tankkg/m^32500 mg/L
\text{Qw}
Waste sludge flowm^3/s100 m^3/day
\text{Xw}
VSS in the waste sludgekg/m^310000 mg/L
\text{Qe}
Effluent flowm^3/s9900 m^3/day
\text{Xe}
VSS in the effluentkg/m^315 mg/L

You get

MeaningUnitExample
\text{SRT}
Solids retention times564214.1924 s
\text{SRT\_days}
SRT in days—6.530256857

Values with a unit may be written in any unit of the right kind.

Applies when

  • steady state

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Solids retention time: V = 3000 m^3, X = 2500 mg/L, Qw = 100 m^3/d, Xw = 10000 mg/L, Qe = 9900 m^3/d, Xe = 15 mg/L
SRT = 564214.1924 s
SRT_days = 6.530256857

Run it

Terminal
$ environmental-engineering solve enveng_solids_retention_time "V=3000 m^3" "X=2500 mg/L" "Qw=100 m^3/day" "Xw=10000 mg/L" "Qe=9900 m^3/day" "Xe=15 mg/L"
SRT = 564214.1924 s
SRT_days = 6.530256857
  by: Solids retention time (mean cell residence time)  (SRT = V X/(Qw Xw + Qe Xe))
  V = 3000 m^3
  X = 2.5 kg/m^3
  Qw = 0.001157407407 m^3/s
  Xw = 10 kg/m^3
  Qe = 0.1145833333 m^3/s
  Xe = 0.015 kg/m^3
  assumes: steady state

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Trickling filter BOD removal efficiency (NRC equation)1 fig.enveng_nrc_trickling_filter

The BOD removal efficiency of a single-stage stone-media trickling filter (with its settling tank) by the NRC equation, from the BOD load, the filter volume and the recirculation ratio.

E = \frac{100}{1 + 0.4432\sqrt{W/(VF)}},\quad F = \frac{1+R}{(1 + R/10)^2}

You give

MeaningUnitExample
W
BOD load to the filter (excluding recycle)kg/s800 kg/day
V
Filter media volumem^31000 m^3
R
Recirculation ratio Qr/Q—2

You get

MeaningUnitExample
F
Recirculation factor (1 + R)/(1 + R/10)^2—2.083333333
E
BOD removal efficiency (fraction)—0.7845346289
E_{\mathrm{percent}}
Efficiency in per cent—78.45346289

Values with a unit may be written in any unit of the right kind.

Applies when

  • first-stage stone filter at 20 degC
  • W in kg/d and V in m³ inside the formula constant

Outside these conditions it says what is wrong instead of returning a number.

Worked example

NRC trickling filter efficiency: W = 800 kg/d, V = 1000 m^3, R = 2
F = 2.083333333
E = 0.7845346289
E_percent = 78.45346289

Run it

Terminal
$ environmental-engineering solve enveng_nrc_trickling_filter "W=800 kg/day" "V=1000 m^3" R=2
F = 2.083333333
E = 0.7845346289
E_percent = 78.45346289
  by: Trickling filter BOD removal efficiency (NRC equation)  (F = (1 + R)/(1 + R/10)^2; E = 1/(1 + 0.4432 sqrt(W/(V F))))
  W = 0.009259259259 kg/s
  V = 1000 m^3
  R = 2
  assumes: first-stage stone filter at 20 degC; W in kg/d and V in m^3 inside the formula constant

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Volume of wet sludge from dry solids1 fig.enveng_sludge_volume

The volume (flow) of wet sludge from the dry-solids mass rate, the solids fraction and the specific gravity of the sludge (water 1000 kg/m³).

V = \frac{M_s}{\rho_w S_{sl} P_s}

You give

MeaningUnitExample
\text{Ms}
Dry solids mass ratekg/s1000 kg/day
\text{Ps}
Solids fraction of the wet sludge (fraction or %)—0.04
\text{Ssl}
Specific gravity of the wet sludge—1.02

You get

MeaningUnitExample
V
Wet sludge volume ratem^3/s0.0002836782861 m^3/s
V_{\mathrm{m3},\mathrm{per},\mathrm{day}}
In m^3/d—24.50980392

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0 < Ps <= 1

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Wet sludge volume: Ms = 1000 kg/d, Ps = 0.04, Ssl = 1.02
V = 0.0002836782861 m^3/s
V_m3_per_day = 24.50980392

Run it

Terminal
$ environmental-engineering solve enveng_sludge_volume "Ms=1000 kg/day" Ps=0.04 Ssl=1.02
V = 0.0002836782861 m^3/s
V_m3_per_day = 24.50980392
  by: Volume of wet sludge from dry solids  (V = Ms/(rho_w Ssl Ps))
  Ms = 0.01157407407 kg/s
  Ps = 0.04
  Ssl = 1.02
  assumes: 0 < Ps <= 1

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Waste biomass production (observed yield)1 fig.enveng_sludge_production

The observed yield and the daily mass of biological solids produced (to be wasted) from the kinetic yield, decay coefficient, SRT, flow and substrate removed.

P_x = \frac{Y}{1 + k_d\theta_c}Q(S_0 – S)

You give

MeaningUnitExample
Y
True yield, kg VSS per kg BOD—0.5
\text{kd}
Endogenous decay coefficient1/s0.06 1/day
\text{SRT}
Solids retention times10 day
Q
Flowm^3/s10000 m^3/day
\text{S0}
Influent substratekg/m^3250 mg/L
S
Effluent substratekg/m^35 mg/L

You get

MeaningUnitExample
Y_{\mathrm{obs}}
Observed yield—0.3125
\text{Px}
Biomass productionkg/s0.008861400463 kg/s
\text{Px\_kg\_per\_day}
In kg VSS/d—765.625

Values with a unit may be written in any unit of the right kind.

Applies when

  • S < S0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Sludge production: Y = 0.5, kd = 0.06 1/d, SRT = 10 d, Q = 10000 m^3/d, S0 = 250 mg/L, S = 5 mg/L
Y_obs = 0.3125
Px = 0.008861400463 kg/s
Px_kg_per_day = 765.625

Run it

Terminal
$ environmental-engineering solve enveng_sludge_production Y=0.5 "kd=0.06 1/day" "SRT=10 day" "Q=10000 m^3/day" "S0=250 mg/L" "S=5 mg/L"
Y_obs = 0.3125
Px = 0.008861400463 kg/s
Px_kg_per_day = 765.625
  by: Waste biomass production (observed yield)  (Y_obs = Y/(1 + kd SRT); Px = Y_obs Q (S0 - S))
  Y = 0.5
  kd = 6.944444444e-07 1/s
  SRT = 864000 s
  Q = 0.1157407407 m^3/s
  S0 = 0.25 kg/m^3
  S = 0.005 kg/m^3
  assumes: S < S0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Water quality 17

BOD exerted after a time (first-order)1 fig.enveng_bod_exerted

The BOD exerted after time t and the oxygen demand remaining, from the ultimate BOD and the first-order rate constant.

BOD_t = L_0\left(1 – e^{-kt}\right)

You give

MeaningUnitExample
\text{L0}
Ultimate (carbonaceous) BODkg/m^3250 mg/L
k
BOD rate constant (base e)1/s0.23 1/day
t
Incubation or travel times5 day

You get

MeaningUnitExample
\text{BOD\_t}
BOD exerted after tkg/m^30.1708408077 kg/m^3
L_{t}
BOD remaining after tkg/m^30.07915919234 kg/m^3
\text{BOD\_t\_mgL}
BOD exerted in mg/L—170.8408077

Values with a unit may be written in any unit of the right kind.

Applies when

  • first-order kinetics

Outside these conditions it says what is wrong instead of returning a number.

Worked example

BOD exerted: L0 = 250 mg/L, k = 0.23 1/d, t = 5 d
BOD_t = 0.1708408077 kg/m^3
L_t = 0.07915919234 kg/m^3
BOD_t_mgL = 170.8408077

Run it

Terminal
$ environmental-engineering solve enveng_bod_exerted "L0=250 mg/L" "k=0.23 1/day" "t=5 day"
BOD_t = 0.1708408077 kg/m^3
L_t = 0.07915919234 kg/m^3
BOD_t_mgL = 170.8408077
  by: BOD exerted after a time (first-order)  (BOD_t = L0 (1 - e^(-k t)), L_t = L0 e^(-k t))
  L0 = 0.25 kg/m^3
  k = 2.662037037e-06 1/s
  t = 432000 s
  assumes: first-order kinetics

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

BOD from a dilution test (with optional seed correction)1 fig.enveng_bod_dilution_test

The BOD of a sample from the dissolved oxygen of the diluted sample before and after incubation and the sample fraction, with the seed correction when the dilution water is seeded.

BOD = \frac{(D_1 – D_2) – (B_1 – B_2)f}{P}

You give

MeaningUnitExample
\text{D1}
DO of the diluted sample immediately after preparationkg/m^38.5 mg/L
\text{D2}
DO of the diluted sample after incubationkg/m^34 mg/L
P
Decimal fraction of sample in the bottle (sample volume / bottle volume)—0.05
\text{B1}
DO of the seed control before incubation optionalkg/m^3
\text{B2}
DO of the seed control after incubation optionalkg/m^3
f
Ratio of seed in the sample bottle to seed in the control optional—

You get

MeaningUnitExample
\text{BOD}
BOD of the samplekg/m^30.09 kg/m^3
\text{BOD\_mgL}
BOD in mg/L—90

Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.

Applies when

  • D1 > D2
  • B1, B2 and f given together or not at all

Outside these conditions it says what is wrong instead of returning a number.

Worked example

BOD dilution test: D1 = 8.5 mg/L, D2 = 4 mg/L, P = 0.05
BOD = 0.09 kg/m^3
BOD_mgL = 90

Run it

Terminal
$ environmental-engineering solve enveng_bod_dilution_test "D1=8.5 mg/L" "D2=4 mg/L" P=0.05
BOD = 0.09 kg/m^3
BOD_mgL = 90
  by: BOD from a dilution test (with optional seed correction)  (BOD = ((D1 - D2) - (B1 - B2) f)/P (unseeded: BOD = (D1 - D2)/P))
  D1 = 0.0085 kg/m^3
  D2 = 0.004 kg/m^3
  P = 0.05
  assumes: D1 > D2; B1, B2 and f given together or not at all

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

BOD rate constant and ultimate BOD fitted to BOD data1 fig.enveng_bod_rate_fit

The first-order rate constant k and ultimate BOD L0 that best fit a series of BOD measurements (nonlinear least squares of BOD = L0 (1 – e^(-k t))).

\min_{k,L_0}\sum_i\left[y_i – L_0\left(1 – e^{-kt_i}\right)\right]^2

You give

MeaningUnitExample
t
Incubation times in days vector—[1, 2, 3, 5, 7, 10]
y
Measured BOD values in mg/L (same order) vector—[41, 74, 98, 132, 152, 168]

You get

MeaningUnitExample
k
Fitted rate constant1/s3.002440202e-06 1/s
k_{\mathrm{per},\mathrm{day}}
Fitted rate constant in 1/d—0.2594108335
\text{L0}
Fitted ultimate BODkg/m^30.1815717527 kg/m^3
\text{L0\_mgL}
Fitted ultimate BOD in mg/L—181.5717527
\text{rss}
Residual sum of squares in (mg/L)²—0.5327137697

Applies when

  • at least three distinct positive times
  • a single rate constant between 0.001 and 20 per day fits

Outside these conditions it says what is wrong instead of returning a number.

Worked example

BOD rate constant fit: t = [1, 2, 3, 5, 7, 10], y = [41, 74, 98, 132, 152, 168]
k = 3.002440202e-06 1/s
k_per_day = 0.2594108335
L0 = 0.1815717527 kg/m^3
L0_mgL = 181.5717527
rss = 0.5327137697

Run it

Terminal
$ environmental-engineering solve enveng_bod_rate_fit "t=[1, 2, 3, 5, 7, 10]" "y=[41, 74, 98, 132, 152, 168]"
k = 3.002440202e-06 1/s
k_per_day = 0.2594108335
L0 = 0.1815717527 kg/m^3
L0_mgL = 181.5717527
rss = 0.5327137697
  by: BOD rate constant and ultimate BOD fitted to BOD data  (for each k the best L0 is sum(y f)/sum(f^2) with f = 1 - e^(-k t); k is the root of the stationarity condition sum((y - L0 f) t e^(-k t)) = 0 (scan and bisection))
  assumes: at least three distinct positive times; a single rate constant between 0.001 and 20 per day fits

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Concentration after mixing a discharge with a river1 fig.enveng_mixing_two_streams

The fully mixed concentration (BOD, DO, a pollutant) and flow just below a wastewater outfall from the flows and concentrations of the discharge and the river.

C = \frac{Q_w C_w + Q_r C_r}{Q_w + Q_r}

You give

MeaningUnitExample
\text{Qw}
Wastewater (discharge) flowm^3/s0.5 m^3/s
\text{Cw}
Concentration in the wastewaterkg/m^3200 mg/L
\text{Qr}
River flow upstreamm^3/s5 m^3/s
\text{Cr}
Concentration in the river upstreamkg/m^32 mg/L

You get

MeaningUnitExample
C
Mixed concentrationkg/m^30.02 kg/m^3
C_{\mathrm{mgL}}
In mg/L—20
Q
Combined flowm^3/s5.5 m^3/s

Values with a unit may be written in any unit of the right kind.

Applies when

  • complete mixing
  • conservative over the mixing zone

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Mixing of discharge and river: Qw = 0.5 m^3/s, Cw = 200 mg/L, Qr = 5 m^3/s, Cr = 2 mg/L
C = 0.02 kg/m^3
C_mgL = 20
Q = 5.5 m^3/s

Run it

Terminal
$ environmental-engineering solve enveng_mixing_two_streams "Qw=0.5 m^3/s" "Cw=200 mg/L" "Qr=5 m^3/s" "Cr=2 mg/L"
C = 0.02 kg/m^3
C_mgL = 20
Q = 5.5 m^3/s
  by: Concentration after mixing a discharge with a river  (C = (Qw Cw + Qr Cr)/(Qw + Qr))
  Qw = 0.5 m^3/s
  Cw = 0.2 kg/m^3
  Qr = 5 m^3/s
  Cr = 0.002 kg/m^3
  assumes: complete mixing; conservative over the mixing zone

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Concentration in a well-mixed lake over time1 fig.enveng_lake_transient

The concentration in a completely mixed lake a time t after a change in load, from the initial concentration, the load, outflow, volume and first-order decay.

C(t) = C_{ss} + (C_0 – C_{ss})e^{-(Q/V + k)t}

You give

MeaningUnitExample
W
Pollutant load after the changekg/s100 kg/day
Q
Outflow ratem^3/s10 m^3/s
k
First-order decay constant1/s0.2 1/day
V
Lake volumem^310000000 m^3
\text{C0}
Concentration at t = 0kg/m^30 mg/L
t
Elapsed times5 day

You get

MeaningUnitExample
C
Concentration at tkg/m^32.657713748e-05 kg/m^3
C_{\mathrm{mgL}}
In mg/L—0.02657713748
C_{\mathrm{ss}}
New steady statekg/m^33.491620112e-05 kg/m^3

Values with a unit may be written in any unit of the right kind.

Applies when

  • completely mixed
  • constant flow, volume and load

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Lake concentration over time: W = 100 kg/d, Q = 10 m^3/s, k = 0.2 1/d, V = 10000000 m^3, C0 = 0 mg/L, t = 5 d
C = 2.657713748e-05 kg/m^3
C_mgL = 0.02657713748
C_ss = 3.491620112e-05 kg/m^3

Run it

Terminal
$ environmental-engineering solve enveng_lake_transient "W=100 kg/day" "Q=10 m^3/s" "k=0.2 1/day" "V=10000000 m^3" "C0=0 mg/L" "t=5 day"
C = 2.657713748e-05 kg/m^3
C_mgL = 0.02657713748
C_ss = 3.491620112e-05 kg/m^3
  by: Concentration in a well-mixed lake over time  (V dC/dt = W - Q C - k C V, so C = Css + (C0 - Css) e^(-(Q/V + k) t))
  W = 0.001157407407 kg/s
  Q = 10 m^3/s
  k = 2.314814815e-06 1/s
  V = 10000000 m^3
  C0 = 0 kg/m^3
  t = 432000 s
  assumes: completely mixed; constant flow, volume and load

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Critical (minimum) dissolved oxygen of the oxygen sag1 fig.enveng_streeter_phelps_critical_point

The critical time at which the oxygen deficit of a river is largest, the critical deficit and the minimum dissolved oxygen (Streeter-Phelps).

t_c = \frac{1}{k_a – k_d}\ln\!\left[\frac{k_a}{k_d}\left(1 – \frac{D_0(k_a – k_d)}{k_d L_0}\right)\right],\quad D_c = \frac{k_d}{k_a}L_0e^{-k_d t_c}

You give

MeaningUnitExample
\text{kd}
Deoxygenation rate constant1/s0.23 1/day
\text{ka}
Reaeration rate constant1/s0.46 1/day
\text{L0}
Ultimate BOD of the mixed river water at the outfallkg/m^310 mg/L
\text{D0}
Oxygen deficit at the outfall (DOsat – DO)kg/m^31 mg/L
\text{DOsat}
Saturation dissolved oxygenkg/m^39.1 mg/L

You get

MeaningUnitExample
t_{c}
Critical travel times220803.3385 s
t_{c,\mathrm{days}}
Critical time in days—2.555594195
D_{c}
Critical (largest) deficitkg/m^30.002777777778 kg/m^3
\text{DO\_min}
Minimum dissolved oxygenkg/m^30.006322222222 kg/m^3
\text{DO\_min\_mgL}
Minimum dissolved oxygen in mg/L—6.322222222

Values with a unit may be written in any unit of the right kind.

Applies when

  • the critical deficit stays below saturation
  • if the deficit falls from the outfall on, t_c = 0 and D_c = D0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Streeter-Phelps critical point: kd = 0.23 1/d, ka = 0.46 1/d, L0 = 10 mg/L, D0 = 1 mg/L, DOsat = 9.1 mg/L
t_c = 220803.3385 s
t_c_days = 2.555594195
D_c = 0.002777777778 kg/m^3
DO_min = 0.006322222222 kg/m^3
DO_min_mgL = 6.322222222

Run it

Terminal
$ environmental-engineering solve enveng_streeter_phelps_critical_point "kd=0.23 1/day" "ka=0.46 1/day" "L0=10 mg/L" "D0=1 mg/L" "DOsat=9.1 mg/L"
t_c = 220803.3385 s
t_c_days = 2.555594195
D_c = 0.002777777778 kg/m^3
DO_min = 0.006322222222 kg/m^3
DO_min_mgL = 6.322222222
  by: Critical (minimum) dissolved oxygen of the oxygen sag  (t_c = ln[(ka/kd)(1 - D0 (ka - kd)/(kd L0))]/(ka - kd); D_c = (kd/ka) L0 e^(-kd t_c))
  kd = 2.662037037e-06 1/s
  ka = 5.324074074e-06 1/s
  L0 = 0.01 kg/m^3
  D0 = 0.001 kg/m^3
  DOsat = 0.0091 kg/m^3
  assumes: the critical deficit stays below saturation; if the deficit falls from the outfall on, t_c = 0 and D_c = D0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Dissolved oxygen at a distance downstream (Streeter-Phelps)1 fig.enveng_oxygen_sag_distance

The oxygen deficit and dissolved oxygen at a distance downstream of an outfall from the river velocity (travel time x/v) and the Streeter-Phelps sag.

D(x) = \frac{k_d L_0}{k_a – k_d}\left(e^{-k_d x/v} – e^{-k_a x/v}\right) + D_0 e^{-k_a x/v}

You give

MeaningUnitExample
\text{kd}
Deoxygenation rate constant1/s0.23 1/day
\text{ka}
Reaeration rate constant1/s0.46 1/day
\text{L0}
Ultimate BOD of the mixed river water at the outfallkg/m^310 mg/L
\text{D0}
Oxygen deficit at the outfall (DOsat – DO)kg/m^31 mg/L
x
Distance downstreamm30 km
v
Mean river velocitym/s0.3 m/s
\text{DOsat}
Saturation dissolved oxygenkg/m^39.1 mg/L

You get

MeaningUnitExample
D
Oxygen deficit at xkg/m^30.002378123211 kg/m^3
\text{DO}
Dissolved oxygen at xkg/m^30.006721876789 kg/m^3
D_{\mathrm{mgL}}
Deficit in mg/L—2.378123211
\text{DO\_mgL}
Dissolved oxygen in mg/L—6.721876789
t
Travel times100000 s

Values with a unit may be written in any unit of the right kind.

Applies when

  • plug flow at constant velocity
  • deficit stays below saturation

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Oxygen sag at a distance: kd = 0.23 1/d, ka = 0.46 1/d, L0 = 10 mg/L, D0 = 1 mg/L, x = 30 km, v = 0.3 m/s, DOsat = 9.1 mg/L
D = 0.002378123211 kg/m^3
DO = 0.006721876789 kg/m^3
D_mgL = 2.378123211
DO_mgL = 6.721876789
t = 100000 s

Run it

Terminal
$ environmental-engineering solve enveng_oxygen_sag_distance "kd=0.23 1/day" "ka=0.46 1/day" "L0=10 mg/L" "D0=1 mg/L" "x=30 km" "v=0.3 m/s" "DOsat=9.1 mg/L"
D = 0.002378123211 kg/m^3
DO = 0.006721876789 kg/m^3
D_mgL = 2.378123211
DO_mgL = 6.721876789
t = 100000 s
  by: Dissolved oxygen at a distance downstream (Streeter-Phelps)  (t = x/v, then the Streeter-Phelps deficit)
  kd = 2.662037037e-06 1/s
  ka = 5.324074074e-06 1/s
  L0 = 0.01 kg/m^3
  D0 = 0.001 kg/m^3
  x = 30000 m
  v = 0.3 m/s
  DOsat = 0.0091 kg/m^3
  assumes: plug flow at constant velocity; deficit stays below saturation

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Dissolved oxygen saturation concentration (Benson-Krause)1 fig.enveng_do_saturation

The saturation concentration of dissolved oxygen in water in equilibrium with moist air at 1 atm, from the temperature and salinity (Benson and Krause equation as adopted in Standard Methods).

\ln C_s = -139.34411 + \frac{1.575701\times10^5}{T} – \frac{6.642308\times10^7}{T^2} + \frac{1.2438\times10^{10}}{T^3} – \frac{8.621949\times10^{11}}{T^4} – S(\dots)

You give

MeaningUnitExample
T
Water temperatureK20 degC
S
Salinity in g/kg (0 for fresh water)—0

You get

MeaningUnitExample
\text{DOsat}
Saturation dissolved oxygenkg/m^30.009092426043 kg/m^3
\text{DOsat\_mgL}
In mg/L—9.092426043

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0-40 degC
  • 0-40 g/kg salinity
  • 1 atm moist air

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Dissolved oxygen saturation: T = 20 degC, S = 0 g/kg
DOsat = 0.009092426043 kg/m^3
DOsat_mgL = 9.092426043

Run it

Terminal
$ environmental-engineering solve enveng_do_saturation "T=20 degC" S=0
DOsat = 0.009092426043 kg/m^3
DOsat_mgL = 9.092426043
  by: Dissolved oxygen saturation concentration (Benson-Krause)  (ln C = -139.34411 + 1.575701e5/T - 6.642308e7/T^2 + 1.2438e10/T^3 - 8.621949e11/T^4 - S(1.7674e-2 - 10.754/T + 2140.7/T^2))
  T = 293.15 K
  S = 0
  assumes: 0-40 degC; 0-40 g/kg salinity; 1 atm moist air

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

First-order decay of a pollutant downstream (plug flow)1 fig.enveng_river_first_order_decay

The concentration of a decaying pollutant (BOD, coliforms, a chemical) a distance downstream in a river in plug flow, and the travel time.

C = C_0\,e^{-kx/u}

You give

MeaningUnitExample
\text{C0}
Concentration at the start (after mixing)kg/m^320 mg/L
k
First-order decay constant1/s0.3 1/day
x
Distance downstreamm40 km
u
Mean velocitym/s0.25 m/s

You get

MeaningUnitExample
C
Concentration at xkg/m^30.01147506841 kg/m^3
C_{\mathrm{mgL}}
In mg/L—11.47506841
t
Travel time x/us160000 s
\text{fraction\_remaining}
C/C0—0.5737534207

Values with a unit may be written in any unit of the right kind.

Applies when

  • plug flow
  • first-order decay

Outside these conditions it says what is wrong instead of returning a number.

Worked example

River first-order decay: C0 = 20 mg/L, k = 0.3 1/d, x = 40 km, u = 0.25 m/s
C = 0.01147506841 kg/m^3
C_mgL = 11.47506841
t = 160000 s
fraction_remaining = 0.5737534207

Run it

Terminal
$ environmental-engineering solve enveng_river_first_order_decay "C0=20 mg/L" "k=0.3 1/day" "x=40 km" "u=0.25 m/s"
C = 0.01147506841 kg/m^3
C_mgL = 11.47506841
t = 160000 s
fraction_remaining = 0.5737534207
  by: First-order decay of a pollutant downstream (plug flow)  (C = C0 e^(-k x/u))
  C0 = 0.02 kg/m^3
  k = 3.472222222e-06 1/s
  x = 40000 m
  u = 0.25 m/s
  assumes: plug flow; first-order decay

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Flow-weighted mixing of several streams1 fig.enveng_mixing_several_streams

The flow-weighted concentration (or temperature) of several streams combined, and the total flow; flows in any one unit, concentrations in any one unit.

C = \frac{\sum_i Q_i C_i}{\sum_i Q_i}

You give

MeaningUnitExample
Q
Flows of the streams (any one unit, e.g. m³/s) vector—[2, 0.5, 1]
C
Concentrations of the streams (any one unit, e.g. mg/L) vector—[3, 120, 40]

You get

MeaningUnitExample
C_{\mathrm{mix}}
Mixed concentration, in the unit of C—30.28571429
Q_{\mathrm{total}}
Total flow, in the unit of Q—3.5

Applies when

  • complete mixing
  • conservative substance

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Flow-weighted mixing: Q = [2, 0.5, 1], C = [3, 120, 40]
C_mix = 30.28571429
Q_total = 3.5

Run it

Terminal
$ environmental-engineering solve enveng_mixing_several_streams "Q=[2, 0.5, 1]" "C=[3, 120, 40]"
C_mix = 30.28571429
Q_total = 3.5
  by: Flow-weighted mixing of several streams  (C = sum(Q_i C_i)/sum(Q_i))
  assumes: complete mixing; conservative substance

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Pollutant mass load of a flow2 fig.enveng_pollutant_load

The mass load (rate) carried by a flow at a concentration, in kg/s, kg per day and tonnes per year.

W = Q\,C

You give

MeaningUnitExample
Q
Flow ratem^3/s0.5 m^3/s
C
Concentrationkg/m^330 mg/L

You get

MeaningUnitExample
W
Mass loadkg/s0.015 kg/s
W_{\mathrm{kg},\mathrm{per},\mathrm{day}}
Load in kg per day—1296
W_{t,\mathrm{per},\mathrm{year}}
Load in tonnes per (365.25-day) year—473.364

Values with a unit may be written in any unit of the right kind.

Applies when

  • Q > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Pollutant load: Q = 0.5 m^3/s, C = 30 mg/L
W = 0.015 kg/s
W_kg_per_day = 1296
W_t_per_year = 473.364

Run it

Terminal
$ environmental-engineering solve enveng_pollutant_load "Q=0.5 m^3/s" "C=30 mg/L"
W = 0.015 kg/s
W_kg_per_day = 1296
W_t_per_year = 473.364
  by: Pollutant mass load of a flow  (W = Q C)
  Q = 0.5 m^3/s
  C = 0.03 kg/m^3
  assumes: Q > 0

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Steady-state concentration in a well-mixed lake (first-order decay)1 fig.enveng_lake_steady_state

The steady concentration of a pollutant in a lake treated as a completely mixed reactor with inflow load, outflow and first-order decay, and the hydraulic residence time.

C = \frac{W}{Q + kV}

You give

MeaningUnitExample
W
Total pollutant input (load)kg/s100 kg/day
Q
Outflow ratem^3/s10 m^3/s
k
First-order decay constant (0 if conservative)1/s0.2 1/day
V
Lake volumem^310000000 m^3

You get

MeaningUnitExample
C
Steady-state concentrationkg/m^33.491620112e-05 kg/m^3
C_{\mathrm{mgL}}
In mg/L—0.03491620112
\tau
Hydraulic residence time V/Qs1000000 s

Values with a unit may be written in any unit of the right kind.

Applies when

  • completely mixed
  • steady state

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Lake steady-state concentration: W = 100 kg/d, Q = 10 m^3/s, k = 0.2 1/d, V = 10000000 m^3
C = 3.491620112e-05 kg/m^3
C_mgL = 0.03491620112
tau = 1000000 s

Run it

Terminal
$ environmental-engineering solve enveng_lake_steady_state "W=100 kg/day" "Q=10 m^3/s" "k=0.2 1/day" "V=10000000 m^3"
C = 3.491620112e-05 kg/m^3
C_mgL = 0.03491620112
tau = 1000000 s
  by: Steady-state concentration in a well-mixed lake (first-order decay)  (0 = W - Q C - k C V, C = W/(Q + k V))
  W = 0.001157407407 kg/s
  Q = 10 m^3/s
  k = 2.314814815e-06 1/s
  V = 10000000 m^3
  assumes: completely mixed; steady state

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Stream reaeration coefficient (O'Connor-Dobbins, Churchill, Owens-Gibbs)2 fig.enveng_reaeration_coefficient

The reaeration rate constant of a stream at 20 degC from its mean velocity and depth by a chosen empirical formula.

k_a = \frac{3.93\,u^{0.5}}{H^{1.5}}\ \text{(O'Connor-Dobbins)}

You give

MeaningUnitExample
\text{method}
o_connor_dobbins, churchill or owens_gibbs choice—o_connor_dobbins
u
Mean stream velocitym/s0.3 m/s
H
Mean depthm2 m

You get

MeaningUnitExample
\text{ka}
Reaeration rate constant at 20 degC1/s8.808347541e-06 1/s
\text{ka\_per\_day}
In 1/d—0.7610412275

Values with a unit may be written in any unit of the right kind.

Applies when

  • u in m/s and H in m inside the formula constants

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Reaeration coefficient: method = o_connor_dobbins, u = 0.3 m/s, H = 2 m
ka = 8.808347541e-06 1/s
ka_per_day = 0.7610412275

Run it

Terminal
$ environmental-engineering solve enveng_reaeration_coefficient method=o_connor_dobbins "u=0.3 m/s" "H=2 m"
ka = 8.808347541e-06 1/s
ka_per_day = 0.7610412275
  by: Stream reaeration coefficient (O'Connor-Dobbins, Churchill, Owens-Gibbs)  (ka = 3.93 u^0.5/H^1.5 (O'Connor-Dobbins), 5.026 u/H^1.67 (Churchill), 5.32 u^0.67/H^1.85 (Owens-Gibbs), per day)
  u = 0.3 m/s
  H = 2 m
  method = o_connor_dobbins
  assumes: u in m/s and H in m inside the formula constants

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Streeter-Phelps oxygen deficit and dissolved oxygen at a travel time2 fig.enveng_streeter_phelps_deficit

The dissolved-oxygen deficit and the dissolved oxygen of a river at a travel time downstream of a BOD discharge (Streeter-Phelps oxygen sag).

D = \frac{k_d L_0}{k_a – k_d}\left(e^{-k_d t} – e^{-k_a t}\right) + D_0 e^{-k_a t}

You give

MeaningUnitExample
\text{kd}
Deoxygenation rate constant1/s0.23 1/day
\text{ka}
Reaeration rate constant1/s0.46 1/day
\text{L0}
Ultimate BOD of the mixed river water at the outfallkg/m^310 mg/L
\text{D0}
Oxygen deficit at the outfall (DOsat – DO)kg/m^31 mg/L
t
Travel time from the outfalls2 day
\text{DOsat}
Saturation dissolved oxygenkg/m^39.1 mg/L

You get

MeaningUnitExample
D
Oxygen deficit at tkg/m^30.002726165085 kg/m^3
\text{DO}
Dissolved oxygen at tkg/m^30.006373834915 kg/m^3
D_{\mathrm{mgL}}
Deficit in mg/L—2.726165085
\text{DO\_mgL}
Dissolved oxygen in mg/L—6.373834915

Values with a unit may be written in any unit of the right kind.

Applies when

  • first-order deoxygenation and reaeration
  • plug flow
  • deficit stays below saturation

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Streeter-Phelps oxygen deficit: kd = 0.23 1/d, ka = 0.46 1/d, L0 = 10 mg/L, D0 = 1 mg/L, t = 2 d, DOsat = 9.1 mg/L
D = 0.002726165085 kg/m^3
DO = 0.006373834915 kg/m^3
D_mgL = 2.726165085
DO_mgL = 6.373834915

Run it

Terminal
$ environmental-engineering solve enveng_streeter_phelps_deficit "kd=0.23 1/day" "ka=0.46 1/day" "L0=10 mg/L" "D0=1 mg/L" "t=2 day" "DOsat=9.1 mg/L"
D = 0.002726165085 kg/m^3
DO = 0.006373834915 kg/m^3
D_mgL = 2.726165085
DO_mgL = 6.373834915
  by: Streeter-Phelps oxygen deficit and dissolved oxygen at a travel time  (D = kd L0/(ka - kd) (e^(-kd t) - e^(-ka t)) + D0 e^(-ka t); for ka = kd, D = (kd L0 t + D0) e^(-kd t))
  kd = 2.662037037e-06 1/s
  ka = 5.324074074e-06 1/s
  L0 = 0.01 kg/m^3
  D0 = 0.001 kg/m^3
  t = 172800 s
  DOsat = 0.0091 kg/m^3
  assumes: first-order deoxygenation and reaeration; plug flow; deficit stays below saturation

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Temperature correction of a rate constant (theta model)1 fig.enveng_rate_constant_temperature

A first-order rate constant (BOD, reaeration, decay) at temperature T from its 20 degC value and the temperature coefficient theta.

k_T = k_{20}\,\theta^{\,T – 20}

You give

MeaningUnitExample
\text{k20}
Rate constant at 20 degC1/s0.23 1/day
\theta
Temperature coefficient (1.047 BOD, 1.024 reaeration)—1.047
T
Water temperatureK25 degC

You get

MeaningUnitExample
\text{kT}
Rate constant at T1/s3.349249506e-06 1/s
\text{kT\_per\_day}
Rate constant in 1/d—0.2893751573

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0.9 < theta < 1.2
  • -5 degC <= T <= 60 degC

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Rate constant temperature correction: k20 = 0.23 1/d, theta = 1.047, T = 25 degC
kT = 3.349249506e-06 1/s
kT_per_day = 0.2893751573

Run it

Terminal
$ environmental-engineering solve enveng_rate_constant_temperature "k20=0.23 1/day" theta=1.047 "T=25 degC"
kT = 3.349249506e-06 1/s
kT_per_day = 0.2893751573
  by: Temperature correction of a rate constant (theta model)  (kT = k20 theta^(T - 20))
  k20 = 2.662037037e-06 1/s
  theta = 1.047
  T = 298.15 K
  assumes: 0.9 < theta < 1.2; -5 degC <= T <= 60 degC

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Theoretical oxygen demand of an organic compound1 fig.enveng_theoretical_oxygen_demand

The theoretical oxygen demand (g O2 per g compound) of a compound CaHbOcNd oxidised to CO2 and water, with its nitrogen released as ammonia or, with nitrification, oxidised to nitrate.

\text{ThOD} = \frac{\left(a + \frac b4 – \frac c2 – \frac{3d}{4}\right)M_{O_2}}{M}

You give

MeaningUnitExample
\text{formula}
Molecular formula with C, H, O, N only (e.g. C6H12O6) text—C6H12O6
\text{nitrification}
Include the oxygen to nitrify ammonia (yes) or not (no) choice—no

You get

MeaningUnitExample
\text{thod}
Theoretical oxygen demand, g O2 per g compound—1.065703767
\text{o2\_per\_mol}
mol O2 per mol compound—6
\text{molar\_mass}
Molar mass, g/mol—180.15588

Applies when

  • elements C, H, O, N only
  • b >= 3d

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Theoretical oxygen demand: formula = C6H12O6, nitrification = no
thod = 1.065703767
o2_per_mol = 6
molar_mass = 180.15588

Run it

Terminal
$ environmental-engineering solve enveng_theoretical_oxygen_demand formula=C6H12O6 nitrification=no
thod = 1.065703767
o2_per_mol = 6
molar_mass = 180.15588
  by: Theoretical oxygen demand of an organic compound  (CaHbOcNd + (a + b/4 - c/2 - 3d/4) O2 -> a CO2 + (b - 3d)/2 H2O + d NH3; nitrification adds 2d O2)
  formula = C6H12O6
  nitrification = no
  assumes: elements C, H, O, N only; b >= 3d

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Ultimate BOD from a BOD test1 fig.enveng_ultimate_bod

The ultimate carbonaceous BOD from a BOD measured after t days (e.g. BOD5) and the rate constant.

L_0 = \frac{BOD_t}{1 – e^{-kt}}

You give

MeaningUnitExample
\text{BOD\_t}
BOD measured after time t (e.g. BOD5)kg/m^3200 mg/L
k
BOD rate constant (base e)1/s0.23 1/day
t
Incubation times5 day

You get

MeaningUnitExample
\text{L0}
Ultimate BODkg/m^30.2926701219 kg/m^3
\text{L0\_mgL}
Ultimate BOD in mg/L—292.6701219

Values with a unit may be written in any unit of the right kind.

Applies when

  • first-order kinetics

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Ultimate BOD: BOD_t = 200 mg/L, k = 0.23 1/d, t = 5 d
L0 = 0.2926701219 kg/m^3
L0_mgL = 292.6701219

Run it

Terminal
$ environmental-engineering solve enveng_ultimate_bod "BOD_t=200 mg/L" "k=0.23 1/day" "t=5 day"
L0 = 0.2926701219 kg/m^3
L0_mgL = 292.6701219
  by: Ultimate BOD from a BOD test  (L0 = BOD_t/(1 - e^(-k t)))
  BOD_t = 0.2 kg/m^3
  k = 2.662037037e-06 1/s
  t = 432000 s
  assumes: first-order kinetics

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Water treatment 26

Activated carbon dose from the Freundlich isotherm1 fig.enveng_freundlich_carbon_dose

The equilibrium adsorbent loading from the Freundlich isotherm q = K Ce^(1/n) (q in mg/g, Ce in mg/L) and the batch carbon dose that lowers C0 to Ce.

q_e = K C_e^{1/n},\quad \frac{m}{V} = \frac{C_0 – C_e}{q_e}

You give

MeaningUnitExample
\text{C0}
Initial concentrationkg/m^310 mg/L
\text{Ce}
Target equilibrium concentrationkg/m^31 mg/L
K
Freundlich capacity factor, (mg/g)(L/mg)^(1/n)—50
n
Freundlich exponent n (isotherm exponent 1/n)—2

You get

MeaningUnitExample
\text{qe}
Equilibrium loading, mg/g—50
\text{dose}
Adsorbent dosekg/m^30.18 kg/m^3
\text{dose\_mgL}
Dose in mg/L—180

Values with a unit may be written in any unit of the right kind.

Applies when

  • Ce < C0
  • batch equilibrium

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Freundlich carbon dose: C0 = 10 mg/L, Ce = 1 mg/L, K = 50, n = 2
qe = 50
dose = 0.18 kg/m^3
dose_mgL = 180

Run it

Terminal
$ environmental-engineering solve enveng_freundlich_carbon_dose "C0=10 mg/L" "Ce=1 mg/L" K=50 n=2
qe = 50
dose = 0.18 kg/m^3
dose_mgL = 180
  by: Activated carbon dose from the Freundlich isotherm  (qe = K Ce^(1/n); dose = (C0 - Ce)/qe)
  C0 = 0.01 kg/m^3
  Ce = 0.001 kg/m^3
  K = 50
  n = 2
  assumes: Ce < C0; batch equilibrium

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Adsorbent dose from the Langmuir isotherm1 fig.enveng_langmuir_carbon_dose

The equilibrium loading from the Langmuir isotherm q = qmax b Ce/(1 + b Ce) (q in mg/g, Ce in mg/L) and the batch adsorbent dose that lowers C0 to Ce.

q_e = \frac{q_{max}bC_e}{1 + bC_e},\quad \frac{m}{V} = \frac{C_0 – C_e}{q_e}

You give

MeaningUnitExample
\text{C0}
Initial concentrationkg/m^310 mg/L
\text{Ce}
Target equilibrium concentrationkg/m^31 mg/L
\text{qmax}
Langmuir monolayer capacity, mg/g—150
b
Langmuir constant, L/mg—0.8

You get

MeaningUnitExample
\text{qe}
Equilibrium loading, mg/g—66.66666667
\text{dose}
Adsorbent dosekg/m^30.135 kg/m^3
\text{dose\_mgL}
Dose in mg/L—135

Values with a unit may be written in any unit of the right kind.

Applies when

  • Ce < C0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Langmuir adsorbent dose: C0 = 10 mg/L, Ce = 1 mg/L, qmax = 150, b = 0.8
qe = 66.66666667
dose = 0.135 kg/m^3
dose_mgL = 135

Run it

Terminal
$ environmental-engineering solve enveng_langmuir_carbon_dose "C0=10 mg/L" "Ce=1 mg/L" qmax=150 b=0.8
qe = 66.66666667
dose = 0.135 kg/m^3
dose_mgL = 135
  by: Adsorbent dose from the Langmuir isotherm  (qe = qmax b Ce/(1 + b Ce); dose = (C0 - Ce)/qe)
  C0 = 0.01 kg/m^3
  Ce = 0.001 kg/m^3
  qmax = 150
  b = 0.8
  assumes: Ce < C0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Chlorine dose and feed rate1 fig.enveng_chlorine_dose_feed

The chlorine dose (demand plus residual), the chlorine feed rate for a flow and the feed of a product with a stated available-chlorine fraction (e.g. 65 % calcium hypochlorite).

\dot m = Q\,(\text{demand} + \text{residual}),\quad \dot m_{product} = \frac{\dot m}{p}

You give

MeaningUnitExample
Q
Flow treatedm^3/s20000 m^3/day
\text{demand}
Chlorine demandkg/m^32.5 mg/L
\text{residual}
Required free chlorine residualkg/m^30.5 mg/L
\text{purity}
Available chlorine fraction of the product (1 for chlorine gas; fraction or %)—1

You get

MeaningUnitExample
\text{dose}
Chlorine dosekg/m^30.003 kg/m^3
\text{dose\_mgL}
Dose in mg/L—3
\text{feed}
Chlorine feed ratekg/s0.0006944444444 kg/s
\text{feed\_kg\_per\_day}
Chlorine feed in kg/d—60
\text{product\_kg\_per\_day}
Product feed in kg/d—60

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0 < purity <= 1

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Chlorine dose and feed rate: Q = 20000 m^3/d, demand = 2.5 mg/L, residual = 0.5 mg/L, purity = 1
dose = 0.003 kg/m^3
dose_mgL = 3
feed = 0.0006944444444 kg/s
feed_kg_per_day = 60
product_kg_per_day = 60

Run it

Terminal
$ environmental-engineering solve enveng_chlorine_dose_feed "Q=20000 m^3/day" "demand=2.5 mg/L" "residual=0.5 mg/L" purity=1
dose = 0.003 kg/m^3
dose_mgL = 3
feed = 0.0006944444444 kg/s
feed_kg_per_day = 60
product_kg_per_day = 60
  by: Chlorine dose and feed rate  (dose = demand + residual; feed = Q dose; product = feed/purity)
  Q = 0.2314814815 m^3/s
  demand = 0.0025 kg/m^3
  residual = 0.0005 kg/m^3
  purity = 1
  assumes: 0 < purity <= 1

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Clean-bed head loss through a granular filter (Ergun / Carman-Kozeny)1 fig.enveng_filter_clean_bed_headloss

The head loss through a clean granular filter bed from the grain size, sphericity, porosity, depth and filtration rate (Ergun equation, the Carman-Kozeny form with friction factor 150/Re + 1.75).

\frac{h}{L} = \frac{150\mu(1-\varepsilon)^2 v}{\rho g\varepsilon^3(\psi d)^2} + \frac{1.75(1-\varepsilon)v^2}{g\varepsilon^3\psi d}

You give

MeaningUnitExample
d
Grain diameterm0.5 mm
\text{eps}
Bed porosity (fraction)—0.4
\psi
Grain sphericity (fraction, 1 for spheres)—0.85
L
Bed depthm0.7 m
v
Filtration (approach) velocitym/s8 m/h
\rho
Water densitykg/m^3998.2 kg/m^3
\mu
Water viscosityPa*s0.001002 Pa*s

You get

MeaningUnitExample
\text{dP}
Pressure dropPa7414.170928 Pa
h
Head lossm0.7573983471 m
\text{Re}
Bed Reynolds number rho v psi d/(mu (1 – eps))—1.568104532

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0 < eps < 1
  • 0 < psi <= 1
  • clean bed

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Filter clean-bed head loss: d = 0.5 mm, eps = 0.4, psi = 0.85, L = 0.7 m, v = 8 m/h, rho = 998.2 kg/m^3, mu = 0.001002 Pa*s
dP = 7414.170928 Pa
h = 0.7573983471 m
Re = 1.568104532

Run it

Terminal
$ environmental-engineering solve enveng_filter_clean_bed_headloss "d=0.5 mm" eps=0.4 psi=0.85 "L=0.7 m" "v=8 m/h" "rho=998.2 kg/m^3" "mu=0.001002 Pa*s"
dP = 7414.170928 Pa
h = 0.7573983471 m
Re = 1.568104532
  by: Clean-bed head loss through a granular filter (Ergun / Carman-Kozeny)  (dP/L = 150 mu (1-eps)^2 v/(eps^3 (psi d)^2) + 1.75 rho (1-eps) v^2/(eps^3 psi d); h = dP/(rho g))
  d = 0.0005 m
  eps = 0.4
  psi = 0.85
  L = 0.7 m
  v = 0.002222222222 m/s
  rho = 998.2 kg/m^3
  mu = 0.001002 Pa*s
  assumes: 0 < eps < 1; 0 < psi <= 1; clean bed

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Disinfection by the Chick-Watson law1 fig.enveng_chick_watson

The survival fraction and log inactivation of organisms exposed to a disinfectant concentration C for time t under ln(N/N0) = -k C^n t (k in (L/mg)^n per minute, C in mg/L, t in minutes inside the law).

\ln\frac{N}{N_0} = -k\,C^n t

You give

MeaningUnitExample
k
Chick-Watson coefficient in (L/mg)^n per minute—0.1
n
Coefficient of dilution (1 for most disinfectants)—1
C
Disinfectant concentrationkg/m^31 mg/L
t
Contact times30 min

You get

MeaningUnitExample
\text{survival}
N/N0—0.04978706837
\text{log\_inactivation}
log10 inactivation—1.302883446

Values with a unit may be written in any unit of the right kind.

Applies when

  • constant concentration
  • 0.3 <= n <= 3

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Chick-Watson inactivation: k = 0.1, n = 1, C = 1 mg/L, t = 30 min
survival = 0.04978706837
log_inactivation = 1.302883446

Run it

Terminal
$ environmental-engineering solve enveng_chick_watson k=0.1 n=1 "C=1 mg/L" "t=30 min"
survival = 0.04978706837
log_inactivation = 1.302883446
  by: Disinfection by the Chick-Watson law  (ln(N/N0) = -k C^n t with C in mg/L and t in minutes)
  k = 0.1
  n = 1
  C = 0.001 kg/m^3
  t = 1800 s
  assumes: constant concentration; 0.3 <= n <= 3

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Disinfection CT value of a contact basin1 fig.enveng_disinfection_ct

The effective contact time t10 of a basin (baffling factor times the theoretical detention time) and the CT value of a disinfectant residual.

CT = C\,t_{10} = C\,BF\,\frac{V}{Q}

You give

MeaningUnitExample
C
Disinfectant residual at the outletkg/m^31 mg/L
V
Basin volumem^31000 m^3
Q
Peak flowm^3/s20000 m^3/day
\text{BF}
Baffling factor t10/T (0.1 unbaffled to 1 plug flow)—0.5

You get

MeaningUnitExample
\text{t10}
Effective contact times2160 s
\text{CT}
CT valuekg*s/m^32.16 kg*s/m^3
\text{CT\_mg\_min\_L}
CT in mg min/L—36

Values with a unit may be written in any unit of the right kind.

Applies when

  • 0 < BF <= 1

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Disinfection CT: C = 1 mg/L, V = 1000 m^3, Q = 20000 m^3/d, BF = 0.5
t10 = 2160 s
CT = 2.16 kg*s/m^3
CT_mg_min_L = 36

Run it

Terminal
$ environmental-engineering solve enveng_disinfection_ct "C=1 mg/L" "V=1000 m^3" "Q=20000 m^3/day" BF=0.5
t10 = 2160 s
CT = 2.16 kg*s/m^3
CT_mg_min_L = 36
  by: Disinfection CT value of a contact basin  (t10 = BF V/Q; CT = C t10)
  C = 0.001 kg/m^3
  V = 1000 m^3
  Q = 0.2314814815 m^3/s
  BF = 0.5
  assumes: 0 < BF <= 1

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Filter bed expansion during backwash1 fig.enveng_backwash_bed_expansion

The expanded porosity, expanded depth and percentage expansion of a filter bed fluidised by backwash, from the backwash rate and the grains' settling velocity (expanded porosity (vb/vs)^0.22).

\varepsilon_e = \left(\frac{v_b}{v_s}\right)^{0.22},\quad L_e = \frac{L(1-\varepsilon)}{1-\varepsilon_e}

You give

MeaningUnitExample
L
Unexpanded bed depthm0.7 m
\text{eps}
Unexpanded porosity (fraction)—0.42
\text{vb}
Backwash ratem/s50 m/h
\text{vs}
Settling velocity of the grainsm/s300 m/h

You get

MeaningUnitExample
\text{eps\_e}
Expanded porosity—0.6742279077
\text{Le}
Expanded bed depthm1.246270045 m
\text{expansion}
Fractional expansion Le/L – 1—0.780385778

Values with a unit may be written in any unit of the right kind.

Applies when

  • the bed is fluidised: eps < (vb/vs)^0.22 < 1

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Backwash bed expansion: L = 0.7 m, eps = 0.42, vb = 50 m/h, vs = 300 m/h
eps_e = 0.6742279077
Le = 1.246270045 m
expansion = 0.780385778

Run it

Terminal
$ environmental-engineering solve enveng_backwash_bed_expansion "L=0.7 m" eps=0.42 "vb=50 m/h" "vs=300 m/h"
eps_e = 0.6742279077
Le = 1.246270045 m
expansion = 0.780385778
  by: Filter bed expansion during backwash  (eps_e = (vb/vs)^0.22; Le = L (1 - eps)/(1 - eps_e))
  L = 0.7 m
  eps = 0.42
  vb = 0.01388888889 m/s
  vs = 0.08333333333 m/s
  assumes: the bed is fluidised: eps < (vb/vs)^0.22 < 1

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Filtration (hydraulic loading) rate with one filter out of service1 fig.enveng_filtration_rate

The filtration rate of a bank of identical filters, with all in service and with one out of service (for backwashing).

v = \frac{Q}{NA},\quad v' = \frac{Q}{(N-1)A}

You give

MeaningUnitExample
Q
Plant flowm^3/s40000 m^3/day
A
Area of one filterm^250 m^2
N
Number of filters—6

You get

MeaningUnitExample
v
Filtration rate with all filtersm/s0.001543209877 m/s
v_{m,\mathrm{per},h}
In m/h—5.555555556
v_{\mathrm{one},\mathrm{out}}
Rate with one filter out of servicem/s0.001851851852 m/s
v_{\mathrm{one},\mathrm{out},m,\mathrm{per},h}
In m/h—6.666666667

Values with a unit may be written in any unit of the right kind.

Applies when

  • N >= 2 identical filters

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Filtration rate: Q = 40000 m^3/d, A = 50 m^2, N = 6
v = 0.001543209877 m/s
v_m_per_h = 5.555555556
v_one_out = 0.001851851852 m/s
v_one_out_m_per_h = 6.666666667

Run it

Terminal
$ environmental-engineering solve enveng_filtration_rate "Q=40000 m^3/day" "A=50 m^2" N=6
v = 0.001543209877 m/s
v_m_per_h = 5.555555556
v_one_out = 0.001851851852 m/s
v_one_out_m_per_h = 6.666666667
  by: Filtration (hydraulic loading) rate with one filter out of service  (v = Q/(N A); v' = Q/((N - 1) A))
  Q = 0.462962963 m^3/s
  A = 50 m^2
  assumes: N >= 2 identical filters

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Fraction of discrete particles removed in an ideal settling basin1 fig.enveng_ideal_basin_removal

The overflow rate of an ideal (Camp) settling basin and the fraction of particles of one settling velocity it removes (all if vs ≥ v0, otherwise vs/v0).

R = \min\left(1, \frac{v_s}{v_0}\right)

You give

MeaningUnitExample
\text{vs}
Settling velocity of the particlesm/s0.5 m/h
Q
Flowm^3/s10000 m^3/day
A
Basin surface aream^2400 m^2

You get

MeaningUnitExample
\text{v0}
Overflow rate Q/Am/s0.0002893518519 m/s
R
Fraction removed—0.48

Values with a unit may be written in any unit of the right kind.

Applies when

  • ideal basin, discrete (type I) settling

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Ideal settling basin removal: vs = 0.5 m/h, Q = 10000 m^3/d, A = 400 m^2
v0 = 0.0002893518519 m/s
R = 0.48

Run it

Terminal
$ environmental-engineering solve enveng_ideal_basin_removal "vs=0.5 m/h" "Q=10000 m^3/day" "A=400 m^2"
v0 = 0.0002893518519 m/s
R = 0.48
  by: Fraction of discrete particles removed in an ideal settling basin  (v0 = Q/A; R = min(1, vs/v0))
  vs = 0.0001388888889 m/s
  Q = 0.1157407407 m^3/s
  A = 400 m^2
  assumes: ideal basin, discrete (type I) settling

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Fraction of free chlorine as hypochlorous acid (pH)2 fig.enveng_hypochlorous_acid_fraction

The fractions of free chlorine present as HOCl and as OCl- at a pH, from the acid dissociation constant (given, or from the temperature by Morris' correlation).

\alpha_{HOCl} = \frac{1}{1 + 10^{\,pH – pK_a}}

You give

MeaningUnitExample
\text{pH}
PH of the water—7
\text{pKa}
PKa of HOCl (7.54 at 25 degC) optional—7.54
T
Water temperature (to compute pKa instead) optionalK

You get

MeaningUnitExample
\alpha_{\mathrm{HOCl}}
Fraction as HOCl—0.7761545753
\alpha_{\mathrm{OCl}}
Fraction as OCl-—0.2238454247
\text{pKa}
PKa used—7.54

Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.

Applies when

  • either pKa or T
  • 0-35 degC for the correlation

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Hypochlorous acid fraction: pH = 7, pKa = 7.54
alpha_HOCl = 0.7761545753
alpha_OCl = 0.2238454247
pKa = 7.54

Run it

Terminal
$ environmental-engineering solve enveng_hypochlorous_acid_fraction pH=7 pKa=7.54
alpha_HOCl = 0.7761545753
alpha_OCl = 0.2238454247
pKa = 7.54
  by: Fraction of free chlorine as hypochlorous acid (pH)  (alpha_HOCl = 1/(1 + 10^(pH - pKa)); pKa = 3000/T - 10.0686 + 0.0253 T (Morris))
  pH = 7
  pKa = 7.54
  assumes: either pKa or T; 0-35 degC for the correlation

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Freundlich isotherm constants fitted to adsorption data1 fig.enveng_freundlich_fit

The Freundlich constants K and 1/n fitted by linear regression of log q against log Ce, with the coefficient of determination.

\log q_e = \log K + \frac1n\log C_e

You give

MeaningUnitExample
\text{Ce}
Equilibrium concentrations in mg/L vector—[0.5, 1, 2, 5, 10]
\text{qe}
Equilibrium loadings in mg/g (same order) vector—[28, 40, 55, 86, 120]

You get

MeaningUnitExample
K
Freundlich K, (mg/g)(L/mg)^(1/n)—39.47623429
\text{inv\_n}
Isotherm exponent 1/n—0.483576413
n
Freundlich n—2.067925509
\text{r2}
Coefficient of determination of the log-log fit—0.9998093398

Applies when

  • at least three positive points

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Freundlich isotherm fit: Ce = [0.5, 1, 2, 5, 10], qe = [28, 40, 55, 86, 120]
K = 39.47623429
inv_n = 0.483576413
n = 2.067925509
r2 = 0.9998093398

Run it

Terminal
$ environmental-engineering solve enveng_freundlich_fit "Ce=[0.5, 1, 2, 5, 10]" "qe=[28, 40, 55, 86, 120]"
K = 39.47623429
inv_n = 0.483576413
n = 2.067925509
r2 = 0.9998093398
  by: Freundlich isotherm constants fitted to adsorption data  (least squares of log10 q = log10 K + (1/n) log10 Ce)
  assumes: at least three positive points

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Hydraulic detention time2 fig.enveng_detention_time

The hydraulic detention (residence) time of a tank or basin from its volume and the flow.

\theta = \frac{V}{Q}

You give

MeaningUnitExample
V
Tank volumem^31000 m^3
Q
Flow ratem^3/s12000 m^3/day

You get

MeaningUnitExample
\theta
Detention time V/Qs7200 s
\theta_{h}
Detention time in hours—2

Values with a unit may be written in any unit of the right kind.

Applies when

  • V, Q > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Detention time: V = 1000 m^3, Q = 12000 m^3/d
theta = 7200 s
theta_h = 2

Run it

Terminal
$ environmental-engineering solve enveng_detention_time "V=1000 m^3" "Q=12000 m^3/day"
theta = 7200 s
theta_h = 2
  by: Hydraulic detention time  (theta = V/Q)
  V = 1000 m^3
  Q = 0.1388888889 m^3/s
  assumes: V, Q > 0

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Langmuir isotherm constants fitted to adsorption data1 fig.enveng_langmuir_fit

The Langmuir capacity qmax and constant b fitted by linear regression of Ce/q against Ce (linearised Langmuir form), with the coefficient of determination.

\frac{C_e}{q_e} = \frac{1}{q_{max}b} + \frac{C_e}{q_{max}}

You give

MeaningUnitExample
\text{Ce}
Equilibrium concentrations in mg/L vector—[0.5, 1, 2, 5, 10]
\text{qe}
Equilibrium loadings in mg/g (same order) vector—[40, 66, 97, 133, 152]

You get

MeaningUnitExample
\text{qmax}
Monolayer capacity, mg/g—177.9004838
b
Langmuir constant, L/mg—0.5896757373
\text{r2}
Coefficient of determination of the linearised fit—0.9999728233

Applies when

  • positive slope and intercept of Ce/q against Ce

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Langmuir isotherm fit: Ce = [0.5, 1, 2, 5, 10], qe = [40, 66, 97, 133, 152]
qmax = 177.9004838
b = 0.5896757373
r2 = 0.9999728233

Run it

Terminal
$ environmental-engineering solve enveng_langmuir_fit "Ce=[0.5, 1, 2, 5, 10]" "qe=[40, 66, 97, 133, 152]"
qmax = 177.9004838
b = 0.5896757373
r2 = 0.9999728233
  by: Langmuir isotherm constants fitted to adsorption data  (least squares of Ce/q = 1/(qmax b) + Ce/qmax)
  assumes: positive slope and intercept of Ce/q against Ce

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Log inactivation from the CT ratio1 fig.enveng_ct_log_inactivation

The CT achieved, the ratio to the CT required for 3-log (99.9 %) inactivation from the regulatory tables, and the log inactivation credited (3 times the ratio).

\text{log inactivation} = 3\,\frac{C t_{10}}{CT_{99.9}}

You give

MeaningUnitExample
C
Disinfectant residualkg/m^31.2 mg/L
\text{t10}
Effective contact times40 min
\text{CT999}
CT required for 3-log inactivation (from the tables)kg*s/m^3104 mg*min/L

You get

MeaningUnitExample
\text{CT}
CT achievedkg*s/m^32.88 kg*s/m^3
\text{ratio}
CT achieved / CT for 3-log—0.4615384615
\text{log\_inactivation}
Log inactivation credited—1.384615385

Values with a unit may be written in any unit of the right kind.

Applies when

  • first-order (Chick-Watson) inactivation with n = 1

Outside these conditions it says what is wrong instead of returning a number.

Worked example

CT log inactivation: C = 1.2 mg/L, t10 = 40 min, CT999 = 104 mg*min/L
CT = 2.88 kg*s/m^3
ratio = 0.4615384615
log_inactivation = 1.384615385

Run it

Terminal
$ environmental-engineering solve enveng_ct_log_inactivation "C=1.2 mg/L" "t10=40 min" "CT999=104 mg*min/L"
CT = 2.88 kg*s/m^3
ratio = 0.4615384615
log_inactivation = 1.384615385
  by: Log inactivation from the CT ratio  (log inactivation = 3 CT/CT_99.9)
  C = 0.0012 kg/m^3
  t10 = 2400 s
  CT999 = 6.24 kg*s/m^3
  assumes: first-order (Chick-Watson) inactivation with n = 1

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Log removal and percentage removal2 fig.enveng_log_removal

The log10 removal (log reduction value) and the percentage removal from the counts or concentrations before and after treatment.

LR = \log_{10}\frac{N_0}{N}

You give

MeaningUnitExample
\text{N0}
Count or concentration before treatment—1000000
N
Count or concentration after treatment (same unit)—100

You get

MeaningUnitExample
\text{log\_removal}
log10 removal—4
\text{percent\_removal}
Percentage removed—99.99

Applies when

  • 0 < N < N0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Log removal: N0 = 1000000, N = 100
log_removal = 4
percent_removal = 99.99

Run it

Terminal
$ environmental-engineering solve enveng_log_removal N0=1000000 N=100
log_removal = 4
percent_removal = 99.99
  by: Log removal and percentage removal  (LR = log10(N0/N); percent = (1 - N/N0) 100)
  N0 = 1000000
  N = 100
  assumes: 0 < N < N0

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Mean velocity gradient G (rapid mixing and flocculation)1 fig.enveng_velocity_gradient

The root-mean-square velocity gradient G of a mixing or flocculation tank from the power dissipated, the viscosity and the volume, and the Camp number G t when the detention time is given.

G = \sqrt{\frac{P}{\mu V}}

You give

MeaningUnitExample
P
Power dissipated in the waterW2000 W
\mu
Water viscosityPa*s0.001002 Pa*s
V
Tank volumem^350 m^3
t
Detention time (for G t) optionals

You get

MeaningUnitExample
G
Mean velocity gradient1/s199.8002995 1/s
\text{Gt}
Camp number G t (dimensionless)—

Values with a unit may be written in any unit of the right kind. An optional input can be left out: a stated default is used.

Applies when

  • P, mu, V > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Velocity gradient: P = 2000 W, mu = 0.001002 Pa*s, V = 50 m^3
G = 199.8002995 1/s

Run it

Terminal
$ environmental-engineering solve enveng_velocity_gradient "P=2000 W" "mu=0.001002 Pa*s" "V=50 m^3"
G = 199.8002995 1/s
  by: Mean velocity gradient G (rapid mixing and flocculation)  (G = sqrt(P/(mu V)); Camp number G t)
  P = 2000 W
  mu = 0.001002 Pa*s
  V = 50 m^3
  assumes: P, mu, V > 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Membrane recovery, rejection, flux and concentrate1 fig.enveng_membrane_mass_balance

The water recovery, solute rejection, permeate flux (also in L/(m² h)) and the concentrate flow and concentration of a membrane unit from the feed and permeate flows and concentrations and the membrane area.

r = \frac{Q_p}{Q_f},\ R = 1 – \frac{C_p}{C_f},\ C_c = \frac{Q_fC_f – Q_pC_p}{Q_f – Q_p}

You give

MeaningUnitExample
\text{Qf}
Feed flowm^3/s1000 m^3/day
\text{Qp}
Permeate flowm^3/s750 m^3/day
\text{Cf}
Feed concentrationkg/m^32000 mg/L
\text{Cp}
Permeate concentrationkg/m^350 mg/L
A
Membrane aream^21500 m^2

You get

MeaningUnitExample
\text{recovery}
Qp/Qf—0.75
\text{rejection}
1 – Cp/Cf—0.975
J
Permeate fluxm/s5.787037037e-06 m/s
J_{\mathrm{LMH}}
Flux in L/(m² h)—20.83333333
\text{Qc}
Concentrate flowm^3/s0.002893518519 m^3/s
\text{Cc}
Concentrate concentrationkg/m^37.85 kg/m^3
\text{Cc\_mgL}
Concentrate concentration in mg/L—7850

Values with a unit may be written in any unit of the right kind.

Applies when

  • Qp < Qf
  • Cp < Cf
  • steady state

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Membrane mass balance: Qf = 1000 m^3/d, Qp = 750 m^3/d, Cf = 2000 mg/L, Cp = 50 mg/L, A = 1500 m^2
recovery = 0.75
rejection = 0.975
J = 5.787037037e-06 m/s
J_LMH = 20.83333333
Qc = 0.002893518519 m^3/s
Cc = 7.85 kg/m^3

Run it

Terminal
$ environmental-engineering solve enveng_membrane_mass_balance "Qf=1000 m^3/day" "Qp=750 m^3/day" "Cf=2000 mg/L" "Cp=50 mg/L" "A=1500 m^2"
recovery = 0.75
rejection = 0.975
J = 5.787037037e-06 m/s
J_LMH = 20.83333333
Qc = 0.002893518519 m^3/s
Cc = 7.85 kg/m^3
Cc_mgL = 7850
  by: Membrane recovery, rejection, flux and concentrate  (r = Qp/Qf; R = 1 - Cp/Cf; J = Qp/A; Qc = Qf - Qp; Cc = (Qf Cf - Qp Cp)/Qc)
  Qf = 0.01157407407 m^3/s
  Qp = 0.008680555556 m^3/s
  Cf = 2 kg/m^3
  Cp = 0.05 kg/m^3
  A = 1500 m^2
  assumes: Qp < Qf; Cp < Cf; steady state

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Microbial inactivation by Chick's law (first order)1 fig.enveng_chick_law

The surviving organisms, survival fraction, log removal and percentage removal after a contact time under first-order (Chick's law) inactivation or die-off.

\frac{N}{N_0} = e^{-kt}

You give

MeaningUnitExample
\text{N0}
Initial organism concentration (count per volume, e.g. per 100 mL)—1000000
k
Inactivation (die-off) rate constant1/s0.2 1/min
t
Contact times30 min

You get

MeaningUnitExample
N
Surviving organisms, same unit as N0—2478.752177
\text{survival}
N/N0—0.002478752177
\text{log\_removal}
log10 removal—2.605766891
\text{percent\_removal}
Percentage removed—99.75212478

Values with a unit may be written in any unit of the right kind.

Applies when

  • first-order kinetics

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Chick's law inactivation: N0 = 1000000, k = 0.2 1/min, t = 30 min
N = 2478.752177
survival = 0.002478752177
log_removal = 2.605766891
percent_removal = 99.75212478

Run it

Terminal
$ environmental-engineering solve enveng_chick_law N0=1000000 "k=0.2 1/min" "t=30 min"
N = 2478.752177
survival = 0.002478752177
log_removal = 2.605766891
percent_removal = 99.75212478
  by: Microbial inactivation by Chick's law (first order)  (N = N0 e^(-k t); log removal = k t/ln 10)
  N0 = 1000000
  k = 0.003333333333 1/s
  t = 1800 s
  assumes: first-order kinetics

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Osmotic pressure of a dilute solution (van 't Hoff)1 fig.enveng_osmotic_pressure

The osmotic pressure of a dilute salt solution from its mass concentration, molar mass, van 't Hoff factor and temperature.

\pi = i\,\frac{C}{M}\,RT

You give

MeaningUnitExample
C
Solute mass concentrationkg/m^335 g/L
M
Solute molar masskg/mol58.44 g/mol
i
Van 't Hoff factor (ions per formula unit, 2 for NaCl)—2
T
TemperatureK298.15 K

You get

MeaningUnitExample
\pi
Osmotic pressurePa2969318.824 Pa
\pi_{\mathrm{bar}}
Osmotic pressure in bar—29.69318824

Values with a unit may be written in any unit of the right kind.

Applies when

  • dilute (ideal) solution

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Osmotic pressure: C = 35 g/L, M = 58.44 g/mol, i = 2, T = 298.15 K
pi = 2969318.824 Pa
pi_bar = 29.69318824

Run it

Terminal
$ environmental-engineering solve enveng_osmotic_pressure "C=35 g/L" "M=58.44 g/mol" i=2 "T=298.15 K"
pi = 2969318.824 Pa
pi_bar = 29.69318824
  by: Osmotic pressure of a dilute solution (van 't Hoff)  (pi = i (C/M) R T)
  C = 35 kg/m^3
  M = 0.05844 kg/mol
  i = 2
  T = 298.15 K
  assumes: dilute (ideal) solution

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Power needed for a target velocity gradient1 fig.enveng_mixing_power

The power that must be dissipated in a tank to give a target mean velocity gradient G.

P = G^2\mu V

You give

MeaningUnitExample
G
Target velocity gradient1/s700 1/s
\mu
Water viscosityPa*s0.001002 Pa*s
V
Tank volumem^310 m^3

You get

MeaningUnitExample
P
Power requiredW4909.8 W

Values with a unit may be written in any unit of the right kind.

Applies when

  • G, mu, V > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Mixing power: G = 700 1/s, mu = 0.001002 Pa*s, V = 10 m^3
P = 4909.8 W

Run it

Terminal
$ environmental-engineering solve enveng_mixing_power "G=700 1/s" "mu=0.001002 Pa*s" "V=10 m^3"
P = 4909.8 W
  by: Power needed for a target velocity gradient  (P = G^2 mu V)
  G = 700 1/s
  mu = 0.001002 Pa*s
  V = 10 m^3
  assumes: G, mu, V > 0

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Sedimentation basin sizing from overflow rate and detention time1 fig.enveng_sedimentation_basin_sizing

The surface area, volume, side-water depth and (circular) diameter of a settling basin from the design flow, the design overflow rate and the detention time.

A = \frac{Q}{v_0},\ V = Q\theta,\ h = v_0\theta

You give

MeaningUnitExample
Q
Design flowm^3/s15000 m^3/day
\text{v0}
Design overflow rate (surface loading)m/s40 m/day
\theta
Design detention times2 h

You get

MeaningUnitExample
A
Surface area Q/v0m^2375 m^2
V
Volume Q thetam^31250 m^3
\text{depth}
Depth V/A = v0 thetam3.333333333 m
D
Diameter of one circular basinm21.85096861 m

Values with a unit may be written in any unit of the right kind.

Applies when

  • one basin

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Sedimentation basin sizing: Q = 15000 m^3/d, v0 = 40 m/d, theta = 2 h
A = 375 m^2
V = 1250 m^3
depth = 3.333333333 m
D = 21.85096861 m

Run it

Terminal
$ environmental-engineering solve enveng_sedimentation_basin_sizing "Q=15000 m^3/day" "v0=40 m/day" "theta=2 h"
A = 375 m^2
V = 1250 m^3
depth = 3.333333333 m
D = 21.85096861 m
  by: Sedimentation basin sizing from overflow rate and detention time  (A = Q/v0; V = Q theta; depth = V/A; D = sqrt(4A/pi))
  Q = 0.1736111111 m^3/s
  v0 = 0.000462962963 m/s
  theta = 7200 s
  assumes: one basin

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Stokes settling velocity of a discrete particle1 fig.enveng_stokes_settling_velocity

The terminal settling velocity of a small spherical particle in water by Stokes' law, with the particle Reynolds number that confirms laminar settling.

v_s = \frac{g(\rho_p – \rho_w)d^2}{18\mu}

You give

MeaningUnitExample
d
Particle diameterm0.05 mm
\rho_{p}
Particle densitykg/m^32650 kg/m^3
\rho_{w}
Water densitykg/m^3998.2 kg/m^3
\mu
Water viscosityPa*s0.001002 Pa*s

You get

MeaningUnitExample
\text{vs}
Settling velocitym/s0.002245318318 m/s
\text{Re}
Particle Reynolds number—0.1118401569
\text{vs\_m\_per\_h}
In m/h—8.083145943

Values with a unit may be written in any unit of the right kind.

Applies when

  • Re <= 1
  • rho_p > rho_w

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Stokes settling velocity: d = 0.05 mm, rho_p = 2650 kg/m^3, rho_w = 998.2 kg/m^3, mu = 0.001002 Pa*s
vs = 0.002245318318 m/s
Re = 0.1118401569
vs_m_per_h = 8.083145943

Run it

Terminal
$ environmental-engineering solve enveng_stokes_settling_velocity "d=0.05 mm" "rho_p=2650 kg/m^3" "rho_w=998.2 kg/m^3" "mu=0.001002 Pa*s"
vs = 0.002245318318 m/s
Re = 0.1118401569
vs_m_per_h = 8.083145943
  by: Stokes settling velocity of a discrete particle  (vs = g (rho_p - rho_w) d^2/(18 mu))
  d = 5e-05 m
  rho_p = 2650 kg/m^3
  rho_w = 998.2 kg/m^3
  mu = 0.001002 Pa*s
  assumes: Re <= 1; rho_p > rho_w

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Surface overflow rate of a circular clarifier2 fig.enveng_overflow_rate_circular

The surface area and the surface overflow rate (surface loading) of a circular settling tank from the flow and the tank diameter.

v_0 = \frac{Q}{\pi D^2/4}

You give

MeaningUnitExample
Q
Flow ratem^3/s10000 m^3/day
D
Tank diameterm20 m

You get

MeaningUnitExample
A
Surface aream^2314.1592654 m^2
\text{v0}
Overflow rate Q/Am/s0.0003684142201 m/s
\text{v0\_m\_per\_day}
Overflow rate in m^3/(m^2 d)—31.83098862

Values with a unit may be written in any unit of the right kind.

Applies when

  • Q, D > 0

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Overflow rate of a circular clarifier: Q = 10000 m^3/d, D = 20 m
A = 314.1592654 m^2
v0 = 0.0003684142201 m/s
v0_m_per_day = 31.83098862

Run it

Terminal
$ environmental-engineering solve enveng_overflow_rate_circular "Q=10000 m^3/day" "D=20 m"
A = 314.1592654 m^2
v0 = 0.0003684142201 m/s
v0_m_per_day = 31.83098862
  by: Surface overflow rate of a circular clarifier  (A = pi D^2/4; v0 = Q/A)
  Q = 0.1157407407 m^3/s
  D = 20 m
  assumes: Q, D > 0

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Terminal settling velocity in any flow regime (drag coefficient iteration)1 fig.enveng_terminal_settling_velocity

The terminal settling velocity of a sphere in a fluid for laminar, transitional or turbulent settling, solving the force balance with the drag law Cd = 24/Re + 3/sqrt(Re) + 0.34.

v_t = \sqrt{\frac{4g d(\rho_p – \rho_f)}{3C_D\rho_f}},\quad C_D = \frac{24}{Re} + \frac{3}{\sqrt{Re}} + 0.34

You give

MeaningUnitExample
d
Particle diameterm0.5 mm
\rho_{p}
Particle densitykg/m^32650 kg/m^3
\rho_{f}
Fluid densitykg/m^3998.2 kg/m^3
\mu
Fluid viscosityPa*s0.001002 Pa*s

You get

MeaningUnitExample
\text{vt}
Terminal settling velocitym/s0.09058056284 m/s
\text{Re}
Particle Reynolds number—45.11852187
\text{Cd}
Drag coefficient—1.318558136

Values with a unit may be written in any unit of the right kind.

Applies when

  • Re <= 2e5
  • rho_p > rho_f

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Terminal settling velocity: d = 0.5 mm, rho_p = 2650 kg/m^3, rho_f = 998.2 kg/m^3, mu = 0.001002 Pa*s
vt = 0.09058056284 m/s
Re = 45.11852187
Cd = 1.318558136

Run it

Terminal
$ environmental-engineering solve enveng_terminal_settling_velocity "d=0.5 mm" "rho_p=2650 kg/m^3" "rho_f=998.2 kg/m^3" "mu=0.001002 Pa*s"
vt = 0.09058056284 m/s
Re = 45.11852187
Cd = 1.318558136
  by: Terminal settling velocity in any flow regime (drag coefficient iteration)  (vt^2 Cd(Re) = (4/3) g d (rho_p - rho_f)/rho_f with Cd = 24/Re + 3/sqrt(Re) + 0.34, solved by bisection below the Stokes velocity)
  d = 0.0005 m
  rho_p = 2650 kg/m^3
  rho_f = 998.2 kg/m^3
  mu = 0.001002 Pa*s
  assumes: Re <= 2e5; rho_p > rho_f

Figure

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Water hardness as CaCO32 fig.enveng_water_hardness

Calcium, magnesium and total hardness expressed as mg/L of CaCO3 from the calcium and magnesium concentrations, with the usual classification (soft to very hard).

TH = Ca\,\frac{50.04}{20.04} + Mg\,\frac{50.04}{12.15}

You give

MeaningUnitExample
\text{Ca}
Calcium concentration (as Ca)kg/m^360 mg/L
\text{Mg}
Magnesium concentration (as Mg)kg/m^315 mg/L

You get

MeaningUnitExample
\text{total\_hardness}
Total hardness, mg/L as CaCO3—211.6074929
\text{calcium\_hardness}
Calcium hardness, mg/L as CaCO3—149.8381656
\text{magnesium\_hardness}
Magnesium hardness, mg/L as CaCO3—61.7693273
\text{classification}
Soft (< 60), moderately hard (60-120), hard (120-180), very hard (>= 180)—very hard

Values with a unit may be written in any unit of the right kind.

Applies when

  • only Ca and Mg contribute

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Water hardness: Ca = 60 mg/L, Mg = 15 mg/L
total_hardness = 211.6074929
calcium_hardness = 149.8381656
magnesium_hardness = 61.7693273
classification = very hard

Run it

Terminal
$ environmental-engineering solve enveng_water_hardness "Ca=60 mg/L" "Mg=15 mg/L"
total_hardness = 211.6074929
calcium_hardness = 149.8381656
magnesium_hardness = 61.7693273
classification = very hard
  by: Water hardness as CaCO3  (hardness = C (EW_CaCO3/EW_ion), EW_CaCO3 = 50.04, EW_Ca = 20.04, EW_Mg = 12.15)
  Ca = 0.06 kg/m^3
  Mg = 0.015 kg/m^3
  assumes: only Ca and Mg contribute

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Weir loading rate of a circular clarifier2 fig.enveng_weir_loading_rate

The weir length and weir loading rate of a circular clarifier with a peripheral weir.

WL = \frac{Q}{\pi D}

You give

MeaningUnitExample
Q
Flow ratem^3/s10000 m^3/day
D
Weir (tank) diameterm20 m

You get

MeaningUnitExample
\text{weir\_length}
Weir length pi Dm62.83185307 m
\text{WL}
Weir loading rate Q/(pi D)m^2/s0.001842071101 m^2/s
\text{WL\_m3\_per\_m\_day}
Weir loading in m^3/(m d)—159.1549431

Values with a unit may be written in any unit of the right kind.

Applies when

  • peripheral weir

Outside these conditions it says what is wrong instead of returning a number.

Worked example

Weir loading rate: Q = 10000 m^3/d, D = 20 m
weir_length = 62.83185307 m
WL = 0.001842071101 m^2/s
WL_m3_per_m_day = 159.1549431

Run it

Terminal
$ environmental-engineering solve enveng_weir_loading_rate "Q=10000 m^3/day" "D=20 m"
weir_length = 62.83185307 m
WL = 0.001842071101 m^2/s
WL_m3_per_m_day = 159.1549431
  by: Weir loading rate of a circular clarifier  (WL = Q/(pi D))
  Q = 0.1157407407 m^3/s
  D = 20 m
  assumes: peripheral weir

Figures

Each figure varies one input around the worked example and recomputes the result at every point. Press Compute above and they are redrawn for your own inputs.

Figures

Computed, not drawn by hand

Every point in these figures is an answer of the model: one input is varied, the others are held at the worked example, and the curve shows how the result responds. The marked point is the worked example itself.

Briggs plume rise and effective stack height (neutral or unstable air)

F = \frac{g v_s d^2 (T_s – T_a)}{4T_s},\quad \Delta h = \frac{1.6F^{1/3}x_f^{2/3}}{u}
dh against vs: Briggs plume rise and effective stack height (neutral or unstable air)dh (plume rise) against vs (stack gas exit velocity), with Ta = 288 K, Ts = 420 K, d = 3 m, hs = 100 m, u = 5 m/s. 31 points computed by environmental-engineering-ai999x; marked: vs = 15, dh = 125.638 m.10152080100120140160125.638 mvs — stack gas exit velocity [m/s]dh [m]
dh (plume rise) against vs (stack gas exit velocity), with Ta = 288 K, Ts = 420 K, d = 3 m, hs = 100 m, u = 5 m/s. 31 points computed by environmental-engineering-ai999x; marked: vs = 15, dh = 125.638 m.

Packed-tower air stripping: stripping factor, transfer units and height

NTU = \frac{R}{R-1}\ln\!\left[\frac{(C_{in}/C_{out})(R-1) + 1}{R}\right],\quad Z = HTU\cdot NTU
Z against Qw: Packed-tower air stripping: stripping factor, transfer units and heightZ (packed height HTU NTU) against Qw (water flow), with Cin = 2.00e-4 kg/m^3, Cout = 5.00e-6 kg/m^3, H = 0.2, HTU = 1 m, Qa = 1.5 m^3/s. 31 points computed by environmental-engineering-ai999x; marked: Qw = 0.05, Z = 4.21385 m.0.040.0644.24.44.21385 mQw — water flow [m^3/s]Z [m]
Z (packed height HTU NTU) against Qw (water flow), with Cin = 2.00e-4 kg/m^3, Cout = 5.00e-6 kg/m^3, H = 0.2, HTU = 1 m, Qa = 1.5 m^3/s. 31 points computed by environmental-engineering-ai999x; marked: Qw = 0.05, Z = 4.21385 m.

Activated sludge (complete mix) effluent substrate and biomass (Lawrence-McCarty)

S = \frac{K_s(1 + k_d\theta_c)}{\theta_c(Yk – k_d) – 1},\quad X = \frac{\theta_c Y(S_0 – S)}{\theta(1 + k_d\theta_c)}
S against Y: Activated sludge (complete mix) effluent substrate and biomass (Lawrence-McCarty)S (effluent soluble substrate) against Y (true yield coefficient, kg VSS per kg BOD), with HRT = 21600 s, Ks = 0.06 kg/m^3, S0 = 0.25 kg/m^3, SRT = 8.64e5 s, k = 5.79e-5 1/s, kd = 6.94e-7 1/s. 31 points computed by environmental-engineering-ai999x; marked: Y = 0.5, S = 0.00410256 kg/m^3.0.40.60.0040.0060.0080.00410256 kg/m^3Y — true yield coefficient, kg VSS per kg BODS [kg/m^3]
S (effluent soluble substrate) against Y (true yield coefficient, kg VSS per kg BOD), with HRT = 21600 s, Ks = 0.06 kg/m^3, S0 = 0.25 kg/m^3, SRT = 8.64e5 s, k = 5.79e-5 1/s, kd = 6.94e-7 1/s. 31 points computed by environmental-engineering-ai999x; marked: Y = 0.5, S = 0.00410256 kg/m^3.

Streeter-Phelps oxygen deficit and dissolved oxygen at a travel time

D = \frac{k_d L_0}{k_a – k_d}\left(e^{-k_d t} – e^{-k_a t}\right) + D_0 e^{-k_a t}
DO against kd: Streeter-Phelps oxygen deficit and dissolved oxygen at a travel timeDO (dissolved oxygen at t) against kd (deoxygenation rate constant), with D0 = 0.001 kg/m^3, DOsat = 0.0091 kg/m^3, L0 = 0.01 kg/m^3, ka = 5.32e-6 1/s, t = 1.73e5 s. 31 points computed by environmental-engineering-ai999x; marked: kd = 2.66204e-06, DO = 0.00637383 kg/m^3.2.00e-63.00e-60.00550.0060.00650.0070.00750.00637383 kg/m^3kd — deoxygenation rate constant [1/s]DO [kg/m^3]
DO (dissolved oxygen at t) against kd (deoxygenation rate constant), with D0 = 0.001 kg/m^3, DOsat = 0.0091 kg/m^3, L0 = 0.01 kg/m^3, ka = 5.32e-6 1/s, t = 1.73e5 s. 31 points computed by environmental-engineering-ai999x; marked: kd = 2.66204e-06, DO = 0.00637383 kg/m^3.
Questions

Frequently asked

What does environmental-engineering-ai999x do?

Environmental Engineering answers questions in environmental engineering: Gaussian plume dispersion and plume rise, BOD and Streeter-Phelps oxygen sag, water and wastewater treatment design, activated sludge, disinfection CT, Henry's law and air stripping, noise and solid waste. Each answer gives the value with its unit, the steps and the formula in LaTeX.

Is there a desktop app or a command-line program?

Yes, both, for Windows and Linux. AI999X Environmental Engineering is a desktop app of its own, and the AI999X desktop app holds all AI999X models in one window (search, ask in words, forms, figures, explanations). The command-line bundle holds one program per model; for this one run `environmental-engineering list` for its capabilities, `environmental-engineering info <capability>` for what one needs and `environmental-engineering solve <capability> name=value …` for an answer. Both run offline and need no Python. Downloads and checksums: https://www.ai999x.com/desktop-cli/

How do I install environmental-engineering-ai999x?

It runs in your browser on this page now, with nothing to install. The Python package is coming soon: pip install environmental-engineering-ai999x will work once it is published.

Does it run offline?

Yes. It is a Python package that runs on an ordinary CPU without a network connection (Python >=3.10); no GPU and no API key are needed.

How many capabilities does environmental-engineering-ai999x have?

99 capabilities in 7 topics, including Water treatment, Air pollution, Wastewater, Water quality, Noise.

Which field and tasks does it cover?

Field: Engineering. Tasks: Question Answering, Sentence Similarity, Feature Extraction.

What does an answer look like?

Asked "Streeter-Phelps oxygen deficit: kd = 0.23 1/d, ka = 0.46 1/d, L0 = 10 mg/L, D0 = 1 mg/L, t = 2 d, DOsat = 9.1 mg/L", it answers: D = 0.00272617 kg/m^3, DO = 0.00637383 kg/m^3, D_mgL = 2.72617, DO_mgL = 6.37383.

What happens when a question cannot be answered?

It says so and names what is missing or out of range, instead of guessing a number.

More from AI999X

Explore every model.