diff --git a/BESMod/Systems/BaseClasses/PartialBuildingEnergySystem.mo b/BESMod/Systems/BaseClasses/PartialBuildingEnergySystem.mo index 7cd283cf..24f2a825 100644 --- a/BESMod/Systems/BaseClasses/PartialBuildingEnergySystem.mo +++ b/BESMod/Systems/BaseClasses/PartialBuildingEnergySystem.mo @@ -59,6 +59,7 @@ partial model PartialBuildingEnergySystem "Partial BES" Demand.DHW.BaseClasses.PartialDHW( redeclare final package Medium = MediumDHW, final TDHW_nominal=systemParameters.TSetDHW, + final dpDHW_nominal=hydraulic.distribution.dpDHW_nominal, final TDHWCold_nominal=systemParameters.TDHWWaterCold, final subsystemDisabled=not systemParameters.use_dhw) annotation (choicesAllMatching=true, Placement( @@ -191,8 +192,8 @@ equation color={255,204,51}, thickness=0.5)); connect(hydraulic.outBusHyd, outputs.hydraulic) annotation (Line( - points={{-124.516,-98.6857},{-124.516,-100},{-124,-100},{-124,-124},{244, - -124},{244,0},{285,0}}, + points={{-124.516,-98.6857},{-124.516,-100},{-124,-100},{-124,-124},{ + 244,-124},{244,0},{285,0}}, color={175,175,175}, thickness=0.5), Text( string="%second", @@ -207,8 +208,8 @@ equation points={{-42,-23.2571},{-42,-24},{-20,-24},{-20,62.8},{2,62.8}},color= {191,0,0})); connect(userProfiles.useProBus, hydraulic.useProBus) annotation (Line( - points={{-225.167,150.775},{-214,150.775},{-214,16},{-157.358,16},{-157.358, - -2}}, + points={{-225.167,150.775},{-214,150.775},{-214,16},{-157.358,16},{ + -157.358,-2}}, color={0,127,0}, thickness=0.5)); connect(control.sigBusHyd, hydraulic.sigBusHyd) annotation (Line( @@ -220,13 +221,15 @@ equation points={{-225.167,150.775},{-32,150.775},{-32,-36},{60.9,-36},{60.9,-42}}, color={0,127,0}, thickness=0.5)); - connect(hydraulic.portDHW_out, DHW.port_a) annotation (Line(points={{-42.8211, - -72.6286},{-2,-72.6286},{-2,-57.2},{2,-57.2}}, color={0,127,255})); - connect(hydraulic.portDHW_in, DHW.port_b) annotation (Line(points={{-42.8211, - -86.3429},{-2,-86.3429},{-2,-102.8},{2,-102.8}}, color={0,127,255})); + connect(hydraulic.portDHW_out, DHW.port_a) annotation (Line(points={{ + -42.8211,-72.6286},{-2,-72.6286},{-2,-57.2},{2,-57.2}}, + color={0,127,255})); + connect(hydraulic.portDHW_in, DHW.port_b) annotation (Line(points={{ + -42.8211,-86.3429},{-2,-86.3429},{-2,-102.8},{2,-102.8}}, + color={0,127,255})); connect(DHW.internalElectricalPin, electrical.internalElectricalPin[3]) annotation (Line( - points={{66.6,-117.24},{66.6,-126},{72,-126},{72,-140},{-210,-140},{-210,118}, - {-198,118},{-198,118.171}}, + points={{66.6,-117.24},{66.6,-126},{72,-126},{72,-140},{-210,-140},{-210, + 118},{-198,118},{-198,118.171}}, color={0,0,0}, thickness=1)); connect(DHW.outBusDHW, outputs.DHW) annotation (Line( @@ -240,8 +243,8 @@ equation connect(electrical.internalElectricalPin[1], hydraulic.internalElectricalPin) annotation (Line( - points={{-198,118.171},{-198,118},{-210,118},{-210,-140},{-56,-140},{-56,-124}, - {-54.3158,-124},{-54.3158,-98}}, + points={{-198,118.171},{-198,118},{-210,118},{-210,-140},{-56,-140},{-56, + -124},{-54.3158,-124},{-54.3158,-98}}, color={0,0,0}, thickness=1)); else diff --git a/BESMod/Systems/Demand/DHW/BaseClasses/PartialDHW.mo b/BESMod/Systems/Demand/DHW/BaseClasses/PartialDHW.mo index ab16ac62..6fe262b4 100644 --- a/BESMod/Systems/Demand/DHW/BaseClasses/PartialDHW.mo +++ b/BESMod/Systems/Demand/DHW/BaseClasses/PartialDHW.mo @@ -6,6 +6,9 @@ partial model PartialDHW "Partial model for domestic hot water (DHW)" parameter Modelica.Units.SI.MassFlowRate mDHW_flow_nominal(min=1e-60) "Nominal mass flow rate" annotation (Dialog(group="Design - Bottom Up: Parameters are defined by the subsystem")); + parameter Modelica.Units.SI.PressureDifference dpDHW_nominal=0 + "Nominal pressure drop" annotation (Dialog(group= + "Design - Top Down: Parameters are given by the parent system")); parameter Modelica.Units.SI.Temperature TDHW_nominal "Nominal DHW temperature" annotation (Dialog(group="Design - Bottom Up: Parameters are defined by the subsystem")); diff --git a/BESMod/Systems/Demand/DHW/BaseClasses/PartialDHWWithBasics.mo b/BESMod/Systems/Demand/DHW/BaseClasses/PartialDHWWithBasics.mo index 4511fa3f..c462b137 100644 --- a/BESMod/Systems/Demand/DHW/BaseClasses/PartialDHWWithBasics.mo +++ b/BESMod/Systems/Demand/DHW/BaseClasses/PartialDHWWithBasics.mo @@ -34,7 +34,8 @@ Modelica.Blocks.Math.UnitConversions.From_degC fromDegC final m_flow_small=1E-4*abs(mDHW_flow_nominal), final show_T=show_T, final m_flow_nominal=mDHW_flow_nominal, - final dp_nominal(displayUnit="Pa") = 100, + final dp_nominal(displayUnit="Pa") = if dpDHW_nominal <> 0 then + dpDHW_nominal else 100, final addPowerToMedium=parPum.addPowerToMedium, final tau=parPum.tau, final use_inputFilter=parPum.use_inputFilter, diff --git a/BESMod/Systems/Hydraulical/Distribution/BaseClasses/PartialDHWParameters.mo b/BESMod/Systems/Hydraulical/Distribution/BaseClasses/PartialDHWParameters.mo index 57d0381f..4cc9689a 100644 --- a/BESMod/Systems/Hydraulical/Distribution/BaseClasses/PartialDHWParameters.mo +++ b/BESMod/Systems/Hydraulical/Distribution/BaseClasses/PartialDHWParameters.mo @@ -3,6 +3,9 @@ model PartialDHWParameters parameter Modelica.Units.SI.MassFlowRate mDHW_flow_nominal(min=Modelica.Constants.eps) "Nominal mass flow rate" annotation (Dialog(group= "Design - Top Down: Parameters are given by the parent system")); + parameter Modelica.Units.SI.PressureDifference dpDHW_nominal=0 + "Nominal pressure drop of DHW" annotation (Dialog(group= + "Design - Bottom Up: Parameters are defined by the subsystem")); parameter Modelica.Units.SI.HeatFlowRate QDHW_flow_nominal(min=Modelica.Constants.eps) "Nominal heat flow rate to DHW" annotation (Dialog(group="Design - Top Down: Parameters are given by the parent system")); parameter Modelica.Units.SI.HeatFlowRate QDHWBefSto_flow_nominal(min=Modelica.Constants.eps) = max(Modelica.Constants.eps, if designType==BESMod.Systems.Hydraulical.Distribution.Types.DHWDesignType.NoStorage then QDHW_flow_nominal elseif designType==BESMod.Systems.Hydraulical.Distribution.Types.DHWDesignType.PartStorage then (((QCrit - (VStoDHW * 4184 * 1000 / 3600000) * (TDHW_nominal - 313.15)) / (tCrit/3600)) * 1000 + QDHWStoLoss_flow) elseif designType == BESMod.Systems.Hydraulical.Distribution.Types.DHWDesignType.FullStorage then (VStoDHW * 4184 * 1000 / 3600000 / tCrit) * (TDHW_nominal - TDHWCold_nominal) else Modelica.Constants.eps) diff --git a/BESMod/Systems/Hydraulical/Distribution/BaseClasses/PartialTwoStorageParallel.mo b/BESMod/Systems/Hydraulical/Distribution/BaseClasses/PartialTwoStorageParallel.mo index 68afe4f5..2b8a1a4c 100644 --- a/BESMod/Systems/Hydraulical/Distribution/BaseClasses/PartialTwoStorageParallel.mo +++ b/BESMod/Systems/Hydraulical/Distribution/BaseClasses/PartialTwoStorageParallel.mo @@ -1,6 +1,7 @@ within BESMod.Systems.Hydraulical.Distribution.BaseClasses; partial model PartialTwoStorageParallel "Partial model to later extent" extends BaseClasses.PartialDistribution( + final dpDHW_nominal=0, final dpDem_nominal={0}, final dpSup_nominal={parThrWayVal.dpValve_nominal + max(parThrWayVal.dp_nominal)}, final dTTraDHW_nominal=parStoDHW.dTLoadingHC1, diff --git a/BESMod/Systems/Hydraulical/Distribution/BuildingOnly.mo b/BESMod/Systems/Hydraulical/Distribution/BuildingOnly.mo index 3ff08dfa..b95c2b98 100644 --- a/BESMod/Systems/Hydraulical/Distribution/BuildingOnly.mo +++ b/BESMod/Systems/Hydraulical/Distribution/BuildingOnly.mo @@ -2,6 +2,7 @@ within BESMod.Systems.Hydraulical.Distribution; model BuildingOnly "Only loads building" extends BaseClasses.PartialDistribution( use_dhw=false, + final dpDHW_nominal=0, final fFullSto=0, final QDHWBefSto_flow_nominal=Modelica.Constants.eps, final VStoDHW=0, diff --git a/BESMod/Systems/Hydraulical/Distribution/CombiStorage.mo b/BESMod/Systems/Hydraulical/Distribution/CombiStorage.mo index 1ad90c2b..fffd361f 100644 --- a/BESMod/Systems/Hydraulical/Distribution/CombiStorage.mo +++ b/BESMod/Systems/Hydraulical/Distribution/CombiStorage.mo @@ -2,6 +2,7 @@ within BESMod.Systems.Hydraulical.Distribution; model CombiStorage "Combi Storage for heating, dhw and solar assitance" extends BaseClasses.PartialDistribution( + final dpDHW_nominal=sum(bufSto.heatingCoil1.pipe.res.dp_nominal), dpSup_nominal={0,sum(bufSto.heatingCoil2.pipe.res.dp_nominal)}, final dpDem_nominal={0}, final VStoDHW=parameters.V, diff --git a/BESMod/Systems/Hydraulical/Distribution/DHWOnly.mo b/BESMod/Systems/Hydraulical/Distribution/DHWOnly.mo index 132b0e5c..797ee98d 100644 --- a/BESMod/Systems/Hydraulical/Distribution/DHWOnly.mo +++ b/BESMod/Systems/Hydraulical/Distribution/DHWOnly.mo @@ -3,6 +3,7 @@ model DHWOnly "only loads DHW" extends BaseClasses.PartialDistribution( final VStoDHW=0, final fFullSto=0, + final dpDHW_nominal=0, final QDHWStoLoss_flow=0, final designType=BESMod.Systems.Hydraulical.Distribution.Types.DHWDesignType.NoStorage, nParallelDem=1, diff --git a/BESMod/Systems/Hydraulical/Distribution/DistributionTwoStorageParallel.mo b/BESMod/Systems/Hydraulical/Distribution/DistributionTwoStorageParallel.mo index b238757f..af4a75e1 100644 --- a/BESMod/Systems/Hydraulical/Distribution/DistributionTwoStorageParallel.mo +++ b/BESMod/Systems/Hydraulical/Distribution/DistributionTwoStorageParallel.mo @@ -2,6 +2,7 @@ within BESMod.Systems.Hydraulical.Distribution; model DistributionTwoStorageParallel "Buffer storage and DHW storage" extends BaseClasses.PartialDistribution( + final dpDHW_nominal=0, final VStoDHW=parStoDHW.V, final QDHWStoLoss_flow=parStoDHW.QLoss_flow, designType=BESMod.Systems.Hydraulical.Distribution.Types.DHWDesignType.PartStorage,