summaryrefslogtreecommitdiff
path: root/944/CH5/EX5.1/example5_1_TACC.sce
blob: e64de8835b66df27d7d4351cb9b94f071d2b3b93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//example 5.1

clear;
clc;

//given:
T1=373;//initial temperature [K]
T2=573;//final temperature [K]
Q2=750;//Heat absorbed by carnot engine[J]

//to find the workdone , heat rejected , and efficiency of the engine
e=(T2-T1)/T2;//efficiency of the engine
W=e*Q2;//Workdone by the engine[J]
Q1=T1*Q2/T2;//Heat rejected by the engine[J]

printf("Efficiency of the engine = %f ", e);
printf("\n Workdone by the engine = %f J", W);
printf("\n Heat rejected by the engine = %f J", Q1);