import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-10.1 Page No.195\n');
P=100.; ##[lb/in^2] Hydraulic pressure
F=450.; ##[lb] Extension force
Fr=400.; ##[lb] Retraction force
A=F/P; ##[in^2] Cross section area
D=math.sqrt(4.*A/math.pi); ##[in] Bore of cylinder
print'%s %.2f %s '%('\n The bore of cylinder is ',D,' in.');
##Use 2.5in bore cylinder
Dm=2.5; ##[in] Bore of cylinder
Dr=1.; ##[in] Diameter of rod
A2=math.pi*Dm**2/4.-math.pi*Dr**2/4.; ##[in^2]
F2=P*A2; ##[lb] Force
if F2>=Fr:
print'%s %.2f %s '%('\n The diameter of rod is ',Dr,' in.');
else:
print'%s %.2f %s '%('\n This would not meet requirement');
##This would meet requirement
Ab=math.pi*Dm**2/4.; ##[in^2] Cross section area
##Note-In the book V=180.7 is used instead of V=180.64158
d=20.; ##[in] stroke
V=Ab*d+A2*d; ##[in^3] Volume per cycle
t=2.; ##[s] Cycle time
FR=V/t; ##[in^3/s] Flowrate
FR=FR*7.48*60/1728.; ##[gal/min] Flowrate
print'%s %.2f %s '%('\n Flow rate required is ',FR,' gal/min.');
import math
print('MACHINE DESIGN \n Timothy H. Wentzell, P.E. \n EXAMPLE-10.2 Page No.198\n');
Pa=100.; ##[lb/in^2] Air pressure
Da=4.; ##[in] Diameter
Aa=math.pi*Da**2/4.; ##[in^2] Cross section area
F1=Pa*Aa; ##[lb]
Do=1.; ##[in]
Ao=math.pi*Do**2/4.; ##[in]
Po=F1/Ao; ##[lb/in^2]
print'%s %.2f %s '%('\n The oil pressure is ',Po,' lb/in^2.');
D2o=3.; ##[in]
A2o=math.pi*D2o**2/4.; ##[in^2]
F2=Po*A2o;
print'%s %.2f %s '%('\n Force F on piston rod is ',F2,' lb.');
D=1.; ##[in]
d=4.; ##[in]
A=math.pi*D**2/4.; ##[in^2]
V=A*d; ##[in^3]
print'%s %.2f %s '%('\n The volume in 1-inch cylinder for the 4-inch travel is ',V,' in^3.');
A3=math.pi*3**2/4.; ##[in^2]
l3=V/A3; ##[in]
print'%s %.2f %s '%('\n Travel for 3-inch cylinder is ',l3,' in.');