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/)
-   -   "reactingParcelFoam" active gravity, high courant number (https://www.cfd-online.com/Forums/openfoam-solving/168580-reactingparcelfoam-active-gravity-high-courant-number.html)

bijan darbari March 24, 2016 15:43

"reactingParcelFoam" active gravity, high courant number
 
1 Attachment(s)
Dear all

I,m solving laminar flow and heat transfer of liquid water between two parallel plates. for the first case, lagrangian particles didn't injected.

when the gravity is ( 0 0 0 ), the courant number is less than 0.12 but when the gravity is ( 0 -9.81 0 ) or ( 0 9.81 0 ) and with the same time step & BC, the courant number is higher than 200.
the case file attached.

1- what is the problem for hight courant number??
2- Is P boundary condition true??
3- Is thermophysical properties true for liquid water with constant value ( no variate with temperature )??

Boundary and Initial conditions:
Code:

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

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 1.0;

boundaryField
{
    frontAndBack
    {
        type            empty;
    }
   
    top
    {
        type            zeroGradient;
    }

    bottom
    {
        type            zeroGradient;
    }


    outlet
    {
        type            inletOutlet;
        inletValue      uniform 0.0;
    }
   
    inlet
    {
        type            fixedValue;
        value          uniform 1.0;
    }
}


// ************************************************************************* //

Code:

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

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

internalField  uniform 100000;

boundaryField
{
    frontAndBack
    {
        type            empty;
    }
   
    inlet
    {
        type            zeroGradient;
    }
   
    outlet
    {
        type            fixedValue;
        value          uniform 100000;
    }
    top
    {
        type            zeroGradient;
    }
    bottom
    {
        type            zeroGradient;
    }
}


// ************************************************************************* //

Code:

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

dimensions      [0 0 0 1 0 0 0];

internalField  uniform 273.0;

boundaryField
{
    frontAndBack
    {
        type            empty;
    }
   
    top
    {
        type            zeroGradient;
    }
    bottom
    {
        type            zeroGradient;
    }
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 273.0;
    }
 
    inlet
    {
        type            fixedValue;
        value          uniform 273.0;
    }
}


// ************************************************************************* //

Code:

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

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

internalField  uniform (0 0 0);

boundaryField
{
    frontAndBack
    {
        type          empty;
    }
   
    inlet
    {
        type            fixedValue;
        value          uniform (0.001 0 0);
    }
 
    outlet
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
    }
    top
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
    bottom
    {
        type            fixedValue;
        value          uniform (0 0 0);
    }
}


// ************************************************************************* //


the flow is laminar and turbulence is off:

Code:

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

simulationType  laminar;

RAS
{
    RASModel            kEpsilon;

    turbulence          off;

    printCoeffs        off;
}


// ************************************************************************* //

chemistry , combustion and radiation is off

lgrangian particles didn't injected.

reactions:

Code:

species
(
   
    H2O
);

reactions
{}

thermophysical properties have constant value:

Code:

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

thermoType
{
    type            heRhoThermo;
    mixture        reactingMixture;
    transport      polynomial;
    thermo          hPolynomial;
    energy          sensibleEnthalpy;
    equationOfState icoPolynomial;
    specie          specie;
}

dpdt no;

chemistryReader foamChemistryReader;

foamChemistryFile "$FOAM_CASE/constant/reactions";

foamChemistryThermoFile "$FOAM_CASE/constant/thermo.incompressiblePoly";

inertSpecie    H2O;

liquids
{
    H2O
    {
        defaultCoeffs  yes;
    }
}

solids
{
    C
    {
        defaultCoeffs  no;
        // if  defaultCoeffs no properties should be :
        CCoeffs
        {
            rho            2010;
            Cp              710;
            K              0.04;
            Hf              0;
            emissivity      1.0;
        }
    }
   
}



// ************************************************************************* //

Code:

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



H2O
{
    specie
    {
        nMoles          1;
        molWeight      18.0153;
    }
    equationOfState
    {
        rhoCoeffs<8>    ( 1000 0 0 0 0 0 0 0 );
    }
    thermodynamics
    {
        Hf              -13423000;
        Sf              10482;
        CpCoeffs<8>    ( 4800 0 0 0 0 0 0 0 );
    }
    transport
    {
        muCoeffs<8>    ( 0.001 0 0 0 0 0 0 0 );
        kappaCoeffs<8>  ( 0.6 0 0 0 0 0 0 0 );
    }
}





// ************************************************************************* //

system files:

Code:

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

application    reactingParcelFoam;

startFrom      latestTime;

startTime      0;

stopAt          endTime;

endTime        10000;

deltaT          1;

writeControl    adjustableRunTime;

writeInterval  250;

purgeWrite      0;

writeFormat    ascii;

writePrecision  10;

writeCompression off;

timeFormat      general;

timePrecision  6;

runTimeModifiable true;

adjustTimeStep  no;

maxCo          6;

maxDeltaT      1;

