diff --git a/Buildings/Experimental/DHC/EnergyTransferStations/BaseClasses/PartialDirect.mo b/Buildings/Experimental/DHC/EnergyTransferStations/BaseClasses/PartialDirect.mo index 1b1d0f068cf..a823440d3ba 100644 --- a/Buildings/Experimental/DHC/EnergyTransferStations/BaseClasses/PartialDirect.mo +++ b/Buildings/Experimental/DHC/EnergyTransferStations/BaseClasses/PartialDirect.mo @@ -57,7 +57,7 @@ model PartialDirect "Bandwidth around reference signal for on/off controller" annotation (Dialog(tab="Advanced")); - Modelica.Blocks.Interfaces.RealInput TSetDisRet( + Modelica.Blocks.Interfaces.RealInput TDisRetSet( final unit="K", displayUnit="degC") "Setpoint for the district return temperature (min for cooling, max for heating)" @@ -197,7 +197,7 @@ equation connect(senTDisSup.T,dTDis. u2) annotation (Line(points={{-170,-269},{-172,-269},{-172,-184},{60,-184},{60,-110}, {78,-110}}, color={0,0,127})); - connect(TSetDisRet, con.u_s) + connect(TDisRetSet, con.u_s) annotation (Line(points={{-318,0},{-272,0},{-272,250},{-222,250}}, color={0,0,127})); connect(senTBuiRet.T, con.u_m) @@ -224,7 +224,7 @@ cooling network is at or above the minimum specified value. This configuration naturally results in a fluctuating building supply tempearture.

-\"DC +\"DC

Reference diff --git a/Buildings/Experimental/DHC/EnergyTransferStations/BaseClasses/PartialIndirect.mo b/Buildings/Experimental/DHC/EnergyTransferStations/BaseClasses/PartialIndirect.mo index 806d5d666da..63659aee641 100644 --- a/Buildings/Experimental/DHC/EnergyTransferStations/BaseClasses/PartialIndirect.mo +++ b/Buildings/Experimental/DHC/EnergyTransferStations/BaseClasses/PartialIndirect.mo @@ -84,7 +84,7 @@ model PartialIndirect parameter Real yMin=0.01 "Lower limit of output" annotation (Dialog(group="PID controller")); - Modelica.Blocks.Interfaces.RealInput TSetBuiSup + Modelica.Blocks.Interfaces.RealInput TBuiSupSet "Setpoint temperature for building supply" annotation (Placement(transformation(extent={{-340,-20},{-300,20}}))); Modelica.Blocks.Interfaces.RealOutput Q_flow( @@ -201,7 +201,7 @@ equation annotation (Line(points={{-26,-193},{-26,-180},{-140,-180},{-140,-240},{-120, -240},{-120,-232}}, color={0,0,127})); - connect(TSetBuiSup, con.u_s) + connect(TBuiSupSet, con.u_s) annotation (Line(points={{-320,0},{-240,0},{-240,-220},{-132,-220}}, color={0,0,127})); connect(con.y, conVal.y) diff --git a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/BaseClasses/PartialHeatPumpHeatExchanger.mo b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/BaseClasses/PartialHeatPumpHeatExchanger.mo new file mode 100644 index 00000000000..f3a714a0e6a --- /dev/null +++ b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/BaseClasses/PartialHeatPumpHeatExchanger.mo @@ -0,0 +1,646 @@ +within Buildings.Experimental.DHC.EnergyTransferStations.Combined.BaseClasses; +model PartialHeatPumpHeatExchanger + "Partial model of a substation with heat pump and compressor-less cooling" + extends + Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.PartialETS( + final typ=Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5, + final have_weaBus=false, + final have_chiWat=true, + final have_heaWat=true, + have_hotWat=false, + final have_eleHea=true, + final nFue=0, + final have_eleCoo=false, + final have_pum=true, + final have_fan=false, + nPorts_aHeaWat=1, + nPorts_aChiWat=1); + // SYSTEM GENERAL + parameter Boolean have_varFloCon = true + "Set to true for heat pumps with variable condenser flow" + annotation(Evaluate=true); + parameter Boolean have_varFloEva = true + "Set to true for heat pumps with variable evaporator flow" + annotation(Evaluate=true); + parameter Real ratFloMin( + final unit="1", + final min=0, + final max=1)=0.3 + "Minimum condenser mass flow rate (ratio to nominal)" + annotation (Dialog(enable=have_varFloCon or have_varFloEva)); + parameter Modelica.Units.SI.Temperature TDisWatMin + "District water minimum temperature" annotation (Dialog(group="DHC system")); + parameter Modelica.Units.SI.Temperature TDisWatMax + "District water maximum temperature" annotation (Dialog(group="DHC system")); + parameter Modelica.Units.SI.TemperatureDifference dT_nominal(min=0) = 5 + "Water temperature drop/increase accross load and source-side HX (always positive)" + annotation (Dialog(group="Nominal condition")); + parameter Modelica.Units.SI.Temperature TChiWatSup_nominal=291.15 + "Chilled water supply temperature" + annotation (Dialog(group="Nominal conditions")); + final parameter Modelica.Units.SI.Temperature TChiWatRet_nominal= + TChiWatSup_nominal + dT_nominal "Chilled water return temperature" + annotation (Dialog(group="Nominal condition")); + parameter Modelica.Units.SI.Temperature THeaWatSup_nominal=313.15 + "Heating water supply temperature" + annotation (Dialog(group="Nominal condition")); + final parameter Modelica.Units.SI.Temperature THeaWatRet_nominal= + THeaWatSup_nominal - dT_nominal "Heating water return temperature" + annotation (Dialog(group="Nominal condition")); + parameter Modelica.Units.SI.Temperature THotWatSup_nominal=336.15 + "Domestic hot water supply temperature to fixtures" + annotation (Dialog(group="Nominal condition", enable=have_hotWat)); + parameter Modelica.Units.SI.Temperature TColWat_nominal=288.15 + "Cold water temperature (for hot water production)" + annotation (Dialog(group="Nominal condition", enable=have_hotWat)); + parameter Modelica.Units.SI.Pressure dp_nominal(displayUnit="Pa") = 50000 + "Pressure difference at nominal flow rate (for each flow leg)" + annotation (Dialog(group="Nominal condition")); + final parameter Modelica.Units.SI.MassFlowRate mHeaWat_flow_nominal(min=0)= + abs(QHeaWat_flow_nominal/cpBui_default/(THeaWatSup_nominal - THeaWatRet_nominal)) + "Heating water mass flow rate" + annotation (Dialog(group="Nominal condition")); + final parameter Modelica.Units.SI.MassFlowRate mChiWat_flow_nominal(min=0)= + abs(QChiWat_flow_nominal/cpBui_default/(TChiWatSup_nominal - TChiWatRet_nominal)) + "Chilled water mass flow rate" + annotation (Dialog(group="Nominal conditions")); + final parameter Modelica.Units.SI.MassFlowRate mEvaHotWat_flow_nominal(min=0)= + QHotWat_flow_nominal*(COPHotWat_nominal - 1)/COPHotWat_nominal/cpSer_default/dT_nominal + "Evaporator water mass flow rate of heat pump for hot water production" + annotation (Dialog(group="Nominal condition", enable=have_hotWat)); + final parameter Modelica.Units.SI.MassFlowRate mSerWat_flow_nominal(min=0)= + max(proHeaWat.mCon_flow_nominal + mEvaHotWat_flow_nominal, hexChi.m1_flow_nominal) + "Service water mass flow rate" + annotation (Dialog(group="Nominal condition")); + constant Modelica.Units.SI.SpecificHeatCapacity cpBui_default= + MediumBui.specificHeatCapacityCp(MediumBui.setState_pTX( + p=MediumBui.p_default, + T=MediumBui.T_default)) "Specific heat capacity of the fluid"; + constant Modelica.Units.SI.SpecificHeatCapacity cpSer_default= + MediumBui.specificHeatCapacityCp(MediumSer.setState_pTX( + p=MediumSer.p_default, + T=MediumSer.T_default)) "Specific heat capacity of the fluid"; + // Heat pump for heating water production + parameter Real COPHeaWat_nominal(final unit="1") + "COP of heat pump for heating water production" + annotation (Dialog(group="Nominal condition")); + // Heat pump for hot water production + parameter Real COPHotWat_nominal(final unit="1") + "COP of heat pump for hot water production" + annotation (Dialog(group="Nominal condition", enable=have_hotWat)); + // District HX + final parameter Modelica.Units.SI.MassFlowRate m1HexChi_flow_nominal(min=0)= + abs(QChiWat_flow_nominal/cpSer_default/dT_nominal) + "CHW HX primary mass flow rate" + annotation (Dialog(group="Nominal condition")); + final parameter Modelica.Units.SI.MassFlowRate m2HexChi_flow_nominal(min=0)= + abs(QChiWat_flow_nominal/cpSer_default/(THeaWatSup_nominal - + THeaWatRet_nominal)) "CHW HX secondary mass flow rate" + annotation (Dialog(group="Nominal condition")); + // Dynamics + parameter Modelica.Fluid.Types.Dynamics mixingVolumeEnergyDynamics= + Modelica.Fluid.Types.Dynamics.FixedInitial + "Formulation of energy balance for mixing volume at inlet and outlet" + annotation(Dialog(tab="Dynamics")); + // IO CONNECTORS + Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uCoo + "Cooling enable signal" + annotation (Placement(transformation(extent={{-340, + 100},{-300,140}}), iconTransformation(extent={{-380,20},{-300,100}}))); + Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uHea + "Heating enable signal" + annotation (Placement(transformation(extent={{-340, + 140},{-300,180}}), iconTransformation(extent={{-380,60},{-300,140}}))); + Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uSHW if have_hotWat + "SHW production enable signal" + annotation (Placement(transformation(extent= + {{-340,60},{-300,100}}), iconTransformation(extent={{-380,-20},{-300, + 60}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatSupSet( + final unit="K", + displayUnit="degC") + "Heating water supply temperature set point" + annotation (Placement( + transformation( + extent={{-340,20},{-300,60}}), + iconTransformation( + extent={{-380,-60},{-300,20}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput THotWatSupSet( + final unit="K", + displayUnit="degC") if have_hotWat + "Domestic hot water temperature set point for supply to fixtures" + annotation (Placement( + transformation( + extent={{-20,-20},{20,20}}, + rotation=0, + origin={-320,-40}), + iconTransformation( + extent={{-380,-140},{-300,-60}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput TColWat( + final unit="K", + displayUnit="degC") if have_hotWat + "Cold water temperature" annotation ( + Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=0, + origin={-320,-80}), iconTransformation( + extent={{-40,-40},{40,40}}, + rotation=0, + origin={-340,-140}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput QReqHotWat_flow( + final unit="W") if have_hotWat "Service hot water load" + annotation ( + Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=0, + origin={-320,-120}),iconTransformation( + extent={{-40,-40},{40,40}}, + rotation=0, + origin={-340,-180}))); + Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatSupSet(final unit="K", + displayUnit="degC") + "Chilled water supply temperature set point" annotation (Placement( + transformation( + extent={{-340,-20},{-300,20}}), + iconTransformation( + extent={{-380,-100},{-300,-20}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealOutput mHea_flow(final unit="kg/s") + "District water mass flow rate used for heating service" + annotation ( Placement(transformation(extent={{300,-160},{340,-120}}), + iconTransformation(extent={{300,-160},{380,-80}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealOutput mCoo_flow(final unit="kg/s") + "District water mass flow rate used for cooling service" + annotation ( Placement(transformation(extent={{300,-200},{340,-160}}), + iconTransformation(extent={{300,-200},{380,-120}}))); + // COMPONENTS + Buildings.Fluid.Delays.DelayFirstOrder volMix_a( + redeclare final package Medium = MediumSer, + final m_flow_nominal=mSerWat_flow_nominal, + tau=600, + final energyDynamics=mixingVolumeEnergyDynamics) + "Mixing volume to break algebraic loops and to emulate the delay of the substation" + annotation (Placement(transformation(extent={{-270,-360},{-250,-380}}))); + Buildings.Fluid.Delays.DelayFirstOrder volMix_b( + redeclare final package Medium = MediumSer, + final m_flow_nominal=mSerWat_flow_nominal, + tau=600, + final energyDynamics=mixingVolumeEnergyDynamics) + "Mixing volume to break algebraic loops and to emulate the delay of the substation" + annotation (Placement(transformation(extent={{250,-360},{270,-380}}))); + Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.Pump_m_flow pum1HexChi( + redeclare final package Medium = MediumSer, + final m_flow_nominal=m1HexChi_flow_nominal, + final allowFlowReversal=allowFlowReversalSer, + dp_nominal=dp_nominal) + "Chilled water HX primary pump" + annotation (Placement(transformation(extent={{110,-350},{90,-330}}))); + Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU hexChi( + redeclare final package Medium1 = MediumSer, + redeclare final package Medium2 = MediumBui, + final m1_flow_nominal=m1HexChi_flow_nominal, + final m2_flow_nominal=m2HexChi_flow_nominal, + final dp1_nominal=dp_nominal/2, + final dp2_nominal=dp_nominal/2, + configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow, + final Q_flow_nominal=QChiWat_flow_nominal, + final T_a1_nominal=TDisWatMax, + final T_a2_nominal=TChiWatRet_nominal, + final allowFlowReversal1=allowFlowReversalSer, + final allowFlowReversal2=allowFlowReversalBui) + "Chilled water HX" + annotation (Placement(transformation(extent={{10,-324},{-10,-344}}))); + Buildings.Fluid.Delays.DelayFirstOrder volHeaWatRet( + redeclare final package Medium = MediumBui, + final m_flow_nominal=proHeaWat.mCon_flow_nominal, + tau=60, + final energyDynamics=mixingVolumeEnergyDynamics, + T_start=THeaWatSup_nominal, + nPorts=3) "Mixing volume representing building HHW primary" annotation ( + Placement(transformation( + extent={{-10,10},{10,-10}}, + rotation=90, + origin={90,180}))); + Buildings.Fluid.Sensors.MassFlowRate senMasFloHeaWat( + redeclare final package Medium = MediumBui, + final allowFlowReversal=allowFlowReversalBui) + "Heating water mass flow rate" + annotation (Placement(transformation(extent={{-250,250},{-230,270}}))); + Buildings.Fluid.Delays.DelayFirstOrder volChiWat( + redeclare final package Medium = MediumBui, + final m_flow_nominal=m1HexChi_flow_nominal, + tau=60, + final energyDynamics=mixingVolumeEnergyDynamics, + T_start=TChiWatSup_nominal, + nPorts=3) "Mixing volume representing building CHW primary" + annotation (Placement(transformation(extent={{-110,-280},{-90,-260}}))); + Buildings.Fluid.Sensors.MassFlowRate senMasFloChiWat( + redeclare final package Medium = MediumBui, + final allowFlowReversal=allowFlowReversalBui) + "Chilled water mass flow rate" + annotation (Placement(transformation(extent={{-250,-130},{-230,-110}}))); + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai2(final k= + m1HexChi_flow_nominal) + annotation (Placement(transformation(extent={{-108,-210},{-88,-190}}))); + Buildings.Experimental.DHC.EnergyTransferStations.Combined.Controls.PIDWithEnable conTChiWat( + k=0.05, + Ti=120, + yMax=1, + controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, + reverseActing=false, + yMin=0) "PI controller for district HX primary side" + annotation (Placement(transformation(extent={{-150,-210},{-130,-190}}))); + Buildings.Controls.OBC.CDL.Reals.MultiSum PPumHeaTot(nin=2) + "Total pump power for heating applications" + annotation (Placement(transformation(extent={{190,410},{210,430}}))); + Buildings.Fluid.Sources.Boundary_pT bouHeaWat( + redeclare final package Medium = MediumBui, + nPorts=1) + "Pressure boundary condition representing the expansion vessel" + annotation (Placement(transformation(extent={{10,-10},{-10,10}}, + rotation=-90, + origin={60,150}))); + Buildings.Fluid.Sources.Boundary_pT bouChiWat( + redeclare final package Medium = MediumBui, + nPorts=1) + "Pressure boundary condition representing the expansion vessel" + annotation (Placement(transformation(extent={{-162,-290},{-142,-270}}))); + Buildings.Controls.OBC.CDL.Reals.MultiSum PPumCooTot(nin=1) + "Total pump power for space cooling" + annotation (Placement(transformation(extent={{190,370},{210,390}}))); + Buildings.Controls.OBC.CDL.Reals.MultiSum PPumTot(nin=2) + "Total pump power" + annotation (Placement(transformation(extent={{220,390},{240,410}}))); + Buildings.Fluid.Sensors.TemperatureTwoPort senTHeaWatSup( + redeclare final package Medium=MediumBui, + final allowFlowReversal=allowFlowReversalBui, + final m_flow_nominal=mHeaWat_flow_nominal) + "Heating water supply temperature" + annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={140,260}))); + Buildings.Fluid.Sensors.TemperatureTwoPort senTChiWatSup( + redeclare final package Medium=MediumBui, + final allowFlowReversal=allowFlowReversalBui, + final m_flow_nominal=mChiWat_flow_nominal) + "Chilled water supply temperature" + annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={140,-280}))); + Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.SwitchBox + swiFlo( + redeclare final package Medium = MediumSer, + final m_flow_nominal=mSerWat_flow_nominal) "Flow switch box" + annotation (Placement(transformation(extent={{-10,-390},{10,-370}}))); + Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.Junction bypHeaWatSup( + redeclare final package Medium = MediumBui, final m_flow_nominal=proHeaWat.mCon_flow_nominal + *{1,-1,-1}) "Bypass heating water (supply)" annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={100,260}))); + Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.Junction bypHeaWatRet( + redeclare final package Medium = MediumBui, final m_flow_nominal=proHeaWat.mCon_flow_nominal + *{1,-1,1}) + "Bypass heating water (return)" + annotation (Placement( + transformation( + extent={{10,10},{-10,-10}}, + rotation=0, + origin={100,240}))); + Buildings.Controls.OBC.CDL.Logical.TrueFalseHold enaHea( + trueHoldDuration=15*60) "Enable heating" + annotation (Placement(transformation(extent={{-140,150},{-120,170}}))); + Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.HeatPump proHeaWat( + redeclare final package Medium1 = MediumBui, + redeclare final package Medium2 = MediumSer, + dT_nominal=dT_nominal, + final have_varFloCon=have_varFloCon, + final COP_nominal=COPHeaWat_nominal, + final TCon_nominal=THeaWatSup_nominal, + final TEva_nominal=TDisWatMin - dT_nominal, + final Q1_flow_nominal=QHeaWat_flow_nominal, + final allowFlowReversal1=allowFlowReversalBui, + final allowFlowReversal2=allowFlowReversalSer, + final dp1_nominal=dp_nominal, + final dp2_nominal=dp_nominal) "Subsystem for heating water production" + annotation (Placement(transformation(extent={{-10,204},{10,224}}))); + Buildings.Controls.OBC.CDL.Reals.MultiSum masFloHeaTot(nin=2) + "Compute district water mass flow rate used for heating service" + annotation (Placement(transformation(extent={{270,-150},{290,-130}}))); + Modelica.Blocks.Sources.Constant zer(final k=0) if not have_hotWat + "Replacement variable" + annotation (Placement(transformation(extent={{140,350},{160,370}}))); + Buildings.Fluid.Sensors.TemperatureTwoPort senTHeaWatRet( + redeclare final package Medium = MediumBui, + final allowFlowReversal=allowFlowReversalBui, + final m_flow_nominal=mHeaWat_flow_nominal) + "Heating water return temperature" annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={20,300}))); + Buildings.Fluid.Sensors.TemperatureTwoPort senTChiWatRet( + redeclare final package Medium = MediumBui, + final allowFlowReversal=allowFlowReversalBui, + final m_flow_nominal=mChiWat_flow_nominal) + "Chilled water return temperature" annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={40,-120}))); + Buildings.Fluid.Sensors.MassFlowRate senMasFloHeaWatPri(redeclare final + package Medium = + MediumBui, final allowFlowReversal=allowFlowReversalBui) + "Primary heating water mass flow rate" + annotation (Placement(transformation(extent={{30,270},{50,250}}))); + Buildings.Controls.OBC.CDL.Logical.TrueFalseHold enaSHW( + trueHoldDuration=15*60) if have_hotWat "Enable SHW production" + annotation (Placement(transformation(extent={{-140,70},{-120,90}}))); + Modelica.Blocks.Sources.Constant zer1(k=0) if not have_hotWat + "Replacement variable" + annotation (Placement(transformation(extent={{-40,-250},{-20,-230}}))); + Buildings.Controls.OBC.CDL.Reals.Add masFloHea + "Service water mass flow rate for heating applications" + annotation ( + Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=-90, + origin={0,-264}))); + Buildings.Controls.OBC.CDL.Reals.MultiSum PHeaTot(nin=2) + "Total power used for heating and hot water production" + annotation (Placement(transformation(extent={{270,70},{290,90}}))); + Buildings.Controls.OBC.CDL.Reals.Subtract dTHHW + "Heating hot water DeltaT" + annotation (Placement(transformation(extent={{0,310},{-20,330}}))); + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter capFloHHW( + final k=cpBui_default) if have_varFloEva or have_varFloCon "Capacity flow rate" + annotation (Placement(transformation(extent={{-220,310},{-200,330}}))); + Buildings.Experimental.DHC.EnergyTransferStations.Combined.Controls.PrimaryVariableFlow conFloConHHW( + final Q_flow_nominal=QHeaWat_flow_nominal, + final dT_nominal=dT_nominal, + final ratFloMin=ratFloMin, + final cp=cpBui_default) if have_varFloCon + "Mass flow rate control" + annotation (Placement(transformation(extent={{-100,270},{-80,290}}))); + Buildings.Controls.OBC.CDL.Reals.Max priOve if have_varFloCon + "Ensure primary overflow" + annotation (Placement(transformation(extent={{-60,270},{-40,290}}))); + Buildings.Controls.OBC.CDL.Reals.Multiply loaHHW + if have_varFloEva or have_varFloCon "Heating load" + annotation (Placement(transformation(extent={{-140,270},{-120,290}}))); + +equation + connect(TChiWatSupSet, conTChiWat.u_s) annotation (Line(points={{-320,0},{-200, + 0},{-200,-200},{-152,-200}}, color={0,0,127})); + connect(pum1HexChi.P, PPumCooTot.u[1]) annotation (Line(points={{89,-331},{84, + -331},{84,-322},{180,-322},{180,380},{188,380}}, color={0,0,127})); + connect(PPumHeaTot.y, PPumTot.u[1]) annotation (Line(points={{212,420},{216,420}, + {216,399.5},{218,399.5}}, + color={0,0,127})); + connect(PPumCooTot.y, PPumTot.u[2]) annotation (Line(points={{212,380},{216,380}, + {216,400.5},{218,400.5}}, + color={0,0,127})); + connect(pum1HexChi.port_b, hexChi.port_a1) annotation (Line(points={{90,-340}, + {10,-340}}, color={0,127,255})); + connect(pum1HexChi.m_flow_actual, mCoo_flow) annotation (Line(points={{89,-335}, + {82,-335},{82,-320},{276,-320},{276,-180},{320,-180}}, color={0,0,127})); + connect(volMix_a.ports[1], swiFlo.port_bSup) annotation (Line(points={{-260,-360}, + {-6,-360},{-6,-370}}, color={0,127,255})); + connect(swiFlo.port_aRet, volMix_b.ports[1]) annotation (Line(points={{6,-370}, + {6,-360},{260,-360}}, color={0,127,255})); + connect(volMix_b.ports[2], pum1HexChi.port_a) annotation (Line(points={{260,-360}, + {258,-360},{258,-340},{110,-340}}, color={0,127,255})); + connect(hexChi.port_b1, volMix_a.ports[2]) annotation (Line(points={{-10,-340}, + {-256,-340},{-256,-360},{-260,-360}}, color={0,127,255})); + connect(pum1HexChi.m_flow_actual, swiFlo.mRev_flow) annotation (Line(points={ + {89,-335},{80,-335},{80,-356},{-20,-356},{-20,-384},{-12,-384}}, + color={0,0,127})); + connect(gai2.y, pum1HexChi.m_flow_in) + annotation (Line(points={{-86,-200},{100,-200},{100,-328}}, + color={0,0,127})); + connect(PPumTot.y, PPum) annotation (Line(points={{242,400},{244,400},{244,-40}, + {320,-40}}, color={0,0,127})); + connect(ports_aHeaWat[1], senMasFloHeaWat.port_a) annotation (Line(points={{-300, + 260},{-250,260}}, color={0,127,255})); + connect(bypHeaWatSup.port_2, senTHeaWatSup.port_a) + annotation (Line(points={{110,260},{130,260}}, color={0,127,255})); + connect(senTHeaWatSup.port_b, ports_bHeaWat[1]) + annotation (Line(points={{150,260},{300,260}}, color={0,127,255})); + connect(bypHeaWatRet.port_2, volHeaWatRet.ports[1]) annotation (Line(points={{90,240}, + {80,240},{80,178.667}}, color={0,127,255})); + connect(bouHeaWat.ports[1], volHeaWatRet.ports[2]) annotation (Line(points={{60,160}, + {60,180},{80,180}}, color={0,127,255})); + connect(ports_aChiWat[1], senMasFloChiWat.port_a) annotation (Line(points={{-300, + 200},{-280,200},{-280,-120},{-250,-120}}, color={0,127,255})); + connect(senTChiWatSup.port_b, ports_bChiWat[1]) annotation (Line(points={{150, + -280},{200,-280},{200,200},{300,200}}, color={0,127,255})); + connect(bypHeaWatRet.port_3, bypHeaWatSup.port_3) + annotation (Line(points={{100,250},{100,250}}, color={0,127,255})); + connect(volHeaWatRet.ports[3], proHeaWat.port_a1) annotation (Line(points={{80, + 181.333},{80,180},{-20,180},{-20,220},{-9.8,220}},color={0,127,255})); + connect(proHeaWat.port_b2, volMix_b.ports[3]) annotation (Line(points={{-10,208}, + {-14,208},{-14,202},{262,202},{262,-360},{260,-360}}, + color={0,127,255})); + connect(volMix_a.ports[3], proHeaWat.port_a2) annotation (Line(points={{-260, + -360},{-260,192},{14,192},{14,208},{10,208}}, color={0,127,255})); + connect(enaHea.y, proHeaWat.uEna) annotation (Line(points={{-118,160},{-48,160}, + {-48,223},{-12,223}}, color={255,0,255})); + connect(THeaWatSupSet, proHeaWat.TSupSet) annotation (Line(points={{-320,40},{ + -200,40},{-200,217},{-12,217}}, + color={0,0,127})); + connect(proHeaWat.PPum, PPumHeaTot.u[1]) annotation (Line(points={{12,214},{172, + 214},{172,419.5},{188,419.5}}, + color={0,0,127})); + connect(masFloHeaTot.y, mHea_flow) + annotation (Line(points={{292,-140},{320,-140}}, color={0,0,127})); + connect(zer.y, masFloHeaTot.u[2]) annotation (Line(points={{161,360},{216,360}, + {216,-144},{268,-144},{268,-139.5}}, + color={0,0,127})); + connect(proHeaWat.mEva_flow, masFloHeaTot.u[1]) annotation (Line(points={{12,211}, + {220,211},{220,-140.5},{268,-140.5}}, + color={0,0,127})); + connect(zer.y, PPumHeaTot.u[2]) annotation (Line(points={{161,360},{174,360},{ + 174,418},{188,418},{188,420.5}}, + color={0,0,127})); + connect(senMasFloHeaWat.port_b, senTHeaWatRet.port_a) annotation (Line(points={{-230, + 260},{-220,260},{-220,300},{10,300}}, color={0,127,255})); + connect(senTHeaWatRet.port_b, bypHeaWatRet.port_1) annotation (Line(points={{30,300}, + {120,300},{120,240},{110,240}}, color={0,127,255})); + connect(senMasFloChiWat.port_b, senTChiWatRet.port_a) + annotation (Line(points={{-230,-120},{30,-120}}, color={0,127,255})); + connect(proHeaWat.port_b1, senMasFloHeaWatPri.port_a) annotation (Line(points={{10,220}, + {14,220},{14,260},{30,260}}, color={0,127,255})); + connect(senMasFloHeaWatPri.port_b, bypHeaWatSup.port_1) + annotation (Line(points={{50,260},{90,260}}, color={0,127,255})); + connect(port_aSerAmb, swiFlo.port_aSup) annotation (Line(points={{-300,-200},{ + -272,-200},{-272,-344},{-280,-344},{-280,-400},{-6,-400},{-6,-390}}, + color={0,127,255})); + connect(swiFlo.port_bRet, port_bSerAmb) annotation (Line(points={{6,-390},{6, + -400},{280,-400},{280,-200},{300,-200}}, + color={0,127,255})); + connect(uHea, enaHea.u) annotation (Line(points={{-320,160},{-142,160}}, + color={255,0,255})); + connect(conTChiWat.y, gai2.u) + annotation (Line(points={{-128,-200},{-110,-200}}, color={0,0,127})); + connect(uCoo, conTChiWat.uEna) annotation (Line(points={{-320,120},{-180,120}, + {-180,-220},{-144,-220},{-144,-212}}, color={255,0,255})); + connect(uSHW, enaSHW.u) + annotation (Line(points={{-320,80},{-142,80}}, color={255,0,255})); + connect(senTChiWatRet.port_b, volChiWat.ports[1]) annotation (Line(points={{50,-120}, + {60,-120},{60,-280},{-101.333,-280}}, color={0,127,255})); + connect(volChiWat.ports[2], hexChi.port_a2) annotation (Line(points={{-100, + -280},{-120,-280},{-120,-320},{-20,-320},{-20,-328},{-10,-328}}, + color={0,127,255})); + connect(hexChi.port_b2, senTChiWatSup.port_a) annotation (Line(points={{10, + -328},{20,-328},{20,-320},{80,-320},{80,-280},{130,-280}}, color={0, + 127,255})); + connect(bouChiWat.ports[1], volChiWat.ports[3]) + annotation (Line(points={{-142,-280},{-98.6667,-280}}, color={0,127,255})); + connect(senTChiWatSup.T, conTChiWat.u_m) annotation (Line(points={{140,-269}, + {140,-220},{-140,-220},{-140,-212}}, color={0,0,127})); + connect(zer1.y, masFloHea.u2) annotation (Line(points={{-19,-240},{-8,-240},{ + -8,-252},{-6,-252}}, color={0,0,127})); + connect(proHeaWat.mEva_flow, masFloHea.u1) annotation (Line(points={{12,211},{ + 20,211},{20,-246},{6,-246},{6,-252}}, color={0,0,127})); + connect(masFloHea.y, swiFlo.mPos_flow) annotation (Line(points={{0,-276},{0, + -320},{-16,-320},{-16,-376},{-12,-376}}, color={0,0,127})); + connect(proHeaWat.PHea, PHeaTot.u[1]) annotation (Line(points={{12,217},{240,217}, + {240,79.5},{268,79.5}}, color={0,0,127})); + connect(zer.y, PHeaTot.u[2]) annotation (Line(points={{161,360},{242,360},{242, + 78},{268,78},{268,80.5}}, color={0,0,127})); + connect(PHeaTot.y, PHea) + annotation (Line(points={{292,80},{320,80}}, color={0,0,127})); + connect(senTHeaWatRet.T, dTHHW.u2) + annotation (Line(points={{20,311},{20,314},{2,314}}, color={0,0,127})); + connect(senTHeaWatSup.T, dTHHW.u1) + annotation (Line(points={{140,271},{140,326},{2,326}}, color={0,0,127})); + connect(senMasFloHeaWat.m_flow, capFloHHW.u) annotation (Line(points={{-240,271}, + {-240,320},{-222,320}}, color={0,0,127})); + connect(senMasFloHeaWat.m_flow, priOve.u1) annotation (Line(points={{-240,271}, + {-240,296},{-70,296},{-70,286},{-62,286}}, color={0,0,127})); + connect(conFloConHHW.m_flow, priOve.u2) annotation (Line(points={{-78,280},{-70, + 280},{-70,274},{-62,274}}, color={0,0,127})); + connect(priOve.y, proHeaWat.m1_flow) annotation (Line(points={{-38,280},{-24,280}, + {-24,214},{-12,214}}, color={0,0,127})); + connect(capFloHHW.y, loaHHW.u2) annotation (Line(points={{-198,320},{-180,320}, + {-180,274},{-142,274}}, color={0,0,127})); + connect(dTHHW.y, loaHHW.u1) annotation (Line(points={{-22,320},{-160,320},{ + -160,286},{-142,286}}, color={0,0,127})); + connect(loaHHW.y, conFloConHHW.loa) + annotation (Line(points={{-118,280},{-102,280}}, color={0,0,127})); + annotation ( + defaultComponentName="ets", + Documentation(info=" +

+This model represents an energy transfer station based on that described in Sommer (2020), +with some additioinal details: +

+

+The cooling function is provided in a compressor-less mode by a heat exchanger +connected to the district supply line. +

+ +

+The space heating heating function is provided by a water-to-water heat pump + +Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.HeatPump. +

+ +

Space Heating and Cooling Enable/Disable

+

+Heating (resp. cooling) is enabled based on the input signal uHea +(resp. uCoo) which is held for 15 minutes, meaning that, +when enabled, the mode remains active for at least 15 minutes and, +when disabled, the mode cannot be enabled again for at least 15 minutes. +The heating and cooling enable signals should be computed externally based +on a schedule (to lock out the system during off-hours), ideally in conjunction +with the number of requests yielded by the terminal unit controllers, or any +other signal representative of the load. +

+

Modeling considerations

+

+There is a control volume at each of the two fluid ports that serve as inlet and outlet +of the heating and cooling systems. These approximate the dynamics +of the substation, and they also generally avoid nonlinear systems +of equations if multiple substations are connected to each other. +

+

References

+

+Sommer T., Sulzer M., Wetter M., Sotnikov A., Mennel S., Stettler C. +The reservoir network: A new network topology for district heating +and cooling. +Energy, Volume 199, 15 May 2020, 117418. +

+", + revisions=" + +"), + Diagram(coordinateSystem(extent={{-300,-420},{300,440}})), + Icon(coordinateSystem(preserveAspectRatio=false, extent={{-300,-300},{300,300}}))); +end PartialHeatPumpHeatExchanger; diff --git a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/BaseClasses/PartialParallel.mo b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/BaseClasses/PartialParallel.mo index b03419cf79b..268f48a7e35 100644 --- a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/BaseClasses/PartialParallel.mo +++ b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/BaseClasses/PartialParallel.mo @@ -223,9 +223,11 @@ equation annotation (Line(points={{282,-60},{290,-60},{290,-40},{320,-40}}, color={0,0,127})); connect(hex.yValIso_actual[1],valIsoCon.y_actual) - annotation (Line(points={{-12,-251},{-40,-251},{-40,-113},{-55,-113}},color={0,0,127})); + annotation (Line(points={{-12,-251.5},{-40,-251.5},{-40,-113},{-55,-113}}, + color={0,0,127})); connect(hex.yValIso_actual[2],valIsoEva.y_actual) - annotation (Line(points={{-12,-253},{-16,-253},{-16,-240},{40,-240},{40,-113},{55,-113}},color={0,0,127})); + annotation (Line(points={{-12,-252.5},{-16,-252.5},{-16,-240},{40,-240},{40, + -113},{55,-113}}, color={0,0,127})); connect(valIsoEva.port_b,colAmbWat.port_bDisSup) annotation (Line(points={{50,-120},{30,-120},{30,-106},{20,-106}},color={0,127,255})); connect(valIsoCon.port_b,colAmbWat.port_aDisSup) diff --git a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/BaseClasses/package.order b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/BaseClasses/package.order index f9d24c4a9ab..559a232983f 100644 --- a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/BaseClasses/package.order +++ b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/BaseClasses/package.order @@ -1 +1,2 @@ +PartialHeatPumpHeatExchanger PartialParallel diff --git a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/ChillerBorefield.mo b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/ChillerBorefield.mo index 982f61d0bd7..930ec69aa3a 100644 --- a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/ChillerBorefield.mo +++ b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/ChillerBorefield.mo @@ -266,9 +266,11 @@ equation connect(conSup.yAmb[1],borFie.u) annotation (Line(points={{-238,25},{-200,25},{-200,-212},{-82,-212}},color={0,0,127})); connect(valIsoCon.y_actual,borFie.yValIso_actual[1]) - annotation (Line(points={{-55,-113},{-40,-113},{-40,-198},{-90,-198},{-90,-217},{-82,-217}},color={0,0,127})); + annotation (Line(points={{-55,-113},{-40,-113},{-40,-198},{-90,-198},{-90, + -216.5},{-82,-216.5}}, color={0,0,127})); connect(valIsoEva.y_actual,borFie.yValIso_actual[2]) - annotation (Line(points={{55,-113},{40,-113},{40,-200},{-88,-200},{-88,-215},{-82,-215}},color={0,0,127})); + annotation (Line(points={{55,-113},{40,-113},{40,-200},{-88,-200},{-88, + -215.5},{-82,-215.5}}, color={0,0,127})); connect(borFie.PPum,totPPum.u[3]) annotation (Line(points={{-58,-216},{250,-216},{250,-62},{258,-62},{258,-60}},color={0,0,127})); connect(zerPPum.y,totPPum.u[3]) diff --git a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/HeatPumpHeatExchanger.mo b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/HeatPumpHeatExchanger.mo index 2683a019d29..f67c44d755a 100644 --- a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/HeatPumpHeatExchanger.mo +++ b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/HeatPumpHeatExchanger.mo @@ -1,753 +1,143 @@ within Buildings.Experimental.DHC.EnergyTransferStations.Combined; -model HeatPumpHeatExchanger "Model of a substation with heat pump and compressor-less cooling" - extends Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.PartialETS( - final typ=Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5, - final have_weaBus=false, - final have_chiWat=true, - final have_heaWat=true, - have_hotWat=false, - final have_eleHea=true, - final nFue=0, - final have_eleCoo=false, - final have_pum=true, - final have_fan=false, - nPorts_aHeaWat=1, - nPorts_aChiWat=1); - // SYSTEM GENERAL - parameter Boolean have_varFloCon = true - "Set to true for heat pumps with variable condenser flow" - annotation(Evaluate=true); - parameter Boolean have_varFloEva = true - "Set to true for heat pumps with variable evaporator flow" - annotation(Evaluate=true); - parameter Real ratFloMin( - final unit="1", - final min=0, - final max=1)=0.3 - "Minimum condenser or evaporator mass flow rate (ratio to nominal)" - annotation (Dialog(enable=have_varFloCon or have_varFloEva)); - parameter Modelica.Units.SI.Temperature TDisWatMin - "District water minimum temperature" annotation (Dialog(group="DHC system")); - parameter Modelica.Units.SI.Temperature TDisWatMax - "District water maximum temperature" annotation (Dialog(group="DHC system")); - parameter Modelica.Units.SI.TemperatureDifference dT_nominal(min=0) = 5 - "Water temperature drop/increase accross load and source-side HX (always positive)" - annotation (Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.Temperature TChiWatSup_nominal=291.15 - "Chilled water supply temperature" - annotation (Dialog(group="Nominal conditions")); - final parameter Modelica.Units.SI.Temperature TChiWatRet_nominal= - TChiWatSup_nominal + dT_nominal "Chilled water return temperature" - annotation (Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.Temperature THeaWatSup_nominal=313.15 - "Heating water supply temperature" - annotation (Dialog(group="Nominal condition")); - final parameter Modelica.Units.SI.Temperature THeaWatRet_nominal= - THeaWatSup_nominal - dT_nominal "Heating water return temperature" - annotation (Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.Temperature THotWatSup_nominal=336.15 - "Hot water supply temperature" - annotation (Dialog(group="Nominal condition", enable=have_hotWat)); - parameter Modelica.Units.SI.Temperature TColWat_nominal=288.15 - "Cold water temperature (for hot water production)" - annotation (Dialog(group="Nominal condition", enable=have_hotWat)); - parameter Modelica.Units.SI.Pressure dp_nominal(displayUnit="Pa") = 50000 - "Pressure difference at nominal flow rate (for each flow leg)" - annotation (Dialog(group="Nominal condition")); - final parameter Modelica.Units.SI.MassFlowRate mHeaWat_flow_nominal(min=0)= - abs(QHeaWat_flow_nominal/cpBui_default/(THeaWatSup_nominal - THeaWatRet_nominal)) - "Heating water mass flow rate" - annotation (Dialog(group="Nominal condition")); - final parameter Modelica.Units.SI.MassFlowRate mChiWat_flow_nominal(min=0)= - abs(QChiWat_flow_nominal/cpBui_default/(TChiWatSup_nominal - TChiWatRet_nominal)) - "Chilled water mass flow rate" - annotation (Dialog(group="Nominal conditions")); - final parameter Modelica.Units.SI.MassFlowRate mEvaHotWat_flow_nominal(min=0)= - QHotWat_flow_nominal*(COPHotWat_nominal - 1)/COPHotWat_nominal/cpSer_default/dT_nominal - "Evaporator water mass flow rate of heat pump for hot water production" - annotation (Dialog(group="Nominal condition", enable=have_hotWat)); - final parameter Modelica.Units.SI.MassFlowRate mSerWat_flow_nominal(min=0)= - max(proHeaWat.m2_flow_nominal + mEvaHotWat_flow_nominal, hexChi.m1_flow_nominal) - "Service water mass flow rate" - annotation (Dialog(group="Nominal condition")); - constant Modelica.Units.SI.SpecificHeatCapacity cpBui_default= - MediumBui.specificHeatCapacityCp(MediumBui.setState_pTX( - p=MediumBui.p_default, - T=MediumBui.T_default)) "Specific heat capacity of the fluid"; - constant Modelica.Units.SI.SpecificHeatCapacity cpSer_default= - MediumBui.specificHeatCapacityCp(MediumSer.setState_pTX( - p=MediumSer.p_default, - T=MediumSer.T_default)) "Specific heat capacity of the fluid"; - // Heat pump for heating water production - parameter Real COPHeaWat_nominal(final unit="1") - "COP of heat pump for heating water production" - annotation (Dialog(group="Nominal condition")); - // Heat pump for hot water production - parameter Real COPHotWat_nominal(final unit="1") - "COP of heat pump for hot water production" - annotation (Dialog(group="Nominal condition", enable=have_hotWat)); - // District HX - final parameter Modelica.Units.SI.MassFlowRate m1HexChi_flow_nominal(min=0)= - abs(QChiWat_flow_nominal/cpSer_default/dT_nominal) - "CHW HX primary mass flow rate" - annotation (Dialog(group="Nominal condition")); - final parameter Modelica.Units.SI.MassFlowRate m2HexChi_flow_nominal(min=0)= - abs(QChiWat_flow_nominal/cpSer_default/(THeaWatSup_nominal - - THeaWatRet_nominal)) "CHW HX secondary mass flow rate" - annotation (Dialog(group="Nominal condition")); - // Dynamics - parameter Modelica.Fluid.Types.Dynamics mixingVolumeEnergyDynamics= - Modelica.Fluid.Types.Dynamics.FixedInitial - "Formulation of energy balance for mixing volume at inlet and outlet" - annotation(Dialog(tab="Dynamics")); - // IO CONNECTORS - Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uCoo - "Cooling enable signal" - annotation (Placement(transformation(extent={{-340, - 100},{-300,140}}), iconTransformation(extent={{-380,20},{-300,100}}))); - Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uHea - "Heating enable signal" - annotation (Placement(transformation(extent={{-340, - 140},{-300,180}}), iconTransformation(extent={{-380,60},{-300,140}}))); - Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uSHW if have_hotWat - "SHW production enable signal" - annotation (Placement(transformation(extent= - {{-340,60},{-300,100}}), iconTransformation(extent={{-380,-20},{-300, - 60}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput THeaWatSupSet( - final unit="K", - displayUnit="degC") - "Heating water supply temperature set point" - annotation (Placement( - transformation( - extent={{-340,20},{-300,60}}), - iconTransformation( - extent={{-380,-60},{-300,20}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput THotWatSupSet( - final unit="K", - displayUnit="degC") if have_hotWat - "Service hot water supply temperature set point" - annotation (Placement( - transformation( - extent={{-20,-20},{20,20}}, - rotation=0, - origin={-320,-40}), - iconTransformation( - extent={{-380,-140},{-300,-60}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput TColWat( - final unit="K", - displayUnit="degC") if have_hotWat - "Cold water temperature" annotation ( - Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=0, - origin={-320,-80}), iconTransformation( - extent={{-40,-40},{40,40}}, - rotation=0, - origin={-340,-140}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput loaSHW( - final unit="W") if have_hotWat "Service hot water load" - annotation ( - Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=0, - origin={-320,-120}),iconTransformation( - extent={{-40,-40},{40,40}}, - rotation=0, - origin={-340,-180}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput TChiWatSupSet(final unit="K", - displayUnit="degC") - "Chilled water supply temperature set point" annotation (Placement( - transformation( - extent={{-340,-20},{-300,20}}), - iconTransformation( - extent={{-380,-100},{-300,-20}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealOutput mHea_flow(final unit="kg/s") - "District water mass flow rate used for heating service" - annotation ( Placement(transformation(extent={{300,-160},{340,-120}}), - iconTransformation(extent={{300,-160},{380,-80}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealOutput mCoo_flow(final unit="kg/s") - "District water mass flow rate used for cooling service" - annotation ( Placement(transformation(extent={{300,-200},{340,-160}}), - iconTransformation(extent={{300,-200},{380,-120}}))); - // COMPONENTS - Buildings.Fluid.Delays.DelayFirstOrder volMix_a( - redeclare final package Medium = MediumSer, - final nPorts=if have_hotWat then 4 else 3, - final m_flow_nominal=mSerWat_flow_nominal, - tau=600, - final energyDynamics=mixingVolumeEnergyDynamics) - "Mixing volume to break algebraic loops and to emulate the delay of the substation" - annotation (Placement(transformation(extent={{-270,-360},{-250,-380}}))); - Buildings.Fluid.Delays.DelayFirstOrder volMix_b( - redeclare final package Medium = MediumSer, - final nPorts=if have_hotWat then 4 else 3, - final m_flow_nominal=mSerWat_flow_nominal, - tau=600, - final energyDynamics=mixingVolumeEnergyDynamics) - "Mixing volume to break algebraic loops and to emulate the delay of the substation" - annotation (Placement(transformation(extent={{250,-360},{270,-380}}))); - Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.Pump_m_flow pum1HexChi( - redeclare final package Medium = MediumSer, - final m_flow_nominal=m1HexChi_flow_nominal, - final allowFlowReversal=allowFlowReversalSer, - dp_nominal=dp_nominal) - "Chilled water HX primary pump" - annotation (Placement(transformation(extent={{110,-350},{90,-330}}))); - Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU hexChi( - redeclare final package Medium1 = MediumSer, - redeclare final package Medium2 = MediumBui, - final m1_flow_nominal=m1HexChi_flow_nominal, - final m2_flow_nominal=m2HexChi_flow_nominal, - final dp1_nominal=dp_nominal/2, - final dp2_nominal=dp_nominal/2, - configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow, - final Q_flow_nominal=QChiWat_flow_nominal, - final T_a1_nominal=TDisWatMax, - final T_a2_nominal=TChiWatRet_nominal, - final allowFlowReversal1=allowFlowReversalSer, - final allowFlowReversal2=allowFlowReversalBui) - "Chilled water HX" - annotation (Placement(transformation(extent={{10,-324},{-10,-344}}))); - Buildings.Fluid.Delays.DelayFirstOrder volHeaWatRet( - redeclare final package Medium = MediumBui, - final m_flow_nominal=proHeaWat.m1_flow_nominal, - tau=60, - final energyDynamics=mixingVolumeEnergyDynamics, - T_start=THeaWatSup_nominal, - nPorts=3) "Mixing volume representing building HHW primary" annotation ( - Placement(transformation( - extent={{-10,10},{10,-10}}, - rotation=90, - origin={90,180}))); - Buildings.Fluid.Sensors.MassFlowRate senMasFloHeaWat( - redeclare final package Medium = MediumBui, - final allowFlowReversal=allowFlowReversalBui) - "Heating water mass flow rate" - annotation (Placement(transformation(extent={{-250,250},{-230,270}}))); - Buildings.Fluid.Delays.DelayFirstOrder volChiWat( - redeclare final package Medium = MediumBui, - final m_flow_nominal=m1HexChi_flow_nominal, - tau=60, - final energyDynamics=mixingVolumeEnergyDynamics, - T_start=TChiWatSup_nominal, - nPorts=3) "Mixing volume representing building CHW primary" - annotation (Placement(transformation(extent={{-110,-280},{-90,-260}}))); - Buildings.Fluid.Sensors.MassFlowRate senMasFloChiWat( - redeclare final package Medium = MediumBui, - final allowFlowReversal=allowFlowReversalBui) - "Chilled water mass flow rate" - annotation (Placement(transformation(extent={{-250,-130},{-230,-110}}))); - Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai2(final k= - m1HexChi_flow_nominal) - annotation (Placement(transformation(extent={{-108,-210},{-88,-190}}))); - Buildings.Experimental.DHC.EnergyTransferStations.Combined.Controls.PIDWithEnable conTChiWat( - k=0.05, - Ti=120, - yMax=1, - controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, - reverseActing=false, - yMin=0) "PI controller for district HX primary side" - annotation (Placement(transformation(extent={{-150,-210},{-130,-190}}))); - Buildings.Controls.OBC.CDL.Reals.MultiSum PPumHeaTot(final nin=2) - "Total pump power for heating applications" - annotation (Placement(transformation(extent={{190,410},{210,430}}))); - Buildings.Fluid.Sources.Boundary_pT bouHeaWat( - redeclare final package Medium = MediumBui, - nPorts=1) - "Pressure boundary condition representing the expansion vessel" - annotation (Placement(transformation(extent={{10,-10},{-10,10}}, - rotation=-90, - origin={60,150}))); - Buildings.Fluid.Sources.Boundary_pT bouChiWat( - redeclare final package Medium = MediumBui, - nPorts=1) - "Pressure boundary condition representing the expansion vessel" - annotation (Placement(transformation(extent={{-162,-290},{-142,-270}}))); - Buildings.Controls.OBC.CDL.Reals.MultiSum PPumCooTot(nin=1) - "Total pump power for space cooling" - annotation (Placement(transformation(extent={{190,370},{210,390}}))); - Buildings.Controls.OBC.CDL.Reals.MultiSum PPumTot(nin=2) - "Total pump power" - annotation (Placement(transformation(extent={{220,390},{240,410}}))); - Buildings.Fluid.Sensors.TemperatureTwoPort senTHeaWatSup( - redeclare final package Medium=MediumBui, - final allowFlowReversal=allowFlowReversalBui, - final m_flow_nominal=mHeaWat_flow_nominal) - "Heating water supply temperature" - annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={140,260}))); - Buildings.Fluid.Sensors.TemperatureTwoPort senTChiWatSup( - redeclare final package Medium=MediumBui, - final allowFlowReversal=allowFlowReversalBui, - final m_flow_nominal=mChiWat_flow_nominal) - "Chilled water supply temperature" - annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={140,-280}))); - Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.SwitchBox - swiFlo( - redeclare final package Medium = MediumSer, - final m_flow_nominal=mSerWat_flow_nominal) "Flow switch box" - annotation (Placement(transformation(extent={{-10,-390},{10,-370}}))); - Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.Junction bypHeaWatSup( - redeclare final package Medium = MediumBui, - final m_flow_nominal=proHeaWat.m1_flow_nominal - *{1,-1,-1}) "Bypass heating water (supply)" annotation (Placement( - transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={100,260}))); - Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.Junction bypHeaWatRet( - redeclare final package Medium = MediumBui, - final m_flow_nominal=proHeaWat.m1_flow_nominal*{1,-1,1}) - "Bypass heating water (return)" - annotation (Placement( - transformation( - extent={{10,10},{-10,-10}}, - rotation=0, - origin={100,240}))); - Buildings.Controls.OBC.CDL.Logical.TrueFalseHold enaHea( - trueHoldDuration=15*60) "Enable heating" - annotation (Placement(transformation(extent={{-140,150},{-120,170}}))); - Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.HeatPump proHeaWat( - redeclare final package Medium1 = MediumBui, - redeclare final package Medium2 = MediumSer, - final have_varFloCon=have_varFloCon, - final have_varFloEva=have_varFloEva, - final COP_nominal=COPHeaWat_nominal, - final TCon_nominal=THeaWatSup_nominal, - final TEva_nominal=TDisWatMin-dT_nominal, - final Q1_flow_nominal=QHeaWat_flow_nominal, - final allowFlowReversal1=allowFlowReversalBui, - final allowFlowReversal2=allowFlowReversalSer, - final dT1_nominal=dT_nominal, - final dT2_nominal=-dT_nominal, - final dp1_nominal=dp_nominal, - final dp2_nominal=dp_nominal) "Subsystem for heating water production" - annotation (Placement(transformation(extent={{-10,204},{10,224}}))); +model HeatPumpHeatExchanger + "Model of a substation with heat pump for heating, heat pump for domestic hot water, and compressor-less cooling" + extends + Buildings.Experimental.DHC.EnergyTransferStations.Combined.BaseClasses.PartialHeatPumpHeatExchanger( + volMix_a(nPorts=4), + volMix_b(nPorts=4)); Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.HeatPump proHotWat( redeclare final package Medium1 = MediumBui, redeclare final package Medium2 = MediumSer, - final have_pumCon=false, - final have_varFloEva=have_varFloEva, final COP_nominal=COPHotWat_nominal, final TCon_nominal=THotWatSup_nominal, - final TEva_nominal=TDisWatMin-dT_nominal, + final TEva_nominal=TDisWatMin - dT_nominal, + dT_nominal=dT_nominal, final Q1_flow_nominal=QHotWat_flow_nominal, final allowFlowReversal1=allowFlowReversalBui, final allowFlowReversal2=allowFlowReversalSer, - final dT1_nominal=THotWatSup_nominal - TColWat_nominal, - final dT2_nominal=-dT_nominal, final dp1_nominal=dp_nominal, final dp2_nominal=dp_nominal) if have_hotWat "Subsystem for hot water production" annotation (Placement(transformation(extent={{-10,24},{10,44}}))); - Fluid.Sources.Boundary_pT sinSHW( + Buildings.Fluid.Sources.Boundary_pT souColWat( redeclare final package Medium = MediumBui, - nPorts=1) if have_hotWat + use_T_in=true, + nPorts=1) if have_hotWat + "Source for cold water" + annotation (Placement(transformation(extent={{-48,-50},{-28,-30}}))); + Buildings.Fluid.Sources.Boundary_pT sinSHW(redeclare final package Medium = MediumBui, + nPorts=1) + if have_hotWat "Sink for service hot water" annotation (Placement( transformation( extent={{10,-10},{-10,10}}, rotation=180, origin={-60,60}))); - Fluid.Sources.MassFlowSource_T souColWat( - redeclare final package Medium = MediumBui, - use_m_flow_in=true, - use_T_in=true, - nPorts=1) if have_hotWat - "Source for cold water" - annotation (Placement(transformation(extent={{-48,-50},{-28,-30}}))); Buildings.Controls.OBC.CDL.Reals.Divide div1 if have_hotWat "Compute mass flow rate from load" - annotation (Placement(transformation(extent={{-100,-50},{-80,-30}}))); + annotation (Placement(transformation(extent={{-100,-60},{-80,-40}}))); Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai(final k= cpBui_default) if have_hotWat "Times Cp" - annotation (Placement(transformation(extent={{-120,-10},{-100,10}}))); - Buildings.Controls.OBC.CDL.Reals.MultiSum masFloHeaTot(final nin=2) - "Compute district water mass flow rate used for heating service" - annotation (Placement(transformation(extent={{270,-150},{290,-130}}))); - Modelica.Blocks.Sources.Constant zer(final k=0) if not have_hotWat - "Replacement variable" - annotation (Placement(transformation(extent={{140,350},{160,370}}))); - Fluid.Sensors.TemperatureTwoPort senTHeaWatRet( - redeclare final package Medium = MediumBui, - final allowFlowReversal=allowFlowReversalBui, - final m_flow_nominal=mHeaWat_flow_nominal) - "Heating water return temperature" annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={20,300}))); - Fluid.Sensors.TemperatureTwoPort senTChiWatRet( - redeclare final package Medium = MediumBui, - final allowFlowReversal=allowFlowReversalBui, - final m_flow_nominal=mChiWat_flow_nominal) - "Chilled water return temperature" annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=0, - origin={40,-120}))); + annotation (Placement(transformation(extent={{-120,-20},{-100,0}}))); Buildings.Controls.OBC.CDL.Reals.Subtract delT if have_hotWat "Compute DeltaT needed on condenser side" - annotation (Placement(transformation(extent={{-150,-10},{-130,10}}))); - Fluid.Sensors.MassFlowRate senMasFloHeaWatPri(redeclare final package Medium = - MediumBui, final allowFlowReversal=allowFlowReversalBui) - "Primary heating water mass flow rate" - annotation (Placement(transformation(extent={{30,270},{50,250}}))); - Buildings.Controls.OBC.CDL.Logical.TrueFalseHold enaSHW( - trueHoldDuration=15*60) if have_hotWat "Enable SHW production" - annotation (Placement(transformation(extent={{-140,70},{-120,90}}))); - Modelica.Blocks.Sources.Constant zer1(k=0) if not have_hotWat - "Replacement variable" - annotation (Placement(transformation(extent={{-40,-250},{-20,-230}}))); - Buildings.Controls.OBC.CDL.Reals.Add masFloHea - "Service water mass flow rate for heating applications" - annotation ( - Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=-90, - origin={0,-264}))); - Buildings.Controls.OBC.CDL.Reals.MultiSum PHeaTot(final nin=2) - "Total power used for heating and hot water production" - annotation (Placement(transformation(extent={{270,70},{290,90}}))); - Buildings.Controls.OBC.CDL.Reals.Add heaFloEvaSHW if have_hotWat and have_varFloEva - "Heat flow rate at evaporator" - annotation (Placement(transformation(extent={{-100,90},{-80,110}}))); - Buildings.Controls.OBC.CDL.Reals.Subtract dTHHW - "Heating hot water DeltaT" - annotation (Placement(transformation(extent={{0,310},{-20,330}}))); - Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter capFloHHW( - final k=cpBui_default) if have_varFloEva or have_varFloCon "Capacity flow rate" - annotation (Placement(transformation(extent={{-220,310},{-200,330}}))); - Buildings.Controls.OBC.CDL.Reals.Add heaFloEvaHHW if have_varFloEva - "Heat flow rate at evaporator" - annotation (Placement(transformation(extent={{-100,230},{-80,250}}))); - Buildings.Experimental.DHC.EnergyTransferStations.Combined.Controls.PrimaryVariableFlow conFloEvaSHW( - final Q_flow_nominal=-QHotWat_flow_nominal*(1 - 1/COPHotWat_nominal), - final dT_nominal=-dT_nominal, - final ratFloMin=ratFloMin, - final cp=cpSer_default) if have_hotWat and have_varFloEva - "Mass flow rate control" - annotation (Placement(transformation(extent={{-60,90},{-40,110}}))); - Buildings.Experimental.DHC.EnergyTransferStations.Combined.Controls.PrimaryVariableFlow conFloConHHW( - final Q_flow_nominal=QHeaWat_flow_nominal, - final dT_nominal=dT_nominal, - final ratFloMin=ratFloMin, - final cp=cpBui_default) if have_varFloCon - "Mass flow rate control" - annotation (Placement(transformation(extent={{-100,270},{-80,290}}))); - Buildings.Experimental.DHC.EnergyTransferStations.Combined.Controls.PrimaryVariableFlow conFloEvaHHW( - final Q_flow_nominal=-QHeaWat_flow_nominal*(1 - 1/COPHeaWat_nominal), - final dT_nominal=-dT_nominal, - final ratFloMin=ratFloMin, - final cp=cpSer_default) if have_varFloEva - "Mass flow rate control" - annotation (Placement(transformation(extent={{-60,230},{-40,250}}))); - Buildings.Controls.OBC.CDL.Reals.Max priOve if have_varFloCon - "Ensure primary overflow" - annotation (Placement(transformation(extent={{-60,270},{-40,290}}))); - Buildings.Controls.OBC.CDL.Reals.Multiply loaHHW - if have_varFloEva or have_varFloCon "Heating load" - annotation (Placement(transformation(extent={{-140,270},{-120,290}}))); - - Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter toSub(final k=-1) - if have_hotWat "Convert to subtraction" - annotation (Placement(transformation(extent={{-80,70},{-100,90}}))); - Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter toSub1(final k=-1) - if have_hotWat "Convert to subtraction" - annotation (Placement(transformation(extent={{-80,216},{-100,236}}))); + annotation (Placement(transformation(extent={{-150,-20},{-130,0}}))); equation - connect(TChiWatSupSet, conTChiWat.u_s) annotation (Line(points={{-320,0},{-200, - 0},{-200,-200},{-152,-200}}, color={0,0,127})); - connect(pum1HexChi.P, PPumCooTot.u[1]) annotation (Line(points={{89,-331},{84, - -331},{84,-322},{180,-322},{180,380},{188,380}}, color={0,0,127})); - connect(PPumHeaTot.y, PPumTot.u[1]) annotation (Line(points={{212,420},{216,420}, - {216,399.5},{218,399.5}}, - color={0,0,127})); - connect(PPumCooTot.y, PPumTot.u[2]) annotation (Line(points={{212,380},{216,380}, - {216,400.5},{218,400.5}}, - color={0,0,127})); - connect(pum1HexChi.port_b, hexChi.port_a1) annotation (Line(points={{90,-340}, - {10,-340}}, color={0,127,255})); - connect(pum1HexChi.m_flow_actual, mCoo_flow) annotation (Line(points={{89,-335}, - {82,-335},{82,-320},{276,-320},{276,-180},{320,-180}}, color={0,0,127})); - connect(volMix_a.ports[1], swiFlo.port_bSup) annotation (Line(points={{-260,-360}, - {-6,-360},{-6,-370}}, color={0,127,255})); - connect(swiFlo.port_aRet, volMix_b.ports[1]) annotation (Line(points={{6,-370}, - {6,-360},{260,-360}}, color={0,127,255})); - connect(volMix_b.ports[2], pum1HexChi.port_a) annotation (Line(points={{260,-360}, - {258,-360},{258,-340},{110,-340}}, color={0,127,255})); - connect(hexChi.port_b1, volMix_a.ports[2]) annotation (Line(points={{-10,-340}, - {-256,-340},{-256,-360},{-260,-360}}, color={0,127,255})); - connect(pum1HexChi.m_flow_actual, swiFlo.mRev_flow) annotation (Line(points={ - {89,-335},{80,-335},{80,-356},{-20,-356},{-20,-384},{-12,-384}}, - color={0,0,127})); - connect(gai2.y, pum1HexChi.m_flow_in) - annotation (Line(points={{-86,-200},{100,-200},{100,-328}}, - color={0,0,127})); - connect(PPumTot.y, PPum) annotation (Line(points={{242,400},{244,400},{244,-40}, - {320,-40}}, color={0,0,127})); - connect(ports_aHeaWat[1], senMasFloHeaWat.port_a) annotation (Line(points={{-300, - 260},{-250,260}}, color={0,127,255})); - connect(bypHeaWatSup.port_2, senTHeaWatSup.port_a) - annotation (Line(points={{110,260},{130,260}}, color={0,127,255})); - connect(senTHeaWatSup.port_b, ports_bHeaWat[1]) - annotation (Line(points={{150,260},{300,260}}, color={0,127,255})); - connect(bypHeaWatRet.port_2, volHeaWatRet.ports[1]) annotation (Line(points={{90,240}, - {80,240},{80,178.667}}, color={0,127,255})); - connect(bouHeaWat.ports[1], volHeaWatRet.ports[2]) annotation (Line(points={{60,160}, - {60,180},{80,180}}, color={0,127,255})); - connect(ports_aChiWat[1], senMasFloChiWat.port_a) annotation (Line(points={{-300, - 200},{-280,200},{-280,-120},{-250,-120}}, color={0,127,255})); - connect(senTChiWatSup.port_b, ports_bChiWat[1]) annotation (Line(points={{150, - -280},{200,-280},{200,200},{300,200}}, color={0,127,255})); - connect(bypHeaWatRet.port_3, bypHeaWatSup.port_3) - annotation (Line(points={{100,250},{100,250}}, color={0,127,255})); - connect(volHeaWatRet.ports[3], proHeaWat.port_a1) annotation (Line(points={{80, - 181.333},{80,180},{-20,180},{-20,208},{-10,208}}, color={0,127,255})); - connect(proHeaWat.port_b2, volMix_b.ports[3]) annotation (Line(points={{10, - 220},{262,220},{262,-360},{260,-360}}, color={0,127,255})); - connect(volMix_a.ports[3], proHeaWat.port_a2) annotation (Line(points={{-260, - -360},{-260,200},{14,200},{14,208},{10,208}}, color={0,127,255})); - connect(enaHea.y, proHeaWat.uEna) annotation (Line(points={{-118,160},{-48,160}, - {-48,223},{-12,223}}, color={255,0,255})); - connect(THeaWatSupSet, proHeaWat.TSupSet) annotation (Line(points={{-320,40},{ - -200,40},{-200,217},{-12,217}}, - color={0,0,127})); - connect(proHeaWat.PPum, PPumHeaTot.u[1]) annotation (Line(points={{12,214},{172, - 214},{172,419.5},{188,419.5}}, - color={0,0,127})); - connect(volMix_a.ports[4], proHotWat.port_a2) annotation (Line(points={{-260, - -360},{-258,-360},{-258,20},{14,20},{14,28},{10,28}}, color={0,127, - 255})); - connect(proHotWat.port_b2, volMix_b.ports[4]) - annotation (Line(points={{10,40},{260,40},{260,-360}}, color={0,127,255})); - connect(THotWatSupSet, proHotWat.TSupSet) annotation (Line(points={{-320,-40}, - {-160,-40},{-160,37},{-12,37}}, color={0,0,127})); + connect(souColWat.ports[1], proHotWat.port_a1) annotation (Line(points={{-28,-40}, + {-20,-40},{-20,40},{-9.8,40}},color={0,127,255})); connect(sinSHW.ports[1], proHotWat.port_b1) annotation (Line(points={{-50,60}, - {-20,60},{-20,40},{-10,40}}, color={0,127,255})); - connect(TColWat, souColWat.T_in) annotation (Line(points={{-320,-80},{-60,-80}, - {-60,-36},{-50,-36}}, color={0,0,127})); - connect(gai.y, div1.u2) annotation (Line(points={{-98,0},{-80,0},{-80,-20},{-120, - -20},{-120,-46},{-102,-46}}, color={0,0,127})); - connect(loaSHW, div1.u1) annotation (Line(points={{-320,-120},{-290,-120},{-290, - -34},{-102,-34}}, color={0,0,127})); - connect(masFloHeaTot.y, mHea_flow) - annotation (Line(points={{292,-140},{320,-140}}, color={0,0,127})); - connect(proHotWat.mEva_flow, masFloHeaTot.u[2]) annotation (Line(points={{12,31}, - {218,31},{218,-139.5},{268,-139.5}}, - color={0,0,127})); - connect(zer.y, masFloHeaTot.u[2]) annotation (Line(points={{161,360},{216,360}, - {216,-144},{268,-144},{268,-139.5}}, - color={0,0,127})); + {14,60},{14,40},{10,40}}, color={0,127,255})); + connect(THotWatSupSet, proHotWat.TSupSet) annotation (Line(points={{-320,-40}, + {-160,-40},{-160,36},{-86,36},{-86,37},{-12,37}}, + color={0,0,127})); + connect(enaSHW.y, proHotWat.uEna) annotation (Line(points={{-118,80},{-114,80}, + {-114,43},{-12,43}}, color={255,0,255})); connect(proHotWat.PPum, PPumHeaTot.u[2]) annotation (Line(points={{12,34},{176, 34},{176,420},{188,420},{188,420.5}}, color={0,0,127})); - connect(proHeaWat.mEva_flow, masFloHeaTot.u[1]) annotation (Line(points={{12,211}, - {220,211},{220,-140.5},{268,-140.5}}, - color={0,0,127})); - connect(zer.y, PPumHeaTot.u[2]) annotation (Line(points={{161,360},{174,360},{ - 174,418},{188,418},{188,420.5}}, - color={0,0,127})); - connect(senMasFloHeaWat.port_b, senTHeaWatRet.port_a) annotation (Line(points={{-230, - 260},{-220,260},{-220,300},{10,300}}, color={0,127,255})); - connect(senTHeaWatRet.port_b, bypHeaWatRet.port_1) annotation (Line(points={{30,300}, - {120,300},{120,240},{110,240}}, color={0,127,255})); - connect(senMasFloChiWat.port_b, senTChiWatRet.port_a) - annotation (Line(points={{-230,-120},{30,-120}}, color={0,127,255})); - connect(souColWat.ports[1], proHotWat.port_a1) annotation (Line(points={{-28,-40}, - {-20,-40},{-20,28},{-10,28}}, color={0,127,255})); - connect(delT.y, gai.u) - annotation (Line(points={{-128,0},{-122,0}}, color={0,0,127})); - connect(TColWat, delT.u2) annotation (Line(points={{-320,-80},{-156,-80},{-156, - -6},{-152,-6}}, color={0,0,127})); - connect(THotWatSupSet, delT.u1) annotation (Line(points={{-320,-40},{-160,-40}, - {-160,6},{-152,6}}, - color={0,0,127})); - connect(proHeaWat.port_b1, senMasFloHeaWatPri.port_a) annotation (Line(points= - {{-10,220},{-20,220},{-20,260},{30,260}}, color={0,127,255})); - connect(senMasFloHeaWatPri.port_b, bypHeaWatSup.port_1) - annotation (Line(points={{50,260},{90,260}}, color={0,127,255})); - connect(port_aSerAmb, swiFlo.port_aSup) annotation (Line(points={{-300,-200},{ - -272,-200},{-272,-344},{-280,-344},{-280,-400},{-6,-400},{-6,-390}}, - color={0,127,255})); - connect(swiFlo.port_bRet, port_bSerAmb) annotation (Line(points={{6,-390},{6, - -400},{280,-400},{280,-200},{300,-200}}, - color={0,127,255})); - connect(uHea, enaHea.u) annotation (Line(points={{-320,160},{-142,160}}, - color={255,0,255})); - connect(conTChiWat.y, gai2.u) - annotation (Line(points={{-128,-200},{-110,-200}}, color={0,0,127})); - connect(uCoo, conTChiWat.uEna) annotation (Line(points={{-320,120},{-180,120}, - {-180,-220},{-144,-220},{-144,-212}}, color={255,0,255})); - connect(uSHW, enaSHW.u) - annotation (Line(points={{-320,80},{-142,80}}, color={255,0,255})); - connect(enaSHW.y, proHotWat.uEna) annotation (Line(points={{-118,80},{-114,80}, - {-114,43},{-12,43}},color={255,0,255})); - connect(div1.y, souColWat.m_flow_in) annotation (Line(points={{-78,-40},{-68,-40}, - {-68,-32},{-50,-32}}, color={0,0,127})); - connect(senTChiWatRet.port_b, volChiWat.ports[1]) annotation (Line(points={{50,-120}, - {60,-120},{60,-280},{-101.333,-280}}, color={0,127,255})); - connect(volChiWat.ports[2], hexChi.port_a2) annotation (Line(points={{-100, - -280},{-120,-280},{-120,-320},{-20,-320},{-20,-328},{-10,-328}}, - color={0,127,255})); - connect(hexChi.port_b2, senTChiWatSup.port_a) annotation (Line(points={{10, - -328},{20,-328},{20,-320},{80,-320},{80,-280},{130,-280}}, color={0, - 127,255})); - connect(bouChiWat.ports[1], volChiWat.ports[3]) - annotation (Line(points={{-142,-280},{-98.6667,-280}}, color={0,127,255})); - connect(senTChiWatSup.T, conTChiWat.u_m) annotation (Line(points={{140,-269}, - {140,-220},{-140,-220},{-140,-212}}, color={0,0,127})); - connect(zer1.y, masFloHea.u2) annotation (Line(points={{-19,-240},{-8,-240},{ - -8,-252},{-6,-252}}, color={0,0,127})); + connect(proHotWat.mEva_flow, masFloHeaTot.u[2]) annotation (Line(points={{12,31}, + {218,31},{218,-139.5},{268,-139.5}}, + color={0,0,127})); connect(proHotWat.mEva_flow, masFloHea.u2) annotation (Line(points={{12,31},{18, 31},{18,-240},{-6,-240},{-6,-252}}, color={0,0,127})); - connect(proHeaWat.mEva_flow, masFloHea.u1) annotation (Line(points={{12,211},{ - 20,211},{20,-246},{6,-246},{6,-252}}, color={0,0,127})); - connect(masFloHea.y, swiFlo.mPos_flow) annotation (Line(points={{0,-276},{0, - -320},{-16,-320},{-16,-376},{-12,-376}}, color={0,0,127})); - connect(proHeaWat.PHea, PHeaTot.u[1]) annotation (Line(points={{12,217},{240,217}, - {240,79.5},{268,79.5}}, color={0,0,127})); - connect(proHotWat.PHea, PHeaTot.u[2]) annotation (Line(points={{12,37},{240,37}, - {240,80.5},{268,80.5}}, + connect(proHotWat.PHea, PHeaTot.u[2]) annotation (Line(points={{12,37},{240, + 37},{240,80},{256,80},{256,80.5},{268,80.5}}, color={0,0,127})); - connect(zer.y, PHeaTot.u[2]) annotation (Line(points={{161,360},{242,360},{242, - 78},{268,78},{268,80.5}}, color={0,0,127})); - connect(PHeaTot.y, PHea) - annotation (Line(points={{292,80},{320,80}}, color={0,0,127})); - connect(loaSHW, heaFloEvaSHW.u1) annotation (Line(points={{-320,-120},{-288, - -120},{-288,-36},{-164,-36},{-164,106},{-102,106}}, - color={0,0,127})); - connect(senTHeaWatRet.T, dTHHW.u2) - annotation (Line(points={{20,311},{20,314},{2,314}}, color={0,0,127})); - connect(senTHeaWatSup.T, dTHHW.u1) - annotation (Line(points={{140,271},{140,326},{2,326}}, color={0,0,127})); - connect(senMasFloHeaWat.m_flow, capFloHHW.u) annotation (Line(points={{-240,271}, - {-240,320},{-222,320}}, color={0,0,127})); - connect(conFloEvaSHW.m_flow, proHotWat.m2_flow) annotation (Line(points={{-38,100}, - {-16,100},{-16,31},{-12,31}}, color={0,0,127})); - connect(conFloEvaHHW.m_flow, proHeaWat.m2_flow) annotation (Line(points={{-38,240}, - {-28,240},{-28,211},{-12,211}}, color={0,0,127})); - connect(senMasFloHeaWat.m_flow, priOve.u1) annotation (Line(points={{-240,271}, - {-240,296},{-70,296},{-70,286},{-62,286}}, color={0,0,127})); - connect(conFloConHHW.m_flow, priOve.u2) annotation (Line(points={{-78,280},{-70, - 280},{-70,274},{-62,274}}, color={0,0,127})); - connect(priOve.y, proHeaWat.m1_flow) annotation (Line(points={{-38,280},{-24,280}, - {-24,214},{-12,214}}, color={0,0,127})); - connect(heaFloEvaSHW.y, conFloEvaSHW.loa) - annotation (Line(points={{-78,100},{-62,100}}, color={0,0,127})); - connect(heaFloEvaHHW.y, conFloEvaHHW.loa) - annotation (Line(points={{-78,240},{-62,240}}, color={0,0,127})); - connect(capFloHHW.y, loaHHW.u2) annotation (Line(points={{-198,320},{-180,320}, - {-180,274},{-142,274}}, color={0,0,127})); - connect(dTHHW.y, loaHHW.u1) annotation (Line(points={{-22,320},{-160,320},{ - -160,286},{-142,286}}, color={0,0,127})); - connect(loaHHW.y, conFloConHHW.loa) - annotation (Line(points={{-118,280},{-102,280}}, color={0,0,127})); - connect(loaHHW.y, heaFloEvaHHW.u1) annotation (Line(points={{-118,280},{-110, - 280},{-110,246},{-102,246}}, color={0,0,127})); - connect(proHotWat.PHea, toSub.u) annotation (Line(points={{12,37},{18,37},{18, - 80},{-78,80}}, color={0,0,127})); - connect(toSub.y, heaFloEvaSHW.u2) annotation (Line(points={{-102,80},{-108,80}, - {-108,94},{-102,94}}, color={0,0,127})); - connect(proHeaWat.PHea, toSub1.u) annotation (Line(points={{12,217},{20,217}, - {20,226},{-78,226}}, color={0,0,127})); - connect(toSub1.y, heaFloEvaHHW.u2) annotation (Line(points={{-102,226},{-110, - 226},{-110,234},{-102,234}}, color={0,0,127})); + connect(TColWat, souColWat.T_in) annotation (Line(points={{-320,-80},{-60,-80}, + {-60,-36},{-50,-36}}, color={0,0,127})); + connect(proHotWat.port_a2, volMix_a.ports[4]) annotation (Line(points={{10,28}, + {14,28},{14,20},{-260,20},{-260,-360}}, color={0,127,255})); + connect(proHotWat.port_b2, volMix_b.ports[4]) + annotation (Line(points={{-10,28},{-14,28},{-14,0},{260,0},{260,-360}}, + color={0,127,255})); + connect(gai.y,div1. u2) annotation (Line(points={{-98,-10},{-80,-10},{-80,-30}, + {-120,-30},{-120,-56},{-102,-56}}, color={0,0,127})); + connect(QReqHotWat_flow,div1. u1) annotation (Line(points={{-320,-120},{-290,-120},{ + -290,-44},{-102,-44}}, + color={0,0,127})); + connect(delT.y,gai. u) + annotation (Line(points={{-128,-10},{-122,-10}}, color={0,0,127})); + connect(TColWat,delT. u2) annotation (Line(points={{-320,-80},{-156,-80},{ + -156,-16},{-152,-16}}, + color={0,0,127})); + connect(THotWatSupSet,delT. u1) annotation (Line(points={{-320,-40},{-160,-40}, + {-160,-4},{-152,-4}}, + color={0,0,127})); + connect(div1.y, proHotWat.m1_flow) annotation (Line(points={{-78,-50},{-70, + -50},{-70,34},{-12,34}}, color={0,0,127})); annotation ( - defaultComponentName="ets", Documentation(info="

-This model represents an energy transfer station as described in Sommer (2020). +This model uses the base energy transfer station defined in + +Buildings.Experimental.DHC.EnergyTransferStations.Combined.BaseClasses.PartialHeatPumpHeatExchanger. +

+

Domestic Hot Water

+

+Domestic hot water is produced using a dedicated water-to-water heat pump +on-demand with no storage.

- -

Controls

-Heating (resp. cooling) is enabled based on the input signal uHea -(resp. uCoo) which is held for 15 minutes, meaning that, +Heating is enabled based on the input signal uSHW +which is held for 15 minutes, meaning that, when enabled, the mode remains active for at least 15 minutes and, when disabled, the mode cannot be enabled again for at least 15 minutes. -The heating and cooling enable signals should be computed externally based +The enable signal should be computed externally based on a schedule (to lock out the system during off-hours), ideally in conjunction -with the number of requests yielded by the terminal unit controllers, or any -other signal representative of the load. +with the number of requests or any other signal representative of the load.

When enabled,

-

Modeling considerations

-

-There is a control volume at each of the two fluid ports that serve as inlet and outlet -of the heating and cooling systems. These approximate the dynamics -of the substation, and they also generally avoid nonlinear systems -of equations if multiple substations are connected to each other. -

-

References

-

-Sommer T., Sulzer M., Wetter M., Sotnikov A., Mennel S., Stettler C. -The reservoir network: A new network topology for district heating -and cooling. -Energy, Volume 199, 15 May 2020, 117418. -

", revisions=" -"), - Diagram(coordinateSystem(extent={{-300,-420},{300,440}})), - Icon(coordinateSystem(preserveAspectRatio=false, extent={{-300,-300},{300,300}}))); +")); end HeatPumpHeatExchanger; diff --git a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/HeatPumpHeatExchangerDHWTank.mo b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/HeatPumpHeatExchangerDHWTank.mo new file mode 100644 index 00000000000..2f1282619f4 --- /dev/null +++ b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/HeatPumpHeatExchangerDHWTank.mo @@ -0,0 +1,164 @@ +within Buildings.Experimental.DHC.EnergyTransferStations.Combined; +model HeatPumpHeatExchangerDHWTank + "Model of a substation with heat pump for heating, heat pump with storage tank for domestic hot water, and compressor-less cooling" + extends + Buildings.Experimental.DHC.EnergyTransferStations.Combined.BaseClasses.PartialHeatPumpHeatExchanger( + volMix_b(nPorts=4), + volMix_a(nPorts=4)); + Buildings.Fluid.Sources.Boundary_pT souDCW( + redeclare final package Medium = MediumBui, + use_T_in=true, + nPorts=1) if have_hotWat "Source for domestic cold water" + annotation (Placement( + transformation( + extent={{10,-10},{-10,10}}, + rotation=180, + origin={-52,-56}))); + Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.HeatPumpDHWTank proHotWat( + redeclare final package Medium1 = MediumBui, + redeclare final package Medium2 = MediumSer, + final COP_nominal=COPHotWat_nominal, + TCon_nominal=THotWatSup_nominal, + TEva_nominal=TDisWatMin - dT_nominal, + QHotWat_flow_nominal=QHotWat_flow_nominal, + dT_nominal=dT_nominal, + final allowFlowReversal1=allowFlowReversalBui, + final allowFlowReversal2=allowFlowReversalSer, + dp1_nominal=6000, + dp2_nominal=6000, + datWatHea=datWatHea) if have_hotWat + "Subsystem for hot water production" + annotation (Placement(transformation(extent={{30,24},{50,44}}))); + parameter Buildings.Experimental.DHC.Loads.HotWater.Data.GenericDomesticHotWaterWithHeatExchanger + datWatHea "Performance data" + annotation (Placement(transformation(extent={{36,48},{48,60}}))); + Buildings.Experimental.DHC.Loads.HotWater.ThermostaticMixingValve theMixVal( + redeclare package Medium = MediumBui, + mMix_flow_nominal=QHotWat_flow_nominal/cpBui_default/(THotWatSup_nominal - TColWat_nominal)) + if have_hotWat + "Thermostatic mixing valve" + annotation (Placement(transformation(extent={{-20,50},{-40,72}}))); + Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.Junction dcwSpl( + redeclare final package Medium = MediumBui, final m_flow_nominal= + datWatHea.mDom_flow_nominal*{1,-1,-1}) + "Splitter for domestic cold water" + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=90, + origin={-10,0}))); + Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai( + k=1/QHotWat_flow_nominal) if have_hotWat + annotation (Placement(transformation(extent={{-80,50},{-60,70}}))); +equation + + connect(proHotWat.port_b2, volMix_b.ports[4]) + annotation (Line(points={{30,28},{28,28},{28,0},{260,0},{260,-360}}, + color={0,127,255})); + connect(proHotWat.PHea, PHeaTot.u[2]) annotation (Line(points={{52,37},{66,37}, + {66,38},{268,38},{268,80.5}}, + color={0,0,127})); + connect(proHotWat.PPum, PPumHeaTot.u[2]) annotation (Line(points={{52,34},{ + 176,34},{176,420.5},{188,420.5}}, + color={0,0,127})); + connect(proHotWat.mEva_flow, masFloHeaTot.u[2]) annotation (Line(points={{52,31}, + {68,31},{68,30},{256,30},{256,-139.5},{268,-139.5}}, + color={0,0,127})); + connect(proHotWat.mEva_flow, masFloHea.u2) annotation (Line(points={{52,31},{ + 58,31},{58,-242},{-6,-242},{-6,-252}}, + color={0,0,127})); + connect(proHotWat.port_a2, volMix_a.ports[4]) annotation (Line(points={{50,28}, + {54,28},{54,20},{-260,20},{-260,-360}}, color={0,127,255})); + connect(souDCW.ports[1], dcwSpl.port_1) annotation (Line(points={{-42,-56},{ + -10,-56},{-10,-10}},color={0,127,255})); + connect(dcwSpl.port_3, proHotWat.port_a1) + annotation (Line(points={{0,-6.66134e-16},{10,-6.66134e-16},{10,40},{30,40}}, + color={0,127,255})); + connect(dcwSpl.port_2, theMixVal.port_col) annotation (Line(points={{-10,10}, + {-10,52.2},{-20,52.2}}, color={0,127,255})); + connect(proHotWat.port_b1, theMixVal.port_hot) annotation (Line(points={{50,40}, + {60,40},{60,80},{0,80},{0,56.6},{-20,56.6}}, + color={0,127,255})); + connect(souDCW.T_in, TColWat) annotation (Line(points={{-64,-60},{-156,-60},{ + -156,-80},{-320,-80}}, color={0,0,127})); + connect(THotWatSupSet, theMixVal.TMixSet) annotation (Line(points={{-320,-40}, + {-32,-40},{-32,32},{-6,32},{-6,64},{-14,64},{-14,63.2},{-19,63.2}}, + color={0,0,127})); + connect(QReqHotWat_flow, gai.u) annotation (Line(points={{-320,-120},{-288,-120}, + {-288,60},{-82,60}}, + color={0,0,127})); + connect(gai.y, theMixVal.yMixSet) annotation (Line(points={{-58,60},{-48,60}, + {-48,78},{-6,78},{-6,70},{-12,70},{-12,69.8},{-19,69.8}}, + color={0,0,127})); + connect(enaSHW.y, proHotWat.uEna) annotation (Line(points={{-118,80},{-108,80}, + {-108,43},{28,43}}, color={255,0,255})); + annotation ( + Documentation(info=" +

+This model uses the base energy transfer station defined in + +Buildings.Experimental.DHC.EnergyTransferStations.Combined.BaseClasses.PartialHeatPumpHeatExchanger. +

+

Domestic Hot Water

+

+Domestic hot water is produced using a dedicated water-to-water heat pump +with storage tank. +

+

+Heating is enabled based on the input signal uSHW +which is held for 15 minutes, meaning that, +when enabled, the mode remains active for at least 15 minutes and, +when disabled, the mode cannot be enabled again for at least 15 minutes. +The enable signal should be computed externally based +on a schedule (to lock out the system during off-hours), ideally in conjunction +with the number of requests or any other signal representative of the load. +

+

+When enabled, +

+ +", + revisions=" + +"), Icon(graphics={ + Rectangle( + extent={{-70,36},{-68,26}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={175,175,175}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-1.5,5.5},{1.5,-5.5}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={175,175,175}, + fillPattern=FillPattern.Solid, + origin={-13.5,26.5}, + rotation=90)})); +end HeatPumpHeatExchangerDHWTank; diff --git a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/Subsystems/BaseClasses/PartialHeatPump.mo b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/Subsystems/BaseClasses/PartialHeatPump.mo new file mode 100644 index 00000000000..55f377393c7 --- /dev/null +++ b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/Subsystems/BaseClasses/PartialHeatPump.mo @@ -0,0 +1,323 @@ +within Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.BaseClasses; +model PartialHeatPump + "Partial base class for subsystems containing a heat pump" + replaceable package Medium1=Modelica.Media.Interfaces.PartialMedium + "Medium model on condenser side" + annotation (choices(choice(redeclare package Medium=Buildings.Media.Water "Water"), + choice(redeclare package Medium = + Buildings.Media.Antifreeze.PropyleneGlycolWater (property_T=293.15,X_a=0.40) + "Propylene glycol water, 40% mass fraction"))); + replaceable package Medium2=Modelica.Media.Interfaces.PartialMedium + "Medium model on evaporator side" + annotation (choices(choice(redeclare package Medium=Buildings.Media.Water "Water"), + choice(redeclare package Medium = + Buildings.Media.Antifreeze.PropyleneGlycolWater (property_T=293.15,X_a=0.40) + "Propylene glycol water, 40% mass fraction"))); + parameter Real COP_nominal(final unit="1") + "Heat pump COP" + annotation (Dialog(group="Nominal condition")); + parameter Modelica.Units.SI.Temperature TCon_nominal + "Condenser outlet temperature used to compute COP_nominal" + annotation (Dialog(group="Nominal condition")); + parameter Modelica.Units.SI.Temperature TEva_nominal + "Evaporator outlet temperature used to compute COP_nominal" + annotation (Dialog(group="Nominal condition")); + + parameter Modelica.Units.SI.TemperatureDifference dT_nominal(min=0) = 5 + "Water temperature drop/increase accross load and source-side HX (always positive)" + annotation (Dialog(group="Nominal condition")); + final parameter Modelica.Units.SI.MassFlowRate mCon_flow_nominal = heaPum.m1_flow_nominal + "Condenser mass flow rate"; + final parameter Modelica.Units.SI.MassFlowRate mEva_flow_nominal = heaPum.m2_flow_nominal + "Evaporator mass flow rate"; + + parameter Boolean allowFlowReversal1=false + "Set to true to allow flow reversal on condenser side" + annotation (Dialog(tab="Assumptions"), Evaluate=true); + parameter Boolean allowFlowReversal2=false + "Set to true to allow flow reversal on evaporator side" + annotation (Dialog(tab="Assumptions"), Evaluate=true); + parameter Modelica.Units.SI.Pressure dp1_nominal(displayUnit="Pa") + "Pressure difference over condenser" + annotation (Dialog(group="Nominal condition")); + parameter Modelica.Units.SI.Pressure dp2_nominal(displayUnit="Pa") + "Pressure difference over evaporator" + annotation (Dialog(group="Nominal condition")); + // IO CONNECTORS + Modelica.Fluid.Interfaces.FluidPort_a port_a2( + redeclare final package Medium = Medium2, + m_flow(min=if allowFlowReversal2 then -Modelica.Constants.inf else 0), + h_outflow(start=Medium2.h_default, nominal=Medium2.h_default)) + "Fluid port for entering evaporator water" annotation (Placement( + transformation(extent={{190,-70},{210,-50}}), iconTransformation(extent= + {{90,-70},{110,-50}}))); + Modelica.Fluid.Interfaces.FluidPort_b port_b2( + redeclare final package Medium = Medium2, + m_flow(max=if allowFlowReversal2 then +Modelica.Constants.inf else 0), + h_outflow(start=Medium2.h_default, nominal=Medium2.h_default)) + "Fluid port for leaving evaporator water" annotation (Placement( + transformation(extent={{-210,-70},{-190,-50}}), + iconTransformation(extent={{-110, + -70},{-90,-50}}))); + Modelica.Fluid.Interfaces.FluidPort_a port_a1( + redeclare final package Medium = Medium1, + m_flow(min=if allowFlowReversal1 then -Modelica.Constants.inf else 0), + h_outflow(start=Medium1.h_default, nominal=Medium1.h_default)) + "Fluid port for cold domestic water" annotation (Placement( + transformation(extent={{-210,50},{-190,70}}), iconTransformation( + extent={{-110,50},{-90,70}}))); + Modelica.Fluid.Interfaces.FluidPort_b port_b1( + redeclare final package Medium = Medium1, + m_flow(max=if allowFlowReversal1 then +Modelica.Constants.inf else 0), + h_outflow(start=Medium1.h_default, nominal=Medium1.h_default)) + "Fluid port for heated domestic hot water" + annotation (Placement( + transformation(extent={{190,50},{210,70}}), iconTransformation(extent={{90,50}, + {110,70}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealOutput PHea( + final unit="W") "Heat pump power" + annotation (Placement(transformation(extent={{200,20},{240,60}}), + iconTransformation(extent={{100,10},{140,50}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealOutput PPum( + final unit="W") "Pump power" + annotation (Placement(transformation(extent={{200,-20},{240,20}}), + iconTransformation(extent={{100,-20},{140,20}}))); + Buildings.Controls.OBC.CDL.Interfaces.RealOutput mEva_flow(final unit="kg/s") + "Evaporator water mass flow rate" + annotation (Placement(transformation( + extent={{200,-60},{240,-20}}), iconTransformation(extent={{100,-50},{ + 140,-10}}))); + // COMPONENTS + Buildings.Fluid.HeatPumps.Carnot_TCon heaPum( + redeclare package Medium1 = Medium1, + redeclare package Medium2 = Medium2, + allowFlowReversal1=false, + allowFlowReversal2=false, + dTEva_nominal=-dT_nominal, + dTCon_nominal=dT_nominal, + use_eta_Carnot_nominal=false, + COP_nominal=COP_nominal, + TCon_nominal=TCon_nominal, + TEva_nominal=TEva_nominal, + final dp1_nominal=dp1_nominal, + final dp2_nominal=dp2_nominal) + "Domestic hot water heat pump" + annotation (Placement(transformation(extent={{-80,-82},{-60,-62}}))); + Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.Pump_m_flow + pumCon( + energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, + redeclare package Medium = Medium2, + m_flow_nominal=mCon_flow_nominal, + riseTime=10, + dp_nominal=dp1_nominal) + "Pump for heat pump condenser" + annotation (Placement(transformation(extent={{10,-10},{-10,10}}, + rotation=270, + origin={-26,0}))); + + Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.Pump_m_flow pumEva( + redeclare final package Medium = Medium2, + final allowFlowReversal=allowFlowReversal2, + m_flow_nominal=mEva_flow_nominal, + dp_nominal=dp2_nominal + 6000) + "Heat pump evaporator water pump" + annotation (Placement(transformation(extent={{26,-70},{6,-50}}))); + + Modelica.Blocks.Math.Add addPPum "Electricity use for pumps" + annotation (Placement(transformation(extent={{140,70},{160,90}}))); + Buildings.Controls.OBC.CDL.Conversions.BooleanToReal floEva(realTrue= + mEva_flow_nominal) "Evaporator mass flow rate" + annotation (Placement(transformation(extent={{-80,110},{-60,130}}))); + Fluid.Actuators.Valves.ThreeWayEqualPercentageLinear valHeaPumEva( + redeclare package Medium = Medium2, + energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, + m_flow_nominal=mEva_flow_nominal, + dpValve_nominal=6000) "Valve at heat pump evaporator" + annotation (Placement(transformation(extent={{80,-70},{60,-50}}))); + Fluid.Sensors.TemperatureTwoPort senTEvaRet( + redeclare final package Medium = Medium2, + final allowFlowReversal=allowFlowReversal1, + final m_flow_nominal=mEva_flow_nominal, + tau=0) + "Evaporator return temperature sensor" annotation (Placement(transformation( + extent={{10,-10},{-10,10}}, + rotation=0, + origin={-110,-80}))); + Fluid.Sensors.TemperatureTwoPort senTDisSup( + redeclare final package Medium = Medium2, + final allowFlowReversal=allowFlowReversal1, + final m_flow_nominal=mEva_flow_nominal, + tau=0) + "District supply temperature sensor" annotation (Placement(transformation( + extent={{10,-10},{-10,10}}, + rotation=0, + origin={110,-60}))); + Buildings.Controls.OBC.CDL.Reals.Subtract dT_supRet + "Temperature difference over heat pump connection" + annotation (Placement(transformation(extent={{80,-20},{100,0}}))); + Buildings.Controls.OBC.CDL.Reals.Sources.Constant dTSet(k=dT_nominal) + "Set point for temperature difference over heat pump" + annotation (Placement(transformation(extent={{80,10},{100,30}}))); + Buildings.Controls.OBC.CDL.Reals.PIDWithReset conPI( + k=0.1, + Ti=120, xi_start=0.2, + reverseActing=false) + "Controller to ensure dT_nominal over heat pump connection" + annotation (Placement(transformation(extent={{120,10},{140,30}}))); + Fluid.Sensors.MassFlowRate senMasFlo(redeclare package Medium = Medium2) + "Mass flow rate drawn from ETS" + annotation (Placement(transformation(extent={{160,-70},{140,-50}}))); + Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uEna(start=false) + "Enable signal" + annotation ( + Placement(transformation(extent={{-240,100},{-200,140}}), + iconTransformation(extent={{-140,70},{-100,110}}))); +equation + connect(heaPum.port_b1,pumCon. port_a) annotation (Line(points={{-60,-66},{ + -26,-66},{-26,-10}}, + color={0,127,255})); + connect(heaPum.P, PHea) annotation (Line(points={{-59,-72},{-20,-72},{-20,-20}, + {22,-20},{22,40},{220,40}}, + color={0,0,127})); + connect(floEva.y, pumEva.m_flow_in) + annotation (Line(points={{-58,120},{16,120},{16,-48}},color={0,0,127})); + connect(valHeaPumEva.port_2, pumEva.port_a) + annotation (Line(points={{60,-60},{26,-60}}, color={0,127,255})); + connect(senTDisSup.T, dT_supRet.u1) annotation (Line(points={{110,-49},{110, + -32},{34,-32},{34,-4},{78,-4}}, + color={0,0,127})); + connect(valHeaPumEva.port_1, senTDisSup.port_b) + annotation (Line(points={{80,-60},{100,-60}}, color={0,127,255})); + connect(pumEva.port_b, heaPum.port_a2) annotation (Line(points={{6,-60},{0, + -60},{0,-78},{-60,-78}}, + color={0,127,255})); + connect(conPI.u_s, dTSet.y) + annotation (Line(points={{118,20},{102,20}}, + color={0,0,127})); + connect(dT_supRet.y, conPI.u_m) + annotation (Line(points={{102,-10},{130,-10},{130,8}}, color={0,0,127})); + connect(conPI.y, valHeaPumEva.y) annotation (Line(points={{142,20},{148,20},{ + 148,-26},{70,-26},{70,-48}}, + color={0,0,127})); + connect(senTDisSup.port_a, senMasFlo.port_b) + annotation (Line(points={{120,-60},{140,-60}}, color={0,127,255})); + connect(senMasFlo.port_a, port_a2) + annotation (Line(points={{160,-60},{200,-60}}, color={0,127,255})); + connect(senMasFlo.m_flow, mEva_flow) + annotation (Line(points={{150,-49},{150,-40},{220,-40}}, color={0,0,127})); + connect(pumCon.P, addPPum.u1) annotation (Line(points={{-17,11},{-16,11},{-16, + 86},{138,86}}, color={0,0,127})); + connect(addPPum.u2, pumEva.P) annotation (Line(points={{138,74},{0,74},{0,-51}, + {5,-51}}, color={0,0,127})); + connect(heaPum.port_b2, senTEvaRet.port_a) annotation (Line(points={{-80,-78}, + {-90,-78},{-90,-80},{-100,-80}}, color={0,127,255})); + connect(senTEvaRet.port_b, port_b2) annotation (Line(points={{-120,-80},{-160, + -80},{-160,-60},{-200,-60}}, color={0,127,255})); + connect(senTEvaRet.port_b, valHeaPumEva.port_3) annotation (Line(points={{-120, + -80},{-160,-80},{-160,-120},{70,-120},{70,-70}}, color={0,127, + 255})); + connect(senTEvaRet.T, dT_supRet.u2) annotation (Line(points={{-110,-69},{-110, + -16},{78,-16}}, color={0,0,127})); + annotation ( + defaultComponentName="heaPum", + Icon(coordinateSystem(preserveAspectRatio=false), graphics={ + Rectangle( + extent={{-100,-100},{100,100}}, + lineColor={0,0,127}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-32,40},{40,-38}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={95,95,95}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-18,-20},{28,-28}}, + lineColor={0,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-12,2},{-16,-6},{-8,-6},{-12,2}}, + lineColor={0,0,0}, + smooth=Smooth.None, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), + Polygon( + points={{-12,2},{-16,10},{-8,10},{-12,2}}, + lineColor={0,0,0}, + smooth=Smooth.None, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{18,20},{22,-20}}, + lineColor={0,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), + Ellipse( + extent={{12,8},{30,-10}}, + lineColor={0,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), + Polygon( + points={{20,8},{12,-4},{30,-4},{20,8}}, + lineColor={0,0,0}, + smooth=Smooth.None, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-14,-6},{-10,-20}}, + lineColor={0,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-14,20},{-10,10}}, + lineColor={0,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-20,28},{26,20}}, + lineColor={0,0,0}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid)}), Diagram( + coordinateSystem(preserveAspectRatio=false, extent={{-200,-140},{200,140}})), + Documentation(info=" +

+This model represents a water-to-water heat pump, as described in + +Buildings.Fluid.HeatPumps.Carnot_TCon, the condenser pump, and the +evaporator side hydronics and control. + +

Evaporator Controls

+

+The system is enabled when the input control signal uEna switches to +true. +When enabled, +

+ +", revisions=" + +")); +end PartialHeatPump; diff --git a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/Subsystems/BaseClasses/package.mo b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/Subsystems/BaseClasses/package.mo new file mode 100644 index 00000000000..d0cac58d742 --- /dev/null +++ b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/Subsystems/BaseClasses/package.mo @@ -0,0 +1,13 @@ +within Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems; +package BaseClasses "Contains base classes for Subsystems" + extends Modelica.Icons.BasesPackage; + annotation ( + Documentation( + info=" +

+This package contains base class models for the classes in + +Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems. +

+")); +end BaseClasses; diff --git a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/Subsystems/BaseClasses/package.order b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/Subsystems/BaseClasses/package.order new file mode 100644 index 00000000000..b322085164b --- /dev/null +++ b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/Subsystems/BaseClasses/package.order @@ -0,0 +1 @@ +PartialHeatPump diff --git a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/Subsystems/HeatPump.mo b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/Subsystems/HeatPump.mo index d1b307c7872..277377ea6ee 100644 --- a/Buildings/Experimental/DHC/EnergyTransferStations/Combined/Subsystems/HeatPump.mo +++ b/Buildings/Experimental/DHC/EnergyTransferStations/Combined/Subsystems/HeatPump.mo @@ -1,67 +1,14 @@ within Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems; model HeatPump "Base subsystem with water-to-water heat pump" - replaceable package Medium1=Modelica.Media.Interfaces.PartialMedium - "Medium model on condenser side" - annotation (choices(choice(redeclare package Medium=Buildings.Media.Water "Water"), - choice(redeclare package Medium = - Buildings.Media.Antifreeze.PropyleneGlycolWater (property_T=293.15,X_a=0.40) - "Propylene glycol water, 40% mass fraction"))); - replaceable package Medium2=Modelica.Media.Interfaces.PartialMedium - "Medium model on evaporator side" - annotation (choices(choice(redeclare package Medium=Buildings.Media.Water "Water"), - choice(redeclare package Medium = - Buildings.Media.Antifreeze.PropyleneGlycolWater (property_T=293.15,X_a=0.40) - "Propylene glycol water, 40% mass fraction"))); - parameter Boolean have_pumCon = true - "Set to true to include a condenser pump (false for external pump)" - annotation(Evaluate=true); + extends + Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.BaseClasses.PartialHeatPump( + heaPum(QCon_flow_nominal=Q1_flow_nominal)); parameter Boolean have_varFloCon = true "Set to true for a variable condenser flow" - annotation(Evaluate=true, Dialog(enable=have_pumCon)); - parameter Boolean have_varFloEva = true - "Set to true for a variable evaporator flow" annotation(Evaluate=true); - parameter Real COP_nominal(final unit="1") - "Heat pump COP" - annotation (Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.Temperature TCon_nominal - "Condenser outlet temperature used to compute COP_nominal" - annotation (Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.Temperature TEva_nominal - "Evaporator outlet temperature used to compute COP_nominal" - annotation (Dialog(group="Nominal condition")); parameter Modelica.Units.SI.HeatFlowRate Q1_flow_nominal(min=0) "Heating heat flow rate" annotation (Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.TemperatureDifference dT1_nominal(final min=0)= - 5 "Temperature difference condenser outlet-inlet" - annotation (Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.TemperatureDifference dT2_nominal(final max=0)= - -5 "Temperature difference evaporator outlet-inlet" - annotation (Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.Pressure dp1_nominal(displayUnit="Pa") - "Pressure difference over condenser" - annotation (Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.Pressure dp2_nominal(displayUnit="Pa") - "Pressure difference over evaporator" - annotation (Dialog(group="Nominal condition")); - parameter Boolean allowFlowReversal1=false - "Set to true to allow flow reversal on condenser side" - annotation (Dialog(tab="Assumptions"), Evaluate=true); - parameter Boolean allowFlowReversal2=false - "Set to true to allow flow reversal on evaporator side" - annotation (Dialog(tab="Assumptions"), Evaluate=true); - final parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal(min=0)= - heaPum.m1_flow_nominal "Mass flow rate on condenser side" - annotation (Dialog(group="Nominal condition")); - final parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal(min=0)= - heaPum.m2_flow_nominal "Mass flow rate on evaporator side" - annotation (Dialog(group="Nominal condition")); // IO CONNECTORS - Buildings.Controls.OBC.CDL.Interfaces.BooleanInput uEna(start=false) - "Enable signal" - annotation ( - Placement(transformation(extent={{-240,100},{-200,140}}), - iconTransformation(extent={{-140,70},{-100,110}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput TSupSet( final unit="K", displayUnit="degC") @@ -69,272 +16,139 @@ model HeatPump "Base subsystem with water-to-water heat pump" annotation (Placement(transformation(extent={{-240,-40},{-200,0}}), iconTransformation(extent={{-140,10},{-100,50}}))); Buildings.Controls.OBC.CDL.Interfaces.RealInput m1_flow( - final unit="kg/s") if have_varFloCon and have_pumCon + final unit="kg/s") if have_varFloCon "Condenser mass flow rate" annotation (Placement(transformation(extent={{-240,60},{-200,100}}), iconTransformation(extent={{-140,-20},{-100,20}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealInput m2_flow( - final unit="kg/s") if have_varFloEva - "Evaporator mass flow rate" - annotation (Placement(transformation(extent={{-240,20},{-200,60}}), - iconTransformation(extent={{-140,-50},{-100,-10}}))); - Modelica.Fluid.Interfaces.FluidPort_a port_a2( - redeclare final package Medium = Medium2, - m_flow(min=if allowFlowReversal2 then -Modelica.Constants.inf else 0), - h_outflow(start=Medium2.h_default, nominal=Medium2.h_default)) - "Fluid port for entering evaporator water" annotation (Placement( - transformation(extent={{190,-70},{210,-50}}), iconTransformation(extent= - {{90,-70},{110,-50}}))); - Modelica.Fluid.Interfaces.FluidPort_b port_b2( - redeclare final package Medium = Medium2, - m_flow(max=if allowFlowReversal2 then +Modelica.Constants.inf else 0), - h_outflow(start=Medium2.h_default, nominal=Medium2.h_default)) - "Fluid port for leaving evaporator water" annotation (Placement( - transformation(extent={{190,50},{210,70}}), iconTransformation(extent={{ - 90,50},{110,70}}))); - Modelica.Fluid.Interfaces.FluidPort_a port_a1( - redeclare final package Medium = Medium1, - m_flow(min=if allowFlowReversal1 then -Modelica.Constants.inf else 0), - h_outflow(start=Medium1.h_default, nominal=Medium1.h_default)) - "Fluid port for entering condenser water" annotation (Placement( - transformation(extent={{-210,-70},{-190,-50}}), iconTransformation( - extent={{-110,-70},{-90,-50}}))); - Modelica.Fluid.Interfaces.FluidPort_b port_b1( - redeclare final package Medium = Medium1, - m_flow(max=if allowFlowReversal1 then +Modelica.Constants.inf else 0), - h_outflow(start=Medium1.h_default, nominal=Medium1.h_default)) - "Fluid port for leaving condenser water" annotation (Placement( - transformation(extent={{-210,50},{-190,70}}), iconTransformation(extent= - {{-110,50},{-90,70}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealOutput PHea( - final unit="W") "Heat pump power" - annotation (Placement(transformation(extent={{200,20},{240,60}}), - iconTransformation(extent={{100,10},{140,50}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealOutput PPum( - final unit="W") "Pump power" - annotation (Placement(transformation(extent={{200,-20},{240,20}}), - iconTransformation(extent={{100,-20},{140,20}}))); - Buildings.Controls.OBC.CDL.Interfaces.RealOutput mEva_flow(final unit="kg/s") - "Evaporator water mass flow rate" - annotation (Placement(transformation( - extent={{200,-60},{240,-20}}), iconTransformation(extent={{100,-50},{ - 140,-10}}))); // COMPONENTS - Fluid.HeatPumps.Carnot_TCon heaPum( - redeclare final package Medium1 = Medium1, - redeclare final package Medium2 = Medium2, - final dTEva_nominal=dT2_nominal, - final dTCon_nominal=dT1_nominal, - final TCon_nominal=TCon_nominal, - final TEva_nominal=TEva_nominal, - final allowFlowReversal1=allowFlowReversal1, - final allowFlowReversal2=allowFlowReversal2, - final use_eta_Carnot_nominal=false, - final COP_nominal=COP_nominal, - final QCon_flow_nominal=Q1_flow_nominal, - final dp1_nominal=dp1_nominal, - final dp2_nominal=dp2_nominal) - "Heat pump (index 1 for condenser side)" - annotation (Placement(transformation(extent={{0,-24},{20,-4}}))); - Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.Pump_m_flow pumEva( - redeclare final package Medium = Medium2, - final m_flow_nominal=m2_flow_nominal, - final allowFlowReversal=allowFlowReversal2, - dp_nominal=dp2_nominal) - "Heat pump evaporator water pump" - annotation (Placement(transformation(extent={{70,-70},{50,-50}}))); - Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.Pump_m_flow pumCon( - redeclare final package Medium = Medium1, - final m_flow_nominal=m1_flow_nominal, - final allowFlowReversal=allowFlowReversal1, - dp_nominal=dp1_nominal) if have_pumCon - "Heat pump condenser water pump" - annotation (Placement(transformation(extent={{-70,-60},{-50,-40}}))); Buildings.Controls.OBC.CDL.Reals.Sources.Constant floConNom( - final k=m1_flow_nominal) if not have_varFloCon + final k=mCon_flow_nominal) if not have_varFloCon "Nominal flow rate" - annotation (Placement(transformation(extent={{-100,80},{-120,100}}))); + annotation (Placement(transformation(extent={{-178,80},{-158,100}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea annotation (Placement(transformation(extent={{-180,110},{-160,130}}))); - Buildings.Controls.OBC.CDL.Reals.Sources.Constant floEvaNom( - final k=m2_flow_nominal) if not have_varFloEva - "Nominal flow rate" - annotation (Placement(transformation(extent={{0,80},{-20,100}}))); - Fluid.Sensors.TemperatureTwoPort senTConLvg( - redeclare final package Medium = Medium1, - final allowFlowReversal=allowFlowReversal1, - final m_flow_nominal=m1_flow_nominal) - "Condenser water leaving temperature" - annotation (Placement( - transformation( - extent={{10,-10},{-10,10}}, - rotation=-90, - origin={40,20}))); - Fluid.Sensors.TemperatureTwoPort senTConEnt( - redeclare final package Medium = Medium1, - final allowFlowReversal=allowFlowReversal1, - final m_flow_nominal=m1_flow_nominal) - "Condenser water entering temperature" - annotation (Placement(transformation( - extent={{-10,-10},{10,10}}, - rotation=90, - origin={-40,-20}))); - Buildings.Controls.OBC.CDL.Reals.Switch enaHeaPum( - u2(start=false)) - "Enable heat pump by switching to actual set point" - annotation (Placement(transformation(extent={{-140,10},{-120,30}}))); - Buildings.Controls.OBC.CDL.Reals.Add add2 "Adder" - annotation (Placement(transformation(extent={{140,-10},{160,10}}))); - Modelica.Blocks.Sources.Constant zer(final k=0) if not have_pumCon - "Replacement variable" - annotation (Placement(transformation(extent={{80,-110},{100,-90}}))); - Buildings.Controls.OBC.CDL.Reals.GreaterThreshold staPum[2]( - y(each start=false), - t=1e-2 .* {m1_flow_nominal,m2_flow_nominal}, - h=0.5e-2 .* {m1_flow_nominal, m2_flow_nominal}) - "Pump return status" - annotation (Placement(transformation(extent={{-80,-110},{-100,-90}}))); - Buildings.Controls.OBC.CDL.Logical.And ena - "Enable heat pump if pump return status on" - annotation (Placement(transformation(extent={{-120,-110},{-140,-90}}))); - Modelica.Blocks.Sources.Constant one(final k=1) if not have_pumCon - "Replacement variable" - annotation (Placement(transformation(extent={{60,-110},{40,-90}}))); - Buildings.Controls.OBC.CDL.Reals.Multiply floCon if have_pumCon - "Zero flow rate if not enabled" - annotation (Placement(transformation(extent={{-120,110},{-100,130}}))); - Buildings.Controls.OBC.CDL.Reals.Multiply floEva + Buildings.Controls.OBC.CDL.Reals.Multiply floCon "Zero flow rate if not enabled" - annotation (Placement(transformation(extent={{-20,110},{0,130}}))); -protected - Fluid.FixedResistances.LosslessPipe pip( - redeclare package Medium = Medium1, - m_flow_nominal=m1_flow_nominal) if not have_pumCon - "Dummy connection used if model is configured to have no pump" - annotation (Placement(transformation(extent={{-70,-90},{-50,-70}}))); + annotation (Placement(transformation(extent={{-120,90},{-100,110}}))); equation - connect(pumEva.port_b,heaPum. port_a2) - annotation (Line(points={{50,-60},{40,-60},{40,-20},{20,-20}}, - color={0,127,255})); - connect(heaPum.port_b1,senTConLvg. port_a) annotation (Line(points={{20,-8},{40, - -8},{40,10}}, color={0,127,255})); - connect(senTConEnt.port_b,heaPum. port_a1) annotation (Line(points={{-40,-10}, - {-40,-8},{0,-8}}, color={0,127,255})); - connect(senTConEnt.T,enaHeaPum. u3) annotation (Line(points={{-51,-20},{-150,-20}, - {-150,12},{-142,12}}, color={0,0,127})); - connect(enaHeaPum.y,heaPum. TSet) annotation (Line(points={{-118,20},{-10,20}, - {-10,-5},{-2,-5}}, color={0,0,127})); - connect(uEna, booToRea.u) - annotation (Line(points={{-220,120},{-182,120}}, color={255,0,255})); - connect(TSupSet, enaHeaPum.u1) annotation (Line(points={{-220,-20},{-180,-20}, - {-180,28},{-142,28}}, color={0,0,127})); - connect(heaPum.port_b2, port_b2) annotation (Line(points={{0,-20},{-20,-20},{-20, - 40},{180,40},{180,60},{200,60}}, color={0,127,255})); - connect(senTConLvg.port_b, port_b1) - annotation (Line(points={{40,30},{40,60},{-200,60}}, color={0,127,255})); - connect(pumEva.m_flow_actual, mEva_flow) annotation (Line(points={{49,-55},{ - 44,-55},{44,-40},{220,-40}}, color={0,0,127})); - connect(port_a2, pumEva.port_a) - annotation (Line(points={{200,-60},{70,-60}}, color={0,127,255})); - connect(port_a1, pumCon.port_a) - annotation (Line(points={{-200,-60},{-140,-60},{-140,-50},{-70,-50}}, - color={0,127,255})); - connect(add2.y, PPum) - annotation (Line(points={{162,0},{220,0}}, color={0,0,127})); - connect(heaPum.P, PHea) annotation (Line(points={{21,-14},{190,-14},{190,40},{ - 220,40}}, color={0,0,127})); - connect(pumCon.P, add2.u2) annotation (Line(points={{-49,-41},{0,-41},{0,-80}, - {120,-80},{120,-6},{138,-6}}, color={0,0,127})); - connect(pumEva.P, add2.u1) annotation (Line(points={{49,-51},{46,-51},{46,6},{ - 138,6}}, color={0,0,127})); - connect(pumCon.port_b, senTConEnt.port_a) annotation (Line(points={{-50,-50}, - {-40,-50},{-40,-30}},color={0,127,255})); - connect(zer.y, add2.u2) annotation (Line(points={{101,-100},{120,-100},{120,-6}, - {138,-6}}, color={0,0,127})); - connect(pumCon.m_flow_actual, staPum[1].u) annotation (Line(points={{-49,-45}, - {-38,-45},{-38,-100},{-78,-100}}, color={0,0,127})); - connect(pumEva.m_flow_actual, staPum[2].u) annotation (Line(points={{49,-55},{ - 20,-55},{20,-100},{-78,-100}}, color={0,0,127})); - connect(staPum[1].y, ena.u1) - annotation (Line(points={{-102,-100},{-118,-100}}, color={255,0,255})); - connect(staPum[2].y, ena.u2) annotation (Line(points={{-102,-100},{-110,-100}, - {-110,-108},{-118,-108}}, color={255,0,255})); - connect(ena.y, enaHeaPum.u2) annotation (Line(points={{-142,-100},{-160,-100}, - {-160,20},{-142,20}}, color={255,0,255})); - connect(one.y, staPum[1].u) - annotation (Line(points={{39,-100},{-78,-100}}, color={0,0,127})); connect(booToRea.y, floCon.u1) annotation (Line(points={{-158,120},{-140,120}, - {-140,126},{-122,126}}, color={0,0,127})); - connect(m1_flow, floCon.u2) annotation (Line(points={{-220,80},{-140,80},{-140, - 114},{-122,114}}, color={0,0,127})); - connect(booToRea.y, floEva.u1) annotation (Line(points={{-158,120},{-140,120}, - {-140,134},{-40,134},{-40,126},{-22,126}}, color={0,0,127})); - connect(floConNom.y, floCon.u2) annotation (Line(points={{-122,90},{-130,90},{ - -130,114},{-122,114}}, color={0,0,127})); - connect(m2_flow, floEva.u2) annotation (Line(points={{-220,40},{-40,40},{-40,114}, - {-22,114}}, color={0,0,127})); - connect(floEvaNom.y, floEva.u2) annotation (Line(points={{-22,90},{-30,90},{-30, - 114},{-22,114}}, color={0,0,127})); - connect(floEva.y, pumEva.m_flow_in) - annotation (Line(points={{2,120},{60,120},{60,-48}}, color={0,0,127})); + {-140,106},{-122,106}}, color={0,0,127})); + connect(m1_flow, floCon.u2) annotation (Line(points={{-220,80},{-188,80},{ + -188,70},{-140,70},{-140,94},{-122,94}}, + color={0,0,127})); + connect(floConNom.y, floCon.u2) annotation (Line(points={{-156,90},{-140,90}, + {-140,94},{-122,94}}, color={0,0,127})); + connect(port_a1, heaPum.port_a1) annotation (Line(points={{-200,60},{-100,60}, + {-100,-66},{-80,-66}}, color={0,127,255})); + connect(pumCon.port_b, port_b1) annotation (Line(points={{-26,10},{-26,60},{ + 200,60}}, color={0,127,255})); + connect(TSupSet, heaPum.TSet) annotation (Line(points={{-220,-20},{-90,-20},{ + -90,-63},{-82,-63}}, color={0,0,127})); connect(floCon.y, pumCon.m_flow_in) - annotation (Line(points={{-98,120},{-60,120},{-60,-38}}, color={0,0,127})); - connect(port_a1, pip.port_a) annotation (Line(points={{-200,-60},{-140,-60},{ - -140,-80},{-70,-80}}, color={0,127,255})); - connect(pip.port_b, senTConEnt.port_a) annotation (Line(points={{-50,-80},{ - -40,-80},{-40,-30}}, color={0,127,255})); + annotation (Line(points={{-98,100},{12,100},{12,0},{-14,0},{-14, + -2.22045e-15}}, color={0,0,127})); + connect(conPI.trigger, floEva.u) annotation (Line(points={{124,8},{124,-2},{ + 110,-2},{110,136},{-90,136},{-90,120},{-82,120}}, + color={255,0,255})); + connect(addPPum.y, PPum) annotation (Line(points={{161,80},{174,80},{174,0},{ + 220,0}}, color={0,0,127})); + connect(uEna, booToRea.u) + annotation (Line(points={{-220,120},{-182,120}}, color={255,0,255})); + connect(uEna, floEva.u) annotation (Line(points={{-220,120},{-190,120},{-190, + 136},{-90,136},{-90,120},{-82,120}}, color={255,0,255})); annotation ( defaultComponentName="heaPum", Icon(coordinateSystem(preserveAspectRatio=false), graphics={ Rectangle( - extent={{-60,60},{60,-60}}, - lineColor={27,0,55}, - fillColor={170,213,255}, + extent={{92,-58},{18,-60}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={238,46,47}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{18,-38},{20,-60}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={238,46,47}, fillPattern=FillPattern.Solid), Rectangle( - extent={{-100,-100},{100,100}}, - lineColor={0,0,127}, - fillColor={255,255,255}, + extent={{-14,-38},{-12,-60}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={28,108,200}, fillPattern=FillPattern.Solid), Rectangle( - extent={{-58,62},{62,-58}}, - lineColor={27,0,55}, - fillColor={170,213,255}, + extent={{-1,42},{1,-42}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={28,108,200}, + fillPattern=FillPattern.Solid, + origin={-54,-59}, + rotation=90), + Rectangle( + extent={{-14,62},{-12,40}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={0,140,72}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{18,62},{20,40}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={102,44,145}, + fillPattern=FillPattern.Solid), + Rectangle( + extent={{-1,42},{1,-42}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={0,140,72}, + fillPattern=FillPattern.Solid, + origin={-54,61}, + rotation=90), + Rectangle( + extent={{92,62},{18,60}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={102,44,145}, fillPattern=FillPattern.Solid)}), Diagram( coordinateSystem(preserveAspectRatio=false, extent={{-200,-140},{200,140}})), Documentation(info="

This model represents a water-to-water heat pump, an evaporator water pump, -and an optional condenser water pump if have_pumCon is set to -true. +and a condenser water pump. The heat pump model is described in Buildings.Fluid.HeatPumps.Carnot_TCon. -By default variable speed pumps are considered. -Constant speed pumps may also be represented by setting have_varFloEva -and have_varFloCon to false. +By default, a variable speed condenser pump is considered, but a constant speed +pump may also be represented by setting have_varFloCon to false. +The evaporator hydronics and control are described in + +Buildings.Experimental.DHC.EnergyTransferStations.Combined.Subsystems.BaseClasses.PartialHeatPump.

-

Controls

+

Condenser Controls

The system is enabled when the input control signal uEna switches to true. -When enabled, +When enabled, on the condenser side,

", revisions="