tapflow
Self-hosted iOS & Android simulator streaming for the whole team
Two plant readings, one physics-shaped input, an estimate before the lab answers — and a warning when not to trust it.
Developer toolsHTML · Jupyter NotebookGitHub @EngMtalebOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Distillation soft sensor: estimates a lab vapour pressure from two plant readings, with a 95% range and a warning when not to trust it.
Loading the full README.
Read the full README ↗AI for process problems, built by a chemical engineer. Each project starts from a question a plant actually asks, lets the physics shape what the model sees, and says where its answer stops being reliable.
Eng. Mohammed Taleb · LinkedIn · Project pages
The lab checks the vapour pressure of the bottoms product about once a shift, and the result comes 1–3 hours after the sample. This estimates it from two readings the plant already has — one tray temperature and the column pressure — with a 95% range and a warning when the conditions are outside what it was tested on.
Try it live · Project page · Write-up · Validation record · Data exploration
Tested on a later operating campaign that ran at less than half the reboiler duty — never a random split:
| Measure | Result |
|---|---|
| R² | 0.980 |
| Mean absolute error | 0.645 |
| Interval coverage (95% nominal) | 94% |
| Error on points it flags as outside the tested conditions | 7.8× the rest |
What it found
1/T, the form Antoine's
equation uses, cut the error by about a third (MAE 0.953 → 0.645). A simple Ridge model then beat
Random Forest and XGBoost, and two inputs beat all twenty-one (R² 0.980 against 0.884).One seawater RO plant, two goals: see its fouling coming, and run on the sun. Public data only — one real plant's published record, ten years of NASA sun and sea, public membrane datasheets — and our own models where the data stop.
The deck · Write-up · Notebooks
pip install -e ".[dev]"
pytest tests -q # 252 tests, no data needed
python -m chemai.api.run # http://localhost:8000
curl -X POST localhost:8000/predict \
-H "Content-Type: application/json" \
-d '{"temperature": 450, "pressure": 228}'
{"vapour_pressure": 38.8, "interval_lower": 35.84, "interval_upper": 41.75,
"in_envelope": true, "distance": 1.26, "warning": null}
No endpoint returns a bare number: every answer carries its interval and the envelope check. The deployed API is at chemai-tr2c.onrender.com/docs — free hosting, so the first request after a quiet spell can take a minute.
Data is not committed. The soft sensor uses the public distillation-tower dataset from OpenMV.net.
chemai/ the package: physics features, models, uncertainty, envelope check, API
projects/ one folder per project: training script and write-up
docs/ validation record and data exploration
tests/ 252 tests that run without any dataset
soft-sensor/ the soft sensor's project page, served by GitHub Pages
ai-for-ro/ the AI for RO deck, served by GitHub Pages
test_coefficient_sign_is_physical fails if the model
inverts against thermodynamics, test_split_is_not_random fails on leakage, and
test_rejects_celsius_temperature catches the silent unit error./health reports a mismatch.These are deployed prototypes, not plant systems: no historian connection, no authentication, no monitoring, no automatic retraining, no field validation.
Implementation assisted by AI tools. The engineering framing, interpretation and validation are the author's.