functions
{
    faceSource1
    {
        type            faceSource;
        functionObjectLibs ("libfieldFunctionObjects.so");
        enabled        yes;
        outputControl  outputTime;
        log            yes;
        valueOutput    no;
        source          patch;
        sourceName      outlet;
        operation      weightedAverage;
        weightField    phi;

        fields
        (
            H2O
            T
        );
    }
}

// ************************************************************************* //

Code:

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

ddtSchemes
{
    default        Euler;
}

gradSchemes
{
    default        Gauss linear;
}

divSchemes
{
    default        none;
    div(phi,U)      Gauss upwind;
    div(phid,p)    Gauss upwind;
    div(phi,K)      Gauss upwind;
    div(phi,h)      Gauss upwind;
    div(phi,k)      Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div(phi,omega) Gauss upwind;
    div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
    div(phi,Yi_h)  Gauss upwind;
}

laplacianSchemes
{
    default        Gauss linear uncorrected;
}

interpolationSchemes
{
    default        linear;
}

snGradSchemes
{
    default        uncorrected;
}

wallDist
{
    method meshWave;
}


// ************************************************************************* //

Code:

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

solvers
{
    rho
    {
        solver          PCG;
        preconditioner  DIC;
        tolerance      1e-05;
        relTol          0.1;
    }

    rhoFinal
    {
        $rho;
        tolerance      1e-05;
        relTol          0;
    }

    "(U|k|omega)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance      1e-06;
        relTol          0.1;
    }

    "(U|k|omega)Final"
    {
        $U;
        tolerance      1e-06;
        relTol          0;
    }

    p
    {
        solver          GAMG;
        tolerance      1e-5;
        relTol          0.1;
        smoother        DICGaussSeidel;
        nPreSweeps      0;
        nPostSweeps    2;
        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator    faceAreaPair;
        mergeLevels    1;
    }

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

    Phi
    {
        $p;
    }

    "(Yi|O2|N2|H2O)"
    {
        solver          PBiCG;
        preconditioner  DILU;
        tolerance      1e-6;
        relTol          0;
    }
    h
    {
        $Yi;
        relTol          0.1;
    }
    hFinal
    {
        $Yi;
    }
}

potentialFlow
{
    // Used for potentialFoam initialisation
    nNonOrthogonalCorrectors 5;
}

PIMPLE
{
    transonic      no;
    nOuterCorrectors 1;
    nCorrectors    3;
    nNonOrthogonalCorrectors 0;
    momentumPredictor yes;
}

relaxationFactors
{
    equations
    {
        ".*"            0.3;
    }
}

best regards and sorry for poor english.
bijan.

// ************************************************************************* //


bijan darbari March 24, 2016 15:44

solution log for gravity off :

Code:


Courant Number mean: 0.00025 max: 0.025

Starting time loop



Courant Number mean: 0.00025 max: 0.025
Time = 1


Solving 2-D cloud reactingCloud1
Cloud: reactingCloud1
    Current number of parcels      = 0
    Current mass in system          = 0
    Linear momentum                = (0 0 0)
  |Linear momentum|                = 0
    Linear kinetic energy          = 0
    model1:
        number of parcels added    = 0
        mass introduced            = 0
    Parcel fate (number, mass)      : patch frontAndBack
      - escape                      = 0, 0
      - stick                      = 0, 0
    Parcel fate (number, mass)      : patch top
      - escape                      = 0, 0
      - stick                      = 0, 0
    Parcel fate (number, mass)      : patch bottom
      - escape                      = 0, 0
      - stick                      = 0, 0
    Parcel fate (number, mass)      : patch inlet
      - escape                      = 0, 0
      - stick                      = 0, 0
    Parcel fate (number, mass)      : patch outlet
      - escape                      = 0, 0
      - stick                      = 0, 0
    Temperature min/max            = 0, 0
    Mass transfer phase change      = 0
    Mass transfer devolatilisation  = 0
    Mass transfer surface reaction  = 0

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
rho min/max = 1000, 1050
PIMPLE: iteration 1
smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 2.805340292e-09, No Iterations 3
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 8.035659584e-07, No Iterations 2
DILUPBiCG:  Solving for h, Initial residual = 0.2856871627, Final residual = 1.579236067e-07, No Iterations 1
T gas min/max  = 273, 273
GAMG:  Solving for p, Initial residual = 0.9999996455, Final residual = 0.06969518796, No Iterations 4
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
rho min/max = 999.8685806, 1000.213728
time step continuity errors : sum local = 3.484765787e-05, global = 1.074365892e-06, cumulative = 1.074365892e-06
p min/max = 100000, 100008.7442
GAMG:  Solving for p, Initial residual = 0.000695904952, Final residual = 3.053024336e-05, No Iterations 4
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
rho min/max = 999.9805234, 1000.010166
time step continuity errors : sum local = 3.057088162e-06, global = -2.415305235e-08, cumulative = 1.05021284e-06
p min/max = 100000, 100008.221
GAMG:  Solving for p, Initial residual = 5.390452973e-05, Final residual = 7.136039323e-07, No Iterations 5
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
rho min/max = 999.9996818, 1000.000402
time step continuity errors : sum local = 6.711047412e-08, global = 4.424744286e-10, cumulative = 1.050655314e-06
p min/max = 100000, 100008.2055
ExecutionTime = 0.37 s  ClockTime = 0 s

