A model for the Dytran 3D code to simulate gas deflagration