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

Staggered Grid representation in code

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

LinkBack Thread Tools Display Modes
Old   March 14, 2011, 09:55
Default Staggered Grid representation in code
New Member
Join Date: Jan 2011
Posts: 3
Rep Power: 8
batabek is on a distinguished road
Sponsored Links
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.
batabek is offline   Reply With Quote
Sponsored Links

Old   July 17, 2011, 07:08
Default RE
New Member
Join Date: Jun 2010
Posts: 1
Rep Power: 0
nathand is on a distinguished road
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.
nathand is offline   Reply With Quote

Old   July 17, 2011, 08:06
Join Date: Jul 2011
Posts: 66
Rep Power: 8
houkensjtu is on a distinguished road
just multiply them by 2...
houkensjtu is offline   Reply With Quote

Old   July 17, 2011, 10:30
New Member
Mazhar Iqbal
Join Date: Mar 2009
Posts: 10
Rep Power: 10
mazhar is on a distinguished road
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.
mazhar is offline   Reply With Quote

Old   July 23, 2011, 19:08
New Member
Join Date: Jul 2011
Posts: 29
Rep Power: 8
VincentD is on a distinguished road
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 ''
VincentD 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
How can i apply staggered grid method in circular domain? heisenbergg Main CFD Forum 1 April 1, 2010 17: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 08:58
Open source CFD code development, possible? Dr. Yazid Bindar Main CFD Forum 27 July 18, 2000 00:18

Sponsored Links

All times are GMT -4. The time now is 22:32.