|
[Sponsors] |
March 14, 2011, 09:55 |
Staggered Grid representation in code
|
#1 |
New Member
Join Date: Jan 2011
Posts: 3
Rep Power: 15 |
Hi all,
I want to use a Staggered grid for simulating a fluid flow. If I use a regular array structure(for instance float u[] in C/C++, etc.) I'm unable to represent the floating point coordinates such as (i+1)/2, (j+1)/2..., which are required for the velocities found on the cell faces. What is the correct way to handling these? Thanks in advance. Last edited by batabek; March 14, 2011 at 10:41. |
|
July 17, 2011, 08:08 |
RE
|
#2 |
New Member
Nathan
Join Date: Jun 2010
Posts: 1
Rep Power: 0 |
i think you should try more than one set of grid points, or you can use finer grids but allocate different physical values at different grid points. hope this will help.
|
|
July 17, 2011, 09:06 |
|
#3 |
Member
HouKen
Join Date: Jul 2011
Posts: 67
Rep Power: 14 |
just multiply them by 2...
|
|
July 17, 2011, 11:30 |
|
#4 |
New Member
Mazhar Iqbal
Join Date: Mar 2009
Posts: 10
Rep Power: 17 |
I believe you should use same grid numbering for the pressure and velocity. the only diffrence is that velocity calculations will start from grid point 2.
|
|
July 23, 2011, 20:08 |
|
#5 |
New Member
Vincent
Join Date: Jul 2011
Posts: 29
Rep Power: 14 |
It does not really matter too much how you denote your locations, however you yourself should understand it.
I would make all the matrices with the same kind of numbering. So U(i,j) would be the x-dir velocity to the right of my pressure cell P (i,j) and V(i,j) my y-dir velocity above the Pcell. If you include BCs into the problem your total matrices would have a size: P(nx+2,ny+2) with nx*ny interior points V(nx+2,ny+1) with nx-1*ny '' U(nx+1,ny+2) with nx*ny-1 '' |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can i apply staggered grid method in circular domain? | heisenbergg | Main CFD Forum | 1 | April 1, 2010 18:05 |
Parallel FVM on staggered grid | ertan | Main CFD Forum | 2 | November 5, 2009 12:25 |
To avoid Grid generation for FORTRAN CFD CODE | Stephen | Main CFD Forum | 4 | January 30, 2006 04:04 |
code for turbulent non-orthogonal curvilinear grid | Abhi | Main CFD Forum | 0 | October 18, 2002 09:58 |
Open source CFD code development, possible? | Dr. Yazid Bindar | Main CFD Forum | 27 | July 18, 2000 01:18 |