Skip to content

Commit

Permalink
Grouped parameters for condenser and evaporator, set dTEva_nominal = …
Browse files Browse the repository at this point in the history
…0 to be final
  • Loading branch information
mwetter committed Dec 21, 2023
1 parent 4ebe280 commit 3354350
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,34 +42,24 @@ partial model PartialReversibleRefrigerantMachine
parameter Boolean use_rev=true
"=true if the chiller or heat pump is reversible"
annotation(choices(checkBox=true));
parameter Boolean use_intSafCtr=true
"=true to enable internal safety control"
annotation (Dialog(group="Safety control"), choices(checkBox=true));
replaceable parameter
IBPSA.Fluid.HeatPumps.ModularReversible.Controls.Safety.Data.Wuellhorst2021 safCtrPar
constrainedby
IBPSA.Fluid.HeatPumps.ModularReversible.Controls.Safety.Data.Generic
"Safety control parameters" annotation (Dialog(enable=use_intSafCtr,
group="Safety control"),
choicesAllMatching=true,
Placement(transformation(extent={{42,-18},{58,-2}})));

//Condenser
parameter Modelica.Units.SI.Time tauCon=30
"Condenser heat transfer time constant at nominal flow"
annotation (Dialog(tab="Condenser", group="Dynamics"));
parameter Modelica.Units.SI.Temperature TCon_nominal
"Nominal temperature of condenser medium"
annotation (Dialog(group="Nominal condition"));
annotation (Dialog(group="Nominal condition - Condenser"));
parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal
"Nominal temperature difference in condenser medium"
annotation (Dialog(group="Nominal condition"));
annotation (Dialog(group="Nominal condition - Condenser"));
parameter Modelica.Units.SI.MassFlowRate mCon_flow_nominal
"Nominal mass flow rate of the condenser medium"
annotation (Dialog(group="Nominal condition"));
annotation (Dialog(group="Nominal condition - Condenser"));

parameter Modelica.Units.SI.PressureDifference dpCon_nominal(displayUnit="Pa")
"Pressure drop at nominal mass flow rate"
annotation (Dialog(group="Nominal condition"));
annotation (Dialog(group="Nominal condition - Condenser"));
parameter Real deltaMCon=0.1
"Fraction of nominal mass flow rate where transition to turbulent occurs"
annotation (Dialog(tab="Condenser", group="Flow resistance"));
Expand Down Expand Up @@ -108,17 +98,17 @@ partial model PartialReversibleRefrigerantMachine
annotation (Dialog(tab="Evaporator", group="Dynamics"));
parameter Modelica.Units.SI.Temperature TEva_nominal
"Nominal temperature of evaporator medium"
annotation (Dialog(group="Nominal condition"));
annotation (Dialog(group="Nominal condition - Evaporator"));
parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal
"Nominal temperature difference in evaporator medium"
annotation (Dialog(group="Nominal condition"));
annotation (Dialog(group="Nominal condition - Evaporator"));
parameter Modelica.Units.SI.MassFlowRate mEva_flow_nominal
"Nominal mass flow rate of the evaporator medium"
annotation (Dialog(group="Nominal condition"));
annotation (Dialog(group="Nominal condition - Evaporator"));

parameter Modelica.Units.SI.PressureDifference dpEva_nominal(displayUnit="Pa")
"Pressure drop at nominal mass flow rate"
annotation (Dialog(group="Nominal condition"));
annotation (Dialog(group="Nominal condition - Evaporator"));
parameter Real deltaMEva=0.1
"Fraction of nominal mass flow rate where transition to turbulent occurs"
annotation (Dialog(tab="Evaporator", group="Flow resistance"));
Expand Down Expand Up @@ -150,6 +140,20 @@ partial model PartialReversibleRefrigerantMachine
MediumEva.specificHeatCapacityCp(staEva_nominal)
"Evaporator medium specific heat capacity";

// Safety control
parameter Boolean use_intSafCtr=true
"=true to enable internal safety control"
annotation (Dialog(group="Safety control"), choices(checkBox=true));
replaceable parameter
IBPSA.Fluid.HeatPumps.ModularReversible.Controls.Safety.Data.Wuellhorst2021 safCtrPar
constrainedby
IBPSA.Fluid.HeatPumps.ModularReversible.Controls.Safety.Data.Generic
"Safety control parameters" annotation (Dialog(enable=use_intSafCtr,
group="Safety control"),
choicesAllMatching=true,
Placement(transformation(extent={{42,-18},{58,-2}})));


//Assumptions
parameter Boolean allowFlowReversalEva=true
"= false to simplify equations, assuming, but not enforcing, no flow reversal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ model ReversibleAirToWaterTableData2D
dpEva_nominal=datTabHea.dpEva_nominal*scaFac^2,
dpCon_nominal=datTabHea.dpCon_nominal*scaFac^2,
final safCtrPar=safCtrParEurNor,
dTEva_nominal=0,
final dTEva_nominal=0,
mEva_flow_nominal=datTabHea.mEva_flow_nominal*scaFac,
mCon_flow_nominal=datTabHea.mCon_flow_nominal*scaFac,
dTCon_nominal=QUse_flow_nominal/cpCon/mCon_flow_nominal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ model ReversibleCarnotWithLosses
parameter Modelica.Units.SI.TemperatureDifference TAppCon_nominal=
if cpCon < 1500 then 5 else 2
"Temperature difference between refrigerant and working fluid outlet in condenser"
annotation(Dialog(group="Nominal condition"));
annotation(Dialog(group="Nominal condition - Condenser"));
parameter Modelica.Units.SI.TemperatureDifference TAppEva_nominal=
if cpEva < 1500 then 5 else 2
"Temperature difference between refrigerant and working fluid outlet in evaporator"
annotation(Dialog(group="Nominal condition"));
annotation(Dialog(group="Nominal condition - Evaporator"));
parameter Modelica.Units.SI.Time refIneTimCon = 300
"Refrigerant cycle inertia time constant for first order delay"
annotation(Dialog(group="Refrigerant cycle inertia"));
Expand Down

0 comments on commit 3354350

Please sign in to comment.