Name |
Description |
PartialElectric
|
Base class for test model of chiller electric EIR |
partial model PartialElectric
package Medium1 =
Buildings.Media.Water ;
package Medium2 =
Buildings.Media.Water ;
parameter Modelica.SIunits.Power P_nominal ;
parameter Modelica.SIunits.TemperatureDifference dTEva_nominal=10 ;
parameter Modelica.SIunits.TemperatureDifference dTCon_nominal=10 ;
parameter Real COPc_nominal = 3 ;
parameter Modelica.SIunits.MassFlowRate mEva_flow_nominal ;
parameter Modelica.SIunits.MassFlowRate mCon_flow_nominal ;
Buildings.Fluid.Sources.MassFlowSource_T sou1(
redeclare package Medium = Medium1,
use_T_in=true,
m_flow=mCon_flow_nominal,
T=298.15);
Buildings.Fluid.Sources.MassFlowSource_T sou2(
redeclare package Medium = Medium2,
use_T_in=true,
m_flow=mEva_flow_nominal,
T=291.15);
Buildings.Fluid.Sources.FixedBoundary sin1(
redeclare package Medium = Medium1,
nPorts=1);
Buildings.Fluid.Sources.FixedBoundary sin2(
redeclare package Medium = Medium2,
nPorts=1);
Modelica.Blocks.Sources.Ramp TSet(
duration=3600,
startTime=3*3600,
offset=273.15 + 10,
height=8) ;
Modelica.Blocks.Sources.Ramp TCon_in(
height=10,
offset=273.15 + 20,
duration=3600,
startTime=2*3600) ;
Modelica.Blocks.Sources.Ramp TEva_in(
offset=273.15 + 15,
height=5,
startTime=3600,
duration=3600) ;
Modelica.Blocks.Sources.Pulse pulse(period=3600/2);
Modelica.Blocks.Logical.GreaterThreshold greaterThreshold(threshold=0.5);
Buildings.Fluid.FixedResistances.FixedResistanceDpM res1(
redeclare package Medium = Medium1,
m_flow_nominal=mCon_flow_nominal,
dp_nominal=6000) ;
Buildings.Fluid.FixedResistances.FixedResistanceDpM res2(
dp_nominal=6000,
redeclare package Medium = Medium2,
m_flow_nominal=mEva_flow_nominal) ;
equation
connect(TCon_in.y, sou1.T_in);
connect(TEva_in.y, sou2.T_in);
connect(greaterThreshold.u, pulse.y);
connect(res1.port_b, sin1.ports[1]);
connect(res2.port_b, sin2.ports[1]);
end PartialElectric;