blockFlowControl
This block controls the flow at the primary and secondary pumps
Information
This block implements a state graph to control the flows of the storage plant. It receives two tank status Boolean signals indicating that the tank is charged or empty. These two signals can be both false indicating an in-between state. The block can receive one of the following commands:
- Charge tank,
- No command, and
- Discharge tank.
The command to tank may be disregarded. For example, if the tank is receiving a discharge command but it is already empty, it will not discharge which would let warm return water directly into the supply side.
The system transitions among the following states:
| Step | Description | Transition in | Transition out |
|---|---|---|---|
| All Off (Initial Step) |
All off. This is the initial step. | - | - |
| Local Charging | Charge the tank with the local chiller. | "Charge tank" command AND tank is not charged yet AND chiller is enabled. This transition takes priority over the one below.1 |
The in-transition condition becomes false. |
| Remote Charging | Charge the tank with the remote chiller. | Same as above except that the chiller is not enabled. |
The in-transition condition becomes false. |
| Secondary Pump On | Turn on the secondary pump. This step is in parallel with the two below.2 |
The district has load AND the additional conditions of either step below become true. |
Both steps below are no longer active (implicit). |
| Tank Producing | The tank produces CHW to the district. This step is in parallel with "secondary pump on". |
The district has load AND "Discharge tank" command AND tank not empty. This transition takes priority over the one below. |
To "chiller producing": The in-transition condition becomes false AND The chiller is enabled. This transition takes priority over the one below. |
| To initial step: No load OR the in-transition conditions of "tank producing" and "chiller producing" are both false (i.e. neither tank or chiller is available). |
|||
| Chiller Producing | The chiller produces CHW to the district. This step is in parallel with "secondary pump on". |
The district has load AND the chiller is enabled. |
To "tank producing": The condition for in-transition of "tank producing" becomes true. This transition takes priority over the one below. |
| To initial step: No load OR the in-transition conditions of "tank producing" and "chiller producing" are both false. |
Notes:
- Out-transitions from the same step have priorities. When the conditions of more than one of them become true, the transition connected by a connector with the lowest index in the array fires. For example, even when the in-transition condition of "chiller producing" becomes true, as long as the in-transition condition of "tank producing" is also true, the latter fires because of priority.
- Steps that are in parallel are and must be active at the same time. When "secondary pump on" is active, either "tank producing" or "chiller producing" is also active.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Nominal values | |||
| Real | mChi_flow_nominal | Nominal mass flow rate of the chiller loop | |
| Real | mTan_flow_nominal | Nominal mass flow rate of the tank branch | |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Buildings.Controls.OBC.CDL.Interfaces.IntegerInput | com | Command: 1 = charge tank, 2 = no command, 3 = discharge tank | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput | chiEnaSta | Chiller enable status, true if chiller is enabled | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput | hasLoa | Set to true if there is a load | |
| Buildings.Controls.OBC.CDL.Interfaces.RealInput | yPum | Normalized speed signal for the secondary pump | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanInput[2] | tanSta | Tank status - 1: is empty; 2: is charged; can be both false | |
| Buildings.Controls.OBC.CDL.Interfaces.BooleanOutput | isChaRem | Is operated for remote charging | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | yVal | Valve normalized mass flow rate | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | mPriPum_flow | Primary pump mass flow rate | |
| Buildings.Controls.OBC.CDL.Interfaces.RealOutput | ySecPum | Secondary pump normalized speed |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.StateGraph.StateGraphRoot | stateGraphRoot | State graph root | |
| Modelica.StateGraph.InitialStep | allOff | Initial step, all off | |
| Modelica.StateGraph.Transition | traChaLoc | Transition: Charge tank command AND tank not charged AND chiller enabled | |
| Modelica.StateGraph.Step | steChaLoc | Step: Local charging | |
| Modelica.StateGraph.Transition | traRes1 | Transition: Reset to initial step | |
| Modelica.StateGraph.Transition | traChaRem | Transition: Charge tank command AND tank not charged AND chiller not enabled | |
| Modelica.StateGraph.Step | steChaRem | Step: Remote charging | |
| Modelica.StateGraph.Transition | traRes2 | Transition: Reset to initial step | |
| Modelica.StateGraph.Transition | traProChi | Transition: Chiller enabled | |
| Modelica.StateGraph.Step | steProChi | Step: Chiller produces CHW | |
| Modelica.StateGraph.Transition | traRes4 | Transition: Reset to initial step | |
| Modelica.StateGraph.Transition | traProTan | Transition: Tank commanded to discharge AND is not empty | |
| Modelica.StateGraph.Step | steProTan | Step: Tank produces CHW | |
| Modelica.StateGraph.Transition | traRes3 | Transition: Reset to initial step | |
| Modelica.Blocks.Sources.BooleanExpression | expPriPumFlo | Expression for local charging OR chiller output | |
| Buildings.Controls.OBC.CDL.Conversions.BooleanToReal | swiPriPum | Switch for primary pump flow | |
| Modelica.Blocks.Sources.BooleanExpression | expSecPum | Expression for tank output or chiller output | |
| Modelica.Blocks.Sources.BooleanExpression | expVal | Boolean expression for remotely charging the tank | |
| Modelica.StateGraph.Alternative | alt | Alternative: Tank charging or plant outputting CHW | |
| Buildings.Controls.OBC.CDL.Reals.Switch | swiSecPum | Switch for secondary pump flow | |
| Buildings.Controls.OBC.CDL.Reals.Sources.Constant | zer | Constant zero | |
| Buildings.Controls.OBC.CDL.Conversions.BooleanToReal | swiVal | Switch for valve flow | |
| Modelica.StateGraph.Step | stePumSecOn | Step: Secondary pump on | |
| Modelica.StateGraph.Transition | traPro | Transition: Has load and the plant can produce CHW via either the chiller or the tank | |
| Modelica.StateGraph.Parallel | parallel | Parallel states of the components in the primary and secondary loops | |
| Modelica.StateGraph.Transition | traTanToChi | Transition: Tank no longer available (empty or commanded off) AND chiller available | |
| Modelica.StateGraph.Alternative | altTanCha1 | Alternative: Tank charging locally or remotely | |
| Modelica.StateGraph.Step | steRou1 | A step for routing only | |
| Modelica.StateGraph.Step | steRou2 | A step for routing only | |
| Modelica.StateGraph.Transition | traRou | A routing transition, always true | |
| Modelica.StateGraph.Transition | traChiToTan | Transition: Production priority handed to tank whenever possible | |
| Modelica.Blocks.Sources.BooleanExpression | booleanExpression |
Revisions
-
September 11, 2024, by Michael Wetter:
Deleted non-used parameteruse_outFil. -
February 23, 2023 by Hongxiang Fu:
First implementation. This is for #2859.