Buildings.Experimental.DistrictHeatingCooling.Validation

Package with models for the validation of the bi-directional district heating and cooling system models

Information

This package contains models that validate the district heating and cooling models. The examples plot various outputs, which have been verified against analytical solutions or by inspecting their change due to parametric changes. These model outputs are stored as reference data to allow continuous validation whenever models in the library change.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Experimental.DistrictHeatingCooling.Validation.HeatingCoolingHotWaterSmall HeatingCoolingHotWaterSmall Validation model for a system with heating, cooling and hot water
Buildings.Experimental.DistrictHeatingCooling.Validation.IdealSmallSystem IdealSmallSystem Validation model for a small system

Buildings.Experimental.DistrictHeatingCooling.Validation.HeatingCoolingHotWaterSmall Buildings.Experimental.DistrictHeatingCooling.Validation.HeatingCoolingHotWaterSmall

Validation model for a system with heating, cooling and hot water

Buildings.Experimental.DistrictHeatingCooling.Validation.HeatingCoolingHotWaterSmall

Information

This model validates a small ideal bi-directional heating and cooling network. The heating and cooling heat flow rates extracted from the district supply are prescribed by time series.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
HeatFlowRateQ_flow_nominal6E5Nominal heat flow rate, positive for heating, negative for cooling [W]
RealR_nominal100Pressure drop per meter at nominal flow rate [Pa/m]
Design parameter
TemperatureTSetHeaLea273.15 + 12Set point for leaving fluid temperature warm supply [K]
TemperatureTSetCooLea273.15 + 16Set point for leaving fluid temperature cold supply [K]
TemperatureDifferencedT_nominalTSetCooLea - TSetHeaLeaTemperature difference between warm and cold pipe [K]

Connectors

TypeNameDescription
BusweaBus 

Modelica definition

model HeatingCoolingHotWaterSmall "Validation model for a system with heating, cooling and hot water" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water "Fluid in the pipes"; parameter Modelica.SIunits.HeatFlowRate Q_flow_nominal=6E5 "Nominal heat flow rate, positive for heating, negative for cooling"; parameter Modelica.SIunits.Temperature TSetHeaLea=273.15 + 12 "Set point for leaving fluid temperature warm supply"; parameter Modelica.SIunits.Temperature TSetCooLea=273.15 + 16 "Set point for leaving fluid temperature cold supply"; parameter Modelica.SIunits.TemperatureDifference dT_nominal( min=0.5, displayUnit="K") = TSetCooLea - TSetHeaLea "Temperature difference between warm and cold pipe"; parameter Real R_nominal(unit="Pa/m") = 100 "Pressure drop per meter at nominal flow rate"; final parameter Modelica.SIunits.MassFlowRate m_flow_nominal=Q_flow_nominal/4200 /dT_nominal "Nominal mass flow rate"; Plants.HeatingCoolingCarnot_T pla( redeclare package Medium = Medium, show_T=true, m_flow_nominal=m_flow_nominal) "Heating and cooling plant"; Buildings.Fluid.Sources.Boundary_pT pSet(redeclare package Medium = Medium, nPorts=1) "Model to set the reference pressure"; Buildings.Fluid.FixedResistances.Pipe pip( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, thicknessIns=0.2, lambdaIns=0.04, length=50, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, v_nominal=2, dp_nominal=50*R_nominal, useMultipleHeatPorts=true, nSeg=1); Buildings.Fluid.FixedResistances.Pipe pip1( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, thicknessIns=0.2, lambdaIns=0.04, length=50, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, v_nominal=2, dp_nominal=50*R_nominal, useMultipleHeatPorts=true, nSeg=1); SubStations.VaporCompression.HeatingCoolingHotwaterTimeSeries_dT larOff( redeclare package Medium = Medium, filNam="modelica://Buildings/Resources/Data/Experimental/DistrictHeatingCooling/SubStations/VaporCompression/RefBldgLargeOfficeNew2004_7.1_5.0_3C_USA_CA_SAN_FRANCISCO.mos", TOut_nominal=273.15) "Large office"; Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(filNam="modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos", computeWetBulbTemperature=false) "File reader that reads weather data"; SubStations.VaporCompression.HeatingCoolingHotwaterTimeSeries_dT ret( redeclare package Medium = Medium, filNam="modelica://Buildings/Resources/Data/Experimental/DistrictHeatingCooling/SubStations/VaporCompression/RefBldgStand-aloneRetailNew2004_7.1_5.0_3C_USA_CA_SAN_FRANCISCO.mos", TOut_nominal=273.15) "Retail"; Plants.LakeWaterHeatExchanger_T bayWatHex( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, dpHex_nominal=10000) "Bay water heat exchanger"; BoundaryConditions.WeatherData.Bus weaBus; Buildings.Fluid.FixedResistances.Junction splSup( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal*{1,1,1}, dp_nominal=40*R_nominal*{0,1,1}, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau=5*60, from_dp=false) "Flow splitter"; Buildings.Fluid.FixedResistances.Junction splRet( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal*{1,1,1}, dp_nominal=40*R_nominal*{0,1,1}, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau=5*60, from_dp=false) "Flow splitter"; Modelica.Blocks.Sources.CombiTimeTable watTem( tableOnFile=true, tableName="tab1", extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, smoothness=Modelica.Blocks.Types.Smoothness.ContinuousDerivative, y(each unit="K"), fileName= Buildings.BoundaryConditions.WeatherData.BaseClasses.getAbsolutePath("modelica://Buildings/Resources/Data/Experimental/DistrictHeatingCooling/Plants/AlamedaOceanT.mos")) "Temperature of the water reservoir (such as a river, lake or ocean)"; protected Modelica.Blocks.Sources.Constant TSetC(k=TSetCooLea) "Set point temperature for leaving water"; Modelica.Blocks.Sources.Constant TSetH(k=TSetHeaLea) "Set point temperature for leaving water"; equation connect(pip.port_b, splSup.port_1); connect(splSup.port_3, larOff.port_a); connect(splSup.port_2, ret.port_a); connect(larOff.port_b, splRet.port_3); connect(pip1.port_a, splRet.port_1); connect(splRet.port_2, ret.port_b); connect(TSetH.y, pla.TSetHea); connect(TSetC.y, pla.TSetCoo); connect(pip.port_a, bayWatHex.port_b1); connect(bayWatHex.port_a1, pla.port_b); connect(bayWatHex.port_b2, pla.port_a); connect(bayWatHex.port_a2, pip1.port_b); connect(bayWatHex.TSetHea, TSetH.y); connect(pSet.ports[1], pla.port_a); connect(weaDat.weaBus, weaBus); connect(pla.TSink, weaBus.TDryBul); connect(weaBus, larOff.weaBus); connect(weaBus, ret.weaBus); connect(bayWatHex.TSouWat, watTem.y[1]); connect(bayWatHex.TSouHea, weaBus.TDryBul); connect(bayWatHex.TSetCoo, TSetC.y); connect(bayWatHex.TSouCoo, weaBus.TDryBul); end HeatingCoolingHotWaterSmall;

