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

Data Structure for the unstructured finite volume method

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 2, 1999, 00:56
Default Data Structure for the unstructured finite volume method
  #1
Anthony
Guest
 
Posts: n/a
Hi ! I am working for developing an unstrucutred collocated cell-center finite volume code. I know that an edge-based data structure for the edges connectivity information is necessary. I wonder that if it is necessary for an additional cell-based data strucuture for the cells topology ? Also, the edge-based loop is used to accumulate the contribution of fluxes for each cells, but how can i assign the calculated corresponding coefficients to the two adjacent cells sharing the same edge via such a data strucuture ?

Does any one out there know how to do this ? your any suggestion will be appreciated. Many thanks!

  Reply With Quote

Old   February 2, 1999, 08:07
Default Re: Data Structure for the unstructured finite volume method
  #2
Jeff Franklin
Guest
 
Posts: n/a
One method would be to include the neighbor cell indexs for each cell face. Then when you loop over faces to determine fluxes the neighbor index can be used for loading/solving the linear system.
  Reply With Quote

Old   February 2, 1999, 16:03
Default Re: Data Structure for the unstructured finite volume method
  #3
R.Krishnakumar
Guest
 
Posts: n/a
Why don't you try using object-oriented methods. You can define three classes... 1) Point : containing three floating point datas... and the member functions to do the necessary actions. 2) Surface : ( or edge for 2d) containing a set of points forming the surface. The order of the points might be quite important here for calculating inward and outward normals. 3) Cells : Consists of surfaces forming the boundary of the cells... the order might be important here too.

At first sight, these might look very inefficient in terms of the memory storage, though the hierachy looks very elegant indeed. But then, when you do calculations for actual memory utilised by this and the adjacency matrix type of data structure, it actually seems to save memory for large no of points. But you will most probably be working in fortran, but I do think that the representations like the one above can be quite elegant and powerful.
  Reply With Quote

Old   February 2, 1999, 17:58
Default Re: Data Structure for the unstructured finite volume method
  #4
Jeff Franklin
Guest
 
Posts: n/a
Object-oriented methods do lend themselves to this type of problem. But as you have said one must be careful what is placed in a class and what is just stored in memory. Classes have additional addressing for values in the structure and if it is bearied too deep this addressing may become an issue. Also one must be carefull about virtual functions. They also have addressing to them because the address of these functions are not known until the program is run rather than when it is compiled.

I suggest using at least C for the coding of this type of software if not C++.
  Reply With Quote

Old   February 2, 1999, 20:24
Default Re: Data Structure for the unstructured finite volume method
  #5
Anthony Yang
Guest
 
Posts: n/a
Thanks a lot, Jeff and Mr.Krishnakumar Acutally, I am coding in C with Fortran style. But I think that the implementation of Struct or even Classes is a good idea in developing such a code. As has been discussed, what kind of information is to be included in the Struct or Classes is a key point. In addition, in my opinion, how many Structs or Classes(e.g. individual data structures for geometry or solver)are needed may be also an issue to be addressed.
  Reply With Quote

Reply

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
finite volume method - lid driven cavity ainal Main CFD Forum 0 May 15, 2011 11:06
BlockMesh FOAM warning gaottino OpenFOAM Native Meshers: blockMesh 7 July 19, 2010 14:11
Comparison: Finite Volume Method vs. Analytic Method m-fry Main CFD Forum 1 April 20, 2010 14:40
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00
Finite volume method vs finite difference method? superfool Main CFD Forum 4 October 21, 2006 14:37


All times are GMT -4. The time now is 09:06.