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/)
-   -   bubbleFoam tutorial case with turbulence (https://www.cfd-online.com/Forums/openfoam-solving/128792-bubblefoam-tutorial-case-turbulence.html)

setzberg January 21, 2014 10:39

bubbleFoam tutorial case with turbulence
 
Hello,

I copied the tutorial case for the bubbleFoam solver. I want to do a simulation with turbulence. I use OpenFOAM 2.1.1

Therefore I did the following changes in constant/RASProperties

Code:

RASModel        kEpsilon;

turbulence      on;

printCoeffs    on;

Additionally I added the following lines in system/fvSchemes to laplacianSchemes

Code:

laplacian(DepsilonEff,epsilon) Gauss linear corrected;

laplacian(DkEff,k) Gauss linear corrected;

and the following in system/fvSolution to solvers:

Code:

kFinal
    {
        $alpha;
        tolerance      1e-10;
        relTol          0;
    }

    epsilonFinal
    {
        $alpha;
        tolerance      1e-10;
        relTol          0;
    }

Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.1-221db2718bbb
Exec  : bubbleFoam
Date  : Jan 21 2014
Time  : 16:36:39
Host  : "markusUbuntuPC"
PID    : 8701
Case  : /home/markus/OpenFOAM/markus-2.1.1/run/bubbleColumnTutorial
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


Reading g
Reading field alpha

Reading field p

Reading field Ua

Reading field Ub

Reading transportProperties

Calculating face flux field phia

Calculating face flux field phib

kEpsilonCoeffs
{
    Cmu            0.09;
    C1              1.44;
    C2              1.92;
    alphak          1;
    alphaEps        0.76923;
}

wallFunctionCoeffs
{
    kappa          0.41;
    E              9.8;
}

Reading field k

Reading field epsilon

Calculating field nutb

Calculating field nuEffa

Calculating field nuEffb

Calculating field DDtUa and DDtUb

Calculating field g.h

Courant Number mean: 0.053388 max: 0.207813

PIMPLE: Operating solver in PISO mode


Starting time loop

Courant Number mean: 0.053388 max: 0.207813
Time = 0.002

Max Ur Courant Number = 0.172395
DILUPBiCG:  Solving for alpha, Initial residual = 0.0021426, Final residual = 5.45235e-12, No Iterations 3
DILUPBiCG:  Solving for alpha, Initial residual = 8.98342e-05, Final residual = 1.63347e-12, No Iterations 3
Dispersed phase volume fraction = 0.36753  Min(alpha) = -0.0291739  Max(alpha) = 1.00075
DICPCG:  Solving for p, Initial residual = 6.61573e-05, Final residual = 5.80641e-06, No Iterations 3
time step continuity errors : sum local = 1.42929e-05, global = -1.2315e-06, cumulative = -1.2315e-06
DICPCG:  Solving for p, Initial residual = 1.14421e-05, Final residual = 9.11862e-11, No Iterations 65
time step continuity errors : sum local = 2.24465e-10, global = 4.65408e-12, cumulative = -1.23149e-06
DILUPBiCG:  Solving for epsilon, Initial residual = 0.999995, Final residual = 1.59838e-11, No Iterations 1
DILUPBiCG:  Solving for k, Initial residual = 1, Final residual = 5.3506e-11, No Iterations 42
ExecutionTime = 0.05 s  ClockTime = 0 s

Courant Number mean: 0.0534269 max: 0.207502
Time = 0.004

Max Ur Courant Number = 0.167411
DILUPBiCG:  Solving for alpha, Initial residual = 0.00196793, Final residual = 6.01008e-12, No Iterations 3
DILUPBiCG:  Solving for alpha, Initial residual = 6.76905e-05, Final residual = 4.91127e-13, No Iterations 3
Dispersed phase volume fraction = 0.36753  Min(alpha) = -0.0172796  Max(alpha) = 1.00068
DICPCG:  Solving for p, Initial residual = 0.000147469, Final residual = 5.45488e-06, No Iterations 2
time step continuity errors : sum local = 1.35211e-05, global = 9.39624e-07, cumulative = -2.91871e-07
DICPCG:  Solving for p, Initial residual = 7.55098e-06, Final residual = 7.88894e-11, No Iterations 66
time step continuity errors : sum local = 1.95519e-10, global = 3.53133e-11, cumulative = -2.91835e-07
DILUPBiCG:  Solving for epsilon, Initial residual = 0.841785, Final residual = 4.05909e-11, No Iterations 8
DILUPBiCG:  Solving for k, Initial residual = 0.991263, Final residual = 4.04622e-11, No Iterations 53
ExecutionTime = 0.08 s  ClockTime = 0 s

Courant Number mean: 0.0534173 max: 0.207104
Time = 0.006

Max Ur Courant Number = 0.162844
DILUPBiCG:  Solving for alpha, Initial residual = 0.00195171, Final residual = 5.86516e-12, No Iterations 3
DILUPBiCG:  Solving for alpha, Initial residual = 6.08262e-05, Final residual = 9.84431e-11, No Iterations 2
Dispersed phase volume fraction = 0.36753  Min(alpha) = -0.0062796  Max(alpha) = 1.0006
DICPCG:  Solving for p, Initial residual = 8.24708e-05, Final residual = 6.16601e-06, No Iterations 2
time step continuity errors : sum local = 7.94365e-06, global = -2.95386e-07, cumulative = -5.87221e-07
DICPCG:  Solving for p, Initial residual = 1.91089e-05, Final residual = 7.95161e-11, No Iterations 66
time step continuity errors : sum local = 1.02443e-10, global = 8.20917e-12, cumulative = -5.87213e-07
DILUPBiCG:  Solving for epsilon, Initial residual = 0.677379, Final residual = 4.25709e-11, No Iterations 30
DILUPBiCG:  Solving for k, Initial residual = 0.896536, Final residual = 6.25555e-11, No Iterations 44
ExecutionTime = 0.11 s  ClockTime = 0 s

Courant Number mean: 0.053389 max: 0.206805
Time = 0.008

Max Ur Courant Number = 0.157728
DILUPBiCG:  Solving for alpha, Initial residual = 0.00193409, Final residual = 4.65798e-12, No Iterations 3
DILUPBiCG:  Solving for alpha, Initial residual = 5.91968e-05, Final residual = 8.86608e-11, No Iterations 2
Dispersed phase volume fraction = 0.36753  Min(alpha) = 0.00401149  Max(alpha) = 1.00056
DICPCG:  Solving for p, Initial residual = 0.000286388, Final residual = 2.81435e-05, No Iterations 8
time step continuity errors : sum local = 1.92615e-05, global = 6.51325e-07, cumulative = 6.41128e-08
DICPCG:  Solving for p, Initial residual = 8.11862e-05, Final residual = 9.94891e-11, No Iterations 73
time step continuity errors : sum local = 6.8192e-11, global = 5.36978e-12, cumulative = 6.41182e-08
DILUPBiCG:  Solving for epsilon, Initial residual = 0.129222, Final residual = 9.15914e-12, No Iterations 25
DILUPBiCG:  Solving for k, Initial residual = 0.757339, Final residual = 4.95247e-11, No Iterations 44
ExecutionTime = 0.13 s  ClockTime = 0 s

Courant Number mean: 0.0533735 max: 0.206451
Time = 0.01

Max Ur Courant Number = 0.156645
DILUPBiCG:  Solving for alpha, Initial residual = 0.00191571, Final residual = 5.1319e-12, No Iterations 3
DILUPBiCG:  Solving for alpha, Initial residual = 5.70908e-05, Final residual = 1.42504e-12, No Iterations 3
Dispersed phase volume fraction = 0.367529  Min(alpha) = 0.0136969  Max(alpha) = 1.00051
DICPCG:  Solving for p, Initial residual = 0.0279428, Final residual = 0.00133899, No Iterations 2
time step continuity errors : sum local = 0.00345412, global = 0.000955208, cumulative = 0.000955272
DICPCG:  Solving for p, Initial residual = 0.00157094, Final residual = 7.43963e-11, No Iterations 75
time step continuity errors : sum local = 1.71787e-10, global = 5.45734e-12, cumulative = 0.000955272
DILUPBiCG:  Solving for epsilon, Initial residual = 0.290322, Final residual = 3.03356e-11, No Iterations 15
DILUPBiCG:  Solving for k, Initial residual = 0.989327, Final residual = 4.09582e-11, No Iterations 103
ExecutionTime = 0.17 s  ClockTime = 0 s

Courant Number mean: 0.0535236 max: 0.206076
Time = 0.012

Max Ur Courant Number = 0.346255
DILUPBiCG:  Solving for alpha, Initial residual = 0.00205554, Final residual = 5.93573e-12, No Iterations 3
DILUPBiCG:  Solving for alpha, Initial residual = 7.4096e-05, Final residual = 1.86119e-13, No Iterations 3
Dispersed phase volume fraction = 0.367529  Min(alpha) = 0.0228536  Max(alpha) = 1.00047
DICPCG:  Solving for p, Initial residual = 0.905281, Final residual = 0.0282922, No Iterations 2
time step continuity errors : sum local = 0.0579972, global = 4.73252e-07, cumulative = 0.000955745
DICPCG:  Solving for p, Initial residual = 5.80309e-11, Final residual = 5.80309e-11, No Iterations 0
time step continuity errors : sum local = 0.0615709, global = -2.19258e-08, cumulative = 0.000955723
DILUPBiCG:  Solving for epsilon, Initial residual = 0.954852, Final residual = 5.33251e-13, No Iterations 1
DILUPBiCG:  Solving for k, Initial residual = 1, Final residual = 0.00686899, No Iterations 1001
ExecutionTime = 0.28 s  ClockTime = 0 s

Courant Number mean: 0.125379 max: 6.10744
Time = 0.014

Max Ur Courant Number = 5.84605
DILUPBiCG:  Solving for alpha, Initial residual = 0.0944949, Final residual = 1.81182e-11, No Iterations 7
DILUPBiCG:  Solving for alpha, Initial residual = 0.204583, Final residual = 8.27286e-12, No Iterations 11
Dispersed phase volume fraction = 0.367529  Min(alpha) = 0.0235109  Max(alpha) = 2.333
DICPCG:  Solving for p, Initial residual = 0.996327, Final residual = 0.0813598, No Iterations 1
time step continuity errors : sum local = 2.42079e+11, global = -5.14632e+09, cumulative = -5.14632e+09
DICPCG:  Solving for p, Initial residual = 2.31678e-20, Final residual = 2.31678e-20, No Iterations 0
time step continuity errors : sum local = 3.13425e+12, global = -5.5099e+09, cumulative = -1.06562e+10
DILUPBiCG:  Solving for epsilon, Initial residual = 0.262546, Final residual = 0.000207751, No Iterations 1001
DILUPBiCG:  Solving for k, Initial residual = 1, Final residual = 7.34295e+07, No Iterations 1001
ExecutionTime = 0.5 s  ClockTime = 1 s

Courant Number mean: 1.8631e+12 max: 1.31834e+15
Time = 0.016

Max Ur Courant Number = 2.49974e+15
DILUPBiCG:  Solving for alpha, Initial residual = 0.998815, Final residual = 3.6838e-11, No Iterations 120
DILUPBiCG:  Solving for alpha, Initial residual = 1, Final residual = 1.63103e-11, No Iterations 51
Dispersed phase volume fraction = -1.35014e+24  Min(alpha) = -1.50905e+27  Max(alpha) = 2.04827e+26
DICPCG:  Solving for p, Initial residual = 1, Final residual = 3.40176e+20, No Iterations 1001
time step continuity errors : sum local = 1.52312e+59, global = 2.12901e+42, cumulative = 2.12901e+42
DICPCG:  Solving for p, Initial residual = 0.000401859, Final residual = 9927.39, No Iterations 1001
time step continuity errors : sum local = 7.30319e+98, global = -6.49763e+82, cumulative = -6.49763e+82
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#4  Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#5 
 at ??:?
#6 
 at ??:?
#7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8 
 at ??:?


nimasam January 21, 2014 11:34

your case is diverging :),you may want to play with your BC and your schemes :D
for Schemes i suggest to use an upwind (bounded scheme for k and epsilon)

