The latest version of the program (V2.0) exhibits pronounced numerical oscillations during the diffusion process. We are currently working on fixing this issue.
detonationFoam_V2.0 (based on OpenFOAM 8): An open-source solver for simulation of gaseous detonation based on OpenFOAM
The description of the governing equations and mathematical models can still be found in the documentation under the version 1.0 branch.
-
Optimized the code structure (A new dictionary file named ‘solverTypeProperties’ has been added under the constant directory of the case folder to select the solver type, replacing the approach in version 1.0 where three separate solvers were compiled).
-
Fixed an initialization error in the turbulence model.
-
Modified the selection strategy for reconstructed variable members in convective flux computation (showing improved performance in supersonic combustion ramjet simulations).
detonationFoam_V2.0
solverTypeEuler (Solve Euler equations)
solverTypeNS_Sutherland (Solve N-S equations; transport parameters are calculated according to Sutherland model)
solverTypeNS_mixtureAverage (Solve N-S equations; transport parameters are calculated according to mixture-averaged model)
fluxSchemes_improved (Improved convective flux computation library)
DLBFoam-1.0-1.0_OF8 (Dynamic load balance library: https://github.com/blttkgl/DLBFoam-1.0/tree/v1.0_OF8. Optional)
dynamicMesh2D (2D adaptive mesh refinement library. Optional)
ROUNDSchemes (Low-dissipation reconstruction scheme. https://github.com/ROUNDschemes/libROUNDSchemes. Optional)
-
Install OpenFOAM version 8
-
Compile detonationFoam_V2.0
cd detonationFoam_V2.0 ./Allwmake
Note: If you want to use the mixture-averaged transport model in detonationFoam, you will need additional files that define the transport properties of each species. Please refer to https://github.com/ZSHtju/reactingDNS_OpenFOAM for guidance on how to generate these files.
Since detonationFoam solver released on Github, it has been successfully applied in simulation of detonation, scramjet, reactive boundary layer. Here are some typical examples.
Figures are provided by Mr. Jiehui Hu (PhD candidate) from Shanghai Jiao Tong University.
The simulation of the scramjet was completed in collaboration with Mr. Menglei Li (PhD candidate) from the National University of Defense Technology.
The simulation of the turbulent boundary layer was completed with the assistance of Mr. Xin Li (PhD candidate) from National University of Defense Technology.

Please submit a GitHub issue if you found a bug in the program. If you need help with the software or have further questions, contact [email protected] and [email protected].
If you use the code for your works and researches, please cite:
J. Sun, Y. Wang, B. Tian, Z. Chen, detonationFoam: An open-source solver for simulation of gaseous detonation based on OpenFOAM, Computer Physics Communications 292 (2023) 108859.
[18] M. Li, B. An, P. Li, M. Sun, T. Wang, J. Sun, Y. Wang, H. Zhang, Ignition dynamics of a supersonic combustor with parallel dual combustion zones, AIAA Journal in press.
[17] J. Sun, Z. Chen, Bifurcation of cellular detonation structure in a mixture with two-stage reactions, Journal of Fluid Mechanics 1022 (2025) A14.
[16] J. Sun, S.M. Shaik, V.B. Nguyen, H. Zhang, Detonation chemistry and propagation characteristics in partially cracked ammonia, Proceedings of the Combustion Institute 41 (2025) 105910.
[15] J. Hu, B. Zhang, Propulsion performance and detonation wave dynamics in a rotating detonation combustor: Effects of nonideal inflow conditions, Aerospace Science and Technology 168 (2025) 110857.
[14] J. Sun, Y. Wang, S.M. Shaik, H. Zhang, Numerical investigation of detonation initiation and propagation in non-uniformly cracked ammonia and air mixtures, Combustion and Flame 281 (2025) 114439.
[13] Y. Liu, H. Wang, R. Mével, K. Luo, J. Fan, Numerical study of wedge-induced oblique detonation waves in homogeneous and inhomogeneous n-dodecane/air mixtures, Physics of Fluids 37 (2025) 066118.
[12] Z. Yang, B. Zhang, Typical onset modes of DDT and behavior of strong transverse shocks, Chinese Journal of Aeronautics (2025) 103602.
[11] J. Sun, D. Yu, P. Yang, Y. Wang, S. Wang, Z. Chen, Detonation initiation induced by dual hot spots: a computational study, Journal of Fluid Mechanics 1010 (2025) A60.
[10] J. Sun, P. Yang, Z. Chen, Dynamic interaction patterns of oblique detonation waves with boundary layers in hypersonic reactive flows, Combustion and Flame 271 (2025) 113832.
[9] Z. Yang, B. Zhang, H.D. Ng, Experimental observations of gaseous cellular detonation reflection, Proceedings of the Combustion Institute 40 (2024) 105519.
[8] Z. Yang, B. Zhang, Investigation on the dynamics of shock wave generated by detonation reflection, Combustion and Flame 270 (2024) 113791.
[7] J. Sun, P. Yang, Y. Wang, Z. Chen, Numerical study on detonation initiation by multiple hot spots, Proceedings of the Combustion Institute 40 (2024) 105191.
[6] Y. Liu, H. Wang, K. Luo, J. Fan, Numerical simulations of wedge-induced oblique detonation waves in ammonia/hydrogen/air mixtures, International Journal of Hydrogen Energy 86 (2024) 199-207.
[5] J. Hu, B. Zhang, Time/frequency domain analysis of detonation wave propagation mechanism in a linear rotating detonation combustor, Applied Thermal Engineering 255 (2024) 124014.
[4] J. Hu, J. Cheng, B. Zhang, H.D. Ng, The diffraction and re-initiation characteristics of gaseous detonations with an irregular cellular structure, Aerospace Science and Technology 150 (2024) 109240.
[3] J. Sun, P. Yang, B. Tian, Z. Chen, Evolution and Control of Oblique Detonation Wave Structure in Unsteady Inflow, AIAA Journal 61 (2023) 4808-4820.
[2] J. Sun, Y. Wang, B. Tian, Z. Chen, detonationFoam: An open-source solver for simulation of gaseous detonation based on OpenFOAM, Computer Physics Communications 292 (2023) 108859.
[1] J. Sun, P. Yang, B. Tian, Z. Chen, Effects of wedge-angle change on the evolution of oblique detonation wave structure, Physics of Fluids 34 (2022) 096112.