blob: 41f4124517ba1246f5f9919d8a673df5cf71d1ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
P0 = 1000;
T0 = 3;
V0 = 0.001;
R = 287;
n = (P0*V0)/(R*T0); // Number of moles
// Process ab
Wab = 0;
cv = (3/2)*R;
Ta = T0; Tb = 300;
Qab = n*cv*(Tb-Ta);
Ua = 0; // Given internal energy
Ub = Qab+Ua;
Uab = Ub-Ua;
// Process bc
Qbc = 0; Uc = 0; Ubc = Uc-Ub;
Wbc = -Ubc;
// Process ca
Tc = Ta;
g = 5/3; // gamma
Vcb = (Tb/Tc)^(3/2); // Vc/Vb
Wca = -n*R*Tc*log(Vcb);
Qca = Wca ;
Uca = 0;
//
disp("J",Wab+Wbc+Wca,"Work done in the cycle is")
disp("J",Uab+Ubc+Uca,"Internal energy change in the cycle is")
disp("J",Qab+Qbc+Qca,"Heat transfer in the cycle is")
// Part (b)
e = (Qab+Qca)/Qab;
disp("%",e*100,"Thermal efficiency of the system is")
|