From 3dbe17a5ff605b0238b498617a46266cad07bd1f Mon Sep 17 00:00:00 2001 From: "fabian.wuellhorst" Date: Fri, 24 Jun 2022 11:52:58 +0200 Subject: [PATCH] add automatic design for heat pumps, relabel automatic estimation for w2w. #1576 --- IBPSA/Fluid/Chillers/Chiller.mo | 17 +- ...rtialReversibleVapourCompressionMachine.mo | 56 ++---- .../EN255/AlphaInnotec_SW170I.mo | 1 - .../{LookUpTableND.mo => EuropeanNorm3D.mo} | 181 ++++++++++-------- .../Fluid/HeatPumps/BlackBoxData/VCLibMap.mo | 26 ++- .../HeatPumps/BlackBoxData/package.order | 2 +- IBPSA/Fluid/HeatPumps/Examples/HeatPump.mo | 151 ++++++++------- IBPSA/Fluid/HeatPumps/HeatPump.mo | 8 +- ...HeatPumpSafetyControlBaseDataDefinition.mo | 2 +- .../HeatPumps/SafetyControls/SafetyControl.mo | 2 +- 10 files changed, 247 insertions(+), 199 deletions(-) rename IBPSA/Fluid/HeatPumps/BlackBoxData/{LookUpTableND.mo => EuropeanNorm3D.mo} (71%) diff --git a/IBPSA/Fluid/Chillers/Chiller.mo b/IBPSA/Fluid/Chillers/Chiller.mo index 073cf150fd..961b968215 100644 --- a/IBPSA/Fluid/Chillers/Chiller.mo +++ b/IBPSA/Fluid/Chillers/Chiller.mo @@ -3,13 +3,16 @@ model Chiller "Grey-box model for reversible chillers using a black-box to simulate the refrigeration cycle" extends IBPSA.Fluid.HeatPumps.BaseClasses.PartialReversibleVapourCompressionMachine( - mEva_flow_nominal=QUse_flow_nominal/(dTEva_nominal*cpEva), - final use_safetyControl=false, - use_rev=true, - final machineType = false, - redeclare IBPSA.Fluid.Chillers.BaseClasses.InnerCycle_Chiller innerCycle( - redeclare model PerDataMainChi = PerDataMainChi, - redeclare model PerDataRevChi = PerDataRevChi)); + final autoCalc_mCon_flow=max(0.00005*QUse_flow_nominal + 0.3161, autoCalc_mMin_flow), + final autoCalc_mEva_flow= max(0.00005*QUse_flow_nominal - 0.5662, autoCalc_mMin_flow), + final autoCalc_VCon=max(0.0000002*QUse_flow_nominal - 0.0084, autoCalc_VMin), + final autoCalc_VEva=max(0.0000001*QUse_flow_nominal - 0.0066, autoCalc_VMin), + mEva_flow_nominal=QUse_flow_nominal/(dTEva_nominal*cpEva), + final use_safetyControl=false, + use_rev=true, + redeclare IBPSA.Fluid.Chillers.BaseClasses.InnerCycle_Chiller innerCycle( + redeclare model PerDataMainChi = PerDataMainChi, + redeclare model PerDataRevChi = PerDataRevChi)); replaceable model PerDataMainChi = IBPSA.Fluid.Chillers.BlackBoxData.BlackBox.BaseClasses.PartialBlackBox diff --git a/IBPSA/Fluid/HeatPumps/BaseClasses/PartialReversibleVapourCompressionMachine.mo b/IBPSA/Fluid/HeatPumps/BaseClasses/PartialReversibleVapourCompressionMachine.mo index b893737b5a..e9919682f9 100644 --- a/IBPSA/Fluid/HeatPumps/BaseClasses/PartialReversibleVapourCompressionMachine.mo +++ b/IBPSA/Fluid/HeatPumps/BaseClasses/PartialReversibleVapourCompressionMachine.mo @@ -22,19 +22,16 @@ partial model PartialReversibleVapourCompressionMachine constrainedby PartialInnerCycle(final use_rev=use_rev) "Blackbox model of refrigerant cycle of a vapour compression machine" annotation (Placement(transformation(extent={{-18,-18},{18,18}}, rotation=90))); + parameter Modelica.Units.SI.HeatFlowRate QUse_flow_nominal "Nominal heat flow rate at condenser" annotation (Dialog(group="Nominal Design")); + + parameter Real y_nominal "Nominal relative compressor speed" annotation (Dialog(group="Nominal Design")); replaceable model vapComIne = HeatPumps.BlackBoxData.VapourCompressionInertias.BaseClasses.PartialInertia constrainedby HeatPumps.BlackBoxData.VapourCompressionInertias.BaseClasses.PartialInertia - "Model for the inertia between the stationary black box data outputs and the inputs into the heat exchangers." + "Inertia between the black-box outputs and the heat exchangers." annotation (choicesAllMatching=true, Dialog(group="Inertia")); - 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 Boolean use_rev=true "Is the vapour compression machine reversible?" annotation(choices(checkBox=true)); parameter Boolean use_safetyControl=true "=true to enable internal heat pump safety control" annotation (Dialog(group="Safety Control"), choices(checkBox=true)); parameter Boolean use_busConnectorOnly=false @@ -44,10 +41,10 @@ partial model PartialReversibleVapourCompressionMachine parameter Boolean use_TSet=false "=true to use black-box internal control for supply temperature of device with the given temperature set point TSet" annotation(choices(checkBox=true), Dialog(group="Input Connectors")); + parameter Boolean use_autoCalc=false + "Enable automatic estimation of volumes and mass flows for water-to-water devices in a range of 25 kW to 1 MW" + annotation(choices(checkBox=true), Dialog(group="Water-to-water Parameterization")); - parameter Modelica.Units.SI.HeatFlowRate QUse_flow_nominal "Nominal heat flow rate at condenser" annotation (Dialog(group="Nominal Design")); - - parameter Real y_nominal "Nominal relative compressor speed" annotation (Dialog(group="Nominal Design")); //Condenser parameter Modelica.Units.SI.Temperature TCon_nominal "Nominal flow temperature at secondary condenser side" annotation (Dialog(group="Nominal Design", tab="Condenser")); parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal "Nominal temperature difference at secondary condenser side" annotation (Dialog(group="Nominal Design", tab="Condenser")); @@ -92,11 +89,11 @@ partial model PartialReversibleVapourCompressionMachine tab="Condenser", enable=use_conCap)); - parameter Modelica.Units.SI.Density rhoCon=Medium_con.density(sta_nominal) + parameter Modelica.Units.SI.Density rhoCon=Medium_con.density(staCon_nominal) "Density of medium / fluid in condenser" annotation (Dialog(tab="Condenser", group="Medium properties")); parameter Modelica.Units.SI.SpecificHeatCapacity cpCon= - Medium_con.specificHeatCapacityCp(sta_nominal) + Medium_con.specificHeatCapacityCp(staCon_nominal) "Specific heat capacaity of medium / fluid in condenser" annotation (Dialog(tab="Condenser", group="Medium properties")); @@ -142,11 +139,11 @@ partial model PartialReversibleVapourCompressionMachine group="Heat Losses", tab="Evaporator", enable=use_evaCap)); - parameter Modelica.Units.SI.Density rhoEva=Medium_eva.density(sta_nominal) + parameter Modelica.Units.SI.Density rhoEva=Medium_eva.density(staEva_nominal) "Density of medium / fluid in evaporator" annotation (Dialog(tab="Evaporator", group="Medium properties")); parameter Modelica.Units.SI.SpecificHeatCapacity cpEva= - Medium_eva.specificHeatCapacityCp(sta_nominal) + Medium_eva.specificHeatCapacityCp(staEva_nominal) "Specific heat capacaity of medium / fluid in evaporator" annotation (Dialog(tab="Evaporator", group="Medium properties")); @@ -196,8 +193,6 @@ partial model PartialReversibleVapourCompressionMachine "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 from_dp=false "= true, use m_flow = f(dp) else dp = f(m_flow)" annotation (Dialog(tab="Advanced", group="Flow resistance")); @@ -355,50 +350,41 @@ partial model PartialReversibleVapourCompressionMachine protected parameter Real scalingFactor "Scaling-factor of vapour compression machine"; - parameter Medium_con.ThermodynamicState sta_nominal=Medium_con.setState_pTX( + parameter Medium_con.ThermodynamicState staCon_nominal=Medium_con.setState_pTX( T=Medium_con.T_default, p=Medium_con.p_default, X=Medium_con.X_default) "Nominal / default state of condenser medium"; parameter Medium_eva.ThermodynamicState staEva_nominal=Medium_eva.setState_pTX( T=Medium_eva.T_default, p=Medium_eva.p_default, X=Medium_eva.X_default) "Nominal / default state of evaporator medium"; - parameter Modelica.Units.SI.MassFlowRate autoCalc_mMin_flow=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_mEva_flow=if machineType - then max(0.00004*Q_useNominal - 0.3177, autoCalc_mMin_flow) else max(0.00005 - *Q_useNominal - 0.5662, autoCalc_mMin_flow); - parameter Modelica.Units.SI.MassFlowRate autoCalc_mCon_flow=if machineType - then max(0.00004*Q_useNominal - 0.6162, autoCalc_mMin_flow) else max(0.00005 - *Q_useNominal + 0.3161, autoCalc_mMin_flow); parameter Modelica.Units.SI.MassFlowRate mEva_flow_nominal_final=if use_autoCalc then autoCalc_mEva_flow else mEva_flow_nominal; parameter Modelica.Units.SI.MassFlowRate mCon_flow_nominal_final=if use_autoCalc then autoCalc_mCon_flow else mCon_flow_nominal; - 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; + parameter Modelica.Units.SI.MassFlowRate autoCalc_mEva_flow; + parameter Modelica.Units.SI.MassFlowRate autoCalc_mCon_flow; + parameter Modelica.Units.SI.Volume autoCalc_VEva; + parameter Modelica.Units.SI.Volume autoCalc_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)!", + assert(not use_autoCalc or (use_autoCalc and QUse_flow_nominal>0), "Can't auto-calculate evaporator and condenser data without a given nominal power flow (QUse_flow_nominal)!", level = AssertionLevel.error); assert( not use_autoCalc or (autoCalc_mEva_flow > autoCalc_mMin_flow and autoCalc_mEva_flow < 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!", + "Given nominal power (QUse_flow_nominal) 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!", + "Given nominal power (QUse_flow_nominal) 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(mFlow_eva.m_flow, sigBus.m_flowEvaMea) annotation (Line(points={{72,-49}, diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/EuropeanNom2D/EN255/AlphaInnotec_SW170I.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EuropeanNom2D/EN255/AlphaInnotec_SW170I.mo index 51cf579a6b..a74b174b3d 100644 --- a/IBPSA/Fluid/HeatPumps/BlackBoxData/EuropeanNom2D/EN255/AlphaInnotec_SW170I.mo +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EuropeanNom2D/EN255/AlphaInnotec_SW170I.mo @@ -4,7 +4,6 @@ record AlphaInnotec_SW170I "Alpha Innotec SW 170 I" IBPSA.Fluid.HeatPumps.BlackBoxData.EuropeanNom2D.HeatPumpBaseDataDefinition( tablePel=[0,-5.0,0.0,5.0; 35,3700,3600,3600; 50,5100,5100,5100], tableQCon_flow=[0,-5.0,0.0,5.0; 35,14800,17200,19100; 50,14400,16400,18300], - mCon_flow_nominal=17200/4180/10, mEva_flow_nominal=13600/3600/3, tableUppBou=[-22,65; 45,65]); diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/LookUpTableND.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/EuropeanNorm3D.mo similarity index 71% rename from IBPSA/Fluid/HeatPumps/BlackBoxData/LookUpTableND.mo rename to IBPSA/Fluid/HeatPumps/BlackBoxData/EuropeanNorm3D.mo index 4e5dd75134..1a24e362f9 100644 --- a/IBPSA/Fluid/HeatPumps/BlackBoxData/LookUpTableND.mo +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/EuropeanNorm3D.mo @@ -1,6 +1,11 @@ within IBPSA.Fluid.HeatPumps.BlackBoxData; -model LookUpTableND "N-dimensional table with data for heat pump" - extends IBPSA.Fluid.HeatPumps.BlackBoxData.BaseClasses.PartialBlackBox; +model EuropeanNorm3D "3D table with data for heat pump" + extends IBPSA.Fluid.HeatPumps.BlackBoxData.BaseClasses.PartialBlackBox( + QConBlackBox_flow_nominal=evaluate( + externalTable, + {y_nominal, TEva_nominal, TCon_nominal}, + Table_QCon.interpMethod, + Table_QCon.extrapMethod)); 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 @@ -37,35 +42,35 @@ model LookUpTableND "N-dimensional table with data for heat pump" 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}))); + extent={{-10,-10},{10,10}}, + rotation=90, + origin={-50,150}))); 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}))); + annotation (extent=[-88,38; -76,50], Placement(transformation(extent={{-10,-10}, + {10,10}}, + rotation=90, + origin={-10,150}))); 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}))); + -76,50], Placement(transformation(extent={{-10,-10},{10,10}}, + rotation=90, + origin={30,150}))); Modelica.Blocks.Logical.Switch switchPel "If HP is off, no heat will be exchanged" annotation (Placement( transformation( - extent={{-6,-6},{6,6}}, + extent={{-10,-10},{10,10}}, rotation=-90, - origin={46,-14}))); + origin={50,-10}))); Modelica.Blocks.Logical.Switch switchQCon "If HP is off, no heat will be exchanged" annotation (Placement( transformation( - extent={{-6,-6},{6,6}}, + extent={{-10,-10},{10,10}}, rotation=-90, - origin={-56,-14}))); + origin={-30,-10}))); 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}))); + annotation (Placement(transformation(extent={{-10,-10},{10,10}}, + rotation=90, + origin={10,-30}))); SDF.NDTable nDTableQCon( final nin=3, final readFromFile=true, @@ -75,9 +80,9 @@ model LookUpTableND "N-dimensional table with data for heat pump" 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}}, + annotation (Placement(transformation(extent={{-10,-10},{10,10}}, rotation=-90, - origin={-48,32}))); + origin={-70,70}))); SDF.NDTable nDTablePel( final nin=3, final readFromFile=true, @@ -88,115 +93,134 @@ model LookUpTableND "N-dimensional table with data for heat pump" final interpMethod=interpMethod, final extrapMethod=extrapMethod) "SDF table data for electrical power" annotation (Placement(transformation( - extent={{-12,-12},{12,12}}, + extent={{-10,-10},{10,10}}, rotation=-90, - origin={48,30}))); + origin={50,70}))); 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}))); + annotation (Placement(transformation(extent={{-10,-10},{10,10}}, + rotation=270, + origin={70,150}))); Modelica.Blocks.Math.Product scalingFacTimesQCon annotation (Placement( transformation( - extent={{-4,-4},{4,4}}, + extent={{-10,-10},{10,10}}, rotation=-90, - origin={-46,6}))); + origin={-70,30}))); Modelica.Blocks.Math.Product scalingFacTimesPel annotation (Placement( transformation( - extent={{-4,-4},{4,4}}, + extent={{-10,-10},{10,10}}, rotation=-90, - origin={46,4}))); + origin={70,30}))); 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}))); + extent={{-10,-10},{10,10}}, + rotation=0, + origin={-30,30}))); + function evaluate + input SDF.Types.ExternalNDTable table; + input Real[:] params; + input SDF.Types.InterpolationMethod interpMethod; + input SDF.Types.ExtrapolationMethod extrapMethod; + output Real value; + external "C" value = ModelicaNDTable_evaluate(table, size(params, 1), params, interpMethod, extrapMethod) annotation ( + Include="#include ", + IncludeDirectory="modelica://SDF/Resources/C-Sources"); + end evaluate; + + parameter SDF.Types.ExternalNDTable externalTable=SDF.Types.ExternalNDTable(nDTableQCon.nin, SDF.Functions.readTableData( + Modelica.Utilities.Files.loadResource(nDTableQCon.filename), + nDTableQCon.dataset, + nDTableQCon.dataUnit, + nDTableQCon.scaleUnits)); 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}}, + connect(constZero.y, switchQCon.u3) annotation (Line(points={{10,-19},{10,-6}, + {-14,-6},{-14,6},{-38,6},{-38,2}}, 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(constZero.y, switchPel.u3) annotation (Line(points={{10,-19},{10,2},{42, + 2}}, color={0,0,127})); + connect(multiplex3_1.y, nDTableQCon.u) annotation (Line(points={{70,139},{70,88}, + {-70,88},{-70,82}}, color={0,0,127})); + connect(multiplex3_1.y, nDTablePel.u) annotation (Line(points={{70,139},{70,88}, + {50,88},{50,82}}, color={0,0,127})); connect(sigBus.TEvaInMea, t_Ev_in.u) annotation (Line( - points={{1,104},{-2,104},{-2,84.8}}, + points={{1,104},{0,104},{0,106},{-10,106},{-10,138}}, 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}}, + points={{1,104},{30,104},{30,138}}, color={255,204,51}, thickness=0.5), Text( string="%first", index=-1, extent={{-6,3},{-6,3}})); connect(sigBus.ySet, nConGain.u) annotation (Line( - points={{1,104},{-22,104},{-22,84.8}}, + points={{1,104},{-50,104},{-50,138}}, 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}}, + connect(nConGain.y, multiplex3_1.u3[1]) annotation (Line(points={{-50,161},{-50, + 166},{54,166},{54,162},{63,162}}, color={0,0,127})); + connect(t_Co_ou.y, multiplex3_1.u1[1]) annotation (Line(points={{30,161},{30,174}, + {78,174},{78,168},{77,168},{77,162}}, + color={0,0,127})); + connect(t_Ev_in.y, multiplex3_1.u2[1]) annotation (Line(points={{-10,161},{56, + 161},{56,168},{70,168},{70,162}}, + color={0,0,127})); + connect(realCorr.y, scalingFacTimesQCon.u1) annotation (Line(points={{-19,30}, + {-14,30},{-14,48},{-64,48},{-64,42}}, 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}}, + connect(nDTableQCon.y, scalingFacTimesQCon.u2) annotation (Line(points={{-70,59}, + {-70,50},{-76,50},{-76,42}}, color={0,0,127})); + connect(scalingFacTimesQCon.y, switchQCon.u1) annotation (Line(points={{-70,19}, + {-70,6},{-44,6},{-44,8},{-16,8},{-16,2},{-22,2}}, + color={0,0,127})); + connect(realCorr.y, scalingFacTimesPel.u2) annotation (Line(points={{-19,30},{ + -14,30},{-14,48},{64,48},{64,42}}, 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}}, + annotation (Line(points={{50,59},{50,50},{76,50},{76,42}}, color={0,0,127})); - connect(switchPel.y, calcRedQCon.u2) annotation (Line(points={{46,-20.6},{46, - -50},{64,-50},{64,-58}}, 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},{-78,-24},{-78,-10}}, color={0,0, + connect(scalingFacTimesPel.y, switchPel.u1) annotation (Line(points={{70,19},{ + 70,2},{58,2}}, color={0,0,127})); + connect(switchPel.y, calcRedQCon.u2) annotation (Line(points={{50,-21},{50,-50}, + {64,-50},{64,-58}}, color={0,0,127})); + connect(switchPel.y, Pel) annotation (Line(points={{50,-21},{50,-26},{-12,-26}, + {-12,-94},{0,-94},{0,-110}}, + color={0,0,127})); + connect(switchQCon.y, feedbackHeatFlowEvaporator.u1) annotation (Line(points={{-30,-21}, + {-30,-22},{-50,-22},{-50,4},{-84,4},{-84,-10},{-78,-10}}, color={0,0, 127})); - connect(switchPel.y, feedbackHeatFlowEvaporator.u2) annotation (Line(points={{46, - -20.6},{46,-26},{-86,-26},{-86,-18},{-70,-18}}, + connect(switchPel.y, feedbackHeatFlowEvaporator.u2) annotation (Line(points={{50,-21}, + {50,-26},{-70,-26},{-70,-18}}, 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, + connect(switchQCon.u2, sigBus.onOffMea) annotation (Line(points={{-30,2},{-30, + 12},{-94,12},{-94,96},{1,96},{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}), + connect(switchPel.u2, sigBus.onOffMea) annotation (Line(points={{50,2},{52,2}, + {52,8},{90,8},{90,96},{1,96},{1,104}}, color={255,0,255}), Text( string="%second", index=1, extent={{-3,6},{-3,6}}, horizontalAlignment=TextAlignment.Right)); - annotation (Icon(graphics={ + annotation (Icon(coordinateSystem(extent={{-100,-100},{100,180}}), + 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}, @@ -293,5 +317,6 @@ equation \"https://github.com/RWTH-EBC/AixLib/issues/577\">#577) -")); -end LookUpTableND; +"), + Diagram(coordinateSystem(extent={{-100,-100},{100,180}}))); +end EuropeanNorm3D; diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/VCLibMap.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/VCLibMap.mo index 0dd133617a..19b45d0cbf 100644 --- a/IBPSA/Fluid/HeatPumps/BlackBoxData/VCLibMap.mo +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/VCLibMap.mo @@ -1,11 +1,13 @@ within IBPSA.Fluid.HeatPumps.BlackBoxData; model VCLibMap "Multi-dimensional performance map encompasing choices of fluid and flowsheet based on steady state calculations using the Vapour Compression Library" - extends IBPSA.Fluid.HeatPumps.BlackBoxData.BaseClasses.PartialBlackBox; + extends IBPSA.Fluid.HeatPumps.BlackBoxData.BaseClasses.PartialBlackBox( + QConBlackBox_flow_nominal=evaluate( + externalTable, + {y_nominal, TCon_nominal, TEva_nominal}, + Table_QCon.interpMethod, + Table_QCon.extrapMethod)); // Parameters Heat pump operation - parameter Modelica.Units.SI.Power QCon_flow_nominal=5000 - "Nominal heating power of heat pump" annotation(Dialog(group= - "Heat pump specification")); parameter String refrigerant="R410A" "Identifier for the refrigerant" annotation(Dialog(group= "Heat pump specification")); parameter String flowsheet="StandardFlowsheet" "Identifier for the flowsheet" annotation(Dialog(group= @@ -128,6 +130,22 @@ protected + tableName_mFlowConNominal; parameter String dataset_mFlowEvaNominal="/" + flowsheet + "/" + refrigerant + "/" + tableName_mFlowEvaNominal; + function evaluate + input SDF.Types.ExternalNDTable table; + input Real[:] params; + input SDF.Types.InterpolationMethod interpMethod; + input SDF.Types.ExtrapolationMethod extrapMethod; + output Real value; + external "C" value = ModelicaNDTable_evaluate(table, size(params, 1), params, interpMethod, extrapMethod) annotation ( + Include="#include ", + IncludeDirectory="modelica://SDF/Resources/C-Sources"); + end evaluate; + + parameter SDF.Types.ExternalNDTable externalTable=SDF.Types.ExternalNDTable(Table_QCon.nin, SDF.Functions.readTableData( + Modelica.Utilities.Files.loadResource(Table_QCon.filename), + Table_QCon.dataset, + Table_QCon.dataUnit, + Table_QCon.scaleUnits)); equation connect(constZero.y,switchPel. u3) annotation (Line(points={{-10,19},{-10,6}, {62,6},{62,2}}, diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/package.order b/IBPSA/Fluid/HeatPumps/BlackBoxData/package.order index 2e7d164abe..ef36a569eb 100644 --- a/IBPSA/Fluid/HeatPumps/BlackBoxData/package.order +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/package.order @@ -1,6 +1,6 @@ VCLibMap EuropeanNorm2D -LookUpTableND +EuropeanNorm3D FunctionalApproach Functions VapourCompressionInertias diff --git a/IBPSA/Fluid/HeatPumps/Examples/HeatPump.mo b/IBPSA/Fluid/HeatPumps/Examples/HeatPump.mo index dbbd645466..9e51602c78 100644 --- a/IBPSA/Fluid/HeatPumps/Examples/HeatPump.mo +++ b/IBPSA/Fluid/HeatPumps/Examples/HeatPump.mo @@ -12,33 +12,33 @@ model HeatPump "Example for the reversible heat pump model." nPorts=1, redeclare package Medium = Medium_sou, T=275.15) "Ideal mass flow source at the inlet of the source side" - annotation (Placement(transformation(extent={{-54,-80},{-34,-60}}))); + annotation (Placement(transformation(extent={{-60,-80},{-40,-60}}))); 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={{-11,11},{11,-11}}, + annotation (Placement(transformation(extent={{-10,10},{10,-10}}, rotation=0, - origin={-81,3}))); + origin={-70,-10}))); Modelica.Blocks.Sources.Ramp TsuSourceRamp( duration=500, startTime=500, height=25, offset=278) "Ramp signal for the temperature input of the source side's ideal mass flow source" - annotation (Placement(transformation(extent={{-94,-90},{-74,-70}}))); + annotation (Placement(transformation(extent={{-100,-100},{-80,-80}}))); Modelica.Blocks.Sources.Constant T_amb_internal(k=291.15) annotation (Placement(transformation(extent={{10,-10},{-10,10}}, rotation=-90, - origin={2,-76}))); + origin={-12,-90}))); IBPSA.Fluid.HeatPumps.HeatPump heatPump( redeclare model vapComIne = IBPSA.Fluid.HeatPumps.BlackBoxData.VapourCompressionInertias.NoInertia, - use_safetyControl=true, use_busConnectorOnly=false, QUse_flow_nominal=1000, + cpCon=4184, mEva_flow_nominal=sourceSideMassFlowSource.m_flow, y_nominal=1, TCon_nominal=313.15, @@ -58,11 +58,15 @@ model HeatPump "Example for the reversible heat pump model." redeclare package Medium_eva = Medium_sou, use_rev=true, GEvaIns=0, + cpEva=4184, redeclare model BlaBoxHPHeating = - IBPSA.Fluid.HeatPumps.BlackBoxData.EuropeanNorm2D (redeclare - IBPSA.Fluid.HeatPumps.BlackBoxData.Frosting.NoFrosting iceFacCalc, - dataTable= - IBPSA.Fluid.HeatPumps.BlackBoxData.EuropeanNom2D.EN14511.Vitocal200AWO201()), + IBPSA.Fluid.HeatPumps.BlackBoxData.EuropeanNorm2D ( + QConBlackBox_flow_nominal=3315, + redeclare IBPSA.Fluid.HeatPumps.BlackBoxData.Frosting.NoFrosting + iceFacCalc, + dataTable= + IBPSA.Fluid.HeatPumps.BlackBoxData.EuropeanNom2D.EN14511.Vitocal200AWO201 + ()), redeclare model BlaBoxHPCooling = IBPSA.Fluid.Chillers.BlackBoxData.BlackBox.LookUpTable2D (smoothness= Modelica.Blocks.Types.Smoothness.LinearSegments, dataTable= @@ -78,13 +82,13 @@ model HeatPump "Example for the reversible heat pump model." annotation (Placement(transformation( extent={{-24,-29},{24,29}}, rotation=270, - origin={2,-21}))); + origin={0,-39}))); - Modelica.Blocks.Sources.BooleanStep booleanStep(startTime=1800, - startValue=true) - annotation (Placement(transformation(extent={{-6,-6},{6,6}}, - rotation=180, - origin={50,88}))); + Modelica.Blocks.Sources.BooleanStep booleanModeSetStep(startTime=1800, + startValue=true) annotation (Placement(transformation( + extent={{-10,-10},{10,10}}, + rotation=0, + origin={-70,70}))); IBPSA.Fluid.Sensors.TemperatureTwoPort senTAct( final m_flow_nominal=heatPump.m1_flow_nominal, @@ -99,21 +103,23 @@ model HeatPump "Example for the reversible heat pump model." transformation( extent={{-10,-10},{10,10}}, rotation=0, - origin={54,-64}))); + origin={50,-70}))); Modelica.Blocks.Logical.Hysteresis hysHeating( pre_y_start=true, uLow=273.15 + 30, uHigh=273.15 + 35) - annotation (Placement(transformation(extent={{66,58},{56,68}}))); + annotation (Placement(transformation(extent={{60,80},{40,100}}))); Modelica.Blocks.Math.BooleanToReal booleanToReal - annotation (Placement(transformation(extent={{5,-5},{-5,5}}, - rotation=0, - origin={19,71}))); + annotation (Placement(transformation(extent={{10,-10},{-10,10}}, + rotation=90, + origin={-10,10}))); Modelica.Blocks.Sources.Sine sine( f=1/3600, amplitude=3000, offset=3000) - annotation (Placement(transformation(extent={{76,26},{84,34}}))); + annotation (Placement(transformation(extent={{-10,-10},{10,10}}, + rotation=270, + origin={90,90}))); IBPSA.Fluid.Movers.SpeedControlled_Nrpm pumSou( redeclare final IBPSA.Fluid.Movers.Data.Pumps.Wilo.Stratos25slash1to8 per, @@ -124,7 +130,7 @@ model HeatPump "Example for the reversible heat pump model." "Fan or pump at source side of HP" annotation (Placement(transformation( extent={{10,-10},{-10,10}}, rotation=0, - origin={50,12}))); + origin={50,10}))); IBPSA.Fluid.MixingVolumes.MixingVolume Room( nPorts=2, @@ -137,25 +143,25 @@ model HeatPump "Example for the reversible heat pump model." "Volume of Condenser" annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, - origin={86,-20}))); + origin={90,-30}))); Modelica.Blocks.Sources.Constant nIn(k=100) annotation (Placement( transformation( - extent={{4,-4},{-4,4}}, - rotation=90, - origin={50,34}))); + extent={{10,-10},{-10,10}}, + rotation=180, + origin={30,30}))); Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow heatFlowRateCon "Heat flow rate of the condenser" annotation (Placement(transformation( - extent={{-6,6},{6,-6}}, + extent={{-10,10},{10,-10}}, rotation=270, - origin={86,6}))); + origin={90,10}))); Modelica.Blocks.Math.Gain gain(k=-1) annotation (Placement(transformation( - extent={{-4,-4},{4,4}}, + extent={{-10,-10},{10,10}}, rotation=270, - origin={92,20}))); + origin={90,50}))); Modelica.Blocks.Logical.Not not2 "Negate output of hysteresis" - annotation (Placement(transformation(extent={{-5,-5},{5,5}}, - origin={45,63}, + annotation (Placement(transformation(extent={{-10,-10},{10,10}}, + origin={10,90}, rotation=180))); IBPSA.Fluid.Sources.Boundary_pT sinkSideFixedBoundary( nPorts=1, redeclare package Medium = Medium_sin) @@ -163,61 +169,66 @@ model HeatPump "Example for the reversible heat pump model." transformation( extent={{10,-10},{-10,10}}, rotation=0, - origin={88,-64}))); + origin={90,-70}))); Modelica.Blocks.Logical.LogicalSwitch logicalSwitch - annotation (Placement(transformation(extent={{30,48},{20,58}}))); + annotation (Placement(transformation(extent={{10,-10},{-10,10}}, + rotation=90, + origin={-10,50}))); Modelica.Blocks.Logical.Hysteresis hysCooling( pre_y_start=false, uLow=273.15 + 15, uHigh=273.15 + 19) - annotation (Placement(transformation(extent={{58,40},{48,50}}))); + annotation (Placement(transformation(extent={{40,60},{20,80}}))); equation connect(sourceSideMassFlowSource.ports[1], heatPump.port_a2) annotation (Line( - points={{-34,-70},{-24,-70},{-24,-45},{-12.5,-45}}, color={0,127,255})); + points={{-40,-70},{-14.5,-70},{-14.5,-63}}, color={0,127,255})); connect(nIn.y, pumSou.Nrpm) - annotation (Line(points={{50,29.6},{50,24}}, color={0,0,127})); + annotation (Line(points={{41,30},{50,30},{50,22}}, + color={0,0,127})); connect(Room.heatPort, heatFlowRateCon.port) - annotation (Line(points={{86,-10},{86,0}}, color={191,0,0})); - connect(sine.y, gain.u) annotation (Line(points={{84.4,30},{92,30},{92,24.8}}, + annotation (Line(points={{90,-20},{90,0}}, color={191,0,0})); + connect(sine.y, gain.u) annotation (Line(points={{90,79},{90,62}}, color={0,0,127})); - connect(heatFlowRateCon.Q_flow, gain.y) annotation (Line(points={{86,12},{86, - 14},{92,14},{92,15.6}}, color={0,0,127})); + connect(heatFlowRateCon.Q_flow, gain.y) annotation (Line(points={{90,20},{90, + 39}}, color={0,0,127})); connect(heatPump.port_b2, sourceSideFixedBoundary.ports[1]) annotation (Line( - points={{-12.5,3},{-70,3}}, color={0,127,255})); - connect(heatPump.port_b1, senTAct.port_a) annotation (Line(points={{16.5,-45}, - {30,-45},{30,-64},{44,-64}}, color={0,127,255})); - connect(Room.ports[1], pumSou.port_a) annotation (Line(points={{76,-19},{76,4}, - {60,4},{60,12}}, color={0,127,255})); - connect(pumSou.port_b, heatPump.port_a1) annotation (Line(points={{40,12},{28, - 12},{28,3},{16.5,3}}, color={0,127,255})); - connect(senTAct.T, hysHeating.u) annotation (Line(points={{54,-53},{54,-54},{ - 54,-54},{54,-54},{54,-8},{70,-8},{70,63},{67,63}}, color={0,0,127})); + points={{-14.5,-15},{-52,-15},{-52,-10},{-60,-10}}, + color={0,127,255})); + connect(heatPump.port_b1, senTAct.port_a) annotation (Line(points={{14.5,-63}, + {14.5,-70},{40,-70}}, color={0,127,255})); + connect(Room.ports[1], pumSou.port_a) annotation (Line(points={{80,-29},{80, + -32},{66,-32},{66,10},{60,10}}, + color={0,127,255})); + connect(pumSou.port_b, heatPump.port_a1) annotation (Line(points={{40,10},{ + 14.5,10},{14.5,-15}}, color={0,127,255})); + connect(senTAct.T, hysHeating.u) annotation (Line(points={{50,-59},{50,-56},{ + 54,-56},{54,-8},{70,-8},{70,90},{62,90}}, color={0,0,127})); connect(hysHeating.y, not2.u) - annotation (Line(points={{55.5,63},{51,63}}, color={255,0,255})); + annotation (Line(points={{39,90},{22,90}}, color={255,0,255})); connect(senTAct.port_b, sinkSideFixedBoundary.ports[1]) annotation (Line( - points={{64,-64},{72,-64},{72,-64},{78,-64}}, color={0,127,255})); - connect(senTAct.port_b, Room.ports[2]) annotation (Line(points={{64,-64},{66,-64}, - {66,-21},{76,-21}}, color={0,127,255})); + points={{60,-70},{80,-70}}, color={0,127,255})); + connect(senTAct.port_b, Room.ports[2]) annotation (Line(points={{60,-70},{66, + -70},{66,-31},{80,-31}}, color={0,127,255})); connect(TsuSourceRamp.y, sourceSideMassFlowSource.T_in) annotation (Line( - points={{-73,-80},{-66,-80},{-66,-66},{-56,-66}}, color={0,0,127}, + points={{-79,-90},{-62,-90},{-62,-66}}, color={0,0,127}, smooth=Smooth.None)); - connect(logicalSwitch.u1, not2.y) annotation (Line(points={{31,57},{36,57},{ - 36,63},{39.5,63}}, color={255,0,255})); - connect(hysCooling.y, logicalSwitch.u3) annotation (Line(points={{47.5,45},{ - 36,45},{36,49},{31,49}}, color={255,0,255})); - connect(senTAct.T, hysCooling.u) annotation (Line(points={{54,-53},{54,-54},{ - 54,-54},{54,-54},{54,-54},{54,-54},{54,-8},{70,-8},{70,45},{59,45}}, + connect(logicalSwitch.u1, not2.y) annotation (Line(points={{-18,62},{-18,90}, + {-1,90}}, color={255,0,255})); + connect(hysCooling.y, logicalSwitch.u3) annotation (Line(points={{19,70},{4, + 70},{4,62},{-2,62}}, color={255,0,255})); + connect(senTAct.T, hysCooling.u) annotation (Line(points={{50,-59},{50,-56},{ + 54,-56},{54,-8},{70,-8},{70,70},{42,70}}, color={0,0,127})); - connect(booleanStep.y, logicalSwitch.u2) annotation (Line(points={{43.4,88},{ - 36,88},{36,53},{31,53}}, color={255,0,255})); + connect(booleanModeSetStep.y, logicalSwitch.u2) + annotation (Line(points={{-59,70},{-10,70},{-10,62}}, color={255,0,255})); connect(logicalSwitch.y, booleanToReal.u) - annotation (Line(points={{19.5,53},{14,53},{14,66},{30,66},{30,71},{25,71}}, - color={255,0,255})); - connect(booleanStep.y, heatPump.modeSet) annotation (Line(points={{43.4,88},{-20, - 88},{-20,22},{-19.75,22},{-19.75,6.84}}, color={255,0,255})); - connect(booleanToReal.y, heatPump.ySet) annotation (Line(points={{13.5,71},{6.83333, - 71},{6.83333,6.84}}, color={0,0,127})); + annotation (Line(points={{-10,39},{-10,22}}, color={255,0,255})); + connect(booleanModeSetStep.y, heatPump.modeSet) annotation (Line(points={{-59, + 70},{-28,70},{-28,-11.16},{-21.75,-11.16}}, color={255,0,255})); + connect(booleanToReal.y, heatPump.ySet) annotation (Line(points={{-10,-1},{ + -10,-4},{4.83333,-4},{4.83333,-11.16}}, + color={0,0,127})); annotation (Diagram(coordinateSystem(preserveAspectRatio=false, extent={{-100, -100},{100,100}})), experiment(Tolerance=1e-6, StopTime=3600), diff --git a/IBPSA/Fluid/HeatPumps/HeatPump.mo b/IBPSA/Fluid/HeatPumps/HeatPump.mo index 1076d8f919..78f0a7caa2 100644 --- a/IBPSA/Fluid/HeatPumps/HeatPump.mo +++ b/IBPSA/Fluid/HeatPumps/HeatPump.mo @@ -3,10 +3,13 @@ model HeatPump "Grey-box model for reversible heat pumps using a black-box to simulate the refrigeration cycle" extends IBPSA.Fluid.HeatPumps.BaseClasses.PartialReversibleVapourCompressionMachine( + final autoCalc_mCon_flow=max(0.00004*QUse_flow_nominal - 0.6162, autoCalc_mMin_flow), + final autoCalc_mEva_flow=max(0.00004*QUse_flow_nominal - 0.3177, autoCalc_mMin_flow), + final autoCalc_VCon=max(0.0000001*QUse_flow_nominal - 0.0094,autoCalc_VMin), + final autoCalc_VEva=max(0.0000001*QUse_flow_nominal - 0.0075,autoCalc_VMin), mCon_flow_nominal=QUse_flow_nominal/(dTCon_nominal*cpCon), final scalingFactor=innerCycle.BlackBoxHeaPumHeating.scalingFactor, use_rev=true, - final machineType = true, redeclare IBPSA.Fluid.HeatPumps.BaseClasses.InnerCycle_HeatPump innerCycle( redeclare model BlaBoxHPHeating = BlaBoxHPHeating, redeclare model BlaBoxHPCooling = BlaBoxHPCooling)); @@ -26,6 +29,9 @@ model HeatPump annotation (choicesAllMatching=true); replaceable model BlaBoxHPCooling = IBPSA.Fluid.Chillers.BlackBoxData.BlackBox.BaseClasses.PartialBlackBox + constrainedby + IBPSA.Fluid.Chillers.BlackBoxData.BlackBox.BaseClasses.PartialBlackBox( + final scalingFactor=scalingFactor) "Black box data of a heat pump in cooling operation mode" annotation (Dialog(enable=use_rev),choicesAllMatching=true); replaceable parameter diff --git a/IBPSA/Fluid/HeatPumps/SafetyControls/RecordsCollection/HeatPumpSafetyControlBaseDataDefinition.mo b/IBPSA/Fluid/HeatPumps/SafetyControls/RecordsCollection/HeatPumpSafetyControlBaseDataDefinition.mo index 299fc06083..ab04096f30 100644 --- a/IBPSA/Fluid/HeatPumps/SafetyControls/RecordsCollection/HeatPumpSafetyControlBaseDataDefinition.mo +++ b/IBPSA/Fluid/HeatPumps/SafetyControls/RecordsCollection/HeatPumpSafetyControlBaseDataDefinition.mo @@ -1,5 +1,5 @@ within IBPSA.Fluid.HeatPumps.SafetyControls.RecordsCollection; -partial record HeatPumpSafetyControlBaseDataDefinition "Base data definition for heat pump safety models" +record HeatPumpSafetyControlBaseDataDefinition "Base data definition for heat pump safety models" extends Modelica.Icons.Record; parameter Boolean use_minRunTime "False if minimal runtime of HP is not considered" diff --git a/IBPSA/Fluid/HeatPumps/SafetyControls/SafetyControl.mo b/IBPSA/Fluid/HeatPumps/SafetyControls/SafetyControl.mo index 5ae828adb9..d621a2da88 100644 --- a/IBPSA/Fluid/HeatPumps/SafetyControls/SafetyControl.mo +++ b/IBPSA/Fluid/HeatPumps/SafetyControls/SafetyControl.mo @@ -1,7 +1,7 @@ within IBPSA.Fluid.HeatPumps.SafetyControls; block SafetyControl "Block including all safety levels" extends BaseClasses.PartialSafetyControl; - replaceable parameter RecordsCollection.DefaultSafetyControl + replaceable parameter RecordsCollection.HeatPumpSafetyControlBaseDataDefinition safetyControlParameters constrainedby RecordsCollection.HeatPumpSafetyControlBaseDataDefinition annotation (choicesAllMatching=true, Placement(transformation(extent={{-118,102},{-104,118}}))); IBPSA.Fluid.HeatPumps.SafetyControls.OperationalEnvelope