modelStateOfCharge

Mass of ice remaining in the tank

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Information

This block calculates the state of charge using

d SOC/dt = Q̇eff/(Hf   mice,max)

where SOC is the state of charge, 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 eff = Q̇, unless the state of charge is 0 or 1, in which case eff is set to zero if it were to lead to over- or under-charging.

Parameters

TypeNameDefaultDescription
RealSOC_startStart value for state of charge
Modelica.Units.SI.EnergyE_nominalStorage capacity

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealInputQ_flowHeat transfer rate: positive for charging, negative for discharging
Modelica.Blocks.Interfaces.RealOutputQEff_flowActual heat flow rate, taking into account 0 ≤ SOC ≤ 1
Modelica.Blocks.Interfaces.RealOutputSOCState of charge

Components

TypeNameDefaultDescription
BooleanchargedTrue if tank is fully charged
BooleandischargedTrue if tank is fully discharged
BooleansuspendTrue if either fully charged or fully discharged

Revisions

  • January 26, 2022, by Michael Wetter:
    Rewrote model to avoid state of charge to be outside of [0, 1].
  • December 8, 2021, by Yangyang Fu:
    First implementation.