Skip to main content
Loading navigation
Back to prompt library

Build an Industrial Desalination RO Membrane Cleaning Outage Planner — implementation

Linked challenge: Build an Industrial Desalination RO Membrane Cleaning Outage Planner

Prompt source

implementation67 lines11 sectionsNo variables1 code block
## Build
Schedule clean-in-place maintenance across multi-train reverse osmosis desalination plants. Coordinate membrane outages against finished water storage reserves and power tariff fluctuations.

## User
Seawater desalination operations engineer

## Workflow
1. Parse normalized transmembrane pressure, salt passage telemetry, and finished water potable tank levels.
2. Model specific energy consumption increases caused by membrane scaling using WaterTAP RO membrane equations.
3. Formulate a staged clean-in-place maintenance schedule that preserves municipal water delivery quotas during off-peak power hours.
4. Generate a chemical staging manifest and clear operating instructions for the plant maintenance crew.

## Interface
A tabular train scheduling console displaying fouling trends, clean-in-place chemical batches, and potable buffer projections.

## Data
Develop synthetic hourly sensor data for six SWRO trains over 90 days, capturing normalized flux decline and pressure differentials.
Starter examples below are synthetic. They are not downloaded records.

## Source
[WaterTAP treatment modeling](https://raw.githubusercontent.com/watertap-org/watertap/main/README.md)
Leverages reverse osmosis transport models and membrane resistance degradation relationships from WaterTAP.

## Tools
agno, numpy, pydantic.
Enables multi-agent coordination between energy tariff monitoring, chemical dosing calculators, and tank reserve monitors.
Fast hosted model capable of parsing multi-variable engineering limits and drafting operational procedures.

## 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
- Flags RO trains for chemical cleaning when normalized salt passage exceeds 1.5% or pressure differential rises 20%.
- Ensures aggregate plant output remains above the minimum municipal contract delivery quota of 85,000 m3/day.
- Restricts clean-in-place wash heater and flushing pump power draw to designated low-tariff grid periods.

## Starter Examples
```json
[
  {
    "input": {
      "train_id": "RO-Train-03",
      "normalized_pressure_drop_bar": 2.8,
      "clean_pressure_drop_bar": 2.1,
      "salt_passage_pct": 1.62,
      "potable_storage_m3": 45000,
      "daily_demand_m3": 80000
    },
    "expected_output": {
      "cip_recommended": true,
      "recommended_window": "22:00-06:00",
      "chemical_recipe": "2% Citric Acid followed by 0.1% NaOH",
      "potable_reserve_margin_hours": 13.5
    }
  },
  {
    "input": {
      "train_id": "RO-Train-01",
      "normalized_pressure_drop_bar": 2.2,
      "clean_pressure_drop_bar": 2.1,
      "salt_passage_pct": 0.95,
      "potable_storage_m3": 42000,
      "daily_demand_m3": 80000
    },
    "expected_output": {
      "cip_recommended": false,
      "recommended_window": "none",
      "chemical_recipe": "none",
      "potable_reserve_margin_hours": 12.6
    }
  }
]
```

## Safety
Simulation and scheduling output only. All chemical recipes and valve actuations must be verified by a licensed water treatment technician.
Use mock external writes. Require human review before any real deployment.