CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Verification & Validation (https://www.cfd-online.com/Forums/openfoam-verification-validation/)
-   -   Drag coefficient of sphere & spherical bubble at Re = 1 (https://www.cfd-online.com/Forums/openfoam-verification-validation/252582-drag-coefficient-sphere-spherical-bubble-re-1-a.html)

MontelukastNa October 27, 2023 03:52

Drag coefficient of sphere & spherical bubble at Re = 1
 
5 Attachment(s)
Hello, CFDers & OpenFOAMers

Recently, i am trying to validate the drag coefficient of sphere & spherical bubble at Re=1 with OpenFoam

In my opinion, i think the difference between flow around sphere(fixed position) and spherical bubble(fixed position) is only depends on the boundary condition of the interface. In a word, if the boundary is no-slip, it's a sphere, otherwise, a spherical bubble has slip interface. this topic is derived from professor Duineveld's publication:
Bel Fdhila, R., Duineveld, P.C., 1996. The effect of surfactant on the rise of a spherical bubble at high Reynolds and Peclet numbers. Phys. Fluids 8, 310–321.


The result of pimpleFoam simulated the sphere show me an perfect result, when Re is 1, the drag coefficient is 27.6, it is consistent with Schiller-Newman equation(Cd=24/Re*(1+0.15*Re^0.687)).

But, when I change the boundary condition from no-slip to slip, the result is not consistent with H-R equation(Cd=16/Re), my Cd result of spherical bubble is approximately equal to 13.:confused: that shoud be 16!

Here are my case code:
constant/transportProperties
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "constant";
    object      transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel  Newtonian;
nu              [0 2 -1 0 0 0 0] 2;

0.orig/p
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v1812                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }
    outlet
    {
        type            fixedValue;
        value          uniform 0;
    }

    bubbleInterface
    {
        type            slip;
        //type            fixedFluxPressure;
        //value          $internalField;
    }

    symmetry
    {
        type            symmetry;
    }
   
    front
    {
        type            wedge;
    }
    back
    {
        type            wedge;
    }
}

0.orig/U
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v1812                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField  uniform (1 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
        value          uniform (1 0 0);
    }
    outlet
    {
        type            zeroGradient;
    }

    bubbleInterface
    {
        type            slip;
    }

    symmetry
    {
        type            symmetry;
    }
   
    front
    {
        type            wedge;
    }
    back
    {
        type            wedge;
    }
}

system/fvSchemes
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default        backward;
}

gradSchemes
{
    default              cellLimited leastSquares 1;
}

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

laplacianSchemes
{
    default        Gauss linear limited 1;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        limited 1;
}


system/fvSolution
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver          GAMG;
        tolerance        1e-6;
        relTol          0;
        smoother        GaussSeidel;
        nPreSweeps      0;
        nPostSweeps      2;
        cacheAgglomeration on;
        agglomerator    faceAreaPair;
        nCellsInCoarsestLevel 100;
        mergeLevels      1;
        minIter        2;
    }

    pFinal
    {
        $p;
        relTol          0;
        minIter        2;
    }

    "(U|UFinal)"
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance      1e-08;
        relTol          0;
    }
}

PIMPLE
{
    momentumPredictor yes;
    consistent                yes; 
    nOuterCorrectors 2;
    nCorrectors 2;
    nNonOrthogonalCorrectors 1;

    //pRefCell        0;
    //pRefValue      0;
}

relaxationFactors
{
    fields
    {
        ".*"  0.9;
    }
    equations
    {
        ".*"  0.9;
    }
}


system/controlDict
Code:

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

application    pimpleFoam;
startFrom      latestTime;
startTime      0;
stopAt          endTime;
endTime        50;
deltaT          1;
writeControl    adjustableRunTime;
writeInterval  1;
purgeWrite      0;
writeFormat    ascii;
writePrecision  8;
writeCompression off;
timeFormat      general;
timePrecision  6;
runTimeModifiable yes;
adjustTimeStep  yes;
maxCo          1;
maxDeltaT      0.01;

functions

