Bai's group, The Department of Energy Sciences, Lund University
CCM (Chemistry Coordinate Mapping) is an accurate and efficient chemistry acceleration method for several OpenFOAM Foundation versions. By grouping CFD cells with similar thermochemical states and sharing their reaction-rate calculations, CCM delivers substantial speedups while preserving accuracy. The latest implementation works directly on general reactive cases, keeping direct integration (DI) accuracy at roughly the cost of a cold-flow simulation.
The reaction rates (RR) depend on the mixture composition (mass fractions
Figure 1. Nitric oxide (NO) distributions grow progressively closer to DI as more variables are included in CCM. Tested on LUMI with a 2D DNS case featuring dual-fuel combustion.
A key strength of CCM is that it stays efficient even after all dependent variables are included, thanks to several rounds of optimization. Combined with a SIMD-optimized stiff solver, chemistry is no longer the bottleneck: the chemistry step costs less than the flow-transport step.
Figure 2. Wall-clock time breakdown: with all dependent variables active, the chemistry step costs less than the flow-transport step. Tested on LUMI with a 2D DNS case featuring dual-fuel combustion.
Additionally, it scales well to thousands of cores.
Figure 3. Parallel scaling of CCM up to thousands of cores, tested on Sandia Flame D.
| OpenFOAM Version | Status | Notes |
|---|---|---|
| OpenFOAM-14 | โ Latest | Full feature set: SIMD-optimized ODE solver, MPHashTable, native MPI, and cellZone restriction |
| OpenFOAM-10 | โ Supported | Same feature set except for cellZone restriction |
| OpenFOAM-13 | ๐๏ธ Legacy | Reference only, in OpenFOAM-13-legacy/, no optimized ODE/nativeMPI/MPHashTable |
The examples in this README target OpenFOAM-14. If you are running an earlier version, the configuration keywords are the same, but the solver name and a few dictionary details differ; refer to the ready-to-run tutorial in that version's directory (e.g. OpenFOAM-10/Sandia/).
โ
Adaptive Error Control (EC): Automatically keeps chemistry errors below a user-defined threshold (1/nSlice), accounting for important species. It runs with minimal overhead, dynamically adjusting the grouping strategy to keep errors within user-specified bounds. Theory and implementation details are in the author's PhD Thesis; this version is the closest in spirit to the original paper.
โ
Strong Performance: For most mechanisms (stiffness at or below GRI-Mech 3.0), chemistry takes less time than the flow solver.
โ
Zero Configuration: Sensible defaults out of the box: EC over all species + T/p, balancing accuracy and speed automatically.
โ
SIMD-optimized ODE solver: Integrates several extremely efficient stiff solvers contributed by the community.
โ
Load-balanced parallelism: A dedicated load-balancing algorithm distributes the computational load while reducing communication overhead in parallel runs.
โ
MPHashTable: A memory-pool-backed hashtable that speeds up state storage and lookup.
โ
Native MPI: Inter-core communication uses native MPI calls directly, further cutting method overhead (supports OpenFOAM-10/14).
โ
cellZone restriction: Reaction rates can be integrated only inside a cell zone, which may be regenerated every chemistry step to track the flame. See docs/cellZone.md.
- An installed OpenFOAM Foundation version (14 recommended; 10 also supported)
We use OpenFOAM-14 as an example below; other versions are identical apart from the path.
-
Set up your OpenFOAM environment:
source /path/to/OpenFOAM-14/etc/bashrc # Update with your installation path
-
Compile the CCM library:
cd OpenFOAM-14/code/ wclean && wmake -j
-
Load the CCM library in
<case>/system/controlDict:libs ("libCCM.so");
-
Select CCM in
<case>/constant/chemistryProperties:type CCM; chemistry on; ode { solver seulex; absTol 1e-08; relTol 0.1; } CCM { nSlice 50; ignoreMin 1e-6; optimizedODE true; }
This minimal
CCMdictionary is enough for most cases: Error Control runs automatically over all species and T (and p when needed). For manual variable selection, adaptive EC, distributed communication, and other options see configuration.The above basic setting should work for most cases. The author recommends to check configuration only when a big case utilizing thousands of cores is attempted.
-
Run the simulation with
foamRun(setsolver multicomponentFluid;incontrolDict):# Serial foamRun # Parallel (6 cores) decomposePar -force -fileHandler collated mpirun -n 6 foamRun -parallel -fileHandler collated
Earlier versions: OpenFOAM-10 uses
chemistryType { solver ode; method CCM; }instead oftype CCM;, and the solver isreactingFoamrather thanfoamRun. TheCCMdictionary is unchanged. If you attempt an earlier version, copy the settings from the ready-to-run tutorial in that version's directory (e.g.OpenFOAM-10/Sandia/).
Two ready-to-run cases are included for validation and performance testing:
- Sandia Flame D: a piloted methane/air jet flame RANS case adapted from the OpenFOAM tutorials, ideal for a quick accuracy check.
- RCCI (only in OpenFOAM-10): a DNS case from our paper, simplified by removing the diesel jet and coarsening the mesh. It runs in ~2 h on 6 cores (vs. ~12h for DI).
The minimal setup above is enough for most cases. For finer control:
- docs/configuration.md: the
mode,nSlice, andprincipalVarsparameters, adaptive error control (ecMode), and distributed-mode communication (communicator). - docs/cellZone.md: restricting chemistry integration to a dynamically regenerated cell zone (OpenFOAM-14).
A challenging RCCI (Reactivity Controlled Compression Ignition) case, run with:
- all principal variables (far more than needed; a stress test for the code)
- nSlice = 50
Results:
- โ Visually identical to DI
- โ 4ร faster than traditional methods (better than our published 2ร improvement)
- โ No observable difference in any of the examined metrics
GPL-3.0 License (same as OpenFOAM)
Copyright (C) 2021 Shijie Xu, Shenghui Zhong
Copyright (C) 2025 Yuchen Zhou
Based on OpenFOAMยฎ (Copyright (C) 2016-2025 OpenFOAM Foundation)
See COPYING file for full license text.
If you use CCM in your research, please cite:
@article{jangi2012multidimensional,
title={Multidimensional chemistry coordinate mapping approach for combustion modelling with finite-rate chemistry},
author={Jangi, Mehdi and Bai, Xue-Song},
journal={Combustion Theory and Modelling},
volume={16},
number={6},
pages={1109--1132},
year={2012},
publisher={Taylor \& Francis}
}
@article{zhou2025detailed,
title={Detailed numerical simulation of ammonia/diesel combustion under CI engine conditions},
author={Zhou, Yuchen},
year={2025}
}
@article{jangi2013development,
title={Development of chemistry coordinate mapping approach for turbulent partially premixed combustion},
author={Jangi, Mehdi and Yu, Rixin and Bai, Xue-Song},
journal={Flow, turbulence and combustion},
volume={90},
number={2},
pages={285--299},
year={2013},
publisher={Springer}
}
@inproceedings{vauquelin2025multidimensional,
title={Multidimensional chemistry coordinate mapping for large eddy simulations of a turbulent premixed bluff-body burner},
author={Vauquelin, Pierre and Zhou, Yuchen and {\AA}kerblom, Arvid and Fureby, Christer and Bai, Xue-Song},
booktitle={AIAA SCITECH 2025 Forum},
pages={2485},
year={2025}
}
Current version author: Yuchen Zhou
Second version author: Shijie Xu, Shenghui Zhong
First version author: Mehdi Jangi



