Buildings.Fluid.HeatPumps.ModularReversible.Validation.Comparative.BaseClasses
Package with partial validation models
Information
This package contains partial models for comparative validation.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
![]() |
Partial model to allow heat pump and chiller model comparison |
![]() |
Partial model for comparison to the Carnot model |
Buildings.Fluid.HeatPumps.ModularReversible.Validation.Comparative.BaseClasses.PartialComparison
Partial model to allow heat pump and chiller model comparison
Information
Partial model which is based on Buildings.Fluid.HeatPumps.Examples.Carnot_y to validate the modular reversible models by means of comparison to the Buildings.Fluid.HeatPumps.Carnot_y model.
Parameters
Type | Name | Default | Description |
---|---|---|---|
HeatFlowRate | QUse_flow_nominal | 30E3 | Nominal capacity [W] |
TemperatureDifference | dTEva_nominal | 10 | Temperature difference evaporator outlet-inlet [K] |
TemperatureDifference | dTCon_nominal | 10 | Temperature difference condenser outlet-inlet [K] |
Pressure | dp1_nominal | 6000 | Pressure difference over condenser [Pa] |
Pressure | dp2_nominal | 6000 | Pressure difference over evaporator [Pa] |
Real | etaCarnot_nominal | 0.3 | Carnot effectiveness (=COP/COP_Carnot) used during simulation if use_eta_Carnot_nominal = true |
Time | tau1 | 60 | Time constant at nominal flow rate (used if energyDynamics1 <> Modelica.Fluid.Types.Dynamics.SteadyState) [s] |
Temperature | T1_start | 303.15 | Initial or guess value of set point [K] |
Time | tau2 | 60 | Time constant at nominal flow rate (used if energyDynamics2 <> Modelica.Fluid.Types.Dynamics.SteadyState) [s] |
Temperature | T2_start | 278.15 | Initial or guess value of set point [K] |
Temperature | TConIn_nominal | 303.15 | Nominal condenser inlet temperature [K] |
Temperature | TEvaIn_nominal | 288.15 | Nominal condenser inlet temperature [K] |
Temperature | TCon_nominal | TConIn_nominal + dTCon_nominal | Nominal condenser temperature [K] |
Temperature | TEva_nominal | TEvaIn_nominal - dTEva_nominal | Nominal evaporator temperature [K] |
MassFlowRate | m2_flow_nominal | Nominal mass flow rate at chilled water side [kg/s] | |
MassFlowRate | m1_flow_nominal | Nominal mass flow rate at condenser water wide [kg/s] |
Modelica definition
partial model PartialComparison
"Partial model to allow heat pump and chiller model comparison"
package Medium1 = Buildings.Media.Water "Medium model";
package Medium2 = Buildings.Media.Water "Medium model";
parameter Modelica.Units.SI.HeatFlowRate QUse_flow_nominal = 30E3
"Nominal capacity";
parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal=10
"Temperature difference evaporator outlet-inlet";
parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal=10
"Temperature difference condenser outlet-inlet";
parameter Modelica.Units.SI.Pressure dp1_nominal=6000
"Pressure difference over condenser";
parameter Modelica.Units.SI.Pressure dp2_nominal=6000
"Pressure difference over evaporator";
parameter Real etaCarnot_nominal=0.3
"Carnot effectiveness (=COP/COP_Carnot) used during simulation if use_eta_Carnot_nominal = true";
parameter Modelica.Units.SI.Time tau1=60
"Time constant at nominal flow rate (used if energyDynamics1 <> Modelica.Fluid.Types.Dynamics.SteadyState)";
parameter Modelica.Units.SI.Temperature T1_start=303.15
"Initial or guess value of set point";
parameter Modelica.Units.SI.Time tau2=60
"Time constant at nominal flow rate (used if energyDynamics2 <> Modelica.Fluid.Types.Dynamics.SteadyState)";
parameter Modelica.Units.SI.Temperature T2_start=278.15
"Initial or guess value of set point";
parameter Modelica.Units.SI.Temperature TConIn_nominal=303.15
"Nominal condenser inlet temperature";
parameter Modelica.Units.SI.Temperature TEvaIn_nominal=288.15
"Nominal condenser inlet temperature";
parameter Modelica.Units.SI.Temperature TCon_nominal=TConIn_nominal + dTCon_nominal
"Nominal condenser temperature";
parameter Modelica.Units.SI.Temperature TEva_nominal=TEvaIn_nominal -
dTEva_nominal
"Nominal evaporator temperature";
parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal
"Nominal mass flow rate at chilled water side";
parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal
"Nominal mass flow rate at condenser water wide";
Buildings.Fluid.Sources.MassFlowSource_T sou1(
redeclare package Medium = Medium1,
use_T_in=true,
m_flow=m1_flow_nominal,
T=298.15) "Condenser mass flow source";
Buildings.Fluid.Sources.MassFlowSource_T sou2(
redeclare package Medium = Medium2,
use_T_in=true,
m_flow=m2_flow_nominal,
T=291.15) "Evaporator mass flow source";
Buildings.Fluid.Sources.Boundary_pT sin1(redeclare package Medium = Medium1);
Buildings.Fluid.Sources.Boundary_pT sin2(redeclare package Medium = Medium2);
Modelica.Blocks.Sources.Ramp uCom(
height=-1,
duration=60,
offset=1,
startTime=1800) "Compressor control signal";
Modelica.Blocks.Sources.Ramp TCon_in(
height=10,
duration=60,
offset=TConIn_nominal - 10,
startTime=60) "Condenser inlet temperature";
Modelica.Blocks.Sources.Ramp TEva_in(
height=10,
duration=60,
startTime=900,
offset=TEvaIn_nominal) "Evaporator inlet temperature";
equation
connect(TCon_in.y,sou1. T_in);
connect(TEva_in.y,sou2. T_in);
end PartialComparison;
Buildings.Fluid.HeatPumps.ModularReversible.Validation.Comparative.BaseClasses.PartialModularComparison
Partial model for comparison to the Carnot model
Information
Partial model to have consitent parameterization of the modular reversible model approaches.
Extends from PartialComparison (Partial model to allow heat pump and chiller model comparison).
Parameters
Type | Name | Default | Description |
---|---|---|---|
HeatFlowRate | QUse_flow_nominal | 30E3 | Nominal capacity [W] |
TemperatureDifference | dTEva_nominal | 10 | Temperature difference evaporator outlet-inlet [K] |
TemperatureDifference | dTCon_nominal | 10 | Temperature difference condenser outlet-inlet [K] |
Pressure | dp1_nominal | 6000 | Pressure difference over condenser [Pa] |
Pressure | dp2_nominal | 6000 | Pressure difference over evaporator [Pa] |
Real | etaCarnot_nominal | 0.3 | Carnot effectiveness (=COP/COP_Carnot) used during simulation if use_eta_Carnot_nominal = true |
Time | tau1 | 60 | Time constant at nominal flow rate (used if energyDynamics1 <> Modelica.Fluid.Types.Dynamics.SteadyState) [s] |
Temperature | T1_start | 303.15 | Initial or guess value of set point [K] |
Time | tau2 | 60 | Time constant at nominal flow rate (used if energyDynamics2 <> Modelica.Fluid.Types.Dynamics.SteadyState) [s] |
Temperature | T2_start | 278.15 | Initial or guess value of set point [K] |
Temperature | TConIn_nominal | 303.15 | Nominal condenser inlet temperature [K] |
Temperature | TEvaIn_nominal | 288.15 | Nominal condenser inlet temperature [K] |
Temperature | TCon_nominal | TConIn_nominal + dTCon_nominal | Nominal condenser temperature [K] |
Temperature | TEva_nominal | TEvaIn_nominal - dTEva_nominal | Nominal evaporator temperature [K] |
MassFlowRate | m2_flow_nominal | heaPum.mEva_flow_nominal | Nominal mass flow rate at chilled water side [kg/s] |
MassFlowRate | m1_flow_nominal | heaPum.mCon_flow_nominal | Nominal mass flow rate at condenser water wide [kg/s] |
Modelica definition
partial model PartialModularComparison
"Partial model for comparison to the Carnot model"
extends PartialComparison(
m1_flow_nominal=heaPum.mCon_flow_nominal,
m2_flow_nominal=heaPum.mEva_flow_nominal,
sou1(nPorts=1),
sin2(nPorts=1),
sou2(nPorts=1),
sin1(nPorts=1));
Buildings.Fluid.HeatPumps.ModularReversible.Modular heaPum(
redeclare final package MediumCon = Medium1,
redeclare final package MediumEva = Medium2,
QHea_flow_nominal=QUse_flow_nominal,
redeclare final model RefrigerantCycleInertia =
Buildings.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.Inertias.NoInertia,
final use_rev=false,
final use_intSafCtr=false,
final tauCon=tau1,
final TConHea_nominal=TCon_nominal,
final dTCon_nominal=dTCon_nominal,
final dpCon_nominal=dp1_nominal,
final use_conCap=false,
final CCon=0,
final GConOut=0,
final GConIns=0,
final tauEva=tau2,
final TEvaHea_nominal=TEva_nominal,
final dTEva_nominal=dTEva_nominal,
final dpEva_nominal=dp2_nominal,
final TConCoo_nominal=0,
final TEvaCoo_nominal=0,
final use_evaCap=false,
final CEva=0,
final GEvaOut=0,
final GEvaIns=0,
final TCon_start=T1_start,
final TEva_start=T2_start,
final energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
"Modular heat pump model";
equation
connect(heaPum.port_a1, sou1.ports[1]);
connect(heaPum.port_b2, sin2.ports[1]);
connect(heaPum.port_a2, sou2.ports[1]);
connect(heaPum.port_b1, sin1.ports[1]);
connect(heaPum.ySet, uCom.y);
end PartialModularComparison;