Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Start-up Poiseuille Flow

Start-up Poiseuille Flow

Start-up Poiseuille Flow

I'm trying to solve start-up flow in a hollow cylinder with matlab and finite difference method. I'm still new in matlab and I have this code:

h = 1;
Dr = 0.01; Dt = 0.01;
nmax = 4000; epsilon = 0.0001;
r  = [0:Dr:h];
t = [0:Dt:h];
n1 = fix(h/Dr)+1;
m1 = fix(h/Dt)+1;
% Initialize solution matrices
velocity = zeros(n1,m1)
velocityN =velocity
% Iterative process for the solution
for k = 1:nmax
   % boundary conditions:
   velocityN(:,n1)        = zeros(n1,1);
   % Calculate psiN in interior points
   for i = 2:n1-1
      for j = 1:m1
         velocityN(i,j+1)= (beta*(1-(1/(2*i)))*velocity(i-1,j)+(1-2*beta)*velocity(i,j)+beta*(1+1/(2*i))*velocity(i+1,j));     
   % Check convergence
   nfail = 0;
   for i = 1:n1
      for j = 1:m1
         if abs(velocityN(i,j)-velocity(i,j))>epsilon
            nfail = nfail+1;
   if nfail > 0
      velocity = velocityN;
 fprintf('No convergence after %i iterations.',k);
[X,Y] = meshgrid(r,t);

however, for r=0 I have dv/dr=0 as the second boundary condition. How do I incorporate this into the program. dV/dr should be:


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close