diff options
author | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-10-10 12:27:19 +0530 |
commit | 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch) | |
tree | dbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /797/CH5/EX5.7.s/5_07_solution.sce | |
parent | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff) | |
download | Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2 Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip |
initial commit / add all books
Diffstat (limited to '797/CH5/EX5.7.s/5_07_solution.sce')
-rw-r--r-- | 797/CH5/EX5.7.s/5_07_solution.sce | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/797/CH5/EX5.7.s/5_07_solution.sce b/797/CH5/EX5.7.s/5_07_solution.sce new file mode 100644 index 000000000..758558a74 --- /dev/null +++ b/797/CH5/EX5.7.s/5_07_solution.sce @@ -0,0 +1,21 @@ +//Solution 5-07 +WD=get_absolute_file_path('5_07_solution.sce'); +datafile=WD+filesep()+'5_07_example.sci'; +clc; +exec(datafile) +P_atm = P_atm * 1000; //conversion from [kPa] to [Pa] +D = D / 1000; //conversion from [mm] to [m] +V = V / 1000; //conversion from [litres] to [m^3] +//(a) +V_2 = sqrt(2 * g * z_1); //Toricelli equation +A = %pi * D^2 / 4; +Vdot = V_2 * A; //continuity equation +dt = V / Vdot; +printf("\nVelocity of water entering the gas can is %1.2f m/s", V_2); +printf("\nArea of cross section of siphon is %1.2e m^2", A); +printf("\nVolume flow rate of gasoline is %f L", Vdot * 1000); +printf("\nTime needed to siphon 4L of gasoline is %1.2f s", dt); +//(b) +P_3 = P_atm - rho * g * z_3; //application of Bernoulli equation between 2 and 3 +P_3 = P_3 / 1000; //conversion from [Pa] to [kPa] +printf("\nPressure at point 3 in siphon is %1.2f kPa", P_3); |