# 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

Quote:
Originally Posted by chegdan
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 second order schemes 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 cellMDLimited vs. cellLimited). This is different than the limiters used in limitedLinear. In Fluent documentation, the definition of second order upwind is given as:

where and 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>

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 (second order schemes 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 (Guide: Writing Equations in LaTeX on the CFD Online Forums)

Dan
Ok. For information
Posted in Uncategorized