blob: 37b58ca782d61249ec4bb0c598ad2e4f3cf061bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
pathname=get_absolute_file_path('3_13.sce')
filename=pathname+filesep()+'3_13_data.sci'
exec(filename)
//Cutoff ratio
rc=(p2/p1)^(1/y)/re
//Temperature at the end of compression stroke(in K)
T2=T1*(p2/p1)^((y-1)/y)
//Temperature at the start of expansion stroke(in K)
T3=T2*(rc)
//Temperature at the end of expansion stroke(in K)
T4=T3*(1/re)^(y-1)
//Heat added(in kJ/kg)
Ha=Cp*(T3-T2)
//Heat rejected(in kJ/kg)
Hr=Cv*(T4-T1)
//Efficiency
n=(Ha-Hr)/Ha*100
printf("\n\nRESULTS\n\n")
printf("\nHeat added:%f\n",Ha)
printf("\nHeat rejected:%f\n",Hr)
printf("\nEfficiency:%f\n",n)
|