The block Pipe (MA) simulates the dynamics of moist air flow in a pipe. The block takes into account viscous friction losses and convective heat exchange with the pipe wall. There is a constant volume of moist air in the pipe. Pressure and temperature vary with the compressibility and heat capacity of this volume of moist air. Flow becomes critical when the velocity of the moist air at the outlet reaches the speed of sound.
The lower indices , and indicate the properties of dry air, water vapour and impurity gas, respectively;
The lower index indicates the saturation level of water vapour;
The lower indices , , and indicate the corresponding port;
The lower index indicates the internal volume properties of the moist air.
- mass flow rate;
- energy flow rate;
- heat flow rate;
- pressure;
- density;
- universal gas constant;
- volume of moist air inside the pipe;
- specific heat capacity at constant volume;
- specific heat capacity at constant pressure;
- specific enthalpy;
- specific internal energy;
- mass fraction ( is specific humidity, which is synonymous with mass fraction of water vapour);
- molar fraction;
- relative humidity;
- humidity coefficient;
- temperature;
- time.
Conservation of mass and energy
The net flow rate of moist air in the volume of a pipe is equal to:
,
,
,
,
where
- condensation flow rate;
- energy loss by condensed water per unit time;
- energy per unit time added by sources of moisture and impurity gases;
and are mass flow rates of water and gas respectively through the S port. The values , and are determined by the sources of moisture and impurity gases connected to the S port of the pipe.
The water vapour mass conservation equation relates the mass flow rate of water vapour to the dynamics of the humidity level in the internal volume of humid air:
.
Similarly, the equation of conservation of admixture gas mass relates the mass flow rate of admixture gas to the dynamics of the level of admixture gas in the internal volume of humid air:
.
The equation of conservation of mixture mass relates the mass flow rate of the mixture to the dynamics of pressure, temperature and mass fractions of the internal volume of moist air:
.
Finally, the energy conservation equation relates the energy flow rate to the dynamics of pressure, temperature, and mass fraction of the internal volume of moist air:
.
The equation of state relates the density of the mixture to pressure and temperature:
.
The universal gas constant of the mixture is equal to:
.
Pulse balance
The momentum balance for each half of the pipe models the pressure drop due to the momentum of gas flow and viscous friction:
,
,
where
- is the gas pressure at port A, port B or internal node I as indicated by the lower case;
- density at port A, port B or internal node I, as indicated by the lower index;
- cross-sectional area of the pipe;
and - pressure loss due to viscous friction.
Pressure losses due to viscous friction and depend on the flow regime. The Reynolds numbers for each half of the pipe are defined as:
,
μ,
where
- is the hydraulic diameter of the pipe;
μ - is the dynamic viscosity in the internal node.
If Reynolds number is less than the value of parameters Laminar flow upper Reynolds number limit, the flow is in laminar regime. If the Reynolds number is greater than the limiting value of the parameter Turbulent flow lower Reynolds number limit, the flow is in the turbulent regime.
In the laminar flow regime, the pressure loss due to viscous friction is:
μρ,
μρ,
where
- is the value of parameters Laminar friction constant for Darcy friction factor;
- the value of the parameters Aggregate equivalent length of local resistances.
In the turbulent flow regime, the pressure losses due to viscous friction are:
ρ,
ρ,
where
- is the Darcy coefficient at port A or B as indicated by the lower index.
Darcy coefficients are calculated from the Haaland correlation:
ε,
ε,
where ε is the value of the parameters Internal surface absolute roughness.
When the Reynolds number is between the upper limit of Reynolds number for laminar flow and the parameters values of the lower limit of Reynolds number for turbulent flow, the flow is in a transient state between laminar and turbulent flow regimes. The pressure losses due to viscous friction in the transition state follow a smooth relationship between the losses in the laminar flow regime and the losses in the turbulent flow regime.
Heat exchange with the pipe wall through the H port is added to the energy of the gas represented by the internal node through the energy conservation equation. Therefore, the momentum balance for each half of the pipe between port A and the internal node and between port B and the internal node is considered an adiabatic process. Adiabatic relations:
,
,
where is the specific enthalpy at port A, port B or internal node I, as indicated by the lower index.
Convective heat transfer
Equation of convective heat transfer between the pipe wall and the internal volume of gas:
,
where is the surface area of the pipe, .
If no condensate is formed on the wall surface, assuming exponential temperature distribution along the pipe, convective heat transfer is equal:
,
where
- is the inlet temperature depending on the flow direction;
- is the average mass flow rate from port A to port B;
- specific heat capacity calculated at the average temperature.
The heat transfer coefficient depends on the Nusselt number:
,
where is the heat transfer coefficient calculated at the average temperature.
Nusselt number depends on the flow regime. Nusselt number in laminar flow regime is constant and equal to the value of parameters Nusselt number for laminar flow heat transfer. Nusselt number in turbulent flow regime is calculated from Gnelinski equation:
,
where is the Prandtl number calculated at mean temperature.
The average Reynolds number is equal to:
μ,
where μ is the dynamic viscosity estimated at mean temperature.
When the average Reynolds number is between the parameters of the upper limit Reynolds number for laminar flow and the lower limit Reynolds number for turbulent flow, the Nusselt number corresponds to a smooth transition between the Nusselt number values for laminar and turbulent flows.
Saturation and condensation
The equations in this section account for condensation, which occurs when a volume of moist air becomes saturated.
When the volume of moist air reaches saturation, condensation can form. The specific humidity at saturation is equal to:
φ,
where
φ - is the relative humidity at saturation (usually 1);
- water vapour saturation pressure, estimated at .
The condensation flow rate is equal to:
τρ,
where τ is the value of the parameters Condensation time constant.
Condensed water is subtracted from the volume of moist air as shown in the mass conservation equations. The energy associated with condensed water is equal to:
,
where is the specific enthalpy of vaporisation, estimated at .
Parameters of change in the amount of moisture and impurity gases are related to each other as follows:
φ,
,
,
,
.
Condensation effects on the wall surface
Humid air units that contain an internal liquid volume (such as chambers, converters and so on) simulate water vapour condensation when that liquid volume becomes fully saturated with water vapour, i.e. at 100% relative humidity. However, water vapour can also condense on a cold surface even if the volume of air as a whole has not yet reached saturation. The ability to model this effect in the Pipe (MA) unit is important because many HVAC systems contain pipes and ducts. If these pipes and ducts are poorly insulated, their surfaces can cool and condensation can form on the wall surface. Note that this effect does not replace condensation that occurs when the volume of moist air reaches 100% relative humidity, both effects can occur simultaneously.
To model the effect of condensation on the cold surface of the pipe in contact with the humid air volume, check the box Condensation on wall surface. In this case, the convective heat transfer equation must account for both visible and latent heat, and the block has an additional equation that calculates the condensation rate of water vapour on the surface.
If the Condensation on wall surface checkbox is checked, the combined convective heat transfer is equal to:
,
where
- is the mass flow rate of dry air and impurity gases at the inlet;
- enthalpy of the mixture per unit mass of dry air and impurity gases at the wall;
- enthalpy of the mixture per unit mass of dry air and impurity gases at the inlet.
This equation is similar to the convective heat transfer equation, but the temperature difference has been replaced by the difference in enthalpy of the mixture. Since the enthalpy of the mixture depends on both the temperature and the composition of the moist air, the enthalpy difference of the mixture accounts for both the change in temperature and the change in moisture content. The unit captures both explicit and implicit thermal effects. The exponent and correlation parts of the equation used in calculating the heat transfer coefficient remain the same as before because the model is derived from the analogy between heat and mass exchange.
To simplify the derivation, the enthalpy of the mixture per unit mass of dry air and impurity gas is used in the equation, as opposed to the enthalpy of the mixture per unit mass of the mixture, since the amount of dry air and impurity gas does not change during the condensation of water vapour. To keep the equation consistent, the difference in enthalpy of the mixture is multiplied by the mass flow rate of dry air and impurity gas.
The enthalpy of the mixture per unit mass of dry air and impurity gases at the inlet is equal to:
,
where
- is the specific enthalpy of dry air and impurity gases at the inlet;
- is the specific enthalpy of water vapour at the inlet;
- inlet humidity coefficient.
The enthalpy of the mixture per unit mass of dry air and impurity gases at the wall is equal to:
,
where
- is the specific enthalpy of dry air and impurity gases at the wall;
- is the specific enthalpy of water vapour at the wall;
- humidity coefficient at the wall, defined as
,
where is the moisture saturation coefficient based on wall temperature.
The function in the previous equation provides a switch between dry and wet heat transfer:
When the wall temperature is higher than the dew point, , so no condensation occurs and the unit outputs only the temperature difference .
When the wall temperature is lower than the dew point, , therefore condensation occurs and outputs the temperature and humidity difference.
The condensation flow rate of water vapour on the wall surface is:
.
This equation is similar to the combined convective heat transfer equation because the amount of water vapour condensing on the wall is the same as the convective mass transfer from the moist air to the pipe wall. The exponential component of the equation is also the same because of the analogy used between heat and mass transfer.
The energy associated with water condensing on the pipe wall is equal to:
,
where is the specific enthalpy of vaporisation at the wall temperature.
The essential part of convective heat transfer between the pipe wall and moist air is:
.
This equation has a plus sign because is negative when the moist air is cooled. Thus, adding , which is a positive value, eliminates the latent part of the heat transfer.
The block then uses this value in the first convective heat transfer equation to calculate the heat transfer at port H.
Flow at the speed of sound
The pressure in subsonic flow at port A or B is equal to the value of the corresponding variable:
,
.
However, the port pressure variables used in the momentum balance equations, and , are not necessarily the same as the pressures in variables and , because the pipe outlet can reach a sound velocity barrier. The sound barrier occurs when the outlet pressure is low enough. At this point, the flow rate depends only on inlet conditions. Consequently, when the sound barrier is reached, the outlet pressure ( or , whichever is the outlet) cannot decrease further, even if the downstream pressure, represented by or , continues to decrease.
The sound barrier may occur at the outlet of the pipe, but not at the inlet. Hence, if port A is the inlet port, . If port A is an outlet port, then:
Similarly, if port B is an inlet port, then . If port B is an exhaust port, then:
The pressure when the sound barrier is reached at ports A and B is determined from the pulse balance, assuming that the velocity at the outlet is equal to the speed of sound:
,
.
Assumptions and limitations
The pipe wall is completely rigid.
The flow is fully developed. Friction and heat transfer losses do not include inlet effects.
The effect of gravity is negligible.
The inertia of the air is negligible.
This block does not model supersonic flow.
The equations for wall condensation are based on the analogy between thermal and mass transport and are therefore valid only when the Lewis number is close to 1.
Output port that contains the value of the condensation flow rate in the pipe. If the parameter Condensation on wall surface is enabled, this port reports the total water vapour condensation flow rate, which includes condensation from the saturated moist air volume as well as condensation on the pipe wall.
Data types
Float64.
Complex numbers support
No
# F
—
data on pressure, temperature, humidity and amount of impurity gases
`vector'
Details
An output port representing a vector with the following elements: pressure, temperature, humidity level and number of impurity gases inside the component. The block Measurement Selector (MA) is used to decompress the vector signal.
Data types
Float64.
Complex numbers support
No
Parameters
Main
#Pipe length —
pipe length
m | cm | ft | in | km | mi | mm | um | yd
Details
The length of the pipe along the direction of flow.
#Hydraulic diameter —
diameter of an equivalent cylindrical tube with the same cross-sectional area
m | cm | ft | in | km | mi | mm | um | yd
Details
Diameter of an equivalent cylindrical tube with the same cross-sectional area.
Units
m | cm | ft | in | km | mi | mm | um | yd
Default value
0.1 m
Program usage name
hydraulic_diameter
Evaluatable
Yes
Friction and Heat Transfer
#Aggregate equivalent length of local resistances —
total length of all local resistances present in the pipe
m | cm | ft | in | km | mi | mm | um | yd
Details
The total length of all local resistances present in the pipe. Local resistances include bends, fittings, fittings, pipe inlets and outlets. The effect of local resistances is to increase the effective length of the pipe segment. This length is added to the geometric length of the pipe for friction calculations only. The volume of moist air depends only on the geometric length of the pipe, determined by the parameters Pipe length.
Units
m | cm | ft | in | km | mi | mm | um | yd
Default value
0.1 m
Program usage name
length_add
Evaluatable
Yes
#Internal surface absolute roughness —
average depth of all surface defects on the internal surface of the pipe
m | cm | ft | in | km | mi | mm | um | yd
Details
The average depth of all surface defects on the inner surface of the pipe affecting pressure losses in turbulent flow regime.
Units
m | cm | ft | in | km | mi | mm | um | yd
Default value
15.e-6 m
Program usage name
roughness
Evaluatable
Yes
#Laminar flow upper Reynolds number limit —
Reynolds number, above which the flow starts to change from laminar to turbulent flow
Details
The Reynolds number above which the flow begins to change from laminar to turbulent. This number is equal to the maximum Reynolds number corresponding to a fully developed laminar flow.
Default value
2000.0
Program usage name
Re_laminar
Evaluatable
Yes
#Turbulent flow lower Reynolds number limit —
Reynolds number, below which the flow starts to change from turbulent to laminar flow
Details
The Reynolds number below which the flow begins to change from turbulent to laminar. This number is equal to the minimum Reynolds number corresponding to a fully developed turbulent flow.
Default value
4000.0
Program usage name
Re_turbulent
Evaluatable
Yes
#Laminar friction constant for Darcy friction factor —
influence of pipe geometry on viscous friction losses
Details
Dimensionless coefficient determining the effect of pipe cross-section geometry on viscous friction losses in laminar flow regime. Typical values: 64 for circular cross section, 57 for square cross section, 62 for rectangular cross section with aspect ratio 2 and 96 for thin annular cross section.
Default value
64.0
Program usage name
shape_factor
Evaluatable
Yes
#Nusselt number for laminar flow heat transfer —
convective heat transfer to conductive heat transfer ratio
Details
The ratio of convective to conductive heat transfer in laminar flow regime. Its value depends on the geometry of the pipe cross-section and the thermal boundary conditions of the pipe wall, such as constant temperature or constant heat flux. A typical value is 3.66 for a circular cross section with constant wall temperature.
Default value
3.66
Program usage name
Nu_laminar
Evaluatable
Yes
Moisture and Trace Gas
#Condensation on wall surface —
effect of condensation on the cold surface of the pipe in contact with a volume of moist air
Details
Checking this box allows you to simulate the effect of condensation on the cold surface of a pipe in contact with a volume of moist air.
Default value
false (switched off)
Program usage name
wall_condensation
Evaluatable
No
#Relative humidity at saturation —
Relative humidity above which condensation occurs
Details
Relative humidity above which condensation occurs.
Default value
1.0
Program usage name
RH_saturation
Evaluatable
Yes
#Condensation time constant —
condensation time constant
d | s | hr | ms | ns | us | min
Details
A time scale factor characterising the time period for the return of the supersaturated volume of moist air to the saturation level due to condensation of excess moisture.
Units
d | s | hr | ms | ns | us | min
Default value
0.001 s
Program usage name
condensation_time_constant
Evaluatable
Yes
#Moisture and trace gas source —
source of moisture and impurity gases
None | Constant | Controlled
Details
This parameter controls the usage of the S port and provides the following options for modelling moisture and impurity gas levels within the unit:
None - no moisture or impurity gas is introduced into or extracted from the block. The S port is hidden. This value is used by default.
Constant - moisture and impurity gases are introduced into or extracted from the unit at a constant flow rate. The S port is not used.
Controlled - Moisture and impurity gases are introduced into or removed from the unit at a time-varying flow rate. Port S is available. Connect blocks (or multiple blocks) from the Moist Air: Sources library to this port.
Values
None | Constant | Controlled
Default value
None
Program usage name
moisture_trace_gas_source
Evaluatable
No
#Moisture added or removed —
adds or removes moisture in the form of water vapour or water
Vapor | Liquid
Details
Select whether the unit adds or removes moisture as water vapour or water:
Vapor - the enthalpy of moisture added or removed corresponds to the enthalpy of water vapour, which is greater than the enthalpy of water.
Liquid - the enthalpy of moisture added or removed corresponds to the enthalpy of water, which is less than the enthalpy of water vapour.
Dependencies
To use this parameter, set the parameter Moisture and trace gas source to . Constant.
Values
Vapor | Liquid
Default value
Vapor
Program usage name
moisture_source_phase
Evaluatable
No
#Rate of added moisture —
constant mass flow rate of moisture
kg/s | N*s/m | N/(m/s) | lbf/(ft/s) | lbf/(in/s)
Details
The mass flow rate of water vapour through the unit. A positive value increases the amount of moisture in the pipe volume. A negative value extracts moisture from this volume.
Dependencies
To use this parameter, set the Moisture and trace gas source parameters to . Constant.
Units
kg/s | N*s/m | N/(m/s) | lbf/(ft/s) | lbf/(in/s)
Default value
0.0 kg/s
Program usage name
moisture_mass_flow
Evaluatable
Yes
#Added moisture temperature specification —
method for determining the temperature of added moisture
Atmospheric temperature | Specified temperature
Details
Select the method for determining the added moisture temperature:
Atmospheric temperature - use the ambient temperature.
Specified temperature - specify the value using the parameters Temperature of added moisture.
Dependencies
To use this parameter, set the Moisture and trace gas source parameters to . Constant.
Values
Atmospheric temperature | Specified temperature
Default value
Atmospheric temperature
Program usage name
moisture_temperature_type
Evaluatable
No
#Temperature of added moisture —
added moisture temperature
K | degC | degF | degR | deltaK | deltadegC | deltadegF | deltadegR
Details
Enter the desired temperature of the added moisture. This temperature remains constant during the simulation. The unit only uses this value to estimate the specific enthalpy of added moisture. The specific enthalpy of moisture removed depends on the temperature of the connected volume of moist air.
Dependencies
To use this parameter, set the parameters Added moisture temperature specification. Specified temperature.
#Rate of added trace gas —
mass flow rate of added impurity gas
kg/s | N*s/m | N/(m/s) | lbf/(ft/s) | lbf/(in/s)
Details
Reflects the mass flow rate of impurity gas added to or removed from the pipe. A positive value adds impurity gas to the pipe volume. A negative value removes impurity gas from the volume.
Dependencies
To use this parameter, set the Moisture and trace gas source parameters to . Constant.
Units
kg/s | N*s/m | N/(m/s) | lbf/(ft/s) | lbf/(in/s)
Default value
0.0 kg/s
Program usage name
trace_gas_mass_flow
Evaluatable
Yes
#Added trace gas temperature specification —
method for determining the impurity gas temperature
Atmospheric temperature | Specified temperature
Details
Select the method for determining the impurity gas temperature:
Atmospheric temperature - use ambient temperature.
Specified temperature - specify the value using the parameters Temperature of added trace gas.
Dependencies
To use this parameter, set the Moisture and trace gas source parameters to . Constant.
Values
Atmospheric temperature | Specified temperature
Default value
Atmospheric temperature
Program usage name
trace_gas_temperature_type
Evaluatable
No
#Temperature of added trace gas —
impurity gas temperature
K | degC | degF | degR | deltaK | deltadegC | deltadegF | deltadegR
Details
Enter the desired temperature of the impurity gas to be added. This temperature remains constant during the simulation. The unit only uses this value to estimate the specific enthalpy of the added impurity gas. The specific enthalpy of the removed impurity gas depends on the temperature of the connected wet air volume.
Dependencies
To use this parameter, set the parameters Added trace gas temperature specification. Specified temperature.