IEA EBC Annex 60 EBC logo

Annex60.Fluid.MassExchangers

Package with mass exchanger models

Information

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

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

Name Description
Annex60.Fluid.MassExchangers.ConstantEffectiveness ConstantEffectiveness Heat and moisture exchanger with constant effectiveness
Annex60.Fluid.MassExchangers.Humidifier_u Humidifier_u Ideal humidifier or dehumidifier with prescribed water mass flow rate addition or subtraction
Annex60.Fluid.MassExchangers.Examples Examples Collection of models that illustrate model use and test models

Annex60.Fluid.MassExchangers.ConstantEffectiveness Annex60.Fluid.MassExchangers.ConstantEffectiveness

Heat and moisture exchanger with constant effectiveness

Annex60.Fluid.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 Annex60.Fluid.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.

Extends from Annex60.Fluid.HeatExchangers.BaseClasses.PartialEffectiveness (Partial model to implement heat exchangers based on effectiveness model).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
HeatFlowRateQ1_flowepsS*QMax_flowHeat transferred into the medium 1 [W]
MassFlowRatemWat1_flow+mWat_flowMoisture mass flow rate added to the medium 1 [kg/s]
HeatFlowRateQ2_flow-Q1_flowHeat transferred into the medium 2 [W]
MassFlowRatemWat2_flow-mWat_flowMoisture mass flow rate added to the medium 2 [kg/s]
BooleansensibleOnly1falseSet to true if sensible exchange only for medium 1
BooleansensibleOnly2falseSet to true if sensible exchange only for medium 2
EfficiencyepsS0.8Sensible heat exchanger effectiveness [1]
EfficiencyepsL0.8Latent heat exchanger effectiveness [1]
Nominal condition
MassFlowRatem1_flow_nominal Nominal mass flow rate [kg/s]
MassFlowRatem2_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedp1_nominal Pressure difference [Pa]
PressureDifferencedp2_nominal Pressure difference [Pa]
Assumptions
BooleanallowFlowReversal1true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
BooleanhomotopyInitializationtrue= true, use homotopy method
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Flow resistance
Medium 1
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar
Medium 2
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar

Connectors

TypeNameDescription
replaceable package Medium1Medium 1 in the component
replaceable package Medium2Medium 2 in the component
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)

Modelica definition

model ConstantEffectiveness "Heat and moisture exchanger with constant effectiveness" extends Annex60.Fluid.HeatExchangers.BaseClasses.PartialEffectiveness( redeclare replaceable package Medium1 = Modelica.Media.Interfaces.PartialCondensingGases, redeclare replaceable package Medium2 = Modelica.Media.Interfaces.PartialCondensingGases, sensibleOnly1=false, sensibleOnly2=false, Q1_flow = epsS * QMax_flow, Q2_flow = -Q1_flow, mWat1_flow = +mWat_flow, mWat2_flow = -mWat_flow); parameter Modelica.SIunits.Efficiency epsS(max=1) = 0.8 "Sensible heat exchanger effectiveness"; parameter Modelica.SIunits.Efficiency epsL(max=1) = 0.8 "Latent heat exchanger effectiveness"; Medium1.MassFraction X_w_in1 "Inlet water mass fraction of medium 1"; Medium2.MassFraction X_w_in2 "Inlet water mass fraction of medium 2"; 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"; protected parameter Integer i1_w(min=1, fixed=false) "Index for water substance"; parameter Integer i2_w(min=1, fixed=false) "Index for water substance"; Real gai1(min=0, max=1) "Auxiliary variable for smoothing at zero flow"; Real gai2(min=0, max=1) "Auxiliary variable for smoothing at zero flow"; initial algorithm i1_w:= -1; i2_w:= -1; for i in 1:Medium1.nXi loop if Modelica.Utilities.Strings.isEqual(string1=Medium1.substanceNames[i], string2="Water", caseSensitive=false) then i1_w := i; end if; end for; for i in 1:Medium2.nXi loop if Modelica.Utilities.Strings.isEqual(string1=Medium2.substanceNames[i], string2="Water", caseSensitive=false) then i2_w := i; end if; end for; assert(i1_w > 0, "Substance 'water' is not present in Medium1 '" + Medium1.mediumName + "'.\n" + "Check medium model."); assert(i2_w > 0, "Substance 'water' is not present in Medium2 '" + Medium2.mediumName + "'.\n" + "Check medium model."); equation // Definitions for effectiveness model X_w_in1 = Modelica.Fluid.Utilities.regStep(m1_flow, state_a1_inflow.X[i1_w], state_b1_inflow.X[i1_w], m1_flow_small); X_w_in2 = Modelica.Fluid.Utilities.regStep(m2_flow, state_a2_inflow.X[i2_w], state_b2_inflow.X[i2_w], m2_flow_small); // mass exchange // Compute a gain that goes to zero near zero flow rate. // This is required to smoothen the heat transfer at very small flow rates. // Note that gaiK = 1 for abs(mK_flow) > mK_flow_small gai1 = Modelica.Fluid.Utilities.regStep(abs(m1_flow) - 0.75*m1_flow_small, 1, 0, 0.25*m1_flow_small); gai2 = Modelica.Fluid.Utilities.regStep(abs(m2_flow) - 0.75*m2_flow_small, 1, 0, 0.25*m2_flow_small); mMax_flow = smooth(1, min(smooth(1, gai1 * abs(m1_flow)), smooth(1, gai2 * abs(m2_flow)))) * (X_w_in2 - X_w_in1); mWat_flow = epsL * mMax_flow; end ConstantEffectiveness;

