summaryrefslogtreecommitdiff
path: root/32/CH7/EX7.13/7_13.sce
blob: a3d65d3de8d9b3db69bacef98f458e98af676f65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//pathname=get_absolute_file_path('7.13.sce')
//filename=pathname+filesep()+'7.13-data.sci'
//exec(filename)
//Minimum temperature(in K):
Tmin=20+273
//Maximum temperature(in K):
Tmax=500+273
//Efficiency of heat engine:
n=0.25
//Reversible engine efficiency:
nrev=1-Tmin/Tmax
//Second law efficiency:
n2=n/nrev
printf("\nRESULT")
printf("\nSecond law efficiency = %f percent",n2*100)