Buildings.Fluid.Humidifiers

Package with humidifier models

Information

Package with humidifiers.

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

Name Description
Buildings.Fluid.Humidifiers.Humidifier_u Humidifier_u Ideal humidifier or dehumidifier with prescribed water mass flow rate addition or subtraction
Buildings.Fluid.Humidifiers.SprayAirWasher_X SprayAirWasher_X Spray air washer with leaving water mass fraction as input
Buildings.Fluid.Humidifiers.SteamHumidifier_X SteamHumidifier_X Steam humidifier with leaving water mass fraction as input
Buildings.Fluid.Humidifiers.Examples Examples Collection of models that illustrate model use and test models
Buildings.Fluid.Humidifiers.Validation Validation Collection of validation models

Buildings.Fluid.Humidifiers.Humidifier_u Buildings.Fluid.Humidifiers.Humidifier_u

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

Buildings.Fluid.Humidifiers.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 heat port heatPort is unconnected, then the enthalpy of the air that flows through the device remains unchanged, e.g., the humidification is adiabatic. To change the enthalpy of the air, add heat flow to the connector heatPort.

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

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
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]
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 RealInputuControl input [1]
output RealOutputmWat_flowWater added to the fluid [kg/s]
HeatPort_aheatPortHeat port for total heat exchange with the control volume

Modelica definition

model Humidifier_u "Ideal humidifier or dehumidifier with prescribed water mass flow rate addition or subtraction" extends Buildings.Fluid.Interfaces.TwoPortHeatMassExchanger( redeclare replaceable package Medium = Modelica.Media.Interfaces.PartialCondensingGases, redeclare final Buildings.Fluid.MixingVolumes.MixingVolumeMoistAir vol( final prescribedHeatFlowRate=true)); parameter Modelica.SIunits.MassFlowRate mWat_flow_nominal "Water mass flow rate at u=1, positive for humidification"; Modelica.Blocks.Interfaces.RealInput u(unit="1") "Control input"; Modelica.Blocks.Interfaces.RealOutput mWat_flow(unit="kg/s") "Water added to the fluid"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort "Heat port for total heat exchange with the control volume"; protected Modelica.Blocks.Math.Gain gai(final k=mWat_flow_nominal) "Gain"; equation connect(u, gai.u); connect(gai.y, vol.mWat_flow); connect(vol.heatPort, heatPort); connect(gai.y, mWat_flow); end Humidifier_u;

Buildings.Fluid.Humidifiers.SprayAirWasher_X Buildings.Fluid.Humidifiers.SprayAirWasher_X

Spray air washer with leaving water mass fraction as input

Buildings.Fluid.Humidifiers.SprayAirWasher_X

Information

Model for a spray air washer with a prescribed outlet water vapor mass fraction in kg/kg total air.

This model forces the outlet water mass fraction at port_b to be no lower than the input signal X_wSet, subject to optional limits on the maximum water vapor mass flow rate that is added, as described by the parameter mWatMax_flow. By default, the model has unlimited capacity.

The output signal mWat_flow ≥ 0 is the moisture added to the medium if the flow rate is from port_a to port_b. If the flow is reversed, then mWat_flow = 0. The outlet specific enthalpy at port_b is increased by the enthalpy of liquid water at 10°C times the mass of water that was added. Therefore, the temperature of the leaving fluid is below the inlet temperature.

The outlet conditions at port_a are not affected by this model, other than for a possible pressure difference due to flow friction.

If the parameter energyDynamics is different from Modelica.Fluid.Types.Dynamics.SteadyState, the component models the dynamic response using a first order differential equation. The time constant of the component is equal to the parameter tau. This time constant is adjusted based on the mass flow rate using

τeff = τ |ṁ| ⁄ ṁnom

where τeff is the effective time constant for the given mass flow rate and τ is the time constant at the nominal mass flow rate nom. This type of dynamics is equal to the dynamics that a completely mixed control volume would have.

Optionally, this model can have a flow resistance. Set dp_nominal = 0 to disable the flow friction calculation.

For a model that uses a control signal u ∈ [0, 1] and multiplies this with the nominal water mass flow rate, use Buildings.Fluid.Humidifiers.Humidifier_u

Limitations

This model only adds water vapor for the flow from port_a to port_b. The water vapor of the reverse flow is not affected by this model.

This model does not affect the enthalpy of the air. Therefore, if water is added, the temperature will decrease, e.g., the humidification is adiabatic.