Buildings.Experimental.DistrictHeatingCooling.Validation.IdealSmallSystem Buildings.Experimental.DistrictHeatingCooling.Validation.IdealSmallSystem

Validation model for a small system

Buildings.Experimental.DistrictHeatingCooling.Validation.IdealSmallSystem

Information

This model validates a small ideal bi-directional heating and cooling network. The heating and cooling heat flow rates extracted from the district supply are prescribed by time series.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
HeatFlowRateQ_flow_nominal0.5E6Nominal heat flow rate, positive for heating, negative for cooling [W]
RealR_nominal100Pressure drop per meter at nominal flow rate [Pa/m]
Design parameter
TemperatureTSetHeaLea273.15 + 8Set point for leaving fluid temperature warm supply [K]
TemperatureTSetCooLea273.15 + 14Set point for leaving fluid temperature cold supply [K]
TemperatureDifferencedT_nominalTSetCooLea - TSetHeaLeaTemperature difference between warm and cold pipe [K]

Modelica definition

model IdealSmallSystem "Validation model for a small system" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water "Fluid in the pipes"; parameter Modelica.SIunits.HeatFlowRate Q_flow_nominal=0.5E6 "Nominal heat flow rate, positive for heating, negative for cooling"; parameter Modelica.SIunits.Temperature TSetHeaLea=273.15 + 8 "Set point for leaving fluid temperature warm supply"; parameter Modelica.SIunits.Temperature TSetCooLea=273.15 + 14 "Set point for leaving fluid temperature cold supply"; parameter Modelica.SIunits.TemperatureDifference dT_nominal( min=0.5, displayUnit="K") = TSetCooLea - TSetHeaLea "Temperature difference between warm and cold pipe"; final parameter Modelica.SIunits.MassFlowRate m_flow_nominal=Q_flow_nominal/4200 /dT_nominal "Nominal mass flow rate"; parameter Real R_nominal(unit="Pa/m") = 100 "Pressure drop per meter at nominal flow rate"; Plants.Ideal_T pla( redeclare package Medium = Medium, show_T=true, m_flow_nominal=m_flow_nominal) "Heating and cooling plant"; Buildings.Fluid.Sources.Boundary_pT pSet(redeclare package Medium = Medium, nPorts=1) "Model to set the reference pressure"; SubStations.Heating hea1(redeclare package Medium = Medium, Q_flow_nominal=200E3) "Heating load"; SubStations.Heating hea2(redeclare package Medium = Medium, Q_flow_nominal=100E3) "Heating load"; SubStations.Cooling coo1(redeclare package Medium = Medium, Q_flow_nominal=-150E3) "Cooling load"; SubStations.Cooling coo2(redeclare package Medium = Medium, Q_flow_nominal=-100E3) "Cooling load"; Buildings.Fluid.FixedResistances.Pipe pip( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, nSeg=3, thicknessIns=0.2, lambdaIns=0.04, length=50, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial); Buildings.Fluid.FixedResistances.Pipe pip1( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, nSeg=3, thicknessIns=0.2, lambdaIns=0.04, length=50, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial); Modelica.Blocks.Sources.CombiTimeTable QHea1( table=[0, 200E3; 6, 200E3; 6, 50E3; 18, 50E3; 18, 75E3; 24, 75E3], timeScale=3600, extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) "Heating demand"; Modelica.Blocks.Sources.CombiTimeTable QHea2( table=[0, 100E3; 6, 100E3; 6, 50E3; 18, 50E3; 18, 75E3; 24, 75E3], timeScale=3600, extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) "Heating demand"; Modelica.Blocks.Sources.CombiTimeTable QCoo1( table=[0, -100E3; 6, -80E3; 6, -50E3; 12, -20E3; 18, -150E3; 24, -100E3], timeScale=3600, extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) "Cooling demand"; Modelica.Blocks.Sources.CombiTimeTable QCoo2( table=[0, -10E3; 9, -100E3; 9, -50E3; 18, -50E3; 18, -150E3; 24, -100E3], timeScale=3600, extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic) "Cooling demand"; Buildings.Fluid.FixedResistances.Junction spl( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal*{1,1,1}, dp_nominal=40*R_nominal*{0,1,1}, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau=5*60, from_dp=false); Buildings.Fluid.FixedResistances.Junction spl1( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal*{1,1,1}, dp_nominal=40*R_nominal*{0,1,1}, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau=5*60, from_dp=false); Buildings.Fluid.FixedResistances.Junction spl2( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal*{1,1,1}, dp_nominal=40*R_nominal*{0,1,1}, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau=5*60, from_dp=false); Buildings.Fluid.FixedResistances.Junction spl3( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal*{1,1,1}, dp_nominal=40*R_nominal*{0,1,1}, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau=5*60, from_dp=false); Buildings.Fluid.FixedResistances.Junction spl4( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal*{1,1,1}, dp_nominal=40*R_nominal*{0,1,1}, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau=5*60, from_dp=false); Buildings.Fluid.FixedResistances.Junction spl5( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal*{1,1,1}, dp_nominal=40*R_nominal*{0,1,1}, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau=5*60, from_dp=false); protected Modelica.Blocks.Sources.Constant TSetC(k=TSetCooLea) "Set point temperature for leaving water"; Modelica.Blocks.Sources.Constant TSetH(k=TSetHeaLea) "Set point temperature for leaving water"; equation connect(pla.port_b, pip.port_a); connect(pla.port_a, pip1.port_b); connect(pSet.ports[1], pip1.port_b); connect(QHea1.y[1], hea1.Q_flow); connect(QHea2.y[1], hea2.Q_flow); connect(QCoo1.y[1], coo1.Q_flow); connect(QCoo2.y[1], coo2.Q_flow); connect(pip.port_b, spl.port_1); connect(spl.port_2, spl1.port_1); connect(spl1.port_2, spl2.port_1); connect(spl.port_3, hea1.port_a); connect(spl1.port_3, hea2.port_a); connect(spl2.port_2, coo2.port_b); connect(coo1.port_b, spl2.port_3); connect(pip1.port_a, spl3.port_1); connect(spl3.port_3, hea1.port_b); connect(hea2.port_b, spl4.port_3); connect(spl4.port_1, spl3.port_2); connect(spl4.port_2, spl5.port_1); connect(spl5.port_3, coo1.port_a); connect(spl5.port_2, coo2.port_a); connect(TSetH.y, pla.TSetHea); connect(TSetC.y, pla.TSetCoo); end IdealSmallSystem;