CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

simplified nse in cynlinderic coordinates (matlab)

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2014, 13:57
Default simplified nse in cynlinderic coordinates (matlab)
  #1
New Member
 
Join Date: Aug 2014
Posts: 3
Rep Power: 11
mrxD is on a distinguished road
hey.
my problem is
\frac{\partial u}{\partial t} =  \frac{\eta}{\rho} \frac{\partial u}{\partial r}  \frac{1}{r} +  \frac{\partial^2 u}{\partial r^2}+f(P)
with
du(0)/dr =0
u(t=0)=0
u(r)=0

u should be a profile of flow (incompressible & laminar)

f(P) is a periodic impuls of pressure.

my problem is when r=0 , u should be max. but my programm doesnt do that.
i'm using finite difference. the discretization should be okay.

Quote:
function []=inststromzy(N,om,per)
format long
ro=820;
eta=0.002;
R=0.0005;
p0=10^6;
u=zeros(N+1,1);


uavg=0;
dr=R/N;
dt=om/100;
X=[0:dr:R];
epsi=eta*dt/ro;

d = 4*ones(N+1,1);
li= -2*ones(N+1,1);
re= -2*ones(N+1,1);
li= -dr./X' + li;
re= dr./X' + re;
li(1)=-2;
A=speye(N+1)+epsi/(2*dr^2)*spdiags([li d re],-1:1,N+1,N+1);
A(N+1,N)=0;
A(N+1,N+1)=1;


v=1;

t=0;

for i=1: per



t=0;


while t < om

v=v+1;
fv(1)=0;
fv(N+1)=0;
fv(2:N-1)=-p0/ro*(exp(-2000^2*(t-1/4*om).^2));


u=A\(u-dt*fv');



figure(1)

plot(X,u)

title(['t=',num2str(t)])
axis ([0 R 0 6])
pause(0.1);

t=t+dt;



end

end


end

it would be nice,if someone could help me

thanks.

Last edited by mrxD; September 15, 2014 at 15:29.
mrxD is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export/Import data contour plots with Matlab meangreen FLUENT 11 October 28, 2020 11:06
Lid driven flow in shallow rectangular domain issues, MATLAB new_at_this Main CFD Forum 0 November 10, 2011 21:41
[ICEM] Exporting Cartesian coordinates from ICEM to Matlab? user_of_cfx ANSYS Meshing & Geometry 0 October 17, 2011 11:17
Is it possible to solve simplified NSE? Harendra Main CFD Forum 1 August 6, 2005 23:36
Coordinate's tranformation tommy FLUENT 0 February 13, 2004 03:19


All times are GMT -4. The time now is 08:20.