Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CQMOM Bootcamp

An interactive, pedagogical toolkit for learning the Quadrature Method of Moments (QMOM) and Conditional Quadrature Method of Moments (CQMOM) — from 1D fundamentals to 2D/3D multivariate extensions.

CQMOM Bootcamp

🎯 What is this?

Population Balance Equations (PBEs) are central to modeling multiphase flows — sprays, crystals, bubbles, particles. The Quadrature Method of Moments (QMOM) and its multivariate extension CQMOM are powerful techniques for solving these equations efficiently by tracking only a few statistical moments instead of the full distribution.

This Bootcamp teaches you both methods from the ground up, with:

  • 📓 Jupyter Notebooks — step-by-step derivations, proofs, and computational examples
  • 🎮 Interactive JS Visualizations — real-time parameter exploration in your browser
  • 🧪 Validated Code — Monte Carlo benchmarks for every method
  • 🔧 Modular Python Package — import and use for your own research problems

📚 Curriculum

Part Topic Notebooks JS Modules
I Foundations 00 Mathematical Prerequisites, 01 Population Balance Equation Realizability Checker
II QMOM (1D) 02 QMOM Theory, 03 Wheeler Algorithm, 04 Moment Transport, 05 Applications Wheeler Explorer, NDF Playground, QMOM Simulator
III CQMOM (2D) 06 Multivariate Moments, 07 CQMOM Theory, 08 CQMOM Inversion, 09 Applications CQMOM 2D Visualizer
IV CQMOM (3D) 10 3D Extension
V Sandbox 11 Build Your Own

🚀 Quick Start

Jupyter Notebooks

  1. Clone the repository:

    git clone https://github.com/polycfd/cqmom-bootcamp.git
    cd cqmom-bootcamp
  2. Create and activate a virtual environment (optional but recommended): On macOS/Linux:

    python3 -m venv .venv
    source .venv/bin/activate

    On Windows:

    python -m venv .venv
    .venv\Scripts\activate
  3. Install the package in editable mode with development dependencies:

    pip install -e ".[dev]"
  4. Launch the notebooks:

    jupyter lab notebooks/

Interactive Visualizations

Simply open interactive/index.html in your browser — no server needed!

Or visit the live demo.

📦 Python Package

The cqmom_bootcamp package provides all algorithms as importable modules:

from cqmom_bootcamp import wheeler, cqmom, ssp_rk, flux
from cqmom_bootcamp.problems import growth_1d, ellipsoidal_2d

# 1D QMOM: invert moments to get nodes and weights
moments = [1.0, 0.0, 1.0, 0.0, 3.0, 0.0]  # moments of N(0,1)
nodes, weights = wheeler.adaptive_wheeler(moments, n_nodes=3)

# 2D CQMOM: conditional inversion
joint_moments = ...  # M_{j,k} array
result = cqmom.conditional_inversion_2d(joint_moments, n1=2, n2=2)

🏗️ Project Structure

cqmom-bootcamp/
├── cqmom_bootcamp/          # Python package (importable algorithms)
│   ├── wheeler.py           # Adaptive Wheeler algorithm
│   ├── ssp_rk.py            # SSP Runge-Kutta time integrator
│   ├── flux.py              # Moment transport flux calculators
│   ├── monte_carlo.py       # Monte Carlo validation
│   ├── cqmom.py             # CQMOM conditional inversion
│   ├── realizability.py     # Moment realizability checks
│   ├── visualization.py     # Plotting utilities
│   └── problems/            # Pre-built problem definitions
├── notebooks/               # Jupyter curriculum (11 notebooks)
└── interactive/             # JS interactive visualizations

🔗 Related Projects

📖 Key References

  1. McGraw, R. (1997). "Description of aerosol dynamics by the quadrature method of moments." Aerosol Science and Technology, 27(2), 255-265.
  2. Yuan, C. & Fox, R.O. (2011). "Conditional quadrature method of moments for kinetic equations." Journal of Computational Physics, 230(22), 8216-8246.
  3. Marchisio, D.L. & Fox, R.O. (2013). Computational Models for Polydisperse Particulate and Multiphase Systems. Cambridge University Press.

👥 Authors

  • Mohamed Amine Bouguezzoul — Polytechnique Montréal
  • Fabian Denner — Polytechnique Montréal

📄 License

The CQMOM Bootcamp uses separate licenses for software and educational materials:

  • The Python source code in cqmom_bootcamp/ is released under the MIT License. See LICENSE for details.
  • The educational materials, including the notebooks in notebooks/ and interactive content in interactive/, are released under the Creative Commons Attribution-ShareAlike 4.0 International license. See LICENSE-CONTENT for details.

You are free to reuse, modify, and redistribute these materials provided that appropriate credit is given to the original authors and that derivative educational materials are shared under the same license.

About

An interactive bootcamp for learning the Quadrature Method of Moments (QMOM) and Conditional Quadrature Method of Moments (CQMOM)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages