You are on page 1of 1

Adiabetic Flame

MaxIter=50;

Tol=0.00001; % 0.001% allowable error in temperature calculation

Tb=2000; % initial estimate

DeltaT=2*Tol*Tb; % something big

Iter=0;

[hu,u,v,s,Y,cp,dlvlT,dlvlp]=farg(p,Tu,phi,f,fueltype,airscheme);

while (Iter<MaxIter)&(abs(DeltaT/Tb)>Tol)

Iter=Iter+1;

[hb,u,v,s,Y,cp,dlvlT,dlvlp]=ecp(p,Tb,phi,fueltype,airscheme);

DeltaT=(hu-hb)/cp;

Tb=Tb+DeltaT;

end

if Iter>=MaxIter

warning('convergence failure in adiabatic flame temperature loop');

end

You might also like