Using machine learning in physics-based simulation of fire