{
    Forces
    {
        type forces;
        libs ("libforces.so");
        patches (bubbleNoSlipWall bubbleSlipWall);
        log false;
        rho rhoInf;
        rhoInf 1;
        CofR (0 0 0);
        liftDir (0 1 0);
        dragDir (1 0 0);
        writeControl    adjustableRunTime;
        writeInterval  1;
    }

    forceCoeffs
    {
        type forceCoeffs;
        libs ("libforces.so");
        patches (bubbleNoSlipWall bubbleSlipWall);
        log true;
        rho rhoInf;
        rhoInf 1;
        CofR (0 0 0);
        liftDir (0 1 0);
        dragDir (1 0 0);
        pitchAxis (0 0 1);
        magUInf 1; // the velocity of flow at far field is 1/ms, then, Re=U*D/nu=1*2/2=1;
        lRef 2; //Diameter is 2, radiu is 1
        Aref 0.04363323129985824;  //5°Wedge Mesh, the project area is PI*1*1*5/360;
        writeControl    adjustableRunTime;
        writeInterval  1;
    }
};

Could you give me some suggestions or help me to debug the drag coefficient of spherical Bubble, thanks!

Thanks!

All Best,
Na

geth03 December 8, 2023 14:04

that is a cool project!

first of all, a bubble has lower drag bc of internal circulation, if you model it like a solid sphere and just apply a slip BC, that is not enough. you do not resolve the inner circulation!

the Hadamard–Rybczynski correction has viscosity terms! if you do not resolve the bubble, where is your viscosity then?

the better approach to validate this would be VoF simulation (interFoam)

jd87 January 30, 2024 13:44

Unable to validate Cd for rigid sphere
 
1 Attachment(s)
Hi Foamers,

I am new to pimpleFoam and was trying to validate the overall drag on a sphere due to a flow past it. I used the entries as stated above with the given geometry, I am not getting the drag coefficient of 27.6, I am getting something around 40. I have attached my case, it would be helpful if anyone could spot where I am going wrong or share any comment that would help me validate the same. Also, is there a 3D version for such validation in OF?

PS: To run the case, one has to convert the .geo file in constant to .msh using GMSH and then use the two following commands:
Code:

gmshToFoam constant/sphere.msh
pimpleFoam

In case GMSH is not available, kindly drop a reply, and I will share the files over a link.

Thanks in anticipation,
JD

jmqmyllife February 1, 2024 20:01

Quote:

Originally Posted by MontelukastNa (Post 858944)
Hello, CFDers & OpenFOAMers

Recently, i am trying to validate the drag coefficient of sphere & spherical bubble at Re=1 with OpenFoam

In my opinion, i think the difference between flow around sphere(fixed position) and spherical bubble(fixed position) is only depends on the boundary condition of the interface. In a word, if the boundary is no-slip, it's a sphere, otherwise, a spherical bubble has slip interface. this topic is derived from professor Duineveld's publication:
Bel Fdhila, R., Duineveld, P.C., 1996. The effect of surfactant on the rise of a spherical bubble at high Reynolds and Peclet numbers. Phys. Fluids 8, 310–321.


The result of pimpleFoam simulated the sphere show me an perfect result, when Re is 1, the drag coefficient is 27.6, it is consistent with Schiller-Newman equation(Cd=24/Re*(1+0.15*Re^0.687)).

But, when I change the boundary condition from no-slip to slip, the result is not consistent with H-R equation(Cd=16/Re), my Cd result of spherical bubble is approximately equal to 13.:confused: that shoud be 16!

Here are my case code:
constant/transportProperties
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "constant";
    object      transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel  Newtonian;
nu              [0 2 -1 0 0 0 0] 2;

0.orig/p
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v1812                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }
    outlet
    {
        type            fixedValue;
        value          uniform 0;
    }

    bubbleInterface
    {
        type            slip;
        //type            fixedFluxPressure;
        //value          $internalField;
    }

    symmetry
    {
        type            symmetry;
    }
   
    front
    {
        type            wedge;
    }
    back
    {
        type            wedge;
    }
}

0.orig/U
Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  v1812                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField  uniform (1 0 0);

boundaryField
{
    inlet
    {
        type            fixedValue;
        value          uniform (1 0 0);
    }
    outlet
    {
        type            zeroGradient;
    }

    bubbleInterface
    {
        type            slip;
    }

    symmetry
    {
        type            symmetry;
    }
   
    front
    {
        type            wedge;
    }
    back
    {
        type            wedge;
    }
}

system/fvSchemes
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default        backward;
}

gradSchemes
{
    default              cellLimited leastSquares 1;
}

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

laplacianSchemes
{
    default        Gauss linear limited 1;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        limited 1;
}


system/fvSolution
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    p
    {
        solver          GAMG;
        tolerance        1e-6;
        relTol          0;
        smoother        GaussSeidel;
        nPreSweeps      0;
        nPostSweeps      2;
        cacheAgglomeration on;
        agglomerator    faceAreaPair;
        nCellsInCoarsestLevel 100;
        mergeLevels      1;
        minIter        2;
    }

    pFinal
    {
        $p;
        relTol          0;
        minIter        2;
    }

    "(U|UFinal)"
    {
        solver          PBiCGStab;
        preconditioner  DILU;
        tolerance      1e-08;
        relTol          0;
    }
}

