diff options
Diffstat (limited to '797/CH3/EX3.7.s/3_07_solution.sce')
-rw-r--r-- | 797/CH3/EX3.7.s/3_07_solution.sce | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/797/CH3/EX3.7.s/3_07_solution.sce b/797/CH3/EX3.7.s/3_07_solution.sce new file mode 100644 index 000000000..5d4a26d12 --- /dev/null +++ b/797/CH3/EX3.7.s/3_07_solution.sce @@ -0,0 +1,10 @@ +//Soultion 3-07 +WD=get_absolute_file_path('3_07_solution.sce'); +datafile=WD+filesep()+'3_07_example.sci'; +clc; +exec(datafile) +//converting pressures into [Pa] +P_atm = P_atm * 1000; +P_1 = P_1 * 1000; +h_3 = (P_1 - P_atm + rho_water * g *h_1 + rho_oil * g * h_2) / (rho_seawater * g); //pressure eqquilibrium +printf("If mercury is changed to seawater the height of seawater will be %1.2f m", h_3); |