CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Non-orthogonality and pressure jumps (https://www.cfd-online.com/Forums/openfoam-solving/118293-non-orthogonality-pressure-jumps.html)

Floszwa May 24, 2013 08:45

Non-orthogonality and pressure jumps
 
2 Attachment(s)
Hello everyone,


I am facing a problem with my simulation. I try to simulate a particle within a tubeflow. It is a steady state problem. The velocity profile works perfectly, but all my simulations lead to pressure jumps around the particle and on the surface of the particle. They seem to be caused by the non-orthogonality of the mesh, because they only appear near the particle where the mesh changes.

Attachment 22088

Attachment 22089

I tried different things to solve this problem.
First I raised nNonOrthogonalCorrectors to 2, 3, 5 and even 15, but the problem still appeared.
I also changed in fvschemes sngradschemes and laplacianschemes from “corrected” to “limited 0,333”, but still nothing changed.
Last I changed the solver for p (GAMG-->PCG), but there were still pressure jumps.

I use simpleFoam as a solver and I attached the fvschemes, fvsoluten, controldict and the result of the checkMesh to this post.


Thank you in advance.


controlDict
Code:

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

application    simpleFoam;

startFrom      latestTime;

startTime      0;

stopAt          endTime;

endTime        20000;

deltaT          1;

writeControl    timeStep;

writeInterval  200;

purgeWrite      0;

writeFormat    ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision  6;

runTimeModifiable true;

functions
(
    forces
    {
        type forces;
        functionObjectLibs ("libforces.so");
        outputControl timeStep;
        outputInterval 50;
        patches (CYLINDER);
//        pname p;
//        Uname U;
        rhoName rhoInf;
        log true; // write force data to standard output
        rhoInf 998.21; // reference rho
        CofR (0.03 0 0.00315); // Center of rotation
    }
);

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

fvSchemes
Code:

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

ddtSchemes
{
    default        steadyState;
}

gradSchemes
{
    default        Gauss linear;
    grad(p)        Gauss linear;
    grad(U)        Gauss linear;
}

divSchemes
{
    default        none;
    div(phi,U)      bounded Gauss linearUpwind grad(U);
    div(phi,nuTilda) bounded Gauss linearUpwind grad(nuTilda);
    div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default        none;
    laplacian(nuEff,U) Gauss linear corrected;
    laplacian((1|A(U)),p) Gauss linear corrected;
    laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
    laplacian(1,p)  Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
    interpolate(U)  linear;
}

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    p              ;
}


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

fvSolution

Code:

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

solvers
{
    p
    {
        solver          GAMG;
        tolerance      1e-08;
        relTol          0.1;
        smoother        GaussSeidel;
        nPreSweeps      1;
        nPostSweeps    2;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 836;
        agglomerator    faceAreaPair;
        mergeLevels    1;
    }

    U
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        nSweeps        2;
        tolerance      1e-08;
        relTol          0.1;
    }

    nuTilda
    {
        solver          smoothSolver;
        smoother        GaussSeidel;
        nSweeps        2;
        tolerance      1e-08;
        relTol          0.1;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
    pRefCell        0;
    pRefValue      0;

    residualControl
    {
        p              1e-5;
        U              1e-5;
        nuTilda        1e-5;
    }
}

relaxationFactors
{
    fields
    {
        p              0.3;
    }
    equations
    {
        U              0.7;
        nuTilda        0.7;
    }
}


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

checkMesh
Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.2.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.2.0-5be49240882f
Exec  : checkMesh
Date  : May 24 2013
Time  : 14:28:58
Host  : "sm-pc32-l"
PID    : 5965
Case  : /home/likewise-open/BCINET/stoeckf/OpenFOAM/stoeckf-2.2.0/run/Versuch2Reihe2
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:          733616
    faces:            2155759
    internal faces:  2111465
    cells:            711204
    faces per cell:  6
    boundary patches: 5
    point zones:      0
    face zones:      1
    cell zones:      1

Overall number of cells of each type:
    hexahedra:    711204
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:    0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch              Faces    Points  Surface topology                 
    CYLINDER            4485    4564    ok (non-closed singly connected) 
    WALL                9779    9984    ok (non-closed singly connected) 
    OUTLET.2            3744    3842    ok (non-closed singly connected) 
    INLET.1            3744    3842    ok (non-closed singly connected) 
    SYMMETRY            22542    22864    ok (non-closed singly connected) 

Checking geometry...
    Overall domain bounding box (0.02 -0.00499844 -0.005) (0.04 6.02937e-14 0.005)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (1.09137e-16 3.82779e-16 -7.56275e-17) OK.
    Max cell openness = 3.28499e-16 OK.
    Max aspect ratio = 15.0684 OK.
    Minimum face area = 1.16736e-10. Maximum face area = 9.15643e-08.  Face area magnitudes OK.
    Min volume = 1.25716e-15. Max volume = 9.58542e-12.  Total volume = 7.84868e-07.  Cell volumes OK.
    Mesh non-orthogonality Max: 57.1982 average: 14.0225
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.11139 OK.
    Coupled point location match (average 0) OK.

Mesh OK.


Floszwa May 31, 2013 06:44

Hello,

