summaryrefslogtreecommitdiff
path: root/2132/CH3/EX3.12/Example3_12.sce
blob: ba345cf0a94d39731e70f50eb2091748710432b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//Example 3.12
clc;
clear;
close;
format('v',6);
//Given data :
a=3;//meter
b=4;//meter(altitude)
S=1.2;//specific gravity
theta=30;//degree
d=2.5;//meter
g=9.81;//gravity
AG=b/3;//meter
xbar=d+AG*sind(theta);//meter
A=1/2*a*b;//meter^2
w=S*g*1000;//in N/m^3
p=w*A*xbar/10^3;//in kN
disp(p,"Total pressure in kN : ");
IG=a*b^3/36;//in m^4
h_bar=IG/A/xbar*(sind(theta))^2+xbar;//in meter
disp("Depth of centre of pressure is "+string(h_bar)+" meter.");