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

v2-f turbulent model for 2D square cylinder application

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 17, 2018, 18:07
Default v2-f turbulent model for 2D square cylinder application
  #1
New Member
 
Nayan Levaux
Join Date: Dec 2018
Posts: 3
Rep Power: 8
nlevaux is on a distinguished road
Dear All,

I'm new to OpenFOAM and as a lot of new users, I'm struggling with my problem. I'm trying to simulate the unsteady turbulent 2D incompressible flow past a square cylinder.

To this aim, after investigating the k-\omega SST model, I've tried the v^2-f model to hopefully better capture separation of the flow and get results more in adequacy with experiments. To do so, I've changed the turbulenceProperties file, modified the fvSchemes and fvSolution, and finally added to the 0 folder two files for the boundary conditions of v^2 and f. Note as a final remark I'm not using the wall functions, my first grid points give a y^+ of 3.5.
With all these inputs, OpenFOAM launches the computation but when it comes to analyze the results, I see k is remained equal to its initial conditions during the whole simulation. Thus, there is clearly one (several?) bug in my input files.

I've tried to change the initial conditions (there is maybe too many constraints on k, v^2, f?) and also numerical schemes but whatever changes I made, I remain with this constant k field... Even after researches on forums, I cannot manage this issue.
Therefore, I'm here hoping someone could help me fix this issue.

Thanks in advance for any reply!

PS: Please find my input files hereafter:

turbulenceProperties:
Code:
simulationType  RAS;

RAS
{
    turbulence      on;

    RASModel        v2f;

    printCoeffs     on;
}
fvSchemes:
Code:
ddtSchemes
{    
    default         backward;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{    
// From the thesis
    default         none;
    div(phi,U)      bounded Gauss linearUpwind Grad(U);
    div(phi,k)      bounded Gauss upwind;
    div(phi,epsilon) bounded Gauss upwind;
    div(phi,omega)  bounded Gauss upwind;
    div(phi,R)      Gauss upwind;
    div(R)          Gauss linear;
    div(phi,nuTilda) Gauss upwind;
    div((nuEff*dev2(T(grad(U))))) Gauss linear;
    div(phi,v2) bounded Gauss linearUpwind Grad(v2);
    div(phi,f) bounded Gauss linearUpwind Grad(f);
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

wallDist
{
    method meshWave;
}
fvSolution:
Code:
solvers
{
    p
    {
        solver           PCG;
        preconditioner   DIC;
        tolerance        1e-05;
        relTol           0;
    }

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

    "(k|epsilon|omega|R|nuTilda|v2)"
    {
        solver           PBiCG;
        preconditioner   DILU;
        tolerance        1e-5;
        relTol           0;
    }

    f
    {
        solver           PCG;
        preconditioner   DIC;
        tolerance        1e-5;
        relTol           0;
    }

    U
    {
        solver           PBiCG;
        preconditioner   DILU;
        tolerance        1e-05;
        relTol           0;
    };
}

PISO
{
    nCorrectors     2;
    nNonOrthogonalCorrectors 0;
    pRefCell        0;
    pRefValue       0;
 }
k:
Code:
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0.000294;

boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform 0.000294;
    }
    outlet
    {
        type            zeroGradient;
    }
    noSlipWall
    {
        type            fixedValue;
        value           uniform 1e-10;
    }
    slipWall
    {
        type            symmetry;
    }
    frontAndBack
    {
        type            empty;
    }
}
epsilon:
Code:
dimensions      [0 2 -3 0 0 0 0];

internalField   uniform 0.0773;

boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform 0.0773;
    }
    outlet
    {
        type            zeroGradient;
    }
    noSlipWall
    {
        type            fixedValue;
    value        uniform 1083.794774319;
    }
    slipWall
    {
        type            symmetry;
    }
    frontAndBack
    {
        type            empty;
    }
}
f:
Code:
dimensions      [0 0 -1 0 0 0 0];

internalField   uniform 1e-10;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }
    outlet
    {
        type            zeroGradient;
    }
    noSlipWall
    {
        type            fixedValue;
        value           uniform 1e-10;
    }
    slipWall
    {
        type            symmetry;
    }
    frontAndBack
    {
        type            empty;
    }
}
v2:
Code:
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0.000196;

boundaryField
{
    inlet
    {
        type            fixedValue;
        value           uniform 0.000196;
    }
    outlet
    {
        type            zeroGradient;
    }
    noSlipWall
    {
        type            fixedValue;
        value           uniform 1e-10;
    }
    slipWall
    {
        type            symmetry;
    }
    frontAndBack
    {
        type            empty;
    }
}
vnut:
Code:
dimensions      [0 2 -1 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            calculated;
        value           uniform 0;
    }
    outlet
    {
        type            calculated;
        value           uniform 0;
    }
    noSlipWall
    {
        type            calculated;
        value           uniform 0;
    }
    slipWall
    {
        type            symmetry;
    }
    frontAndBack
    {
        type            empty;
    }
}
nlevaux is offline   Reply With Quote

