# e.g. this call installs version 1.0.0
pkg install https://github.com/aumpierre-unb/Psychrometrics-for-GNU-Octave/archive/refs/tags/v1.0.0.tar.gz
pkg load psychrometrics
You can cite all versions (both released and pre-released), by using DOI 105281/zenodo.7325079. This DOI represents all versions, and will always resolve to the latest one.
The following is a very short introduction to psychrometrics and to the psychrometrics
toolbox for GNU Octave. This text is divided in two main sections: The Theory and The psychrometrics
Toolbox.
Psychrometrics is the field of physics concerned with the thermodynamic properties of a mixture of a condensable vapor and a non condensable gas. The most usual situation in engineering is the mixture of water vapor in the atmospheric air at atmospheric pressure.
A psychrometric chart is a two dimensional diagram used for engineers to predict the thermodynamical state of humid air. In most cases, engineers are concerned with the properties of mixtures of water vapor and atmospheric air at atmospheric pressure. The prediction of the properties of such systems are mandatory for a series of industrial processes related to humidification and dehumidification as well as with air-conditioning processes.
The basic readings from a psychrometric chart are the thermodynamic temperature and the humidity. Humidity is the mass ratio of water vapor to dry air.
Alongside with thermochemical properties of water vapor and dry air, the material and energy balances allow to calculate the specific enthalpy and the specific volume of the system using some equation of state. The ideal gas equations of state is usually used since water vapor and dry air present negligible deviation from ideality at room temperature.
Also, alongside with mass and energy transfer coefficients of water vapor, the combined mass and energy transfer phenomena allow to calculate the temperature of a thin layer of liquid water providing water vapor to the gaseous mixture. This temperature is refereed to as wet bulb temperature, while the thermodynamic temperature is refereed to as dry bulb temperature.
Most psychrometric charts show sets of lines of constant specific volume, constant specific enthalpy and constant wet bulb temperature. Set all together, they produce a fairly complete chart of the thermodynamic state of humid air.
Consider a constant pressure control volume filled with humid air only. As temperature decreases, all particles in the system lose energy. Eventually, some particles of water will lose energy ate the point they condensate. At this point, the gaseous mixture contains the maximum possible amount of water particles, it is said to be saturated. In psychrometrics, saturation is the condition where the maximum amount of water vapor is in the gaseous phase.
Once pressure is an indirect measure of the number of particles in the system, the amount of particles in the gaseous phase is indirectly refereed to as saturation pressure.
The thermodynamic state where the smallest amount of energy removed from the gaseous phase produces an incipient condensed phase is called dew point. Dew point is characterized by the dew point temperature and the saturation pressure.
Humidity is the mass ratio of water vapor and dry air. Since both water vapor and dry air are taken as ideal gases, the masses can be replaced by their the partial pressures,
or
where
Relative humidity is the material ratio of water vapor to the water vapor at saturation,
Note that relative humidity is not the ratio of humidity to saturation humidity. This is so because humidities are not fractions.
Consider the adiabatic saturation of humid air with water. The amount of water required is the difference of humidity between the saturation and the humid air. The amount of dry gas is unchanged in the process. That is all about material balances. Taking water at the saturation temperature as reference for enthalpy, the enthalpies per mass of dry air, or specific enthalpy, of the inlet humid air, the inlet water and the outlet saturated air are given by
where
where
As the vaporization latent heat is usually much higher than the sensible heat, the variation of humidity in the gaseous phase is closely proportional to its variation in temperature for constant specific enthalpy, producing fairly straight lines in the psychrometric chart.
The volume of the gaseous mixture per mass of dry air, or specific volume, is given by
At room temperature at atmospheric pressure, humidity is closely proportional to dry bulb temperature for constant specific volume, producing fairly straight lines in the psychrometric chart.
If the gaseous phase in contact with water is not saturated with water vapor, the system is not at thermodynamic equilibrium. By removing sensible heat from its surroundings, some molecules overcome the vaporization heat and escape from the condensed to the gaseous phase. It happens spontaneously increasing the amount of water vapor in the gaseous phase and decreasing the temperature of the system.
The temperature in the surroundings of the evaporating molecules is the wet bulb temperature. This is so because of the construction of the simplest apparatus to indirectly read the air humidity, composed of two bulb thermometers, one in direct contact with the gaseous phase and one in contact with a thin layer of water in contact with the gaseous phase. The temperature of the wet bulb is affected by the evaporation of water from the thin layer to the gaseous phase. The temperature of the gaseous phase is the dry bulb temperature, read at the dry bulb.
The spontaneous heat and mass transfer phenomena are given by
where
where
where
Therefore, the variation of humidity in the gaseous phase is closely proportional to its variation in temperature, producing fairly straight lines in the psychrometric chart for constant wet bulb temperature.
Equations used in psychrometrics
toolbox come from the first chapter of the 2017 ASHRAE Handbook Fundamentals Systems - International Metric System, published by the American Society of Heating, Refrigerating and Air-Conditioning Engineers.
For ice in the range -100 °C to 0 °C, the water vapor pressure in equilibrium with pure ice is given by
and for water in the range 0 °C to 200 °C, the water vapor pressure in equilibrium with pure water is given by
where
As the saturation of air in ice and water is negligible, the water vapor pressure over pure ice or water is almost the same as the saturation pressure over ice or water when there is air in the gaseous phase.
The specific volume and the specific enthalpy (volume and enthalpy of the gaseous phase per unit of mass of dry air) are given by
with
Dew point is given by
where psychrometrics
toolbox are
psychrometrics
provides the following functions:
psychro
humidity
satPress
enthalpy
volume
adiabSat
All inputs and outputs of all functions are given in units of the International System.
psychro
computes
- the dry bulb temperature Tdry (in K),
- the wet bulb temperature Twet (in K),
- the dew point temperature Tdew (in K),
- the adiabatic saturation temperature Tadiab (in K),
- the humidit W (in kg/kg of dry air),
- the saturation humidity Wsat (in kg/kg of dry air),
- the saturation humidity at the wet bulb temperature Wsatwet (in kg/kg of dry air),
- the adiabatic saturation humidity Wadiab (in kg/kg of dry air),
- the specific enthalpy h (in J/kg of dry air),
- the specific volume v (in cu. m/kg of dry air),
- the the relative humidity phi,
- the water vapor pressure pw (in Pa),
- the water saturation pressure psat (in Pa),
- the saturation pressure at the wet bulb temperature psatwet (in Pa) and
- the density rho (in kg/cu. m)
given any two parameters among
- the dry bulb temperature Tdry (in K),
- the wet bulb temperature Twet (in K),
- the dew point temperature Tdew (in K),
- the humidit W (in kg/kg of dry air),
- the specific enthalpy h (in J/kg of dry air),
- the specific volume v (in cu. m/kg of dry air) and
- the the relative humidity phi,
- except the combination of water vapor pressure and
- dew point temperature, which are not independent.
except for the combination of water vapor pressure and dew point temperature, which are not mutually independent.
If fig = true is given, a schematic psychrometric chart is plotted as a graphical representation of the solution.
Syntax:
[~,~,~,~,W,~,~,~,h,v]=psychro(Tdry=300,Twet=295)
[~,~,~,Tadiab,~,~,Wsatwet,Wadiab]=psychro(Tdry=298,:,:,:,:,:,phi=0.50,true)
[Tdry,Twet,Tdew,~,~,~,~,~,~,~,phi,pw]=psychro(:,:,:,:,h=40e3,v=0.85)
[Tdry,~,~,~,~,~,~,~,~,~,~,~,psat,psatwet,rho]=psychro(:,:,:,:,h=55e3,v=0.87,:,true)
Examples:
Compute the dry bulb temperature, the wet bulb temperature, the adiabatic saturation temperature, the humidity, the saturation humidity, the saturation humidity at wet bulb temperature, the adiabatic saturation humidity, the specific enthalpy, the specific volume, the relative humidity, the water vapor pressure, the saturation pressure, the saturation pressure at wet bulb temperature and the density given the dew point temperature is 22 °C and the relative humidity is 29 %:
[Tdry,Twet,Tdew,Tadiab,W,Wsat,Wsatwet,Wadiab,h,v,phi,pw,psat,psatwet,rho]=...
psychro(:,:,Tdew=22+273.15,:,:,:,phi=0.29) # parameters and returns in SI units
8.5 cubic meters of humid air at dry bulb temperature of 293 K and wet bulb temperature of 288 K is subjected to two cycles of heating to 323 K followed by adiabatic saturation. Compute the energy and water vapor demands. Assume the amount of dry air is constant.
# All parameters and returns in SI units
# The initial condition is
[~,~,~,~,W1,~,~,~,h1,v1]=psychro(Tdry1=293,Twet1=288,:,:,:,:,:,true)
# The thermodynamic state after the first heating is
[~,~,~,~,~,~,~,~,h2,v2]=psychro(Tdry2=323,:,:,W2=W1,:,:,:,true)
# The thermodynamic state the after first adiabatic saturation is
[Tdry3,W3]=adiabSat(h3=h2)
[~,~,~,~,~,~,~,~,~,v3]=psychro(Tdry3,:,:,W3)
# The thermodynamic state after the second heating is
[~,~,~,~,~,~,~,~,h4,v4]=psychro(Tdry4=323,:,:,W4=W3,:,:,:,true)
# The thermodynamic state the after second adiabatic saturation is
[Tdry5,W5]=adiabSat(h5=h4)
[~,~,~,~,~,~,~,~,~,v5]=psychro(Tdry5,:,:,W5)
# The energy and water vapor demands are
(h5-h1)*(8.5/v1) # demand of energy
(W5-W1)*(8.5/v1) # demand of water vapor
humidity
computes
the humidity of humid air in given the water vapor pressure and the total pressure. By default, total pressure is assumed to be the atmospheric pressure at sea level.
Syntax:
W=humidity(pw[,p])
Examples:
Compute the humidity of humid air at atmospheric pressure given water vapor pressure is 1 kPa at 1 atm total pressure.
W=humidity(pw=1e3) # parameters and returns in SI units
satPress
computes the saturation pressure of humid air given the dry bulb temperature.
Syntax:
psat=satPress(Tdry)
Examples:
Compute the saturation pressure given the dry bulb temperature is 25 °C.
psat=satPress(Tdry=25+273.15) # parameters and returns in SI units
enthalpy
computes the specific enthalpy of humid air given the dry bulb temperature and the humidity in.
Syntax:
h=enthalpy(Tdry,W)
Examples:
Compute the specific enthalpy given the dry bulb temperature is 25 °C and the humidity is 7 g/kg of dry air.
h=enthalpy(Tdry=25+273.15,W=7e-3) # parameters and returns in SI units
volume
computes computes the specific volume of humid air given the dry bulb temperature, the humidity in and the total pressure. By default, total pressure is assumed to be the atmospheric pressure at sea level.
Syntax:
v=volume(Tdry,W[,p])
Examples:
Compute the specific volume given the dry bulb temperature is 25 °C and the humidity is 7 g/kg of dry air at 1 atm total pressure.
v=volume(Tdry=25+273.15,W=7e-3) # parameters and returns in SI units
adiabSat
computes the the adiabatic saturation temperature and the adiabatic saturation humidity given the specific enthalpy. If fig = true is given, a schematic psychrometric chart is plotted as a graphical representation of the solution.
Syntax:
[Tadiab,Wadiab]=adiabSat(h[,fig])
Examples:
Compute the the adiabatic saturation temperature and the adiabatic saturation humidity given the specific enthalpy is 82.4 kJ/kg of dry air and plot a graphical representation of the answer in a schematic psychrometric chart.
[Tadiab,Wadiab]=adiabSat(h=82.4e3,true) # parameters and returns in SI units
The theory and the adjusted equations used in this package were taken from the first chapter of the 2017 ASHRAE Handbook Fundamentals Systems - International Metric System, published by the American Society of Heating, Refrigerating and Air-Conditioning Engineers.
The author of psychrometrics
package acknowledges Professor Brent Stephens, Ph.D. from the Illinois Institute of Technology for kindly suggesting the source reference for equations used for this package.
McCabe-Thiele-for-GNU-Octave, Ponchon-Savarit-for-GNU-Octave, Internal-Fluid-Flow-for-GNU-Octave.
Copyright © 2022 2023 2024 Alexandre Umpierre
email: [email protected]