Name | Description |
---|---|
ConstantEffectiveness | Heat and moisture exchanger with constant effectiveness |
HumidifierPrescribed | Ideal humidifier or dehumidifier with prescribed water mass flow rate addition or subtraction |
Examples | Collection of models that illustrate model use and test models |
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.
In the region mK_flow_small > abs(mK_flow) > mK_flow_small/2, for K = 1 or 2, the effectivness epsS and epsL are transitioned from their user-specified value to 0. This improves the numerical robustness near zero flow.
For a sensible heat exchanger, use Buildings.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 Buildings.Fluid.HeatExchangers.BaseClasses.ConstantEffectiveness (Heat exchanger with constant effectiveness).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium1 | PartialMedium | Medium 1 in the component | |
replaceable package Medium2 | PartialMedium | Medium 2 in the component | |
Real | eps | epsS | Heat exchanger effectiveness |
Real | epsS | 0.8 | Sensible heat exchanger effectiveness |
Real | epsL | 0.8 | Latent heat exchanger effectiveness |
Nominal condition | |||
MassFlowRate | m1_flow_nominal | Nominal mass flow rate [kg/s] | |
MassFlowRate | m2_flow_nominal | m1_flow_nominal | Nominal mass flow rate [kg/s] |
Pressure | dp1_nominal | Pressure [Pa] | |
Pressure | dp2_nominal | Pressure [Pa] | |
Initialization | |||
MassFlowRate | m1_flow.start | 0 | Mass flow rate from port_a1 to port_b1 (m1_flow > 0 is design flow direction) [kg/s] |
Pressure | dp1.start | 0 | Pressure difference between port_a1 and port_b1 [Pa] |
MassFlowRate | m2_flow.start | 0 | Mass flow rate from port_a2 to port_b2 (m2_flow > 0 is design flow direction) [kg/s] |
Pressure | dp2.start | 0 | Pressure difference between port_a2 and port_b2 [Pa] |
Assumptions | |||
Boolean | allowFlowReversal1 | system.allowFlowReversal | = true to allow flow reversal in medium 1, false restricts to design direction (port_a -> port_b) |
Boolean | allowFlowReversal2 | system.allowFlowReversal | = true to allow flow reversal in medium 2, false restricts to design direction (port_a -> port_b) |
Advanced | |||
MassFlowRate | m1_flow_small | 1E-4*m1_flow_nominal | Small mass flow rate for regularization of zero flow [kg/s] |
MassFlowRate | m2_flow_small | 1E-4*m2_flow_nominal | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_V_flow | false | = true, if volume flow rate at inflowing port is computed |
Initialization | |||
AbsolutePressure | p_a1_start | system.p_start | Guess value for inlet pressure [Pa] |
AbsolutePressure | p_b1_start | p_a1_start | Guess value for outlet pressure [Pa] |
AbsolutePressure | p_a2_start | system.p_start | Guess value for inlet pressure [Pa] |
AbsolutePressure | p_b2_start | p_a2_start | Guess value for outlet pressure [Pa] |
Flow resistance | |||
Medium 1 | |||
Boolean | from_dp1 | true | = true, use m_flow = f(dp) else dp = f(m_flow) |
Boolean | linearizeFlowResistance1 | false | = true, use linear relation between m_flow and dp for any flow rate |
Real | deltaM1 | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
Medium 2 | |||
Boolean | from_dp2 | true | = true, use m_flow = f(dp) else dp = f(m_flow) |
Boolean | linearizeFlowResistance2 | false | = true, use linear relation between m_flow and dp for any flow rate |
Real | deltaM2 | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a1 | Fluid connector a1 (positive design flow direction is from port_a1 to port_b1) |
FluidPort_b | port_b1 | Fluid connector b1 (positive design flow direction is from port_a1 to port_b1) |
FluidPort_a | port_a2 | Fluid connector a2 (positive design flow direction is from port_a2 to port_b2) |
FluidPort_b | port_b2 | Fluid connector b2 (positive design flow direction is from port_a2 to port_b2) |
model ConstantEffectiveness "Heat and moisture exchanger with constant effectiveness" extends Buildings.Fluid.HeatExchangers.BaseClasses.ConstantEffectiveness(final eps=epsS);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"; Medium1.MassFraction XWat_in1 "Inlet water mass fraction of medium 1"; Medium2.MassFraction XWat_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"; equation // Definitions for effectiveness model XWat_in1 = Modelica.Fluid.Utilities.regStep(m1_flow, state_a1_inflow.X[Medium1.Water], state_b1_inflow.X[Medium1.Water], m1_flow_small); XWat_in2 = Modelica.Fluid.Utilities.regStep(m2_flow, state_a2_inflow.X[Medium2.Water], state_b2_inflow.X[Medium2.Water], m2_flow_small); // mass exchange mMax_flow = smooth(1, min(smooth(1, gai1 * abs(m1_flow)), smooth(1, gai2 * abs(m2_flow)))) * (XWat_in2 - XWat_in1); mWat_flow = epsL * mMax_flow; for i in 1:Medium1.nXi loop mXi1_flow[i] = if ( i == Medium1.Water) then mWat_flow else 0; end for; for i in 1:Medium2.nXi loop mXi2_flow[i] = if ( i == Medium2.Water) then -mWat_flow else 0; end for; end ConstantEffectiveness;
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 * m_flow_nominal. The input signal u and the nominal moisture flow rate added to the air stream m_flow_nominal can be positive or negative. If the product u * m_flow_nominal 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 temperature of the water that is added to the air stream.
Note that for non-zero m_flow, if the mass flow rate tends to zero, then the moisture difference over this component tends to infinity. Hence, using a proper control for u is essential 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.
Extends from Fluid.Interfaces.PartialStaticTwoPortHeatMassTransfer (Partial model transporting fluid between two ports without storing mass or energy).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
MassFlowRate | mWat0_flow | Water mass flow rate at u=1, positive for humidification [kg/s] | |
Temperature | T | 293.15 | Temperature of water that is added to the fluid stream (used only if T_in is unconnected) [K] |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Pressure | dp_nominal | Pressure [Pa] | |
Initialization | |||
MassFlowRate | m_flow.start | 0 | Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction) [kg/s] |
Pressure | dp.start | 0 | Pressure difference between port_a and port_b [Pa] |
Assumptions | |||
Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*m_flow_nominal | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_V_flow | false | = true, if volume flow rate at inflowing port is computed |
Initialization | |||
AbsolutePressure | p_a_start | system.p_start | Guess value for inlet pressure [Pa] |
AbsolutePressure | p_b_start | p_a_start | Guess value for outlet pressure [Pa] |
Flow resistance | |||
Boolean | from_dp | true | = true, use m_flow = f(dp) else dp = f(m_flow) |
Boolean | linearizeFlowResistance | false | = true, use linear relation between m_flow and dp for any flow rate |
Real | deltaM | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
Type | Name | Description |
---|---|---|
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
input RealInput | T_in | Temperature of water added to the fluid stream |
input RealInput | u | Control input |
model HumidifierPrescribed "Ideal humidifier or dehumidifier with prescribed water mass flow rate addition or subtraction" extends Fluid.Interfaces.PartialStaticTwoPortHeatMassTransfer;parameter Modelica.SIunits.MassFlowRate mWat0_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 "Temperature of water added to the fluid stream"; Modelica.Blocks.Interfaces.RealInput u "Control input"; 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; mWat_flow = u * mWat0_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;