Build a Potable Water Tank Turnover and Age Minimizer — implementation
Linked challenge: Build a Potable Water Tank Turnover and Age Minimizer
Prompt source
implementation71 lines11 sectionsNo variables1 code block
## Build
Simulate potable water storage tank filling schedules and calculate water age using WNTR hydraulic algorithms. Formulate dynamic pumping strategies to prevent stagnation and preserve residual chlorine during off-peak hours.
## User
Municipal water quality engineer
## Workflow
1. Ingest baseline pump schedules, network boundary conditions, and diurnal demand curves.
2. Simulate extended period hydraulics and water age across storage tanks using WNTR routines.
3. Identify tank storage nodes exceeding the maximum permissible 72-hour water age.
4. Synthesize an alternative pump filling and turnover sequence to refresh tank volumes while maintaining network pressure.
## Interface
A dashboard visualizing tank water age over time, pump schedules, and chlorine residual depletion curves.
## Data
Create simplified synthetic app records containing EPANET/WNTR tank configurations, pump curves, and baseline operating schedules for water age modeling, not complete official schema files.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Water Network Tool for Resilience](https://raw.githubusercontent.com/USEPA/WNTR/main/README.md)
Uses WNTR's water quality simulation capabilities to calculate water age inside storage tanks over extended period simulations.
## Tools
langfuse, wntr, fastapi.
Instruments the iterative pump scheduling generations, logging parameters and monitoring constraint satisfaction.
Local or hosted LLM to analyze water age trends and generate adjusted off-peak pump schedules.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Identifies all storage nodes exceeding 72-hour peak water age during the simulation.
- Verifies that recommended pump turnover operations reduce the peak age below 72 hours.
- Exports step-by-step pump operation sequences specifying activation hours and flow rates.
## Starter Examples
```json
[
{
"input": {
"tank_id": "T-01",
"initial_age_hours": 48,
"pump_schedule_hours": [
2,
3
],
"duration_simulated_hours": 24,
"added_pump_hours": 0
},
"expected_output": {
"peak_water_age_hours": 72,
"stagnation_risk": false,
"recommended_pump_addition": []
}
},
{
"input": {
"tank_id": "T-02",
"initial_age_hours": 60,
"pump_schedule_hours": [
4
],
"duration_simulated_hours": 24,
"added_pump_hours": 0
},
"expected_output": {
"peak_water_age_hours": 84,
"stagnation_risk": true,
"recommended_pump_addition": [
10,
11
]
}
}
]
```
## Safety
Planning tool only. Adjustments to municipal pump stations require operator review and verification to ensure distribution pressures are maintained.
Use mock external writes. Require human review before any real deployment.