Old   December 24, 2018, 06:19
Default
  #2
Senior Member
 
fumiya's Avatar
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19
fumiya is on a distinguished road
Could you upload the log file of your simulation with v2f model?

Best regards,
Fumiya
__________________
[Personal]
fumiya is offline   Reply With Quote

Old   December 24, 2018, 12:34
Default
  #3
New Member
 
Nayan Levaux
Join Date: Dec 2018
Posts: 3
Rep Power: 8
nlevaux is on a distinguished road
Hi Fumiya,

Thank you for your reply!
You will find in attachment the compressed log file as you demand.

Have a nice day,
Nayan Levaux
Attached Files
File Type: gz log.tar.gz (146.1 KB, 7 views)
nlevaux is offline   Reply With Quote

Old   December 24, 2018, 17:15
Default
  #4
Senior Member
 
fumiya's Avatar
 
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19
fumiya is on a distinguished road
Hi Nayan,

The initial residuals of k and v2 fields become smaller than the tolerance specified in fvSolution file
and these fields are not solved and updated from t = 0.000125.

Quote:
Time = 0.000125

Courant Number mean: 0.00122107 max: 0.0477957
DILUPBiCG: Solving for Ux, Initial residual = 0.000570161, Final residual = 4.13105e-10, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.0011665, Final residual = 1.42066e-09, No Iterations 1
DICPCG: Solving for p, Initial residual = 0.0243013, Final residual = 9.70968e-06, No Iterations 220
time step continuity errors : sum local = 2.67238e-11, global = 3.23046e-13, cumulative = -1.53478e-12
DICPCG: Solving for p, Initial residual = 1.03713e-05, Final residual = 5.89741e-06, No Iterations 1
time step continuity errors : sum local = 1.58964e-11, global = 3.18213e-13, cumulative = -1.21657e-12
DILUPBiCG: Solving for epsilon, Initial residual = 8.75969e-05, Final residual = 1.53074e-09, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 4.60365e-07, Final residual = 4.60365e-07, No Iterations 0
DICPCG: Solving for f, Initial residual = 0.076432, Final residual = 7.9394e-06, No Iterations 36
DILUPBiCG: Solving for v2, Initial residual = 2.82063e-07, Final residual = 2.82063e-07, No Iterations 0
You might want to decrease the tolerances of the matrix solvers of at least k and v2 fields.

Best regards,
Fumiya
__________________
[Personal]
fumiya is offline   Reply With Quote

Old   December 28, 2018, 06:32
Default
  #5
New Member
 
Nayan Levaux
Join Date: Dec 2018
Posts: 3
Rep Power: 8
nlevaux is on a distinguished road
Hi Fumiya,

I've followed your advice, but unfortunately, this only postpones the moment k et v^2 become steady.
As I said in the description of the issue, these two quantities should vary in time due to the unsteadyness of the problem at hand. By changing the numerical scheme used to discretize the divergence of k (I used bounded Gauss linearUpwind instead of bounded Gauss upwind, like for v^2), I achieved to have a change in the solution compared to the initial conditions I impose: I was able to see an increase of k around the corners of the square. However, at some point, the solution doesn't change anymore like in the first test.
So I imagine I should try other schemes, maybe one would give the solution I hope... Do you have any idea of schemes which are better to use with the v^2-f model?

Thank you for the attention you give to my issue!

Nayan
nlevaux is offline   Reply With Quote

Old   December 29, 2018, 10:41
Default
  #6
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 647
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

In fvSolution you can add an entry

Code:
    "(k|epsilon|omega|R|nuTilda|v2)"
    {
        solver           PBiCG;
        preconditioner   DILU;
        tolerance        1e-5;
        relTol           0;
        minIter          1;
    }
Regards,
Tom

Last edited by tomf; December 29, 2018 at 10:41. Reason: alignment
tomf is offline   Reply With Quote

Reply

Tags
v2f


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
Turbulent model using for simulating cylinder at 180<Re<260 duybk2501 FLUENT 0 October 24, 2018 03:10
How to model a turbulent flow over a cylinder? Mahbub FLUENT 14 February 10, 2018 12:14
Low Reynolds k-epsilon model YJZ ANSYS 1 August 20, 2010 14:57
Doubt about application of RST Turbulent model. Dolly Main CFD Forum 0 December 12, 2005 04:11
Turbulent steady flow around a circular cylinder Mirek Kabacinski FLUENT 0 July 23, 2003 19:40


All times are GMT -4. The time now is 04:18.