diff options
Diffstat (limited to '746/CH3/EX3.01/3_01.sce')
-rwxr-xr-x | 746/CH3/EX3.01/3_01.sce | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/746/CH3/EX3.01/3_01.sce b/746/CH3/EX3.01/3_01.sce new file mode 100755 index 000000000..089d4a614 --- /dev/null +++ b/746/CH3/EX3.01/3_01.sce @@ -0,0 +1,21 @@ +//liquid level//
+pathname=get_absolute_file_path('3.01.sce')
+filename=pathname+filesep()+'3.01-data.sci'
+exec(filename)
+//Tube diameter(in mm):
+D=1:25;
+D1=D/1000
+[m n]=size(D1)
+for i=1:n
+//Change in liquid level for water(in mm):
+dhw(i)=4*STw*cosd(thetaw)/dw/g/D1(i);
+//Change in liquid level for mercury(in mm):
+dhm(i)=4*STm*cosd(thetam)/dm/g/D1(i);
+end;
+
+//Plotting tube daimeter and water level:
+plot(D1*1000,dhw,'-o')
+//Plotting tube daimeter and mercury level:
+plot(D1*1000,dhm,'-*')
+legend(['Water';'Mercury']);
+xtitle('Liquid level vs Tube diameter','Liquid level(in mm)','Tube diameter(in mm)')
|