I solved the case now with icoFoam (with 3 nNonOrthogonalCorrectors) instead of simpleFoam, but the results stayed the same and there where still pressure jumps.

Does really noone has any idea what i could try to solve the problem?

Greetings,
Florian

bigphil May 31, 2013 08:25

Hi Florian,

You are using Gauss linear for the grad(p) and grad(U), which is not so accurate for non-orthogonal faces.
Try leastSquares, which should maintain second order accuracy on non-orthogonal faces.

Best regards,
Philip

Floszwa June 3, 2013 05:01

Hey Philip,

thank you for your reply. I tried it with leastSquares, but there were still pressure jumps around the sphere. Do you know any other option to solve this problem?

Best regards,
Florian

majkl June 3, 2013 09:08

Quote:

Originally Posted by Floszwa (Post 431585)
Hey Philip,

thank you for your reply. I tried it with leastSquares, but there were still pressure jumps around the sphere. Do you know any other option to solve this problem?

Best regards,
Florian

Hi,

try limited schemes for pressure gradient, like
Code:

grad(p) faceMDLimited Gauss linear 1;

M

Floszwa June 4, 2013 08:16

Hey,
I tried it with
Quote:

grad(p) faceMDLimited Gauss linear 1;
one simulation with nNonOrthogonalCorrectors=3 and one without. In both simulations were still pressure jumps around the sphere.

Best regards,
Florian

bigphil June 4, 2013 11:22

Hi Florian,

Do these peaks appear in the internal domain or just near the boundary?
i.e. if you clip the domain in ParaView through the internal domain, do you see these jumps at the non-orthogonal faces?

Philip

Floszwa June 5, 2013 05:43

1 Attachment(s)
Quote:

Originally Posted by bigphil (Post 431968)
Hi Florian,

Do these peaks appear in the internal domain or just near the boundary?
i.e. if you clip the domain in ParaView through the internal domain, do you see these jumps at the non-orthogonal faces?

Philip

Hey,

they also appear in the internal domain

Attachment 22451

Florian

achyutan June 5, 2013 05:48

Hi Florian,

It doesn't seem to be a non-orthogonality problem of the mesh. Max. skewness ratio is well within the limits. could u post a pic of your mesh ?
Maybe, try coarsening the mesh and see what happens to pressure simulation.
Also try putting 10e-08 as residual control for pressure if not less.
Check your pressure boundary condition on 'ÇYLINDER' based on case setup.

regards,

achyutan

Floszwa June 6, 2013 06:26

1 Attachment(s)
Quote:

Originally Posted by achyutan (Post 432126)
Hi Florian,

It doesn't seem to be a non-orthogonality problem of the mesh. Max. skewness ratio is well within the limits. could u post a pic of your mesh ?
Maybe, try coarsening the mesh and see what happens to pressure simulation.
Also try putting 10e-08 as residual control for pressure if not less.
Check your pressure boundary condition on 'ÇYLINDER' based on case setup.

regards,

achyutan

Hey achyutan,

first a pic of the mesh (only cylinder and symmetryplane):

Attachment 22496

I ran the simulation with a coarsed mesh, but the results were the same. Around the sphere were pressure jumps.
I also ran a simulation with the residual condition e-08, but this did not change anything.

The pressure boundary condition for the sphere is "zeroGradient". I think this should be okay and the pressure around the sphere looks okay except for the pressure jumps. It seems like these jumps are at the positions where the mesh changes.

Florian

bigphil June 7, 2013 07:19

Hi Florian,

Hmmnn this is clearly an issue with mesh non-orthgonality and/or mesh skewness.

Did you try leastSquares for grad(U) and grad(p)?

Also, you could try skewCorrected for some of the divergence/laplacian terms e.g.
Code:

div((nuEff*dev(T(grad(U))))) Gauss skewCorrected linear;
Philip

Floszwa June 11, 2013 05:05

Quote:

Originally Posted by bigphil (Post 432637)
Hi Florian,

Hmmnn this is clearly an issue with mesh non-orthgonality and/or mesh skewness.

Did you try leastSquares for grad(U) and grad(p)?

Also, you could try skewCorrected for some of the divergence/laplacian terms e.g.
Code:

div((nuEff*dev(T(grad(U))))) Gauss skewCorrected linear;
Philip

Hello Phil,

I tried it a few simulations with your suggestions, but the results stayed the same.

Florian

LutGoe June 12, 2013 08:28

Hey Florian, i had the same problems while simulating a micro channel flow because there were areas, where circular mesh parts and rectangular parts were connected.

I think the problem occurs because there are points where more than 4 cells are in contact with each other (two dimensional, more than 8 in 3d). I am pretty sure that this is the reason why you get the peaks in the pressure field (i had them in my velocity fields, maybe resulting from pressure jumps).

Do you get the same problems when you try to simulate the flow around a non spherical particle, maybe a cube? That could eliminate other possible influences.

I could not find a solution when i was working on that case, so i switched to another mesh because of time issues, which then worked fine (unstructured, gmsh).

I hope that this might help you to track down the reason for this

Floszwa June 17, 2013 07:22

Hello Lutz,

I am facing this problem for my Bachelor thesis and at the moment I don't have the time to try out the mesh with a non-sphericle particle. When there is some time left, I will try it.

Florian


All times are GMT -4. The time now is 08:44.