Buildings.MassExchangers

Package with mass exchanger models

Information


This package contains models for mass exchangers.
For heat exchanger models with humidity transfer, see the package

Buildings.HeatExchangers.

Package Content

NameDescription
Buildings.MassExchangers.ConstantEffectiveness ConstantEffectiveness Heat and moisture exchanger with constant effectiveness
Buildings.MassExchangers.Examples Examples Collection of models that illustrate model use and test models
Buildings.MassExchangers.HumidifierPrescribed HumidifierPrescribed Ideal electric heater or cooler, no losses, no dynamics


Buildings.MassExchangers.ConstantEffectiveness Buildings.MassExchangers.ConstantEffectiveness

Heat and moisture exchanger with constant effectiveness

Buildings.MassExchangers.ConstantEffectiveness

Information


Model for a heat and moisture exchanger with constant effectiveness.

This model transfers heat and moisture in the amount of

  Q = epsS * Q_max,
  m = epsL * mWat_max,
where epsS and epsL are constant effectiveness for the sensible and latent heat transfer, Q_max is the maximum heat that can be transferred and mWat_max is the maximum moisture that can be transferred.

For a sensible heat exchanger, use Buildings.HeatExchangers.ConstantEffectiveness instead of this model.

This model can only be used with medium models that define the integer constant Water which needs to be equal to the index of the water mass fraction in the species vector.


Parameters

TypeNameDefaultDescription
RealepsS0.8Sensible heat exchanger effectiveness
RealepsL0.8Latent heat exchanger effectiveness
Fluid 1
replaceable package Medium_1PartialMediumFluid 1
Fluid 2
replaceable package Medium_2PartialMediumFluid 2
Initialization
MassFlowRatem_flow_1 Mass flow rate from port_a1 to port_b1 (m_flow_1 > 0 is design flow direction) [kg/s]
MassFlowRatem_flow_2 Mass flow rate from port_a2 to port_b2 (m_flow_2 > 0 is design flow direction) [kg/s]
Pressuredp_1 Pressure difference between port_a1 and port_b1 [Pa]
Pressuredp_2 Pressure difference between port_a2 and port_b2 [Pa]
Advanced
TempflowDirection_1Modelica_Fluid.Types.FlowDir...Unidirectional (port_a -> port_b) or bidirectional flow component
TempflowDirection_2Modelica_Fluid.Types.FlowDir...Unidirectional (port_a -> port_b) or bidirectional flow component

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a for medium 1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b for medium 1 (positive design flow direction is from port_a to port_b)
FluidPort_aport_a2Fluid connector a for medium 2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b for medium 2 (positive design flow direction is from port_a to port_b)

Modelica definition

model ConstantEffectiveness 
  "Heat and moisture exchanger with constant effectiveness" 
  extends Fluids.Interfaces.PartialStaticFourPortHeatMassTransfer;
  extends Buildings.BaseClasses.BaseIcon;
  parameter Real epsS(min=0, max=1) = 0.8 
    "Sensible heat exchanger effectiveness";
  parameter Real epsL(min=0, max=1) = 0.8 "Latent heat exchanger effectiveness";
  
  Modelica.SIunits.Temperature T_in1 "Inlet temperature of medium 1";
  Modelica.SIunits.Temperature T_in2 "Inlet temperature of medium 2";
  Medium_1.MassFraction XWat_in1 "Inlet water mass fraction of medium 1";
  Medium_2.MassFraction XWat_in2 "Inlet water mass fraction of medium 2";
  
  Modelica.SIunits.ThermalConductance C_flow_1 
    "Heat capacity flow rate medium 1";
  Modelica.SIunits.ThermalConductance C_flow_2 
    "Heat capacity flow rate medium 2";
  Modelica.SIunits.ThermalConductance CMin_flow(min=0) 
    "Minimum heat capacity flow rate";
  Modelica.SIunits.HeatFlowRate QMax_flow "Maximum heat flow rate";
  
  Modelica.SIunits.MassFlowRate mWat_flow 
    "Water flow rate from medium 2 to medium 1";
  Modelica.SIunits.MassFlowRate mMax_flow 
    "Maximum water flow rate from medium 2 to medium 1";
