Chapter 1 Environmental Engineering: Lake water quality model#

  1. Introduction: Lake Model

  2. Simulation: Lake Model

  3. Self-Assessment

1. Introduction#

🧪 Why Measure Lake Water Quality?#

Monitoring lake water quality helps safeguard ecosystem health, human use, and climate resilience. It informs decisions about recreation, drinking water, fisheries, and pollution control.

🔁 CSTR Equation in Lake Modeling#

Lakes can be approximated as Continuously Stirred Tank Reactors (CSTRs) for estimating pollutant concentration [Mihelcic, 1999]:

\[ C_{\text{out}} = \frac{C_{\text{in}}}{1 + k \cdot \tau} \]
  • \(( C_{\text{in}} \)): Inflow concentration

  • \(( C_{\text{out}} \)): Outflow concentration

  • \(( k \)): Reaction rate

  • \(( \tau \)): Residence time

Used to model nutrient retention, decay, and flushing behavior.


🌾 Why Phosphorus Is Prioritized#

Nutrient

Role in Freshwater Ecosystems

Reason for Priority

Phosphorus

Limiting nutrient in lakes

Even small increases trigger algal blooms

Nitrogen

Often abundant in freshwater

More limiting in oceans/marine systems

In most U.S. lakes, phosphorus controls eutrophication, making it the main target for pollution reduction.

🧪 Lake Classification Based on Phosphorus Content#

Lakes are commonly classified by their trophic state, which reflects nutrient levels — especially total phosphorus (TP) — and biological productivity. Phosphorus is the key limiting nutrient in most freshwater systems, making it a reliable indicator of eutrophication risk.


🌿 Trophic State Categories by Total Phosphorus#

Trophic State

Total Phosphorus (TP) Range (µg/L)

Characteristics

Oligotrophic

< 10

Clear water, low productivity, high oxygen

Mesotrophic

10–30

Moderate productivity, balanced ecosystem

Eutrophic

30–100

High productivity, frequent algal blooms

Hypereutrophic

> 100

Excessive nutrients, poor clarity, oxygen stress

These ranges are approximate and may vary by region, lake depth, and alkalinity. Some classification systems use geometric mean TP over a year for more accuracy.


🧭 Carlson Trophic State Index (TSI) – TP-Based Formula#

\[ \text{TSI}_{TP} = 14.42 \cdot \ln(\text{TP}) + 4.15 \]
  • TP in µg/L

  • TSI < 40 → Oligotrophic

  • TSI 40–50 → Mesotrophic

  • TSI > 50 → Eutrophic


📌 Notes on Measurement#

  • Total Phosphorus (TP) includes both soluble and particulate forms.

  • Samples should be taken regularly (e.g., monthly) and analyzed using standard digestion and spectrophotometry methods.

  • TP is often paired with chlorophyll-a and Secchi depth to confirm trophic status.


🧠 Insight#

Phosphorus levels are a powerful diagnostic tool for lake health.
Managing phosphorus inputs — from agriculture, wastewater, and urban runoff — is key to preventing eutrophication and preserving aquatic ecosystems.


🏞️ Trophic Classification of Lakes#

Type

Nutrient Level

Characteristics

Oligotrophic

Low

Deep, clear, high oxygen, low productivity

Mesotrophic

Moderate

Balanced clarity and productivity

Eutrophic

High

Shallow, warm, frequent algal blooms


📊 Water Quality Statistics – U.S. Lakes#

Metric

Value / Condition

Lakes Assessed

~981 sampled, extrapolated to ~268,000

% Acres Impaired

~55%

Macroinvertebrate Condition

29% poor, 25% fair

Leading Issues

Excess nutrients, low DO, harmful algae

🔗 Source: EPA National Lakes Assessment


🌊 Lake vs. River Water Quality Comparison#

Feature

Lakes

Rivers

Flow Characteristics

Static or slow-moving

Fast-moving, episodic

Residence Time

Long (months to years)

Short (days to weeks)

Pollutant Retention

High – sediment and nutrients accumulate