setzberg January 23, 2014 06:15

Thanks for your reply! I also think that there is a problem with BC. The diverging Courant number is a problem, which occurs in several other threads. But there is also no hint how to solve this.

http://www.cfd-online.com/Forums/ope...ubblefoam.html

http://www.cfd-online.com/Forums/ope...lent-case.html

http://www.cfd-online.com/Forums/ope...rial-case.html

http://www.cfd-online.com/Forums/ope...ubblefoam.html

Can anyone tell me, how to change the BC so that the tutorial case works with turbulent flow? Or if the BC are not the problem, what has to be changed then? I already tried to change the scheme as nimasam suggests, but this does not prevent the Courant number to diverge.

nimasam January 23, 2014 06:34

whats ur BC for k and epsilon?

setzberg January 23, 2014 06:56

These are the BC as given in the tutorial case bubbleFoam

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 0.0002;

boundaryField
{
    inlet
    {
        type            fixedValue;
        value          uniform 0.0002;
    }

    outlet
    {
        type            inletOutlet;
        inletValue      uniform 0.0002;
        value          uniform 0.0002;
    }

    walls
    {
        type            zeroGradient;
    }

    defaultFaces
    {
        type            empty;
    }
}

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField  uniform 1e-8;

boundaryField
{
    inlet
    {
        type            fixedValue;
        value          uniform 1e-8;
    }

    outlet
    {
        type            inletOutlet;
        inletValue      uniform 1e-8;
        value          uniform 1e-8;
    }

    walls
    {
        type            zeroGradient;
    }

    defaultFaces
    {
        type            empty;
    }
}

Do I have to use kqRWallFunction and epsilonWallFunction?

nimasam January 23, 2014 11:23

well, how did you calculate inlet values for k and epsilon? you can also use wallFunctions for wall patches.

masoudsh October 15, 2015 13:29

BubbleFoam limitations
 
I want to use bubblefoam solver but it prevents on my work, because of bubblefoam limitations.

BubbleFoam limitations

The diameter of the particles constituting the dispersed phase is assumed to be consistent. Aggregation, breakage and coalescence phenomena are not accounted for.

What is your suggestion?
DO you know any solver uses Euler mixture model ?

thank you


All times are GMT -4. The time now is 10:41.