From edecd1ff9073ad0bc8e2cf97b6405cf7116850fc Mon Sep 17 00:00:00 2001 From: Michael Wetter Date: Mon, 15 Jan 2024 08:06:19 -0800 Subject: [PATCH 1/2] Removed more final displayUnit entries --- .../PartialReversibleRefrigerantMachine.mo | 8 ++++---- .../BaseClasses/PartialRefrigerantCycle.mo | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/IBPSA/Fluid/HeatPumps/ModularReversible/BaseClasses/PartialReversibleRefrigerantMachine.mo b/IBPSA/Fluid/HeatPumps/ModularReversible/BaseClasses/PartialReversibleRefrigerantMachine.mo index 5382cf2023..3b5f4fc4d9 100644 --- a/IBPSA/Fluid/HeatPumps/ModularReversible/BaseClasses/PartialReversibleRefrigerantMachine.mo +++ b/IBPSA/Fluid/HeatPumps/ModularReversible/BaseClasses/PartialReversibleRefrigerantMachine.mo @@ -275,8 +275,8 @@ partial model PartialReversibleRefrigerantMachine transformation(extent={{-172,4},{-140,36}}), iconTransformation(extent={{-122,10}, {-102,30}}))); - Modelica.Blocks.Interfaces.RealInput TEvaAmb(final unit="K", final - displayUnit="degC") if use_evaCap and not use_busConOnl + Modelica.Blocks.Interfaces.RealInput TEvaAmb(final unit="K", displayUnit="degC") + if use_evaCap and not use_busConOnl "Ambient temperature on the evaporator side" annotation (Placement( transformation( extent={{10,-10},{-10,10}}, @@ -284,8 +284,8 @@ partial model PartialReversibleRefrigerantMachine origin={-150,-130}),iconTransformation(extent={{10,-10},{-10,10}}, origin={-112,-90}, rotation=180))); - Modelica.Blocks.Interfaces.RealInput TConAmb(final unit="K", final - displayUnit="degC") if use_conCap and not use_busConOnl + Modelica.Blocks.Interfaces.RealInput TConAmb(final unit="K", displayUnit="degC") + if use_conCap and not use_busConOnl "Ambient temperature on the condenser side" annotation (Placement( transformation( extent={{-10,10},{10,-10}}, diff --git a/IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/PartialRefrigerantCycle.mo b/IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/PartialRefrigerantCycle.mo index 748a565328..b0c00857db 100644 --- a/IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/PartialRefrigerantCycle.mo +++ b/IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/PartialRefrigerantCycle.mo @@ -47,14 +47,14 @@ partial model PartialRefrigerantCycle parameter Modelica.Units.SI.SpecificHeatCapacity cpEva "Evaporator medium specific heat capacity" annotation (Dialog(tab="Advanced", group="Medium properties")); - Modelica.Blocks.Interfaces.RealOutput PEle(final unit="W", displayUnit= - "kW") "Electrical Power consumed by the device" annotation (Placement( + Modelica.Blocks.Interfaces.RealOutput PEle(final unit="W", displayUnit="kW") + "Electrical Power consumed by the device" annotation (Placement( transformation( extent={{-10,-10},{10,10}}, rotation=270, origin={0,-130}))); - Modelica.Blocks.Interfaces.RealOutput QCon_flow(final unit="W", final - displayUnit="kW") "Heat flow rate through condenser" annotation ( + Modelica.Blocks.Interfaces.RealOutput QCon_flow(final unit="W", displayUnit="kW") + "Heat flow rate through condenser" annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, @@ -64,8 +64,8 @@ partial model PartialRefrigerantCycle extent={{-15,-14},{15,14}}, rotation=0, origin={1,120}))); - Modelica.Blocks.Interfaces.RealOutput QEva_flow(final unit="W", final - displayUnit="kW") "Heat flow rate through evaporator" annotation ( + Modelica.Blocks.Interfaces.RealOutput QEva_flow(final unit="W", displayUnit="kW") + "Heat flow rate through evaporator" annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, rotation=270, From b88d55968213b3c00e13dd6cff1b758ca08473bb Mon Sep 17 00:00:00 2001 From: Michael Wetter Date: Mon, 15 Jan 2024 08:10:38 -0800 Subject: [PATCH 2/2] Removed all 'kW' declarations They have been removed as no other model sets 'kW'. In Dymola, users could change all 'W' to 'kW' if they want to, in which case the setting is applied to all quantities with 'W', not just the ones declared here --- .../PartialModularRefrigerantCycle.mo | 24 +++++++++---------- .../BaseClasses/PartialRefrigerantCycle.mo | 6 ++--- .../BaseClasses/PartialTableData2D.mo | 4 ++-- .../BaseClasses/PartialValidation.mo | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/IBPSA/Fluid/HeatPumps/ModularReversible/BaseClasses/PartialModularRefrigerantCycle.mo b/IBPSA/Fluid/HeatPumps/ModularReversible/BaseClasses/PartialModularRefrigerantCycle.mo index 8d5599bff9..1c0c73db14 100644 --- a/IBPSA/Fluid/HeatPumps/ModularReversible/BaseClasses/PartialModularRefrigerantCycle.mo +++ b/IBPSA/Fluid/HeatPumps/ModularReversible/BaseClasses/PartialModularRefrigerantCycle.mo @@ -10,26 +10,26 @@ partial model PartialModularRefrigerantCycle transformation(extent={{-18,84},{18,116}}), iconTransformation(extent={{-16,84}, {18,114}}))); Modelica.Blocks.Interfaces.RealOutput QCon_flow( - final unit="W", displayUnit="kW") + final unit="W") "Heat flow rate from the refrigerant to the condenser medium" annotation (Placement(transformation(extent={{100,-10},{120,10}}))); Modelica.Blocks.Interfaces.RealOutput QEva_flow( - final unit="W", displayUnit="kW") + final unit="W") "Heat flow rate from the evaporator medium to the refrigerant" annotation (Placement(transformation(extent={{-100,-10},{-120,10}}))); Modelica.Blocks.Logical.Switch swiQEva( - u1(final unit="W", displayUnit="kW"), - u3(final unit="W", displayUnit="kW"), - y(final unit="W", displayUnit="kW")) if use_rev + u1(final unit="W"), + u3(final unit="W"), + y(final unit="W")) if use_rev "Routing block that picks the component acting as evaporator" annotation (Placement(transformation(extent={{-60,-10},{-80,10}}))); Modelica.Blocks.Logical.Switch swiQCon( - y(final unit="W", displayUnit="kW"), - u1(final unit="W", displayUnit="kW"), - u3(final unit="W", displayUnit="kW")) if use_rev + y(final unit="W"), + u1(final unit="W"), + u3(final unit="W")) if use_rev "Routing block that picks the component acting as condenser" annotation (Placement(transformation(extent={{60,-10},{80,10}}))); - Modelica.Blocks.Interfaces.RealOutput PEle(final unit="W", displayUnit="kW") + Modelica.Blocks.Interfaces.RealOutput PEle(final unit="W") "Routing block that picks the component for electric power consumption" annotation (Placement( transformation( @@ -38,9 +38,9 @@ partial model PartialModularRefrigerantCycle origin={0.5,-110.5}))); Modelica.Blocks.Logical.Switch swiPEle( - u1(final unit="W", displayUnit="kW"), - u3(final unit="W", displayUnit="kW"), - y(final unit="W", displayUnit="kW")) if use_rev + u1(final unit="W"), + u3(final unit="W"), + y(final unit="W")) if use_rev "Whether to use cooling or heating power output" annotation (Placement( transformation( extent={{-10,-10},{10,10}}, diff --git a/IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/PartialRefrigerantCycle.mo b/IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/PartialRefrigerantCycle.mo index b0c00857db..c2c1f22bcc 100644 --- a/IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/PartialRefrigerantCycle.mo +++ b/IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/PartialRefrigerantCycle.mo @@ -47,13 +47,13 @@ partial model PartialRefrigerantCycle parameter Modelica.Units.SI.SpecificHeatCapacity cpEva "Evaporator medium specific heat capacity" annotation (Dialog(tab="Advanced", group="Medium properties")); - Modelica.Blocks.Interfaces.RealOutput PEle(final unit="W", displayUnit="kW") + Modelica.Blocks.Interfaces.RealOutput PEle(final unit="W") "Electrical Power consumed by the device" annotation (Placement( transformation( extent={{-10,-10},{10,10}}, rotation=270, origin={0,-130}))); - Modelica.Blocks.Interfaces.RealOutput QCon_flow(final unit="W", displayUnit="kW") + Modelica.Blocks.Interfaces.RealOutput QCon_flow(final unit="W") "Heat flow rate through condenser" annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, @@ -64,7 +64,7 @@ partial model PartialRefrigerantCycle extent={{-15,-14},{15,14}}, rotation=0, origin={1,120}))); - Modelica.Blocks.Interfaces.RealOutput QEva_flow(final unit="W", displayUnit="kW") + Modelica.Blocks.Interfaces.RealOutput QEva_flow(final unit="W") "Heat flow rate through evaporator" annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, diff --git a/IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/PartialTableData2D.mo b/IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/PartialTableData2D.mo index aaf169d92b..32d416756b 100644 --- a/IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/PartialTableData2D.mo +++ b/IBPSA/Fluid/HeatPumps/ModularReversible/RefrigerantCycle/BaseClasses/PartialTableData2D.mo @@ -19,7 +19,7 @@ partial model PartialTableData2D final smoothness=smoothness, final u1(unit="K", displayUnit="degC"), final u2(unit="K", displayUnit="degC"), - final y(unit="W", displayUnit="kW"), + final y(unit="W"), final extrapolation=extrapolation) "Electrical power consumption table" annotation ( Placement(transformation( extent={{-10,-10},{10,10}}, @@ -33,7 +33,7 @@ partial model PartialTableData2D final smoothness=smoothness, final u1(unit="K", displayUnit="degC"), final u2(unit="K", displayUnit="degC"), - final y(unit="W", displayUnit="kW"), + final y(unit="W"), final extrapolation=extrapolation) "Table for useful heat flow rate" annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=-90, diff --git a/IBPSA/Fluid/HeatPumps/ModularReversible/Validation/BaseClasses/PartialValidation.mo b/IBPSA/Fluid/HeatPumps/ModularReversible/Validation/BaseClasses/PartialValidation.mo index 880d3f9650..04f303f871 100644 --- a/IBPSA/Fluid/HeatPumps/ModularReversible/Validation/BaseClasses/PartialValidation.mo +++ b/IBPSA/Fluid/HeatPumps/ModularReversible/Validation/BaseClasses/PartialValidation.mo @@ -100,10 +100,10 @@ partial model PartialValidation Modelica.Blocks.Interfaces.RealOutput TEvaOutMea(unit="K", displayUnit="degC") "Measured evaporator outlet" annotation (Placement(transformation(extent={{100,0},{120,20}}))); - Modelica.Blocks.Interfaces.RealOutput PEleMea(unit="W", displayUnit="kW") + Modelica.Blocks.Interfaces.RealOutput PEleMea(unit="W") "Measured electrical power consumption" annotation (Placement(transformation(extent={{100,-78},{120,-58}}))); - Modelica.Blocks.Interfaces.RealOutput PEleSim(unit="W", displayUnit="kW") + Modelica.Blocks.Interfaces.RealOutput PEleSim(unit="W") "Simulated electrical power consumption" annotation (Placement(transformation(extent={{100,-102},{120,-82}}))); Modelica.Blocks.Interfaces.RealOutput TConOutSim(unit="K", displayUnit="degC")