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

Staggered Grid representation in code

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 14, 2011, 09:55
Default Staggered Grid representation in code
  #1
New Member
 
Join Date: Jan 2011
Posts: 3
Rep Power: 15
batabek is on a distinguished road
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

Old   July 17, 2011, 08:08
Default RE
  #2
New Member
 
Nathan
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, 09:06
Default
  #3
Member
 
HouKen
Join Date: Jul 2011
Posts: 67
Rep Power: 14
houkensjtu is on a distinguished road
just multiply them by 2...
houkensjtu is offline   Reply With Quote

Old   July 17, 2011, 11:30
Default
  #4
New Member
 
Mazhar Iqbal
Join Date: Mar 2009
Posts: 10
Rep Power: 17
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, 20:08
Default
  #5
New Member
 
Vincent
Join Date: Jul 2011
Posts: 29
Rep Power: 14
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

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
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


All times are GMT -4. The time now is 21:10.