CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Coordinate transforms and finite volumes (http://www.cfd-online.com/Forums/main/2578-coordinate-transforms-finite-volumes.html)

 Tony Keating September 7, 2000 17:50

Coordinate transforms and finite volumes

I'm current working on a code to solve the Navier-Stokes equation for predicting fluid flow. To implement stretched grids, I'm trying to work out how to use coordinate transforms. From texts, I can see how they work using finite difference methods, however I'm using control volumes. I've simplified things a little, but here's what I'm doing.

Say I have the following coordinate transformation

x~ = f(x)

the discrete intergrals I'm trying to evaluate are (say from the Navier-Stokes equation):

int_e^w ( d phi / d x ) Dx - (1)

int_e^w ( d^2 phi / d x^2 ) Dx - (2)

where d is the partial derivate and D is the full derivate. int_e_w is the integral from the east to the west face of the control volume. phi is just a variable.

The coordinate transform gives me the following partial derivates:

( d / d x ) = ( d x~ / d x ) ( d / d x~ )

Now, if I integrate eqn (1) I get:

phi |e - phi |w

and equation (2) I get:

( d phi / d x ) |e - ( d phi / d x ) |w

where |e means evaulated at the east face, |w at the west face. I haven't used the coordinate transform yet. If I now apply the coordinate transform to these two equations I get the following:

int_e^w ( d phi / d x ) Dx = phi |e - phi |w

int_e^w ( d^2 phi / d x^2 ) Dx = ( ( d x~ / d x ) ( d phi / d x~ ) ) |e

- ( ( d x~ / d x ) ( d phi / d x~ ) ) |w

Does this seem correct? I'm unsure if what I'm doing is correct? I believe I should be integrating over physical space do conserve continuity.

Thanks, Tony.

 frederic felten September 7, 2000 18:42

Re: Coordinate transforms and finite volumes

Hi,

I don't know if i'm really gonna help you there, but my advice is to check out the book: "Computational Methods for Fluid Dynamics", J.H. Ferziger and M. Peric Springer, 1996.

Check out especially chapter 8(about complex geometries).Section 8.5 should be of great interest for you. This book also give you the reference and an access to some CFD codes. One code is incompressible, curvlinear, FVM, collocated grid, using a SIMPLE like pressure correction.

I hope i could help, Sincerely,

Frederic Felten

 eddy September 7, 2000 20:55

Re: Coordinate transforms and finite volumes

I think it is correct. Personally, No matter intergrate from physical domain or computational domain, the results should be same.

One thing I am also not clear is that how to do interpolation at cell interface for convective iterm? If we choose linear interpolation, that is for computational or physical domain? Many papers use that for physical domain, that will make code more complicated and is that really accurate?

 A. Taurchini September 8, 2000 03:30

Re: Coordinate transforms and finite volumes

Maybe you simplified too much ... Is phi a variable of x (of course yes!) ? And moreover if dx is a partial derivative and Dx a total derivative you can't just simplify between them. I have two more questions for you. 1)Why are you using conservative form (integral form) of Navier-Stokes equations with a control volume discretization if you then want to solve a differential equation ? 2)If you need just a stretching don't you think it's a little bit expensive to apply a real coordinate transformation ?

 Sebastien Perron September 8, 2000 07:41

Re: Coordinate transforms and finite volumes

What kind of finite volume method do you use: 1) "Classical", with the unknowns located at the cednter of gravity of each cells and all variables are constant by element.(by your message west, east this is the metho you use I suppose) 2) "Galerkin type" : the unknowns are located on the vertex and you use shape fonctions (linear, bilinear etc)

1) As far as I know, if you're coordinate system is not orthogonal, the flux between two adjacent control volumes won't be perpendicular to the interface separating those volumes. Therefore, it won't be correcty evaluated. If your coordinate system is orthogonal everything seems OK. 2) If you use Galarkin type finite volume methods, just take a look in any book on finite elements methods, it is usually well explained.

 All times are GMT -4. The time now is 08:53.