Environmental EngineeringDigital WaterAI/MLInfrastructure Resilience

Mostafa Khalil

I bring together process engineering, modelling, and machine learning to make water infrastructure smarter, cleaner, and more resilient.

Mostafa Khalil
01

About

Who I am, and how I approach the work.

I work at the intersection of water and wastewater engineering, mathematical modelling, data science, and process control. My focus is on developing intelligent monitoring, decision-support, and control frameworks that help make water infrastructure more resilient.

In practice, this means building mechanistic and data-driven models, uncertainty-aware soft sensors, forecasting tools, and control systems—from digital tools for engineering design to operational digital twins for full-scale facilities. My work spans applied research and digital product development, with an emphasis on turning complex engineering workflows into practical tools that engineers and operators can use.

This site is where I share the research, projects, and writing I am most proud of, along with how I think about problems at the intersection of engineering, artificial intelligence, and the ideas that shape both.

How I work

01

Combine knowledge with data-driven models

Process knowledge and machine learning are stronger together. Hybrid approaches capture what pure theory or pure data each miss on their own.

02

Design for uncertainty

Real plants are noisy and data-scarce. I build soft sensors and models that quantify what they don't know, not just what they predict.

03

Keep it simple and interpretable

I don't follow the hype and believe that the best solution is the simplest possible. I also favour performance you can actually explain to an engineer.

04

Translate research into tools

While I fall in love of theory — my goal is a decision an engineer can act on. I care about the last mile from model to practice.

Skills

Process & hydraulic modelling

BioWinSumoWESTAQUASIMWaterGEMSSewerGEMSHAMMER

Data science & machine learning

PythonPandas / NumPyscikit-learnTensorFlow / KerasXGBoost / LightGBMStatsmodels / SciPyDoWhy / PgmpyYOLO / OpenCV

Data systems & deployment

SQLInfluxDBGit / GitHubMicrosoft FoundryAzure DevOpsMlFlow

Methods

Mechanistic modellingTimeseries analysisMonteCarlo simulationsMachine Learning modellingKnowledge graphsUncertainty quantificationSensitivity analysisModel predictive controlDecision support
02

Areas of interest

03

Experience

From municipal design offices to research labs to applied data science in industry.

  1. Data Scientist / Applied Researcher — Water Research & Innovation · Stantec

    Apr 2025 – Present

    Edmonton, AB, Canada

    • Lead and co-lead applied research in water/wastewater process modelling, soft sensors, predictive maintenance, and decision-support tools.
    • Chair the internal ML/AI Community of Practice, driving responsible adoption of AI and data science across engineering practice.
    • Translate engineering workflows into practical digital tools with process engineers, SMEs, and software developers; filed invention disclosures for water-infrastructure tools.
  2. Postdoctoral Fellow — modelEAU · Université Laval

    Apr 2024 – Apr 2025

    Québec, QC / Remote

    • Built model-predictive-control and forecasting workflows integrating mechanistic and data-driven models.
    • Designed and deployed real-time deep-learning models for reverse-osmosis membrane-fouling forecasting.
    • Developed automated data pipelines and control-oriented workflows for pilot-scale treatment systems.
  3. Research & Development Engineer · Cobalt Water Global

    Apr 2024 – Aug 2024

    United States / Remote

    • Supported N₂O emissions modelling, API maintenance, model-performance monitoring, and emissions risk assessment for full-scale facilities.
    • Strengthened quality-control processes for generated reports and calculations.
  4. Teaching & Research Assistant · University of Alberta

    Sep 2019 – Apr 2024

    Edmonton, AB, Canada

    • Doctoral research on mechanistic and machine-learning modelling of nitrous-oxide emissions from wastewater treatment.
    • Taught with WaterGEMS, SewerGEMS, and BioWin; mentored undergraduate water/wastewater design capstone projects.
  5. Environmental Design Engineer / Consultant · Freelance & Engineering Consulting

    Feb 2018 – Jan 2022

    Canada / Egypt / Saudi Arabia

    • Hydraulic evaluations for potable water systems and stormwater / wastewater infrastructure design.
    • Surge analyses and water-hammer protection for sewage pump stations and conveyance lines.
  6. Municipal Infrastructure Design Engineer · ALDAR Consulting Engineers

    May 2015 – Jan 2018

    Cairo, Egypt

    • Hydraulic balance and force-main transient analysis, pump-station and treatment-plant expansion design, and tender documentation.
  7. Storm & Wastewater Design Engineer · AAW & Partners Consulting Engineers

    Nov 2014 – May 2015

    Cairo, Egypt

    • Designed and simulated stormwater networks with highway and urban-planning teams.

Education

PhD, Environmental Engineering

2024

University of Alberta · Edmonton, AB, Canada

Dissertation: mechanistic and machine-learning modelling of nitrous-oxide emissions from wastewater treatment. Supervisors: Prof. Yang Liu & Prof. Peter A. Vanrolleghem.

MSc, Civil Engineering

2017

Ain Shams University · Cairo, Egypt

Thesis: a low-cost fabric-filter system for wastewater treatment in small communities.

BSc, Civil Engineering

2013

Ain Shams University · Cairo, Egypt

Certifications

  • IBM Data Science Professional Certificate — Coursera (2022)
  • Machine Learning — Stanford / Coursera (2022)
  • Environmental Systems Analysis — Eawag Summer School (2021)
  • BioWin WWTP Modelling (2021)

Memberships

  • Engineer-in-Training (E.I.T.), APEGA
  • Member, International Water Association (IWA)
  • Member, Water Environment Federation (WEF)
04

Selected work

2025–presentFeatured

Digital water & engineering-calculation tools

Engineering know-how lived in spreadsheets and experts' heads — hard to reuse, validate, or scale.

Technical lead defining the computation logic, subject-matter-expert validation workflows, and implementation path for practical decision-support tools used across water-sector engineering.

Digital WaterDecision SupportAzurePython
2025–presentFeatured

Soft sensors & uncertainty-aware monitoring

Utilities need to know critical process states they can't afford to measure directly.

Developing hybrid mechanistic/ML and probabilistic models that estimate key water-quality states — and quantify their own uncertainty — for data-scarce treatment plants.

Soft SensorsUncertaintyMachine LearningHybrid Models
2019–2024Featured

N₂O emissions modelling for wastewater treatment

Nitrous oxide is a potent greenhouse gas from treatment plants, yet notoriously hard to predict.

Doctoral research building mechanistic and interpretable machine-learning models — with feature selection and uncertainty analysis — to predict and help mitigate N₂O emissions at full and pilot scale.

N₂O / GHGMechanistic ModellingInterpretable ML
2024–2025

Reverse-osmosis forecasting & control

Membrane fouling quietly degrades RO performance and is costly to manage reactively.

Postdoctoral work developing deep-learning forecasting models and control-oriented data pipelines for RO membrane-fouling prediction and recovery optimization.

Deep LearningTime SeriesMPCMembranes
2025–present

Predictive maintenance & asset intelligence

Water utilities react to failures instead of anticipating them.

Connecting asset condition, process reliability, hydraulic constraints, energy, cost, and risk into predictive-maintenance and operational-intelligence workflows.

Predictive MaintenanceAsset IntelligenceWater Utilities
05

Publications

Peer-reviewed research on modelling, machine learning, and emissions in water and wastewater systems.

View all on Google Scholar
04

Let's collaborate

Have an idea that you'd like to discuss, or a project you think I can help with?

Feel free to drop me a line!