This block calculates the state of charge using
d SOC/dt = Q̇eff/(Hf mice,max)
where SOC is the state of charge, Q̇ is the heat transfer rate of the ice tank, positive for charging and negative for discharging, Hf is the fusion of heat of ice and mice,max is the nominal mass of ice in the storage tank.
The model sets Q̇eff = Q̇, unless the state of charge is 0 or 1, in which case Q̇eff is set to zero if it were to lead to over- or under-charging.