Heat flux estimation for materials with pyrolysis and ablation