summaryrefslogtreecommitdiff
path: root/1019/CH2/EX2.20/Example_2_20.sce
blob: 1bc3f6b9a7264f2a3538eb24b473b620dc5d97c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//Example 2.20
clear;
clc;

//Given
T1=300; //initial temperature in K
T2=400; //final temperature in K
W=1000; //work obtained in J

// To determine heat withdrawn from the reservoir
n=1-(T1/T2);//efficiency of the engine
q=W/n;//heat absorbed in J
mprintf('heat withdrawn from the reservoir = %f',q);
//end