CFD Online Logo CFD Online URL
Home > Forums

A few simple questions about linearUpwind and limitedLinear

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

OpenFoam, SALOME, all free tools for engineers
Rate this Entry

A few simple questions about linearUpwind and limitedLinear

Posted August 28, 2013 at 10:36 by skeptik

Originally Posted by chegdan View Post
I am a writing about the schemes that I used in my simulations in my thesis and could use some clarification on the linearUpwind and limitedLinear schemes. I have read and Alberto did a good explanation, but I need a little more clarification.


I know linearUpwind is second order and bounded by a limiter (e.g. cellMDLimited from This is different than the limiters used in limitedLinear. In Fluent documentation, the definition of second order upwind is given as:

\phi_f = \phi + \nabla\phi\cdot\vec{r}

where \phi_f and \phi are the face value of phi and the cell centered values of phi in the upstream cells respectively. I am reading through the code of linearUpwind and I see:

    GeometricField<Type, fvsPatchField, surfaceMesh>& sfCorr = tsfCorr();

    const surfaceScalarField& faceFlux = this->faceFlux_;

    const labelList& owner = mesh.owner();
    const labelList& neighbour = mesh.neighbour();

    const volVectorField& C = mesh.C();
    const surfaceVectorField& Cf = mesh.Cf();

        <typename outerProduct<vector, Type>::type, fvPatchField, volMesh>
        gradVf = gradScheme_().grad(vf);

    forAll(faceFlux, facei)
        if (faceFlux[facei] > 0)
            label own = owner[facei];
            sfCorr[facei] = (Cf[facei] - C[own]) & gradVf[own];
            label nei = neighbour[facei];
            sfCorr[facei] = (Cf[facei] - C[nei]) & gradVf[nei];
I see the mesh.C and mesh.Cf and I am led to believe that through quickly reading the code, these are the cell centroid and face centroid, thus producing an r vector that is dotted with the gradient between the owner and neighbor cells (&gradVf) controlled by gradSchemes. I then see some similar code to take care of the boundaries.

When is the sfCorr used to correct the value of the face? I guess I am just interested in generating a discussion and confirming or clarifying my thoughts.

This again is second order and is bounded using a sweby limiter ( post 16). I am just a little fuzzy on what the final simplified form of the equation is for limitedLinear (I admit I haven't looked at it as much as linearUpwind). I am out of my office and will look through Richard Pletcher, John Tannehill and Dale Anderson when I get a chance. Laslty, correct me if I'm wrong but the parameter following a definition of a limitedLinear declaration is passed to the limiter, where 1 uses the limiter and 0 does not (with anything in between being a blend).

Sorry for the massive post, and any clarification would be fantastic and if I find an answer, I will post the result here. And for those interested on how I did the math in the forum, look at (

Ok. For information
Posted in Uncategorized
Views 925 Comments 0 Edit Tags Email Blog Entry
« Prev     Main     Next »
Total Comments 0



All times are GMT -4. The time now is 18:12.