diff options
Diffstat (limited to '3843/CH3/EX3.2/Ex3_2.sce')
-rw-r--r-- | 3843/CH3/EX3.2/Ex3_2.sce | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/3843/CH3/EX3.2/Ex3_2.sce b/3843/CH3/EX3.2/Ex3_2.sce new file mode 100644 index 000000000..dbc76bcc7 --- /dev/null +++ b/3843/CH3/EX3.2/Ex3_2.sce @@ -0,0 +1,19 @@ +// Example 3_2
+clc;funcprot(0);
+// Given data
+d=110/10^3;// The diameter of the cylinder in m
+V_1=100;// The volume of the water in cm^3
+m=50;// kg
+g=9.81;// The acceleration due to gravity in m/s^2
+P_atm=1*10^5;// Pa
+
+// Calculation
+A=(%pi*d^2)/4;// m^2
+P=((m*g)/A)+P_atm;// Pa
+V_1=V_1*10^-6;// m^3
+v_1=0.001017;// m^3/kg
+m=V_1/v_1;// kg
+v_2=1.444;// m^3/kg
+V_2=m*v_2;// m^3
+W=P*(V_2-V_1);// The work done in J
+printf("\nThe work done,W=%5.0f J or %2.1f kJ",W,W/10^3);
|