Skip to content

Best Practices Guide ​

Overview ​

This section provides comprehensive best practices for using ErgoPlanner effectively in wastewater treatment plant modeling, design, and optimization. Follow these guidelines to ensure accurate, reliable, and efficient simulations.


Table of Contents ​

1. Model Development ​

  • Model Calibration - Step-by-step calibration workflow
  • Data Quality Assurance
  • Parameter Selection Guidelines
  • Validation Procedures

2. Operational Optimization ​

  • Process Control Strategies
  • Energy Efficiency Methods
  • Chemical Dosing Optimization
  • Load Management

3. Troubleshooting & Problem Solving ​

  • Troubleshooting Guide - Common issues and solutions
  • Convergence Problems
  • Mass Balance Errors
  • Numerical Instability

4. Performance & Efficiency ​

  • Performance Tips - Large model optimization
  • Memory Management
  • Computational Efficiency
  • Parallel Processing

5. Quality Control ​

  • Peer Review Procedures
  • Documentation Standards
  • Version Control
  • Audit Trails

General Best Practices ​

Model Setup ​

1. Start Simple, Add Complexity

Begin with the simplest model that captures essential behavior, then add complexity as needed:

Level 1: Steady-state, single-scenario
Level 2: Steady-state, multi-scenario
Level 3: Dynamic simulation, typical conditions
Level 4: Dynamic simulation, upset conditions
Level 5: Full plant with controls and optimization

Rationale:

  • Easier to debug simple models
  • Understand fundamental behavior first
  • Add complexity only where justified
  • Avoid over-parameterization

2. Use Industry-Standard Parameters

Start with well-established default values:

Activated Sludge Default Parameters:
- μmax (20°C): 6.0 d⁻¹ (autotrophs), 13.2 d⁻¹ (heterotrophs)
- KS: 20 mg COD/L (heterotrophs), 1.0 mg N/L (autotrophs)
- bH: 0.62 d⁻¹ (heterotrophs), 0.17 d⁻¹ (autotrophs)
- YH: 0.67 mg COD/mg COD
- Temperature coefficient (θ): 1.07

Source: IWA ASM family, Henze et al.

3. Maintain Consistent Units

ErgoPlanner supports multiple unit systems, but be consistent:

Recommended Unit Sets:

US Customary:
- Flow: MGD
- Volume: MG
- Concentration: mg/L
- Temperature: °F
- Mass loading: lb/day

SI Units:
- Flow: m³/day or m³/h
- Volume: m³
- Concentration: g/m³ or mg/L
- Temperature: °C
- Mass loading: kg/day

Mixed units can cause errors!

Data Management ​

4. Organize Project Files

Project Structure:
├── data/
│   ├── influent/
│   │   ├── flow_data_2023.csv
│   │   └── quality_data_2023.csv
│   ├── effluent/
│   ├── operational/
│   └── weather/
├── models/
│   ├── calibration/
│   ├── design/
│   └── optimization/
├── scenarios/
│   ├── baseline/
│   ├── alternatives/
│   └── future/
├── results/
│   ├── reports/
│   ├── figures/
│   └── exports/
└── documentation/
    ├── assumptions.md
    ├── calibration_log.md
    └── change_log.md

5. Document Everything

Critical documentation:

Required Documentation:
☑ Model purpose and objectives
☑ Data sources and dates
☑ Assumptions and limitations
☑ Calibration methodology
☑ Parameter values and justification
☑ Validation results
☑ Uncertainty analysis
☑ Version history
☑ Author and review information

6. Version Control

Use systematic version naming:

Naming Convention:
ProjectName_ModelType_Version_Date_Author

Examples:
SpringfieldWWTP_Calibration_v1.0_2024-01-15_JDoe
SpringfieldWWTP_Design_v2.1_2024-03-22_JSmith

Version Numbering:
- Major.Minor.Patch (e.g., 2.1.3)
- Major: Significant model structure changes
- Minor: Parameter updates, scenario additions
- Patch: Bug fixes, minor corrections

Simulation Practice ​

7. Perform Mass Balance Checks

Always verify mass balance closure:

Acceptable Tolerances:
- COD: ±2% error
- Nitrogen: ±5% error
- Phosphorus: ±5% error
- TSS: ±3% error

If error > tolerance:
1. Check input data consistency
2. Verify process configuration
3. Review settling model
4. Inspect sludge wastage
5. Examine recycle streams

8. Run Sensitivity Analysis

Identify critical parameters:

