CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums

A few simple questions about linearUpwind and limitedLinear

Register Blogs Community New Posts Updated Threads Search

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

A few simple questions about linearUpwind and limitedLinear

Posted August 28, 2013 at 11:36 by skeptik

Quote:
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 http://www.cfd-online.com/Forums/ope...r-schemes.html and Alberto did a good explanation, but I need a little more clarification.

linearUpwind:

I know linearUpwind is second order and bounded by a limiter (e.g. cellMDLimited from http://www.cfd-online.com/Forums/ope...lllimited.html). 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:

Code:
    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();

    GeometricField
        <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];
        }
        else
        {
            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.

limitedLinear
This again is second order and is bounded using a sweby limiter (http://www.cfd-online.com/Forums/ope...r-schemes.html 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 (http://www.cfd-online.com/Forums/sit...ne-forums.html)

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

Comments

 

All times are GMT -4. The time now is 20:13.