diff options
Diffstat (limited to '3819/CH1/EX1.15/Ex1_15.sce')
-rw-r--r-- | 3819/CH1/EX1.15/Ex1_15.sce | 19 |
1 files changed, 10 insertions, 9 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));
|