Simulation of Gas Detonation Propagation in a Medium Having Variable Chemical Composition