Lesson
35: Multi-Stack Wind-Rotated Gaussian Plume Superposition
(UCI_Gas_Turbine_2015_Emissions.csv)
The “Boring Stuff” Problem: Rotating Smoke Plumes Across Arbitrary Meteorological Wind Headings
Single-stack formulas assume wind always blows along +x.
Real airshed permits have multiple smokestacks at
different coordinates (xs, ys) while meteorological towers
report wind direction FROM azimuth \(\theta_{\text{met}}\) (where \(0^\circ\) = North, \(90^\circ\) = East, \(180^\circ\) = South, \(270^\circ\) = West).
Watch Out! Two Geometric Traps in Multi-Stack Air Modeling
- FROM vs. TOWARD: A West wind
(
FROM 270 deg) blows pollution TOWARD East (\(\theta_{\text{flow}} = (\theta_{\text{met}} + 180^\circ) \bmod 360^\circ = 90^\circ\), unit vector(ux=1, uy=0)!). - Upwind Mask Guard (
x_down <= 0): NEVER pass negative downwind distancex_down < 0intosigma_y = a * x_down ** 0.89— negative numbers raised to fractional powers turn intoNaN! Mask strictlyx_down > 0first!
from pathlib import Path
def data_file(name):
"""Locate a dataset file whether running from SRC_DIR, module folder, HOMEWORK, or EXAMS."""
for p in [
Path("datasets") / name,
Path("../datasets") / name,
Path("../../datasets") / name,
]:
if p.exists():
return p
raise FileNotFoundError(f"Missing dataset {name} in datasets/")
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# Example 1: Combine Real Gas Turbine NOx Emission Data (UCI #551) with Multi-Stack 2D Coordinate Rotation!
gt = pd.read_csv(data_file("UCI_Gas_Turbine_2015_Emissions.csv"))
# Nominal full-load turbine stack NOx concentration ~ median NOX (mg/m^3) * typical exhaust flow 140 m^3/s -> g/s!
nox_mg_m3_med = float(gt["NOX"].median())
q_nox_g_s = (nox_mg_m3_med * 1e-3) * 140.0 # 1 turbine stack emission rate [g/s]
print(f"Real Gas Turbine Median Exhaust NOx = {nox_mg_m3_med:.2f} mg/m^3 -> Stack Q = {q_nox_g_s:.2f} g/s per unit")
def stack_plume_field(X, Y, xs, ys, Q_gs, He_m, u_ms, wind_from_deg, ay=0.11, az=0.08):
# Wind FROM azimuth theta_met moves TOWARD theta_met + 180 deg (compass: 0=North=+Y, 90=East=+X)
rad_to = np.deg2rad((wind_from_deg + 180.0) % 360.0)
ux, uy = np.sin(rad_to), np.cos(rad_to)
dx, dy = X - xs, Y - ys
x_down = dx * ux + dy * uy
y_cross = np.abs(-dx * uy + dy * ux)
C = np.zeros_like(X, dtype=float)
m = x_down > 10.0 # Strict upwind guard!
xd = x_down[m]
sy = ay * xd / np.sqrt(1.0 + 0.0001 * xd)
sz = az * xd / (1.0 + 0.0002 * xd)
C[m] = (Q_gs * 1e6 / (np.pi * u_ms * sy * sz)) * np.exp(-0.5 * (y_cross[m] / sy) ** 2 - 0.5 * (He_m / sz) ** 2)
return C
# 3-Stack Industrial Energy Park with Wind FROM South-West (225 deg -> blowing North-East!)
gx = np.linspace(-500, 3500, 180)
gy = np.linspace(-500, 3500, 180)
X, Y = np.meshgrid(gx, gy)
stacks = [(300.0, 400.0, q_nox_g_s, 45.0), (500.0, 250.0, q_nox_g_s * 1.2, 50.0), (200.0, 650.0, q_nox_g_s * 0.8, 38.0)]
C_tot = sum(stack_plume_field(X, Y, xs, ys, Q, He, u_ms=3.8, wind_from_deg=225.0) for xs, ys, Q, He in stacks)
fig, ax = plt.subplots(figsize=(7.2, 4.6))
cf = ax.contourf(X, Y, C_tot, levels=16, cmap="magma_r")
plt.colorbar(cf, ax=ax, label="Combined Ground NOx [ug/m^3]")
for i, (xs, ys, _, _) in enumerate(stacks, 1):
ax.plot(xs, ys, "c^", markersize=9, markeredgecolor="#0f172a", label="Gas Turbine Stacks" if i == 1 else "")
ax.set_title("3-Stack Gas Turbine Park Ground NOx (Wind FROM 225 deg SW -> Toward NE)")
ax.set_xlabel("East Coordinate X [m]"); ax.set_ylabel("North Coordinate Y [m]")
ax.legend(loc="upper left"); ax.grid(True, alpha=0.25); fig.tight_layout()
print(f"Max Ground NOx Exposure = {C_tot.max():.1f} ug/m^3 (US EPA 1-hr NO2 NAAQS = 188 ug/m^3)")
Real Gas Turbine Median Exhaust NOx = 56.84 mg/m^3 -> Stack Q = 7.96 g/s per unit
Max Ground NOx Exposure = 187.1 ug/m^3 (US EPA 1-hr NO2 NAAQS = 188 ug/m^3)
Concept Check Questions
- Check compass conventions: if wind blows FROM \(180^\circ\) (South), what are
(ux, uy)and which way does the plume travel? - Why did
C[m] = ...evaluate only insidem = x_down > 10.0? - Explain linear superposition: why can we add
C1 + C2 + C3directly for inert or first-order plumes?
Guided
Practice Problem 1: School Receptor Exposure Check Under Prevailing Wind
Flip (Wind FROM West 270 deg)
Re-evaluate C_tot for a single residential school
receptor located at (2100.0, 500.0) m under BOTH South-West
wind (225 deg) and pure West wind (270 deg,
blowing straight East!), comparing exposure against
188 ug/m^3.
# Guided Practice 1 Starter
xr, yr = np.array([[2100.0]]), np.array([[500.0]])
for wdir in [225.0, 270.0]:
c_school = sum(stack_plume_field(xr, yr, xs, ys, Q, He, u_ms=3.8, wind_from_deg=wdir) for xs, ys, Q, He in stacks)
print(f"Wind FROM {wdir:5.1f} deg -> School Receptor NOx = {c_school[0,0]:6.2f} ug/m^3")Wind FROM 225.0 deg -> School Receptor NOx = 0.00 ug/m^3
Wind FROM 270.0 deg -> School Receptor NOx = 58.38 ug/m^3