Detailed chemical equilibrium model for porous ablative materials