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/)
-   -   doubt about drag coefficient (cylinder) (https://www.cfd-online.com/Forums/openfoam-solving/167677-doubt-about-drag-coefficient-cylinder.html)

CataV March 6, 2016 18:57

doubt about drag coefficient (cylinder)
 
Hello

I started recently with OpenFoam 2.4 simulations (2D) based on Vortex Induced Vibration around circular cylinder. I'm using pimpleDyFoam for dynamic mesh. I'm trying to calculate drag coefficient using "libforce.so" but I can't obtain good results. I'm using differents Reynolds values (40, 150, 500, 1000)

Information:
D=0.01, rho=1000, nu=1e-06
Re=40, v=0,004
Re=150, v=0,015
Re=500, v=0,05
Re=1000, v=0,1.

For now I'm working with Re=150 and try to adjust the data.
My controlDict:
Code:

application        pimpleDyFoam;

startFrom          startTime;

startTime          0;

stopAt              endTime;

endTime            50;

deltaT              0.00005;

writeControl        adjustableRunTime;

writeInterval      1;

purgeWrite          0;

writeFormat        ascii;

writePrecision      12;

writeCompression    uncompressed;//off;

timeFormat          general;

timePrecision      12;

runTimeModifiable  true;

adjustTimeStep  yes;

maxCo          0.5;

maxDeltaT    1.0;

libs ("libforces.so");

functions
{
  forceCoeffs
    {
      type forceCoeffs;
      functionObjectLibs ("libforces.so");
      patches (cylinder);
      directForceDensity no;
      pName p;
      UName U;
      rhoName rhoInf;
      rhoInf 1000;
      CofR (0 0 0);
      liftDir (0 1 0);
      dragDir (1 0 0);
      pitchAxis (0 0 1);
      magUInf 0.015;// Free stream velocity
      lRef 0.01;// Diameter of cylinder?
      Aref 0.000078;// Ref. Area = cross sectional area?
      outputControl timeStep;
      outputInterval 1;
    }

fvSolution
Code:

solvers
{
    pcorr
    {
        solver          GAMG;
        tolerance        0.001;
        relTol          0;
        smoother        GaussSeidel;
        nPreSweeps      0;
        nPostSweeps      2;
    nFinestSweeps      2;
        cacheAgglomeration false;
        agglomerator    faceAreaPair;
        nCellsInCoarsestLevel 10;
        mergeLevels      1;
    }
    p
    {
        $pcorr
        tolerance        1e-7;
        relTol          0.01;
    }

    pFinal
    {
        $p;
        tolerance        1e-7;
        relTol          0;
    }

    p_rgh
    {
    solver        GAMG;
    tolerance    1e-08;
    relTol        0.05;
    smoother    GaussSeidel;
    nPreSweeps    0;
    nPostSeeps    2;
    nFinestSweeps      2;
        cacheAgglomeration false;
        agglomerator    faceAreaPair;
        nCellsInCoarsestLevel 10;
        mergeLevels      1;
    }

    p_rghFinal
    {
        $p_rgh;
        tolerance        1e-8;
        relTol          0;
    }

    U
    {
    solver        smoothSolver;
    smoother    GaussSeidel;
    tolerance    1e-06;
    relTol        0;
    nSweeps        1;
    }

    UFinal
    {
    $U;
    tolerance    1e-05;
    relTol        0;
    }

    cellDisplacement
    {
        solver          GAMG;
        tolerance      1e-5;
        relTol          0;
        smoother        GaussSeidel;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator    faceAreaPair;
        mergeLevels    1;
    }
}

PIMPLE
{
    n0uterCorrector    10;
    nCorrectors    3;
    nNonOrthogonalCorrectors 0;
    pRefCell            0;
    pRefValue          0;
    residualControl
    {
        "(U|p)"
        {
                tolerance 1e-4;
                relTol 0;
        }
    }
}

fvSchemes
Code:

ddtSchemes
{
 default        Euler;
}

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

divSchemes
{
 //default        none;
 div(phi,U)        Gauss upwind;
 div((nuEff*dev(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
 default        Gauss linear limited corrected 0.5;
 
}

interpolationSchemes
{
 default          linear;
}

snGradSchemes
{
 default        corrected;
}

fluxRequired
{
 default        no;
 p_rgh        ;
 pcorr          ;
 p;
}


Kina March 7, 2016 00:10

I am not exactly sure what your setup looks like but if it's like a standard flow-over-cylinder setup you have calculated your reference area wrong. You take the cross sectional area which would be correct if the freestream would 'see' the cylinder from the top.
If the flow is around the cylinder it is supposed to be diameter x length (whatever height of mesh you have - I guess it's 1. If not, I recommend to change this to 1m :) ) so it would simply be aRef = l.

In case this is not the solution to the problem, your mesh, meshCheck output and BCs would be of importance.

CataV March 7, 2016 10:01

1 Attachment(s)
Quote:

Originally Posted by Kina (Post 588381)
I am not exactly sure what your setup looks like but if it's like a standard flow-over-cylinder setup you have calculated your reference area wrong. You take the cross sectional area which would be correct if the freestream would 'see' the cylinder from the top.
If the flow is around the cylinder it is supposed to be diameter x length (whatever height of mesh you have - I guess it's 1. If not, I recommend to change this to 1m :) ) so it would simply be aRef = l.

In case this is not the solution to the problem, your mesh, meshCheck output and BCs would be of importance.

Hello Alex
Thanks for your answer.
The flow is around the cylinder, so I shanged the reference area as you say (D=0.01, length=0.01). Also I checked the mesh but itīs fine.
I have experimental data: Re=40 Cd=1.8, Re=150 Cd=1.5, Re=500 Cd=1.2, Re=1000 Cd=0.9. As you can see in the attached the results are very strange. I dodn't know where are my errors

Please, if you need more information about my model feel free to ask.

Thanks again

Kina March 10, 2016 01:09

Sorry, I didn't have much time in the recent days. I don't see any specifications, relaxation factors, and schemes for turbulence in your case. What turbulence model are you running?

Cheers
Alex

CataV March 10, 2016 08:28

Hi Alex
Many thanks for your reply
Please check the information below

RAS Properties
Code:

RASModel        laminar;
turbulence      off;
printCoeffs    on;

Transport properties
Code:

transportModel  Newtonian;
nu            nu [0 2 -1 0 0 0 0] 1e-06;
rho          rho [1 -3 0 0 0 0 0] 1000;

Turbulence properties
Code:

simulationType  laminar;
I changed the schemes to try to improve results
Code:

ddtSchemes
{
    default            CrankNicolson 1;
}

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

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

laplacianSchemes
{
    default Gauss linear corrected;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        corrected;
}

fluxRequired
{
    default        no;
    p;
}

I'm not sure if I should use relaxation factors
If you can help me I'd be super grateful. :o

Kina March 10, 2016 09:08

Okay, maybe you should read into turbulence modelling a bit.
Your aim is to investigate vortex shedding at a cylinder but you are simulating laminar flow. That doesn't make much sense. Turn turbulence on, use the kOmegaSST or kkLOmega model and restart the simulation. Then the results should look much better. Maybe DES is also an option.

Cheers
Alex

CataV March 10, 2016 10:23

Hi

I will explain in detail my study case. I wanted to describe the fluid-induced problema of unsteady 2D flow past around fixed cylinder at diferents Reynols (low Reynolds, 40-1000). As I know this regime could be regarded as not turbulent, so I applied icoFoam and all went well. Then I needed to apply one degree of freedom, to considere only the lateral motion of the cylinder. That's why I changed icoFoam to pimpleDyFoam. Now I need to validate the model to continue with the next step, oscillating flow past around cylinder.
I have tried to consult the documentation and to my knowledge the turbulent model does not behave well with that regime. However, I will follow your advice and I'll post the results later

Thanks and best regards

Kina March 10, 2016 10:54

Quote:

Originally Posted by CataV (Post 589028)
Hi

I will explain in detail my study case. I wanted to describe the fluid-induced problema of unsteady 2D flow past around fixed cylinder at diferents Reynols (low Reynolds, 40-1000). As I know this regime could be regarded as not turbulent, so I applied icoFoam and all went well. Then I needed to apply one degree of freedom, to considere only the lateral motion of the cylinder. That's why I changed icoFoam to pimpleDyFoam. Now I need to validate the model to continue with the next step, oscillating flow past around cylinder.
I have tried to consult the documentation and to my knowledge the turbulent model does not behave well with that regime. However, I will follow your advice and I'll post the results later

Thanks and best regards

Alright, thanks for the explanation. I didn't want to offend you :) I just looked at pictures of cylinder flows at RE=1000 and it looked like there would indeed be turbulence involved. What do you mean by saying that 'all went well' with icoFoam? Did you get converged residuals or did you get satisfying drag values?

Cheers
Alex


All times are GMT -4. The time now is 05:49.