Models¶
Private tour through all models contained in the WaterHub package.
EndUses¶
The EndUses package clusters all appliances within an household that allow interaction with a water consumer. They are of special interest because they are associated with a consumer-generated flow of water that acts as a trigger for the rest of the system’s building blocks.
BaseEndUses¶
Model Name | BasicValve | Partial Model for the definition of end-uses |
Type | Partial Model | |
Inlets | inletCold |
cold water inlet |
inletHot |
hot water inlet | |
flowInput |
data input from e.g. block HydrographFromFile | |
Outlets | outlet |
water outlet |
Partial model acting as a basic valve: two water inlets mixing into one water outlet. The flow is triggered by the flowInput
port.
Showers¶
Base Shower¶
Model Name | BaseShower | Partial Model for showers |
Type | Partial Model | |
Parameters | T_wanted |
Targeted Temperature |
Base model for showers. It simply makes sure \(T_{cold} \leq T_{wanted} \leq T_{hot}\) using a trivial algorithm:
algorithm
if T_wanted < inletCold.T then
T_achieved := inletCold.T;
elseif T_wanted > inletHot.T then
T_achieved := inletHot.T;
else
T_achieved := T_wanted;
end if;
Classic Shower¶
Model Name | ClassicShower | Lossless shower model |
Type | Model | extends partial model BaseShower
and partial model BasicValve |
Inlets | inletCold |
cold water inlet |
inletHot |
hot water inlet | |
flowInput |
data input from e.g. block HydrographFromFile | |
Outlets | outlet |
water outlet |
Parameters | T_wanted |
Targeted Temperature |
Simple model for showers. The flow is triggered through the flowInput
port, connected to e.g. an HydrographFromFile
block. Energy and mass balance equations describe the thermal behavior:
Taps¶
Model Name | ClassicShower | Lossless tap model |
Type | Model | extends partial model BasicValve |
Inlets | inletCold |
cold water inlet |
inletHot |
hot water inlet | |
flowInput |
data input from e.g. block HydrographFromFile | |
Outlets | outlet |
water outlet |
Parameters | T_wanted |
Targeted Temperature |
Analogous to Classic Shower.
RecoverySystems¶
Models specialized in energy recovery. Heat exchanger and heat pump models are the most obvious examples.
Heat Exchangers¶
Simple Heat Exchanger¶
Model Name | SimpleHeatExchanger | Black box heat exchanger that retrieves energy with user defined efficiency |
Type | Model | |
Inlets | inlet |
water inlet |
Outlets | outlet |
water outlet |
heat_out |
heat flow outlet | |
Parameters | efficiency |
Efficiency factor for the heat recovery |
Not So Simple Heat Exchanger¶
Model Name | NotSoSimpleHeatExchanger | Water-water Heat exchanger model |
Type | Model | |
Inlets | inletCold |
cold water inlet |
inletHot |
hot water inlet | |
Outlets | outletCold |
cold water outlet |
outletHot |
hot water outlet | |
Parameters | alphaFactor |
Efficiency factor for the heat recovery. Depends on length of tube, heat exchange coefficient, flows and contact areas |
flowHE |
1 if parallel flow, -1 if counterflow |
The NotSoSimpleHeatExchanger Model has been inspired by a derivation from the Wikipedia page on heat exchangers, in the section “A model of a simple heat exchanger”. This derivation is based on the Book “Fluid Mechanics and Transfer Processes”, Cambridge University Press, Kay J.M. and Nedderman R.M.
The simplest heat exchanger consist of two straight pipes with fluid flows. Let the pipe be of length \(L\), with fluid capacities \(C_i\), flow rates \(j_i\), and temperature profiles along the pipes \(T_i(x)\). Assume the heat transfer occurs only transversely between the two fluids and not along the pipe. From Newton’s law of cooling:
where u_i(x) is the thermal energy profile. It must be noted here that this is for parallel flows. Counterflows heat exchangers require a negative sign in the second equation. \(\gamma\) is the thermal connection constant, a function of the heat exchange coefficient and the contact area. The time change in thermal energy for a fluid unit volume being carried along the pipe can be also written as
Here, \(C_i j_i\) are the thermal flow rates. So, equating above equations results in a steady-state, x-only differential equation, that can be solved with
where \(k_i = \gamma/(C_ij_i)\), \(k = k_1 + k_2\) and \(A,B\) being integration constants. Knowing the input temperatures at (x = 0) \(T_{10}\) and \(T_{20}\), we can derive (for parallel flows)
Letting \(\alpha = (1-e^{\frac{\gamma}{j_1+j_2}L})\), this term thus describes the efficiency of the heat-exchanger, depending on many parameters such as the heat exchange coefficients, exchange surface area and length of pipes. With \(\alpha = 0\), no heat is transferred between the pipes, while all the available heat is transferred when \(\alpha = 1\).
Pipes & Carriers¶
Models of water pipes, electric wires and other carrier systems.
Water Pipes¶
PipeLossesAtRest¶
Model Name | PipeLossesAtRest | Loses energy to environment when water flow is zero |
Type | Model | |
Inlets | inlet |
water inlet |
Outlets | outlet |
water outlet |
heatOutlet |
heat flow outlet | |
Parameters | triggerValue |
Triggers modeling of heat losses when flow get below |
pipeLength |
Length of water pipe in meters | |
pipeDiameterInside |
Inside diameter of pipe in meters | |
pipeThickness |
Thickness of pipe walls in meters | |
material |
Roll menu to choose material thermal properties | |
tEnvironment |
Temperature of external air in Kelvin |
Model of a water pipe that loses energy to its environment when the flow is zero (i.e when water is stagnating in the pipe). The model computes the UA-value, i.e. the total thermal conductance of the pipe, using:
where \(h_{ci}\) and \(h_{co}\) are the convection heat transfer coefficients of the inside, respectively outside fluid. \(A_i\) and \(A_o\) are the inside, respectively outside contact areas. \(s_n\) is the thickness, \(k_n\) the thermal conductivity and \(A_n\) the mean area of pipe layer n.
UA is then used in the ODE:
to compute the time-dependent fluid temperature.