Collection of models that illustrate model use and test models
Information
This package contains examples for the use of models that can be found in
Buildings.Fluid.HeatPumps.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name |
Description |
Carnot_TCon
|
Test model for heat pump based on Carnot efficiency and condenser outlet temperature control signal |
Carnot_y
|
Test model for heat pump based on Carnot efficiency |
Test model for heat pump based on Carnot efficiency and condenser outlet temperature control signal
Information
Example that simulates a chiller whose efficiency is scaled based on the
Carnot cycle.
The chiller takes as an input the evaporator leaving water temperature.
The condenser mass flow rate is computed in such a way that it has
a temperature difference equal to dTEva_nominal
.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
TemperatureDifference | dTEva_nominal | -5 | Temperature difference evaporator inlet-outlet [K] |
TemperatureDifference | dTCon_nominal | 10 | Temperature difference condenser outlet-inlet [K] |
HeatFlowRate | QCon_flow_nominal | 100E3 | Evaporator heat flow rate [W] |
MassFlowRate | m1_flow_nominal | QCon_flow_nominal/dTCon_nomi... | Nominal mass flow rate at condenser [kg/s] |
Modelica definition
model Carnot_TCon
extends Modelica.Icons.Example;
package Medium1 =
Buildings.Media.Water ;
package Medium2 =
Buildings.Media.Water ;
parameter Modelica.SIunits.TemperatureDifference dTEva_nominal=-5 ;
parameter Modelica.SIunits.TemperatureDifference dTCon_nominal=10 ;
parameter Modelica.SIunits.HeatFlowRate QCon_flow_nominal = 100E3 ;
parameter Modelica.SIunits.MassFlowRate m1_flow_nominal=
QCon_flow_nominal/dTCon_nominal/4200 ;
Buildings.Fluid.HeatPumps.Carnot_TCon heaPum(
redeclare package Medium1 = Medium1,
redeclare package Medium2 = Medium2,
dTEva_nominal=dTEva_nominal,
dTCon_nominal=dTCon_nominal,
m1_flow_nominal=m1_flow_nominal,
show_T=true,
allowFlowReversal1=false,
allowFlowReversal2=false,
use_eta_Carnot_nominal=true,
etaCarnot_nominal=0.3,
QCon_flow_nominal=QCon_flow_nominal,
dp1_nominal=6000,
dp2_nominal=6000) ;
Buildings.Fluid.Sources.MassFlowSource_T sou1(nPorts=1,
redeclare package Medium = Medium1,
m_flow=m1_flow_nominal,
T=293.15);
Buildings.Fluid.Sources.MassFlowSource_T sou2(nPorts=1,
redeclare package Medium = Medium2,
use_T_in=false,
use_m_flow_in=true,
T=288.15);
Buildings.Fluid.Sources.FixedBoundary sin1(
redeclare package Medium = Medium1,
nPorts=1);
Buildings.Fluid.Sources.FixedBoundary sin2(nPorts=1,
redeclare package Medium = Medium2);
Modelica.Blocks.Sources.Ramp TConLvg(
duration=60,
startTime=1800,
height=15,
offset=273.15 + 35) ;
Modelica.Blocks.Math.Gain mEva_flow(k=-1/cp2_default/dTEva_nominal) ;
Modelica.Blocks.Math.Add QEva_flow(k2=-1) ;
final parameter Modelica.SIunits.SpecificHeatCapacity cp2_default=
Medium2.specificHeatCapacityCp(
Medium2.setState_pTX(
Medium2.p_default,
Medium2.T_default,
Medium2.X_default)) ;
equation
connect(sou1.ports[1], heaPum.port_a1);
connect(sou2.ports[1], heaPum.port_a2);
connect(sin2.ports[1], heaPum.port_b2);
connect(QEva_flow.y,mEva_flow. u);
connect(heaPum.port_b1, sin1.ports[1]);
connect(TConLvg.y, heaPum.TSet);
connect(mEva_flow.y, sou2.m_flow_in);
connect(QEva_flow.u1, heaPum.QCon_flow);
connect(QEva_flow.u2, heaPum.P);
end Carnot_TCon;
Test model for heat pump based on Carnot efficiency
Information
Example that simulates a heat pump whose efficiency is scaled based on the
Carnot cycle.
The control signal of the heat pump is the compressor speed.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
Real | COP_nominal | 6 | Nominal COP |
Power | P_nominal | 10E3 | Nominal compressor power (at y=1) [W] |
TemperatureDifference | dTEva_nominal | -10 | Temperature difference evaporator outlet-inlet [K] |
TemperatureDifference | dTCon_nominal | 10 | Temperature difference condenser outlet-inlet [K] |
MassFlowRate | m2_flow_nominal | -P_nominal*(COP_nominal - 1)... | Nominal mass flow rate at chilled water side [kg/s] |
MassFlowRate | m1_flow_nominal | P_nominal*COP_nominal/cp1_de... | Nominal mass flow rate at condenser water wide [kg/s] |
Modelica definition
model Carnot_y
extends Modelica.Icons.Example;
package Medium1 =
Buildings.Media.Water ;
package Medium2 =
Buildings.Media.Water ;
parameter Real COP_nominal = 6 ;
parameter Modelica.SIunits.Power P_nominal=10E3 ;
parameter Modelica.SIunits.TemperatureDifference dTEva_nominal=-10 ;
parameter Modelica.SIunits.TemperatureDifference dTCon_nominal=10 ;
parameter Modelica.SIunits.MassFlowRate m2_flow_nominal=
-P_nominal*(COP_nominal-1)/cp2_default/dTEva_nominal ;
parameter Modelica.SIunits.MassFlowRate m1_flow_nominal=
P_nominal*COP_nominal/cp1_default/dTCon_nominal ;
Buildings.Fluid.HeatPumps.Carnot_y heaPum(
redeclare package Medium1 = Medium1,
redeclare package Medium2 = Medium2,
P_nominal=P_nominal,
dTEva_nominal=dTEva_nominal,
dTCon_nominal=dTCon_nominal,
dp1_nominal=6000,
dp2_nominal=6000,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
show_T=true,
use_eta_Carnot_nominal=false,
COP_nominal=COP_nominal,
TCon_nominal=303.15,
TEva_nominal=278.15) ;
Buildings.Fluid.Sources.MassFlowSource_T sou1(nPorts=1,
redeclare package Medium = Medium1,
use_T_in=true,
m_flow=m1_flow_nominal,
T=298.15);
Buildings.Fluid.Sources.MassFlowSource_T sou2(nPorts=1,
redeclare package Medium = Medium2,
use_T_in=true,
m_flow=m2_flow_nominal,
T=291.15);
Buildings.Fluid.Sources.FixedBoundary sin1(
nPorts=1,
redeclare package Medium = Medium1);
Buildings.Fluid.Sources.FixedBoundary sin2(
nPorts=1,
redeclare package Medium = Medium2);
Modelica.Blocks.Sources.Ramp uCom(
height=-1,
duration=60,
offset=1,
startTime=1800) ;
Modelica.Blocks.Sources.Ramp TCon_in(
height=10,
duration=60,
offset=273.15 + 20,
startTime=60) ;
Modelica.Blocks.Sources.Ramp TEva_in(
height=10,
duration=60,
startTime=900,
offset=273.15 + 15) ;
final parameter Modelica.SIunits.SpecificHeatCapacity cp1_default=
Medium1.specificHeatCapacityCp(
Medium1.setState_pTX(
Medium1.p_default,
Medium1.T_default,
Medium1.X_default)) ;
final parameter Modelica.SIunits.SpecificHeatCapacity cp2_default=
Medium2.specificHeatCapacityCp(
Medium2.setState_pTX(
Medium2.p_default,
Medium2.T_default,
Medium2.X_default)) ;
equation
connect(sou1.ports[1], heaPum.port_a1);
connect(sou2.ports[1], heaPum.port_a2);
connect(heaPum.port_b1, sin1.ports[1]);
connect(sin2.ports[1], heaPum.port_b2);
connect(TCon_in.y, sou1.T_in);
connect(TEva_in.y, sou2.T_in);
connect(uCom.y, heaPum.y);
end Carnot_y;
http://simulationresearch.lbl.gov/modelica