Diffusion term: L. Davidson, H.Jasak, M.Peric
Dear colleagues
I am writing code for solving general transport equation by finitevolume method on nonorthogonal grids I have difficulties with discretisation of the diffusion term on nonorthogonal grids. I have the following literature 1) M.Peric "Computational methods for fluid dynamics" 2) Doctor of Philosophy thesis by Hrvoje Jasak 3) CalcBFC 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://webfealb.fea.aub.edu.lb/CFD/presentations.htm But I still unable to understand how to fix diffusion term on nonorthogonal grids.  I fixed only orthogonal part  all is clear with it. But how to implement nonorthogonal part  all treated it differently. I shall be very grateful for any comments and suggestions 
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 offdiagonal coefficient add: mag(face_area)*gamma_face/distance For nonorthogonal correction, interpolate grad(phi) on the face and calculate nonorthogonal 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 righthand side... and you are done! Got it? Hrv 
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 nonmath thinking. I completely lost myself in covariant and contrvariant components, because of white spots in my education. Thanks in advance, Michail 
Re: Diffusion term: L. Davidson, H.Jasak, M.Peric
have a look at the wiki page at cfdonline , that also summerise what jasak said.

Re: Diffusion term: L. Davidson, H.Jasak, M.Peric
I looked there.
The question is: How to express this in cartesian coordinates? Nonorthogonal part. 
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 (nonorthogonal) 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 
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.

Re: Diffusion term: L. Davidson, H.Jasak, M.Peric
The problem is that I use nonorthogonal grid and cartesian components of coordinates and velocities.
The grid is nonorthogonal And I don't know how derive this from vector notation 
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 dotproduct in global Cartesian coordinates.
I promise, this is not too hard. You just got confused by some sideissue. Hrv 
Re: Diffusion term: L. Davidson, H.Jasak, M.Peric
Thank You, I'll try...

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 21:46. 