diff options
Diffstat (limited to '172/CH2/EX2.2/ex2.sce')
-rwxr-xr-x | 172/CH2/EX2.2/ex2.sce | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/172/CH2/EX2.2/ex2.sce b/172/CH2/EX2.2/ex2.sce new file mode 100755 index 000000000..a41434acc --- /dev/null +++ b/172/CH2/EX2.2/ex2.sce @@ -0,0 +1,22 @@ +//example 2
+//average volume and density
+clear
+clc
+Vliq=0.2 //volume of liquid in m^3
+dliq=997 //density of liquid in kg/m^3
+Vstone=0.12 //volume of stone in m^3
+Vsand=0.15 //volume of sand in m^3
+Vair=0.53 //vo;ume of air in m^3
+mliq=Vliq*dliq //mass of liquid in kg
+dstone=2750 //density of stone in kg/m^3
+dsand=1500 //density of sand in kg/m^3
+mstone=Vstone*dstone //volume of stone in m^3
+msand=Vsand*dsand //volume of sand in m^3
+Vtot=1 //total volume in m^3
+dair=1.1 //density of air in kg/m^3
+mair=Vair*dair //mass of air
+mtot=mair+msand+mliq+mstone //total mass in kg
+v=Vtot/mtot //specific volume in m^3/kg
+d=1/v //overall density in kg/m^3
+printf("\n hence,average specific volume is v=%.6f m^3/kg. \n",v )
+printf("\n and overall density is d=%.0f kg/m^3. \n",d)
\ No newline at end of file |