# Cell-centered and Face-centered values

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

 July 7, 2005, 01:29 Cell-centered and Face-centered values #1 coolblizz Guest   Posts: n/a Hi.... I am working on a flow problem using FVM on non-orthogonal grids. I need to extrapolate the cell-centered values to the face-center of the computational cell. For the extrapolation, I add the scalar product of the cell-centered gradient and the distance between the face-center and cell-center, to the cell-centered value. The cell-centered gradient is calculated using the Gauss Theorem. My problem is, the Gauss Theorem requires the face-centered values to be first available in order to calculate the gradient. Can anyone please help me with this dilemma? Thank you so much.

 July 7, 2005, 05:26 Re: Cell-centered and Face-centered values #2 ramp Guest   Posts: n/a You might find your solution in the folowing book: Computational Methods For Fluid Dynamics by Ferziger, J. H. & Peric,M.

 July 7, 2005, 11:08 Re: Cell-centered and Face-centered values #3 O. Guest   Posts: n/a use a least squares approach to compute your gradients

 July 7, 2005, 12:45 Re: Cell-centered and Face-centered values #4 Mani Guest   Posts: n/a Why do you need extrapolation? Interpolation between neighboring cells is not an option? Your dilemma stems from a lack of information. If you have only cell centered values available, you need to make use of information from neighboring cells.

 July 8, 2005, 00:16 Re: Cell-centered and Face-centered values #5 coolblizz Guest   Posts: n/a Hi.... Thank your so much for your response. Ramp, I have gone through that book by Peric before, but it only describes how to calculate for the cell-centered gradients. My problem stems from how to find the gradients, which must be available first for the gradient calculation.... O., could you please describe how to use the least squares method? Mani, yes, I do mean interpolating between neighbouring cells. Can you please tell me how to interpolate between neighbouring cells on non-orthogonal grids? Thank you so much.

 July 8, 2005, 01:10 Re: Cell-centered and Face-centered values #6 zxaar Guest   Posts: n/a for gradient calculations, what you do is to store the last calculated gradient in old arrays, like dUdX_old, etc. so when you need face values use these _old gradients to calculate the values at the face center. and once the gradient is done, update these _old gradients with latest values. this way after iterations, when you reach convergence , these _old values are not much varying and do not create much difference. hope this solves the problem.

 July 8, 2005, 11:43 Re: Cell-centered and Face-centered values #7 coolblizz Guest   Posts: n/a Hi Zxaar... Your method seems to make sense, at least it solves the dilemma issue of needing the gradient before finding it. I will try out this method. Can this method be also applied to interpolating the individual velocity components, before a Riemann procedure on both sides of the cell face is done? My only worry is the disagreement between the old face-centered values and the current cell-centered values. Thank you so much for your suggestion.

 July 8, 2005, 11:45 Re: Cell-centered and Face-centered values #8 coolblizz Guest   Posts: n/a Hi O.... Could you please describe how to use the least squares method? Or is there any easy-to-understand books/articles on this approach? Thank you.

 July 8, 2005, 11:47 Re: Cell-centered and Face-centered values #9 coolblizz Guest   Posts: n/a Hi Mani.... Yes, I do mean interpolating between neighbouring cells. Can you please tell me how to interpolate between neighbouring cells on non-orthogonal grids? Thank you.

 July 8, 2005, 14:59 Re: Cell-centered and Face-centered values #10 Mani Guest   Posts: n/a Take an average of two neighboring cell centers to define the variables at the face between the cell centers. For higher order approximations you may need to take the distances between face and cell-centers into account, but assuming you have a relatively good grid (aspect ratios not too high), then you would simply take the arithmetic average. This is consistent with a second order scheme.

 July 9, 2005, 00:49 Re: Cell-centered and Face-centered values #11 Praveen Guest   Posts: n/a Or you could form a new cell by joining the centroids of the neighbouring cells, and apply Green-Gauss theorem on this new cell.

 July 9, 2005, 11:53 Re: Cell-centered and Face-centered values #12 coolblizz Guest   Posts: n/a Hi Mani.... I am actually doing what you are recommending by taking the average for the face values as a preliminary step. Then I do the extra step of considering the distance between the cell center and face as a further update to the face value. Just a further question, can interpolating a velocity from cell center to face center be done the same as when interpolating a scalar?

 July 10, 2005, 23:08 Re: Cell-centered and Face-centered values #13 zxaar Guest   Posts: n/a if you honestly ask me, what would i prefer between the method i told you and between taking simple average of two cells as face value for gradient calculations, i would prefer average of two cells. the reason is this, earlier my code use to work with the method i mentioned you, but then i observed that my code runs well with sturctured meshes but suddenly diverges with unstructured meshes, for three months i tried everythign but couldn't find any problem. since thre were no problems with the code i wrote. well then i always used to wonder that same mesh runs well in fluent, the question was why? i found that the only thing me and fluent do differntly is they take average for gradient calculations and i bother too much (like you) about the face values. so then i wrote new grad function with averages, and yes after that my code has not diverged. hope this will help.

 July 11, 2005, 11:58 Re: Cell-centered and Face-centered values #14 coolblizz Guest   Posts: n/a Hi Zxaar.... Thank you very much for the information. Precisely, as what you have said, I have this nagging worry about whether averaging is sufficient. Your findings have put that worry of mine to rest. Thank you so much again.

 July 12, 2005, 00:47 Re: Cell-centered and Face-centered values #15 Mani Guest   Posts: n/a Yes. No problem. Think of each velocity component as a scalar quantity.

 July 12, 2005, 00:53 Re: Cell-centered and Face-centered values #16 Mani Guest   Posts: n/a true. this wasn't quite the original question, but it's actually a better way to obtain the derivatives. in this case, the derivatives will be vertex based, not cell centered. you can then obtain face-centered derivatives by averaging four vertices on each face. essentially you're ending up with a larger stencil, but it's more robust.

 July 12, 2005, 01:38 Re: Cell-centered and Face-centered values #17 zxaar Guest   Posts: n/a mani fluent also gives user and option to use node based gradient (as you just mentioned), and according to them its better to use.

 July 13, 2005, 12:17 Re: Cell-centered and Face-centered values #19 coolblizz Guest   Posts: n/a Hi Mani.... Thank you very much for your reply. It certainly goes a long way in clearing up this age-old doubts of mine.

 July 13, 2005, 12:50 Re: Cell-centered and Face-centered values #20 coolblizz Guest   Posts: n/a Hi O.... In your 1st equation, Q'(i) = Q(p) + dQ/dx*(x(i)-x(p) + dQ/dy*(y(i)-y(p)), is Q'(i) the face-centered value and Q(p) the cell-centered value? Then the expression is an extrapolation from the cell-center to the face-center, am I right? It looks very similar to the method I am using now. After the minimization of the error squares, are the gradients dQ/dx and dQ/dy the subjects? And I plough these gradients back into the 1st equation to get an update for Q'(i)? I will be most grateful if you can let me have a copy of the C++ code that you have. I hope it comes with some documentations. Thank you so much for your help.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post henningh OpenFOAM 2 August 25, 2011 11:41 danihuso OpenFOAM 0 July 17, 2009 11:01 tommy CFX 2 November 13, 2008 00:52

All times are GMT -4. The time now is 19:23.