summaryrefslogtreecommitdiff
path: root/3785/CH2
diff options
context:
space:
mode:
Diffstat (limited to '3785/CH2')
-rw-r--r--3785/CH2/EX2.1/Ex2_1.sce13
-rw-r--r--3785/CH2/EX2.10/Ex2_10.sce10
-rw-r--r--3785/CH2/EX2.3/Ex2_3.sce16
-rw-r--r--3785/CH2/EX2.7/Ex2_7.sce12
-rw-r--r--3785/CH2/EX2.8/Ex2_8.sce15
-rw-r--r--3785/CH2/EX2.9/Ex2_9.sce18
6 files changed, 84 insertions, 0 deletions
diff --git a/3785/CH2/EX2.1/Ex2_1.sce b/3785/CH2/EX2.1/Ex2_1.sce
new file mode 100644
index 000000000..1f3772062
--- /dev/null
+++ b/3785/CH2/EX2.1/Ex2_1.sce
@@ -0,0 +1,13 @@
+// Example 2_1
+clc;funcprot(0);
+// Given data
+p_0=1.0133*10^5;// The sea level pressure in Pa
+alpha=1.2*10^-4;// m^-1
+
+// Calculation
+z=0;// km
+minusdelp=alpha*p_0*exp(-alpha*z);// The pressure force per unit volume in N/m^3
+printf("\nAt z=0,The pressure force per unit volume -delp=(%0.2f N/m^3)i_z",minusdelp);
+z=5;// km
+minusdelp=alpha*p_0*exp(-alpha*z*10^3);// The pressure force per unit volume in N/m^3
+printf("\nAt z=5,The pressure force per unit volume -delp=(%0.3f N/m^3)i_z",minusdelp);
diff --git a/3785/CH2/EX2.10/Ex2_10.sce b/3785/CH2/EX2.10/Ex2_10.sce
new file mode 100644
index 000000000..54a5602bc
--- /dev/null
+++ b/3785/CH2/EX2.10/Ex2_10.sce
@@ -0,0 +1,10 @@
+// Example 2_10
+clc;funcprot(0);
+// Given data
+rho_w=1*10^3;// The density of water in kg/m^3
+r=7.3*10^-2;// The air/water interfacial tension in N/m
+g=9.8066;// The acceleration due to gravity in m/s^2
+
+// Calculation
+d=sqrt((6*r)/(rho_w*g))*10^3;// The approximate maximum diameter d of a bubble of air in water in mm
+printf("\nThe approximate maximum diameter d of a bubble of air in water is %1.1f m",d);
diff --git a/3785/CH2/EX2.3/Ex2_3.sce b/3785/CH2/EX2.3/Ex2_3.sce
new file mode 100644
index 000000000..83aa1c965
--- /dev/null
+++ b/3785/CH2/EX2.3/Ex2_3.sce
@@ -0,0 +1,16 @@
+// Example 2_3
+clc;funcprot(0);
+// Given data
+D=1;// The diameter of a circular flat plate in m
+h=3;// Distance in m
+theta=45;// Angle in degrees
+rho=1*10^3;// The density of water in kg/m^3
+g=9.807;// The acceleration due to gravity in m/s^2
+
+// Calculation
+p_c=rho*g*h;// The gage pressure at the plate centroid in Pa
+A=(%pi*D^2)/4;// Area in m^2
+F=p_c*A;// The total force exerted on the plate by the water in N
+printf("\nThe total force exerted on the plate by the water,F=%1.3e N",F);
+y_cp=-(rho*g*D^2)/(16*sqrt(2)*p_c);// The distance between the center of pressure cp and the centroid of the circular plate in m
+printf("\nThe distance between the center of pressure cp and the centroid of the circular plate,y_cp=%1.3e m",y_cp);
diff --git a/3785/CH2/EX2.7/Ex2_7.sce b/3785/CH2/EX2.7/Ex2_7.sce
new file mode 100644
index 000000000..5c4a9e20b
--- /dev/null
+++ b/3785/CH2/EX2.7/Ex2_7.sce
@@ -0,0 +1,12 @@
+// Example 2_7
+clc;funcprot(0);
+// Given data
+//The block has a width W, a height H and a specific gravity SG.
+// GM=0;
+
+//Solution
+SG=(3-sqrt(3))/6;
+printf("\nSG<=%0.4f",SG)
+SG=(3+sqrt(3))/6;
+printf("\nSG>=%0.4f",SG)
+printf("\nIce cubes and styrofoam cubes will float upright, but not soap cubes !");
diff --git a/3785/CH2/EX2.8/Ex2_8.sce b/3785/CH2/EX2.8/Ex2_8.sce
new file mode 100644
index 000000000..e992c6e45
--- /dev/null
+++ b/3785/CH2/EX2.8/Ex2_8.sce
@@ -0,0 +1,15 @@
+// Example 2_8
+clc;funcprot(0);
+// Given data
+d=3;// The internal diameter of a horizontal cylindrical fuel oil storage tank in m
+SG=0.87;// Specific gravity of water oil
+t=0.2;// Thickness in m
+z_0=0;// The initial height in m
+z_1=-1.3;// The height of the water-oil interface in m
+z_2=-1.5;// The height of the bottom of the tank in m
+rho_w=1*10^3;// The density of water in kg/m^3
+g=9.807;// The acceleration due to gravity in m/s^2
+
+// Calculation
+p_bminusp_0=rho_w*-g*((SG*(z_1-z_0))+(z_2-z_1));// The gage pressure at the bottom of the tank in Pa
+printf("The gage pressure at the bottom of the tank is %0.4e Pa",p_bminusp_0); \ No newline at end of file
diff --git a/3785/CH2/EX2.9/Ex2_9.sce b/3785/CH2/EX2.9/Ex2_9.sce
new file mode 100644
index 000000000..fa92c6172
--- /dev/null
+++ b/3785/CH2/EX2.9/Ex2_9.sce
@@ -0,0 +1,18 @@
+// Example 2_9
+clc;funcprot(0);
+// Given data
+// From table 2.1
+z=5;// Altitude in km
+z_i=0;// The initial height in km
+dTbydz=-6.5;// The temperature gradient from 0 to 5 km in K/km
+T_i=288.15;// Temperature in K
+p_i=1.0133*10^5;// Pressure in Pa
+R=287;// Gas constant in J/kg.K
+
+//Calculation
+// Using equation 2.41,
+T=T_i+((dTbydz)*(z-z_i));// Temperature in K
+// Using equation 2.42,
+p=p_i*(T/T_i)^(-1/((dTbydz*10^-3)*29.26));// The pressure in Pa
+rho=p/(R*T);// The density in kg/m^3
+printf("\nT=%0.1f K \np=%1.4e Pa \nrho=%0.4f kg/m^3",T,p,rho);