CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

start-up flow poiseuille w/finite difference

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   October 12, 2010, 14:23
Default start-up flow poiseuille w/finite difference
New Member
Join Date: Oct 2010
Posts: 1
Rep Power: 0
piper10 is on a distinguished road
I'd appreciate if someone with matlab knowledge could help me.
I'm trying to solve the above mentioned pde in matlab.

I have the following 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 velocityN 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:

Same with the initial condition say a constant 10 atm/cm is applied at t=0


Last edited by piper10; October 12, 2010 at 14:40.
piper10 is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flow meter Design CD adapco Group Marketing Siemens 3 June 21, 2011 08:33
Boundary condition and Poiseuille flow simulation Cyp OpenFOAM 6 March 11, 2011 15:53
Difference between microflows and normal flow MARK Main CFD Forum 3 March 30, 2008 13:35
Difference between thermal and flow analysis Ajmal FLUENT 0 December 8, 2007 09:03
Basic Poiseuille flow simulation question Ashish Main CFD Forum 0 October 2, 2007 13:05

All times are GMT -4. The time now is 09:26.