Lower – pollutants flushed downstream

Response Time

Slow and cumulative

Fast and transient


🧠 Insight#

Lakes are long-term integrators of pollution and climate stress. Measuring water quality helps prevent ecological degradation, guide sustainable management, and protect public health.

Foundational Literature#

[Mihelcic, 1999] provides a foundational, undergraduate-level overview of water quality modeling, emphasizing mass balance, basic reaction kinetics, and conceptual understanding of pollutant fate in aquatic systems. It introduces lake modeling through simplified box models and steady-state assumptions, suitable for environmental engineering education. In contrast, [Ji, 2017] offers a comprehensive, graduate-level treatment integrating hydrodynamics, sediment transport, eutrophication, and toxic substance modeling using numerical methods and case studies (e.g., EFDC applications).

2. Simulation#

Lake Phosphorus Model — CSTR-Based Simulation#

This Python code simulates the phosphorus concentration dynamics in a lake using a Continuous Stirred Tank Reactor (CSTR) model. It also classifies the lake’s nutrient status as oligotrophic, mesotrophic, or eutrophic based on final phosphorus levels. The model is designed for interactive exploration using ipywidgets.


Key Features#

Based on the mass balance for a CSTR:

\[ \frac{dC}{dt} = \frac{Q}{V} (C_{\text{in}} - C) \]

Where:

  • \(( C \)): lake phosphorus concentration (mg/L)

  • \(( C_{\text{in}} \)): inflow phosphorus concentration (mg/L)

  • \(( Q \)): inflow rate (m³/day)

  • \(( V \)): lake volume (m³)

  • \(( C_0 \)): initial concentration in lake

  • \(( t \)): time (days)


Visualization#

  • The phosphorus concentration over time is plotted.

  • A horizontal dashed line represents the inflow concentration.

  • The final concentration is used to classify the lake:

Classification

Final [P] Range (mg/L)

Oligotrophic

< 0.02

Mesotrophic

0.02 ≤ C < 0.1

Eutrophic

≥ 0.1

The classification appears in the plot title dynamically.


Interactive Controls#

Using sliders built with ipywidgets, users can adjust:

  • Q: Flow rate (m³/day)

  • V: Lake volume (m³)

  • C_in: Inflow phosphorus concentration (mg/L)

  • C0: Initial phosphorus concentration (mg/L)

  • t_max: Simulation duration (days)

These inputs allow real-time updates to the plot, showing how lake phosphorus levels evolve over time and how different inflow conditions affect lake health.


Applications#

  • Environmental modeling for nutrient loading

  • Decision support for watershed management

  • Educational tool for lake classification and dynamics


import numpy as np
import matplotlib.pyplot as plt
import ipywidgets as widgets
from IPython.display import display

#  Lake CSTR model: dC/dt = (Q/V)(C_in - C)
def lake_phosphorus_model(Q, V, C_in, C0, t_max):
    t = np.linspace(0, t_max, 200)
    C = np.zeros_like(t)
    C[0] = C0
    for i in range(1, len(t)):
        dt = t[i] - t[i - 1]
        dCdt = (Q / V) * (C_in - C[i - 1])
        C[i] = C[i - 1] + dCdt * dt
    return t, C

# 🔎 Classify lake status based on final P concentration
def classify_lake(C_final):
    if C_final < 0.02:
        return "Oligotrophic (Low nutrients)"
    elif C_final < 0.1:
        return "Mesotrophic (Moderate nutrients)"
    else:
        return "Eutrophic (High nutrients)"

# 📊 Plotting function with classification
def plot_lake_model(Q, V, C_in, C0, t_max):
    t, C = lake_phosphorus_model(Q, V, C_in, C0, t_max)
    trophic_status = classify_lake(C[-1])

    plt.figure(figsize=(10, 4))
    plt.plot(t, C, label="Lake Phosphorus (mg/L)", color="darkgreen")
    plt.axhline(C_in, color="gray", linestyle="--", label="Inflow Concentration")
    plt.xlabel("Time (days)")
    plt.ylabel("Phosphorus Concentration (mg/L)")
    plt.title(f"Lake CSTR Model — {trophic_status}")
    plt.grid(True)
    plt.legend()
    plt.tight_layout()
    plt.show()

