# Staggered Grid representation in code

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

 March 14, 2011, 09:55 Staggered Grid representation in code #1 New Member   Join Date: Jan 2011 Posts: 3 Rep Power: 7 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, 07: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, 08:06 #3 Member   HouKen Join Date: Jul 2011 Posts: 66 Rep Power: 7 just multiply them by 2...

 July 17, 2011, 10:30 #4 New Member   Mazhar Iqbal Join Date: Mar 2009 Posts: 10 Rep Power: 9 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, 19:08 #5 New Member   Vincent Join Date: Jul 2011 Posts: 29 Rep Power: 7 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 Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post heisenbergg Main CFD Forum 1 April 1, 2010 17:05 ertan Main CFD Forum 2 November 5, 2009 12:25 Stephen Main CFD Forum 4 January 30, 2006 04:04 Abhi Main CFD Forum 0 October 18, 2002 08:58 Dr. Yazid Bindar Main CFD Forum 27 July 18, 2000 00:18

All times are GMT -4. The time now is 05:40.