equation 
  // definitions for effectiveness model
  if m_flow_1 >= 0 then
     T_in1  = medium_a1.T;
     XWat_in1 = medium_a1.Xi[Medium_1.Water];
  else
     T_in1 = medium_b1.T;
     XWat_in1 = medium_b1.Xi[Medium_1.Water];
  end if;
  
  if m_flow_2 >= 0 then
     T_in2  = medium_a2.T;
     XWat_in2 = medium_a2.Xi[Medium_2.Water];
  else
     T_in2 = medium_b2.T;
     XWat_in2 = medium_b2.Xi[Medium_2.Water];
  end if;
  
  C_flow_1 = abs(m_flow_1)
          * Medium_1.specificHeatCapacityCp(Medium_1.setState_pTX(medium_a1.p,
                medium_a1.T, medium_a1.X));
  C_flow_2 = abs(m_flow_2)
          * Medium_2.specificHeatCapacityCp(Medium_2.setState_pTX(medium_a2.p,
                medium_a2.T, medium_a2.X));
  
  CMin_flow = min( C_flow_1, C_flow_2);
  QMax_flow = CMin_flow * (T_in2 - T_in1);
  
  // transferred heat
  Q_flow_1 = epsS * QMax_flow;
  0 = Q_flow_1 + Q_flow_2;
  
  // mass exchange
  mMax_flow = min(abs(m_flow_1), abs(m_flow_2)) * (XWat_in2 - XWat_in1);
  mWat_flow = epsL * mMax_flow;
  
  for i in 1:Medium_1.nXi loop
     mXi_flow_1[i] = if ( i == Medium_1.Water) then mWat_flow else 0;
  end for;
  
  for i in 1:Medium_2.nXi loop
     mXi_flow_2[i] = if ( i == Medium_2.Water) then -mWat_flow else 0;
  end for;
  
  // no pressure drop
  dp_1 = 0;
  dp_2 = 0;
end ConstantEffectiveness;

Buildings.MassExchangers.HumidifierPrescribed Buildings.MassExchangers.HumidifierPrescribed

Ideal electric heater or cooler, no losses, no dynamics

Buildings.MassExchangers.HumidifierPrescribed

Information


Model for an air humidifier or dehumidifier.

This model adds (or removes) moisture from the air stream. The amount of exchanged moisture is equal to m_flow = u m0_flow. The input signal u and the nominal moisture flow rate added to the air stream m0_flow can be positive or negative. If the product u * m0_flow are positive, then moisture is added to the air stream, otherwise it is removed.

If the connector T_in is left unconnected, the value set by the parameter T is used for temperature of the water that is added to the air stream.

Note that if the mass flow rate tends to zero, the moisture difference over this component tends to infinity for non-zero m_flow, so add proper control when using this component.

This model can only be used with medium models that define the integer constant Water which needs to be equal to the index of the water mass fraction in the species vector.


Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
MassFlowRatem0_flow Water mass flow rate at u=1, positive for humidification [kg/s]
TemperatureT293.15Temperature of water that is added to the fluid stream (used only if T_in is unconnected) [K]
Initialization
MassFlowRatem_flow Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s]
Pressuredp Pressure difference between port_a and port_b [Pa]
Advanced
TempflowDirectionModelica_Fluid.Types.FlowDir...Unidirectional (port_a -> port_b) or bidirectional flow component

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
input RealInputT_inTemperature of water added to the fluid stream
input RealInputu 

Modelica definition

model HumidifierPrescribed 
  "Ideal electric heater or cooler, no losses, no dynamics" 
  extends Fluids.Interfaces.PartialStaticTwoPortHeatMassTransfer;
  extends Buildings.BaseClasses.BaseIcon;
  
  parameter Modelica.SIunits.MassFlowRate m0_flow 
    "Water mass flow rate at u=1, positive for humidification";
  parameter Modelica.SIunits.Temperature T = 293.15 
    "Temperature of water that is added to the fluid stream (used only if T_in is unconnected)";
  Modelica.Blocks.Interfaces.RealInput T_in(
    redeclare type SignalType = Modelica.SIunits.Temperature) 
    "Temperature of water added to the fluid stream";
  Modelica.Blocks.Interfaces.RealInput u;
protected 
  constant Modelica.SIunits.MassFraction[Medium.nXi] XiWat = {1} 
    "Mass fraction of water";
  Modelica.SIunits.MassFlowRate mWat_flow "Water flow rate";
equation 
  if cardinality(T_in)==0 then
    T_in = T;
  end if;
  
  dp = 0;
  mWat_flow = u * m0_flow;
  Q_flow = Medium.enthalpyOfLiquid(T_in) * mWat_flow;
  for i in 1:Medium.nXi loop
     mXi_flow[i] = if ( i == Medium.Water) then  mWat_flow else 0;
  end for;
end HumidifierPrescribed;

HTML-documentation generated by Dymola Fri Oct 31 16:24:01 2008.