In: Mechanical Engineering
USE EXCEL OR MATLAB IF YOU NEED
Given the dry-bulb temperature, Tdb and relative humidity, Φ, the wet-bulb, Twb temperature may be calculated from the psychrometric equation (Jones, 1994):
PvsΦ – Pss = PatmA (Twb -Tdb ) (1)
Use your input from the Table below.
The input Twb and Tdb are in oC (used in Eqs. (2) and (3) in Kelvin).
Pss = saturated vapor pressure at Twb (kPa)
Pvs = saturated vapor pressure at Tdb (kPa)
Pss = 10^[30.59051- 8.2 log10 Twb + 0.0024804 Twb – 3142.31/ Twb] ..........(2)
and
Pvs = 10^[30.59051- 8.2 log10 Tdb + 0.0024804 Tdb – 3142.31/ Tdb] ........(3)
In the above two equations T is in Kelvin and P in kPa (you have to convert the temperatures from the input in oC to Kelvin).
Patm= atmospheric pressure (kPa) (Patm =101.325 kPa)
Tdb = dry-bulb temperature (oC)
Twb = wet-bulb temperature (oC)
A = 6.66x10-4 C-1 (constant for sling psychrometer)
Φ = relative humidity (%) used in the calculations as (%/100). For example, for 80% relative humidity, input 0.8.
Solve Equation (1) for the wet-bulb temperature using Newton-Raphson method. The input is as follows: Tdb= in oC and Φ= in % (to be converted in the program to fraction, i.e., Φ=50% means Φ=0.5). Set the tolerance to 10-4 . In other words, the absolute difference between the results of two successive iterations should not be more than 10-4. Check your answer using Psychrometric chart/Thermo Textbook. Also, to check if your results are correct, use f=100% and you should get Twb=Tdb. S is yourlisting number.
S (for future use) | Tdb (C) | Relative Humidity (%) |
1 | 25 | 45 |
clc
clear
close
syms x %assume Twb=x
Patm=101.325;
A=6.66e-4;
Tdb=273+25;
phi=0.45;
Pss=10^(30.59051-(8.2*log10(x))+(0.0024804*x)-(3142.31/x));
Pvs=10^(30.59051-(8.2*log10(Tdb))+(0.0024804*Tdb)-(3142.31/Tdb));
f=Patm*A*(x-Tdb)+Pss-Pvs*phi;
x0=20;
[y,h]=newton_raphson(f,x0);
Tdb=y-273
function file for newton raphson
function [y,h]=newton_raphson(f,x0)
syms x;
g=diff(f); %The Derivative of the Function
n=4;
epsilon = 1e-4;
h=[];
for i=1:100
f0=vpa(subs(f,x,x0)); %Calculating the value of function at
x0
f0_der=vpa(subs(g,x,x0)); %Calculating the value of function
derivative at x0
y=x0-f0/f0_der; % The Formula
h=cat(1,h,y);
err=abs(y-x0);
if err<epsilon %checking the amount of error at each
iteration
break
end
x0=y;
end
y = y - rem(y,10^-n); %Displaying upto required decimal places
Note: Using Psychometric chart @ Tdb=25 and RH=45 the Twd is 17.049 C. The result obtained using Matlab is 17.1806
Please do like the solution :-)