Extends from Buildings.Fluid.HeatExchangers.BaseClasses.PartialPrescribedOutlet (Ideal heater, cooler, humidifier or dehumidifier with prescribed outlet conditions).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
MassFlowRatemWatMax_flowModelica.Constants.infMaximum water mass flow rate addition (positive) [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]
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
Timetau10Time constant at nominal flow rate (used if energyDynamics or massDynamics not equal Modelica.Fluid.Types.Dynamics.SteadyState) [s]
Equations
DynamicsmassDynamicsModelica.Fluid.Types.Dynamic...Type of mass balance: dynamic (3 initialization options) or steady state
Initialization
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [1]

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 RealInputX_wSet point for water vapor mass fraction in kg/kg total air of the fluid that leaves port_b [1]
output RealOutputmWat_flowWater added to the fluid (if flow is from port_a to port_b) [kg/s]

Modelica definition

model SprayAirWasher_X "Spray air washer with leaving water mass fraction as input" extends Buildings.Fluid.HeatExchangers.BaseClasses.PartialPrescribedOutlet( redeclare replaceable package Medium = Modelica.Media.Interfaces.PartialCondensingGases, outCon( final T_start=293.15, final X_start=X_start, final use_TSet = true, final use_X_wSet = true, final QMax_flow = Modelica.Constants.inf, final QMin_flow = -Modelica.Constants.inf, final mWatMax_flow = mWatMax_flow, final mWatMin_flow = 0, final energyDynamics = Modelica.Fluid.Types.Dynamics.SteadyState, final massDynamics = massDynamics)); parameter Modelica.SIunits.MassFlowRate mWatMax_flow(min=0) = Modelica.Constants.inf "Maximum water mass flow rate addition (positive)"; parameter Modelica.SIunits.MassFraction X_start[Medium.nX] = Medium.X_default "Start value of mass fractions m_i/m"; // Dynamics parameter Modelica.Fluid.Types.Dynamics massDynamics = Modelica.Fluid.Types.Dynamics.SteadyState "Type of mass balance: dynamic (3 initialization options) or steady state"; // Set maximum to a high value to avoid users mistakenly entering relative humidity. Modelica.Blocks.Interfaces.RealInput X_w( unit="1", min=0, max=0.03) "Set point for water vapor mass fraction in kg/kg total air of the fluid that leaves port_b"; Modelica.Blocks.Interfaces.RealOutput mWat_flow(unit="kg/s") "Water added to the fluid (if flow is from port_a to port_b)"; protected constant Modelica.SIunits.SpecificEnthalpy hSte = Medium.enthalpyOfLiquid(T=283.15) "Enthalpy of water at 10 degree Celsius"; Modelica.SIunits.SpecificEnthalpy hLea= inStream(port_a.h_outflow) + {hSte} * (port_b.Xi_outflow - inStream(port_a.Xi_outflow)) "Approximation of leaving enthalpy, based on dh/dx=h_fg"; Modelica.Blocks.Sources.RealExpression TLea(y= Medium.temperature_phX(p = port_b.p, h = hLea, X = port_b.Xi_outflow)) "Leaving air temperature"; equation connect(X_w, outCon.X_wSet); connect(outCon.mWat_flow, mWat_flow); connect(TLea.y, outCon.TSet); end SprayAirWasher_X;

Buildings.Fluid.Humidifiers.SteamHumidifier_X Buildings.Fluid.Humidifiers.SteamHumidifier_X

Steam humidifier with leaving water mass fraction as input

Buildings.Fluid.Humidifiers.SteamHumidifier_X

Information

Model for a steam humidifier with a prescribed outlet water vapor mass fraction in kg/kg total air.

This model forces the outlet water mass fraction at port_b to be no lower than the input signal X_wSet, subject to optional limits on the maximum water vapor mass flow rate that is added, as described by the parameter mWatMax_flow. By default, the model has unlimited capacity.

The output signal mWat_flow ≥ 0 is the moisture added to the medium if the flow rate is from port_a to port_b. If the flow is reversed, then mWat_flow = 0. The outlet specific enthalpy at port_b is increased by the enthalpy of steam at 100°C times the mass of steam that was added. Therefore, the temperature of the leaving fluid is slightly above the inlet temperature.

The outlet conditions at port_a are not affected by this model, other than for a possible pressure difference due to flow friction.

