OpenWQ

Other Modules
Detailed theory and JSON configuration for transport, sorption isotherms,
lateral exchange, and sediment transport modules

Contents

β€’ Module Overview

Section 01: Transport Modules

β€’ ADVDISP (Advection-Dispersion)

β€’ ADV (Advection Only)

β€’ NONE (No Transport)

Section 02: Lateral Exchange

β€’ BOUNDMIX Theory

β€’ Configuration

Section 03: Sorption Isotherms

β€’ Langmuir Isotherm

β€’ Freundlich Isotherm

β€’ Configuration

Section 04: Sediment Transport

β€’ HYPE_HBVSED Model

β€’ HYPE_MMF Model

β€’ Configuration

Module Overview

OpenWQ provides specialized modules for different physical and chemical processes:

Transport

Controls solute movement with water flow

ADVDISPFull transport
ADVAdvection only
NONENo transport

Lateral Exchange

Mixing between compartments

BOUNDMIXBoundary mixing

Vertical & horizontal exchange

Sorption

Solid-liquid partitioning

LANGMUIRMonolayer
FREUNDLICHEmpirical

Sediment Transport

HYPE_HBVSED: HBV-sed approach β€” flow-based erosion

HYPE_MMF: Modified Morgan-Morgan-Finney β€” rainfall/runoff erosion

01

Transport Modules

ADVDISP: Advection-Dispersion Transport

Advection-Dispersion Equation
βˆ‚C/βˆ‚t = -vΒ·βˆ‡C + βˆ‡Β·(DΒ·βˆ‡C)

Components

CConcentration [mg/L]
vFlow velocity [m/s]
DDispersion coefficient [mΒ²/s]
Advection: Transport with bulk water flow
Dispersion: Spreading due to velocity variations

Use Cases

  • River reaches with mixing
  • Groundwater transport
  • Lake outflow mixing
  • Estuarine systems
   Advection (v)
   ──────────────────────────────→

   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   β†’   β–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆ  β–ˆβ–ˆβ–ˆβ–ˆ
   Initial pulse      Dispersion spreads
                      concentration
                            

Transport Module Configuration

{
  // In openWQ_master.json β†’ MODULES
  "TRANSPORT_EROSION": {
    "MODULE_NAME": "OPENWQ_NATIVE_TRANSP_DISS_ADVDISP",
    "MODULE_CONFIG_FILEPATH": "transport_config.json"
  }
}

// transport_config.json
{
  "ADVDISP_CONFIGURATION": {
    "dispersion_x": 10.0,   // mΒ²/s, longitudinal
    "dispersion_y": 1.0,    // mΒ²/s, lateral
    "dispersion_z": 0.1,    // mΒ²/s, vertical
    "characteristic_length_m": 100.0
  }
}
                        

Module Options

Module NameDescription
ADVDISPAdvection + Dispersion
ADVAdvection only
NONENo transport

Parameters

dispersion_x0.1 - 100 mΒ²/s
dispersion_y0.01 - 10 mΒ²/s
dispersion_z0.001 - 1 mΒ²/s
char_lengthGrid scale [m]
02

Lateral Exchange

BOUNDMIX: Boundary Mixing

Mass Exchange Rate
F = K Β· (Cupper - Clower)

Components

FMass flux [g/s]
KExchange coefficient [1/s]
CConcentration [mg/L]
K_VAL: Controls mixing rate β€” higher values mean faster equilibration between compartments
   UPPER COMPARTMENT (e.g., Runoff)
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚     C_upper = 5.0 mg/L      β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                  β”‚
                  β”‚ K_VAL = 0.001 /s
                  β”‚ ←→ Exchange
                  β”‚
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚     C_lower = 2.0 mg/L      β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
   LOWER COMPARTMENT (e.g., Soil)
                            

Common Exchanges

  • Runoff ↔ Soil
  • Soil ↔ Groundwater
  • River ↔ Hyporheic zone

BOUNDMIX Configuration

{
  // In transport_config.json
  "BOUNDMIX_CONFIGURATION": {
    // Exchange 1: Runoff ↔ Soil
    "1": {
      "DIRECTION": "z",
      "UPPER_COMPARTMENT": "RUNOFF",
      "LOWER_COMPARTMENT": "SOIL",
      "K_VAL": 0.001   // [1/s]
    },
    // Exchange 2: Soil ↔ Groundwater
    "2": {
      "DIRECTION": "z",
      "UPPER_COMPARTMENT": "SOIL",
      "LOWER_COMPARTMENT": "GROUNDWATER",
      "K_VAL": 0.0001
    },
    // Exchange 3: River ↔ Floodplain (lateral)
    "3": {
      "DIRECTION": "x",
      "UPPER_COMPARTMENT": "RIVER",
      "LOWER_COMPARTMENT": "FLOODPLAIN",
      "K_VAL": 0.01
    }
  }
}
                        

Parameters

ParameterDescription
DIRECTIONx, y, or z axis
UPPER_COMPARTMENTSource compartment
LOWER_COMPARTMENTDestination compartment
K_VALExchange rate [1/s]

Typical K_VAL Ranges

Fast exchange0.01 - 0.1 /s
Moderate0.001 - 0.01 /s
Slow diffusion0.0001 - 0.001 /s
03

Sorption Isotherms

Langmuir Isotherm

Langmuir Adsorption Isotherm
q = qmax Β· KL Β· C / (1 + KL Β· C)

