summaryrefslogtreecommitdiff
path: root/3819/CH4/EX4.15/Ex4_15.sce
blob: fc31ae803e7b3d37534ca46bdff6cdf48e7b2f42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// A Textbook of Fluid Mecahnics and Hydraulic Machines - By R K Bansal
// Chapter 4-Buoyancy and Floatation
//// Problem 4.15

//Given Data Set in the Problem
dens=1000
g=9.81
SG1=0.6
SG2=0.9

//calculations
L=poly(0,"L")
d=poly(0,"d")
AG=L/2
h=%pi/4*SG1*dens*g*L/(%pi/4*SG2*dens*g)
AB=h/2
BG=AG-AB
//for ,meta centric height ;
I=%pi/64*d^4
function [f]=F(k)
    f(1)=(%pi/64*k(1)^4)/(%pi/4*k(1)^2*(%pi*4*SG1*dens*g*k(2)/(%pi/4*SG2*dens*g)))-k(2)/6
    f(2)=0          //k(1)=d and k(2)=L
endfunction
k=[100 100];
y=fsolve(k,F);