summaryrefslogtreecommitdiff
path: root/172/CH2/EX2.3/ex3.sce
blob: 5f17aadbaf6700dc3c77f7c17bc84f1455b8de9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//example 3
//calculating the required force
clear
clc
Dcyl=0.1 //cylinder diameter in m
Drod=0.01 //rod diameter in m
Acyl=%pi*Dcyl^2/4 //cross sectional area of cylinder in m^2
Arod=%pi*Drod^2/4 //cross sectional area of rod in m^2
Pcyl=250000 //inside hydaulic pressure in Pa
Po=101000 //outside atmospheric pressure in kPa
g=9.81 //acc. due to gravity in m/s^2
mp=25 //mass of (rod+piston) in kg
F=Pcyl*Acyl-Po*(Acyl-Arod)-mp*g //the force that rod can push within the upward direction in N
printf("\n hence,the force that rod can push within the upward direction is F = %.3f N. \n",F)