Buildings.Experimental.DHC.Examples.Combined.Generation5.Examples.BaseClasses

Package with base classes that are used by multiple models

Information

This package contains base classes that are used to construct the classes in Buildings.Experimental.DHC.Examples.Combined.Generation5.Examples.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Experimental.DHC.Examples.Combined.Generation5.Examples.BaseClasses.PartialSeries PartialSeries Partial model for series network

Buildings.Experimental.DHC.Examples.Combined.Generation5.Examples.BaseClasses.PartialSeries Buildings.Experimental.DHC.Examples.Combined.Generation5.Examples.BaseClasses.PartialSeries

Partial model for series network

Buildings.Experimental.DHC.Examples.Combined.Generation5.Examples.BaseClasses.PartialSeries

Information

Partial model that is used by the reservoir network models. The reservoir network models extend this model, add controls, and configure some component sizes.

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

Parameters

TypeNameDefaultDescription
RealdpDis_length_nominal250Pressure drop per pipe length at nominal flow rate - Distribution line [Pa/m]
RealdpCon_length_nominal250Pressure drop per pipe length at nominal flow rate - Connection line [Pa/m]
IntegernBuidatDes.nBuiNumber of buildings connected to DHC system
DesignDataSeriesdatDesdatDes(final mCon_flow_nomin...Design data
PartialBuildingWithETSbui[nBui]redeclare Buildings.Experime...Building and ETS
Assumptions
BooleanallowFlowReversalSertrueSet to true to allow flow reversal in the service lines
BooleanallowFlowReversalBuifalseSet to true to allow flow reversal for in-building systems

Modelica definition

partial model PartialSeries "Partial model for series network" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water "Medium model"; constant Real facMul = 10 "Building loads multiplier factor"; parameter Real dpDis_length_nominal(final unit="Pa/m") = 250 "Pressure drop per pipe length at nominal flow rate - Distribution line"; parameter Real dpCon_length_nominal(final unit="Pa/m") = 250 "Pressure drop per pipe length at nominal flow rate - Connection line"; parameter Boolean allowFlowReversalSer = true "Set to true to allow flow reversal in the service lines"; parameter Boolean allowFlowReversalBui = false "Set to true to allow flow reversal for in-building systems"; parameter Integer nBui = datDes.nBui "Number of buildings connected to DHC system"; inner parameter Buildings.Experimental.DHC.Examples.Combined.Generation5.Data.DesignDataSeries datDes(final mCon_flow_nominal=bui.ets.mDisWat_flow_nominal) "Design data"; // COMPONENTS Buildings.Experimental.DHC.Examples.Combined.Generation5.ThermalStorages.BoreField borFie(redeclare final package Medium = Medium) "Bore field"; DHC.EnergyTransferStations.BaseClasses.Pump_m_flow pumDis( redeclare final package Medium = Medium, final m_flow_nominal=datDes.mPumDis_flow_nominal, final allowFlowReversal=allowFlowReversalSer) "Distribution pump"; Buildings.Fluid.Sources.Boundary_pT bou( redeclare final package Medium=Medium, final nPorts=1) "Boundary pressure condition representing the expansion vessel"; DHC.EnergyTransferStations.BaseClasses.Pump_m_flow pumSto( redeclare final package Medium = Medium, m_flow_nominal=datDes.mSto_flow_nominal) "Bore field pump"; Buildings.Experimental.DHC.Examples.Combined.Generation5.Networks.BaseClasses.ConnectionSeriesStandard conPla( redeclare final package Medium = Medium, final mDis_flow_nominal=datDes.mPipDis_flow_nominal, final mCon_flow_nominal=datDes.mPla_flow_nominal, lDis=0, lCon=0, final dhDis=0.2, final dhCon=0.2, final allowFlowReversal=allowFlowReversalSer) "Connection to the plant (pressure drop lumped in plant and network model)"; Buildings.Experimental.DHC.Examples.Combined.Generation5.Networks.BaseClasses.ConnectionSeriesStandard conSto( redeclare final package Medium = Medium, final mDis_flow_nominal=datDes.mPipDis_flow_nominal, final mCon_flow_nominal=datDes.mSto_flow_nominal, lDis=0, lCon=0, final dhDis=0.2, final dhCon=0.2, final allowFlowReversal=allowFlowReversalSer) "Connection to the bore field (pressure drop lumped in plant and network model)"; Buildings.Experimental.DHC.Examples.Combined.Generation5.CentralPlants.SewageHeatRecovery pla( redeclare final package Medium = Medium, final mSew_flow_nominal=datDes.mPla_flow_nominal, final mDis_flow_nominal=datDes.mPla_flow_nominal, final dpSew_nominal=datDes.dpPla_nominal, final dpDis_nominal=datDes.dpPla_nominal, final epsHex=datDes.epsPla) "Sewage heat recovery plant"; Buildings.Experimental.DHC.Examples.Combined.Generation5.Networks.UnidirectionalSeries dis( redeclare final package Medium = Medium, final nCon=nBui, show_TOut=true, final mDis_flow_nominal=datDes.mPipDis_flow_nominal, final mCon_flow_nominal=datDes.mCon_flow_nominal, final dp_length_nominal=datDes.dp_length_nominal, final lDis=datDes.lDis, final lCon=datDes.lCon, final lEnd=datDes.lEnd, final allowFlowReversal=allowFlowReversalSer) "Distribution network"; Fluid.Sensors.TemperatureTwoPort TDisWatSup( redeclare final package Medium = Medium, final m_flow_nominal=datDes.mPumDis_flow_nominal) "District water supply temperature"; Fluid.Sensors.TemperatureTwoPort TDisWatRet( redeclare final package Medium = Medium, final m_flow_nominal=datDes.mPumDis_flow_nominal) "District water return temperature"; Fluid.Sensors.TemperatureTwoPort TDisWatBorLvg( redeclare final package Medium = Medium, final m_flow_nominal=datDes.mPumDis_flow_nominal) "District water borefield leaving temperature"; replaceable Buildings.Experimental.DHC.Examples.Combined.Generation5.Loads.BaseClasses.PartialBuildingWithETS bui[nBui] constrainedby Buildings.Experimental.DHC.Examples.Combined.Generation5.Loads.BaseClasses.PartialBuildingWithETS ( bui(each final facMul=facMul), redeclare each final package MediumBui = Medium, redeclare each final package MediumSer = Medium, each final allowFlowReversalBui=allowFlowReversalBui, each final allowFlowReversalSer=allowFlowReversalSer) "Building and ETS"; Modelica.Blocks.Sources.Constant TSewWat(k=273.15 + 17) "Sewage water temperature"; Controls.OBC.CDL.Continuous.Sources.Constant THeaWatSupMaxSet[nBui]( k=bui.THeaWatSup_nominal) "Heating water supply temperature set point - Maximum value"; Controls.OBC.CDL.Continuous.Sources.Constant TChiWatSupSet[nBui]( k=bui.TChiWatSup_nominal) "Chilled water supply temperature set point"; Controls.OBC.CDL.Continuous.Sources.Constant THeaWatSupMinSet[nBui]( each k=28 + 273.15) "Heating water supply temperature set point - Minimum value"; Controls.OBC.CDL.Continuous.MultiSum PPumETS( final nin=nBui) "ETS pump power"; Modelica.Blocks.Continuous.Integrator EPumETS( initType=Modelica.Blocks.Types.Init.InitialState) "ETS pump electric energy"; Modelica.Blocks.Continuous.Integrator EPumDis( initType=Modelica.Blocks.Types.Init.InitialState) "Distribution pump electric energy"; Modelica.Blocks.Continuous.Integrator EPumSto( initType=Modelica.Blocks.Types.Init.InitialState) "Storage pump electric energy"; Modelica.Blocks.Continuous.Integrator EPumPla(initType=Modelica.Blocks.Types.Init.InitialState) "Plant pump electric energy"; Controls.OBC.CDL.Continuous.MultiSum EPum(nin=4) "Total pump electric energy"; Controls.OBC.CDL.Continuous.MultiSum PHeaPump( final nin=nBui) "Heat pump power"; Modelica.Blocks.Continuous.Integrator EHeaPum( initType=Modelica.Blocks.Types.Init.InitialState) "Heat pump electric energy"; Controls.OBC.CDL.Continuous.MultiSum ETot(nin=2) "Total electric energy"; Buildings.Experimental.DHC.Loads.BaseClasses.ConstraintViolation conVio( final uMin=datDes.TLooMin, final uMax=datDes.TLooMax, final nu=3+nBui) "Check if loop temperatures are within given range"; equation connect(dis.TOut, conVio.u[4:4+nBui-1]); connect(bou.ports[1], pumDis.port_a); connect(borFie.port_b, conSto.port_aCon); connect(pumDis.port_b, conSto.port_aDis); connect(borFie.port_a, pumSto.port_b); connect(conSto.port_bCon, pumSto.port_a); connect(conPla.port_bDis, TDisWatSup.port_a); connect(TDisWatSup.port_b, dis.port_aDisSup); connect(dis.port_bDisSup, TDisWatRet.port_a); connect(TDisWatRet.port_b, pumDis.port_a); connect(conSto.port_bDis, TDisWatBorLvg.port_a); connect(TDisWatBorLvg.port_b, conPla.port_aDis); connect(bui.port_bSerAmb, dis.ports_aCon); connect(dis.ports_bCon, bui.port_aSerAmb); connect(TSewWat.y, pla.TSewWat); connect(THeaWatSupMaxSet.y, bui.THeaWatSupMaxSet); connect(TChiWatSupSet.y, bui.TChiWatSupSet); connect(pla.port_bSerAmb, conPla.port_aCon); connect(conPla.port_bCon, pla.port_aSerAmb); connect(THeaWatSupMinSet.y, bui.THeaWatSupMinSet); connect(bui.PPumETS, PPumETS.u); connect(PPumETS.y, EPumETS.u); connect(pumDis.P, EPumDis.u); connect(pumSto.P, EPumSto.u); connect(pla.PPum, EPumPla.u); connect(EPumETS.y, EPum.u[1]); connect(EPumPla.y, EPum.u[2]); connect(EPumDis.y, EPum.u[3]); connect(EPumSto.y, EPum.u[4]); connect(bui.PHea, PHeaPump.u); connect(PHeaPump.y, EHeaPum.u); connect(EHeaPum.y, ETot.u[1]); connect(EPum.y, ETot.u[2]); connect(TDisWatSup.T, conVio.u[1]); connect(TDisWatBorLvg.T, conVio.u[2]); connect(TDisWatRet.T, conVio.u[3]); end PartialSeries;