If the parameter energyDynamics is different from Modelica.Fluid.Types.Dynamics.SteadyState, the component models the dynamic response using a first order differential equation. The time constant of the component is equal to the parameter tau. This time constant is adjusted based on the mass flow rate using

τeff = τ |ṁ| ⁄ ṁnom

where τeff is the effective time constant for the given mass flow rate and τ is the time constant at the nominal mass flow rate nom. This type of dynamics is equal to the dynamics that a completely mixed control volume would have.

Optionally, this model can have a flow resistance. Set dp_nominal = 0 to disable the flow friction calculation.

For a model that uses a control signal u ∈ [0, 1] and multiplies this with the nominal water mass flow rate, use Buildings.Fluid.Humidifiers.Humidifier_u

Limitations

This model only adds water vapor for the flow from port_a to port_b. The water vapor of the reverse flow is not affected by this model.

Extends from Buildings.Fluid.HeatExchangers.BaseClasses.PartialPrescribedOutlet (Ideal heater, cooler, humidifier or dehumidifier with prescribed outlet conditions).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
MassFlowRatemWatMax_flowModelica.Constants.infMaximum water mass flow rate addition (positive) [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]
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
Timetau10Time constant at nominal flow rate (used if energyDynamics or massDynamics not equal Modelica.Fluid.Types.Dynamics.SteadyState) [s]
Equations
DynamicsmassDynamicsModelica.Fluid.Types.Dynamic...Type of mass balance: dynamic (3 initialization options) or steady state
Initialization
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [1]

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 RealInputX_wSet point for water vapor mass fraction in kg/kg total air of the fluid that leaves port_b [1]
output RealOutputmWat_flowWater added to the fluid (if flow is from port_a to port_b) [kg/s]
output RealOutputQ_flowHeat flow rate added to the fluid (if flow is from port_a to port_b) [W]

Modelica definition

model SteamHumidifier_X "Steam humidifier with leaving water mass fraction as input" extends Buildings.Fluid.HeatExchangers.BaseClasses.PartialPrescribedOutlet( outCon( final T_start=293.15, final X_start=X_start, final use_TSet = true, final use_X_wSet = true, final QMax_flow = Modelica.Constants.inf, final QMin_flow = -Modelica.Constants.inf, final mWatMax_flow = mWatMax_flow, final mWatMin_flow = 0, final energyDynamics = Modelica.Fluid.Types.Dynamics.SteadyState, final massDynamics = massDynamics)); parameter Modelica.SIunits.MassFlowRate mWatMax_flow(min=0) = Modelica.Constants.inf "Maximum water mass flow rate addition (positive)"; parameter Modelica.SIunits.MassFraction X_start[Medium.nX] = Medium.X_default "Start value of mass fractions m_i/m"; // Dynamics parameter Modelica.Fluid.Types.Dynamics massDynamics = Modelica.Fluid.Types.Dynamics.SteadyState "Type of mass balance: dynamic (3 initialization options) or steady state"; // Set maximum to a high value to avoid users mistakenly entering relative humidity. Modelica.Blocks.Interfaces.RealInput X_w( unit="1", min=0, max=0.03) "Set point for water vapor mass fraction in kg/kg total air of the fluid that leaves port_b"; Modelica.Blocks.Interfaces.RealOutput mWat_flow(unit="kg/s") "Water added to the fluid (if flow is from port_a to port_b)"; Modelica.Blocks.Interfaces.RealOutput Q_flow(unit="W") "Heat flow rate added to the fluid (if flow is from port_a to port_b)"; protected constant Modelica.SIunits.SpecificEnthalpy hSte = Medium.enthalpyOfCondensingGas(T=373.15) "Enthalpy of steam at 100 degree Celsius"; Modelica.SIunits.SpecificEnthalpy hLea= inStream(port_a.h_outflow) + {hSte} * (port_b.Xi_outflow - inStream(port_a.Xi_outflow)) "Approximation of leaving enthalpy, based on dh/dx=h_fg"; Modelica.Blocks.Sources.RealExpression TLea(y= Medium.temperature_phX(p = port_b.p, h = hLea, X = port_b.Xi_outflow)) "Leaving air temperature"; equation connect(X_w, outCon.X_wSet); connect(outCon.mWat_flow, mWat_flow); connect(Q_flow, outCon.Q_flow); connect(TLea.y, outCon.TSet); end SteamHumidifier_X;