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

Unsteady flow code - Problem with space loop

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   August 8, 2011, 09:25
Default Unsteady flow code - Problem with space loop
  #1
Senior Member
 
Join Date: Jun 2010
Posts: 111
Rep Power: 15
Hooman is on a distinguished road
Hi all,
I have discretized my equations in a way that for example the velocity depends on the velocity of the previous neighboring element so:

h = number of elements
t = 0: 0.5 : 10
for j= 1 : length(t)
for i = 2: h
v(i,j) = v(i-1,j) + b
p(i,j) = p(i,j) +b
end
end


This is not my actual formulations(codes) but the idea is that I need the value of the variable at the previous element so I start my loop from 2 to avoid getting i=0. But then this means that I don't have any values when I have i = 1 in the code. Is the only way to deal with this using boundary conditions. For example setting the value of the variable at i = 1 to be equal to that at i =2 ?

I hope I am clear enough.

Thanks.
Hooman is offline   Reply With Quote

 


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
Boundary condition problem for open channel flow Andy CFX 9 June 11, 2016 07:20
NACA0012 geometry/design software needed Franny Main CFD Forum 13 July 7, 2007 15:57
Problem on boundry of two phase flow youngan CFX 0 June 30, 2003 02:32
problem with using colocated code Jack Main CFD Forum 0 December 15, 2002 00:15
Poiseuille flow problem Rosie FLUENT 1 December 6, 2002 16:52


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