partial model EffectivenessNTUMassFlow
"Partial model of epsilon-NTU coil that tests variable mass flow rates"
package Medium1 =
Buildings.Media.ConstantPropertyLiquidWater;
package Medium2 =
Buildings.Media.PerfectGases.MoistAirUnsaturated;
parameter Modelica.SIunits.Temperature T_a1_nominal=5 + 273.15;
parameter Modelica.SIunits.Temperature T_b1_nominal=10 + 273.15;
parameter Modelica.SIunits.Temperature T_a2_nominal=30 + 273.15;
parameter Modelica.SIunits.Temperature T_b2_nominal=15 + 273.15;
parameter Modelica.SIunits.HeatFlowRate Q_flow_nominal = m1_flow_nominal*4200*(T_a1_nominal-T_b1_nominal)
"Nominal heat transfer";
parameter Modelica.SIunits.MassFlowRate m1_flow_nominal=0.1
"Nominal mass flow rate medium 1";
parameter Modelica.SIunits.MassFlowRate m2_flow_nominal=m1_flow_nominal*4200/
1000*(T_a1_nominal - T_b1_nominal)/(T_b2_nominal - T_a2_nominal)
"Nominal mass flow rate medium 2";
Buildings.Fluid.Sources.Boundary_pT sin_2(
redeclare package Medium = Medium2,
use_p_in=false,
p(displayUnit="Pa") = 101325,
T=T_a2_nominal);
Buildings.Fluid.Sources.MassFlowSource_T sou_2(
redeclare package Medium = Medium2,
T=T_a2_nominal,
X={0.02,1 - 0.02},
use_T_in=true,
use_X_in=true,
m_flow=m2_flow_nominal,
use_m_flow_in=true);
Buildings.Fluid.Sources.Boundary_pT sin_1(
redeclare package Medium = Medium1,
use_p_in=false,
p=300000,
T=T_a1_nominal);
Buildings.Fluid.Sources.MassFlowSource_T sou_1(
redeclare package Medium = Medium1,
use_m_flow_in=true,
use_T_in=false,
T=T_a1_nominal);
inner Modelica.Fluid.System system;
Modelica.Blocks.Sources.Constant const(k=0.8);
Buildings.Utilities.Psychrometrics.X_pTphi x_pTphi(use_p_in=false);
Modelica.Blocks.Sources.Constant const1(k=T_a2_nominal);
Modelica.Blocks.Math.Gain mWat_flow(k=m1_flow_nominal)
"Water mass flow rate";
Modelica.Blocks.Sources.TimeTable mWatGai(
table=[0,1; 3600*0.1,1; 3600*0.2,0.01; 3600*0.3,0.01])
"Gain for water mass flow rate";
Modelica.Blocks.Sources.TimeTable mAirGai(
table=[0,1; 3600*0.5,1; 3600*0.6,-1; 3600*0.7,0; 3600*1,0])
"Gain for air mass flow rate";
Modelica.Blocks.Math.Gain mAir_flow(k=m2_flow_nominal)
"Air mass flow rate";
equation
connect(x_pTphi.X, sou_2.X_in);
connect(const.y, x_pTphi.phi);
connect(const1.y, x_pTphi.T);
connect(const1.y, sou_2.T_in);
connect(mWat_flow.y, sou_1.m_flow_in);
connect(mAir_flow.y, sou_2.m_flow_in);
connect(mAirGai.y, mAir_flow.u);
connect(mWatGai.y, mWat_flow.u);
end EffectivenessNTUMassFlow;