Annex60.Fluid.MassExchangers.Humidifier_u Annex60.Fluid.MassExchangers.Humidifier_u

Ideal humidifier or dehumidifier with prescribed water mass flow rate addition or subtraction

Annex60.Fluid.MassExchangers.Humidifier_u

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

wat = u ṁwat,nom,

where u is the control input signal and wat,nom is equal to the parameter mWat_flow_nominal. The parameter mWat_flow_nominal can be positive or negative. If wat is 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 the temperature of the water that is added to the air stream.

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.

Extends from Annex60.Fluid.Interfaces.TwoPortHeatMassExchanger (Partial model transporting one fluid stream with storing mass or energy).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Booleanuse_T_infalseGet the temperature from the input connector
TemperatureT293.15Temperature of water that is added to the fluid stream (used if use_T_in=false) [K]
MassFlowRatemWat_flow_nominal Water mass flow rate at u=1, positive for humidification [kg/s]
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedp_nominal Pressure difference [Pa]
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
BooleanhomotopyInitializationtrue= true, use homotopy method
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Flow resistance
Booleanfrom_dpfalse= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistancefalse= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM0.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics
Nominal condition
Timetau30Time constant at nominal flow (if energyDynamics <> SteadyState) [s]
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
DynamicsmassDynamicsenergyDynamicsType of mass balance: dynamic (3 initialization options) or steady state
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances

Connectors

TypeNameDescription
replaceable package MediumMedium in the component
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 RealInputuControl input

Modelica definition

model Humidifier_u "Ideal humidifier or dehumidifier with prescribed water mass flow rate addition or subtraction" extends Annex60.Fluid.Interfaces.TwoPortHeatMassExchanger( redeclare replaceable package Medium = Modelica.Media.Interfaces.PartialCondensingGases, redeclare final Annex60.Fluid.MixingVolumes.MixingVolumeMoistAir vol( final prescribedHeatFlowRate=true)); parameter Boolean use_T_in= false "Get the temperature from the input connector"; parameter Modelica.SIunits.Temperature T = 293.15 "Temperature of water that is added to the fluid stream (used if use_T_in=false)"; parameter Modelica.SIunits.MassFlowRate mWat_flow_nominal "Water mass flow rate at u=1, positive for humidification"; Modelica.Blocks.Interfaces.RealInput T_in if use_T_in "Temperature of water added to the fluid stream"; Modelica.Blocks.Interfaces.RealInput u "Control input"; protected Modelica.Blocks.Interfaces.RealInput T_in_internal "Needed to connect to conditional connector"; Modelica.Blocks.Math.Gain gai(k=mWat_flow_nominal) "Gain"; Modelica.Blocks.Sources.RealExpression TWat(y=T_in_internal) "Temperature of the water"; equation // Conditional connect statement connect(T_in, T_in_internal); if not use_T_in then T_in_internal = T; end if; connect(u, gai.u); connect(gai.y, vol.mWat_flow); connect(vol.TWat, TWat.y); end Humidifier_u;

http://iea-annex60.org