CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Diffusion term: L. Davidson, H.Jasak, M.Peric (http://www.cfd-online.com/Forums/main/15359-diffusion-term-l-davidson-h-jasak-m-peric.html)

Michail June 30, 2008 13:30

Diffusion term: L. Davidson, H.Jasak, M.Peric
 
Dear colleagues

I am writing code for solving general transport equation by finite-volume method on non-orthogonal grids

I have difficulties with discretisation of the diffusion term on non-orthogonal grids.

I have the following literature

1) M.Peric "Computational methods for fluid dynamics"

2) Doctor of Philosophy thesis by Hrvoje Jasak

3) Calc-BFC description by Lars Davidson http://www.tfd.chalmers.se/~lada/allpaper.html

4) Numerical Methods in Heat, Mass, and Momentum Transfer by Jayathi Y. Murthy

5) Darwish, Marwan (2003), "CFD Course Notes", Notes, American University of Beirut. http://webfea-lb.fea.aub.edu.lb/CFD/presentations.htm

But I still unable to understand how to fix diffusion term on non-orthogonal grids.

-------------------------

I fixed only orthogonal part - all is clear with it. But how to implement non-orthogonal part - all treated it differently.

I shall be very grateful for any comments and suggestions

Hrvoje Jasak June 30, 2008 15:44

Re: Diffusion term: L. Davidson, H.Jasak, M.Peric
 
What seems to be the problem:

1) on each finite volume face, make matrix coefficients using:

mag(face_area)*gamma_face*(phi_N - phi_P)/distance.

Thus, to che central coefficient add:

-mag(face_area)*gamma_face/distance

and to the off-diagonal coefficient add:

mag(face_area)*gamma_face/distance

For non-orthogonal correction, interpolate grad(phi) on the face and calculate non-orthogonal correction. This will be the bit that you did not put into the matrix:

face_area dot grad(phi)_face - mag(face_area)*gamma_face*(phi_N - phi_P)/distance

This goes into the right-hand side... and you are done!

Got it?

Hrv

Michail June 30, 2008 16:25

Re: Diffusion term: L. Davidson, H.Jasak, M.Peric
 
Dear Hrvoje

Thank You very much for Your responce

But I am still a bit confused

How to implement "face_area dot grad(phi)_face" in program?

should I derive face_area and grad(phi)_face as cartesian projections and then put it into the sourse term?

I would like to get something like that (for 2D structured grid, east face):

Koeff_eta (phi_en - phi_es) where phi_en = 1/4(phi_N+phi_E+phi_P+phi_NE) and phi_es = = 1/4(phi_S+phi_E+phi_P+phi_SE)

then I'll put the appropriate parts of coefficint into the central, east, and source terms

Excuse me for such non-math thinking.

I completely lost myself in covariant and contrvariant components, because of white spots in my education.

Thanks in advance, Michail


diffusion term July 1, 2008 02:59

Re: Diffusion term: L. Davidson, H.Jasak, M.Peric
 
have a look at the wiki page at cfd-online , that also summerise what jasak said.

Michail July 1, 2008 05:43

Re: Diffusion term: L. Davidson, H.Jasak, M.Peric
 
I looked there.

The question is:

How to express this in cartesian coordinates?

Non-orthogonal part.

John July 1, 2008 09:32

Re: Diffusion term: L. Davidson, H.Jasak, M.Peric
 
I recommned to look at Mikhail Shashkov's publication on this subject, there u find a very fine method in particular dealing with highly irregular (non-orthogonal) grid, and particularly hex/quad grid.

URL: http://cnls.lanl.gov/~shashkov/

e.g.: http://cnls.lanl.gov/~shashkov/papers/brezzi_07.pdf

http://cnls.lanl.gov/~shashkov/paper...monotoneFV.pdf

http://cnls.lanl.gov/~shashkov/papers/mixed_cells.pdf

...

good luck

diffusion term July 1, 2008 19:48

Re: Diffusion term: L. Davidson, H.Jasak, M.Peric
 
if you use the vector notation things will be okey. Further since it is cartesian mesh , the non ortho term shall be zero.

Michail July 2, 2008 06:04

Re: Diffusion term: L. Davidson, H.Jasak, M.Peric
 
The problem is that I use non-orthogonal grid and cartesian components of coordinates and velocities.

The grid is non-orthogonal

And I don't know how derive this from vector notation

Hrvoje Jasak July 2, 2008 08:06

Re: Diffusion term: L. Davidson, H.Jasak, M.Peric
 
Forget about local coordinates. Express face normal as a global Cartesian (x y z) vector, do the same with the gradient and do a dot-product in global Cartesian coordinates.

I promise, this is not too hard. You just got confused by some side-issue.

Hrv

Michail July 2, 2008 14:03

Re: Diffusion term: L. Davidson, H.Jasak, M.Peric
 
Thank You, I'll try...

diffusion term July 2, 2008 21:54

Re: Diffusion term: L. Davidson, H.Jasak, M.Peric
 
its really easy:

you have cell centers on either side of a control volume face. (x0, y0, z0) and (x1, y1, z1)

then you have face center like fx fy fz, and then there is one more thing, which area vector of the face Ax Ay Az.

Then just look at the formula given in wiki page, construct the relevent vectors. Add the diagonal and off diagonal contributions to their respective places. Add the nonortho correction to source. And you are ready to go.



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