From 8b606120ac200d07e01619b8bf2689bfdd3984f2 Mon Sep 17 00:00:00 2001 From: "fabian.wuellhorst" Date: Tue, 29 Mar 2022 08:23:17 +0200 Subject: [PATCH 001/621] Add all relevant models to IBPSA to use the heat pump and chiller model --- IBPSA/Fluid/BaseClasses/PartialInnerCycle.mo | 196 ++++ ...rtialReversibleVapourCompressionMachine.mo | 867 ++++++++++++++++++ IBPSA/Fluid/BaseClasses/package.order | 2 + IBPSA/Fluid/Chillers/BaseClasses/Carnot.mo | 20 +- .../BaseClasses/InnerCycle_Chiller.mo | 194 ++++ .../Chillers/BaseClasses/PartialCarnot_y.mo | 4 +- .../Fluid/Chillers/BaseClasses/package.order | 1 + IBPSA/Fluid/Chillers/BlackBoxData.mo | 736 +++++++++++++++ IBPSA/Fluid/Chillers/Chiller.mo | 239 +++++ IBPSA/Fluid/Chillers/Examples/Chiller.mo | 242 +++++ IBPSA/Fluid/Chillers/Examples/package.order | 1 + IBPSA/Fluid/Chillers/package.order | 2 + .../EvaporatorCondenserWithCapacity.mo | 280 ++++++ IBPSA/Fluid/HeatExchangers/package.order | 1 + .../BaseClasses/InnerCycle_HeatPump.mo | 201 ++++ .../Fluid/HeatPumps/BaseClasses/package.order | 1 + .../EN14511/AlphaInnotec_LW80MA.mo | 27 + .../BlackBoxData/EN14511/Dimplex_LA11AS.mo | 24 + .../BlackBoxData/EN14511/Ochsner_GMLW_19.mo | 23 + .../EN14511/Ochsner_GMLW_19plus.mo | 25 + .../EN14511/Ochsner_GMSW_15plus.mo | 25 + .../EN14511/StiebelEltron_WPL18.mo | 26 + .../BlackBoxData/EN14511/Vaillant_VWL_101.mo | 26 + .../BlackBoxData/EN14511/Vitocal200AWO201.mo | 31 + .../HeatPumps/BlackBoxData/EN14511/package.mo | 10 + .../BlackBoxData/EN14511/package.order | 8 + .../BlackBoxData/EN255/AlphaInnotec_SW170I.mo | 22 + .../BlackBoxData/EN255/NibeFighter1140_15.mo | 24 + .../BlackBoxData/EN255/Vitocal350AWI114.mo | 32 + .../BlackBoxData/EN255/Vitocal350BWH110.mo | 28 + .../BlackBoxData/EN255/Vitocal350BWH113.mo | 28 + .../HeatPumps/BlackBoxData/EN255/package.mo | 8 + .../BlackBoxData/EN255/package.order | 5 + .../Characteristics/CarnotFunction.mo | 40 + .../Functions/Characteristics/ConstantCoP.mo | 29 + .../Characteristics/ConstantQualityGrade.mo | 33 + .../Characteristics/PartialBaseFct.mo | 26 + .../Characteristics/PolynomalApproach.mo | 52 ++ .../Functions/Characteristics/package.mo | 7 + .../Functions/Characteristics/package.order | 5 + .../Functions/DefrostCorrection/NoModel.mo | 21 + .../DefrostCorrection/PartialBaseFct.mo | 19 + .../DefrostCorrection/WetterAfjei1996.mo | 37 + .../Functions/DefrostCorrection/package.mo | 7 + .../Functions/DefrostCorrection/package.order | 3 + .../IcingFactor/BasicIcingApproach.mo | 23 + .../Functions/IcingFactor/PartialBaseFct.mo | 29 + .../Functions/IcingFactor/WetterAfjei1996.mo | 37 + .../Functions/IcingFactor/package.mo | 18 + .../Functions/IcingFactor/package.order | 3 + .../BlackBoxData/Functions/package.mo | 4 + .../BlackBoxData/Functions/package.order | 3 + .../HeatPumpBaseDataDefinition.mo | 66 ++ .../BaseClasses/PartialPerformanceData.mo | 92 ++ .../PerformanceData/BaseClasses/package.mo | 31 + .../PerformanceData/BaseClasses/package.order | 1 + .../PerformanceData/IcingBlock.mo | 66 ++ .../PerformanceData/LookUpTable2D.mo | 199 ++++ .../PerformanceData/LookUpTableND.mo | 298 ++++++ .../PerformanceData/PolynomalApproach.mo | 176 ++++ .../BlackBoxData/PerformanceData/VCLibMap.mo | 224 +++++ .../BlackBoxData/PerformanceData/package.mo | 21 + .../PerformanceData/package.order | 6 + IBPSA/Fluid/HeatPumps/BlackBoxData/package.mo | 4 + .../HeatPumps/BlackBoxData/package.order | 5 + IBPSA/Fluid/HeatPumps/Controls/AntiFreeze.mo | 84 ++ .../HeatPumps/Controls/AntiLegionella.mo | 171 ++++ IBPSA/Fluid/HeatPumps/Controls/BaseClasses.mo | 474 ++++++++++ .../BaseClasses/InverterControlledHP.mo | 43 + .../HeatPumps/Controls/BaseClasses/OnOffHP.mo | 29 + .../BaseClasses/PartialHPController.mo | 27 + .../Controls/BaseClasses/PartialTSetToNSet.mo | 104 +++ .../Controls/BaseClasses/package.order | 4 + .../HeatPumps/Controls/DefrostControl.mo | 260 ++++++ .../HeatPumps/Controls/Examples/package.mo | 4 + .../HeatPumps/Controls/Examples/package.order | 0 .../BaseClasses/PartialModularController.mo | 243 +++++ .../ModularHeatPumps/BaseClasses/package.mo | 17 + .../BaseClasses/package.order | 1 + .../ModularCompressorController.mo | 97 ++ .../ModularExpansionValveController.mo | 110 +++ .../Controls/ModularHeatPumps/package.order | 3 + .../Fluid/HeatPumps/Controls/OnOffControl.mo | 232 +++++ .../HeatPumps/Controls/OperationalEnvelope.mo | 82 ++ .../Fluid/HeatPumps/Controls/SafetyControl.mo | 251 +++++ .../Controls/SafetyControls/AntiFreeze.mo | 84 ++ .../SafetyControls/BaseClasses/BoundaryMap.mo | 100 ++ .../BaseClasses/BoundaryMapIcon.mo | 73 ++ .../BaseClasses/PartialSafetyControl.mo | 122 +++ .../BaseClasses/RunPerHouBoundary.mo | 82 ++ .../SafetyControls/BaseClasses/TimeControl.mo | 65 ++ .../SafetyControls/BaseClasses/package.mo | 35 + .../SafetyControls/BaseClasses/package.order | 5 + .../Controls/SafetyControls/DefrostControl.mo | 260 ++++++ .../Controls/SafetyControls/OnOffControl.mo | 229 +++++ .../SafetyControls/OperationalEnvelope.mo | 84 ++ .../Controls/SafetyControls/SafetyControl.mo | 250 +++++ .../Controls/SafetyControls/package.order | 6 + IBPSA/Fluid/HeatPumps/Controls/package.order | 8 + IBPSA/Fluid/HeatPumps/Examples/HeatPump.mo | 279 ++++++ IBPSA/Fluid/HeatPumps/Examples/package.order | 1 + IBPSA/Fluid/HeatPumps/HeatPump.mo | 250 +++++ .../HeatPumps/SafetyControls/AntiFreeze.mo | 84 ++ .../SafetyControls/AntiLegionella.mo | 171 ++++ .../HeatPumps/SafetyControls/BaseClasses.mo | 474 ++++++++++ .../SafetyControls/DefrostControl.mo | 245 +++++ .../SafetyControls/Examples/package.mo | 4 + .../SafetyControls/Examples/package.order | 0 .../HeatPumps/SafetyControls/OnOffControl.mo | 232 +++++ .../SafetyControls/OperationalEnvelope.mo | 82 ++ .../HeatPumps/SafetyControls/SafetyControl.mo | 251 +++++ .../Fluid/HeatPumps/SafetyControls/package.mo | 31 + .../HeatPumps/SafetyControls/package.order | 8 + IBPSA/Fluid/HeatPumps/package.order | 3 + .../VapourCompressionMachineControlBus.mo | 5 + IBPSA/Fluid/Interfaces/package.order | 1 + .../Fluid/Chillers/Examples/Chiller.mos | 3 + .../Fluid/HeatPumps/Examples/HeatPump.mos | 3 + IBPSA/Utilities/Logical/DynamicHysteresis.mo | 130 +++ IBPSA/Utilities/Logical/package.mo | 3 + IBPSA/Utilities/Logical/package.order | 1 + IBPSA/Utilities/Time/DaytimeSwitch.mo | 80 ++ IBPSA/Utilities/Time/package.order | 1 + IBPSA/Utilities/package.order | 1 + 124 files changed, 10914 insertions(+), 12 deletions(-) create mode 100644 IBPSA/Fluid/BaseClasses/PartialInnerCycle.mo create mode 100644 IBPSA/Fluid/BaseClasses/PartialReversibleVapourCompressionMachine.mo create mode 100644 IBPSA/Fluid/Chillers/BaseClasses/InnerCycle_Chiller.mo create mode 100644 IBPSA/Fluid/Chillers/BlackBoxData.mo create mode 100644 IBPSA/Fluid/Chillers/Chiller.mo create mode 100644 IBPSA/Fluid/Chillers/Examples/Chiller.mo create mode 100644 IBPSA/Fluid/HeatExchangers/EvaporatorCondenserWithCapacity.mo create mode 100644 IBPSA/Fluid/HeatPumps/BaseClasses/InnerCycle_HeatPump.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/AlphaInnotec_LW80MA.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Dimplex_LA11AS.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Ochsner_GMLW_19.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Ochsner_GMLW_19plus.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Ochsner_GMSW_15plus.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/StiebelEltron_WPL18.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Vaillant_VWL_101.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Vitocal200AWO201.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/package.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/package.order create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/AlphaInnotec_SW170I.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/NibeFighter1140_15.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/Vitocal350AWI114.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/Vitocal350BWH110.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/Vitocal350BWH113.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/package.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/package.order create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/CarnotFunction.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/ConstantCoP.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/ConstantQualityGrade.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/PartialBaseFct.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/PolynomalApproach.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/package.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/package.order create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/NoModel.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/PartialBaseFct.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/WetterAfjei1996.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/package.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/package.order create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/BasicIcingApproach.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/PartialBaseFct.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/WetterAfjei1996.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/package.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/package.order create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/package.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/package.order create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/HeatPumpBaseDataDefinition.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/BaseClasses/PartialPerformanceData.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/BaseClasses/package.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/BaseClasses/package.order create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/IcingBlock.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTable2D.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTableND.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/PolynomalApproach.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/VCLibMap.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/package.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/package.order create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/package.mo create mode 100644 IBPSA/Fluid/HeatPumps/BlackBoxData/package.order create mode 100644 IBPSA/Fluid/HeatPumps/Controls/AntiFreeze.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/AntiLegionella.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/BaseClasses.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/BaseClasses/InverterControlledHP.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/BaseClasses/OnOffHP.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/BaseClasses/PartialHPController.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/BaseClasses/PartialTSetToNSet.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/BaseClasses/package.order create mode 100644 IBPSA/Fluid/HeatPumps/Controls/DefrostControl.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/Examples/package.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/Examples/package.order create mode 100644 IBPSA/Fluid/HeatPumps/Controls/ModularHeatPumps/BaseClasses/PartialModularController.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/ModularHeatPumps/BaseClasses/package.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/ModularHeatPumps/BaseClasses/package.order create mode 100644 IBPSA/Fluid/HeatPumps/Controls/ModularHeatPumps/ModularCompressorController.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/ModularHeatPumps/ModularExpansionValveController.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/ModularHeatPumps/package.order create mode 100644 IBPSA/Fluid/HeatPumps/Controls/OnOffControl.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/OperationalEnvelope.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/SafetyControl.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/SafetyControls/AntiFreeze.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/SafetyControls/BaseClasses/BoundaryMap.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/SafetyControls/BaseClasses/BoundaryMapIcon.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/SafetyControls/BaseClasses/PartialSafetyControl.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/SafetyControls/BaseClasses/RunPerHouBoundary.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/SafetyControls/BaseClasses/TimeControl.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/SafetyControls/BaseClasses/package.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/SafetyControls/BaseClasses/package.order create mode 100644 IBPSA/Fluid/HeatPumps/Controls/SafetyControls/DefrostControl.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/SafetyControls/OnOffControl.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/SafetyControls/OperationalEnvelope.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/SafetyControls/SafetyControl.mo create mode 100644 IBPSA/Fluid/HeatPumps/Controls/SafetyControls/package.order create mode 100644 IBPSA/Fluid/HeatPumps/Controls/package.order create mode 100644 IBPSA/Fluid/HeatPumps/Examples/HeatPump.mo create mode 100644 IBPSA/Fluid/HeatPumps/HeatPump.mo create mode 100644 IBPSA/Fluid/HeatPumps/SafetyControls/AntiFreeze.mo create mode 100644 IBPSA/Fluid/HeatPumps/SafetyControls/AntiLegionella.mo create mode 100644 IBPSA/Fluid/HeatPumps/SafetyControls/BaseClasses.mo create mode 100644 IBPSA/Fluid/HeatPumps/SafetyControls/DefrostControl.mo create mode 100644 IBPSA/Fluid/HeatPumps/SafetyControls/Examples/package.mo create mode 100644 IBPSA/Fluid/HeatPumps/SafetyControls/Examples/package.order create mode 100644 IBPSA/Fluid/HeatPumps/SafetyControls/OnOffControl.mo create mode 100644 IBPSA/Fluid/HeatPumps/SafetyControls/OperationalEnvelope.mo create mode 100644 IBPSA/Fluid/HeatPumps/SafetyControls/SafetyControl.mo create mode 100644 IBPSA/Fluid/HeatPumps/SafetyControls/package.mo create mode 100644 IBPSA/Fluid/HeatPumps/SafetyControls/package.order create mode 100644 IBPSA/Fluid/Interfaces/VapourCompressionMachineControlBus.mo create mode 100644 IBPSA/Resources/Scripts/Dymola/Fluid/Chillers/Examples/Chiller.mos create mode 100644 IBPSA/Resources/Scripts/Dymola/Fluid/HeatPumps/Examples/HeatPump.mos create mode 100644 IBPSA/Utilities/Logical/DynamicHysteresis.mo create mode 100644 IBPSA/Utilities/Logical/package.mo create mode 100644 IBPSA/Utilities/Logical/package.order create mode 100644 IBPSA/Utilities/Time/DaytimeSwitch.mo diff --git a/IBPSA/Fluid/BaseClasses/PartialInnerCycle.mo b/IBPSA/Fluid/BaseClasses/PartialInnerCycle.mo new file mode 100644 index 0000000000..bbd4cf238a --- /dev/null +++ b/IBPSA/Fluid/BaseClasses/PartialInnerCycle.mo @@ -0,0 +1,196 @@ +within IBPSA.Fluid.BaseClasses; +partial model PartialInnerCycle + "Blackbox model of refrigerant cycle of a vapour compression machine (heat pump or chiller)" + + parameter Boolean use_rev=true "True if the vapour compression machine is reversible"; + parameter Real scalingFactor=1 "Scaling factor of vapour compression machine"; + + IBPSA.Fluid.Interfaces.VapourCompressionMachineControlBus sigBus annotation ( + Placement(transformation(extent={{-18,86},{18,118}}), iconTransformation( + extent={{-16,88},{18,118}}))); + Modelica.Blocks.Sources.Constant constZero(final k=0) if not use_rev + "If no heating is used, the switches may still be connected" + annotation (Placement(transformation(extent={{-80,-78},{-60,-58}}))); + Modelica.Blocks.Interfaces.RealOutput QCon(unit="W", displayUnit="kW") "Heat Flow to condenser" + annotation (Placement(transformation(extent={{100,-10},{120,10}}))); + Modelica.Blocks.Interfaces.RealOutput QEva(unit="W", displayUnit="kW") "Heat flow from evaporator" + annotation (Placement(transformation(extent={{-100,-10},{-120,10}}))); + Modelica.Blocks.Logical.Switch switchQEva( + u1(unit="W", displayUnit="kW"), + u3(unit="W", displayUnit="kW"), + y(unit="W", displayUnit="kW")) + "If mode is false, Condenser becomes Evaporator and vice versa" + annotation (Placement(transformation(extent={{-70,-24},{-90,-4}}))); + Modelica.Blocks.Logical.Switch switchQCon( + y(unit="W", displayUnit="kW"), + u1(unit="W", displayUnit="kW"), + u3(unit="W", displayUnit="kW")) + "If mode is false, Condenser becomes Evaporator and vice versa" + annotation (Placement(transformation(extent={{70,-22},{90,-2}}))); + Modelica.Blocks.Interfaces.RealOutput Pel(unit="W", displayUnit="kW") + "Electrical power consumed by compressor" annotation (Placement( + transformation( + extent={{-10.5,-10.5},{10.5,10.5}}, + rotation=-90, + origin={0.5,-110.5}))); + + Modelica.Blocks.Logical.Switch switchPel( + u1(unit="W", displayUnit="kW"), + u3(unit="W", displayUnit="kW"), + y(unit="W", displayUnit="kW")) + "Whether to use cooling or heating power consumption" annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={0,-80}))); + + Modelica.Blocks.Routing.BooleanPassThrough modeSetAssert + "Pass through to enable assertion for non-reversible device"; +equation + assert(use_rev or (use_rev == false and modeSetAssert.y == true), + "Can't turn to reversible operation mode on irreversible vapour compression machine", + level=AssertionLevel.error); + + connect(switchQEva.y, QEva) annotation (Line(points={{-91,-14},{-94,-14},{-94, + 0},{-110,0}}, color={0,0,127})); + connect(switchPel.y, Pel) annotation (Line(points={{-2.22045e-15,-91},{ + -2.22045e-15,-110.5},{0.5,-110.5}}, + color={0,0,127})); + connect(sigBus.modeSet, switchPel.u2) annotation (Line( + points={{0,102},{0,-68},{2.22045e-15,-68}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{-6,3},{-6,3}})); + + connect(switchQCon.y, QCon) annotation (Line(points={{91,-12},{94,-12},{94,0}, + {110,0}}, color={0,0,127})); + connect(sigBus.modeSet, switchQEva.u2) annotation (Line( + points={{0,102},{-64,102},{-64,-14},{-68,-14}}, + color={255,204,51}, + thickness=0.5)); + connect(sigBus.modeSet, switchQCon.u2) annotation (Line( + points={{0,102},{64,102},{64,-12},{68,-12}}, + color={255,204,51}, + thickness=0.5)); + connect(modeSetAssert.u, sigBus.modeSet); + annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={ + Rectangle( + extent={{-100,100},{100,-100}}, + lineColor={238,46,47}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid), + Ellipse( + extent={{-24,88},{22,44}}, + lineColor={28,108,200}, + lineThickness=0.5), + Line( + points={{-16,82},{20,74}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{-18,52},{20,58}}, + color={28,108,200}, + thickness=0.5), + Rectangle( + extent={{-98,40},{-60,-28}}, + lineColor={28,108,200}, + lineThickness=0.5), + Line( + points={{-20,-60},{-20,-70},{-20,-80},{20,-60},{20,-80},{-20,-60}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{-122,34},{-66,34},{-82,10},{-66,-22},{-120,-22}}, + color={28,108,200}, + thickness=0.5), + Rectangle( + extent={{60,40},{98,-28}}, + lineColor={28,108,200}, + lineThickness=0.5), + Line( + points={{120,34},{64,34},{80,10},{64,-22},{118,-22}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{-80,40},{-80,68},{-24,68}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{22,66},{80,66},{80,40}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{78,-28},{78,-70}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{78,-70},{62,-70},{20,-70}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{-80,-26},{-80,-68},{-20,-68}}, + color={28,108,200}, + thickness=0.5), + Text( + extent={{-30,28},{30,-28}}, + lineColor={28,108,200}, + lineThickness=0.5, + textString="%name", + origin={0,-8}, + rotation=90)}), Diagram(coordinateSystem(preserveAspectRatio=false)), + Documentation(revisions=" +", info=" +

+ This black box model represents the refrigerant cycle of a vapour + compression machine. Used in IBPSA.Fluid.HeatPumps.HeatPump and + IBPSA.Fluid.Chiller.Chiller, this model serves the simulation of a + reversible vapour compression machine. Thus, data both of chillers + and heat pumps can be used to calculate the three relevant values + P_el, QCon and QEva. The mode of the machine is used to + switch between the performance data of the chiller and the heat pump. +

+

+ The user can choose between different types of performance data or + implement a new black-box model by extending from the + partial model. +

+ +")); +end PartialInnerCycle; diff --git a/IBPSA/Fluid/BaseClasses/PartialReversibleVapourCompressionMachine.mo b/IBPSA/Fluid/BaseClasses/PartialReversibleVapourCompressionMachine.mo new file mode 100644 index 0000000000..0577837ab5 --- /dev/null +++ b/IBPSA/Fluid/BaseClasses/PartialReversibleVapourCompressionMachine.mo @@ -0,0 +1,867 @@ +within IBPSA.Fluid.BaseClasses; +partial model PartialReversibleVapourCompressionMachine + "Grey-box model for reversible heat pumps and chillers using a black-box to simulate the vapour compression cycle" + extends IBPSA.Fluid.Interfaces.PartialFourPortInterface( + redeclare final package Medium1 = Medium_con, + redeclare final package Medium2 = Medium_eva, + final m1_flow_nominal=mFlow_conNominal_final, + final m2_flow_nominal=mFlow_evaNominal_final, + final allowFlowReversal1=allowFlowReversalCon, + final allowFlowReversal2=allowFlowReversalEva, + final m1_flow_small=1E-4*abs(mFlow_conNominal_final), + final m2_flow_small=1E-4*abs(mFlow_evaNominal_final), + final show_T=show_TPort); + +//General + replaceable package Medium_con = + Modelica.Media.Interfaces.PartialMedium "Medium at sink side" + annotation (Dialog(tab = "Condenser"),choicesAllMatching=true); + replaceable package Medium_eva = + Modelica.Media.Interfaces.PartialMedium "Medium at source side" + annotation (Dialog(tab = "Evaporator"),choicesAllMatching=true); + replaceable IBPSA.Fluid.BaseClasses.PartialInnerCycle innerCycle constrainedby + IBPSA.Fluid.BaseClasses.PartialInnerCycle "Blackbox model of refrigerant cycle of a vapour compression machine" + annotation (Placement(transformation( + extent={{-27,-26},{27,26}}, + rotation=90, + origin={0,-1}))); + + parameter Boolean use_rev=true "Is the vapour compression machine reversible?" annotation(choices(checkBox=true), Dialog(descriptionLabel=true)); + parameter Boolean use_autoCalc=false + "Enable automatic estimation of volumes and mass flows?" + annotation(choices(checkBox=true), Dialog(descriptionLabel=true)); + parameter Modelica.Units.SI.Power Q_useNominal(start=0) + "Nominal usable heat flow of the vapour compression machine (HP: Heating; Chiller: Cooling)" + annotation (Dialog(enable=use_autoCalc)); + parameter Real scalingFactor=1 "Scaling-factor of vapour compression machine"; + parameter Boolean use_refIne=true + "Consider the inertia of the refrigerant cycle" + annotation(choices(checkBox=true), Dialog( + group="Refrigerant inertia")); + parameter Modelica.Units.SI.Frequency refIneFre_constant + "Cut off frequency for inertia of refrigerant cycle" annotation (Dialog( + enable=use_refIne, group="Refrigerant inertia"), Evaluate=true); + parameter Integer nthOrder=3 "Order of refrigerant cycle interia" annotation (Dialog(enable= + use_refIne, group="Refrigerant inertia")); + parameter Boolean useBusConnectorOnly = false "Set true to use bus connector for modeSet, nSet and iceFac input" + annotation(choices(checkBox=true), Dialog(group="Input Connectors")); + +//Condenser + parameter Modelica.Units.SI.MassFlowRate mFlow_conNominal + "Manual input of the nominal mass flow rate (if not automatically calculated)" + annotation (Dialog( + group="Parameters", + tab="Condenser", + enable=not use_autoCalc), Evaluate=true); + parameter Modelica.Units.SI.Volume VCon + "Manual input of the condenser volume (if not automatically calculated)" + annotation (Evaluate=true, Dialog( + group="Parameters", + tab="Condenser", + enable=not use_autoCalc)); + parameter Modelica.Units.SI.PressureDifference dpCon_nominal + "Pressure drop at nominal mass flow rate" annotation (Dialog(group="Flow resistance", + tab="Condenser"), Evaluate=true); + parameter Real deltaM_con=0.1 + "Fraction of nominal mass flow rate where transition to turbulent occurs" + annotation (Dialog(tab="Condenser", group="Flow resistance")); + parameter Boolean use_conCap=true + "If heat losses at capacitor side are considered or not" + annotation (Dialog(group="Heat Losses", tab="Condenser"), + choices(checkBox=true)); + parameter Modelica.Units.SI.HeatCapacity CCon + "Heat capacity of Condenser (= cp*m). If you want to neglace the dry mass of the condenser, you can set this value to zero" + annotation (Evaluate=true, Dialog( + group="Heat Losses", + tab="Condenser", + enable=use_conCap)); + parameter Modelica.Units.SI.ThermalConductance GConOut + "Constant parameter for heat transfer to the ambient. Represents a sum of thermal resistances such as conductance, insulation and natural convection. If you want to simulate a condenser with additional dry mass but without external heat losses, set the value to zero" + annotation (Evaluate=true, Dialog( + group="Heat Losses", + tab="Condenser", + enable=use_conCap)); + parameter Modelica.Units.SI.ThermalConductance GConIns + "Constant parameter for heat transfer to heat exchangers capacity. Represents a sum of thermal resistances such as forced convection and conduction inside of the capacity" + annotation (Evaluate=true, Dialog( + group="Heat Losses", + tab="Condenser", + enable=use_conCap)); +//Evaporator + parameter Modelica.Units.SI.MassFlowRate mFlow_evaNominal + "Manual input of the nominal mass flow rate (if not automatically calculated)" + annotation (Dialog( + group="Parameters", + tab="Evaporator", + enable=not use_autoCalc), Evaluate=true); + parameter Modelica.Units.SI.Volume VEva + "Manual input of the evaporator volume (if not automatically calculated)" + annotation (Evaluate=true, Dialog( + group="Parameters", + tab="Evaporator", + enable=not use_autoCalc)); + parameter Modelica.Units.SI.PressureDifference dpEva_nominal + "Pressure drop at nominal mass flow rate" annotation (Dialog(group="Flow resistance", + tab="Evaporator"), Evaluate=true); + parameter Real deltaM_eva=0.1 + "Fraction of nominal mass flow rate where transition to turbulent occurs" + annotation (Dialog(tab="Evaporator", group="Flow resistance")); + parameter Boolean use_evaCap=true + "If heat losses at capacitor side are considered or not" + annotation (Dialog(group="Heat Losses", tab="Evaporator"), + choices(checkBox=true)); + parameter Modelica.Units.SI.HeatCapacity CEva + "Heat capacity of Evaporator (= cp*m). If you want to neglace the dry mass of the evaporator, you can set this value to zero" + annotation (Evaluate=true, Dialog( + group="Heat Losses", + tab="Evaporator", + enable=use_evaCap)); + parameter Modelica.Units.SI.ThermalConductance GEvaOut + "Constant parameter for heat transfer to the ambient. Represents a sum of thermal resistances such as conductance, insulation and natural convection. If you want to simulate a evaporator with additional dry mass but without external heat losses, set the value to zero" + annotation (Evaluate=true, Dialog( + group="Heat Losses", + tab="Evaporator", + enable=use_evaCap)); + parameter Modelica.Units.SI.ThermalConductance GEvaIns + "Constant parameter for heat transfer to heat exchangers capacity. Represents a sum of thermal resistances such as forced convection and conduction inside of the capacity" + annotation (Evaluate=true, Dialog( + group="Heat Losses", + tab="Evaporator", + enable=use_evaCap)); +//Assumptions + parameter Modelica.Units.SI.Time tauSenT=1 + "Time constant at nominal flow rate (use tau=0 for steady-state sensor, but see user guide for potential problems)" + annotation (Dialog(tab="Assumptions", group="Temperature sensors")); + parameter Boolean transferHeat=true + "If true, temperature T converges towards TAmb when no flow" + annotation (Dialog(tab="Assumptions", group="Temperature sensors"),choices(checkBox=true)); + parameter Boolean allowFlowReversalEva=true + "= false to simplify equations, assuming, but not enforcing, no flow reversal" + annotation (Dialog(group="Evaporator", tab="Assumptions")); + parameter Boolean allowFlowReversalCon=true + "= false to simplify equations, assuming, but not enforcing, no flow reversal" + annotation (Dialog(group="Condenser", tab="Assumptions")); + parameter Modelica.Units.SI.Time tauHeaTraEva=1200 + "Time constant for heat transfer in temperature sensors in evaporator, default 20 minutes" + annotation (Dialog( + tab="Assumptions", + group="Temperature sensors", + enable=transferHeat), Evaluate=true); + parameter Modelica.Units.SI.Temperature TAmbEva_nominal=273.15 + "Fixed ambient temperature for heat transfer of sensors at the evaporator side" + annotation (Dialog( + tab="Assumptions", + group="Temperature sensors", + enable=transferHeat)); + parameter Modelica.Units.SI.Time tauHeaTraCon=1200 + "Time constant for heat transfer in temperature sensors in condenser, default 20 minutes" + annotation (Dialog( + tab="Assumptions", + group="Temperature sensors", + enable=transferHeat), Evaluate=true); + parameter Modelica.Units.SI.Temperature TAmbCon_nominal=291.15 + "Fixed ambient temperature for heat transfer of sensors at the condenser side" + annotation (Dialog( + tab="Assumptions", + group="Temperature sensors", + enable=transferHeat)); + +//Initialization + parameter Modelica.Blocks.Types.Init initType=Modelica.Blocks.Types.Init.InitialState + "Type of initialization (InitialState and InitialOutput are identical)" + annotation (Dialog(tab="Initialization", group="Parameters")); + parameter Modelica.Media.Interfaces.Types.AbsolutePressure pCon_start= + Medium_con.p_default "Start value of pressure" + annotation (Evaluate=true,Dialog(tab="Initialization", group="Condenser")); + parameter Modelica.Media.Interfaces.Types.Temperature TCon_start=Medium_con.T_default + "Start value of temperature" + annotation (Evaluate=true,Dialog(tab="Initialization", group="Condenser")); + parameter Modelica.Units.SI.Temperature TConCap_start=Medium_con.T_default + "Initial temperature of heat capacity of condenser" annotation (Dialog( + tab="Initialization", + group="Condenser", + enable=use_conCap)); + parameter Modelica.Media.Interfaces.Types.MassFraction XCon_start[Medium_con.nX]= + Medium_con.X_default "Start value of mass fractions m_i/m" + annotation (Evaluate=true,Dialog(tab="Initialization", group="Condenser")); + parameter Modelica.Media.Interfaces.Types.AbsolutePressure pEva_start= + Medium_eva.p_default "Start value of pressure" + annotation (Evaluate=true,Dialog(tab="Initialization", group="Evaporator")); + parameter Modelica.Media.Interfaces.Types.Temperature TEva_start=Medium_eva.T_default + "Start value of temperature" + annotation (Evaluate=true,Dialog(tab="Initialization", group="Evaporator")); + parameter Modelica.Units.SI.Temperature TEvaCap_start=Medium_eva.T_default + "Initial temperature of heat capacity at evaporator" annotation (Dialog( + tab="Initialization", + group="Evaporator", + enable=use_evaCap)); + parameter Modelica.Media.Interfaces.Types.MassFraction XEva_start[Medium_eva.nX]= + Medium_eva.X_default "Start value of mass fractions m_i/m" + annotation (Evaluate=true,Dialog(tab="Initialization", group="Evaporator")); + parameter Real x_start[nthOrder]=zeros(nthOrder) + "Initial or guess values of states" + annotation (Dialog(tab="Initialization", group="Refrigerant inertia", enable=use_refIne)); + parameter Real yRefIne_start=0 "Initial or guess value of output (= state)" + annotation (Dialog(tab="Initialization", group="Refrigerant inertia",enable=initType == + Init.InitialOutput and use_refIne)); +//Dynamics + parameter Modelica.Fluid.Types.Dynamics massDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial + "Type of mass balance: dynamic (3 initialization options) or steady state (only affects fluid-models)" + annotation (Dialog(tab="Dynamics", group="Equation")); + parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial + "Type of energy balance: dynamic (3 initialization options) or steady state (only affects fluid-models)" + annotation (Dialog(tab="Dynamics", group="Equation")); +//Advanced + parameter Boolean machineType "=true if heat pump; =false if chiller" + annotation (Dialog(tab="Advanced", group="General machine information")); + parameter Boolean show_TPort=false + "= true, if actual temperature at port is computed" + annotation(Dialog(tab="Advanced",group="Diagnostics")); + parameter Boolean from_dp=false + "= true, use m_flow = f(dp) else dp = f(m_flow)" + annotation (Dialog(tab="Advanced", group="Flow resistance")); + parameter Boolean linearized=false + "= true, use linear relation between m_flow and dp for any flow rate" + annotation (Dialog(tab="Advanced", group="Flow resistance")); + + IBPSA.Fluid.HeatExchangers.EvaporatorCondenserWithCapacity con( + redeclare final package Medium = Medium_con, + final allowFlowReversal=allowFlowReversalCon, + final m_flow_small=1E-4*abs(mFlow_conNominal_final), + final show_T=show_TPort, + final deltaM=deltaM_con, + final T_start=TCon_start, + final p_start=pCon_start, + final use_cap=use_conCap, + final X_start=XCon_start, + final from_dp=from_dp, + final energyDynamics=energyDynamics, + final is_con=true, + final V=VCon_final*scalingFactor, + final C=CCon*scalingFactor, + final TCap_start=TConCap_start, + final GOut=GConOut*scalingFactor, + final m_flow_nominal=mFlow_conNominal_final*scalingFactor, + final dp_nominal=dpCon_nominal*scalingFactor, + final GInn=GConIns*scalingFactor) "Heat exchanger model for the condenser" + annotation (Placement(transformation(extent={{-16,78},{16,110}}))); + IBPSA.Fluid.HeatExchangers.EvaporatorCondenserWithCapacity eva( + redeclare final package Medium = Medium_eva, + final deltaM=deltaM_eva, + final use_cap=use_evaCap, + final allowFlowReversal=allowFlowReversalEva, + final m_flow_small=1E-4*abs(mFlow_evaNominal_final), + final show_T=show_TPort, + final T_start=TEva_start, + final p_start=pEva_start, + final X_start=XEva_start, + final from_dp=from_dp, + final energyDynamics=energyDynamics, + final is_con=false, + final V=VEva_final*scalingFactor, + final C=CEva*scalingFactor, + final m_flow_nominal=mFlow_evaNominal_final*scalingFactor, + final dp_nominal=dpEva_nominal*scalingFactor, + final TCap_start=TEvaCap_start, + final GOut=GEvaOut*scalingFactor, + final GInn=GEvaIns*scalingFactor) "Heat exchanger model for the evaporator" + annotation (Placement(transformation(extent={{16,-70},{-16,-102}}))); + Modelica.Blocks.Continuous.CriticalDamping heatFlowIneEva( + final initType=initType, + final normalized=true, + final n=nthOrder, + final f=refIneFre_constant, + final x_start=x_start, + final y_start=yRefIne_start) + if use_refIne + "This n-th order block represents the inertia of the refrigerant cycle and delays the heat flow" + annotation (Placement(transformation( + extent={{6,6},{-6,-6}}, + rotation=90, + origin={-14,-52}))); + Modelica.Blocks.Routing.RealPassThrough realPassThroughnSetCon + if not use_refIne + "Use default nSet value" annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=90, + origin={16,58}))); + Modelica.Blocks.Continuous.CriticalDamping heatFlowIneCon( + final initType=initType, + final normalized=true, + final n=nthOrder, + final f=refIneFre_constant, + final x_start=x_start, + final y_start=yRefIne_start) + if use_refIne + "This n-th order block represents the inertia of the refrigerant cycle and delays the heat flow" + annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=90, + origin={-16,58}))); + Modelica.Blocks.Routing.RealPassThrough realPassThroughnSetEva if not use_refIne + "Use default nSet value" annotation (Placement(transformation( + extent={{6,-6},{-6,6}}, + rotation=90, + origin={16,-52}))); + Modelica.Blocks.Interfaces.RealInput iceFac_in if not useBusConnectorOnly + "Input signal for icing factor" annotation (Placement(transformation( + extent={{-16,-16},{16,16}}, + rotation=90, + origin={-76,-136}))); + Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature varTempOutEva + if use_evaCap "Foreces heat losses according to ambient temperature" + annotation (Placement(transformation( + extent={{-8,-8},{8,8}}, + rotation=0, + origin={-32,-110}))); + Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature varTempOutCon + if use_conCap "Foreces heat losses according to ambient temperature" + annotation (Placement(transformation( + extent={{-8,-8},{8,8}}, + rotation=0, + origin={-52,114}))); + + Modelica.Blocks.Interfaces.RealInput nSet if not useBusConnectorOnly + "Input signal speed for compressor relative between 0 and 1" annotation (Placement( + transformation(extent={{-132,4},{-100,36}}))); + Interfaces.VapourCompressionMachineControlBus sigBus annotation ( + Placement(transformation(extent={{-120,-60},{-90,-26}}), + iconTransformation(extent={{-108,-52},{-90,-26}}))); + + Modelica.Blocks.Interfaces.RealInput T_amb_eva(final unit="K", final + displayUnit="degC") if use_evaCap and not useBusConnectorOnly + "Ambient temperature on the evaporator side" + annotation (Placement(transformation(extent={{10,-10},{-10,10}}, + rotation=0, + origin={110,-100}))); + Modelica.Blocks.Interfaces.RealInput T_amb_con(final unit="K", final + displayUnit="degC") if use_conCap and not useBusConnectorOnly + "Ambient temperature on the condenser side" + annotation (Placement(transformation(extent={{-10,10},{10,-10}}, + rotation=180, + origin={110,100}))); + + Modelica.Blocks.Interfaces.BooleanInput modeSet if not useBusConnectorOnly + and use_rev + "Set value of operation mode" + annotation (Placement(transformation(extent={{-132,-36},{-100,-4}}))); + + IBPSA.Fluid.Sensors.TemperatureTwoPort senT_a2( + redeclare final package Medium = Medium_eva, + final allowFlowReversal=allowFlowReversalEva, + final m_flow_small=1E-4*mFlow_evaNominal_final, + final initType=initType, + final T_start=TEva_start, + final transferHeat=transferHeat, + final TAmb=TAmbEva_nominal, + final tauHeaTra=tauHeaTraEva, + final tau=tauSenT, + final m_flow_nominal=mFlow_evaNominal_final*scalingFactor) + "Temperature at sink inlet" annotation (Placement(transformation( + extent={{10,-10},{-10,10}}, + rotation=0, + origin={38,-86}))); + IBPSA.Fluid.Sensors.TemperatureTwoPort senT_b2( + redeclare final package Medium = Medium_eva, + final allowFlowReversal=allowFlowReversalEva, + final m_flow_small=1E-4*mFlow_evaNominal_final, + final initType=initType, + final T_start=TEva_start, + final transferHeat=transferHeat, + final TAmb=TAmbEva_nominal, + final tauHeaTra=tauHeaTraEva, + final tau=tauSenT, + final m_flow_nominal=mFlow_evaNominal_final*scalingFactor) + "Temperature at sink outlet" annotation (Placement(transformation( + extent={{10,-10},{-10,10}}, + rotation=0, + origin={-52,-86}))); + IBPSA.Fluid.Sensors.MassFlowRate mFlow_eva(redeclare final package Medium = + Medium_eva, final allowFlowReversal=allowFlowReversalEva) + "Mass flow sensor at the evaporator" annotation (Placement(transformation( + origin={72,-60}, + extent={{10,-10},{-10,10}}, + rotation=0))); + IBPSA.Fluid.Sensors.TemperatureTwoPort senT_b1( + final initType=initType, + final transferHeat=transferHeat, + final TAmb=TAmbCon_nominal, + redeclare final package Medium = Medium_con, + final allowFlowReversal=allowFlowReversalCon, + final m_flow_small=1E-4*mFlow_conNominal_final, + final T_start=TCon_start, + final tau=tauSenT, + final tauHeaTra=tauHeaTraCon, + final m_flow_nominal=mFlow_conNominal_final*scalingFactor) + "Temperature at sink outlet" annotation (Placement(transformation( + extent={{-10,10},{10,-10}}, + rotation=0, + origin={38,92}))); + IBPSA.Fluid.Sensors.TemperatureTwoPort senT_a1( + final initType=initType, + final transferHeat=transferHeat, + redeclare final package Medium = Medium_con, + final allowFlowReversal=allowFlowReversalCon, + final m_flow_small=1E-4*mFlow_conNominal_final, + final T_start=TCon_start, + final TAmb=TAmbCon_nominal, + final tau=tauSenT, + final m_flow_nominal=mFlow_conNominal_final*scalingFactor, + final tauHeaTra=tauHeaTraCon) "Temperature at sink inlet" annotation ( + Placement(transformation( + extent={{-10,10},{10,-10}}, + rotation=0, + origin={-34,90}))); + IBPSA.Fluid.Sensors.MassFlowRate mFlow_con(final allowFlowReversal= + allowFlowReversalEva, redeclare final package Medium = Medium_con) + "Mass flow sensor at the evaporator" annotation (Placement(transformation( + origin={-76,60}, + extent={{-10,10},{10,-10}}, + rotation=0))); + + //Automatic calculation of mass flow rates and volumes of the evaporator and condenser using linear regressions from data sheets of heat pumps and chillers (water to water) + + Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(final threshold= + Modelica.Constants.eps) + "Use default nSet value" annotation (Placement(transformation( + extent={{6,-6},{-6,6}}, + rotation=180, + origin={-66,-28}))); +protected + parameter Modelica.Units.SI.MassFlowRate autoCalc_mFlow_min=0.3 + "Realistic mass flow minimum for simulation plausibility"; + parameter Modelica.Units.SI.Volume autoCalc_Vmin=0.003 + "Realistic volume minimum for simulation plausibility"; + + parameter Modelica.Units.SI.MassFlowRate autoCalc_mFlow_eva=if machineType + then max(0.00004*Q_useNominal - 0.3177, autoCalc_mFlow_min) else max(0.00005 + *Q_useNominal - 0.5662, autoCalc_mFlow_min); + parameter Modelica.Units.SI.MassFlowRate autoCalc_mFlow_con=if machineType + then max(0.00004*Q_useNominal - 0.6162, autoCalc_mFlow_min) else max(0.00005 + *Q_useNominal + 0.3161, autoCalc_mFlow_min); + parameter Modelica.Units.SI.MassFlowRate mFlow_evaNominal_final=if + use_autoCalc then autoCalc_mFlow_eva else mFlow_evaNominal; + parameter Modelica.Units.SI.MassFlowRate mFlow_conNominal_final=if + use_autoCalc then autoCalc_mFlow_con else mFlow_conNominal; + parameter Modelica.Units.SI.Volume autoCalc_VEva=if machineType then max(0.0000001 + *Q_useNominal - 0.0075, autoCalc_Vmin) else max(0.0000001*Q_useNominal - 0.0066, + autoCalc_Vmin); + parameter Modelica.Units.SI.Volume autoCalc_VCon=if machineType then max(0.0000001 + *Q_useNominal - 0.0094, autoCalc_Vmin) else max(0.0000002*Q_useNominal - 0.0084, + autoCalc_Vmin); + parameter Modelica.Units.SI.Volume VEva_final=if use_autoCalc then + autoCalc_VEva else VEva; + parameter Modelica.Units.SI.Volume VCon_final=if use_autoCalc then + autoCalc_VCon else VCon; + +equation + //Control and feedback for the auto-calculation of condenser and evaporator data + assert(not use_autoCalc or (use_autoCalc and Q_useNominal>0), "Can't auto-calculate evaporator and condenser data without a given nominal power flow (Q_useNominal)!", + level = AssertionLevel.error); + assert(not use_autoCalc or (autoCalc_mFlow_eva>autoCalc_mFlow_min and autoCalc_mFlow_eva<90), + "Given nominal power (Q_useNominal) for auto-calculation of evaporator and condenser data is outside the range of data sheets considered. Please control the auto-calculated mass flows!", + level = AssertionLevel.warning); + assert(not use_autoCalc or (autoCalc_VEva>autoCalc_Vmin and autoCalc_VEva<0.43), + "Given nominal power (Q_useNominal) for auto-calculation of evaporator and condenser data is outside the range of data sheets considered. Please control the auto-calculated volumes!", + level = AssertionLevel.warning); + + connect(senT_a1.T, sigBus.TConInMea) annotation (Line(points={{-34,79},{-34, + 40},{-76,40},{-76,-43},{-105,-43}}, color={0,0,127}), + Text( + string="%second", + index=1, + extent={{-3,-6},{-3,-6}}, + horizontalAlignment=TextAlignment.Right)); + connect(senT_b1.T, sigBus.TConOutMea) annotation (Line(points={{38,81},{38, + -36},{-52,-36},{-52,-43},{-105,-43}}, color={0,0,127}), Text( + string="%second", + index=1, + extent={{-3,-6},{-3,-6}}, + horizontalAlignment=TextAlignment.Right)); + connect(senT_a2.T, sigBus.TEvaInMea) annotation (Line(points={{38,-75},{38, + -36},{-52,-36},{-52,-43},{-105,-43}}, color={0,0,127}), Text( + string="%second", + index=1, + extent={{-3,6},{-3,6}}, + horizontalAlignment=TextAlignment.Right)); + connect(senT_b2.T, sigBus.TEvaOutMea) annotation (Line(points={{-52,-75},{-52, + -43},{-105,-43}}, color={0,0,127}), Text( + string="%second", + index=1, + extent={{-3,6},{-3,6}}, + horizontalAlignment=TextAlignment.Right)); + connect(mFlow_eva.m_flow, sigBus.m_flowEvaMea) annotation (Line(points={{72,-49}, + {72,-36},{-52,-36},{-52,-43},{-105,-43}}, color={0,0,127}), + Text( + string="%second", + index=1, + extent={{-3,6},{-3,6}}, + horizontalAlignment=TextAlignment.Right)); + connect(mFlow_con.m_flow, sigBus.m_flowConMea) annotation (Line(points={{-76,49}, + {-76,-43},{-105,-43}}, color={0,0,127}), Text( + string="%second", + index=1, + extent={{-3,-6},{-3,-6}}, + horizontalAlignment=TextAlignment.Right)); + + connect(innerCycle.QEva, realPassThroughnSetEva.u) annotation (Line( + points={{-1.77636e-15,-30.7},{-1.77636e-15,-38},{16,-38},{16,-44.8}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(innerCycle.QEva, heatFlowIneEva.u) annotation (Line( + points={{-1.77636e-15,-30.7},{-1.77636e-15,-38},{-14,-38},{-14,-44.8}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(innerCycle.QCon, heatFlowIneCon.u) annotation (Line( + points={{1.77636e-15,28.7},{1.77636e-15,30},{0,30},{0,40},{-16,40},{-16,50.8}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(innerCycle.QCon, realPassThroughnSetCon.u) annotation (Line( + points={{1.77636e-15,28.7},{0,28.7},{0,40},{16,40},{16,50.8}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(innerCycle.sigBus, sigBus) annotation (Line( + points={{-26.78,-0.73},{-54,-0.73},{-54,-43},{-105,-43}}, + color={255,204,51}, + thickness=0.5), Text( + string="%second", + index=1, + extent={{6,3},{6,3}})); + connect(innerCycle.Pel, sigBus.PelMea) annotation (Line(points={{28.73,-0.865}, + {38,-0.865},{38,-36},{-52,-36},{-52,-43},{-105,-43}}, color={0, + 0,127}), Text( + string="%second", + index=1, + extent={{6,3},{6,3}})); + + connect(modeSet, sigBus.modeSet) annotation (Line(points={{-116,-20},{-76,-20}, + {-76,-43},{-105,-43}}, color={255,0,255}), Text( + string="%second", + index=1, + extent={{6,3},{6,3}}, + horizontalAlignment=TextAlignment.Left)); + connect(nSet,sigBus.nSet) annotation (Line(points={{-116,20},{-76,20},{-76,-43}, + {-105,-43}}, color={0,0,127}), Text( + string="%second", + index=1, + extent={{6,3},{6,3}}, + horizontalAlignment=TextAlignment.Left)); + connect(iceFac_in, sigBus.iceFacMea) annotation (Line(points={{-76,-136},{-76, + -43},{-105,-43}}, color={0,0,127}), Text( + string="%second", + index=1, + extent={{-3,6},{-3,6}}, + horizontalAlignment=TextAlignment.Right)); + connect(T_amb_con, varTempOutCon.T) annotation (Line( + points={{110,100},{80,100},{80,126},{-76,126},{-76,114},{-61.6,114}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(varTempOutCon.port, con.port_out) annotation (Line( + points={{-44,114},{0,114},{0,110}}, + color={191,0,0}, + pattern=LinePattern.Dash)); + connect(T_amb_eva, varTempOutEva.T) annotation (Line( + points={{110,-100},{80,-100},{80,-120},{-48,-120},{-48,-110},{-41.6,-110}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(eva.port_out, varTempOutEva.port) annotation (Line( + points={{0,-102},{0,-110},{-24,-110}}, + color={191,0,0}, + pattern=LinePattern.Dash)); + connect(port_b2, port_b2) annotation (Line(points={{-100,-60},{-100,-60},{-100, + -60}}, color={0,127,255})); + connect(realPassThroughnSetCon.y, con.QFlow_in) annotation (Line( + points={{16,64.6},{16,77.04},{0,77.04}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(heatFlowIneCon.y, con.QFlow_in) annotation (Line( + points={{-16,64.6},{-16,77.04},{0,77.04}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(realPassThroughnSetEva.y, eva.QFlow_in) annotation (Line(points={{16,-58.6}, + {16,-69.04},{0,-69.04}}, color={0,0,127})); + connect(heatFlowIneEva.y, eva.QFlow_in) annotation (Line(points={{-14,-58.6},{ + -14,-69.04},{0,-69.04}}, color={0,0,127})); + connect(senT_a2.port_b, eva.port_a) + annotation (Line(points={{28,-86},{16,-86}}, color={0,127,255})); + connect(senT_b2.port_a, eva.port_b) + annotation (Line(points={{-42,-86},{-16,-86}}, color={0,127,255})); + connect(senT_b2.port_b, port_b2) annotation (Line(points={{-62,-86},{-62,-60}, + {-100,-60}}, color={0,127,255})); + connect(mFlow_eva.port_a, port_a2) + annotation (Line(points={{82,-60},{100,-60}}, color={0,127,255})); + connect(mFlow_eva.port_b, senT_a2.port_a) annotation (Line(points={{62,-60},{58, + -60},{58,-86},{48,-86}}, color={0,127,255})); + connect(con.port_a, senT_a1.port_b) + annotation (Line(points={{-16,94},{-20,94},{-20,90},{-24,90}}, + color={0,127,255})); + connect(senT_a1.port_a, mFlow_con.port_b) annotation (Line(points={{-44,90},{-56, + 90},{-56,60},{-66,60}}, color={0,127,255})); + connect(port_a1, mFlow_con.port_a) + annotation (Line(points={{-100,60},{-86,60}}, color={0,127,255})); + connect(con.port_b, senT_b1.port_a) + annotation (Line(points={{16,94},{22,94},{22,92},{28,92}}, + color={0,127,255})); + connect(port_b1, senT_b1.port_b) annotation (Line(points={{100,60},{72,60},{72, + 92},{48,92}}, color={0,127,255})); + connect(greaterThreshold.y, sigBus.onOffMea) annotation (Line(points={{-59.4,-28}, + {-56,-28},{-56,-43},{-105,-43}}, color={255,0,255}), Text( + string="%second", + index=1, + extent={{-6,3},{-6,3}}, + horizontalAlignment=TextAlignment.Right)); + connect(varTempOutCon.T, sigBus.TConAmbMea) annotation (Line( + points={{-61.6,114},{-76,114},{-76,-43},{-105,-43}}, + color={0,0,127}, + pattern=LinePattern.Dash), Text( + string="%second", + index=1, + extent={{6,3},{6,3}}, + horizontalAlignment=TextAlignment.Left)); + connect(varTempOutEva.T, sigBus.TEvaAmbMea) annotation (Line( + points={{-41.6,-110},{-76,-110},{-76,-43},{-105,-43}}, + color={0,0,127}, + pattern=LinePattern.Dash), Text( + string="%second", + index=1, + extent={{-6,3},{-6,3}}, + horizontalAlignment=TextAlignment.Right)); + connect(greaterThreshold.u, sigBus.nSet) annotation (Line(points={{-73.2,-28}, + {-76,-28},{-76,-43},{-105,-43}}, color={0,0,127}), Text( + string="%second", + index=1, + extent={{-6,3},{-6,3}}, + horizontalAlignment=TextAlignment.Right)); + annotation (Icon(coordinateSystem(extent={{-100,-120},{100,120}}), graphics={ + Rectangle( + extent={{-16,83},{16,-83}}, + fillColor={170,213,255}, + fillPattern=FillPattern.Solid, + lineColor={0,0,0}, + origin={1,-64}, + rotation=90), + Rectangle( + extent={{-17,83},{17,-83}}, + fillColor={255,0,128}, + fillPattern=FillPattern.Solid, + lineColor={0,0,0}, + origin={1,61}, + rotation=90), + Text( + extent={{-76,6},{74,-36}}, + lineColor={28,108,200}, + fillColor={215,215,215}, + fillPattern=FillPattern.Solid, + textString="%name +"), Line( + points={{-9,40},{9,40},{-5,-2},{9,-40},{-9,-40}}, + color={0,0,0}, + smooth=Smooth.None, + origin={-3,-60}, + rotation=-90), + Line( + points={{9,40},{-9,40},{5,-2},{-9,-40},{9,-40}}, + color={0,0,0}, + smooth=Smooth.None, + origin={-5,56}, + rotation=-90), + Rectangle( + extent={{-82,42},{84,-46}}, + lineColor={238,46,47}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid), + Line(points={{-88,60},{88,60}}, color={28,108,200}), + Line(points={{-88,-60},{88,-60}}, color={28,108,200}), + Line( + origin={-75.5,-80.333}, + points={{43.5,8.3333},{37.5,0.3333},{25.5,-1.667},{33.5,-9.667},{17.5,-11.667},{27.5,-21.667},{13.5,-23.667}, + {11.5,-31.667}}, + smooth=Smooth.Bezier, + visible=use_evaCap), + Polygon( + points={{-70,-122},{-68,-108},{-58,-114},{-70,-122}}, + lineColor={0,0,0}, + fillPattern=FillPattern.Solid, + fillColor={0,0,0}, + visible=use_evaCap), + Line( origin={40.5,93.667}, + points={{39.5,6.333},{37.5,0.3333},{25.5,-1.667},{33.5,-9.667},{17.5, + -11.667},{27.5,-21.667},{13.5,-23.667},{11.5,-27.667}}, + smooth=Smooth.Bezier, + visible=use_conCap), + Polygon( + points={{86,110},{84,96},{74,102},{86,110}}, + lineColor={0,0,0}, + fillPattern=FillPattern.Solid, + fillColor={0,0,0}, + visible=use_conCap), + Line( + points={{-42,72},{34,72}}, + color={0,0,0}, + arrow={Arrow.None,Arrow.Filled}, + thickness=0.5), + Line( + points={{-38,0},{38,0}}, + color={0,0,0}, + arrow={Arrow.None,Arrow.Filled}, + thickness=0.5, + origin={0,-74}, + rotation=180)}), Diagram(coordinateSystem(extent={{-100, + -120},{100,120}})), + Documentation(revisions=" +", info=" +

+ This partial model for a generic grey-box vapour compression machine + (heat pump or chiller) uses empirical data to model the refrigerant + cycle. The modelling of system inertias and heat losses allow the + simulation of transient states. +

+

+ Resulting in the choosen model structure, several configurations are + possible: +

+
    +
  1. Compressor type: on/off or inverter controlled +
  2. +
  3. Reversible operation / only main operation +
  4. +
  5. Source/Sink: Any combination of mediums is possible +
  6. +
  7. Generik: Losses and inertias can be switched on or off. +
  8. +
+

+ Concept +

+

+ Using a signal bus as a connector, this model working as a heat pump + can be easily combined with several control or safety blocks from + IBPSA.Controls.HeatPump. + The relevant data is aggregated. In order to control both chillers + and heat pumps, both flow and return temperature are aggregated. The + mode signal chooses the operation type of the vapour compression + machine: +

+ +

+ To model both on/off and inverter controlled vapour compression + machines, the compressor speed is normalizd to a relative value + between 0 and 1. +

+

+ Possible icing of the evaporator is modelled with an input value + between 0 and 1. +

+

+ The model structure is as follows. To understand each submodel, + please have a look at the corresponding model information: +

+
    +
  1. + InnerCycle + (Black Box): Here, the user can use between several input models or + just easily create his own, modular black box model. Please look at + the model description for more info. +
  2. +
  3. Inertia: A n-order element is used to model system inertias (mass + and thermal) of components inside the refrigerant cycle (compressor, + pipes, expansion valve) +
  4. +
  5. + + HeatExchanger: This new model also enable modelling of thermal + interias and heat losses in a heat exchanger. Please look at the + model description for more info. +
  6. +
+

+ Parametrization +

+

+ To simplify the parametrization of the evaporator and condenser + volumes and nominal mass flows there exists an option of automatic + estimation based on the nominal usable power of the vapour + compression machine. This function uses a linear correlation of these + parameters, which was established from the linear regression of more + than 20 data sets of water-to-water heat pumps from different + manufacturers (e.g. Carrier, Trane, Lennox) ranging from about 25kW + to 1MW nominal power. The linear regressions with coefficients of + determination above 91% give a good approximation of these + parameters. Nevertheless, estimates for machines outside the given + range should be checked for plausibility during simulation. +

+

+ Assumptions +

+

+ Several assumptions where made in order to model the vapour + compression machine. For a detailed description see the corresponding + model. +

+
    +
  1. + + Performance data 2D: In order to model inverter controlled + machines, the compressor speed is scaled linearly +
  2. +
  3. + + Performance data 2D: Reduced evaporator power as a result of + icing. The icing factor is multiplied with the evaporator power. +
  4. +
  5. + Inertia: The default value of the n-th order element is set + to 3. This follows comparisons with experimental data. Previous + heat pump models are using n = 1 as a default. However, it was + pointed out that a higher order element fits a real heat pump + better in +
  6. +
  7. + Scaling factor: A scaling facor is implemented for scaling + of the thermal power and capacity. The factor scales the parameters + V, m_flow_nominal, C, GIns, GOut and dp_nominal. As a result, the + vapour compression machine can supply more heat with the COP + staying nearly constant. However, one has to make sure that the + supplied pressure difference or mass flow is also scaled with this + factor, as the nominal values do not increase said mass flow. +
  8. +
+

+ Known Limitations +

+ +")); +end PartialReversibleVapourCompressionMachine; diff --git a/IBPSA/Fluid/BaseClasses/package.order b/IBPSA/Fluid/BaseClasses/package.order index 942b2276fe..12baf72ffa 100644 --- a/IBPSA/Fluid/BaseClasses/package.order +++ b/IBPSA/Fluid/BaseClasses/package.order @@ -5,3 +5,5 @@ PartialResistance PartialThreeWayResistance FlowModels Validation +PartialReversibleVapourCompressionMachine +PartialInnerCycle diff --git a/IBPSA/Fluid/Chillers/BaseClasses/Carnot.mo b/IBPSA/Fluid/Chillers/BaseClasses/Carnot.mo index ae9e84c866..5e3559d107 100644 --- a/IBPSA/Fluid/Chillers/BaseClasses/Carnot.mo +++ b/IBPSA/Fluid/Chillers/BaseClasses/Carnot.mo @@ -13,11 +13,11 @@ partial model Carnot parameter Modelica.Units.SI.HeatFlowRate QCon_flow_nominal(min=0) "Nominal heating flow rate" annotation (Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal(final max=0) - = -10 "Temperature difference evaporator outlet-inlet" + parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal(final max=0)= + -10 "Temperature difference evaporator outlet-inlet" annotation (Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal(final min=0) - = 10 "Temperature difference condenser outlet-inlet" + parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal(final min=0)= + 10 "Temperature difference condenser outlet-inlet" annotation (Dialog(group="Nominal condition")); // Efficiency @@ -52,12 +52,12 @@ partial model Carnot "Pressure difference over evaporator" annotation (Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.TemperatureDifference TAppCon_nominal(min=0) = + parameter Modelica.Units.SI.TemperatureDifference TAppCon_nominal(min=0)= if cp1_default < 1500 then 5 else 2 "Temperature difference between refrigerant and working fluid outlet in condenser" annotation (Dialog(group="Efficiency")); - parameter Modelica.Units.SI.TemperatureDifference TAppEva_nominal(min=0) = + parameter Modelica.Units.SI.TemperatureDifference TAppEva_nominal(min=0)= if cp2_default < 1500 then 5 else 2 "Temperature difference between refrigerant and working fluid outlet in evaporator" annotation (Dialog(group="Efficiency")); @@ -137,12 +137,12 @@ partial model Carnot x2=TConAct - TEvaAct, deltaX=0.25) "Carnot efficiency"; - Modelica.Units.SI.Temperature TConAct(start=TCon_nominal + TAppCon_nominal) - = Medium1.temperature(staB1) + QCon_flow/QCon_flow_nominal*TAppCon_nominal + Modelica.Units.SI.Temperature TConAct(start=TCon_nominal + TAppCon_nominal)= + Medium1.temperature(staB1) + QCon_flow/QCon_flow_nominal*TAppCon_nominal "Condenser temperature used to compute efficiency, taking into account pinch temperature between fluid and refrigerant"; - Modelica.Units.SI.Temperature TEvaAct(start=TEva_nominal - TAppEva_nominal) - = Medium2.temperature(staB2) - QEva_flow/QEva_flow_nominal*TAppEva_nominal + Modelica.Units.SI.Temperature TEvaAct(start=TEva_nominal - TAppEva_nominal)= + Medium2.temperature(staB2) - QEva_flow/QEva_flow_nominal*TAppEva_nominal "Evaporator temperature used to compute efficiency, taking into account pinch temperature between fluid and refrigerant"; protected diff --git a/IBPSA/Fluid/Chillers/BaseClasses/InnerCycle_Chiller.mo b/IBPSA/Fluid/Chillers/BaseClasses/InnerCycle_Chiller.mo new file mode 100644 index 0000000000..9922138d23 --- /dev/null +++ b/IBPSA/Fluid/Chillers/BaseClasses/InnerCycle_Chiller.mo @@ -0,0 +1,194 @@ +within IBPSA.Fluid.Chillers.BaseClasses; +model InnerCycle_Chiller "Blackbox model of refrigerant cycle of a chiller" + extends IBPSA.Fluid.BaseClasses.PartialInnerCycle; + + replaceable model PerDataMainChi = + IBPSA.Fluid.Chillers.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData + constrainedby + IBPSA.Fluid.Chillers.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData( + final scalingFactor = scalingFactor) + "Replaceable model for performance data of a chiller in main operation mode" + annotation (choicesAllMatching=true); + + replaceable model PerDataRevChi = + IBPSA.Fluid.HeatPumps.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData + constrainedby + IBPSA.Fluid.HeatPumps.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData( + final scalingFactor = scalingFactor) + "Replaceable model for performance data of a chiller in reversible operation mode" + annotation (Dialog(enable=use_rev),choicesAllMatching=true); + + PerDataMainChi PerformanceDataChillerCooling + annotation (Placement(transformation(extent={{7,20},{61,76}}, rotation=0))); + PerDataRevChi PerformanceDataChillerHeating if use_rev + annotation (Placement( + transformation( + extent={{-27,-28},{27,28}}, + rotation=0, + origin={-34,48}))); + + Modelica.Blocks.Math.Gain gainEva(final k=-1) + "Negate QEva to match definition of heat flow direction" annotation ( + Placement(transformation( + extent={{-4,-4},{4,4}}, + rotation=180, + origin={-50,-6}))); + Modelica.Blocks.Math.Gain gainCon(final k=-1) if use_rev + "Negate QCon to match definition of heat flow direction" annotation ( + Placement(transformation( + extent={{-4,-4},{4,4}}, + rotation=0, + origin={50,-20}))); +equation + + connect(PerformanceDataChillerCooling.Pel, switchPel.u1) annotation (Line( + points={{34,17.2},{34,-30},{8,-30},{8,-68}}, color={0,0,127})); + connect(PerformanceDataChillerHeating.Pel, switchPel.u3) annotation (Line( + points={{-34,17.2},{-34,-30},{-8,-30},{-8,-68}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(constZero.y, switchPel.u3) annotation (Line(points={{-59,-68},{-34,-68},{-34,-68},{-8,-68}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(constZero.y, switchQEva.u3) annotation (Line( + points={{-59,-68},{-52,-68},{-52,-22},{-68,-22}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(constZero.y, switchQCon.u3) annotation (Line(points={{-59,-68},{-52,-68}, + {-52,-38},{68,-38},{68,-20}}, color={0,0,127}, + pattern=LinePattern.Dash)); + connect(sigBus, PerformanceDataChillerHeating.sigBus) annotation (Line( + points={{0,102},{0,86},{-33.73,86},{-33.73,77.12}}, + color={255,204,51}, + thickness=0.5)); + connect(sigBus, PerformanceDataChillerCooling.sigBus) annotation (Line( + points={{0,102},{0,86},{34.27,86},{34.27,77.12}}, + color={255,204,51}, + thickness=0.5)); + + connect(PerformanceDataChillerCooling.QEva, gainEva.u) annotation (Line( + points={{55.6,17.2},{55.6,-6},{-45.2,-6}}, color={0,0,127})); + connect(gainEva.y, switchQEva.u1) + annotation (Line(points={{-54.4,-6},{-68,-6}}, color={0,0,127})); + connect(PerformanceDataChillerHeating.QEva, switchQEva.u3) annotation (Line( + points={{-12.4,17.2},{-12.4,-22},{-68,-22}}, color={0,0,127}, + pattern=LinePattern.Dash)); + connect(PerformanceDataChillerHeating.QCon, gainCon.u) annotation (Line( + points={{-55.6,17.2},{-55.6,2},{-24,2},{-24,-20},{45.2,-20}}, color={0,0, + 127},pattern=LinePattern.Dash)); + connect(gainCon.y, switchQCon.u3) + annotation (Line(points={{54.4,-20},{68,-20}}, color={0,0,127}, + pattern=LinePattern.Dash)); + connect(PerformanceDataChillerCooling.QCon, switchQCon.u1) annotation (Line( + points={{12.4,17.2},{12.4,4},{62,4},{62,-4},{68,-4}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={ + Rectangle( + extent={{-100,100},{100,-100}}, + lineColor={238,46,47}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid), + Ellipse( + extent={{-24,88},{22,44}}, + lineColor={28,108,200}, + lineThickness=0.5), + Line( + points={{-16,82},{20,74}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{-18,52},{20,58}}, + color={28,108,200}, + thickness=0.5), + Rectangle( + extent={{-98,40},{-60,-28}}, + lineColor={28,108,200}, + lineThickness=0.5), + Line( + points={{-20,-60},{-20,-70},{-20,-80},{20,-60},{20,-80},{-20,-60}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{-122,34},{-66,34},{-82,10},{-66,-22},{-120,-22}}, + color={28,108,200}, + thickness=0.5), + Rectangle( + extent={{60,40},{98,-28}}, + lineColor={28,108,200}, + lineThickness=0.5), + Line( + points={{120,34},{64,34},{80,10},{64,-22},{118,-22}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{-80,40},{-80,68},{-24,68}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{22,66},{80,66},{80,40}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{78,-28},{78,-70}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{78,-70},{62,-70},{20,-70}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{-80,-26},{-80,-68},{-20,-68}}, + color={28,108,200}, + thickness=0.5), + Text( + extent={{-30,28},{30,-28}}, + lineColor={28,108,200}, + lineThickness=0.5, + textString="%name", + origin={0,-8}, + rotation=90)}), Diagram(coordinateSystem(preserveAspectRatio=false)), + Documentation(revisions=" +", info=" +

+ This black box model represents the refrigerant cycle of a chiller. + Used in IBPSA.Fluid.Chillers.Chiller, this model serves the + simulation of a reversible chiller. Thus, data both of chillers and + heat pumps can be used to calculate the three relevant values + P_el, QCon and QEva. The mode of the chiller is used to + switch between the performance data of the chiller and the heat pump. +

+

+ The user can choose between different types of performance data or + implement a new black-box model by extending from the + partial model. +

+ +")); +end InnerCycle_Chiller; diff --git a/IBPSA/Fluid/Chillers/BaseClasses/PartialCarnot_y.mo b/IBPSA/Fluid/Chillers/BaseClasses/PartialCarnot_y.mo index f966c0a5fb..af351e25f6 100644 --- a/IBPSA/Fluid/Chillers/BaseClasses/PartialCarnot_y.mo +++ b/IBPSA/Fluid/Chillers/BaseClasses/PartialCarnot_y.mo @@ -36,9 +36,9 @@ partial model PartialCarnot_y annotation (Placement(transformation(extent={{-140,70},{-100,110}}))); protected - Modelica.Units.SI.HeatFlowRate QCon_flow_internal(start=QCon_flow_nominal) = + Modelica.Units.SI.HeatFlowRate QCon_flow_internal(start=QCon_flow_nominal)= P - QEva_flow_internal "Condenser heat input"; - Modelica.Units.SI.HeatFlowRate QEva_flow_internal(start=QEva_flow_nominal) = + Modelica.Units.SI.HeatFlowRate QEva_flow_internal(start=QEva_flow_nominal)= if COP_is_for_cooling then -COP*P else (1 - COP)*P "Evaporator heat input"; Modelica.Blocks.Sources.RealExpression yEva_flow_in( diff --git a/IBPSA/Fluid/Chillers/BaseClasses/package.order b/IBPSA/Fluid/Chillers/BaseClasses/package.order index fd1c3690d2..bfeb922413 100644 --- a/IBPSA/Fluid/Chillers/BaseClasses/package.order +++ b/IBPSA/Fluid/Chillers/BaseClasses/package.order @@ -1,3 +1,4 @@ Carnot PartialCarnot_T PartialCarnot_y +InnerCycle_Chiller diff --git a/IBPSA/Fluid/Chillers/BlackBoxData.mo b/IBPSA/Fluid/Chillers/BlackBoxData.mo new file mode 100644 index 0000000000..c48aa03d39 --- /dev/null +++ b/IBPSA/Fluid/Chillers/BlackBoxData.mo @@ -0,0 +1,736 @@ +within IBPSA.Fluid.Chillers; +package BlackBoxData "Collection of Chiller Database Records" + extends Modelica.Icons.MaterialPropertiesPackage; + + record ChillerBaseDataDefinition "Basic chiller data" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.HeatPumpBaseDataDefinition( + tableQdot_con = tableQdot_eva); + + parameter Real tableQdot_eva[:,:] "Cooling power table; T in degC; Q_flow in W"; + + annotation (Documentation(info="

+ Base data definition extending from the HeatPumpBaseDataDefinition, + the parameters documentation is matched for a chiller. As a result, + tableQdot_eva + corresponds to the cooling capacity on the evaporator side of the + chiller. Furthermore, the values of the tables depend on the + condenser inlet temperature (defined in first row) and the evaporator + outlet temperature (defined in first column) in W. +

+

+ The nominal mass flow rate in the condenser and evaporator are also + defined as parameters. +

+", revisions=" +"), + Icon, preferedView="info"); + end ChillerBaseDataDefinition; + + package EN14511 + + record Vitocal200AWO201 "Vitocal200AWO201Chilling" + extends IBPSA.Fluid.Chillers.BlackBoxData.ChillerBaseDataDefinition( + tableP_ele=[0,20,25,27,30,35; 7,1380.0,1590.0,1680.0,1800.0,1970.0; 18, + 950.0,1060.0,1130.0,1200.0,1350.0], + tableQdot_eva=[0,20,25,27,30,35; 7,2540.0,2440.0,2370.0,2230.0,2170.0; + 18,5270.0,5060.0,4920.0,4610.0,4500.0], + mFlow_conNom=3960/4180/5, + mFlow_evaNom=(2250*1.2)/3600, + tableUppBou=[20,20; 35,20]); + + annotation ( + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false)), + Documentation(info="

+ Data record for type AWO-M/AWO-M-E-AC 201.A04, + obtained from the technical guide in the UK. + Link to the datasheet +

+ +")); + end Vitocal200AWO201; + annotation (Documentation(revisions=" +")); + end EN14511; + + package PerformanceData "Different data models used for a black box chiller model" + + package BaseClasses "Package with partial classes of Performance Data" + partial model PartialPerformanceData + "Model with a replaceable for different methods of data aggregation" + Modelica.Blocks.Interfaces.RealOutput Pel(final unit="W", final displayUnit="kW") + "Electrical Power consumed by HP" annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={0,-110}))); + Modelica.Blocks.Interfaces.RealOutput QCon(final unit="W", final displayUnit="kW") + "Heat flow rate through Condenser" annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={-80,-110}))); + IBPSA.Fluid.Interfaces.VapourCompressionMachineControlBus sigBus + "Bus-connector used in a chiller" annotation (Placement( + transformation( + extent={{-15,-14},{15,14}}, + rotation=0, + origin={1,104}))); + Modelica.Blocks.Interfaces.RealOutput QEva(final unit="W", final displayUnit="kW") + "Heat flow rate through Evaporator" annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={80,-110}))); + protected + parameter Real scalingFactor=1 "Scaling factor of chiller"; + + end PartialPerformanceData; + annotation (Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Ellipse( + extent={{-30.0,-30.0},{30.0,30.0}}, + lineColor={128,128,128}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid)}), Documentation(revisions=" +", info=" +

+ This package contains base classes for the package IBPSA.Fluid.Chillers.BaseClasses.PerformanceData. +

+")); + end BaseClasses; + + model LookUpTable2D "Performance data coming from manufacturer" + extends + IBPSA.Fluid.Chillers.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData; + + parameter Modelica.Blocks.Types.Smoothness smoothness=Modelica.Blocks.Types.Smoothness.LinearSegments + "Smoothness of table interpolation"; + parameter IBPSA.Fluid.Chillers.BlackBoxData.ChillerBaseDataDefinition dataTable= + IBPSA.Fluid.Chillers.BlackBoxData.EN14511.Vitocal200AWO201() + "Data Table of Chiller" annotation (choicesAllMatching=true); + parameter Modelica.Blocks.Types.Extrapolation extrapolation=Modelica.Blocks.Types.Extrapolation.LastTwoPoints + "Extrapolation of data outside the definition range"; + + Modelica.Blocks.Tables.CombiTable2Ds Qdot_EvaTable( + final smoothness=smoothness, + final u1(unit="degC"), + final u2(unit="degC"), + final y(unit="W", displayUnit="kW"), + final extrapolation=extrapolation, + final table=dataTable.tableQdot_eva) annotation (extent=[-60,40; -40,60], + Placement(transformation( + extent={{-14,-14},{14,14}}, + rotation=-90, + origin={46,34}))); + Modelica.Blocks.Tables.CombiTable2Ds P_eleTable( + final smoothness=smoothness, + final extrapolation=extrapolation, + final u1(unit="degC"), + final u2(unit="degC"), + final y(unit="W", displayUnit="kW"), + final table=dataTable.tableP_ele) "Electrical power table" annotation ( + extent=[-60,-20; -40,0], Placement(transformation( + extent={{-14,-14},{14,14}}, + rotation=-90, + origin={-60,36}))); + + Modelica.Blocks.Math.UnitConversions.To_degC t_Co_in + annotation (extent=[-88,38; -76,50], Placement(transformation(extent={{-6,-6}, + {6,6}}, + rotation=270, + origin={52,72}))); + Modelica.Blocks.Math.UnitConversions.To_degC t_Ev_ou annotation (extent=[-88,38; + -76,50], Placement(transformation(extent={{-6,-6},{6,6}}, + rotation=270, + origin={-54,76}))); + Modelica.Blocks.Math.Product nTimesPel annotation (Placement(transformation( + extent={{-7,-7},{7,7}}, + rotation=-90, + origin={-41,-11}))); + Modelica.Blocks.Math.Product nTimesQEva annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=-90, + origin={40,-10}))); + Modelica.Blocks.Math.Product proRedQEva + "Based on the icing factor, the heat flow to the evaporator is reduced" + annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=270, + origin={68,-62}))); + Modelica.Blocks.Math.Add calcRedQCon + "Based on redcued heat flow to the evaporator, the heat flow to the condenser is also reduced" + annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=270, + origin={-80,-80}))); + + Modelica.Blocks.Math.Product nTimesSF + "Create the product of the scaling factor and relative compressor speed" + annotation (Placement(transformation( + extent={{-7,-7},{7,7}}, + rotation=-90, + origin={-9,23}))); + + protected + Modelica.Blocks.Sources.Constant realCorr(final k=scalingFactor) + "Calculates correction of table output based on scaling factor" + annotation (Placement(transformation( + extent={{-3,-3},{3,3}}, + rotation=270, + origin={-13,43}))); + + equation + + connect(t_Co_in.y,Qdot_EvaTable. u2) annotation (Line(points={{52,65.4},{52, + 60},{37.6,60},{37.6,50.8}}, color={0,0,127})); + connect(t_Co_in.y, P_eleTable.u2) annotation (Line(points={{52,65.4},{-68.4, + 65.4},{-68.4,52.8}}, color={0,0,127})); + connect(t_Ev_ou.y, P_eleTable.u1) annotation (Line(points={{-54,69.4},{-54, + 52.8},{-51.6,52.8}}, color={0,0,127})); + connect(t_Ev_ou.y,Qdot_EvaTable. u1) annotation (Line(points={{-54,69.4},{-54, + 60},{52,60},{52,50.8},{54.4,50.8}}, + color={0,0,127})); + connect(sigBus.TEvaOutMea, t_Ev_ou.u) annotation (Line( + points={{1,104},{-54,104},{-54,83.2}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{-6,3},{-6,3}})); + connect(sigBus.TConInMea,t_Co_in. u) annotation (Line( + points={{1,104},{2,104},{2,104},{52,104},{52,79.2}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{-6,3},{-6,3}})); + connect(P_eleTable.y, nTimesPel.u2) annotation (Line(points={{-60,20.6},{ + -60,10},{-45.2,10},{-45.2,-2.6}}, + color={0,0,127})); + connect(Qdot_EvaTable.y,nTimesQEva. u1) annotation (Line(points={{46,18.6},{ + 46,-2.8},{43.6,-2.8}}, color={0,0,127})); + connect(proRedQEva.y, calcRedQCon.u1) annotation (Line(points={{68,-68.6},{ + 68,-70},{-76.4,-70},{-76.4,-72.8}}, color= + {0,0,127})); + connect(sigBus.iceFacMea, proRedQEva.u1) annotation (Line( + points={{1,104},{20,104},{20,-42},{72,-42},{72,-54.8},{71.6,-54.8}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{6,3},{6,3}}, + horizontalAlignment=TextAlignment.Left)); + + connect(nTimesPel.y, Pel) annotation (Line(points={{-41,-18.7},{-41,-30},{0, + -30},{0,-110}}, color={0,0,127})); + connect(realCorr.y, nTimesSF.u2) annotation (Line(points={{-13,39.7},{-13, + 31.4},{-13.2,31.4}}, color={0,0,127})); + connect(sigBus.nSet, nTimesSF.u1) annotation (Line( + points={{1,104},{-4,104},{-4,31.4},{-4.8,31.4}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{6,3},{6,3}}, + horizontalAlignment=TextAlignment.Left)); + connect(nTimesQEva.y, proRedQEva.u2) annotation (Line(points={{40,-16.6},{ + 40,-54.8},{64.4,-54.8}}, color={0,0,127})); + connect(proRedQEva.y, QEva) annotation (Line(points={{68,-68.6},{68,-80},{ + 80,-80},{80,-110}}, color={0,0,127})); + connect(calcRedQCon.y, QCon) + annotation (Line(points={{-80,-86.6},{-80,-110}}, color={0,0,127})); + connect(nTimesPel.y, calcRedQCon.u2) annotation (Line(points={{-41,-18.7},{ + -41,-30},{-83.6,-30},{-83.6,-72.8}}, color={0,0,127})); + connect(nTimesSF.y, nTimesPel.u1) annotation (Line(points={{-9,15.3},{-9,10}, + {-36.8,10},{-36.8,-2.6}}, color={0,0,127})); + connect(nTimesSF.y, nTimesQEva.u2) annotation (Line(points={{-9,15.3},{-9, + 10},{36.4,10},{36.4,-2.8}}, color={0,0,127})); + annotation (Icon(graphics={ + Line(points={{-60.0,40.0},{-60.0,-40.0},{60.0,-40.0},{60.0,40.0},{30.0,40.0},{30.0,-40.0},{-30.0,-40.0},{-30.0,40.0},{-60.0,40.0},{-60.0,20.0},{60.0,20.0},{60.0,0.0},{-60.0,0.0},{-60.0,-20.0},{60.0,-20.0},{60.0,-40.0},{-60.0,-40.0},{-60.0,40.0},{60.0,40.0},{60.0,-40.0}}), + Line(points={{0.0,40.0},{0.0,-40.0}}), + Rectangle(fillColor={255,215,136}, + fillPattern=FillPattern.Solid, + extent={{-60.0,20.0},{-30.0,40.0}}), + Rectangle(fillColor={255,215,136}, + fillPattern=FillPattern.Solid, + extent={{-60.0,0.0},{-30.0,20.0}}), + Rectangle(fillColor={255,215,136}, + fillPattern=FillPattern.Solid, + extent={{-60.0,-20.0},{-30.0,0.0}}), + Rectangle(fillColor={255,215,136}, + fillPattern=FillPattern.Solid, + extent={{-60.0,-40.0},{-30.0,-20.0}})}), Documentation(revisions=" +", info=" +

+ This model uses the 2-dimensional table data given in the DIN EN + 14511 (formerly EN255) to calculate QEva and P_el. To + model an inverter controlled chiller, the relative compressor + speed n is scaled linearly with the ouput of the tables. + Furthermore, the design of a chiller is modeled via a scaling factor. + As a result, the equations follow below: +

+

+ QEva,n = n * scalingFactor * TableQEva.y +

+

+ P_el = n * scalingFactor * TablePel.y +

+

+ To simulate possible icing of the evaporator on air-source chillers, + the icing factor is used to influence the output as well. As the + factor resembles the reduction of heat transfer between refrigerant + and source, the factor is implemented as follows: +

+

+ QEva = iceFac * QEva,n +

+

+ With iceFac as a relative value between 0 and 1: +

+

+ iceFac = kA/kA_noIce +

+

+ Finally, to follow the first law of thermodynamics: +

+

+ QCon = P_el,n + QEva +

+

+ Known Limitations +

+

+ The model CombiTable2DExtra + is able to disallow extrapolation by holding the last value. If one + extrapolates the given perfomance data, warnings about occuring + extrapolations are emitted. CAUTION: Checking for possible + extrapolations will trigger state events which results in higher + computing time. +

+")); + end LookUpTable2D; + + model LookUpTableND "N-dimensional table with data for chiller" + extends + IBPSA.Fluid.Chillers.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData; + parameter Real nConv=100 + "Gain value multiplied with relative compressor speed n to calculate matching value based on sdf tables"; + parameter SDF.Types.InterpolationMethod interpMethod=SDF.Types.InterpolationMethod.Linear + "Interpolation method"; + parameter SDF.Types.ExtrapolationMethod extrapMethod=SDF.Types.ExtrapolationMethod.None + "Extrapolation method"; + parameter String filename_Pel= + "modelica://Resources/Data/Fluid/BaseClasses/PerformanceData/LookUpTableND/VZH088AG.sdf" + "File name of sdf table data" + annotation (Dialog(group="Electrical Power",loadSelector(filter="SDF Files (*.sdf);;All Files (*.*)", caption="Select SDF file"))); + parameter String dataset_Pel="/Pel" + "Dataset name" + annotation (Dialog(group="Electrical Power")); + parameter String dataUnit_Pel="W" + "Data unit" + annotation (Dialog(group="Electrical Power")); + parameter String scaleUnits_Pel[3]={"K","K",""} + "Scale units" + annotation (Dialog(group="Electrical Power")); + parameter String filename_QCon= + "modelica://Resources/Data/Fluid/BaseClasses/PerformanceData/LookUpTableND/VZH088AG.sdf" + "File name of sdf table data" + annotation (Dialog(group="Condenser heat flow",loadSelector(filter="SDF Files (*.sdf);;All Files (*.*)", caption="Select SDF file"))); + parameter String dataset_QCon="/QCon" + "Dataset name" + annotation (Dialog(group="Condenser heat flow")); + parameter String dataUnit_QCon="W" + "Data unit" + annotation (Dialog(group="Condenser heat flow")); + parameter String scaleUnits_QCon[3]={"K","K",""} + "Scale units" + annotation (Dialog(group="Condenser heat flow")); + + Modelica.Blocks.Math.Gain nConGain(final k=nConv) + "Convert relative speed n to an absolute value for interpolation in sdf tables" + annotation (Placement(transformation( + extent={{-8,-8},{8,8}}, + rotation=-90, + origin={0,86}))); + Modelica.Blocks.Math.UnitConversions.To_degC t_Co_in + annotation (extent=[-88,38; -76,50], Placement(transformation(extent={{-6,-6}, + {6,6}}, + rotation=-90, + origin={46,62}))); + Modelica.Blocks.Math.UnitConversions.To_degC t_Ev_ou annotation (extent=[-88,38; + -76,50], Placement(transformation(extent={{-6,-6},{6,6}}, + rotation=-90, + origin={-40,64}))); + Modelica.Blocks.Math.Add calcRedQCon + "Calculates condenser heat flow with total energy balance" annotation ( + Placement(transformation( + extent={{-6,6},{6,-6}}, + rotation=-90, + origin={-80,-86}))); + Modelica.Blocks.Logical.Switch switchPel + "If HP is off, no heat will be exchanged" annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=-90, + origin={50,-60}))); + Modelica.Blocks.Logical.Switch switchQEva + "If chiller is off, no heat will be exchanged" annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=-90, + origin={-50,-56}))); + Modelica.Blocks.Sources.Constant constZero(final k=0) + "Power if HP is turned off" + annotation (Placement(transformation(extent={{-6,-6},{6,6}}, + rotation=-90, + origin={0,-26}))); + SDF.NDTable nDTableQEva( + final nin=3, + final readFromFile=true, + final filename=filename_QCon, + final dataset=dataset_QCon, + final dataUnit=dataUnit_QCon, + final scaleUnits=scaleUnits_QCon, + final interpMethod=interpMethod, + final extrapMethod=extrapMethod) + "SDF-Table data for evaporator heat flow" + annotation (Placement(transformation(extent={{-12,-12},{12,12}}, + rotation=-90, + origin={-42,20}))); + SDF.NDTable nDTablePel( + final nin=3, + final readFromFile=true, + final filename=filename_Pel, + final dataset=dataset_Pel, + final dataUnit=dataUnit_Pel, + final scaleUnits=scaleUnits_Pel, + final interpMethod=interpMethod, + final extrapMethod=extrapMethod) "SDF table data for electrical power" + annotation (Placement(transformation( + extent={{-12,-12},{12,12}}, + rotation=-90, + origin={50,20}))); + Modelica.Blocks.Routing.Multiplex3 multiplex3_1( + final n1=1, + final n2=1, + final n3=1) "Concat all inputs into an array" + annotation (Placement(transformation(extent={{-8,-8},{8,8}}, + rotation=-90, + origin={0,50}))); + + Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(final threshold= + Modelica.Constants.eps) annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=270, + origin={-72,64}))); + Modelica.Blocks.Math.Product scalingFacTimesQEva annotation (Placement( + transformation( + extent={{-5,-5},{5,5}}, + rotation=-90, + origin={-35,-9}))); + Modelica.Blocks.Math.Product scalingFacTimesPel annotation (Placement( + transformation( + extent={{-5,-5},{5,5}}, + rotation=-90, + origin={53,-11}))); + protected + Modelica.Blocks.Sources.Constant realCorr(final k=scalingFactor) + "Calculates correction of table output based on scaling factor" + annotation (Placement(transformation( + extent={{-5,-5},{5,5}}, + rotation=270, + origin={3,17}))); + equation + connect(switchPel.y, Pel) annotation (Line(points={{50,-71},{50,-82},{0,-82}, + {0,-110}}, + color={0,0,127})); + + connect(constZero.y,switchQEva. u3) annotation (Line(points={{0,-32.6},{0,-38}, + {-58,-38},{-58,-44}},color={0,0,127})); + connect(constZero.y, switchPel.u3) annotation (Line(points={{0,-32.6},{0,-38}, + {42,-38},{42,-48}}, + color={0,0,127})); + connect(multiplex3_1.y,nDTableQEva. u) annotation (Line(points={{-1.55431e-15, + 41.2},{-1.55431e-15,34.4},{-42,34.4}}, + color={0,0,127})); + connect(multiplex3_1.y, nDTablePel.u) annotation (Line(points={{-1.77636e-15, + 41.2},{-1.77636e-15,34.4},{50,34.4}}, + color={0,0,127})); + connect(sigBus.TConInMea,t_Co_in. u) annotation (Line( + points={{1,104},{46,104},{46,69.2}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{-6,3},{-6,3}})); + connect(sigBus.TEvaOutMea, t_Ev_ou.u) annotation (Line( + points={{1,104},{-40,104},{-40,71.2}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{-6,3},{-6,3}})); + connect(sigBus.nSet, greaterThreshold.u) annotation (Line( + points={{1,104},{-72,104},{-72,71.2}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{-3,6},{-3,6}}, + horizontalAlignment=TextAlignment.Right)); + connect(greaterThreshold.y,switchQEva. u2) annotation (Line(points={{-72,57.4}, + {-72,-16},{-50,-16},{-50,-44}}, color={255,0,255})); + connect(greaterThreshold.y, switchPel.u2) annotation (Line(points={{-72,57.4}, + {-72,-18},{38,-18},{38,-34},{50,-34},{50,-48}}, + color={255,0,255})); + connect(sigBus.nSet, nConGain.u) annotation (Line( + points={{1,104},{1.77636e-15,104},{1.77636e-15,95.6}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{-3,6},{-3,6}}, + horizontalAlignment=TextAlignment.Right)); + connect(nConGain.y, multiplex3_1.u3[1]) annotation (Line(points={{ + -1.55431e-15,77.2},{-6,77.2},{-6,59.6},{-5.6,59.6}}, color={0,0,127})); + connect(t_Ev_ou.y, multiplex3_1.u1[1]) annotation (Line(points={{-40,57.4},{ + -40,54},{5.6,54},{5.6,59.6}}, color={0,0,127})); + connect(t_Co_in.y, multiplex3_1.u2[1]) annotation (Line(points={{46,55.4},{46, + 50},{0,50},{0,59.6}}, color={0,0,127})); + connect(switchPel.y, calcRedQCon.u2) annotation (Line(points={{50,-71},{50, + -76},{-76.4,-76},{-76.4,-78.8}}, color={0,0,127})); + connect(switchQEva.y, calcRedQCon.u1) annotation (Line(points={{-50,-67},{ + -50,-72},{-83.6,-72},{-83.6,-78.8}}, color={0,0,127})); + connect(calcRedQCon.y, QCon) + annotation (Line(points={{-80,-92.6},{-80,-110}}, color={0,0,127})); + connect(switchQEva.y, QEva) annotation (Line(points={{-50,-67},{-50,-88},{ + 80,-88},{80,-110}}, color={0,0,127})); + connect(realCorr.y, scalingFacTimesPel.u2) + annotation (Line(points={{3,11.5},{3,2},{50,2},{50,-5}}, color={0,0,127})); + connect(realCorr.y, scalingFacTimesQEva.u1) annotation (Line(points={{3,11.5}, + {3,2},{-32,2},{-32,-3}}, color={0,0,127})); + connect(nDTablePel.y, scalingFacTimesPel.u1) annotation (Line(points={{50,6.8}, + {54,6.8},{54,-5},{56,-5}}, color={0,0,127})); + connect(nDTableQEva.y, scalingFacTimesQEva.u2) + annotation (Line(points={{-42,6.8},{-42,-3},{-38,-3}}, color={0,0,127})); + connect(scalingFacTimesQEva.y, switchQEva.u1) annotation (Line(points={{-35, + -14.5},{-35,-28.25},{-42,-28.25},{-42,-44}}, color={0,0,127})); + connect(scalingFacTimesPel.y, switchPel.u1) annotation (Line(points={{53, + -16.5},{53,-32.25},{58,-32.25},{58,-48}}, color={0,0,127})); + annotation (Icon(graphics={ + Line(points={{-60.0,40.0},{-60.0,-40.0},{60.0,-40.0},{60.0,40.0},{30.0,40.0},{30.0,-40.0},{-30.0,-40.0},{-30.0,40.0},{-60.0,40.0},{-60.0,20.0},{60.0,20.0},{60.0,0.0},{-60.0,0.0},{-60.0,-20.0},{60.0,-20.0},{60.0,-40.0},{-60.0,-40.0},{-60.0,40.0},{60.0,40.0},{60.0,-40.0}}), + Line(points={{0.0,40.0},{0.0,-40.0}}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-60.0,0.0},{-30.0,20.0}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,215,136}, + fillPattern=FillPattern.Solid, + extent={{-60.0,-40.0},{-30.0,-20.0}}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-60,-20},{-30,0}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-60,-40},{-30,-20}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-30,-40},{0,-20}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{0,-40},{30,-20}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{30,-40},{60,-20}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{30,-20},{60,0}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{0,-20},{30,0}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{0,0},{30,20}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{30,0},{60,20}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{0,20},{30,40}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{30,20},{60,40}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-60,20},{-30,40}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-30,20},{0,40}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-30,0},{0,20}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-30,-20},{0,0}}, + lineColor={0,0,0})}), Documentation(info="

+ Basic models showing the concept of using n-dimensional table data + for the innerCycle of the heat pump model. This model assumes one + provides data for inverter controlled heat pumps or chillers. + However, this basis structure can be used to create own models, where + electrical power and condenser depend on other inputs, such as + ambient temperature. +

+ +")); + end LookUpTableND; + + model PolynomalApproach + "Calculating chiller data based on a polynomal approach" + extends + IBPSA.Fluid.Chillers.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData; + + replaceable function PolyData = + IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.Characteristics.PartialBaseFct + "Function to calculate peformance Data" annotation(choicesAllMatching=true); + protected + Real Char[2]; + equation + Char =PolyData( + sigBus.nSet, + sigBus.TEvaOutMea, + sigBus.TConInMea, + sigBus.m_flowEvaMea, + sigBus.m_flowConMea); + if sigBus.nSet > Modelica.Constants.eps then + //Get's the data from the signal Bus and calculates the power and heat flow based on the function one chooses. + QEva = Char[2]; + Pel = Char[1]; + else //If heat pump is turned off, all values become zero. + QCon = 0; + Pel = 0; + end if; + QCon = -(QCon - Pel); + annotation (Icon(graphics={ + Text( + lineColor={0,0,255}, + extent={{-136,109},{164,149}}, + textString="%name"), + Ellipse( + lineColor = {108,88,49}, + fillColor = {255,215,136}, + fillPattern = FillPattern.Solid, + extent={{-86,-96},{88,64}}), + Text( + lineColor={108,88,49}, + extent={{-90,-108},{90,72}}, + textString="f")}), Documentation(revisions=" +", info=" +

+ This model is used to calculate the three values based on a + functional approach. The user can choose between several functions or + use their own. +

+

+ As the + base function only returns the electrical power and the condenser + heat flow, the evaporator heat flow is calculated with the following + energy balance: +

+

+ QEva = QCon - P_el +

+")); + end PolynomalApproach; + annotation (Documentation(revisions=" +", info=" +

+ This package contains models for the grey box chiller model IBPSA.Fluid.Chillers.Chiller. +

+")); + end PerformanceData; +annotation (Documentation(revisions=" +")); +end BlackBoxData; diff --git a/IBPSA/Fluid/Chillers/Chiller.mo b/IBPSA/Fluid/Chillers/Chiller.mo new file mode 100644 index 0000000000..0e153862d1 --- /dev/null +++ b/IBPSA/Fluid/Chillers/Chiller.mo @@ -0,0 +1,239 @@ +within IBPSA.Fluid.Chillers; +model Chiller + "Grey-box model for reversible chillers using a black-box to simulate the refrigeration cycle" + extends IBPSA.Fluid.BaseClasses.PartialReversibleVapourCompressionMachine( + use_rev=true, + final machineType = false, + redeclare IBPSA.Fluid.Chillers.BaseClasses.InnerCycle_Chiller innerCycle( + final use_rev=use_rev, + final scalingFactor=scalingFactor, + redeclare model PerDataMainChi = PerDataMainChi, + redeclare model PerDataRevChi = PerDataRevChi)); + + replaceable model PerDataMainChi = + IBPSA.Fluid.Chillers.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData + "Performance data of a chiller in main operation mode" + annotation (choicesAllMatching=true); + replaceable model PerDataRevChi = + IBPSA.Fluid.HeatPumps.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData + "Performance data of a chiller in reversible operation mode" + annotation (Dialog(enable=use_rev),choicesAllMatching=true); + + annotation (Icon(coordinateSystem(extent={{-100,-120},{100,120}}), graphics={ + Rectangle( + extent={{-16,83},{16,-83}}, + fillColor={170,213,255}, + fillPattern=FillPattern.Solid, + lineColor={0,0,0}, + origin={1,-64}, + rotation=90), + Rectangle( + extent={{-17,83},{17,-83}}, + fillColor={255,0,128}, + fillPattern=FillPattern.Solid, + lineColor={0,0,0}, + origin={1,61}, + rotation=90), + Text( + extent={{-76,6},{74,-36}}, + lineColor={28,108,200}, + fillColor={215,215,215}, + fillPattern=FillPattern.Solid, + textString="%name +"), Line( + points={{-9,40},{9,40},{-5,-2},{9,-40},{-9,-40}}, + color={0,0,0}, + smooth=Smooth.None, + origin={-3,-60}, + rotation=-90), + Line( + points={{9,40},{-9,40},{5,-2},{-9,-40},{9,-40}}, + color={0,0,0}, + smooth=Smooth.None, + origin={-5,56}, + rotation=-90), + Rectangle( + extent={{-82,42},{84,-46}}, + lineColor={238,46,47}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid), + Line(points={{-88,60},{88,60}}, color={28,108,200}), + Line(points={{-88,-60},{88,-60}}, color={28,108,200}), + Line( + origin={-75.5,-80.333}, + points={{43.5,8.3333},{37.5,0.3333},{25.5,-1.667},{33.5,-9.667},{17.5,-11.667},{27.5,-21.667},{13.5,-23.667}, + {11.5,-31.667}}, + smooth=Smooth.Bezier, + visible=use_evaCap), + Polygon( + points={{-70,-122},{-68,-108},{-58,-114},{-70,-122}}, + lineColor={0,0,0}, + fillPattern=FillPattern.Solid, + fillColor={0,0,0}, + visible=use_evaCap), + Line( origin={40.5,93.667}, + points={{39.5,6.333},{37.5,0.3333},{25.5,-1.667},{33.5,-9.667},{17.5, + -11.667},{27.5,-21.667},{13.5,-23.667},{11.5,-27.667}}, + smooth=Smooth.Bezier, + visible=use_conCap), + Polygon( + points={{86,110},{84,96},{74,102},{86,110}}, + lineColor={0,0,0}, + fillPattern=FillPattern.Solid, + fillColor={0,0,0}, + visible=use_conCap), + Line( + points={{-42,72},{34,72}}, + color={0,0,0}, + arrow={Arrow.None,Arrow.Filled}, + thickness=0.5), + Line( + points={{-38,0},{38,0}}, + color={0,0,0}, + arrow={Arrow.None,Arrow.Filled}, + thickness=0.5, + origin={0,-74}, + rotation=180)}), Diagram(coordinateSystem(extent={{-100, + -120},{100,120}})), + Documentation(revisions=" +", info=" +

+ This generic grey-box chiller model uses empirical data to model the + refrigerant cycle. The modelling of system inertias and heat losses + allow the simulation of transient states. +

+

+ Resulting in the choosen model structure, several configurations are + possible: +

+
    +
  1. Compressor type: on/off or inverter controlled +
  2. +
  3. Reversible chiller / only cooling +
  4. +
  5. Source/Sink: Any combination of mediums is possible +
  6. +
  7. Generik: Losses and inertias can be switched on or off. +
  8. +
+

+ Concept +

+

+ Using a signal bus as a connector, this chiller model can be easily + combined within a chiller system model including several control or + safety blocks analogous to IBPSA.Controls.HeatPump. + The relevant data is aggregated. The mode signal chooses the type of + the chiller operation. As a result, this model can also be used as a + heat pump: +

+ +

+ To model both on/off and inverter controlled chillers, the compressor + speed is normalizd to a relative value between 0 and 1. +

+

+ Possible icing of the evaporator is modelled with an input value + between 0 and 1. +

+

+ The model structure is as follows. To understand each submodel, + please have a look at the corresponding model information: +

+
    +
  1. + InnerCycle + (Black Box): Here, the user can use between several input models or + just easily create his own, modular black box model. Please look at + the model description for more info. +
  2. +
  3. Inertia: A n-order element is used to model system inertias (mass + and thermal) of components inside the refrigerant cycle (compressor, + pipes, expansion valve) +
  4. +
  5. + + HeatExchanger: This new model also enable modelling of thermal + interias and heat losses in a heat exchanger. Please look at the + model description for more info. +
  6. +
+

+ Parametrization +

+

+ To simplify the parametrization of the evaporator and condenser + volumes and nominal mass flows there exists an option of automatic + estimation based on the nominal usable cooling power of the Chiller. + This function uses a linear correlation of these parameters, which + was established from the linear regression of more than 20 data sets + of water-to-water chillers from different manufacturers (e.g. + Carrier, Trane, Lennox) ranging from about 25kW to 1MW nominal power. + The linear regressions with coefficients of determination above 91% + give a good approximation of these parameters. Nevertheless, + estimates for machines outside the given range should be checked for + plausibility during simulation. +

+

+ Assumptions +

+

+ Several assumptions where made in order to model the chiller. For a + detailed description see the corresponding model. +

+
    +
  1. + + Performance data 2D: In order to model inverter controlled + chillers, the compressor speed is scaled linearly +
  2. +
  3. + + Performance data 2D: Reduced evaporator power as a result of + icing. The icing factor is multiplied with the evaporator power. +
  4. +
  5. + Inertia: The default value of the n-th order element is set + to 3. This follows comparisons with experimental data. +
  6. +
  7. + Scaling factor: A scaling facor is implemented for scaling + of the chiller power and capacity. The factor scales the parameters + V, m_flow_nominal, C, GIns, GOut and dp_nominal. As a result, the + chiller can supply more heat with the COP staying nearly constant. + However, one has to make sure that the supplied pressure difference + or mass flow is also scaled with this factor, as the nominal values + do not increase said mass flow. +
  8. +
+

+ Known Limitations +

+ +")); +end Chiller; diff --git a/IBPSA/Fluid/Chillers/Examples/Chiller.mo b/IBPSA/Fluid/Chillers/Examples/Chiller.mo new file mode 100644 index 0000000000..57e5cddb59 --- /dev/null +++ b/IBPSA/Fluid/Chillers/Examples/Chiller.mo @@ -0,0 +1,242 @@ +within IBPSA.Fluid.Chillers.Examples; +model Chiller "Example for the reversible chiller model." + extends Modelica.Icons.Example; + + replaceable package Medium_sin = IBPSA.Media.Water + constrainedby Modelica.Media.Interfaces.PartialMedium annotation (choicesAllMatching=true); + replaceable package Medium_sou = IBPSA.Media.Water + constrainedby Modelica.Media.Interfaces.PartialMedium annotation (choicesAllMatching=true); + IBPSA.Fluid.Sources.MassFlowSource_T sinkSideMassFlowSource( + use_T_in=true, + m_flow=1, + redeclare package Medium = Medium_sin, + T=275.15, + nPorts=1) "Ideal mass flow source at the inlet of the sink side" + annotation (Placement(transformation(extent={{-54,-58},{-34,-38}}))); + + IBPSA.Fluid.Sources.Boundary_pT sinkSideFixedBoundary(redeclare package + Medium = Medium_sin, nPorts=1) + "Fixed boundary at the outlet of the sink side" annotation (Placement( + transformation( + extent={{-10,10},{10,-10}}, + rotation=0, + origin={-86,62}))); + Modelica.Blocks.Sources.Ramp TsuSinkRamp( + duration=500, + startTime=500, + height=25, + offset=278) + "Ramp signal for the temperature input of the sink side's ideal mass flow source" + annotation (Placement(transformation(extent={{-94,-76},{-74,-56}}))); + IBPSA.Fluid.Chillers.Chiller chiller( + refIneFre_constant=1, + GConIns=0, + CEva=100, + GEvaOut=5, + CCon=100, + GConOut=5, + dpEva_nominal=0, + dpCon_nominal=0, + mFlow_conNominal=0.5, + mFlow_evaNominal=0.5, + use_conCap=false, + use_evaCap=false, + redeclare package Medium_con = Medium_sin, + redeclare package Medium_eva = Medium_sou, + use_refIne=false, + GEvaIns=0, + energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, + redeclare model PerDataMainChi = + IBPSA.Fluid.Chillers.BlackBoxData.PerformanceData.LookUpTable2D ( + dataTable=IBPSA.Fluid.Chillers.BlackBoxData.EN14511.Vitocal200AWO201()), + redeclare model PerDataRevChi = + IBPSA.Fluid.HeatPumps.BlackBoxData.PerformanceData.LookUpTable2D ( + smoothness=Modelica.Blocks.Types.Smoothness.LinearSegments, dataTable= + IBPSA.Fluid.HeatPumps.BlackBoxData.EN14511.Vitocal200AWO201()), + use_rev=true, + use_autoCalc=false, + VEva=0.4, + VCon=0.04, + TAmbEva_nominal=288.15, + TAmbCon_nominal=273.15, + TEva_start=303.15) annotation (Placement(transformation( + extent={{-24,-29},{24,29}}, + rotation=90, + origin={2,1}))); + + IBPSA.Fluid.Sensors.TemperatureTwoPort senTAct( + final m_flow_nominal=chiller.m2_flow_nominal, + final tau=1, + final initType=Modelica.Blocks.Types.Init.InitialState, + final tauHeaTra=1200, + final allowFlowReversal=chiller.allowFlowReversalCon, + final transferHeat=false, + redeclare final package Medium = Medium_sou, + T_start=303.15, + final TAmb=291.15) "Temperature at source outlet" annotation (Placement( + transformation( + extent={{-10,10},{10,-10}}, + rotation=0, + origin={54,-38}))); + Modelica.Blocks.Sources.Sine sine( + f=1/3600, + amplitude=500, + offset=500, + phase=3.1415926535898) + annotation (Placement(transformation(extent={{76,56},{84,64}}))); + IBPSA.Fluid.Movers.SpeedControlled_Nrpm + pumSou( + energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, + redeclare final IBPSA.Fluid.Movers.Data.Pumps.Wilo.Stratos25slash1to8 per, + final allowFlowReversal=true, + final addPowerToMedium=false, + redeclare final package Medium = Medium_sou) + "Fan or pump at source side of HP" annotation (Placement(transformation( + extent={{10,-10},{-10,10}}, + rotation=0, + origin={50,34}))); + + IBPSA.Fluid.MixingVolumes.MixingVolume Room( + energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, + nPorts=2, + final use_C_flow=false, + final m_flow_nominal=chiller.m2_flow_nominal, + final V=5, + final allowFlowReversal=true, + redeclare package Medium = Medium_sou) "Volume of Condenser" annotation ( + Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={86,2}))); + + Modelica.Blocks.Sources.Constant nIn(k=100) annotation (Placement( + transformation( + extent={{4,-4},{-4,4}}, + rotation=90, + origin={50,56}))); + Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow heatFlowRateEva + "Heat flow rate of the evaporator" + annotation (Placement(transformation( + extent={{-8,8},{8,-8}}, + rotation=270, + origin={96,26}))); + Modelica.Blocks.Math.Gain gain(k=1) annotation (Placement(transformation( + extent={{-4,-4},{4,4}}, + rotation=270, + origin={96,52}))); + IBPSA.Fluid.Sources.Boundary_pT sourceSideFixedBoundary(nPorts=1, redeclare + package Medium = Medium_sou) + "Fixed boundary at the outlet of the source side" annotation (Placement( + transformation( + extent={{10,-10},{-10,10}}, + rotation=0, + origin={88,-38}))); + Modelica.Blocks.Sources.Constant iceFac(final k=1) + "Fixed value for icing factor. 1 means no icing/frosting (full heat transfer in heat exchanger)" annotation (Placement( + transformation( + extent={{-6,-6},{6,6}}, + rotation=180, + origin={54,-6}))); + Modelica.Blocks.Math.BooleanToReal booleanToReal + annotation (Placement(transformation(extent={{7,-7},{-7,7}}, + rotation=270, + origin={-3,-53}))); + Modelica.Blocks.Logical.Hysteresis hysCooling( + pre_y_start=false, + uHigh=273.15 + 17, + uLow=273.15 + 14) + annotation (Placement(transformation(extent={{46,-98},{34,-86}}))); + Modelica.Blocks.Sources.BooleanStep booleanStep( + startValue=true, startTime=1800) + annotation (Placement(transformation(extent={{8,-8},{-8,8}}, + rotation=0, + origin={32,-54}))); + Modelica.Blocks.Logical.Not not2 "Negate output of hysteresis" + annotation (Placement(transformation(extent={{-4,-4},{4,4}}, + origin={24,-76}, + rotation=180))); + Modelica.Blocks.Logical.Hysteresis hysHeating( + pre_y_start=true, + uLow=273.15 + 25, + uHigh=273.15 + 30) + annotation (Placement(transformation(extent={{46,-82},{34,-70}}))); + Modelica.Blocks.Logical.LogicalSwitch logicalSwitch + annotation (Placement(transformation(extent={{10,-78},{0,-88}}))); +equation + + connect(nIn.y, pumSou.Nrpm) + annotation (Line(points={{50,51.6},{50,46}}, color={0,0,127})); + connect(Room.heatPort,heatFlowRateEva. port) + annotation (Line(points={{86,12},{96,12},{96,18}},color={191,0,0})); + connect(sine.y, gain.u) annotation (Line(points={{84.4,60},{92,60},{92,56.8}, + {96,56.8}}, color={0,0,127})); + connect(heatFlowRateEva.Q_flow, gain.y) annotation (Line(points={{96,34},{96, + 47.6}}, color={0,0,127})); + connect(Room.ports[1], pumSou.port_a) annotation (Line(points={{76,3},{76,26}, + {60,26},{60,34}},color={0,127,255})); + connect(senTAct.port_b, sourceSideFixedBoundary.ports[1]) annotation (Line( + points={{64,-38},{78,-38}}, color={0,127,255})); + connect(senTAct.port_b, Room.ports[2]) annotation (Line(points={{64,-38},{66,-38}, + {66,1},{76,1}}, color={0,127,255})); + connect(chiller.nSet, booleanToReal.y) annotation (Line(points={{-2.83333, + -26.84},{-3,-26.84},{-3,-45.3}}, color={0,0,127})); + connect(sinkSideMassFlowSource.ports[1], chiller.port_a1) annotation (Line( + points={{-34,-48},{-12.5,-48},{-12.5,-23}}, color={0,127,255})); + connect(sinkSideFixedBoundary.ports[1], chiller.port_b1) annotation (Line( + points={{-76,62},{-50,62},{-50,25},{-12.5,25}}, color={0,127,255})); + connect(pumSou.port_b, chiller.port_a2) + annotation (Line(points={{40,34},{16.5,34},{16.5,25}}, color={0,127,255})); + connect(chiller.port_b2, senTAct.port_a) annotation (Line(points={{16.5,-23},{ + 32,-23},{32,-38},{44,-38}}, color={0,127,255})); + connect(chiller.iceFac_in, iceFac.y) annotation (Line(points={{34.8667,-17.24}, + {42,-17.24},{42,-6},{47.4,-6}}, color={0,0,127})); + connect(TsuSinkRamp.y, sinkSideMassFlowSource.T_in) annotation (Line(points={ + {-73,-66},{-68,-66},{-68,-44},{-56,-44}}, color={0,0,127})); + connect(hysHeating.y, not2.u) + annotation (Line(points={{33.4,-76},{28.8,-76}}, color={255,0,255})); + connect(senTAct.T, hysHeating.u) + annotation (Line(points={{54,-49},{54,-76},{47.2,-76}}, color={0,0,127})); + connect(hysCooling.u, senTAct.T) + annotation (Line(points={{47.2,-92},{54,-92},{54,-49}}, color={0,0,127})); + connect(booleanStep.y, chiller.modeSet) annotation (Line(points={{23.2,-54},{12, + -54},{12,-40},{6.83333,-40},{6.83333,-26.84}}, color={255,0,255})); + connect(logicalSwitch.y, booleanToReal.u) annotation (Line(points={{-0.5,-83}, + {-3,-83},{-3,-61.4}}, color={255,0,255})); + connect(not2.y, logicalSwitch.u3) annotation (Line(points={{19.6,-76},{16,-76}, + {16,-79},{11,-79}}, color={255,0,255})); + connect(hysCooling.y, logicalSwitch.u1) annotation (Line(points={{33.4,-92},{16, + -92},{16,-87},{11,-87}}, color={255,0,255})); + connect(booleanStep.y, logicalSwitch.u2) annotation (Line(points={{23.2,-54},{ + 14,-54},{14,-83},{11,-83}}, color={255,0,255})); + annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, + -100},{100,100}})), + experiment(Tolerance=1e-6, StopTime=3600), +__Dymola_Commands(file="modelica://IBPSA/Resources/Scripts/Dymola/Fluid/Chillers/Examples/Chiller.mos" + "Simulate and plot"), + Documentation(info="

+ Overview +

+

+ Simple test set-up for the reversible chiller model. The chiller is + turned on and off while the source temperature increases linearly. + Outputs are the electric power consumption of the chiller and the + supply temperature. +

+

+ Besides using the default simple table data, the user should also + test tabulated data from IBPSA.DataBase.Chiller or + polynomial functions. +

+", + revisions=" +"), + __Dymola_Commands(file="Modelica://AixLib/Resources/Scripts/Dymola/Fluid/HeatPumps/Examples/HeatPump.mos" "Simulate and plot"), + Icon(coordinateSystem(extent={{-100,-100},{100,80}}))); +end Chiller; diff --git a/IBPSA/Fluid/Chillers/Examples/package.order b/IBPSA/Fluid/Chillers/Examples/package.order index 8f1741a553..46b4532014 100644 --- a/IBPSA/Fluid/Chillers/Examples/package.order +++ b/IBPSA/Fluid/Chillers/Examples/package.order @@ -1,2 +1,3 @@ Carnot_TEva Carnot_y +Chiller diff --git a/IBPSA/Fluid/Chillers/package.order b/IBPSA/Fluid/Chillers/package.order index 70f4d704c3..8ed3307793 100644 --- a/IBPSA/Fluid/Chillers/package.order +++ b/IBPSA/Fluid/Chillers/package.order @@ -1,5 +1,7 @@ Carnot_TEva Carnot_y +Chiller +BlackBoxData Examples Validation BaseClasses diff --git a/IBPSA/Fluid/HeatExchangers/EvaporatorCondenserWithCapacity.mo b/IBPSA/Fluid/HeatExchangers/EvaporatorCondenserWithCapacity.mo new file mode 100644 index 0000000000..26c0444462 --- /dev/null +++ b/IBPSA/Fluid/HeatExchangers/EvaporatorCondenserWithCapacity.mo @@ -0,0 +1,280 @@ +within IBPSA.Fluid.HeatExchangers; +model EvaporatorCondenserWithCapacity + extends IBPSA.Fluid.Interfaces.TwoPortHeatMassExchanger( + redeclare final IBPSA.Fluid.MixingVolumes.MixingVolume vol( + final prescribedHeatFlowRate=true, + final V=V), + final tau=30); + + parameter Boolean is_con "Type of heat exchanger" annotation (Dialog( descriptionLabel = true),choices(choice=true "Condenser", + choice=false "Evaporator", + radioButtons=true)); + parameter Modelica.Units.SI.Volume V "Volume in condenser"; + parameter Boolean use_cap=true "False if capacity and heat losses are neglected" + annotation (Dialog(group="Heat losses"),choices(checkBox=true)); + parameter Modelica.Units.SI.HeatCapacity C "Capacity of heat exchanger. If you want to neglace the dry mass of the heat exchanger, you can set this value to zero" + annotation (Dialog(group="Heat losses", enable=use_cap)); + parameter Modelica.Units.SI.Temperature TCap_start=Medium.T_default + "Initial temperature of heat capacity" + annotation (Dialog(tab="Initialization", group="Capacity")); + Modelica.Units.SI.ThermalConductance GOut + "Formular for calculation of heat transfer coefficient on the outside. If you want to simulate a heat exchanger with additional dry mass but without external heat losses, set the value to zero" + annotation (Dialog(group= + "Heat losses", enable=use_cap)); + Modelica.Blocks.Interfaces.RealOutput GInn + "Formular for calculation of heat transfer coefficient on the inside" + annotation (Dialog(group= + "Heat losses", enable=use_cap)); + Modelica.Thermal.HeatTransfer.Components.Convection conIns if use_cap + "Convection between fluid and solid" annotation (Placement(transformation( + extent={{-8,-8},{8,8}}, + rotation=90, + origin={-12,28}))); + Modelica.Thermal.HeatTransfer.Components.Convection conOut if use_cap + "Convection and conduction between solid and ambient air" annotation ( + Placement(transformation( + extent={{8,8},{-8,-8}}, + rotation=270, + origin={-12,78}))); + Modelica.Thermal.HeatTransfer.Components.HeatCapacitor heatCap( + final C=C, + final T( + final fixed=(energyDynamics == Modelica.Fluid.Types.Dynamics.FixedInitial), + final start=TCap_start), + final der_T(final fixed=(energyDynamics == Modelica.Fluid.Types.Dynamics.SteadyStateInitial), + start=0)) if use_cap "Heat Capacity" annotation (Placement( + transformation( + extent={{-12,-12},{12,12}}, + rotation=270, + origin={12,52}))); + Modelica.Blocks.Sources.RealExpression heatLossIns(final y=GInn) if use_cap + "Nominal heat loss coefficient to the inside" annotation (Placement( + transformation( + extent={{-15,-10},{15,10}}, + rotation=0, + origin={-61,28}))); + Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a port_out if use_cap + "Temperature and heat flow to the ambient" + annotation (Placement(transformation(extent={{-5,105},{5,95}}), + iconTransformation(extent={{-5,105},{5,95}}))); + Modelica.Blocks.Sources.RealExpression heatLossOut(final y=GOut) if use_cap + "Nominal heat loss coefficient to the inside" annotation (Placement( + transformation( + extent={{-15,-10},{15,10}}, + rotation=0, + origin={-61,78}))); + + Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHea(final alpha=0, + final T_ref=293.15) "Heat flow rate of the condenser" annotation ( + Placement(transformation( + extent={{12,-12},{-12,12}}, + rotation=270, + origin={0,-68}))); + Modelica.Blocks.Interfaces.RealInput QFlow_in "Heat flow rate to the medium" + annotation (Placement(transformation( + extent={{-20,-20},{20,20}}, + rotation=90, + origin={0,-118}), iconTransformation( + extent={{-8,-8},{8,8}}, + rotation=90, + origin={-8.88178e-16,-106}))); + +equation + connect(conIns.fluid, heatCap.port) + annotation (Line(points={{-12,36},{-12,52},{1.77636e-15,52}}, + color={191,0,0}, + pattern=LinePattern.Dash)); + connect(heatCap.port, conOut.solid) + annotation (Line(points={{1.77636e-15,52},{-12,52},{-12,70}}, + color={191,0,0}, + pattern=LinePattern.Dash)); + connect(conIns.Gc, heatLossIns.y) + annotation (Line(points={{-20,28},{-44.5,28}}, color={0,0,127}, + pattern=LinePattern.Dash)); + connect(conOut.fluid, port_out) + annotation (Line(points={{-12,86},{-12,100},{0,100}}, + color={191,0,0}, + pattern=LinePattern.Dash)); + connect(conOut.Gc, heatLossOut.y) + annotation (Line(points={{-20,78},{-44.5,78}}, color={0,0,127}, + pattern=LinePattern.Dash)); + connect(vol.heatPort, conIns.solid) annotation (Line( + points={{-9,-10},{-12,-10},{-12,20}}, + color={191,0,0}, + pattern=LinePattern.Dash)); + connect(vol.heatPort, preHea.port) annotation (Line(points={{-9,-10},{-12,-10}, + {-12,-34},{0,-34},{0,-56},{2.22045e-15,-56}}, color={191,0,0})); + connect(preHea.Q_flow, QFlow_in) annotation (Line(points={{-2.22045e-15,-80},{ + -2.22045e-15,-99},{0,-99},{0,-118}}, color={0,0,127})); + annotation (Icon(graphics={ Ellipse( + extent={{-48,46},{46,-42}}, + lineColor={0,0,0}, + fillPattern=FillPattern.Sphere, + fillColor={170,213,255}), + Rectangle( + extent={{-18,100},{18,-100}}, + lineColor={0,0,0}, + fillColor={192,192,192}, + fillPattern=FillPattern.Backward, + origin={0,68}, + rotation=90, + visible=use_cap), + Text( + extent={{-36,52},{36,82}}, + lineColor={0,0,0}, + pattern=LinePattern.Dash, + fillColor={255,215,136}, + fillPattern=FillPattern.Solid, + textString="C", + visible=use_cap), + Text( + extent={{-36,-18},{36,12}}, + lineColor={0,0,0}, + pattern=LinePattern.Dash, + fillColor={255,215,136}, + fillPattern=FillPattern.Solid, + textString="V"), + Rectangle( + extent={{-4,-42},{4,-50}}, + pattern=LinePattern.None, + fillColor={191,0,0}, + fillPattern=FillPattern.Solid, + lineColor={0,0,0}), + Rectangle( + extent={{-107,5},{-44,-4}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={0,0,255}, + fillPattern=FillPattern.Solid, + visible=is_con), + Rectangle( + extent={{44,-4},{100,5}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={255,0,0}, + fillPattern=FillPattern.Solid, + visible=is_con), + Line( + points={{0,-96},{0,-50},{0,-46}}, + color={0,0,0}, + pattern=LinePattern.None), + Line( + points={{-12,-76},{-12,-122},{50,-80},{82,-64},{4,-100}}, + color={0,0,0}, + pattern=LinePattern.None), + Line( + points={{-18,-70},{42,-44}}, + color={0,0,0}, + pattern=LinePattern.None), + Rectangle( + extent={{0,-98},{0,-48}}, + lineColor={238,46,47}, + pattern=LinePattern.None, + fillColor={191,0,0}, + fillPattern=FillPattern.Solid), + Line( + points={{-102,34},{-96,56},{-140,52},{-100,88},{-84,84},{-106,36}}, + color={238,46,47}, + pattern=LinePattern.None), + Line( + points={{-80,88},{-80,110},{-76,104},{-80,110},{-84,104}}, + color={28,108,200}, + visible=use_cap), + Line( + points={{-80,34},{-80,56},{-76,50},{-80,56},{-84,50}}, + color={238,46,47}, + visible=use_cap), + Line( + points={{-50,34},{-50,56},{-46,50},{-50,56},{-54,50}}, + color={238,46,47}, + visible=use_cap), + Line( + points={{-50,88},{-50,110},{-46,104},{-50,110},{-54,104}}, + color={28,108,200}, + visible=use_cap), + Line( + points={{80,34},{80,56},{84,50},{80,56},{76,50}}, + color={238,46,47}, + visible=use_cap), + Line( + points={{80,88},{80,110},{84,104},{80,110},{76,104}}, + color={28,108,200}, + visible=use_cap), + Line( + points={{50,88},{50,110},{54,104},{50,110},{46,104}}, + color={28,108,200}, + visible=use_cap), + Line( + points={{50,34},{50,56},{54,50},{50,56},{46,50}}, + color={238,46,47}, + visible=use_cap), + Line( + points={{20,34},{20,56},{24,50},{20,56},{16,50}}, + color={238,46,47}, + visible=use_cap), + Line( + points={{20,88},{20,110},{24,104},{20,110},{16,104}}, + color={28,108,200}, + visible=use_cap), + Line( + points={{-20,88},{-20,110},{-16,104},{-20,110},{-24,104}}, + color={28,108,200}, + visible=use_cap), + Line( + points={{-20,34},{-20,56},{-16,50},{-20,56},{-24,50}}, + color={238,46,47}, + visible=use_cap), + Rectangle( + extent={{-100,-4},{-44,5}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={255,0,0}, + fillPattern=FillPattern.Solid, + visible=not is_con), + Rectangle( + extent={{43,5},{106,-4}}, + lineColor={0,0,255}, + pattern=LinePattern.None, + fillColor={0,0,255}, + fillPattern=FillPattern.Solid, + visible=not is_con)}), Documentation(revisions=" +", info=" +

+ Model for an evaporator or condenser with the use of a capacity to + simulate heat losses. +

+

+ Used in IBPSA.Fluid.HeatPumps.HeatPump, + the heat flow to or from the volume is calculated in a black box. + Thus the heat is directly added to the medium. +

+

+ In order to model transient states and inertias of a real heat pump, + a capacity is added to the base model TwoPortHeatMassExchanger. +

+

+ The heat exchange between capacity and medium (GIns) is based on a series of heat + resistances caused by forced convection and conduction through the + capacity of the heat exchanger. Losses or gains in result of heat + exchange with the ambient are modeled through the heat exchange + coefficient GOut is + represented by a series of conductive resistances and the convection + to the ambient. +

+

+ Both parameters GIns + and GOut are variable + so that the calculation can follow a temperature or flow-rate based + approach. +

+")); +end EvaporatorCondenserWithCapacity; diff --git a/IBPSA/Fluid/HeatExchangers/package.order b/IBPSA/Fluid/HeatExchangers/package.order index 31ce71c7e6..e1015116ec 100644 --- a/IBPSA/Fluid/HeatExchangers/package.order +++ b/IBPSA/Fluid/HeatExchangers/package.order @@ -1,6 +1,7 @@ ConstantEffectiveness DryCoilEffectivenessNTU EvaporatorCondenser +EvaporatorCondenserWithCapacity HeaterCooler_u Heater_T PrescribedOutlet diff --git a/IBPSA/Fluid/HeatPumps/BaseClasses/InnerCycle_HeatPump.mo b/IBPSA/Fluid/HeatPumps/BaseClasses/InnerCycle_HeatPump.mo new file mode 100644 index 0000000000..692423e709 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BaseClasses/InnerCycle_HeatPump.mo @@ -0,0 +1,201 @@ +within IBPSA.Fluid.HeatPumps.BaseClasses; +model InnerCycle_HeatPump "Blackbox model of refrigerant cycle of a heat pump" + extends IBPSA.Fluid.BaseClasses.PartialInnerCycle; + + replaceable model PerDataMainHP = + IBPSA.Fluid.HeatPumps.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData + constrainedby + IBPSA.Fluid.HeatPumps.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData( + final scalingFactor = scalingFactor) + "Replaceable model for performance data of a heat pump in main operation mode" + annotation (choicesAllMatching=true); + + replaceable model PerDataRevHP = + IBPSA.Fluid.Chillers.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData + constrainedby + IBPSA.Fluid.Chillers.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData( + final scalingFactor = scalingFactor) + "Replaceable model for performance data of a heat pump in reversible operation mode" + annotation (Dialog(enable=use_rev),choicesAllMatching=true); + + PerDataMainHP PerformanceDataHPHeating + annotation (Placement(transformation( + extent={{7,20},{61,76}}, rotation=0))); + PerDataRevHP PerformanceDataHPCooling if use_rev + annotation (Placement(transformation(extent={{-27,-28},{27,28}}, + rotation=0,origin={-34,48}))); + Modelica.Blocks.Math.Gain gainEva(final k=-1) + "Negate QEva to match definition of heat flow direction" annotation ( + Placement(transformation( + extent={{-4,-4},{4,4}}, + rotation=180, + origin={-56,-6}))); + Modelica.Blocks.Math.Gain gainCon(final k=-1) if use_rev + "Negate QCon to match definition of heat flow direction" annotation ( + Placement(transformation( + extent={{-4,-4},{4,4}}, + rotation=0, + origin={58,-20}))); + +equation + + connect(PerformanceDataHPHeating.QCon, switchQCon.u1) + annotation (Line(points={{12.4,17.2},{12.4,-4},{68,-4}}, color={0,0,127})); + connect(PerformanceDataHPHeating.Pel, switchPel.u1) annotation (Line( + points={{34,17.2},{34,-30},{8,-30},{8,-68}}, color={0,0,127})); + connect(PerformanceDataHPCooling.Pel, switchPel.u3) annotation ( + Line( + points={{-34,17.2},{-34,-30},{-8,-30},{-8,-68}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(PerformanceDataHPCooling.QEva, switchQEva.u3) annotation ( + Line( + points={{-12.4,17.2},{-12.4,-22},{-68,-22}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(constZero.y, switchPel.u3) + annotation (Line(points={{-59,-68},{-34,-68},{-34,-68},{-8,-68}}, + color={0,0,127})); + connect(constZero.y, switchQEva.u3) annotation (Line(points={{-59,-68},{-52,-68}, + {-52,-22},{-68,-22}}, color={0,0,127}, + pattern=LinePattern.Dash)); + connect(constZero.y, switchQCon.u3) annotation (Line(points={{-59,-68},{-52,-68}, + {-52,-38},{68,-38},{68,-20}}, color={0,0,127}, + pattern=LinePattern.Dash)); + connect(gainEva.y, switchQEva.u1) + annotation (Line(points={{-60.4,-6},{-68,-6}}, color={0,0,127})); + connect(switchQCon.u3, gainCon.y) annotation (Line( + points={{68,-20},{62.4,-20}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(PerformanceDataHPCooling.QCon, gainCon.u) annotation (Line( + points={{-55.6,17.2},{-55.6,2},{-24,2},{-24,-20},{53.2,-20}}, + color={0,0,127}, + pattern=LinePattern.Dash)); + connect(PerformanceDataHPHeating.QEva, gainEva.u) annotation (Line(points={{55.6, + 17.2},{55.6,-6},{-51.2,-6}}, color={0,0,127})); + connect(sigBus, PerformanceDataHPCooling.sigBus) annotation (Line( + points={{0,102},{0,86},{-33.73,86},{-33.73,77.12}}, + color={255,204,51}, + thickness=0.5)); + connect(sigBus, PerformanceDataHPHeating.sigBus) annotation (Line( + points={{0,102},{0,86},{34.27,86},{34.27,77.12}}, + color={255,204,51}, + thickness=0.5)); + annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={ + Rectangle( + extent={{-100,100},{100,-100}}, + lineColor={238,46,47}, + fillColor={0,0,0}, + fillPattern=FillPattern.Solid), + Ellipse( + extent={{-24,88},{22,44}}, + lineColor={28,108,200}, + lineThickness=0.5), + Line( + points={{-16,82},{20,74}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{-18,52},{20,58}}, + color={28,108,200}, + thickness=0.5), + Rectangle( + extent={{-98,40},{-60,-28}}, + lineColor={28,108,200}, + lineThickness=0.5), + Line( + points={{-20,-60},{-20,-70},{-20,-80},{20,-60},{20,-80},{-20,-60}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{-122,34},{-66,34},{-82,10},{-66,-22},{-120,-22}}, + color={28,108,200}, + thickness=0.5), + Rectangle( + extent={{60,40},{98,-28}}, + lineColor={28,108,200}, + lineThickness=0.5), + Line( + points={{120,34},{64,34},{80,10},{64,-22},{118,-22}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{-80,40},{-80,68},{-24,68}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{22,66},{80,66},{80,40}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{78,-28},{78,-70}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{78,-70},{62,-70},{20,-70}}, + color={28,108,200}, + thickness=0.5), + Line( + points={{-80,-26},{-80,-68},{-20,-68}}, + color={28,108,200}, + thickness=0.5), + Text( + extent={{-30,28},{30,-28}}, + lineColor={28,108,200}, + lineThickness=0.5, + textString="%name", + origin={0,-8}, + rotation=90)}), Diagram(coordinateSystem(preserveAspectRatio=false)), + Documentation(revisions=" +", info=" +

+ This black box model represents the refrigerant cycle of a heat pump. + Used in IBPSA.Fluid.HeatPumps.HeatPump, this model serves the + simulation of a reversible heat pump. Thus, data both of chillers and + heat pumps can be used to calculate the three relevant values + P_el, QCon and QEva. The mode of the heat pump is used to + switch between the performance data of the chiller and the heat pump. +

+

+ The user can choose between different types of performance data or + implement a new black-box model by extending from the + partial model. +

+ +")); +end InnerCycle_HeatPump; diff --git a/IBPSA/Fluid/HeatPumps/BaseClasses/package.order b/IBPSA/Fluid/HeatPumps/BaseClasses/package.order index 407307198e..e860402fd7 100644 --- a/IBPSA/Fluid/HeatPumps/BaseClasses/package.order +++ b/IBPSA/Fluid/HeatPumps/BaseClasses/package.order @@ -1 +1,2 @@ PartialWaterToWater +InnerCycle_HeatPump diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/AlphaInnotec_LW80MA.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/AlphaInnotec_LW80MA.mo new file mode 100644 index 0000000000..5ea6f508e4 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/AlphaInnotec_LW80MA.mo @@ -0,0 +1,27 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.EN14511; +record AlphaInnotec_LW80MA "Alpha Innotec LW 80 M-A" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.HeatPumpBaseDataDefinition( + tableP_ele=[0,-7,2,7,10,15,20; 35,2625,2424,2410,2395,2347,2322; 45,3136, + 3053,3000,2970,2912,2889; 50,3486,3535,3451,3414,3365,3385], + tableQdot_con=[0,-7,2,7,10,15,20; 35,6300,8000,9400,10300,11850,13190; 45, + 6167,7733,9000,9750,11017,11730; 50,6100,7600,8800,9475,10600,11000], + mFlow_conNom=9400/4180/5, + mFlow_evaNom=1, + tableUppBou=[-25,65; 40,65]); + //These boundary-tables are not from the datasheet but default values. + + annotation(preferedView="text", DymolaStoredErrors, + Icon, + Documentation(revisions=" +", info=" +

+ According to manufacturer's data which was inter- and extrapolated + linearly; EN14511 +

+")); +end AlphaInnotec_LW80MA; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Dimplex_LA11AS.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Dimplex_LA11AS.mo new file mode 100644 index 0000000000..5a3704375e --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Dimplex_LA11AS.mo @@ -0,0 +1,24 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.EN14511; +record Dimplex_LA11AS "Dimplex LA 11 AS" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.HeatPumpBaseDataDefinition( + tableP_ele=[0,-7,2,7,10; 35,2444,2839,3139,3103; 45,2783,2974,3097,3013], + tableQdot_con=[0,-7,2,7,10; 35,6600,8800,11300,12100; 45,6400,7898,9600, + 10145], + mFlow_conNom=11300/4180/5, + mFlow_evaNom=1, + tableUppBou=[-25,58; 35,58]); + + annotation(preferedView="text", DymolaStoredErrors, + Icon, + Documentation(revisions=" +", info=" +

+ According to data from Dimplex data sheets; EN14511 +

+")); +end Dimplex_LA11AS; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Ochsner_GMLW_19.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Ochsner_GMLW_19.mo new file mode 100644 index 0000000000..b17d88515d --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Ochsner_GMLW_19.mo @@ -0,0 +1,23 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.EN14511; +record Ochsner_GMLW_19 "Ochsner GMLW 19" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.HeatPumpBaseDataDefinition( + tableP_ele=[0,-10,2,7; 35,4300,4400,4600; 50,6300,6400,6600], + tableQdot_con=[0,-10,2,7; 35,11600,17000,20200; 50,10200,15600,18800], + mFlow_conNom=20200/4180/5, + mFlow_evaNom=1, + tableUppBou=[-15,55; 40,55]); + + annotation(preferedView="text", DymolaStoredErrors, + Icon, + Documentation(revisions=" +", info=" +

+ According to data from Ochsner data sheets; EN14511 +

+")); +end Ochsner_GMLW_19; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Ochsner_GMLW_19plus.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Ochsner_GMLW_19plus.mo new file mode 100644 index 0000000000..88e35cd92d --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Ochsner_GMLW_19plus.mo @@ -0,0 +1,25 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.EN14511; +record Ochsner_GMLW_19plus "Ochsner GMLW 19 plus" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.HeatPumpBaseDataDefinition( + tableP_ele=[0,-10,2,7; 35,4100,4300,4400; 50,5500,5700,5800; 60,6300,6500, + 6600], + tableQdot_con=[0,-10,2,7; 35,12600,16800,19800; 50,11700,15900,18900; 60, + 11400,15600,18600], + mFlow_conNom=19800/4180/5, + mFlow_evaNom=1, + tableUppBou=[-24,52; -15,55; -10,65; 40,65]); + + annotation(preferedView="text", DymolaStoredErrors, + Icon, + Documentation(revisions=" +", info=" +

+ According to data from Ochsner data sheets; EN14511 +

+")); +end Ochsner_GMLW_19plus; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Ochsner_GMSW_15plus.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Ochsner_GMSW_15plus.mo new file mode 100644 index 0000000000..9d993cd0ec --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Ochsner_GMSW_15plus.mo @@ -0,0 +1,25 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.EN14511; +record Ochsner_GMSW_15plus "Ochsner GMSW 15 plus" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.HeatPumpBaseDataDefinition( + tableP_ele=[0,-5,0,5; 35,3225,3300,3300; 45,4000,4000,4000; 55,4825,4900, + 4900], + tableQdot_con=[0,-5,0,5; 35,12762,14500,16100; 45,12100,13900,15600; 55, + 11513,13200,14900], + mFlow_conNom=14500/4180/5, + mFlow_evaNom=(14500 - 3300)/3600/3, + tableUppBou=[-8,52; 0,65; 20,65]); + + annotation(preferedView="text", DymolaStoredErrors, + Icon, + Documentation(revisions=" +", info=" +

+ According to data from WPZ Buchs, Swiss; EN14511 +

+")); +end Ochsner_GMSW_15plus; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/StiebelEltron_WPL18.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/StiebelEltron_WPL18.mo new file mode 100644 index 0000000000..829ab1cb9c --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/StiebelEltron_WPL18.mo @@ -0,0 +1,26 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.EN14511; +record StiebelEltron_WPL18 "Stiebel Eltron WPL 18" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.HeatPumpBaseDataDefinition( + tableP_ele=[0,-7,2,7,10,20; 35,3300,3400,3500,3700,3800; 50,4500,4400,4600, + 5000,5100], + tableQdot_con=[0,-7,2,7,10,20; 35,9700,11600,13000,14800,16300; 50,10000, + 11200,12900,16700,17500], + mFlow_conNom=13000/4180/5, + mFlow_evaNom=1, + tableUppBou=[-25,65; 40,65]); + //These boundary-tables are not from the datasheet but default values. + + annotation(preferedView="text", DymolaStoredErrors, + Icon, + Documentation(revisions=" +", info=" +

+ According to data from WPZ Buchs, Swiss; EN14511 +

+")); +end StiebelEltron_WPL18; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Vaillant_VWL_101.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Vaillant_VWL_101.mo new file mode 100644 index 0000000000..de80767a7b --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Vaillant_VWL_101.mo @@ -0,0 +1,26 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.EN14511; +record Vaillant_VWL_101 "Vaillant VWL10-1" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.HeatPumpBaseDataDefinition( + tableP_ele=[0,-15,-7,2,7; 35,2138,2177,2444,2444; 45,2558,2673,2864,3055; + 55,2902,3131,3360,3513], + tableQdot_con=[0,-15,-7,2,7; 35,5842,7523,9776,10807; 45,5842,7332,9050, + 10387; 55,5728,7179,9050,10043], + mFlow_conNom=9776/4180/5, + mFlow_evaNom=1, + tableUppBou=[-25,65; 40,65]); + //These boundary-tables are not from the datasheet but default values. + + annotation(preferedView="text", DymolaStoredErrors, + Icon, + Documentation(revisions=" +", + info="

+ According to data from Vaillant data sheets; EN14511 +

+")); +end Vaillant_VWL_101; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Vitocal200AWO201.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Vitocal200AWO201.mo new file mode 100644 index 0000000000..6a6ddcbb8c --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/Vitocal200AWO201.mo @@ -0,0 +1,31 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.EN14511; +record Vitocal200AWO201 + "Vitocal200AWO201" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.HeatPumpBaseDataDefinition( + tableP_ele=[0,-15,-7,2,7,10,20,30; 35,1290.0,1310.0,730.0,870.0,850.0,830.0, + 780.0; 45,1550.0,1600.0,870.0,1110.0,1090.0,1080.0,1040.0; 55,1870.0, + 1940.0,1170.0,1370.0,1370.0,1370.0,1350.0], + tableQdot_con=[0,-15,-7,2,7,10,20,30; 35,3020,3810,2610,3960,4340,5350,6610; + 45,3020,3780,2220,3870,4120,5110,6310; 55,3120,3790,2430,3610,3910,4850, + 6000], + mFlow_conNom=3960/4180/5, + mFlow_evaNom=(2250*1.2)/3600, + tableUppBou=[-20,50; -10,60; 30,60; 35,55]); + + annotation ( + Icon(coordinateSystem(preserveAspectRatio=false)), + Diagram(coordinateSystem(preserveAspectRatio=false)), + Documentation(info="

+ Data record for type AWO-M/AWO-M-E-AC 201.A04, + obtained from the technical guide in the UK. +

+ +")); +end Vitocal200AWO201; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/package.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/package.mo new file mode 100644 index 0000000000..1434d0aeb8 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/package.mo @@ -0,0 +1,10 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData; +package EN14511 + + + + + + + +end EN14511; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/package.order b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/package.order new file mode 100644 index 0000000000..ffcced3aba --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN14511/package.order @@ -0,0 +1,8 @@ +AlphaInnotec_LW80MA +Dimplex_LA11AS +Ochsner_GMLW_19 +Ochsner_GMLW_19plus +Ochsner_GMSW_15plus +StiebelEltron_WPL18 +Vaillant_VWL_101 +Vitocal200AWO201 diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/AlphaInnotec_SW170I.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/AlphaInnotec_SW170I.mo new file mode 100644 index 0000000000..69a5e2e2ad --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/AlphaInnotec_SW170I.mo @@ -0,0 +1,22 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.EN255; +record AlphaInnotec_SW170I "Alpha Innotec SW 170 I" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.HeatPumpBaseDataDefinition( + tableP_ele=[0,-5.0,0.0,5.0; 35,3700,3600,3600; 50,5100,5100,5100], + tableQdot_con=[0,-5.0,0.0,5.0; 35,14800,17200,19100; 50,14400,16400,18300], + mFlow_conNom=17200/4180/10, + mFlow_evaNom=13600/3600/3, + tableUppBou=[-22,65; 45,65]); + + annotation(preferedView="text", DymolaStoredErrors, + Icon, + Documentation(info="

+ According to data from WPZ Buchs, Swiss; EN 255. +

+ +")); +end AlphaInnotec_SW170I; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/NibeFighter1140_15.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/NibeFighter1140_15.mo new file mode 100644 index 0000000000..e75a63987f --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/NibeFighter1140_15.mo @@ -0,0 +1,24 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.EN255; +record NibeFighter1140_15 "Nibe Fighter 1140-15" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.HeatPumpBaseDataDefinition( + tableP_ele=[0,-5.0,0.0,2,5.0,10; 35,3360,3380,3380,3390,3400; 55,4830,4910, + 4940,4990,5050], + tableQdot_con=[0,-5.0,0.0,2,5.0,10; 35,13260,15420,16350,17730,19930; 55, + 12560,14490,15330,16590,18900], + mFlow_conNom=15420/4180/10, + mFlow_evaNom=(15420 - 3380)/3600/3, + tableUppBou=[-35,65; 50,65]); + + annotation(preferedView="text", DymolaStoredErrors, + Icon, + Documentation(info="

+ According to manufacturer's data; EN 255. +

+ +")); +end NibeFighter1140_15; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/Vitocal350AWI114.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/Vitocal350AWI114.mo new file mode 100644 index 0000000000..4811d8498e --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/Vitocal350AWI114.mo @@ -0,0 +1,32 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.EN255; +record Vitocal350AWI114 "Vitocal 350 AWI 114" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.HeatPumpBaseDataDefinition( + tableP_ele=[0,-20,-15,-10,-5,0,5,10,15,20,25,30; 35,3295.500,3522.700,3750, + 3977.300,4034.100,4090.900,4204.500,4375,4488.600,4488.600,4545.500; 50, + 4659.100,4886.400,5113.600,5227.300,5511.400,5568.200,5738.600,5909.100, + 6022.700,6250,6477.300; 65,0,6875,7159.100,7500,7727.300,7897.700, + 7954.500,7954.500,8181.800,8409.100,8579.500], + tableQdot_con=[0,-20,-15,-10,-5,0,5,10,15,20,25,30; 35,9204.500,11136.40, + 11477.30,12215.90,13863.60,15056.80,16931.80,19090.90,21250,21477.30, + 21761.40; 50,10795.50,11988.60,12215.90,13068.20,14545.50,15681.80, + 17613.60,20284.10,22500,23181.80,23863.60; 65,0,12954.50,13465.90, + 14431.80,15965.90,17386.40,19204.50,21250,22897.70,23863.60,24886.40], + mFlow_conNom=15400/4180/10, + mFlow_evaNom=1, + tableUppBou=[-20,55; -5,65; 35,65]); + + annotation(preferedView="text", DymolaStoredErrors, + Icon, + Documentation(info="

+ Data from manufacturer's data sheet (Viessmann). These exact curves + are given in the data sheet for measurement procedure according to EN + 255. +

+ +")); +end Vitocal350AWI114; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/Vitocal350BWH110.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/Vitocal350BWH110.mo new file mode 100644 index 0000000000..d37372e855 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/Vitocal350BWH110.mo @@ -0,0 +1,28 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.EN255; +record Vitocal350BWH110 "Vitocal 350 BWH 110" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.HeatPumpBaseDataDefinition( + tableP_ele=[0,-5.0,0.0,5.0,10.0,15.0; 35,2478,2522,2609,2696,2783; 45,3608, + 3652,3696,3739,3783; 55,4217,4261,4304,4348,4391; 65,5087,5130,5174, + 5217,5261], + tableQdot_con=[0,-5.0,0.0,5.0,10.0,15.0; 35,9522,11000,12520,14000,15520; + 45,11610,12740,13910,15090,16220; 55,11610,12740,13910,15090,16220; 65, + 11610,12740,13910,15090,16220], + mFlow_conNom=11000/4180/10, + mFlow_evaNom=8400/3600/3, + tableUppBou=[-5,55; 25,55]); + + annotation(preferedView="text", DymolaStoredErrors, + Icon, + Documentation(info="

+ Data from manufacturer's data sheet (Viessmann). These exact curves + are given in the data sheet for measurement procedure according to EN + 255. +

+ +")); +end Vitocal350BWH110; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/Vitocal350BWH113.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/Vitocal350BWH113.mo new file mode 100644 index 0000000000..301f847318 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/Vitocal350BWH113.mo @@ -0,0 +1,28 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.EN255; +record Vitocal350BWH113 "Vitocal 350 BWH 113" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.HeatPumpBaseDataDefinition( + tableP_ele=[0,-5.0,0.0,5.0,10.0,15.0; 35,3750,3750,3750,3750,3833; 45,4833, + 4917,4958,5042,5125; 55,5583,5667,5750,5833,5958; 65,7000,7125,7250, + 7417,7583], + tableQdot_con=[0,-5.0,0.0,5.0,10.0,15.0; 35,14500,16292,18042,19750,21583; + 45,15708,17167,18583,20083,21583; 55,15708,17167,18583,20083,21583; 65, + 15708,17167,18583,20083,21583], + mFlow_conNom=16292/4180/10, + mFlow_evaNom=12300/3600/3, + tableUppBou=[-5,55; 25,55]); + + annotation(preferedView="text", DymolaStoredErrors, + Icon, + Documentation(info="

+ Data from manufacturer's data sheet (Viessmann). These exact curves + are given in the data sheet for measurement procedure according to EN + 255. +

+ +")); +end Vitocal350BWH113; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/package.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/package.mo new file mode 100644 index 0000000000..74de6bba68 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/package.mo @@ -0,0 +1,8 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData; +package EN255 + + + + + +end EN255; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/package.order b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/package.order new file mode 100644 index 0000000000..2befecb23b --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EN255/package.order @@ -0,0 +1,5 @@ +AlphaInnotec_SW170I +NibeFighter1140_15 +Vitocal350AWI114 +Vitocal350BWH110 +Vitocal350BWH113 diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/CarnotFunction.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/CarnotFunction.mo new file mode 100644 index 0000000000..50cd885ad1 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/CarnotFunction.mo @@ -0,0 +1,40 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.Characteristics; +function CarnotFunction + "Function to emulate the polynomal approach of the Carnot_y heat pump model" + extends PartialBaseFct; + parameter Modelica.Units.SI.Power Pel_nominal=2000 + "Constant nominal electric power"; + parameter Real etaCarnot_nominal(unit="1") = 0.5 + "Carnot effectiveness (=COP/COP_Carnot) used if use_eta_Carnot_nominal = true" + annotation (Dialog(group="Efficiency", enable=use_eta_Carnot_nominal)); + + parameter Real a[:] = {1} + "Coefficients for efficiency curve (need p(a=a, yPL=1)=1)" + annotation (Dialog(group="Efficiency")); +protected + Modelica.Units.SI.Power Pel; + Real COP; + Real COP_carnot; + Real etaPartLoad = IBPSA.Utilities.Math.Functions.polynomial(a=a, x=N); +algorithm + assert(abs(T_con - T_eva)>Modelica.Constants.eps, "Temperatures have to differ to calculate the Carnot efficiency", AssertionLevel.warning); + COP_carnot :=T_con/(T_con - T_eva); + Pel :=Pel_nominal*N; + COP :=etaCarnot_nominal*etaPartLoad*COP_carnot; + Char[1] :=Pel; + Char[2] :=COP*Pel; + annotation (Documentation(revisions=" +", info=" +

+ This function emulated the the Carnot model (IBPSA.Fluid.Chillers.BaseClasses.Carnot). + See this description for more info on assumptions etc. +

+")); +end CarnotFunction; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/ConstantCoP.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/ConstantCoP.mo new file mode 100644 index 0000000000..186a63b801 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/ConstantCoP.mo @@ -0,0 +1,29 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.Characteristics; +function ConstantCoP "Constant CoP and constant electric power" + extends + IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.Characteristics.PartialBaseFct( + N, + T_con, + T_eva, + mFlow_eva, + mFlow_con); + parameter Modelica.Units.SI.Power powerCompressor=2000 + "Constant electric power input for compressor"; + parameter Real CoP "Constant CoP"; +algorithm + Char:= {powerCompressor,powerCompressor*CoP}; + + annotation (Documentation(info="

+ Carnot CoP and constant electric power, no dependency on speed or + mass flow rates! +

+", + revisions=" + +")); +end ConstantCoP; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/ConstantQualityGrade.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/ConstantQualityGrade.mo new file mode 100644 index 0000000000..c5450cfccc --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/ConstantQualityGrade.mo @@ -0,0 +1,33 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.Characteristics; +function ConstantQualityGrade + "Carnot CoP multiplied with constant quality grade and constant electric power" + extends + IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.Characteristics.PartialBaseFct( + N, + T_con, + T_eva, + mFlow_eva, + mFlow_con); + parameter Real qualityGrade=0.3 "Constant quality grade"; + parameter Modelica.Units.SI.Power P_com=2000 + "Constant electric power input for compressor"; +protected + Real CoP_C "Carnot CoP"; +algorithm + CoP_C:=T_con/(T_con - T_eva); + Char:= {P_com,P_com*CoP_C*qualityGrade}; + + annotation (Documentation(info="

+ Carnot CoP multiplied with constant quality grade and constant + electric power, no dependency on speed or mass flow rates! +

+", + revisions=" + +")); +end ConstantQualityGrade; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/PartialBaseFct.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/PartialBaseFct.mo new file mode 100644 index 0000000000..bb94f167ce --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/PartialBaseFct.mo @@ -0,0 +1,26 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.Characteristics; +partial function PartialBaseFct "Base class for Cycle Characteristic" + extends Modelica.Icons.Function; + input Real N "Relative compressor speed"; + input Real T_con "Condenser outlet temperature"; + input Real T_eva "Evaporator inlet temperature"; + input Real mFlow_eva "Mass flow rate at evaporator"; + input Real mFlow_con "Mass flow rate at condenser"; + output Real Char[2] "Array with [Pel, QCon]"; + + annotation (Documentation(info="

+ Base funtion used in HeatPump model. It defines the inputs speed N + (1/min), condenser outlet temperature T_co (K) and evaporator inlet + temperature T_ev (K). The output is the vector Char: first value is + compressor power, second value is the condenser heat flow rate. +

+", + revisions=" + +")); +end PartialBaseFct; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/PolynomalApproach.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/PolynomalApproach.mo new file mode 100644 index 0000000000..fcfb92751d --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/PolynomalApproach.mo @@ -0,0 +1,52 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.Characteristics; +function PolynomalApproach + "Function to emulate the polynomal approach of the TRNSYS Type 401 heat pump model" + extends PartialBaseFct; + parameter Modelica.Units.SI.Power p[6] = {0,0,0,0,0,0} + "Polynomal coefficient for the electrical power"; + parameter Modelica.Units.SI.HeatFlowRate q[6] = {0,0,0,0,0,0} + "Polynomal coefficient for the condenser heat flow"; + +protected + Real TEva_n = T_eva/273.15 + 1 "Normalized evaporator temperature"; + Real TCon_n = T_con/273.15 + 1 "Normalized condenser temperature"; +algorithm + if N >= Modelica.Constants.eps then + Char[1] := p[1] + p[2]*TEva_n + p[3]*TCon_n + p[4]*TCon_n*TEva_n + p[5]*TEva_n^2 + p[6]*TCon_n^2; //Pel + Char[2] := q[1] + q[2]*TEva_n + q[3]*TCon_n + q[4]*TCon_n*TEva_n + q[5]*TEva_n^2 + q[6]*TCon_n^2; //QCon + else //Maybe something better could be used such as smooth() + Char[1] := 0; + Char[2] := 0; + end if; + annotation (Documentation(revisions=" +", info=" +

+ Based on the work of Afjej and Wetter, 1997 [1] and the TRNYS Type + 401 heat pump model, this function uses a six-coefficient polynom to + calculate the electrical power and the heat flow to the condenser. + The coefficients are calculated based on the data in DIN EN 14511 + with a minimization-problem in python using the + root-mean-square-error. +

+

+ The normalized input temperatures are calculated with the formular: +

+

+ T_n = (T/273.15) + 1 +

+

+ The coefficients for the polynomal functions are stored inside the + record for heat pumps in IBPSA.DataBase.HeatPump. +

+

+ [1]: https://www.trnsys.de/download/en/ts_type_401_en.pdf +

+")); +end PolynomalApproach; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/package.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/package.mo new file mode 100644 index 0000000000..5580cb8676 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/package.mo @@ -0,0 +1,7 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.Functions; +package Characteristics + extends Modelica.Icons.Package; + + + +end Characteristics; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/package.order b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/package.order new file mode 100644 index 0000000000..44876c75fc --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/Characteristics/package.order @@ -0,0 +1,5 @@ +CarnotFunction +ConstantCoP +ConstantQualityGrade +PartialBaseFct +PolynomalApproach diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/NoModel.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/NoModel.mo new file mode 100644 index 0000000000..3ebc282b05 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/NoModel.mo @@ -0,0 +1,21 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.DefrostCorrection; +function NoModel "No model" + extends + IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.DefrostCorrection.PartialBaseFct( + T_eva); + +algorithm +f_CoPicing:=1; + + annotation (Documentation(info="

+ No correction factor for icing/defrosting: f_cop_icing=1. +

+", + revisions=" +")); +end NoModel; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/PartialBaseFct.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/PartialBaseFct.mo new file mode 100644 index 0000000000..13c5c9addc --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/PartialBaseFct.mo @@ -0,0 +1,19 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.DefrostCorrection; +partial function PartialBaseFct + "Base class for correction model, icing and defrosting of evaporator" + extends Modelica.Icons.Function; + input Real T_eva; + output Real f_CoPicing; + annotation (Documentation(info="

+ Base funtion used in HeatPump model. Input is the evaporator inlet + temperature, output is a CoP-correction factor f_cop_icing. +

+", + revisions=" +")); +end PartialBaseFct; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/WetterAfjei1996.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/WetterAfjei1996.mo new file mode 100644 index 0000000000..8d08906609 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/WetterAfjei1996.mo @@ -0,0 +1,37 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.DefrostCorrection; +function WetterAfjei1996 + "Correction of CoP (Icing, Defrost) according to Wetter,Afjei 1996" + extends + IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.DefrostCorrection.PartialBaseFct( + T_eva); + +parameter Real A=0.03; +parameter Real B=-0.004; +parameter Real C=0.1534; +parameter Real D=0.8869; +parameter Real E=26.06; +protected +Real factor; +Real linear_term; +Real gauss_curve; +algorithm +linear_term:=A + B*T_eva; +gauss_curve:=C*Modelica.Math.exp(-(T_eva - D)*(T_eva - D)/E); +if linear_term>0 then + factor:=linear_term + gauss_curve; +else + factor:=gauss_curve; +end if; +f_CoPicing:=1-factor; + annotation (Documentation(info="

+ Correction of CoP (Icing, Defrost) according to Wetter,Afjei 1996. +

+", + revisions=" +")); +end WetterAfjei1996; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/package.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/package.mo new file mode 100644 index 0000000000..2b88fe8cfd --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/package.mo @@ -0,0 +1,7 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.Functions; +package DefrostCorrection + extends Modelica.Icons.Package; + + + +end DefrostCorrection; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/package.order b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/package.order new file mode 100644 index 0000000000..6446620fe7 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/DefrostCorrection/package.order @@ -0,0 +1,3 @@ +NoModel +PartialBaseFct +WetterAfjei1996 diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/BasicIcingApproach.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/BasicIcingApproach.mo new file mode 100644 index 0000000000..20c5485f4d --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/BasicIcingApproach.mo @@ -0,0 +1,23 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.IcingFactor; +function BasicIcingApproach + "A function which utilizes the outdoor air temperature and current heat flow from the evaporator" + extends PartialBaseFct; +algorithm + //Just a placeholder for a future icing function + //Efficiency factor (0..1) to estimate influence of icing. 0 means no heat is transferred through heat exchanger (fully frozen); 1 means no icing/frosting. + iceFac :=1; + + annotation (Documentation(revisions=" +", info=" +

+ This function can be used to implement a simple icing approach, e.g. + based on outdoor air temperature or time based. +

+")); +end BasicIcingApproach; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/PartialBaseFct.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/PartialBaseFct.mo new file mode 100644 index 0000000000..018f61ffbd --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/PartialBaseFct.mo @@ -0,0 +1,29 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.IcingFactor; +partial function PartialBaseFct "Base function for all icing factor functions" + extends Modelica.Icons.Function; + input Modelica.Units.SI.ThermodynamicTemperature T_flow_ev "Evaporator supply temperature"; + input Modelica.Units.SI.ThermodynamicTemperature T_ret_ev "Evaporator return temperature"; + input Modelica.Units.SI.ThermodynamicTemperature T_oda "Outdoor air temperature"; + input Modelica.Units.SI.MassFlowRate m_flow_ev "Mass flow rate at the evaporator"; + output Real iceFac(min=0, max=1) "Efficiency factor (0..1) to estimate influence of icing. 0 means no heat is transferred through heat exchanger (fully frozen). 1 means no icing/frosting."; + + annotation (Documentation(revisions=" +", info=" +

+ Base function for calculation of the icing factor. The normalized + value represents reduction of heat exchange as a result of icing of + the evaporator. +

+

+ iceFac: Efficiency factor (0..1) to estimate influence of icing. 0 + means no heat is transferred through heat exchanger (fully frozen); 1 + means no icing/frosting. +

+")); +end PartialBaseFct; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/WetterAfjei1996.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/WetterAfjei1996.mo new file mode 100644 index 0000000000..3f93d779f8 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/WetterAfjei1996.mo @@ -0,0 +1,37 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.IcingFactor; +function WetterAfjei1996 + "Correction of CoP (Icing, Defrost) according to Wetter,Afjei 1996" + extends + IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.IcingFactor.PartialBaseFct; + +parameter Real A=0.03; +parameter Real B=-0.004; +parameter Real C=0.1534; +parameter Real D=0.8869; +parameter Real E=26.06; +protected +Real factor; +Real linear_term; +Real gauss_curve; +algorithm +linear_term:=A + B*T_flow_ev; +gauss_curve:=C*Modelica.Math.exp(-(T_flow_ev - D)*(T_flow_ev - D)/E); +if linear_term>0 then + factor:=linear_term + gauss_curve; +else + factor:=gauss_curve; +end if; +iceFac:=1-factor; + annotation (Documentation(info="

+ Correction of CoP (Icing, Defrost) according to Wetter,Afjei 1996. +

+", + revisions=" +")); +end WetterAfjei1996; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/package.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/package.mo new file mode 100644 index 0000000000..2389060f4e --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/package.mo @@ -0,0 +1,18 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.Functions; +package IcingFactor "Package with functions to calculate current icing factor on evaporator" +annotation (Documentation(revisions=" +", info=" +

+ This package contains functions for calculation of an icing factor + used in + IBPSA.Fluid.HeatPumps.BaseClasses.PerformanceData.IcingBlock. +

+")); +end IcingFactor; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/package.order b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/package.order new file mode 100644 index 0000000000..24d54b820d --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/IcingFactor/package.order @@ -0,0 +1,3 @@ +BasicIcingApproach +PartialBaseFct +WetterAfjei1996 diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/package.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/package.mo new file mode 100644 index 0000000000..aac4744022 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/package.mo @@ -0,0 +1,4 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData; +package Functions "Functions for IBPSA.Fluid.HeatPumps" +extends Modelica.Icons.Package; +end Functions; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/package.order b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/package.order new file mode 100644 index 0000000000..4b9ff6a5eb --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/Functions/package.order @@ -0,0 +1,3 @@ +Characteristics +DefrostCorrection +IcingFactor diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/HeatPumpBaseDataDefinition.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/HeatPumpBaseDataDefinition.mo new file mode 100644 index 0000000000..5da51a68eb --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/HeatPumpBaseDataDefinition.mo @@ -0,0 +1,66 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData; +record HeatPumpBaseDataDefinition "Basic heat pump data" + extends Modelica.Icons.Record; + parameter Real tableQdot_con[:,:] "Heating power table; T in degC; Q_flow in W"; + parameter Real tableP_ele[:,:] "Electrical power table; T in degC; Q_flow in W"; + parameter Modelica.Units.SI.MassFlowRate mFlow_conNom + "Nominal mass flow rate in condenser"; + parameter Modelica.Units.SI.MassFlowRate mFlow_evaNom + "Nominal mass flow rate in evaporator"; + parameter Real tableUppBou[:,2] "Points to define upper boundary for sink temperature"; + + annotation (Documentation(info="

+ Overview +

Base data definition used in the heat pump model. It defines the +table table_Qdot_Co +which gives the condenser heat flow rate and table_Pel which gives the electric +power consumption of the heat pump. Both tables define the power values +depending on the evaporator inlet temperature (defined in first row) +and the condenser outlet temperature (defined in first column) in W. +The nominal mass flow rate in the condenser and evaporator are also +defined as parameters. +

+ Calculation of nominal mass flow + rates +

+Condenser mFlow_conNom +Evaporator mFlow_evaNom: + +", + revisions=" + +"),Icon, preferedView="info"); +end HeatPumpBaseDataDefinition; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/BaseClasses/PartialPerformanceData.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/BaseClasses/PartialPerformanceData.mo new file mode 100644 index 0000000000..fc1d22ef6e --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/BaseClasses/PartialPerformanceData.mo @@ -0,0 +1,92 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.PerformanceData.BaseClasses; +partial model PartialPerformanceData + "Model with a replaceable for different methods of data aggregation" + + Modelica.Blocks.Interfaces.RealOutput Pel(final unit="W", final displayUnit="kW") + "Electrical Power consumed by HP" annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={0,-110}))); + Modelica.Blocks.Interfaces.RealOutput QCon(final unit="W", final displayUnit="kW") + "Heat flow rate through Condenser" annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={-80,-110}))); + IBPSA.Fluid.Interfaces.VapourCompressionMachineControlBus sigBus + "Bus-connector used in a heat pump" annotation (Placement( + transformation( + extent={{-15,-14},{15,14}}, + rotation=0, + origin={1,104}))); + Modelica.Blocks.Interfaces.RealOutput QEva(final unit="W", final displayUnit="kW") + "Heat flow rate through Evaporator" annotation (Placement( + transformation( + extent={{-10,-10},{10,10}}, + rotation=270, + origin={80,-110}))); + Modelica.Blocks.Math.Add calcRedQCon + "Based on redcued heat flow to the evaporator, the heat flow to the condenser is also reduced" + annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=270, + origin={80,-68}))); + Modelica.Blocks.Math.Product proRedQEva + "Based on the icing factor, the heat flow to the evaporator is reduced" + annotation (Placement(transformation( + extent={{-6,6},{6,-6}}, + rotation=270, + origin={-80,-60}))); +protected + parameter Real scalingFactor=1 "Scaling factor of heat pump"; + Modelica.Blocks.Math.Feedback feedbackHeatFlowEvaporator + "Calculates evaporator heat flow with total energy balance" annotation(Placement(transformation(extent={{-6,-6}, + {6,6}}, + rotation=270, + origin={-76,-38}))); +equation + connect(proRedQEva.u1, sigBus.iceFacMea) annotation (Line(points={{-83.6, + -52.8},{-83.6,-48},{-96,-48},{-96,94},{1,94},{1,104}}, color={0, + 0,127}), Text( + string="%second", + index=1, + extent={{-3,6},{-3,6}}, + horizontalAlignment=TextAlignment.Right)); + connect(proRedQEva.y, QEva) annotation (Line(points={{-80,-66.6},{-80,-84}, + {80,-84},{80,-110}}, color={0,0,127})); + connect(proRedQEva.y, calcRedQCon.u1) annotation (Line(points={{-80,-66.6}, + {-80,-70},{-66,-70},{-66,-54},{83.6,-54},{83.6,-60.8}}, color={0,0, + 127})); + connect(calcRedQCon.y, QCon) annotation (Line(points={{80,-74.6},{80,-78},{ + -62,-78},{-62,-90},{-80,-90},{-80,-110}}, color={0,0,127})); + connect(proRedQEva.u2, feedbackHeatFlowEvaporator.y) annotation (Line( + points={{-76.4,-52.8},{-76,-52.8},{-76,-43.4}}, color={0,0,127})); + annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={ + Rectangle( + extent={{-100,-100},{100,100}}, + lineColor={0,0,127}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid), Text( + extent={{-47.5,-26.5},{47.5,26.5}}, + lineColor={0,0,127}, + pattern=LinePattern.Dash, + textString="%name +", origin={0.5,60.5}, + rotation=180)}),Diagram(coordinateSystem(preserveAspectRatio=false)), + Documentation(revisions=" +", info=" +

+ Partial model for calculation of P_el, QCon and QEva based on the values in the + sigBusHP. +

+")); +end PartialPerformanceData; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/BaseClasses/package.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/BaseClasses/package.mo new file mode 100644 index 0000000000..c6417d6b90 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/BaseClasses/package.mo @@ -0,0 +1,31 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.PerformanceData; +package BaseClasses "Package with partial classes of Performance Data" +annotation (Icon(graphics={ + Rectangle( + lineColor={200,200,200}, + fillColor={248,248,248}, + fillPattern=FillPattern.HorizontalCylinder, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Rectangle( + lineColor={128,128,128}, + extent={{-100.0,-100.0},{100.0,100.0}}, + radius=25.0), + Ellipse( + extent={{-30.0,-30.0},{30.0,30.0}}, + lineColor={128,128,128}, + fillColor={255,255,255}, + fillPattern=FillPattern.Solid)}), Documentation(revisions=" +", info=" +

+ This package contains base classes for the package IBPSA.Fluid.HeatPumps.BaseClasses.PerformanceData. +

+")); +end BaseClasses; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/BaseClasses/package.order b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/BaseClasses/package.order new file mode 100644 index 0000000000..9a4468158b --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/BaseClasses/package.order @@ -0,0 +1 @@ +PartialPerformanceData diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/IcingBlock.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/IcingBlock.mo new file mode 100644 index 0000000000..f67ed03ea1 --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/IcingBlock.mo @@ -0,0 +1,66 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.PerformanceData; +model IcingBlock + "Block which decreases evaporator power by an icing factor" + IBPSA.Utilities.Time.CalendarTime calTim(zerTim=zerTim, yearRef=yearRef); + parameter Integer hourDay=16 + "Hour of the day"; + parameter IBPSA.Utilities.Time.Types.ZeroTime zerTim=IBPSA.Utilities.Time.Types.ZeroTime.NY2016 + "Enumeration for choosing how reference time (time = 0) should be defined"; + parameter Integer yearRef=2016 "Year when time = 0, used if zerTim=Custom"; + replaceable function iceFunc = + Functions.IcingFactor.BasicIcingApproach constrainedby + IBPSA.Fluid.HeatPumps.BlackBoxData.Functions.IcingFactor.PartialBaseFct "Replaceable function to calculate current icing factor" annotation(choicesAllMatching=true); + Modelica.Blocks.Interfaces.RealInput T_flow_ev(unit="K", displayUnit="degC") + "Temperature at evaporator inlet" + annotation (Placement(transformation(extent={{-128,0},{-100,28}}), + iconTransformation(extent={{-116,12},{-100,28}}))); + + Modelica.Blocks.Interfaces.RealInput T_ret_ev(unit="K", displayUnit="degC") + "Temperature at evaporator outlet" annotation (Placement(transformation( + extent={{-128,-40},{-100,-12}}),iconTransformation(extent={{-116,-28}, + {-100,-12}}))); + Modelica.Blocks.Interfaces.RealInput T_oda(unit="K", displayUnit="degC") "Outdoor air temperature" + annotation (Placement(transformation(extent={{-128,46},{-100,74}}), + iconTransformation(extent={{-116,52},{-100,68}}))); + Modelica.Blocks.Interfaces.RealInput m_flow_ev(unit="kg/s") "Mass flow rate at evaporator" + annotation (Placement(transformation(extent={{-128,-80},{-100,-52}}), + iconTransformation(extent={{-116,-68},{-100,-52}}))); + Modelica.Blocks.Interfaces.RealOutput iceFac(min=0, max=1) "Efficiency factor (0..1) to estimate influence of icing. 0 means no heat is transferred through heat exchanger (fully frozen). 1 means no icing/frosting." + annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={110,0}))); +protected + Real iceFac_internal "Calculated value of icing factor"; +equation + iceFac_internal = iceFunc(T_flow_ev,T_ret_ev,T_oda,m_flow_ev); + iceFac = iceFac_internal; + annotation (Icon(coordinateSystem(preserveAspectRatio=false), graphics={ + Text( + lineColor={0,0,255}, + extent={{-150,105},{150,145}}, + textString="%name"), + Ellipse( + lineColor = {108,88,49}, + fillColor = {255,215,136}, + fillPattern = FillPattern.Solid, + extent = {{-100,-100},{100,100}}), + Text( + lineColor={108,88,49}, + extent={{-90.0,-90.0},{90.0,90.0}}, + textString="f")}), Diagram( + coordinateSystem(preserveAspectRatio=false)), + Documentation(revisions=" +", info=" +

+ Model for calculation of the icing factor. The replaceable function + uses the inputs to calculate the resulting icing factor. +

+")); +end IcingBlock; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTable2D.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTable2D.mo new file mode 100644 index 0000000000..ffc00c49ec --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTable2D.mo @@ -0,0 +1,199 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.PerformanceData; +model LookUpTable2D "Performance data coming from manufacturer" + extends + IBPSA.Fluid.HeatPumps.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData; + + parameter Modelica.Blocks.Types.Smoothness smoothness=Modelica.Blocks.Types.Smoothness.LinearSegments + "Smoothness of table interpolation"; + parameter HeatPumpBaseDataDefinition dataTable= + IBPSA.Fluid.HeatPumps.BlackBoxData.EN255.Vitocal350AWI114() + "Data Table of HP" annotation (choicesAllMatching=true); + parameter Modelica.Blocks.Types.Extrapolation extrapolation=Modelica.Blocks.Types.Extrapolation.LastTwoPoints + "Extrapolation of data outside the definition range"; + + Modelica.Blocks.Tables.CombiTable2Ds Qdot_ConTable( + final smoothness=smoothness, + final u1(unit="degC"), + final u2(unit="degC"), + final y(unit="W", displayUnit="kW"), + final table=dataTable.tableQdot_con, + final extrapolation=extrapolation) annotation (extent=[-60,40; -40,60], + Placement(transformation( + extent={{-14,-14},{14,14}}, + rotation=-90, + origin={46,34}))); + Modelica.Blocks.Tables.CombiTable2Ds P_eleTable( + final smoothness=smoothness, + final u1(unit="degC"), + final u2(unit="degC"), + final y(unit="W", displayUnit="kW"), + final table=dataTable.tableP_ele, + final extrapolation=extrapolation) "Electrical power table" annotation ( + extent=[-60,-20; -40,0], Placement(transformation( + extent={{-14,-14},{14,14}}, + rotation=-90, + origin={-60,36}))); + + Modelica.Blocks.Math.UnitConversions.To_degC t_Ev_in + annotation (extent=[-88,38; -76,50], Placement(transformation(extent={{-6,-6}, + {6,6}}, + rotation=270, + origin={52,72}))); + Modelica.Blocks.Math.UnitConversions.To_degC t_Co_ou annotation (extent=[-88,38; + -76,50], Placement(transformation(extent={{-6,-6},{6,6}}, + rotation=270, + origin={-54,76}))); + Modelica.Blocks.Math.Product nTimesPel annotation (Placement(transformation( + extent={{-7,-7},{7,7}}, + rotation=-90, + origin={-47,-3}))); + Modelica.Blocks.Math.Product nTimesQCon annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=-90, + origin={40,-10}))); + + Modelica.Blocks.Math.Product nTimesSF + "Create the product of the scaling factor and relative compressor speed" + annotation (Placement(transformation( + extent={{-7,-7},{7,7}}, + rotation=-90, + origin={-11,23}))); + + +protected + Modelica.Blocks.Sources.Constant realCorr(final k=scalingFactor) + "Calculates correction of table output based on scaling factor" + annotation (Placement(transformation( + extent={{-3,-3},{3,3}}, + rotation=270, + origin={-15,43}))); + +equation + connect(t_Ev_in.y, Qdot_ConTable.u2) annotation (Line(points={{52,65.4},{52, + 60},{37.6,60},{37.6,50.8}}, color={0,0,127})); + connect(t_Ev_in.y, P_eleTable.u2) annotation (Line(points={{52,65.4},{-68.4, + 65.4},{-68.4,52.8}}, color={0,0,127})); + connect(t_Co_ou.y, P_eleTable.u1) annotation (Line(points={{-54,69.4},{-54, + 52.8},{-51.6,52.8}}, color={0,0,127})); + connect(t_Co_ou.y, Qdot_ConTable.u1) annotation (Line(points={{-54,69.4},{-54, + 60},{52,60},{52,50.8},{54.4,50.8}}, + color={0,0,127})); + connect(sigBus.TConOutMea, t_Co_ou.u) annotation (Line( + points={{1,104},{-54,104},{-54,83.2}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{-6,3},{-6,3}})); + connect(sigBus.TEvaInMea, t_Ev_in.u) annotation (Line( + points={{1,104},{2,104},{2,104},{52,104},{52,79.2}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{-6,3},{-6,3}})); + connect(P_eleTable.y, nTimesPel.u2) annotation (Line(points={{-60,20.6},{-60, + 10},{-51.2,10},{-51.2,5.4}}, + color={0,0,127})); + connect(Qdot_ConTable.y, nTimesQCon.u1) annotation (Line(points={{46,18.6},{ + 46,8},{44,8},{44,-2},{43.6,-2},{43.6,-2.8}}, + color={0,0,127})); + connect(nTimesPel.y, Pel) annotation (Line(points={{-47,-10.7},{-47,-80},{0, + -80},{0,-110}}, color={0,0,127})); + connect(realCorr.y, nTimesSF.u2) annotation (Line(points={{-15,39.7},{-15, + 31.4},{-15.2,31.4}}, color={0,0,127})); + connect(sigBus.nSet, nTimesSF.u1) annotation (Line( + points={{1,104},{-2,104},{-2,31.4},{-6.8,31.4}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{6,3},{6,3}}, + horizontalAlignment=TextAlignment.Left)); + connect(nTimesSF.y, nTimesPel.u1) annotation (Line(points={{-11,15.3},{-11, + 8},{-42.8,8},{-42.8,5.4}}, color={0,0,127})); + connect(nTimesSF.y, nTimesQCon.u2) annotation (Line(points={{-11,15.3},{-11, + 8},{36.4,8},{36.4,-2.8}}, color={0,0,127})); + connect(nTimesPel.y, calcRedQCon.u2) annotation (Line(points={{-47,-10.7},{ + -47,-22},{76.4,-22},{76.4,-60.8}}, color={0,0,127})); + connect(nTimesPel.y, feedbackHeatFlowEvaporator.u2) annotation (Line(points={{-47, + -10.7},{-47,-22},{-94,-22},{-94,-38},{-80.8,-38}}, color={0,0, + 127})); + connect(nTimesQCon.y, feedbackHeatFlowEvaporator.u1) annotation (Line(points={{40, + -16.6},{40,-28},{-76,-28},{-76,-33.2}}, color={0,0,127})); + annotation (Icon(graphics={ + Line(points={{-60.0,40.0},{-60.0,-40.0},{60.0,-40.0},{60.0,40.0},{30.0,40.0},{30.0,-40.0},{-30.0,-40.0},{-30.0,40.0},{-60.0,40.0},{-60.0,20.0},{60.0,20.0},{60.0,0.0},{-60.0,0.0},{-60.0,-20.0},{60.0,-20.0},{60.0,-40.0},{-60.0,-40.0},{-60.0,40.0},{60.0,40.0},{60.0,-40.0}}), + Line(points={{0.0,40.0},{0.0,-40.0}}), + Rectangle(fillColor={255,215,136}, + fillPattern=FillPattern.Solid, + extent={{-60.0,20.0},{-30.0,40.0}}), + Rectangle(fillColor={255,215,136}, + fillPattern=FillPattern.Solid, + extent={{-60.0,0.0},{-30.0,20.0}}), + Rectangle(fillColor={255,215,136}, + fillPattern=FillPattern.Solid, + extent={{-60.0,-20.0},{-30.0,0.0}}), + Rectangle(fillColor={255,215,136}, + fillPattern=FillPattern.Solid, + extent={{-60.0,-40.0},{-30.0,-20.0}})}), Documentation(revisions=" +", info=" +

+ This model uses the 2-dimensional table data given in the DIN EN + 14511 (formerly EN255) to calculate QCon and P_el. To + model an inverter controlled heat pump, the relative compressor + speed n is scaled linearly with the ouput of the tables. + Furthermore, the design of a heat pump is modeled via a scaling + factor. As a result, the equations follow below: +

+

+ QCon,n = n * scalingFactor * TableQCon.y +

+

+ P_el = n * scalingFactor * TablePel.y +

+

+ To simulate possible icing of the evaporator on air-source heat + pumps, the icing factor is used to influence the output as well. As + the factor resembles the reduction of heat transfer between + refrigerant and source, the factor is implemented as follows: +

+

+ QEva = iceFac * (QCon,n-P_el,n) +

+

+ With iceFac as a relative value between 0 and 1: +

+

+ iceFac = kA/kA_noIce +

+

+ Finally, to follow the first law of thermodynamics: +

+

+ QCon = P_el,n + QEva +

+

+ Known Limitations +

+

+ The model CombiTable2DExtra + is able to disallow extrapolation by holding the last value. If one + extrapolates the given perfomance data, warnings about occuring + extrapolations are emitted. CAUTION: Checking for possible + extrapolations will trigger state events which results in higher + computing time. +

+")); +end LookUpTable2D; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTableND.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTableND.mo new file mode 100644 index 0000000000..2db463841b --- /dev/null +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTableND.mo @@ -0,0 +1,298 @@ +within IBPSA.Fluid.HeatPumps.BlackBoxData.PerformanceData; +model LookUpTableND "N-dimensional table with data for heat pump" + extends + IBPSA.Fluid.HeatPumps.BlackBoxData.PerformanceData.BaseClasses.PartialPerformanceData; + parameter Real nConv=100 + "Gain value multiplied with relative compressor speed n to calculate matching value based on sdf tables"; + parameter SDF.Types.InterpolationMethod interpMethod=SDF.Types.InterpolationMethod.Linear + "Interpolation method"; + parameter SDF.Types.ExtrapolationMethod extrapMethod=SDF.Types.ExtrapolationMethod.None + "Extrapolation method"; + parameter String filename_Pel= + "modelica://Resources/Data/Fluid/BaseClasses/PerformanceData/LookUpTableND/VZH088AG.sdf" + "File name of sdf table data" + annotation (Dialog(group="Electrical Power",loadSelector(filter="SDF Files (*.sdf);;All Files (*.*)", caption="Select SDF file"))); + parameter String dataset_Pel="/Pel" + "Dataset name" + annotation (Dialog(group="Electrical Power")); + parameter String dataUnit_Pel="W" + "Data unit" + annotation (Dialog(group="Electrical Power")); + parameter String scaleUnits_Pel[3]={"K","K",""} + "Scale units" + annotation (Dialog(group="Electrical Power")); + parameter String filename_QCon= + "modelica://Resources/Data/Fluid/BaseClasses/PerformanceData/LookUpTableND/VZH088AG.sdf" + "File name of sdf table data" + annotation (Dialog(group="Condenser heat flow",loadSelector(filter="SDF Files (*.sdf);;All Files (*.*)", caption="Select SDF file"))); + parameter String dataset_QCon="/QCon" + "Dataset name" + annotation (Dialog(group="Condenser heat flow")); + parameter String dataUnit_QCon="W" + "Data unit" + annotation (Dialog(group="Condenser heat flow")); + parameter String scaleUnits_QCon[3]={"K","K",""} + "Scale units" + annotation (Dialog(group="Condenser heat flow")); + + Modelica.Blocks.Math.Gain nConGain(final k=nConv) + "Convert relative speed n to an absolute value for interpolation in sdf tables" + annotation (Placement(transformation( + extent={{-4,-4},{4,4}}, + rotation=-90, + origin={-22,80}))); + Modelica.Blocks.Math.UnitConversions.To_degC t_Ev_in + annotation (extent=[-88,38; -76,50], Placement(transformation(extent={{-4,-4}, + {4,4}}, + rotation=-90, + origin={-2,80}))); + Modelica.Blocks.Math.UnitConversions.To_degC t_Co_ou annotation (extent=[-88,38; + -76,50], Placement(transformation(extent={{-3,-3},{3,3}}, + rotation=-90, + origin={15,81}))); + Modelica.Blocks.Logical.Switch switchPel + "If HP is off, no heat will be exchanged" annotation (Placement( + transformation( + extent={{-6,-6},{6,6}}, + rotation=-90, + origin={46,-14}))); + Modelica.Blocks.Logical.Switch switchQCon + "If HP is off, no heat will be exchanged" annotation (Placement( + transformation( + extent={{-6,-6},{6,6}}, + rotation=-90, + origin={-56,-14}))); + Modelica.Blocks.Sources.Constant constZero(final k=0) + "Power if HP is turned off" + annotation (Placement(transformation(extent={{-6,-6},{6,6}}, + rotation=-90, + origin={0,6}))); + SDF.NDTable nDTableQCon( + final nin=3, + final readFromFile=true, + final filename=filename_QCon, + final dataset=dataset_QCon, + final dataUnit=dataUnit_QCon, + final scaleUnits=scaleUnits_QCon, + final interpMethod=interpMethod, + final extrapMethod=extrapMethod) "SDF-Table data for condenser heat flow" + annotation (Placement(transformation(extent={{-12,-12},{12,12}}, + rotation=-90, + origin={-48,32}))); + SDF.NDTable nDTablePel( + final nin=3, + final readFromFile=true, + final filename=filename_Pel, + final dataset=dataset_Pel, + final dataUnit=dataUnit_Pel, + final scaleUnits=scaleUnits_Pel, + final interpMethod=interpMethod, + final extrapMethod=extrapMethod) "SDF table data for electrical power" + annotation (Placement(transformation( + extent={{-12,-12},{12,12}}, + rotation=-90, + origin={48,30}))); + Modelica.Blocks.Routing.Multiplex3 multiplex3_1( + final n1=1, + final n2=1, + final n3=1) "Concat all inputs into an array" + annotation (Placement(transformation(extent={{-4,-4},{4,4}}, + rotation=-90, + origin={-2,60}))); + + Modelica.Blocks.Math.Product scalingFacTimesQCon annotation (Placement( + transformation( + extent={{-4,-4},{4,4}}, + rotation=-90, + origin={-46,6}))); + Modelica.Blocks.Math.Product scalingFacTimesPel annotation (Placement( + transformation( + extent={{-4,-4},{4,4}}, + rotation=-90, + origin={46,4}))); +protected + Modelica.Blocks.Sources.Constant realCorr(final k=scalingFactor) + "Calculates correction of table output based on scaling factor" + annotation (Placement(transformation( + extent={{-6,-6},{6,6}}, + rotation=270, + origin={0,36}))); +equation + + connect(constZero.y, switchQCon.u3) annotation (Line(points={{-1.33227e-15, + -0.6},{-1.33227e-15,-4},{-62,-4},{-62,-6.8},{-60.8,-6.8}}, + color={0,0,127})); + connect(constZero.y, switchPel.u3) annotation (Line(points={{-1.11022e-15, + -0.6},{-1.11022e-15,-4},{41.2,-4},{41.2,-6.8}}, + color={0,0,127})); + connect(multiplex3_1.y, nDTableQCon.u) annotation (Line(points={{-2,55.6},{-2, + 52},{-48,52},{-48,46.4}}, color={0,0,127})); + connect(multiplex3_1.y, nDTablePel.u) annotation (Line(points={{-2,55.6},{-2, + 52},{48,52},{48,44.4}}, color={0,0,127})); + connect(sigBus.TEvaInMea, t_Ev_in.u) annotation (Line( + points={{1,104},{-2,104},{-2,84.8}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{-6,3},{-6,3}})); + connect(sigBus.TConOutMea, t_Co_ou.u) annotation (Line( + points={{1,104},{15,104},{15,84.6}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{-6,3},{-6,3}})); + connect(sigBus.nSet, nConGain.u) annotation (Line( + points={{1,104},{-22,104},{-22,84.8}}, + color={255,204,51}, + thickness=0.5), Text( + string="%first", + index=-1, + extent={{-3,6},{-3,6}}, + horizontalAlignment=TextAlignment.Right)); + connect(nConGain.y, multiplex3_1.u3[1]) annotation (Line(points={{-22,75.6},{ + -22,72},{-4,72},{-4,64.8},{-4.8,64.8}}, color={0,0,127})); + connect(t_Co_ou.y, multiplex3_1.u1[1]) annotation (Line(points={{15,77.7},{15, + 70},{0.8,70},{0.8,64.8}}, color={0,0,127})); + connect(t_Ev_in.y, multiplex3_1.u2[1]) annotation (Line(points={{-2,75.6},{-2, + 64.8}}, color={0,0,127})); + connect(realCorr.y, scalingFacTimesQCon.u1) annotation (Line(points={{ + -1.33227e-15,29.4},{-1.33227e-15,14},{-43.6,14},{-43.6,10.8}}, + color={0,0,127})); + connect(nDTableQCon.y, scalingFacTimesQCon.u2) annotation (Line(points={{-48, + 18.8},{-48,10.8},{-48.4,10.8}}, color={0,0,127})); + connect(scalingFacTimesQCon.y, switchQCon.u1) annotation (Line(points={{-46,1.6}, + {-46,-6},{-51.2,-6},{-51.2,-6.8}}, color={0,0,127})); + connect(realCorr.y, scalingFacTimesPel.u2) annotation (Line(points={{ + -1.11022e-15,29.4},{-1.11022e-15,14},{43.6,14},{43.6,8.8}}, + color={0,0,127})); + connect(nDTablePel.y, scalingFacTimesPel.u1) + annotation (Line(points={{48,16.8},{48,8.8},{48.4,8.8}}, + color={0,0,127})); + connect(scalingFacTimesPel.y, switchPel.u1) annotation (Line(points={{46,-0.4}, + {46,-4},{50,-4},{50,-6},{50.8,-6},{50.8,-6.8}}, + color={0,0,127})); + connect(switchPel.y, calcRedQCon.u2) annotation (Line(points={{46,-20.6},{46, + -50},{76.4,-50},{76.4,-60.8}}, color={0,0,127})); + connect(switchPel.y, Pel) annotation (Line(points={{46,-20.6},{46,-64},{0,-64}, + {0,-110}}, color={0,0,127})); + connect(switchQCon.y, feedbackHeatFlowEvaporator.u1) annotation (Line(points={{-56, + -20.6},{-56,-24},{-76,-24},{-76,-33.2}}, color={0,0, + 127})); + connect(switchPel.y, feedbackHeatFlowEvaporator.u2) annotation (Line(points={{46, + -20.6},{46,-26},{-86,-26},{-86,-38},{-80.8,-38}}, + color={0,0,127})); + connect(switchQCon.u2, sigBus.onOffMea) annotation (Line(points={{-56,-6.8},{ + -56,-2},{78,-2},{78,102},{1,102},{1,104}}, color={255,0, + 255}), Text( + string="%second", + index=1, + extent={{-3,6},{-3,6}}, + horizontalAlignment=TextAlignment.Right)); + connect(switchPel.u2, sigBus.onOffMea) annotation (Line(points={{46,-6.8},{46, + -2},{78,-2},{78,102},{1,102},{1,104}}, color={255,0,255}), + Text( + string="%second", + index=1, + extent={{-3,6},{-3,6}}, + horizontalAlignment=TextAlignment.Right)); + annotation (Icon(graphics={ + Line(points={{-60.0,40.0},{-60.0,-40.0},{60.0,-40.0},{60.0,40.0},{30.0,40.0},{30.0,-40.0},{-30.0,-40.0},{-30.0,40.0},{-60.0,40.0},{-60.0,20.0},{60.0,20.0},{60.0,0.0},{-60.0,0.0},{-60.0,-20.0},{60.0,-20.0},{60.0,-40.0},{-60.0,-40.0},{-60.0,40.0},{60.0,40.0},{60.0,-40.0}}), + Line(points={{0.0,40.0},{0.0,-40.0}}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-60.0,0.0},{-30.0,20.0}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,215,136}, + fillPattern=FillPattern.Solid, + extent={{-60.0,-40.0},{-30.0,-20.0}}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-60,-20},{-30,0}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-60,-40},{-30,-20}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-30,-40},{0,-20}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{0,-40},{30,-20}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{30,-40},{60,-20}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{30,-20},{60,0}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{0,-20},{30,0}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{0,0},{30,20}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{30,0},{60,20}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{0,20},{30,40}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{30,20},{60,40}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-60,20},{-30,40}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-30,20},{0,40}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-30,0},{0,20}}, + lineColor={0,0,0}), + Rectangle(fillColor={255,255,0}, + fillPattern=FillPattern.Solid, + extent={{-30,-20},{0,0}}, + lineColor={0,0,0})}), Documentation(info="

+ Basic models showing the concept of using n-dimensional table data + for the innerCycle of the heat pump model. This model assumes one + provides data for inverter controlled heat pumps or chillers. + However, this basis structure can be used to create own models, where + electrical power and condenser depend on other inputs, such as + ambient temperature. +

+ +", revisions="