# Diffusion term: L. Davidson, H.Jasak, M.Peric

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

 June 30, 2008, 14:30 Diffusion term: L. Davidson, H.Jasak, M.Peric #1 Michail Guest   Posts: n/a 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

 June 30, 2008, 16:44 Re: Diffusion term: L. Davidson, H.Jasak, M.Peric #2 Hrvoje Jasak Guest   Posts: n/a 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

 June 30, 2008, 17:25 Re: Diffusion term: L. Davidson, H.Jasak, M.Peric #3 Michail Guest   Posts: n/a 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

 July 1, 2008, 03:59 Re: Diffusion term: L. Davidson, H.Jasak, M.Peric #4 diffusion term Guest   Posts: n/a have a look at the wiki page at cfd-online , that also summerise what jasak said.

 July 1, 2008, 06:43 Re: Diffusion term: L. Davidson, H.Jasak, M.Peric #5 Michail Guest   Posts: n/a I looked there. The question is: How to express this in cartesian coordinates? Non-orthogonal part.

 July 1, 2008, 10:32 Re: Diffusion term: L. Davidson, H.Jasak, M.Peric #6 John Guest   Posts: n/a 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

 July 1, 2008, 20:48 Re: Diffusion term: L. Davidson, H.Jasak, M.Peric #7 diffusion term Guest   Posts: n/a if you use the vector notation things will be okey. Further since it is cartesian mesh , the non ortho term shall be zero.

 July 2, 2008, 07:04 Re: Diffusion term: L. Davidson, H.Jasak, M.Peric #8 Michail Guest   Posts: n/a 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

 July 2, 2008, 09:06 Re: Diffusion term: L. Davidson, H.Jasak, M.Peric #9 Hrvoje Jasak Guest   Posts: n/a 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

 July 2, 2008, 15:03 Re: Diffusion term: L. Davidson, H.Jasak, M.Peric #10 Michail Guest   Posts: n/a Thank You, I'll try...

 July 2, 2008, 22:54 Re: Diffusion term: L. Davidson, H.Jasak, M.Peric #11 diffusion term Guest   Posts: n/a 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.