Appearance
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
- Complete process flow diagram
- All units configured
- Steady-state converged (recommended)
Quick Start
- Run steady-state first (provides initial conditions)
- Click Run Simulation (
F5) - Select Dynamic
- Configure time settings:
- Duration: 1-30 days
- Time step: 1-15 minutes
- Output interval: 5-60 minutes
- Click Start
Time Settings
| Setting | Range | Default | Description |
|---|---|---|---|
| Duration | 1 hr - 30 days | 1 day | Total simulation time |
| Time Step | 0.1 - 15 min | 1 min | Integration step |
| Output Interval | 1 - 60 min | 5 min | Results storage |
| Start Time | Any | 0 | Simulation 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.0Pattern Types
| Type | Application |
|---|---|
| Diurnal | Daily variation |
| Weekly | Weekend effects |
| Seasonal | Temperature, tourism |
| Custom | Site-specific data |
Loading Patterns
Import from:
- CSV file
- SCADA data
- Historical records
- Theoretical profiles
Events and Disturbances
Event Types
| Event | Description |
|---|---|
| Step Change | Instantaneous parameter change |
| Ramp | Gradual change over time |
| Pulse | Temporary change, then return |
| Profile | Custom 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
| Scenario | Events |
|---|---|
| Storm | Flow + TSS spike |
| Industrial discharge | COD/toxicity pulse |
| Equipment failure | Blower off, RAS stop |
| Load variation | Diurnal + weekend |
Solver Settings
Integration Method
| Method | Accuracy | Speed | Use Case |
|---|---|---|---|
| Euler | Low | Fast | Quick estimates |
| RK4 | High | Medium | Standard use |
| Adaptive | High | Variable | Stiff 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:
- Run steady-state simulation
- Use converged state as initial condition
- Start dynamic simulation
From Previous Run
Continue from previous simulation:
- Save state at end of run
- Load as initial condition
- 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 Type | Use |
|---|---|
| Line plot | Parameter vs. time |
| Multi-axis | Compare parameters |
| Phase plot | Parameter correlations |
| Statistics | Mean, 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
- Set controller to manual
- Apply step change
- Observe response
- Calculate tuning parameters
- Switch to auto, verify
Performance Optimization
Speed Tips
- Increase time step: Within stability limits
- Reduce output: Store only needed parameters
- Simplify model: Basic mode where possible
- 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
| Parameter | Before | Peak | After 24h |
|---|---|---|---|
| Effluent TSS | 10 mg/L | 45 mg/L | 12 mg/L |
| Effluent NH4 | 1.5 mg/L | 8 mg/L | 2 mg/L |
| Sludge Blanket | 0.5 m | 1.2 m | 0.6 m |
| RAS TSS | 8,000 mg/L | 12,000 mg/L | 8,500 mg/L |
Insights
- Plant recovers within 24 hours
- Sludge blanket critical parameter
- Consider equalization basin
Troubleshooting
Common Issues
| Issue | Cause | Solution |
|---|---|---|
| Simulation too slow | Small time step | Increase step size |
| Oscillations | Controller tuning | Detune controllers |
| Mass balance drift | Numerical errors | Reduce time step |
| Memory overflow | Long simulation | Export periodically |
| Negative values | Stiff kinetics | Use adaptive solver |
Debugging
- Run shorter duration first
- Monitor key parameters
- Check for unrealistic values
- Compare with steady-state
Best Practices
- Always start from steady-state
- Verify diurnal patterns match real data
- Test controllers before long runs
- Save checkpoints during long simulations
- Document scenarios for reproducibility
Related Topics
References
- Henze, M. "Activated Sludge Models"
- Olsson, G. "ICA of Wastewater Treatment"
- Rieger, L. "Guidelines for Dynamic Modelling"