Sensitivity Analysis Checklist:
☑ Influent characteristics (COD, TN, TP, TSS)
☑ Temperature (±5°C)
☑ Flow (±20%)
☑ SRT (±20%)
☑ DO setpoint (±0.5 mg/L)
☑ Recycle ratios (±20%)
☑ Kinetic parameters (±10%)

Document which parameters have strongest influence.

9. Validate Against Data

Compare model predictions to measurements:

Validation Metrics:
- R² (coefficient of determination): > 0.80 good, > 0.90 excellent
- RMSE (root mean square error): as low as possible
- Bias (mean error): ±10% of mean value
- Visual inspection: time series plots

Validate multiple parameters:
☑ Effluent quality (BOD, TSS, TN, TP, NH4)
☑ MLSS concentration
☑ RAS TSS
☑ Oxygen uptake rate (if available)
☑ Denitrification rate (if available)

10. Test Extreme Conditions

Ensure model robustness:

Test Scenarios:
☐ Peak flow (design maximum)
☐ Minimum flow (turndown)
☐ High organic load
☐ Low temperature (winter minimum)
☐ High temperature (summer maximum)
☐ Shock loads (2x normal)
☐ Equipment failures (pump out, blower down)
☐ Chemical feed interruption

Model should not crash or give unrealistic results.

Optimization and Design ​

11. Define Clear Objectives

Establish measurable goals:

Single-Objective Examples:
- Minimize energy consumption (kWh/m³)
- Minimize chemical cost ($/m³)
- Maximize treatment capacity (MGD)
- Minimize carbon footprint (kg CO2e/m³)

Multi-Objective Examples:
- Minimize cost AND maximize reliability
- Minimize energy AND minimize chemicals
- Maximize capacity AND minimize footprint

Include constraints:
- Effluent limits (regulatory)
- Budget constraints
- Footprint restrictions
- Operational feasibility

12. Use Appropriate Optimization Methods

Method Selection Guide:

Local Optimization (Gradient-Based):
- Use when: Smooth objective function, continuous variables
- Algorithms: Nelder-Mead, BFGS, L-BFGS-B
- Pros: Fast convergence
- Cons: May find local optima, not global

Global Optimization (Heuristic):
- Use when: Non-smooth, discontinuous, multiple optima
- Algorithms: Genetic Algorithm, Particle Swarm, Simulated Annealing
- Pros: Finds global optimum
- Cons: Computationally expensive

Multi-Objective:
- Use when: Multiple competing objectives
- Algorithms: NSGA-II, NSGA-III, MOEA/D
- Result: Pareto front of optimal trade-offs

13. Account for Uncertainty

Design for robustness:

Uncertainty Sources:
1. Input Uncertainty
   - Influent variability
   - Future growth projections
   - Climate change impacts

2. Model Uncertainty
   - Parameter estimation error
   - Model structure limitations
   - Simplifying assumptions

3. Operational Uncertainty
   - Equipment performance variability
   - Control system accuracy
   - Maintenance downtime

Robust Design Approach:
- Use safety factors (e.g., 1.2x peak flow)
- Monte Carlo analysis for reliability
- Stress testing under extreme scenarios
- Flexible design for future adaptation

Economic Analysis ​

14. Perform Life Cycle Cost Analysis

Consider total cost of ownership:

LCCA Components:

Capital Costs:
☑ Equipment and materials
☑ Installation and construction
☑ Engineering and design fees
☑ Permitting and legal
☑ Contingency (typically 10-20%)

Operating Costs (Annual):
☑ Energy (electricity, gas, fuel)
☑ Chemicals
☑ Labor
☑ Maintenance and repairs
☑ Residuals disposal
☑ Supplies and consumables

Future Costs:
☑ Major maintenance (year 10, 20, ...)
☑ Equipment replacement
☑ Capacity expansion
☑ Regulatory compliance upgrades

Analysis Period:
- Typical: 20-30 years
- Discount rate: 3-6% (public utility)
- Include salvage value if applicable

15. Sensitivity to Economic Assumptions

Test impact of changing economic parameters:

Sensitivity Parameters:
- Electricity cost: ±30%
- Chemical cost: ±20%
- Discount rate: ±2%
- Analysis period: ±10 years
- Equipment life: ±20%

Identify:
- Break-even points
- Most influential cost drivers
- Conditions favoring each alternative

Reporting and Communication ​

16. Tailor Communication to Audience

