solving psychometric equation using fixed-point iteration

i need to solve these equations to find wet bulb temperature using fixed point iteration method, so i wrote this code but i got wrong value and i don't know what's the problem the final value of tw must be near to 37.87
% code
clear all
clc
td=41;
tw=20; %intial guess
phi=0.82;
patm=101.325;
A=6.66*(10^-4);
exact=37.87;
pvs=10^(30.59051-8.2*log10(td+273)+0.0024804*td-3142.31/td);
pv=pvs*phi;
error=100
while error > .01
pss=10^(30.59051-8.2*log10(tw+273)+0.0024804*tw-3142.31/tw);
tw=td-((pss-pv)/(patm*A));
error=abs(((tw-exact)/tw)/100);
end

Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 3 Mai 2014

Bearbeitet:

am 3 Mai 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by