summaryrefslogtreecommitdiff
path: root/557/CH2/EX2.10/10.sce
blob: 7756eae0d27174e420bc14d3b6eb036e61256b47 (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
clc ;funcprot(0);
//Example 2.10 

//Initializing the variables
phi = 30; //30 degree
h = 1.2 ; // Height of tank
l = 2;    // Length of tank

//Calculations
function[Theta]=SurfaceAngle(a,phi)
    Theta = atand(-a*cosd(phi)/(g+a*sind(phi)));
endfunction

//case (a) a = 4
disp(tand(SurfaceAngle(4,phi)),"Tan of Angle between surface of fluid and horizontal :");
disp(180 + SurfaceAngle(4,phi),"ThetaA (degree):");

//Case (b) a = - 4.5
tanThetaR = tand(SurfaceAngle(-4.5,phi));
disp(tanThetaR,"Tan of Angle between surface of fluid and horizontal :");
disp(SurfaceAngle(-4.5,phi),"ThetaR (degree):");

Depth = h - l*tanThetaR/2;
disp(Depth,"Maximum Depth of tank (m):");