CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   irregular pressure field simpleFoam (

k_xyz September 5, 2011 04:42

irregular pressure field simpleFoam
2 Attachment(s)
Dear all,

I'm having some trouble with a simpleFoam computation around a solid body, with wall function boundary conditions at the wall: the pressure field is disturbed near the surface (jagged pressure distribution on the surface, and deformed iso-pressure lines, as shown in the attachment.)

The setup (fvSchemes, fvSolution, boundary conditions) follows pretty much the airFoil2D case (linearUpwind div-schemes), Re is around 500.000.

The case converges, but the pressure distribution is not correct. From the iso-pressure lines one might think it's a mesh problem - however, yPlus is between 30 and 130, and the mesh is as regular as possible... Doesn't seem to be the wall function either - the problem persists with different models.

Any suggestions where the problem could come from?

eugene September 6, 2011 04:28

What does your velocity field look like?

Also try leastSquares or extendedLeastSquares for the pressure gradient and snGrad.

k_xyz September 6, 2011 09:52

1 Attachment(s)
Hi and thanks for your answer,

I've tried leastSquares as gradScheme and corrected as snGradScheme, however, the problem persists.
It's also visible in the velocity field as you'll see in the attachment (velocity is zero at the wall itself, the picture shows the internal mesh, cell values). Again, the overall distribution looks ok, but there's this jagged distribution in the first cell layer.

Could the problem be related to the mesh, e.g. caused by the intersection between the prism layers and the outer mesh?

eugene September 6, 2011 10:08

snGradCorr gradient, not snGrad, like this:

grad(p) leastSquares;
snGradCorr(p) leastSquares;

I doubt it will help, but you should also try extendLeastSquares.

The problem is almost certainly due to the irregular mesh, but that's hardly an excuse for the poor results. You should also try limiting the LUD gradient and the nonOrthogonal correction:

div(phi,U) Gauss cellMDLimited linearUpwindV Gauss linear 0.5;

default Gauss linear limited 0.333;
default limited 0.333;

k_xyz September 6, 2011 12:33

2 Attachment(s)

still not looking better... I've tried out a couple of different snappy-meshes, but I don't see a way of getting something more regular there...

I've attached my fvSchemes and fvSolutions files - maybe there's an error I have overlooked.

Boundary conditions are: for velocity fixedValue inlet, InletOutlet at outlet, fixedValue 0 at the wall, for pressure zeroGrad everywhere except at the outlet, there it's fixedValue 0.

I've had a look at some of the tutorials and noticed a similar effect in the 'wingMotion' test case (also with a snappy mesh), whereas the airFoil2D case (Icem-mesh?) looks smoother...

eugene September 7, 2011 08:16

Change your relTol on p solver from 0.1 to 0.001.

SIMPLE - set nOrthogonalCorrectors to 0

interpolation scheme should not be limited, just linear is fine.

snGradSchemes should be identical to Laplacian, i.e. limted 0.333

If none of the above works, try increasing the macthing height in snappy and adding more layers.

All times are GMT -4. The time now is 15:09.