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, 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.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | SOC_start | Start value for state of charge | |
| Modelica.Units.SI.Energy | E_nominal | Storage capacity |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput | Q_flow | Heat transfer rate: positive for charging, negative for discharging | |
| Modelica.Blocks.Interfaces.RealOutput | QEff_flow | Actual heat flow rate, taking into account 0 ≤ SOC ≤ 1 | |
| Modelica.Blocks.Interfaces.RealOutput | SOC | State of charge |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | charged | True if tank is fully charged | |
| Boolean | discharged | True if tank is fully discharged | |
| Boolean | suspend | True 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.