Name | Description |
---|---|
ConstantEffectiveness | Heat and moisture exchanger with constant effectiveness |
Examples | Collection of models that illustrate model use and test models |
HumidifierPrescribed | Ideal electric heater or cooler, no losses, no dynamics |
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.Fluids.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 Fluids.Interfaces.PartialStaticFourPortHeatMassTransfer (Partial element transporting two fluid streams between four ports without storing mass or energy), Buildings.BaseClasses.BaseIcon (Base icon).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium_1 | Modelica.Media.Interfaces.Pa... | Medium 1 in the component | |
replaceable package Medium_2 | Modelica.Media.Interfaces.Pa... | Medium 2 in the component | |
Real | epsS | 0.8 | Sensible heat exchanger effectiveness |
Real | epsL | 0.8 | Latent heat exchanger effectiveness |
Nominal condition | |||
MassFlowRate | m0_flow_1 | Nominal mass flow rate [kg/s] | |
MassFlowRate | m0_flow_2 | m0_flow_1 | Nominal mass flow rate [kg/s] |
Initialization | |||
MassFlowRate | m_flow_1.start | 0 | Mass flow rate from port_a1 to port_b1 (m_flow_1 > 0 is design flow direction) [kg/s] |
Pressure | dp_1.start | 0 | Pressure difference between port_a1 and port_b1 [Pa] |
MassFlowRate | m_flow_2.start | 0 | Mass flow rate from port_a2 to port_b2 (m_flow_2 > 0 is design flow direction) [kg/s] |
Pressure | dp_2.start | 0 | Pressure difference between port_a2 and port_b2 [Pa] |
Assumptions | |||
Boolean | allowFlowReversal_1 | system.allowFlowReversal | = true to allow flow reversal in medium 1, false restricts to design direction (port_a -> port_b) |
Boolean | allowFlowReversal_2 | system.allowFlowReversal | = true to allow flow reversal in medium 2, false restricts to design direction (port_a -> port_b) |
Advanced | |||
MassFlowRate | m_flow_1_small | 1E-4*m0_flow_1 | Small mass flow rate for regularization of zero flow [kg/s] |
MassFlowRate | m_flow_2_small | 1E-4*m0_flow_2 | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_V_flow | true | = 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] |
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 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 = sta_a1.T; XWat_in1 = sta_a1.X[Medium_1.Water]; else T_in1 = sta_b1.T; XWat_in1 = sta_b1.X[Medium_1.Water]; end if; if m_flow_2 >= 0 then T_in2 = sta_a2.T; XWat_in2 = sta_a2.X[Medium_2.Water]; else T_in2 = sta_b2.T; XWat_in2 = sta_b2.X[Medium_2.Water]; end if; // The specific heat capacity is computed using the state of the // medium at port_a. For forward flow, this is correct, for reverse flow, // this is an approximation. C_flow_1 = abs(m_flow_1)* Medium_1.specificHeatCapacityCp(sta_a1); C_flow_2 = abs(m_flow_2)* Medium_2.specificHeatCapacityCp(sta_a2); 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;
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.
Extends from Fluids.Interfaces.PartialStaticTwoPortHeatMassTransfer (Partial element transporting fluid between two ports without storing mass or energy), Buildings.BaseClasses.BaseIcon (Base icon).
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | 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 | m0_flow | Nominal mass flow rate [kg/s] | |
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*m0_flow | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_V_flow | true | = 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] |
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 |
model HumidifierPrescribed "Ideal electric heater or cooler, no losses, no dynamics" extends Fluids.Interfaces.PartialStaticTwoPortHeatMassTransfer; extends Buildings.BaseClasses.BaseIcon; 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; 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 * 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;