Matlab Code For Graphical Development of Fanno Line
Matlab Code For Graphical Development of Fanno Line
FANNO LINE
CODE:
% Cv=718;T1=333;P1=5.75;R=287;
Cv=input('Enter the Value of Specific Heat at constant Volume Cv in J/kgK:');
T1=input('Enter the value of Temprature T1 in Kelvin(K):');
P1=input('Enter the value of Density P1 in (kg/m^3):');
for i=1:N
T2=336-((V_min^2)/(2*(1005)));
P2=420/V_min;
s=Cv*log(T2/T1)-R*log(P2/P1);
Ma=V_min/sqrt(1.4*287*T2);
V_new=V_min+V_inc;
fprintf('\t\t\t%0.05f \t\t\t%0.05f \t %0.05f \t\t\t%0.05f \t\t%0.05f \n',[i;V_min;T2;s;Ma])
V_min=V_new;
end
OUTPUT:
Iteration Velocity V_min Entropy
s (m/s) Temprature T2 (K) s(J/kgK) Ma
1 10 335.95025 -564.35764 0.02722
2 30 335.55224 -249.90705 0.0817
3 50 334.75622 -105.00541 0.13633
4 70 333.56219 -11.00346 0.19121
5 90 331.97015 57.68867 0.24643
6 110 329.9801 110.96404 0.3021
7 130 327.59204 153.69352 0.35832
8 150 324.80597 188.63097 0.41522
9 170 321.62189 217.4795 0.4729
10 190 318.0398 241.35961 0.53151
11 210 314.0597 261.04148 0.59116
12 230 309.68159 277.07077 0.65203
13 250 304.90547 289.84153 0.71425
14 270 299.73134 299.64059 0.77802
15 290 294.1592 306.67575 0.84353
16 310 288.18905 311.09399 0.911
17 330 281.8209 312.99365 0.98067
18 350 275.05473 312.43228 1.05282
19 370 267.89055 309.43167 1.12776
20 390 260.32836 303.98068 1.20587
21 410 252.36816 296.03633 1.28754
22 430 244.00995 285.52337 1.37328
23 450 235.25373 272.33222 1.46366
24 470 226.0995 256.31541 1.55935
25 490 216.54726 237.28204 1.66117
26 510 206.59701 214.98976 1.77012
27 530 196.24876 189.13366 1.88742
28 550 185.50249 159.33053 2.01457
29 570 174.35821 125.0969 2.15352
30 590 162.81592 85.81745 2.30674
31 610 150.87562 40.69893 2.47751
32 630 138.53731 -11.29916 2.67025
33 650 125.801 -71.57248 2.89112
34 670 112.66667 -142.04702 3.149
35 690 99.13433 -225.47895 3.45726
36 710 85.20398 -326.00344 3.83728
37 730 70.87562 -450.23002 4.32583
38 750 56.14925 -609.70443 4.99326
//39 770 41.02488 -827.48474 5.99739
40 790 25.50249 -1161.46443 7.80424
GRAPHICAL PLOT: