View Issue Details

IDProjectCategoryView StatusLast Update
0003322OpenFOAMBugpublic2019-08-08 15:45
ReporterTaihangAssigned Tohenry 
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionno change required 
PlatformOpenFOAM 5.0 + swak4Foam devOSUbuntuOS Version16.04
Product Version 
Fixed in Version 
Summary0003322: fieldAverage doesn't get a reasonable averaged result
DescriptionDear OpenFOAM team,

I am simulating separated flow behind a bluff body with LES WALE model. I have set up the "fieldAverage" utility to calculate the time-averaged velocity field and pressure field. However, the averaged velocity and pressure result is not physical since the result is still quite "turbulent" and different from the experimental result. I run the simulation again but this time I collected the pressure field with "probes" utility and averaged them with Matlab. This time the Matlab result is very good. It is very close to the experimental result. However, the fieldAverage result is still very "turbulent". Both results and my "system" files are attached. Both contours are approximately the same area with the same contour range. I am using OpenFOAM 5.0 with swak4Foam development version am wondering if you know where the problem is.

Best wishes,
Taihang
TagsNo tags attached.

Activities

Taihang

2019-07-31 15:16

reporter  

Matlab_result.jpg (67,823 bytes)
Matlab_result.jpg (67,823 bytes)
OpenFOAM_result.png (358,234 bytes)
controlDict (889,351 bytes)
fvSchemes (2,468 bytes)
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


ddtSchemes
{
    default         backward;
}

gradSchemes
{
    default         cellMDLimited Gauss linear 0.5;
    grad(U)         cellMDLimited Gauss linear 0.5;
}

divSchemes
{
    default         Gauss linear;
    div(phi,U)      Gauss linearUpwind grad(U);
    div(phi,e)      Gauss linearUpwind default;
    div(phi,omega)  Gauss linearUpwind default;
    div(phi,k)      Gauss linearUpwind default;
    div((nuEff*dev(T(grad(U)))))    Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear limited 1.0;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         limited 1.0;
}

wallDist
{
    method meshWave;
}

/*
ddtSchemes
{
    default         backward;
}

gradSchemes
{
    default         Gauss linear;
    grad(U)         cellLimited Gauss linear 1;
    grad(nuTilda)   cellLimited Gauss linear 1;
}

divSchemes
{
    default         none;
    div(phi,U)      bounded Gauss linearUpwindV grad(U);
    div(phi,e)      Gauss LUST grad(e);
    div(phi,k)      bounded Gauss upwind;
    div(phi,K)      bounded Gauss upwind;
    div(phi,omega)  bounded Gauss upwind;
    div(phiv,p)     bounded Gauss upwind;
    div((nuEff*dev2(T(grad(U))))) Gauss linear;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
    div(phi,nuTilda) bounded Gauss upwind;
    div(meshPhi,p)  bounded Gauss upwind;
    div(phi,epsilon) bounded Gauss upwind;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

wallDist
{
    method meshWave;
}



// ************************************************************************* //
fvSchemes (2,468 bytes)
fvSolution (1,771 bytes)
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  5                                     |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "(p|rho|pcorr)"
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-6;
        relTol          0.01;
    }

    "(p|rho|pcorr)Final"
    {
        $p;
        relTol          0;
    }

    "(U|e|k|nuTilda|omega)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-9;
        relTol          0.01;
    }

    "(U|e|k|nuTilda|omega|epsilon)Final"
    {
        $U;
        relTol          0;
    }
    "(cellMotionUx|cellMotionU)"
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance       1e-9;
        relTol          0.01;
    }

}

PIMPLE
{
    momentumPredictor yes;
    nOuterCorrectors 3;
    nCorrectors     1;
    nNonOrthogonalCorrectors 0;

    pMinFactor      0.5;
    pMaxFactor      2.0;
}

relaxationFactors
{
    equations
    {
        ".*"  1;
    }
}

// ************************************************************************* //
fvSolution (1,771 bytes)

Taihang

2019-08-01 10:17

reporter   ~0010660

Dear OpenFOAM team,

I have somehow resolved this problem in a 2D testing case. I am further testing with a 3D case. If you are interested in how I solved it I could give you further information. I think it is better to make some small changes to the "fieldAverage" utility or notify the users. Otherwise, someone may run into the same problem and waste weeks of time.

Best wishes,
Taihang

henry

2019-08-08 15:45

manager   ~0010662

User support request.

Issue History

Date Modified Username Field Change
2019-07-31 15:16 Taihang New Issue
2019-07-31 15:16 Taihang File Added: Matlab_result.jpg
2019-07-31 15:16 Taihang File Added: OpenFOAM_result.png
2019-07-31 15:16 Taihang File Added: controlDict
2019-07-31 15:16 Taihang File Added: fvSchemes
2019-07-31 15:16 Taihang File Added: fvSolution
2019-08-01 10:17 Taihang Note Added: 0010660
2019-08-08 15:45 henry Assigned To => henry
2019-08-08 15:45 henry Status new => closed
2019-08-08 15:45 henry Resolution open => no change required
2019-08-08 15:45 henry Note Added: 0010662