blob: 40e7b1e67ea5685350ee665621556a2425243dc1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Exa 3.12
clc;
clear;
close;
// Given data
Gamma = 1.4;
P1 = 780;// in kN/m^2
P2 = 100;// in kN/m^2
V1 = 750;// in cm^3
V1= V1*10^-6;// in m^3
V2 = (1/5)*V1;// in m^3
n = (log(P1/P2))/(log(V1/V2));
disp(n,"The value of index is");
W = (P1*V2-P2*V1)/(1-n);// in kJ
disp(W,"Work done in kJ is");
Q = ((Gamma - n)/(Gamma-1)) * (-W);// in kJ
disp("Heat rejected during Compression in kJ is "+string(Q)+" kJ or "+string(Q*10^3)+" joules");
|