PIMPLE
{
    momentumPredictor yes;
    consistent                yes; 
    nOuterCorrectors 2;
    nCorrectors 2;
    nNonOrthogonalCorrectors 1;

    //pRefCell        0;
    //pRefValue      0;
}

relaxationFactors
{
    fields
    {
        ".*"  0.9;
    }
    equations
    {
        ".*"  0.9;
    }
}


system/controlDict
Code:

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

application    pimpleFoam;
startFrom      latestTime;
startTime      0;
stopAt          endTime;
endTime        50;
deltaT          1;
writeControl    adjustableRunTime;
writeInterval  1;
purgeWrite      0;
writeFormat    ascii;
writePrecision  8;
writeCompression off;
timeFormat      general;
timePrecision  6;
runTimeModifiable yes;
adjustTimeStep  yes;
maxCo          1;
maxDeltaT      0.01;

functions

{
    Forces
    {
        type forces;
        libs ("libforces.so");
        patches (bubbleNoSlipWall bubbleSlipWall);
        log false;
        rho rhoInf;
        rhoInf 1;
        CofR (0 0 0);
        liftDir (0 1 0);
        dragDir (1 0 0);
        writeControl    adjustableRunTime;
        writeInterval  1;
    }

    forceCoeffs
    {
        type forceCoeffs;
        libs ("libforces.so");
        patches (bubbleNoSlipWall bubbleSlipWall);
        log true;
        rho rhoInf;
        rhoInf 1;
        CofR (0 0 0);
        liftDir (0 1 0);
        dragDir (1 0 0);
        pitchAxis (0 0 1);
        magUInf 1; // the velocity of flow at far field is 1/ms, then, Re=U*D/nu=1*2/2=1;
        lRef 2; //Diameter is 2, radiu is 1
        Aref 0.04363323129985824;  //5°Wedge Mesh, the project area is PI*1*1*5/360;
        writeControl    adjustableRunTime;
        writeInterval  1;
    }
};

Could you give me some suggestions or help me to debug the drag coefficient of spherical Bubble, thanks!

Thanks!

All Best,
Na

Have you solved the problem? I have the same problem with you when I just set the boundary condition as slip on the sphere surface for the bubble. The drag coefficient is also 13.74 at Re=1. Could you tell me how to solve it? Thanks in advance.

kriegman February 2, 2024 12:03

Hello Foamers,

So I'm also investigating a similar problem with an implementation of the Navier slip for the modeling of flow around bubbles with different "surface contamination" level.

While trying to validate an implementation of the Navier Slip BC, I Noticed that the solution (for the case where the slip length tends to infinity, which means the free slip condition) doesn't fit the analytical one. And I have similar results to MontelukastNa. i.e for Re = 1, C_D \approx 24.7 for the no-slip condition (case of a solid sphere) and C_D \approx 12 for the slip (case of a clean bubble). Looking at the tangential velocity at the bubble's surface, it reaches a maximum of u_t \approx 0.75 U_\infty instead of the analytical solution of u_t = 0.5U_\infty

Some investigation. I found this bug report dating from 2016 where the author claims that he has a better solution when using the symmetry (geometry) condition on the surface of the sphere. I tried it, and it does work and provides the correct value for the drag coefficient, i.e C_D \approx 16 for Re << 1.

Looking at the code, both the the slip condition and the symmetry patch type are implemented by inheriting basicSymmetryFvPatch so the two are equivalent. (reference)

The symmetry condition is a geometrical one, and the only difference is that the symmetry condition ensures that the basicSymmetry condition is applied to ALL the fields. As Mr Henry Weller put it in his response.
Quote:

'slip' is a BC choice and for a vector field is equivalent to 'symmetry' but is only applied to that field not to associated fields e.g. 'H/A'.
.
I haven't had an opportunity to investigate this further yet, and would be interested if you have any idea on why we have such a discrepancy?

I would be posting here some simple test cases when possible.

Note : this seems to be happening only with curved patches. AFAIK this discrepancy between the slip and symmetry conditions doesn't show for planar problems.


TLDR: Use the symmetry geometrical condition for curved patches. The slip boundary condition (although sharing the same implementation) seems to underpredict the drag force (and overpredict the max tangential slip velocity) for curved patches.


Kamel O.

jd87 February 3, 2024 23:11

Hi,