Audience          Focus                     Detail Level    Format
──────────────────────────────────────────────────────────────────────
Executives        Cost, ROI, timeline       Summary         PowerPoint
Engineers         Technical details         Comprehensive   Report + Data
Operators         Procedures, setpoints     Practical       Manual, SOPs
Regulators        Compliance, reliability   Evidence-based  Formal Report
Public            Benefits, safety          Simplified      Infographic

17. Use Effective Visualizations

Visualization Best Practices:

Time Series Plots:
- Show trends and patterns
- Include target/limit lines
- Use appropriate time resolution
- Label axes clearly

Bar Charts:
- Compare discrete alternatives
- Order logically (not alphabetically)
- Include uncertainty bars if applicable
- Use consistent color scheme

Scatter Plots:
- Show correlations
- Include trendline and R²
- Identify outliers
- Use size/color for 3rd dimension

Process Flow Diagrams:
- Show all major unit processes
- Include flow rates and concentrations
- Use standard symbols (ISA 5.1)
- Highlight key streams

Tables:
- Round to appropriate significant figures
- Align numbers on decimal point
- Include units in headers
- Use shading for readability
- Highlight key values

18. Include Uncertainty and Limitations

Be transparent about model limitations:

Discussion of Uncertainty:
☑ State assumptions clearly
☑ Quantify uncertainty where possible (confidence intervals)
☑ Identify parameters with high uncertainty
☑ Discuss limitations of model structure
☑ Note data gaps or quality issues
☑ Provide recommendation with appropriate caveats

Example Statement:
"Model predicts effluent TN of 6.5 ± 1.2 mg/L (95% CI) under
average conditions. Uncertainty primarily driven by influent TN
variability and kinetic parameter estimation. Recommend SRT ≥ 12
days to ensure reliable compliance with 8 mg/L limit."

Continuous Improvement ​

19. Learn from Actual Performance

Post-Implementation Review:
1. Monitor actual vs. predicted performance
2. Identify discrepancies
3. Investigate root causes
4. Update model if needed
5. Refine for future projects

Feedback Loop:
Model → Design → Construction → Operation → Data → Model Update

20. Stay Current with Best Practices

Professional Development:
☑ Attend conferences (WEFTEC, IWA)
☑ Read journals (Water Research, WE&T, Water Science & Technology)
☑ Participate in webinars and training
☑ Join professional organizations (WEF, IWA, AWWA)
☑ Network with peers
☑ Follow ErgoPlanner updates and new features

Industry Standards:
- WEF Manual of Practice (MOP)
- IWA Scientific and Technical Reports (STR)
- EPA Design Manuals
- Ten States Standards
- Local regulatory guidance

Model Quality Assurance Checklist ​

Use this checklist before finalizing any model:

Pre-Simulation ​

☐ Input data reviewed for accuracy
☐ Units verified and consistent
☐ All required parameters defined
☐ Initial conditions set appropriately
☐ Simulation duration adequate
☐ Time step appropriate for dynamics
☐ Convergence criteria defined

Post-Simulation ​

☐ Simulation completed without errors
☐ Mass balance checked and acceptable
☐ Results physically reasonable
☐ Effluent quality meets expectations
☐ MLSS concentration realistic
☐ Oxygen demand plausible
☐ Energy consumption reasonable

Validation ​

☐ Compared to measured data (if available)
☐ Validation metrics calculated (R², RMSE)
☐ Sensitivity analysis performed
☐ Extreme conditions tested
☐ Peer review completed
☐ Documentation finalized

Reporting ​

☐ Objectives clearly stated
☐ Methodology described
☐ Assumptions documented
☐ Results presented clearly
☐ Uncertainty quantified
☐ Recommendations actionable
☐ Limitations acknowledged

Common Mistakes to Avoid ​

1. Model Setup Errors ​

❌ Over-complicating the model

  • Adding unnecessary detail
  • Using advanced features without justification
  • Modeling every minor piece of equipment

✓ Solution: Use simplest model that meets objectives

❌ Using default parameters without validation

  • Applying generic parameters to specific facility
  • Not calibrating to site-specific data
  • Ignoring local conditions

✓ Solution: Always calibrate to site data

❌ Inconsistent units

  • Mixing imperial and metric
  • Incorrect concentration units (mg/L vs g/m³)
  • Wrong time basis (per day vs per hour)

✓ Solution: Establish unit system and stick to it

2. Data Quality Issues ​

❌ Using insufficient data

  • Single day of measurements
  • No seasonal variation
  • Missing critical parameters

✓ Solution: Collect at least 1 year of data covering all seasons

❌ Not checking data quality

  • Outliers not identified
  • Lab errors not caught
  • Mass balance not closed

✓ Solution: Implement data QA/QC procedures

