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 ExchangeLoops 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