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

Data Structures - 2D FVM Euler Eqn Solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 30, 2006, 14:10
Default Data Structures - 2D FVM Euler Eqn Solver
  #1
Scott
Guest
 
Posts: n/a
I am having trouble implementing a 2D cell-centered FVM Euler solver. I have a triangular grid for the NACA0012 airfoil, and I'm programming in C. I have separated the variables so the time derivative and spatial derivative are on opposite sides of the equation, then I'll use Runge-Kutta to iterate to the steady state solution. I think I've figured out the boundary conditions, but I can't wrap my head around calculating fluxes across internal edges.

My problem comes after I have read in the vertex coordinates and connectivity. I know how to determine cell neighbors, but how do I associate particular edges with the corresponding pair of neighboring cells?

Any help and suggestions would be greatly appreciated.

Scott
  Reply With Quote

Old   March 30, 2006, 15:09
Default Re: Data Structures - 2D FVM Euler Eqn Solver
  #2
Simon
Guest
 
Posts: n/a
Contruct an array with nedges x 4 and for each edge include:

right cell point 1 point 2 left cell C1 P1 P2 C2

I hope this is what you mean.

There are several other data structures widely used in CFD, this ref. might help:

R. Lohner: "Applied CFD Techniques"
  Reply With Quote

Old   March 30, 2006, 15:24
Default Re: Data Structures - 2D FVM Euler Eqn Solver
  #3
Scott
Guest
 
Posts: n/a
Haha! That's my professor! I'll let him know his book was recommended.

Is this what you mean...? "Right cell" and "left cell" are the indices in an array of cells. Points are indices in an array of points.

Vielen dank!

  Reply With Quote

Old   March 31, 2006, 07:09
Default Re: Data Structures - 2D FVM Euler Eqn Solver
  #4
Simon
Guest
 
Posts: n/a
That's right. You end up with 3 arrays, one with point coordinates, one with connectivity for each edge and another for the cell centres.

But if you're working with Prof. Lohner... he has written the book(s) on this stuff!!! There other types of data structures, focusing on cells instead of edges for example; you should find the one more suitable for the algorithm you're using, and it looks like you have all the help you'll need in your school!
  Reply With Quote

Reply


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
Open Source Euler - NS Solver ? Mickaël PERRIN Main CFD Forum 2 June 24, 2003 13:46
solver for Poisson eqn billboard Main CFD Forum 3 May 22, 2002 01:07
unstructured mesh data structure for FVM J. Kim Main CFD Forum 3 February 17, 2002 03:43
Matlab Unsteady 1D Euler Solver??? Johan Sylwander Main CFD Forum 1 May 24, 2000 16:26
Validation of axisymmetric Euler solver Fernando Velasco Hurtado Main CFD Forum 3 December 19, 1999 19:59


All times are GMT -4. The time now is 18:03.