❌ Ignoring data gaps

  • Interpolating across long gaps
  • Assuming missing data = zero
  • Not addressing equipment failures

✓ Solution: Document gaps and handle appropriately

3. Simulation Errors ​

❌ Insufficient warm-up period

  • Starting from unrealistic initial conditions
  • Not allowing system to reach steady-state
  • Analyzing transient startup

✓ Solution: Discard initial period (e.g., 3× SRT)

❌ Time step too large

  • Missing fast dynamics
  • Numerical instability
  • Poor resolution of peak events

✓ Solution: Use adaptive time stepping or small fixed step

❌ Ignoring convergence warnings

  • Proceeding despite numerical issues
  • Not investigating root cause
  • Trusting questionable results

✓ Solution: Resolve all warnings before accepting results

4. Interpretation Errors ​

❌ Over-interpreting results

  • Reporting excessive significant figures
  • Claiming precision beyond data quality
  • Ignoring model uncertainty

✓ Solution: Report uncertainty, use appropriate precision

❌ Not validating predictions

  • Accepting model output without verification
  • No comparison to measured data
  • Skipping sensitivity analysis

✓ Solution: Always validate against independent data

❌ Extrapolating beyond calibration range

  • Predicting far beyond data range
  • Assuming linear relationships hold
  • Ignoring model limitations

✓ Solution: Clearly state applicability limits

5. Communication Errors ​

❌ Inadequate documentation

  • Missing key assumptions
  • Undocumented parameter choices
  • No change log

✓ Solution: Document thoroughly from the start

❌ Poor visualization

  • Unclear axes labels
  • Inappropriate chart types
  • Too much information per figure

✓ Solution: Follow data visualization best practices

❌ Not explaining limitations

  • Presenting results as certain
  • Hiding uncertainty
  • Overstating confidence

✓ Solution: Clearly state assumptions and limitations


Key Performance Indicators ​

Track these metrics to assess model quality:

Calibration Quality ​

Metric                          Target
────────────────────────────────────────
R² (effluent quality)            > 0.80
RMSE (effluent TN)              < 1.5 mg/L
RMSE (effluent TP)              < 0.3 mg/L
Bias (any parameter)            ±10%
Mass balance closure            ±5%

Model Efficiency ​

Metric                          Target
────────────────────────────────────────
Simulation time                 < 5 min (steady-state)
                                < 30 min (1 year dynamic)
Convergence rate                > 95%
Memory usage                    < 4 GB

Project Delivery ​

Metric                          Target
────────────────────────────────────────
Time from data to calibrated    < 2 weeks
Time from calibration to report < 1 week
Peer review cycle time          < 3 days
Client revision turnaround      < 2 days

Resources ​

Within ErgoPlanner ​

External References ​

Books:

  • "Activated Sludge Models ASM1, ASM2, ASM2d and ASM3" - IWA Task Group
  • "Biological Wastewater Treatment: Principles, Modelling and Design" - Henze et al.
  • "Design of Municipal Wastewater Treatment Plants" - WEF MOP 8
  • "Wastewater Engineering: Treatment and Resource Recovery" - Metcalf & Eddy

Standards:

  • IWA Activated Sludge Model (ASM) series
  • ISO 24762 - Wastewater modeling guidelines
  • WEF Manual of Practice (various volumes)
  • EPA Design Manuals

Journals:

  • Water Research
  • Water Environment Research
  • Water Science & Technology
  • Environmental Science & Technology

Online Resources:

  • WEF (Water Environment Federation): www.wef.org
  • IWA (International Water Association): www.iwa-network.org
  • EPA Water Treatment: www.epa.gov/water
  • ErgoPlanner Documentation: docs.ergoplanner.com

Conclusion ​

Following these best practices will help you:

  • ✓ Develop accurate and reliable models
  • ✓ Avoid common pitfalls and errors
  • ✓ Deliver high-quality results efficiently
  • ✓ Communicate findings effectively
  • ✓ Maintain professional standards
  • ✓ Continuously improve your skills

Remember: Good modeling is both art and science. Technical excellence must be combined with engineering judgment, transparent communication, and continuous learning.

Next Steps:

  1. Review specific best practice guides in this section
  2. Apply checklist to current project
  3. Establish quality assurance procedures
  4. Share knowledge with team
  5. Provide feedback to improve ErgoPlanner

Questions or suggestions for additional best practices?

Contact ErgoPlanner support or contribute to the community wiki.

Last Updated: January 2025 Version: 1.0 Contributors: ErgoPlanner Engineering Team