CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   linearUpwind (http://www.cfd-online.com/Forums/openfoam/116028-linearupwind.html)

 robdeb April 11, 2013 08:51

linearUpwind

Hi,

I'm trying to understand the linearUpwind scheme in OpenFOAM. The linearUpwind.C isn't clear to me. So I have some questions:
-Is it simply the extansion of the upwind scheme to the second order?
-In the User Guide, it is said to be first/second order bounded. But for me, I would not have expected it to be bounded in the second order. Where am I wrong?

Thank you.

 chegdan April 11, 2013 16:28

Quote:
 -Is it simply the extension of the upwind scheme to the second order?
Yes

Quote:
 -In the User Guide, it is said to be first/second order bounded. But for me, I would not have expected it to be bounded in the second order. Where am I wrong?
It is unbounded unless you use a gradient scheme that bounds the values. Maybe this older discussion will help:

http://www.cfd-online.com/Forums/ope...tedlinear.html

Good luck.

 robdeb April 11, 2013 16:54

 robdeb April 19, 2013 06:47

Hi again,

I'm simulating a supersonic flow with a shock, inviscid case.
I wanted to compare a TVD scheme (limitedLinear) with linearUpwind. I tried linearUpwind without cellLimited and then with cellLimited. What I expected was that the linearUpwind scheme without cellLimited gave me spurious oscillations but it doesn't. The two case (linearUpwind with and without cellLimited) gave me the same results. The localisation of the shock isn't very good compare to limitedLinear but I see no spurious oscillations near it.
How can we explain it?

Thank you.

Robin

 chegdan April 20, 2013 20:08

What type of gradient scheme are you using?

 robdeb April 22, 2013 03:28

Gauss linear

 fredo490 April 23, 2013 10:42

give your full scheme file. Maybe you can try a leastsquare method.

 robdeb April 24, 2013 03:30

Here is my fvSchemes for the linearUpwind case without cellLimited:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
default Euler;
}

{
default Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss upwind;
}

laplacianSchemes
{
default none;
laplacian((rho*(1|A(U))),p) Gauss linear corrected;
laplacian(muEff,U) Gauss linear corrected;
laplacian(alphaEff,e) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

{
default corrected;
}

fluxRequired
{
default no;
p ;
}

// ************************************************** *********************** //

Thank you, I'll try leastSquare method.

 fredo490 April 24, 2013 08:18

why you didn't put "div(phi,U)" to the second order ?

All the gradient should take the solved variable: