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/)
-   -   sonicFoam - simulation stop for negative temperature - are my parameters wrong ? (https://www.cfd-online.com/Forums/openfoam-solving/213395-sonicfoam-simulation-stop-negative-temperature-my-parameters-wrong.html)

Jad.L. December 24, 2018 17:08

sonicFoam - simulation stop for negative temperature - are my parameters wrong ?
 
Dear Foamers,

I am using openFoam v.6 and the solver sonicFoam for k-omega SST simulation.
My simulation stops after few loop due to a negative temperature (in Kelvin :(). I think I have a trouble with my parameters. Could someone please check it?

About the simulation :

A cylinder of 100 mm length and with a 50 mm diameter. There is one inlet and one outlet at each part of the cylinder. This cylinder is under vacuum 0.1 Pa. The inlet will release 1.5e7 Pa (150 bar) and the outlet does nothing for now.

alphat


alphat = thermal conductivity / heat capacity

For H2 , alphat = 0.18/14300 = 1.2587e-5
Code:

internalField  uniform 0.000012587;

boundaryField
{
    Inlet
    {
        type            calculated;
        value          uniform
0.000012587;
    }
    Outlet
    {
        type            calculated;
        value          uniform
0.000012587;
    }
   
    Pipe
    {
        type            compressible::alphatWallFunction;
        value          uniform
0.000012587;
    }
}



k
For the kinematic energy k, I found 4.14e-22 ( I used k=3/2*Boltzman cst* Temperature ) But this result seems weird.

I assume to have supersonic flow, I should have a velocity around U=750 m.s-1

Then I used the formula k = 3/2 (U*I) from CFD wiki . k = 16537



Is it correct to assume U= 750 and sound Velocity = 300 for my case ?


Code:

internalField  uniform 1;

boundaryField
{
    Inlet
    {
        type            fixedValue;
        value          uniform 16537;
    }
    Out
let
    {
        type            inletOutlet;
        inletValue      uniform 1;
        value          uniform 1;
    }
    Pipe
    {
        type            kqRWallFunction;
        value          uniform 1;
    }
}





nut
Code:

internalField  uniform 0;

boundaryField
{
    Inlet
    {
        type            calculated;
        value          uniform 0;
    }
    Out
let
    {
        type            calculated;
        value          uniform 0;
    }
    Pipe
    {
        type            nutkWallFunction;
        value          uniform 0;
    }
}

omega


from the formula given in CFD wiki, omega =128/1.9e-4 =0.024

Code:

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

internalField  uniform
0.024;

boundaryField
{
    Inlet
    {
        type            fixedValue;
        value          uniform
0.024;
    }
    Out
let
    {
        type            inletOutlet;
        inletValue      uniform
0.024;
        value          uniform
0.024;
    }
    Pipe
    {
        type            omegaWallFunction;
        value          uniform
0.024;
    }
}




p
Code:

internalField  uniform 0.1;

boundaryField
{
    Inlet
    {
        type            fixedValue;
        value          uniform 15000000;
    }

    Out
let
    {
        type            waveTransmissive;
        field          p;
        psi            thermo:psi;
        gamma          1.3;
        fieldInf        0.1;
        lInf            1;
        value          uniform 0.1;
    }
    Pipe
    {
        type            zeroGradient;
    }
}

T
Code:

internalField  uniform 20;

boundaryField
{
    Inlet
    {
        type            fixedValue;
        value          uniform 20;
    }

    Out
let
    {
        type            inletOutlet;
        inletValue      uniform 20;
        value          uniform 20;
    }
    Pipe
    {
        type            zeroGradient;
    }
}

U
Code:

internalField  uniform (0 0 0);

boundaryField
{
    Inlet
    {
        type            fixedValue;
        value          uniform (750 0 0);
    }

    Out
let
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value          uniform (0 0 0);
    }
    Pipe
    {
        type            noSlip;
    }
}



All times are GMT -4. The time now is 23:01.