Including a Phase Change in an Energy Balance