Problem 83 The work W k produced in a pistoncylinder device

Problem 8.3 The work W (k) produced in a piston-cylinder device can be calculated by finding the integral of the curve shown in a P-V diagram and with the following equation: W P dV The pressure P (kPa) in the piston-cylinder device can be calculated from the following equation: PV nRT where P is the pressure (kPa) Vis the volume (m) n is the number of moles (1 kmol) R is the ideal gas constant (8.314 /kmol-K) T is the temperature (300 K) The volume V (m\') of 3 different piston-cylinder devices were measured and are shown in the table below. System 1 1.0 1.9 2.7 4.1 5.0 System 2 1.0 2.3 3.4 4.6 5.0 System 3 1.0 2.0 2.9 4.4 L5.0

Solution

The MATLAB code is given below

--------------------------------------------------------------------------------------------------------------------------

V1=[1.0 1.9 2.7 4.1 5.0];
V2=[1.0 2.3 3.4 4.6 5.0];
V3=[1.0 2.0 2.9 4.4 5.0];
R= 8.314;
n=1;
T=300;
P1=n*R*T*(V1.^-1);
P2=n*R*T*(V2.^-1);
P3=n*R*T*(V3.^-1);
W1=0 % implementing trapezoidal formula using for loop
for i=1:4
W1= W1+(P1(i)+P1(i+1))*(V1(i+1)-V1(i))/2;
end

W2=0 % implementing trapezoidal formula using for loop
for i=1:4
W2= W2+(P2(i)+P2(i+1))*(V2(i+1)-V2(i))/2;
end

W3=0 % implementing trapezoidal formula using for loop
for i=1:4
W3= W1+(P3(i)+P3(i+1))*(V3(i+1)-V3(i))/2;
end

fprintf(\'\ the work done by system 1 is : %5.4f \ \',W1);
fprintf(\'\ the work done by system 2 is : %5.4f \ \',W2);
fprintf(\'\ the work done by system 3 is : %5.4f \ \',W3);

--------------------------------------------------------------------------------------------------------------------------------------------

The output is

the work done by system 1 is : 4178.4426

the work done by system 2 is : 4299.7201

the work done by system 3 is : 4498.1536

 Problem 8.3 The work W (k) produced in a piston-cylinder device can be calculated by finding the integral of the curve shown in a P-V diagram and with the foll

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site