Parameters

qAdsorbed concentration [mg/kg]
qmaxMaximum adsorption capacity [mg/kg]
KLLangmuir constant [L/mg]
CEquilibrium concentration [mg/L]

Physical Basis

  • Monolayer adsorption model
  • Finite number of identical sites
  • Saturation at high concentrations
  • Best for: Phosphorus, heavy metals
   q (adsorbed)
   β”‚          ___________  q_max
   β”‚        /
   β”‚      /
   β”‚    /
   β”‚  /
   β”‚/__________________ C (solution)

   Approaches saturation limit
                            

Freundlich Isotherm

Freundlich Adsorption Isotherm
q = KF Β· Cn

Parameters

qAdsorbed concentration [mg/kg]
KFFreundlich constant [(mg/kg)/(mg/L)ⁿ]
nFreundlich exponent (0 < n ≀ 1)
CEquilibrium concentration [mg/L]

Physical Basis

  • Empirical power-law model
  • Heterogeneous surfaces
  • No saturation limit
  • n < 1: Favorable adsorption
  • Best for: Organic compounds, pesticides
Linear case (n = 1):
q = Kd Β· C (partition coefficient)

Sorption Isotherm Configuration

{
  // Langmuir configuration
  "SORPTION_ISOTHERMS": {
    "PO4": {
      "ISOTHERM_TYPE": "LANGMUIR",
      "COMPARTMENTS": ["SOIL", "SEDIMENT"],
      "PARAMETERS": {
        "qmax": 500.0,     // mg/kg
        "KL": 0.5,         // L/mg
        "Kadsdes": 0.01    // kinetic rate [1/s]
      }
    },
    // Freundlich configuration
    "PESTICIDE_A": {
      "ISOTHERM_TYPE": "FREUNDLICH",
      "COMPARTMENTS": ["SOIL"],
      "PARAMETERS": {
        "KF": 25.0,        // Freundlich K
        "n": 0.8,          // Freundlich n
        "Kadsdes": 0.001   // kinetic rate [1/s]
      }
    }
  }
}
                        

Langmuir Parameters

ParameterTypical Range
qmax100 - 1000 mg/kg
KL0.01 - 10 L/mg
Kadsdes0.0001 - 0.1 /s

Freundlich Parameters

ParameterTypical Range
KF1 - 100
n0.3 - 1.0
Kadsdes0.0001 - 0.1 /s
Kadsdes: Controls rate of approach to equilibrium
04

Sediment Transport

HYPE_HBVSED: HBV-Sed Approach

Sediment Yield (HBV-sed)
SY = erosion_index Β· Qexp

Theory

Empirical relationship between streamflow and sediment transport. Based on the HBV-sed model from HYPE.

  • Flow-driven erosion
  • Simple parameterization
  • Suitable for data-sparse regions

Parameters

erosion_indexErodibility factor
expFlow exponent (typically 1-2)
QDischarge [mΒ³/s]
SYSediment yield [kg/s]
Best for:
β€’ Catchment-scale modeling
β€’ Limited sediment data
β€’ Flow-dominated erosion systems

HYPE_MMF: Modified Morgan-Morgan-Finney

Detachment by Rainfall
F = K Β· R2 Β· (1 - C)
Transport Capacity
TC = c Β· QΞ· Β· SΞΆ

Key Features

  • Rainfall-driven detachment
  • Runoff-driven transport
  • Slope factor included
  • Cover factor (vegetation)

Parameters

KSoil erodibility
RRainfall energy
CCrop/cover factor (0-1)
QRunoff volume
SSlope gradient
Ξ·, ΞΆCalibration exponents
Best for:
β€’ Agricultural watersheds
β€’ Rainfall-dominated erosion
β€’ Land-use change scenarios

Sediment Transport Configuration

{
  // In openWQ_master.json β†’ MODULES
  "SEDIMENT_TRANSPORT": {
    "MODULE_NAME": "HYPE_HBVSED",
    "MODULE_CONFIG_FILEPATH": "sediment_config.json"
  }
}

// sediment_config.json - HYPE_HBVSED
{
  "HBVSED_CONFIGURATION": {
    "erosion_index": 0.5,
    "flow_exponent": 1.5,
    "deposition_rate": 0.1
  }
}

// sediment_config.json - HYPE_MMF
{
  "MMF_CONFIGURATION": {
    "soil_erodibility_K": 0.3,
    "cover_factor_C": 0.2,
    "slope_factor": 0.05,
    "cohesion": 5.0
  }
}
                        

HYPE_HBVSED Parameters

ParameterRange
erosion_index0.1 - 5.0
flow_exponent1.0 - 2.5
deposition_rate0.01 - 0.5

HYPE_MMF Parameters

ParameterRange
soil_erodibility_K0.1 - 0.7
cover_factor_C0.0 - 1.0
cohesion1 - 20 kPa

Summary

Transport

ADVDISP, ADV, NONE

Controls solute movement with dispersion coefficients

Exchange

BOUNDMIX

Inter-compartment mixing via K_VAL exchange rates

Sorption

LANGMUIR, FREUNDLICH

Solid-liquid partitioning with kinetic rates

Sediment Transport

HYPE_HBVSED (flow-based) | HYPE_MMF (rainfall/runoff-based)
Particulate-bound contaminant transport

All modules configured via JSON β€” modify parameters without recompiling

Thank You

Questions?

Documentation: openwq.readthedocs.io