blob: c283eda2d5897c4c5b4623b5b40fa90b4bb1b6da (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Y.V.C.Rao ,1997.Chemical Engineering Thermodynamics.Universities Press,Hyderabad,India.
//Chapter-2,Example 2,Page 30
//Title:Work done by gas in piston cylinder assembly
//================================================================================================================
clear
clc
//INPUT
v1=0.1;//volume of gas initially present in the cylinder in m^3
p1=0.1;//initial pressure of gas in MPa
p_atm=0.1;//atmospheric pressure acting on the piston in MPa
v2=0.3;//volume of gas after heating in m^3
p2=0.6;//pressure of gas after heating in MPa
//CALCULATION
work=((p1+p2)*(v2-v1)*10^6)/(2*1000);//calculation of work done by the gas in kJ
//calculation is done by using reversible work done as integral of Pdv followed by a force balance taken on the piston
//OUTPUT
mprintf('\n The work done by the gas = %d kJ',work);
//===============================================END OF PROGRAM===================================================
|