diff options
Diffstat (limited to '3819')
-rw-r--r-- | 3819/CH1/EX1.15/Ex1_15.sce | 19 | ||||
-rw-r--r-- | 3819/CH2/EX2.16/Ex2_16.sce | 8 | ||||
-rw-r--r-- | 3819/CH3/EX3.19/Ex3_19.sce | 28 | ||||
-rw-r--r-- | 3819/CH3/EX3.3/Ex3_3.sce | 23 | ||||
-rw-r--r-- | 3819/CH3/EX3.4/Ex3_4.sce | 4 |
5 files changed, 36 insertions, 46 deletions
diff --git a/3819/CH1/EX1.15/Ex1_15.sce b/3819/CH1/EX1.15/Ex1_15.sce index b813781a2..eb5cc0d90 100644 --- a/3819/CH1/EX1.15/Ex1_15.sce +++ b/3819/CH1/EX1.15/Ex1_15.sce @@ -7,12 +7,13 @@ dist=20/100
u_vertex=120/100
visc=8.5/10
-y=poly(0,"y")
-a=poly(0,"a")
-b=poly(0,"b")
-c=poly(0,"c")
-c=2
-a=2
-b-2
-u=a*y^2+b*y+c
-s=poly(0,'s')
+//Assuming u=a*y^2+b*y+c applying all three boundary conditions , we get the y vector and velocity vector as below;
+y_vector=[0 0 1;400 20 1;40 1 0]
+vel_vector=[0;-120;0]
+[constants]=linsolve(y_vector,vel_vector)
+//1) Velocity grdient =2ay+b
+//For y=0, 10, 20 cm
+y=[0,10,20]
+du_dy=2*constants(1)*y+constants(2);
+ss=visc*du_dy;
+printf("The shear stress at y=%d,%d,%d cm are %f,%f,and %fN/m^2",y(1),y(2),y(3),ss(1),ss(2),ss(3));
diff --git a/3819/CH2/EX2.16/Ex2_16.sce b/3819/CH2/EX2.16/Ex2_16.sce index fed514567..c310ce216 100644 --- a/3819/CH2/EX2.16/Ex2_16.sce +++ b/3819/CH2/EX2.16/Ex2_16.sce @@ -12,12 +12,10 @@ dens2=sg2*1000 //calculations
pA=1*10^4*g
pB=1.8*10^4*g
-//pressure above X-X in left limb is;
-p_left=13.6*1000*g*h+dens1*g*(2+3)+pA
-p_right=dens2*g*(h+2)+pB
+//pressure above X-X in left limb is p_left=13.6*1000*g*h+dens1*g*(2+3)+pA and p_right=dens2*g*(h+2)+p
function [f]=F(h)
f=13.6*1000*g*h+dens1*g*(2+3)+pA-(dens2*g*(h+2)+pB)
endfunction
-h=10;
-h=fsolve(h,F)
+h0=10;
+h=fsolve(h0,F)
mprintf("\nTHE DIFFERENCE IN MERCURY LEVELS IS %f cm\n",h*100)
diff --git a/3819/CH3/EX3.19/Ex3_19.sce b/3819/CH3/EX3.19/Ex3_19.sce index 790f78ed9..1fd7b5dd8 100644 --- a/3819/CH3/EX3.19/Ex3_19.sce +++ b/3819/CH3/EX3.19/Ex3_19.sce @@ -1,24 +1,22 @@ // A Textbook of Fluid Mecahnics and Hydraulic Machines - By R K Bansal
// Chapter 3-Hydrostatic Forces on surfaces
// Problem 3.19
-
//Data given in the Problem
-theta=60
-AC=h/sin(theta*%pi/180)
-s=sin(theta/180*%pi)
-h=poly(0,"h")
-H=h/2
-b=1
-d=AC
-A=AC
-IG=b*d^3/12
+theta=60;
+s=sin(theta/180*%pi);
+hh=poly(0,"hh");
+AC=hh/s;
+H=hh/2;
+b=1;
+d=AC;
+IG=b*d^3/12;
//COP=(IG/(A*H)+H)
//COP=(h/sin(theta/180*%pi)^3/12/(h/sin(theta*%pi/180)/(h/2)+h/2
//We know that COP is equal to (h-3),THAT IS ,the depth of centre of pressure
//hence
-function f=F(h)
-f=((h/s)^3/12*s^2/(h/s*h/2))+(h/2)-(h-3);
+function f=F(hh)
+f=((hh/s)^3/12*s^2/(hh/s*hh/2))+(hh/2)-(hh-3);
endfunction
-h=100;
-y=fsolve(h,F)
-mprintf("The height of wahter for tipping the gate is %f m",y)
+hh=100;
+y=fsolve(hh,F);
+mprintf("The height of water for tipping the gate is %f m",y)
diff --git a/3819/CH3/EX3.3/Ex3_3.sce b/3819/CH3/EX3.3/Ex3_3.sce index 77c07a745..1828a98fa 100644 --- a/3819/CH3/EX3.3/Ex3_3.sce +++ b/3819/CH3/EX3.3/Ex3_3.sce @@ -3,19 +3,12 @@ // Problem 3.3
//Data given in the Problem
-//d=depth
-//d=width
-//Centroid is 'p' metres below
-b=poly(0,"b")
-d=poly(0,"d")
-p=poly(0,"p")
+//depth of gate=d m
+//width of gate=b m
+//depth of CG from surface=p m
-//Proof
-h=p //Depth of COP from the surface
-I_G=horner(b,d)
-I_G=b*d^2/12
-A=horner(b,d)
-A=b*d //Area
-H=horner(I_G,A,h))
-H=I_G/(A*h)+h //H is the depth of the centre of the pressure from the free surface
-mprintf("The depth of the COP from free surface is found to be %p",H)
+//solution:
+//Depth of COP from free surface=(I/(A*h_CG))+h_gate
+//Since I=(b*d^3)/12;
+//h_COP=(b*d^3/12/b/d/p)+p=d^2/12+p
+disp("The depth of centre of pressure from free surface is (d^2/12)+p ")
diff --git a/3819/CH3/EX3.4/Ex3_4.sce b/3819/CH3/EX3.4/Ex3_4.sce index 63fc40385..e2f7a0b8a 100644 --- a/3819/CH3/EX3.4/Ex3_4.sce +++ b/3819/CH3/EX3.4/Ex3_4.sce @@ -7,11 +7,11 @@ d=3 A=%pi*d^2/4
h=4
g=9.81
-
+dens=1000
//Calculations
//1)Force on disc
F=dens*g*A*h
-mprintf("The force on the disc is %f kN\n",10^-3*F)
+mprintf("The Force on the disc is %f kN\n",10^-3*F)
//2)Torque required
IG=%pi/64*d^4
|