summaryrefslogtreecommitdiff
path: root/2705/CH2/EX2.3/Ex2_3.sce
blob: cff50da55c09dabcee6c06d4d6104baa4c1af197 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
clear;
clc;
disp('Example 2.3');



//  Given values
Q = -150; // Heat transferred out of the system, [kJ/kg]
del_u = -400; // Internal energy decreased ,[kJ/kg]

//  solution
//  using equation [3],the non flow energy equation
//  Q=del_u+W
W = Q-del_u; //  [kJ/kg]
mprintf('\n The Work done is, W =  %f kJ/kg \n',W);

if(W>0)
      disp('Since W>0, so Work done by the engine per kilogram of working substance')
else
   disp('Since <0, so Work done on the engine per kilogram of working substance')
end

//  End