The trick is to think backward. Normally you paint shadows in the recesses of a model and then highlights on the edges emphasising how the external light plays on the shape. Fire has a light of its own and so the roles are reversed and the deeper you go, the lighter it will be.
Note on colour: dependent on the substance being burned a fire can have different colours, like: red for wood, blue for natural gas and alcohol, green for boric acid or violet for potassium salts. Even in a realistic setting you can choose any colour you like. The lightest you can go is pure white for substances with high temperatures and uniform light emission.