Courant Number mean: 0.05003502313 max: 0.05579121988
Time = 2


solution log for gravity on:

Code:



Courant Number mean: 0.00025 max: 0.025
Time = 1


Solving 2-D cloud reactingCloud1
Cloud: reactingCloud1
    Current number of parcels      = 0
    Current mass in system          = 0
    Linear momentum                = (0 0 0)
  |Linear momentum|                = 0
    Linear kinetic energy          = 0
    model1:
        number of parcels added    = 0
        mass introduced            = 0
    Parcel fate (number, mass)      : patch frontAndBack
      - escape                      = 0, 0
      - stick                      = 0, 0
    Parcel fate (number, mass)      : patch top
      - escape                      = 0, 0
      - stick                      = 0, 0
    Parcel fate (number, mass)      : patch bottom
      - escape                      = 0, 0
      - stick                      = 0, 0
    Parcel fate (number, mass)      : patch inlet
      - escape                      = 0, 0
      - stick                      = 0, 0
    Parcel fate (number, mass)      : patch outlet
      - escape                      = 0, 0
      - stick                      = 0, 0
    Temperature min/max            = 0, 0
    Mass transfer phase change      = 0
    Mass transfer devolatilisation  = 0
    Mass transfer surface reaction  = 0

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
rho min/max = 1000, 1050
PIMPLE: iteration 1
smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 2.805340292e-09, No Iterations 3
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 2.966526768e-09, No Iterations 3
DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 5.64040657e-08, No Iterations 1
T gas min/max  = 273, 273.0014317
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.04163055794, No Iterations 3
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
rho min/max = -2281.560355, 5108.947993
time step continuity errors : sum local = 1.999663788, global = -0.001721107908, cumulative = -0.001721107908
p min/max = 99479.12454, 100515.4398
GAMG:  Solving for p, Initial residual = 0.05047663126, Final residual = 0.002611005543, No Iterations 2
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
rho min/max = 435.5717129, 1463.947779
time step continuity errors : sum local = 0.2470687835, global = -0.0009165126734, cumulative = -0.002637620581
p min/max = 99504.44821, 100491.853
GAMG:  Solving for p, Initial residual = 0.004542281576, Final residual = 8.231223166e-07, No Iterations 7
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
rho min/max = 999.7620395, 1000.193203
time step continuity errors : sum local = 7.466847065e-05, global = -2.245892034e-06, cumulative = -0.002639866474
p min/max = 99515.60157, 100498.0338
ExecutionTime = 0.28 s  ClockTime = 0 s

Courant Number mean: 13.85735011 max: 757.6955919
Time = 2


bijan darbari March 26, 2016 08:46

I'm waiting for a response!
It's there any suggestion to solve this problem??

chpjz0391 June 1, 2016 03:31

Quote:

Originally Posted by bijan darbari (Post 591750)
I'm waiting for a response!
It's there any suggestion to solve this problem??

Hi bijian,

Have you solved your problem? I met the same problem as yours.
why my Current number of parcels always 0

Regards,

Ping

bijan darbari June 1, 2016 05:28

Dear chpjz0391

No, I didn't solve it. because I neglect gravity.

What's parcel courant number?? I didn't see that during my solution!!!

I guess the cause of this problem is that "reactingparcelfoam" is a compressible solver that solve enthalpy for energy equation and when the gravity is activated, the unreal value of pressure cause the solver to diverge and have high courant number.

chpjz0391 June 1, 2016 19:57

Quote:

Originally Posted by bijan darbari (Post 602805)
Dear chpjz0391

No, I didn't solve it. because I neglect gravity.

What's parcel courant number?? I didn't see that during my solution!!!

I guess the cause of this problem is that "reactingparcelfoam" is a compressible solver that solve enthalpy for energy equation and when the gravity is activated, the unreal value of pressure cause the solver to diverge and have high courant number.

Actually I was simulating a steady state.

Pooria May 24, 2022 19:49

reactingFoam
 
Hello all,


Have you been able to solve this issue?


I am solving steady state compressible reactingFoam OpenFOAM 9 and I get really high courant number in the order of 5000-10000.


I am absolutely stuck to this issue. Any help or hint is quite appreciated.


Cheers,
/Pooria

bijan darbari May 25, 2022 14:52

Dear Pooria

I have forgotten whether I solved this issue or not. But finally I simplified the "reactingparcelfoam" and combined it with "pimplefoam" as my case was incompressible and did not have reaction, mass transfer, and ....
So may be this problem was eliminated during this simplifying procedure. As I converted it to an incompressible solver.

But if you really find this problem serious, you can report it to the "https://bugs.openfoam.org/rules.php". maybe this is a real bug.


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