Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue3492 direct evaporative cooler #4056

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ block DirectCalculations

Buildings.Controls.OBC.CDL.Interfaces.RealInput p(
final unit="Pa",
final quantity="AbsolutePressure")
final quantity="Pressure")
"Pressure"
annotation (Placement(transformation(origin={-120,-60},extent={{-20,-20},{20,20}}),
iconTransformation(origin={-120,-60}, extent={{-20,-20},{20,20}})));
Expand Down
145 changes: 55 additions & 90 deletions Buildings/Fluid/Humidifiers/EvaporativeCoolers/Direct.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2,124 +2,89 @@ within Buildings.Fluid.Humidifiers.EvaporativeCoolers;
model Direct
"Direct evaporative cooler"

extends Buildings.Fluid.Interfaces.PartialTwoPort;

parameter Modelica.Units.SI.MassFlowRate m_flow_nominal
"Nominal air mass flow rate";

parameter Modelica.Units.SI.PressureDifference dp_nominal(
displayUnit="Pa")
"Pressure drop at nominal mass flow rate";
extends Buildings.Fluid.Interfaces.TwoPortHeatMassExchanger(
redeclare Buildings.Fluid.MixingVolumes.MixingVolumeMoistAir vol);

parameter Modelica.Units.SI.Area padAre
"Area of the rigid media evaporative pad";

parameter Modelica.Units.SI.Length dep
"Depth of the rigid media evaporative pad";

parameter Modelica.Units.SI.Time tau=30
"Time constant at nominal flow rate (if energyDynamics <> SteadyState)"
annotation (Dialog(tab="Dynamics", group="Nominal condition"));

Buildings.Controls.OBC.CDL.Interfaces.RealOutput dmWat_flow(
final unit="kg/s",
final quantity="MassFlowRate")
"Water vapor mass flow rate difference between inlet and outlet"
annotation (Placement(transformation(origin={120,80}, extent={{-20,-20},{20,20}}),
iconTransformation(origin={90,40}, extent={{-20,-20},{20,20}})));

Buildings.Fluid.Sensors.TemperatureTwoPort senTem(
redeclare final package Medium = Medium,
final allowFlowReversal=allowFlowReversal,
final m_flow_nominal=m_flow_nominal,
final initType=Modelica.Blocks.Types.Init.InitialOutput,
final T_start=298.15)
"Dry bulb temperature sensor"
annotation (Placement(transformation(origin={-70,0}, extent={{-10,-10},{10,10}})));

Buildings.Fluid.Sensors.TemperatureWetBulbTwoPort senTemWetBul(
redeclare final package Medium = Medium,
final allowFlowReversal=allowFlowReversal,
final m_flow_nominal=m_flow_nominal,
final initType=Modelica.Blocks.Types.Init.InitialOutput,
final TWetBul_start=296.15)
"Wet bulb temperature sensor"
annotation (Placement(transformation(origin={-40,0}, extent={{-10,-10},{10,10}})));

Buildings.Fluid.Sensors.VolumeFlowRate senVolFlo(
redeclare final package Medium = Medium,
final allowFlowReversal=allowFlowReversal,
final m_flow_nominal=m_flow_nominal)
"Volume flow rate sensor"
annotation (Placement(transformation(origin={-10,0}, extent={{-10,-10},{10,10}})));

Buildings.Fluid.FixedResistances.PressureDrop res(
redeclare final package Medium = Medium,
final allowFlowReversal=allowFlowReversal,
final dp_nominal=dp_nominal,
final m_flow_nominal = m_flow_nominal)
"Pressure drop"
annotation (Placement(transformation(origin={30,0}, extent={{-10,-10},{10,10}})));

Buildings.Fluid.MixingVolumes.MixingVolumeMoistAir vol(
redeclare final package Medium = Medium,
final m_flow_nominal = m_flow_nominal,
final allowFlowReversal=allowFlowReversal,
final V=m_flow_nominal*tau/rho_default,
final nPorts = 2)
"Moist air mixing volume"
annotation (Placement(transformation(origin={80,20}, extent={{-10,-10},{10,10}})));

Buildings.Fluid.Humidifiers.EvaporativeCoolers.Baseclasses.DirectCalculations dirEvaCoo(
redeclare final package Medium = Medium,
final dep=dep,
final padAre=padAre)
"Direct evaporative cooling calculator"
annotation (Placement(transformation(origin={30,60}, extent={{-10,-10},{10,10}})));

Buildings.Fluid.Sensors.Pressure senPre(
redeclare final package Medium = Medium)
"Pressure"
annotation (Placement(transformation(origin={-90,54}, extent={{-10,-10},{10,10}})));

protected
parameter Medium.ThermodynamicState sta_default=Medium.setState_pTX(
T=Medium.T_default,
p=Medium.p_default,
X=Medium.X_default)
"Default state of medium";

parameter Modelica.Units.SI.Density rho_default=Medium.density(sta_default)
"Density, used to compute fluid volume";
Medium.ThermodynamicState staInl=Medium.setState_phX(
p=port_a.p, h=inStream(port_a.h_outflow), X=inStream(port_a.Xi_outflow))
"State of inlet medium";

Modelica.Blocks.Sources.RealExpression TDryBul(
y=Medium.temperature(state=staInl))
"Inlet air drybulb temperature"
annotation (Placement(transformation(extent={{-90,82},{-70,98}})));

Modelica.Blocks.Sources.RealExpression XInl[Medium.nXi](
y=inStream(port_a.Xi_outflow))
"Inlet air humidity ratio"
annotation (Placement(transformation(extent={{-90,72},{-70,88}})));

Modelica.Blocks.Sources.RealExpression pInl(
y=port_a.p)
"Inlet air pressure"
annotation (Placement(transformation(extent={{-90,52},{-70,68}})));

