- **OpenFOAM Running, Solving & CFD**
(*http://www.cfd-online.com/Forums/openfoam-solving/*)

- - **gradient schemes**
(*http://www.cfd-online.com/Forums/openfoam-solving/124345-gradient-schemes.html*)

gradient schemesHi dear Foamers,
I have been fiddling with different gradient schemes for my simulations. I used the following settings without problems: grad(p) Gauss linear; grad(p) Gauss upwind phi; My simulations only run with the following setting: grad(p) cellLimited Gauss upwind phi 1.0; I am concerned about the "upwind" scheme which I think would be very diffusive. As far as I understand, the interpolation scheme can be any scheme that calculates the face value from the cell values. Therefore I tried to experiment with the TVD interpolation schemes like grad(p) Gauss vanLeer01 phi; But this option doesn't work as the code runs into segmentation fault. I also tried some other schemes as well as linearUpwind. But just don't work. I have difficulty sussing out what parameters are needed from the code. Could anyone explain a bit how this gradient scheme can be set? Thanks in advance. Callum |

Quote:
What do you mean by "p"? Is it the pressure? If it is pressure then for finite volume method, I guess we have pressure at nodal grid points and for that different interpolation schemes (gradient schemes) will be applied you can refer some of these on Internet. Best Luck! |

Hi yeah, yup "p" means pressure here. But I am just asking a general question, it can be any other variables.
According to the OpenFOAM documentations, it should be an interpolation scheme after "Gauss". So I just suppose I can use a TVD scheme to obtain the surface value for integration in the Gauss reconstruction method. BUt it seems it doesn't work in this way. To be honest, I haven't looked into what limiting method is used for "cellLimited" or "faceLimited". |

Callumso, this can also be a matter of initialization. Did you try to run the code with "upwind" for some iterations (let's say 500) and then switch the scheme?
Also: I am not sure if this "upwind=dissipation" holds for anything else than the velocity. If you set div(phi,U) to upwind, it will result in additional diffusion by the numerical error. But "p"? Can you (mathematically) see, that a first order pressure gradient has the form of the diffusion of "U"? |

grad(p) is not a convection term and central differencing ( Gauss linear; ) can and should be used.
For grad(U) a limiter should be applied ( cellLimited Gauss linear 1; ) |

?!?
But he said that everything else than upwind diverges... |

Thank you all for the replies. But sorry for the misleading question.
My problem is actually with the turbulence equations instead of p or U. I have to use upwind and cell limited for grad(k) and grad(omega) and these appear in some explicit source terms in the k-omega SST models. I also need to use upwind convective schemes for k and omega equations now. Otherwise k and omega just blow up quickly. For Rodriguez: indeed when first order upwind is used, it will always be diffusive, no matter what variable it is. This can be easily shown by expanding the terms into power series and the second derivative term will appear which leads to diffusivity. When central scheme is used, the second derivative is cancelled out, but the third derivative persists which leads to dispersion, not too much a concern to me, though. For Smit: yes, I always use Gauss linear for grad(p). But I also use Gauss linear for grad(U). My p and U equations are alright. Just the k and omega equations have problems. It seems commercial packages like FLUENT tend to use first order upwind schemes for the turbulence equations. My research needs to capture the k more accurately than a usual case. URANS instead of LES is currently used to reduce the computational cost. That's why I try to keep the k equation as less dissipative as possible. The question about grad() is just a general one, and more about understanding of the code instead of the numerical method itself. |

Quote:
Try Code:
`gradSchemes` Code:
`divSchemes` 2) Do you have lowRe or highRe boundary conditions? What do you use for boundary conditions? 3) Fluent... you can choose the div scheme for the turbulent variables, but normaly only up to linear upwind ("2nd order upwind"). But for me it looks like Fluent uses limiters at every possible place. At least I can get convergence in OpenFoam with the same grids only when I set limiters everywhere... |

All times are GMT -4. The time now is 11:25. |