Buildings.Experimental.DHC.Loads
Models for computing thermal loads served by the DES
Information
This package contains models for the thermal and domestic hot water demand prediction in buildings.
Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).
Package Content
Name | Description |
---|---|
FlowDistribution | Model of a building hydraulic distribution system |
SimpleRoomODE | Simplified model for assessing room air temperature variations around a set point |
Controls | Package of control sequences for DHC systems |
Types | Package with type definitions |
Examples | Example models integrating multiple components |
Validation | Collection of validation models |
BaseClasses | Package with base classes |
Buildings.Experimental.DHC.Loads.FlowDistribution
Model of a building hydraulic distribution system
Information
This model represents a two-pipe hydraulic distribution system serving multiple terminal units. It is primarily intended to be used in conjunction with models that extend Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit. The typical model structure for a whole building connected to an energy transfer station (or a dedicated plant) is illustrated in the schematics in the info section of Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding.
The pipe network modeling is decoupled between a main distribution loop and several terminal branch circuits:
- The mass flow rate in each branch circuit is equal to the mass flow rate demand yielded by the terminal unit model, constrained by the condition that the sum of all demands is lower or equal to the flow rate in the main loop. Additionally if the total flow rate demand exceeds the nominal mass flow rate the model generates an error.
- The inlet temperature in each branch circuit is equal to the supply temperature in the main loop. The outlet temperature in the main loop results from transferring the enthalpy flow rate of each individual fluid stream to the main fluid stream.
- The pressure drop in the main distribution loop corresponds to the pressure drop over the whole distribution system (the pump head). It is governed by an equation representing the control logic of the distribution pump.
Optionally:
- A distribution pump can be modeled with a prescribed flow rate corresponding to the total flow rate demand.
- A mixing valve can be modeled (together with a distribution pump) with a control loop tracking the supply temperature. Note that the nominal pressure drop of the valve is not an exposed parameter: it is set by default to 10% of the nominal total pressure drop.
Implementation
The modeling approach aims to minimize the number of algebraic
equations by avoiding an explicit modeling of the terminal actuators and
the whole flow network.
In addition, the assumption allowFlowReversal=false
is used
systematically together with boundary conditions which actually ensure that
no reverse flow conditions are encountered in simulation.
This allows directly accessing the inlet enthalpy value of a component from
the fluid port port_a
with the built-in function inStream
.
This approach is preferred to the use of two-port sensors which introduce a
state to ensure a smooth transition at flow reversal.
All connected components must meet the same requirements.
The impact on the computational performance is illustrated
below.
Pump head computation
The pump head is computed as follows (see also Buildings.Experimental.DHC.Loads.Validation.FlowDistributionPumpControl for a comparison with an explicit modeling of the piping network).
-
In case of a constant pump head,
dpPum = dp_nominal.
-
In case of a constant flow rate (three-way valves) the network flow
characteristics is considered independent from the actuator positions.
Hence,
dpPum = dp_nominal.
-
In case of a linear head,
dpPum = dpMin + (dp_nominal - dpMin) * m_flow / m_flow_nominal.
- In case of a constant speed, the pump head is computed based on the pump pressure curve and the total required mass flow rate.
-
In case of a constant pressure difference at a given location, the pump head
is computed according to the schematics hereunder, under the
assumption of a two-pipe distribution system,
dpPum = dpMin + dpVal + 2 * Σi dpDis[i],
where
- dpMin is the differential pressure set point.
- dpVal is the pressure drop across the optional mixing valve. It is considered independent from the valve position, i.e., dpVal = dpVal_nominal,
-
dpDis[i] is the pressure drop in the supply pipe segment directly
upstream the ith connection,
dpDis[i] = 1 / K[i]2 * mDis_flow[i] 2,
where mDis_flow[i] = Σi to nUni mReq_flow[i] is the mass flow rate in the same pipe segment, and K[i] = (Σi to nUni mUni_flow_nominal[i]) / dpDis_nominal[i]0.5 is the corresponding flow coefficient (constant).
-
The pressure drop in the corresponding pipe segment of the return line is considered equal, hence the factor of 2 in the above equation.
The default value for
dpDis_nominal
corresponds to a configuration where the differential pressure sensor is located before the most remote connected unit, 20% of the nominal pressure drop in the distribution network occurs between the pump and the first connected unit (supply and return), the remaining pressure drop is evenly distributed over each pipe segment between the other connected units. The user can override these default values with the requirement that the nominal pressure drop of each pipe segment downstream of the differential pressure sensor must be set to zero.
Energy and mass dynamics
The energy dynamics and the time constant used in the ideal heater and cooler model are exposed as advanced parameters. They are used to represent the typical dynamics over the whole piping network, from supply to return. The mass dynamics are by default identical to the energy dynamics.
Simplifying assumptions are used otherwise, namely
- the pump is modeled in steady-state, and
- the valve and the flow splitter are modeled with fixed initial conditions. This is because the temperature of the fluid leaving the valve is used as a control input signal. If a steady-state model is used, that temperature is computed by assuming ideal mixing at the inner fluid ports of the valve. In case of zero flow rate, the temperature value results from regularizing the corresponding equation that is not well defined in that domain. That triggers non-physical temperature variations which themselves lead to control transients when the flow rate gets reestablished. Those effects turn out to be detrimental to computational performance.
Computational performance
The figure below compares the computational performance of this model
(labelled simple
, see model
Buildings.Experimental.DHC.Loads.Validation.BenchmarkFlowDistribution1)
with an explicit modeling of the distribution network and
the terminal unit actuators (labelled detailed
, see model
Buildings.Experimental.DHC.Loads.Validation.BenchmarkFlowDistribution2).
The models are simulated with the solver CVODE from Sundials.
The impact of a varying number of connected loads, nLoa
, is
assessed on
- the total time for all model evaluations,
- the total time spent between model evaluations, and
- the number of continuous state variables.
A linear, resp. quadratic, regression line and the corresponding confidence interval are
also plotted for the model labelled simple
, resp. detailed
.
Extends from Buildings.Fluid.Interfaces.PartialTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy).
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Generic | per | per(pressure(V_flow=m_flow_n... | Record with performance data |
Boolean | have_pum | false | Set to true if the system has a pump |
Boolean | have_val | false | Set to true if the system has a mixing valve |
DistributionType | typDis | Type_dis.HeatingWater | Type of distribution system |
PumpControlType | typCtr | Type_ctr.ConstantHead | Type of distribution pump control |
PressureDifference | dpMin | dp_nominal/2 | Pressure difference set point for ConstantDp or at zero flow for LinearHead [Pa] |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Real | spePum_nominal | 1 | Pump speed at nominal conditions [1] |
PressureDifference | dp_nominal | Pressure drop at nominal conditions [Pa] | |
PressureDifference | dpDis_nominal[:] | if nUni == 1 then {1/2*(dp_n... | Pressure drop between each connected unit at nominal conditions (supply line): use zero for each connection downstream the differential pressure sensor [Pa] |
MassFlowRate | mUni_flow_nominal[:] | fill(m_flow_nominal/nUni, nU... | Mass flow rate of each connected unit at nominal conditions [kg/s] |
Assumptions | |||
Boolean | allowFlowReversal | false | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | false | = true, if actual temperature at port is computed |
Dynamics | |||
Equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance (except for the pump always modeled in steady state) |
Nominal condition | |||
Time | tau | 120 | Time constant of fluid temperature variation at nominal flow rate [s] |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium in the component | |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
FluidPorts_a | ports_a1[nPorts_a1] | Terminal units return ports |
FluidPorts_b | ports_b1[nPorts_b1] | Terminal units supply ports |
input RealInput | mReq_flow[nUni] | Heating or chilled water flow rate required to meet the load |
input IntegerInput | modChaOve | Operating mode in change-over (1 for heating, 2 for cooling) |
input RealInput | TSupSet | Supply temperature set point [K] |
output RealOutput | mReqTot_flow | Total heating or chilled water flow rate required to meet the loads [kg/s] |
output RealOutput | QActTot_flow | Total heat flow rate transferred to the loads (>=0 for heating) [W] |
output RealOutput | PPum | Power drawn by pump motor [W] |
Modelica definition
Buildings.Experimental.DHC.Loads.SimpleRoomODE
Simplified model for assessing room air temperature variations around a set point
Information
This is a first order ODE model assessing the indoor air temperature variations around a set point, based on the difference between the required and actual heating or cooling heat flow rate and a minimum set of parameters at nominal conditions.
The lumped thermal conductance G representing all heat transfer mechanisms that depend on the temperature difference with the outside (transmission, infiltration and ventilation) is assessed from the steady-state energy balance at heating nominal conditions as
0 = Q̇heating, nom + G (Tout, heating, nom - Tind, heating, nom).
Note that it is important for the model representativeness that Q̇heating, nom be evaluated in close to steady-state conditions with no internal heat gains and no solar heat gains.
The lumped thermal conductance G is then considered constant for all operating conditions.
The required heating or cooling heat flow rate (i.e. the space load) Q̇heat_cool, req corresponds to a steady-state control error equal to zero,
0 = Q̇heat_cool, req + G (Tout - Tind, set) + Q̇various,
where Q̇various represent the miscellaneous heat gains. The indoor temperature variation rate due to an unmet load is given by
C ∂Tind / ∂t = Q̇heat_cool, act + G (Tout - Tind) + Q̇various,
where Q̇heat_cool, act is the actual heating or cooling heat flow rate and C is the thermal capacitance of the indoor volume. The two previous equations yield
τ ∂Tind / ∂t = (Q̇heat_cool, act - Q̇heat_cool, req) / G - Tind + Tind, set,
where τ = C / G is the time constant of the indoor temperature.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Time | tau | 1800 | Time constant of the indoor temperature [s] |
Nominal condition | |||
Temperature | TOutHea_nominal | Outdoor air temperature at heating nominal conditions [K] | |
Temperature | TIndHea_nominal | Indoor air temperature at heating nominal conditions [K] | |
HeatFlowRate | QHea_flow_nominal | Heating heat flow rate (for TInd=TIndHea_nominal, TOut=TOutHea_nominal, with no internal gains, no solar radiation) [W] | |
Initialization | |||
Boolean | steadyStateInitial | false | true initializes T with dT(0)/dt=0, false initializes T with T(0)=TIndHea_nominal |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | TSet | Temperature set point for heating or cooling [K] |
input RealInput | QReq_flow | Required heat flow rate to meet temperature set point (>=0 for heating) [W] |
input RealInput | QAct_flow | Actual heating or cooling heat flow rate (>=0 for heating) [W] |
output RealOutput | TAir | Room air temperature [K] |