44 Computational Modelling in Hydraulic and Coastal Engineering
un1(k1)=u1(k1)+(v*Dt/
(Dz^2))*(u1(k1+1)-2*u1(k1)+u1(k1-1));
un2(k1)=u2(k1)+(v*Dt/
(Dz^2))*(u2(k1+1)-2*u2(k1)+u2(k1-1));
un3(k1)=u3(k1)+(v1*Dt/
(Dz^2))*(u3(k1+1)-2*u3(k1)+u3(k1-1));
% Renewal of the velocity values;
u1(k1)=un1(k1);
u2(k1)=un2(k1);
u3(k1)=un3(k1);
end
% Calculation of the shear stresses;
ss1=((u1(1)-u1(2))/Dz)*v;
tau1(k)=ss1;
ss2=((u2(1)-u2(2))/Dz)*v;
tau2(k)=ss2;
ss3=((u3(1)-u3(2))/Dz)*v1;
tau3(k)=ss3;
end
plot(1:tm,tau1,'r','Linewidth',1.5)
hold on
plot(1:tm,tau2,'g','Linewidth',1.5)
plot(1:tm,tau3,'b','Linewidth',1.5)
xlabel('Time steps'), ylabel('Shear stress along the
oscillating plate [(cm/s)^2]')
axis([0, 5000, -0.049, 0.035])
legend('tau1:T=500s,v=0.01cm^2/s','tau2:T=1000s,v=0.01cm^2/
s','tau3:T=500s,v=0.1cm^2/s',3)
PROBLEM 3.2
Solve the same problem by making the following suggested changes while
keeping the rest of the data constant:
1. Calculate and plot the variation of the shear stresses halfway between
the two plates.
2. Calculate and plot the velocity distribution for every 100 time steps
starting at time of 3000 and ending at time 4000 time steps. Use v =
0.1 cm 2 /s and T = 500 s.
3. Assuming a non-Newtonian fluid τ
*
=

 

 
ε
du
dz
2
, calculate the shear
stress adjacent to the oscillating plate. Use ε = 0.1 and T = 500 s. Plot
the results.
4. Calculate and plot the shear stress adjacent to the lower plate if the
upper plate is oscillating in-phase with the lower plate but with half of
its velocity. Use for the lower plate U = 1 cm/s and also v = 0.05 cm 2 /s
and T = 500 s.
Précédent

- 57/302

Suivant