Interactions between gas flow and reversible chemical reaction in porous media