# Chapter 2: Work¶

## Exa 2.1¶

In [ ]:
#A stationary fluid system is subjected to a process in which the pressure and
#volume change according to the relation pv^1.4=C. The initial pressure and
#volume are respectively 100 psia and 3 cu ft, the final pressure is 20 psia
#Find the magnitude and direction of pdv work for this process
import math
#initialisation of variables
P= 100. 						#psia
V= 3. 							#cu ft
P1= 20. 						#psia
n= 1.4
#CALCULATIONS
V1= V*math.pow((P/P1),(1/n))	#Final volume
W= (P1*V1*144-P*V*144)/(1-n) 	#work done
#144 is the conversion factor to convert in^2 to ft^2
#RESULTS
print '%s %.2f' %('P dV work for this process (ft lb) = ',W)
raw_input('press enter key to exit')

P dV work for this process (ft lb) =  39810.42


## Exa 2.2¶

In [ ]:
#In a stationary fluid system, a paddle wheel supplies work at the rate of
#1 hp. During a certain period of 1 min, the system expands in volume from
#1 cu.f t to 3 cu. ft. while the pressure remains constant at 69.4 psia.
#Find the total system work during the 1 min period.
#initialisation of variables
W= 1 						#hp
P= 69.4 					#psia
V2= 3 						#cu
V1= 1 						#cu
#CALCULATIONS
Wa= P*(V2-V1)*144 			#Piston work
Q= Wa+Wb 					#Total work
#RESULTS
print '%s %.2f' %('Total system work during the 1 minute period (ft lb) = ',Q)
raw_input('press enter key to exit')

Total system work during the 1 minute period (ft lb) =  -13012.80


## Exa 2.3¶

In [ ]:
#An engine has gone bore and stroke of 11 by 15 in. An indicator diagram
#taken from this engine has an area of 1.60 sq. in. and the length of 2.4 in.
#The k=80 psi per in. How much net work has been done by the fluid in the
#cylinder upon the engine piston during the engine cycle represented by
#the diagram.?
import math
#initialisation of variables
r= 11. 					#in
l= 15. 					#in
A= 1.6 					#in
l1= 2.4 				#in

#CALCULATIONS
a= math.pi*r*r/4. 		#Piston area
L= l/12.
Pm= (A/l1)*80 			#Mean effective pressure
W= a*L*Pm 				#Net work
#RESULTS
print '%s %.2f' %('Net work done by the fluid in the cylinder (ft lb) = ',W)
raw_input('press enter key to exit')

Net work done by the fluid in the cylinder (ft lb) =  6335.55