CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Velocity gradient that looks like checkerboard

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 26, 2015, 12:57
Default Velocity gradient that looks like checkerboard
  #1
Member
 
J.-H. Wang
Join Date: Oct 2010
Posts: 72
Rep Power: 15
f0208secretx is on a distinguished road
I am solving an acoustic problem arises from turbulence. For that I am using pimpleFoam + Spalart-Allmaras DES (OpenFOAM 2.4.0 on RHEL) as suggested by some people when grid resolution is not high enough. I am particularly concerned with the velocity gradient as it will act as a quadrupole source term when acoustic analogy is used.

For the current setup, I have two problems:

1. I couldn't seem to get rid of the "checkerboard" velocity gradient despite the relatively smooth velocity field. Quotation because I don't think they are as bad as the real checkerboard issue. Pictures are attached.

2. There seems to be some artifacts when transitioning from coarser grid to denser grid near the region of interest.

Currently I suspected its the convergence issue, but it could also be the gradient scheme I chose to compute the gradient (cell limited gauss linear 0.8)? I posted my fvSolution/fvScheme and hopefully someone with some experience could point out some obvious errors. Any help is appreciated. Thanks.


fvScheme:
Code:
/*--------------------------------*- 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;
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         backward;
}

gradSchemes
{
    default         Gauss linear;

    grad(nuTilda)   cellLimited Gauss linear 0.8;
    grad(U)         cellLimited Gauss linear 0.8;
}

divSchemes
{
    default         Gauss linear;

    div(phi,U)      Gauss LUST unlimitedGrad(U);//Gauss limitedLinear 1
    //div(phi,U)      Gauss linearUpwind unlimitedGrad(U);
    div(phi,k)      Gauss limitedLinear 1;
    div(phi,B)      Gauss limitedLinear 1;
    div(phi,nuTilda) Gauss limitedLinear 1;
    div(B)          Gauss linear;
    div((nuEff*dev(T(grad(U))))) Gauss linear;
    //default         none;
    //div(phi,U)      Gauss linearUpwindV grad(U);
    //div(phi,k)      Gauss upwind;
    //div(phi,omega)  Gauss upwind;
    //div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         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.1.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
       solver PCG;
       preconditioner DIC;
       tolerance 1e-6;
       relTol 0.01;
    }

    pFinal
    {
       solver PCG;
       preconditioner DIC;
       tolerance 1e-8;
       relTol 0;
    }

    U
    {
      solver PBiCG;
      preconditioner DILU;
      tolerance 1e-6;
      relTol 0.1;
    }

    B
    {
      solver PBiCG;
      preconditioner DILU;
      tolerance 1e-6;
      relTol 0.1;
    }

    "(U|k|epsilon|omega|nuTilda)Final"
    {
      solver PBiCG;
      preconditioner DILU;
      tolerance 1e-8;
      relTol 0;
    }
}

PIMPLE
{
    nOuterCorrectors 2; // 1 leads to a piso algorithm
    nCorrectors     3;
    nNonOrthogonalCorrectors 2;
    pRefCell        0;
    pRefValue       0;
}

// ************************************************************************* //
Attached Images
File Type: jpg Ug_grid.jpg (150.6 KB, 142 views)
Attached Files
File Type: pdf Ug.pdf (77.7 KB, 20 views)
File Type: pdf U.pdf (58.4 KB, 20 views)
f0208secretx is offline   Reply With Quote

Old   October 14, 2020, 21:04
Default
  #2
Member
 
Stanley John
Join Date: Sep 2018
Posts: 79
Rep Power: 7
sjohn2 is on a distinguished road
I know its quite late, but just in case.
did you find why checkerboard pattern happened in first place?
sjohn2 is offline   Reply With Quote

Old   October 15, 2020, 01:12
Default
  #3
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by sjohn2 View Post
I know its quite late, but just in case.
did you find why checkerboard pattern happened in first place?



The picture attached does not show checkerboarding. What it shows is pressure shoot up due to cell quality.
arjun is online now   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
access to velocity gradient for Lagrangian particles jiejie OpenFOAM 31 December 2, 2016 04:56
[General] Gradient of 2D velocity field eleonora ParaView 0 January 30, 2015 03:42
[swak4Foam] Velocity gradient outlet BC penalisation using groovyBC Hiroshiman OpenFOAM Community Contributions 10 June 11, 2014 16:57
Velocity gradient Stephen FLUENT 0 April 7, 2003 10:29
Velocity gradient Stephen Main CFD Forum 0 April 7, 2003 10:28


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