0% found this document useful (0 votes)
55 views2 pages

Script For Assignment 1

The document describes using the Newton Raphson method to calculate the constant pressure and constant volume adiabatic flame temperatures. It provides polynomial coefficients to model the heat capacity as a function of temperature. The Newton Raphson method iteratively finds the root of the function for the adiabatic flame temperature by calculating the function and derivative at each step and updating the temperature estimate.

Uploaded by

AsheeshKumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views2 pages

Script For Assignment 1

The document describes using the Newton Raphson method to calculate the constant pressure and constant volume adiabatic flame temperatures. It provides polynomial coefficients to model the heat capacity as a function of temperature. The Newton Raphson method iteratively finds the root of the function for the adiabatic flame temperature by calculating the function and derivative at each step and updating the temperature estimate.

Uploaded by

AsheeshKumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Constant Pressure Adiabatic flame temperature-(script)

%Using Newton Raphson method for calculating the Temperature

clear all
T(1)=2000; % initial guess
T0=1000; % as cp is different before 1000k and after 1000k
T01=298; % initial temp.
a11=2.2757; % values of constant in polynomials
a21=0.09922*10^-1;
a31=-0.10409*10^-4;
a41=0.06866*10^-7;
a51=-0.0211728*10^-10;
b11=3.29867;
b21=0.00140824;
b31=-0.0396322*10^-4;
b41=0.056415*10^-7;
b51=-0.02444854*10^-10;
a1=4.4536;
a2=0.0314*10^-1;
a3=-0.1278*10^-5;
a4=0.0239399*10^-8;
a5=-0.1669033*10^-13;
b1=2.9266;
b2=0.14879*10^-2;
b3=-0.056847*10^-5;
b4=0.10097308*10^-9;
b5=-0.067533*10^-13;
for n=1:10 % loop for newton raphson method
F(n)=8.315*((a1+b1*79/42)*(T(n)-T0)+(a2+b2*79/42)*(T(n)^2-
T0^2)/2+(a3+b3*79/42)*(T(n)^3-T0^3)/3+(a4+b4*79/42)*(T(n)^4-
T0^4)/4+(a5+b5*79/42)*(T(n)^5-T0^5)/5)+8.315*((a11+b11*79/42)*(T0-
T01)+(a21+b21*79/42)*(T0^2-T01^2)/2+(a31+b31*79/42)*(T0^3-
T01^3)/3+(a41+b41*79/42)*(T0^4-T01^4)/4+(a51+b51*79/42)*(T0^5-T01^5)/5)-
393546+110541; % function derived for raphson method

F_1(n)=8.315*((a1+b1*79/42)+(a2+b2*79/42)*T(n)+(a3+b3*79/42)*(T(n)^2)+(a4+b4*
79/42)*(T(n)^3)+(a5+b5*79/42)*(T(n)^4));
if F_1(n)==0 % algorithm of newton raphson method
k=0
return
else
T(n+1)=T(n)-F(n)./(F_1(n));
if abs(T(n+1)-T(n))<=0.005
l=T(n+1)
return
end
end
end
Constant Volume Adiabatic flame temperature-(script)

%Using Newton Raphson method for calculating the Temperature

clear all
T(1)=2000; % initial guess
T0=1000; % as cp is different before 1000k and after 1000k
T01=298; % initial temp.
a11=2.2757; % values of constant in polynomials
a21=0.09922*10^-1;
a31=-0.10409*10^-4;
a41=0.06866*10^-7;
a51=-0.0211728*10^-10;
b11=3.29867;
b21=0.00140824;
b31=-0.0396322*10^-4;
b41=0.056415*10^-7;
b51=-0.02444854*10^-10;
a1=4.4536;
a2=0.0314*10^-1;
a3=-0.1278*10^-5;
a4=0.0239399*10^-8;
a5=-0.1669033*10^-13;
b1=2.9266;
b2=0.14879*10^-2;
b3=-0.056847*10^-5;
b4=0.10097308*10^-9;
b5=-0.067533*10^-13;
for n=1: 10 % loop for newton raphson method
F(n)=8.315*((a1+b1*79/42)*(T(n)-T0)+(a2+b2*79/42)*(T(n)^2-
T0^2)/2+(a3+b3*79/42)*(T(n)^3-T0^3)/3+(a4+b4*79/42)*(T(n)^4-
T0^4)/4+(a5+b5*79/42)*(T(n)^5-T0^5)/5)+8.315*((a11+b11*79/42)*(T0-
T01)+(a21+b21*79/42)*(T0^2-T01^2)/2+(a31+b31*79/42)*(T0^3-
T01^3)/3+(a41+b41*79/42)*(T0^4-T01^4)/4+(a51+b51*79/42)*(T0^5-T01^5)/5)-
393546+110541+3.38*8.315*298-2.88*8.315*T(n); % function derived for raphson
method

F_1(n)=8.315*((a1+b1*79/42)+(a2+b2*79/42)*T(n)+(a3+b3*79/42)*(T(n)^2)+(a4+b4*
79/42)*(T(n)^3)+(a5+b5*79/42)*(T(n)^4))-2.88*8.315;
if F_1(n)==0 % algorithm of newton raphson method
k=0
return
else
T(n+1)=T(n)-F(n)./(F_1(n));
if abs(T(n+1)-T(n))<=0.005
l=T(n+1)
return
end
end
end

You might also like