summaryrefslogtreecommitdiff
path: root/797/CH3/EX3.12.s/3_12_solution.sce
blob: d1b1745b018034fe2ca7682bfcde81ec26473f9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//Solution 3-12
WD=get_absolute_file_path('3_12_solution.sce');
datafile=WD+filesep()+'3_12_example.sci';
clc;
exec(datafile)
a_x = (V_1 - V_0) / t; //acceleration = rate of change of velocity  (horizontal)
a_x = a_x / 3.6 //converting acceleration to [m/s^2]
theta = atan(a_x / (g + a_z)) //angle made by free surface of water with horizontal [radians]
printf("Vertical rise at the back of the tank relative to the midplande is")
//Case 1:
deltaz_1 = b_1 / 2 * tan(theta);
printf("\n1.For long side parallel to direction of motion =%1.2f cm", deltaz_1 * 100);
//Case 2:
deltaz_2 = b_2 / 2 * tan(theta);
printf("\n2.For short side parallel to direction of motion =%1.2f cm", deltaz_2 * 100);
if(deltaz_2 < deltaz_1)
    printf("\n Hence short side must be parallel to the direction of motion.");
else
    printf("\n Hence long side must be parallel to the direction of motion ");
end