I have attempted to solve for Re=1 but cannot get the 24.7 value for Cd. I have attached my files two replies before in this thread, can you help me with the issue and where I am doing wrong, it would be of great help, thanks.

Jay

kriegman February 5, 2024 04:12

Quote:

Originally Posted by jd87 (Post 864208)
Hi,

I have attempted to solve for Re=1 but cannot get the 24.7 value for Cd. I have attached my files two replies before in this thread, can you help me with the issue and where I am doing wrong, it would be of great help, thanks.

Jay

Hi,
I have no problem for the case of the solid sphere. Are you sure you're setting the noSlip condition on the velocity and zeroGradient on the pressure ?
can you provide the mesh for your case as I dont have Gmsh available.



Kamel

jd87 February 6, 2024 01:52

Quote:

Originally Posted by kriegman (Post 864248)
Hi,
I have no problem for the case of the solid sphere. Are you sure you're setting the noSlip condition on the velocity and zeroGradient on the pressure ?
can you provide the mesh for your case as I dont have Gmsh available.



Kamel


Hi,


Yes, I have essentially used noSlip, I have used a zero velocity boundary condition, you may view that in my zip file previously attached. For pressure, I am also using zeroGradient, I don't know where I am missing something. You can find my constant folder with the .msh file as well as the compiled mesh in this link:
https://drive.google.com/file/d/1TPD...ew?usp=sharing



You can also email me at
jayabratadhar03@gmail.com
in case if you wish to share some files.


Thanks a lot for your kind reply.


Best Regards,
Jay

nipinl February 9, 2024 09:58

Cd found to be 40 instead of 27.6
 
Hi,

I too get Cd ~40 for sphere, with Re=1 in axi-symmetric case. Could you sort out the issue?

jd87 February 9, 2024 22:54

Hi,

Let me know if you have solved the issue with Cd~40 and not ~27 (which is right) for Re=1.

Thanks,

nipinl February 10, 2024 09:31

Solved. Got the value 27.538
 
1 Attachment(s)
Finer mesh (specially near to boundary)solved the problem. For those who are interested, please find the attached case file and gmsh script.

jd87 February 11, 2024 11:03

1 Attachment(s)
Thanks a lot, Nipin L for the files. I have made some changes in the run.sh and controlDict file since it was not running properly (maybe due to compatible issues) and re-attaching the files for further help to new Foamers. The present file is checked to run with OpenFOAM v8 and v10.

Preferably, install Gmsh v2.16 (a later version would work, then export the mesh in version 2 format).

hope it helps!

Thanks.

jmqmyllife February 19, 2024 01:05

Quote:

Originally Posted by kriegman (Post 864173)
Hello Foamers,

So I'm also investigating a similar problem with an implementation of the Navier slip for the modeling of flow around bubbles with different "surface contamination" level.

While trying to validate an implementation of the Navier Slip BC, I Noticed that the solution (for the case where the slip length tends to infinity, which means the free slip condition) doesn't fit the analytical one. And I have similar results to MontelukastNa. i.e for Re = 1, C_D \approx 24.7 for the no-slip condition (case of a solid sphere) and C_D \approx 12 for the slip (case of a clean bubble). Looking at the tangential velocity at the bubble's surface, it reaches a maximum of u_t \approx 0.75 U_\infty instead of the analytical solution of u_t = 0.5U_\infty

Some investigation. I found this bug report dating from 2016 where the author claims that he has a better solution when using the symmetry (geometry) condition on the surface of the sphere. I tried it, and it does work and provides the correct value for the drag coefficient, i.e C_D \approx 16 for Re << 1.

Looking at the code, both the the slip condition and the symmetry patch type are implemented by inheriting basicSymmetryFvPatch so the two are equivalent. (reference)

The symmetry condition is a geometrical one, and the only difference is that the symmetry condition ensures that the basicSymmetry condition is applied to ALL the fields. As Mr Henry Weller put it in his response.
.
I haven't had an opportunity to investigate this further yet, and would be interested if you have any idea on why we have such a discrepancy?

I would be posting here some simple test cases when possible.

Note : this seems to be happening only with curved patches. AFAIK this discrepancy between the slip and symmetry conditions doesn't show for planar problems.


TLDR: Use the symmetry geometrical condition for curved patches. The slip boundary condition (although sharing the same implementation) seems to underpredict the drag force (and overpredict the max tangential slip velocity) for curved patches.


Kamel O.

Hi kriegman,

Could you share the case files for the flow past a bubble?
I used symmetry boundary conditions on bubble's surface, but still did not get satisfactory drag force.

Thanks in advance


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