# 🎛️ Interactive controls
Q_slider = widgets.FloatSlider(value=5000, min=1000, max=20000, step=500, description='Flow Rate Q (m³/day)')
V_slider = widgets.FloatSlider(value=1e6, min=1e5, max=5e6, step=1e5, description='Lake Volume V (m³)')
C_in_slider = widgets.FloatSlider(value=0.1, min=0.01, max=1.0, step=0.01, description='Inflow P Conc. (mg/L)')
C0_slider = widgets.FloatSlider(value=0.05, min=0.0, max=1.0, step=0.01, description='Initial P Conc. (mg/L)')
tmax_slider = widgets.FloatSlider(value=100, min=10, max=365, step=10, description='Simulation Time (days)')

ui = widgets.VBox([Q_slider, V_slider, C_in_slider, C0_slider, tmax_slider])
out = widgets.interactive_output(plot_lake_model, {
    'Q': Q_slider,
    'V': V_slider,
    'C_in': C_in_slider,
    'C0': C0_slider,
    't_max': tmax_slider
})

display(ui, out)

3. Self-Assessment#

Lake Phosphorus Learning Module#

This module combines conceptual understanding, reflection prompts, and a multiple-choice quiz to explore phosphorus dynamics and trophic classification in lakes modeled as Continuous Stirred Tank Reactors (CSTRs).


Conceptual Questions#

  1. What is the significance of the inflow rate (\(( Q \))) in determining the phosphorus concentration in the lake?

  2. How does the lake volume (\(( V \))) affect residence time and phosphorus dilution?

  3. Why is the initial phosphorus concentration (\(( C_0 \))) important in modeling lake behavior?

  4. How does the inflow phosphorus concentration (\(( C_{\text{in}} \))) influence lake equilibrium?

  5. How does simulation duration (\(( t_{\text{max}} \))) affect nutrient trend predictions?


Reflective Questions#

  • 💭 How do eutrophic conditions affect lake ecology and local communities?

  • 💭 In what ways might agriculture or urban runoff alter phosphorus input?

  • 💭 What practical strategies could help shift a lake from eutrophic to mesotrophic status?

  • 💭 How could seasonal variations in inflow and nutrient load affect the model results?

  • 💭 What are the limitations of using a CSTR model for simulating real lakes?


Quiz: Phosphorus Dynamics#

1. What does the inflow rate (\(( Q \))) represent?#

  • Phosphorus removal rate

  • Water entering the lake

  • Nutrient recycling

  • Sediment addition
    Explanation: \(( Q \)) represents the volumetric flow of water bringing nutrients into the lake.


2. How does increasing lake volume (\(( V \))) affect phosphorus dynamics?#

  • Decreases residence time

  • Increases residence time

  • No effect

  • Increases \(( C_{\text{in}} \))
    Explanation: Larger volumes lead to slower turnover, allowing dilution and reduced nutrient concentration.


3. What classification corresponds to a final phosphorus level of 0.05 mg/L?#

  • Oligotrophic

  • Mesotrophic

  • Eutrophic

  • Hypereutrophic
    Explanation: 0.05 mg/L falls within the mesotrophic range (moderate nutrient levels).


4. Which factor most directly affects equilibrium concentration?#

  • Initial concentration \(( C_0 \))

  • Inflow concentration \(( C_{\text{in}} \))

  • Simulation duration

  • Lake volume
    Explanation: \(( C_{\text{in}} \)) sets the long-term target value for phosphorus.


5. What environmental risk is associated with eutrophic lakes?#

  • Low nutrient availability

  • Algal blooms and oxygen depletion

  • Enhanced biodiversity

  • Excess sediment buildup
    Explanation: Excess nutrients trigger harmful algal growth, depleting oxygen and harming aquatic life.