Modelica.Blocks.Sources.RealExpression V_flow(
y=port_a.m_flow/Medium.density(staInl))
"Inlet air volume flowrate"
annotation (Placement(transformation(extent={{-90,32},{-70,48}})));

Buildings.Utilities.Psychrometrics.TWetBul_TDryBulXi wetBul(
redeclare package Medium = Medium)
"Calculate wet bulb temperature from inlet medium state"
annotation (Placement(transformation(extent={{-20,70},{0,90}})));

Modelica.Blocks.Routing.RealPassThrough realPassThrough
"Pass-through block for transmitting real signal with different units"
annotation (Placement(transformation(extent={{-60,50},{-40,70}})));

equation
connect(senVolFlo.V_flow, dirEvaCoo.V_flow) annotation (Line(points={{-10,11},
{-10,58},{18,58}}, color={0,0,127}));
connect(senTemWetBul.T, dirEvaCoo.TWetBulIn)
annotation (Line(points={{-40,11},{-40,66},{18,66}}, color={0,0,127}));
connect(senTem.T, dirEvaCoo.TDryBulIn)
annotation (Line(points={{-70,11},{-70,62},{18,62}}, color={0,0,127}));
connect(senTem.port_b, senTemWetBul.port_a)
annotation (Line(points={{-60,0},{-50,0}}, color={0,127,255}));
connect(senTemWetBul.port_b,senVolFlo. port_a)
annotation (Line(points={{-30,0},{-20,0}}));
connect(res.port_b, vol.ports[1])
annotation (Line(points={{40,0},{79,0},{79,10}}, color = {0, 127, 255}));
connect(port_a, senTem.port_a)
annotation (Line(points={{-100,0},{-80,0}}));
connect(vol.ports[2], port_b)
annotation (Line(points={{81,10},{81,0},{100,0}}, color = {0, 127, 255}));
connect(senTem.port_a, senPre.port)
annotation (Line(points={{-80,0},{-90,0},{-90,44}}, color={0,127,255}));
connect(senPre.p, dirEvaCoo.p)
annotation (Line(points={{-79,54},{18,54}}, color={0,0,127}));
connect(dirEvaCoo.dmWat_flow, vol.mWat_flow)
annotation (Line(points={{42,60},{60,60},{60,28},{68,28}}, color={0,0,127}));
connect(senVolFlo.port_b, res.port_a)
annotation (Line(points={{0,0},{20,0}}, color={0,127,255}));
annotation (Line(points={{42,60},{60,60},{60,40},{-30,40},{-30,-18},{-11,-18}},
color={0,0,127}));
connect(dirEvaCoo.dmWat_flow, dmWat_flow)
annotation (Line(points={{42,60},{60,60},{60,80},{120,80}}, color={0,0,127}));

connect(TDryBul.y, dirEvaCoo.TDryBulIn) annotation (Line(points={{-69,90},{
-32,90},{-32,62},{18,62}},
color={0,0,127}));
connect(TDryBul.y, wetBul.TDryBul) annotation (Line(points={{-69,90},{-32,90},
{-32,88},{-21,88}}, color={0,0,127}));
connect(wetBul.TWetBul, dirEvaCoo.TWetBulIn) annotation (Line(points={{1,80},{
10,80},{10,66},{18,66}}, color={0,0,127}));
connect(XInl.y, wetBul.Xi)
annotation (Line(points={{-69,80},{-21,80}}, color={0,0,127}));
connect(pInl.y, dirEvaCoo.p) annotation (Line(points={{-69,60},{-66,60},{-66,
46},{10,46},{10,54},{18,54}},
color={0,0,127}));
connect(V_flow.y, dirEvaCoo.V_flow) annotation (Line(points={{-69,40},{-32,40},
{-32,58},{18,58}}, color={0,0,127}));
connect(pInl.y, realPassThrough.u) annotation (Line(points={{-69,60},{-62,60}},
color={0,0,127}));
connect(realPassThrough.y, wetBul.p) annotation (Line(points={{-39,60},{-28,
60},{-28,72},{-21,72}},
color={0,0,127}));
annotation (defaultComponentName="dirEvaCoo",
Icon(graphics={
Rectangle(lineColor={0,0,255}, fillColor={95,95,95}, pattern=LinePattern.None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ equation

annotation (
Diagram(coordinateSystem(extent={{-140,-100},{140,100}})),
experiment(StartTime=350000, StopTime=1200000, Interval=60, Tolerance=1e-6),
experiment(StartTime=350000, StopTime=604800, Interval=60, Tolerance=1e-6),
Documentation(info="<html>
<p>
This model validates the direct evaporative cooler model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ equation
annotation (
Diagram(coordinateSystem(extent={{-200,-180},{180,180}})),
Icon(coordinateSystem(extent={{-100,-100},{100,100}})),
experiment(StartTime=350000, StopTime=604800, Interval=600, Tolerance=1e-6),
experiment(StartTime=350000, StopTime=604800, Interval=60, Tolerance=1e-6),
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Fluid/Humidifiers/EvaporativeCoolers/Validation/IndirectDry.mos"
"Simulate and plot"),
Documentation(info="<html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ equation
annotation (
Diagram(coordinateSystem(extent = {{-200, -180}, {180, 180}})),
Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}})),
experiment(StartTime=350000, StopTime = 604800, Interval = 600, Tolerance = 1e-6),
experiment(StartTime=350000, StopTime = 604800, Interval = 60, Tolerance = 1e-6),
__Dymola_Commands(file = "modelica://Buildings/Resources/Scripts/Dymola/Fluid/Humidifiers/EvaporativeCoolers/Validation/IndirectWet.mos" "Simulate and plot"),
Documentation(info = "<html>
<p>
Expand Down
Loading