Skip to content

Dynamic Simulation ​

Time-varying process response simulation

Overview ​

Dynamic simulation models how your wastewater treatment plant responds to changes over time. It captures transient behavior, diurnal patterns, and control system response.

When to Use ​

Ideal For ​

  • Diurnal variation analysis
  • Storm event response
  • Controller tuning
  • Startup/shutdown procedures
  • Process optimization
  • Operator training scenarios

Considerations ​

  • Requires more computational time
  • Needs initial conditions (from steady-state)
  • More parameters to configure

Running Dynamic Simulation ​

Prerequisites ​

  1. Complete process flow diagram
  2. All units configured
  3. Steady-state converged (recommended)

Quick Start ​

  1. Run steady-state first (provides initial conditions)
  2. Click Run Simulation (F5)
  3. Select Dynamic
  4. Configure time settings:
    • Duration: 1-30 days
    • Time step: 1-15 minutes
    • Output interval: 5-60 minutes
  5. Click Start

Time Settings ​

SettingRangeDefaultDescription
Duration1 hr - 30 days1 dayTotal simulation time
Time Step0.1 - 15 min1 minIntegration step
Output Interval1 - 60 min5 minResults storage
Start TimeAny0Simulation start

Influent Patterns ​

Diurnal Profiles ​

Define hourly variation in influent:

Hour    Flow Factor    COD Factor
00:00   0.6           0.8
06:00   0.9           1.0
08:00   1.3           1.2
12:00   1.2           1.1
18:00   1.4           1.3
21:00   1.0           1.0

Pattern Types ​

TypeApplication
DiurnalDaily variation
WeeklyWeekend effects
SeasonalTemperature, tourism
CustomSite-specific data

Loading Patterns ​

Import from:

  • CSV file
  • SCADA data
  • Historical records
  • Theoretical profiles

Events and Disturbances ​

Event Types ​

EventDescription
Step ChangeInstantaneous parameter change
RampGradual change over time
PulseTemporary change, then return
ProfileCustom time-series

Defining Events ​

Example: Flow spike event

json
{
  "type": "pulse",
  "parameter": "influent_flow",
  "startTime": "Day 2, 14:00",
  "duration": "4 hours",
  "magnitude": 1.5,
  "unit": "factor"
}

Common Scenarios ​

ScenarioEvents
StormFlow + TSS spike
Industrial dischargeCOD/toxicity pulse
Equipment failureBlower off, RAS stop
Load variationDiurnal + weekend

Solver Settings ​

Integration Method ​

MethodAccuracySpeedUse Case
EulerLowFastQuick estimates
RK4HighMediumStandard use
AdaptiveHighVariableStiff systems

Time Step Selection ​

  • Shorter (1 min): Better accuracy, slower
  • Longer (15 min): Faster, may miss dynamics
  • Adaptive: Automatic adjustment

Stability ​

For stable simulation:

  • Time step < 0.1 × smallest time constant
  • Typically 1-5 minutes for biological systems
  • 0.1-1 minute for fast controllers

Initial Conditions ​

From Steady-State ​

Recommended approach:

  1. Run steady-state simulation
  2. Use converged state as initial condition
  3. Start dynamic simulation

From Previous Run ​

Continue from previous simulation:

  1. Save state at end of run
  2. Load as initial condition
  3. Continue simulation

Custom Initial Conditions ​

Specify manually:

  • MLSS concentration
  • Sludge blanket depth
  • Controller states

Results and Output ​

Time Series Data ​

Each output interval records:

  • All stream compositions
  • Unit states (volumes, masses)
  • Controller outputs
  • Performance metrics

Visualization ​

Chart TypeUse
Line plotParameter vs. time
Multi-axisCompare parameters
Phase plotParameter correlations
StatisticsMean, max, min, std

Export Options ​

  • CSV for analysis
  • Excel with multiple sheets
  • JSON for programmatic use
  • Charts as images

Controller Integration ​

Available Controllers ​

  • PID (DO, SRT, level)
  • Cascade (NH4→DO)
  • Ratio (chemical dosing)
  • Time-based (intermittent aeration)
  • Advanced (MPC, feedforward)

Tuning with Dynamic Simulation ​

  1. Set controller to manual
  2. Apply step change
  3. Observe response
  4. Calculate tuning parameters
  5. Switch to auto, verify

See Controllers Overview

Performance Optimization ​

Speed Tips ​

  1. Increase time step: Within stability limits
  2. Reduce output: Store only needed parameters
  3. Simplify model: Basic mode where possible
  4. Shorter runs: Build up duration

Memory Management ​

For long simulations:

  • Enable output compression
  • Store summary statistics only
  • Export and clear periodically

Example: Storm Event ​

Setup ​

Base Case:

  • 20,000 m3/d average flow
  • Standard diurnal pattern
  • MLE process

Storm Event:

  • Start: Day 2, 14:00
  • Duration: 6 hours
  • Peak flow: 3× average
  • TSS: 2× normal

Results ​

ParameterBeforePeakAfter 24h
Effluent TSS10 mg/L45 mg/L12 mg/L
Effluent NH41.5 mg/L8 mg/L2 mg/L
Sludge Blanket0.5 m1.2 m0.6 m
RAS TSS8,000 mg/L12,000 mg/L8,500 mg/L

Insights ​

  • Plant recovers within 24 hours
  • Sludge blanket critical parameter
  • Consider equalization basin

Troubleshooting ​

Common Issues ​

IssueCauseSolution
Simulation too slowSmall time stepIncrease step size
OscillationsController tuningDetune controllers
Mass balance driftNumerical errorsReduce time step
Memory overflowLong simulationExport periodically
Negative valuesStiff kineticsUse adaptive solver

Debugging ​

  1. Run shorter duration first
  2. Monitor key parameters
  3. Check for unrealistic values
  4. Compare with steady-state

Best Practices ​

  1. Always start from steady-state
  2. Verify diurnal patterns match real data
  3. Test controllers before long runs
  4. Save checkpoints during long simulations
  5. Document scenarios for reproducibility

References ​

  1. Henze, M. "Activated Sludge Models"
  2. Olsson, G. "ICA of Wastewater Treatment"
  3. Rieger, L. "Guidelines for Dynamic Modelling"