|
[Sponsors] |
August 8, 2011, 09:25 |
Unsteady flow code - Problem with space loop
|
#1 |
Senior Member
Join Date: Jun 2010
Posts: 111
Rep Power: 15 |
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. |
|
|
|
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 |