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

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Loops and Conditional Statements 的更多信息

提问:

2014-5-3

编辑:

2014-5-3

Community Treasure Hunt

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

Start Hunting!

Translated by