CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Where is the Boltzmann constant value set? (https://www.cfd-online.com/Forums/openfoam-programming-development/202902-where-boltzmann-constant-value-set.html)

hester June 11, 2018 14:54

Where is the Boltzmann constant value set?
 
Hello,

I am wondering where the Boltzmann constant value is set in OpenFOAM. The variable k is defined under src/OpenFOAM/global/constants/fundamental/fundamentalConstants.C.
I expected to find the value set here too, like for the Avogadro constant. (Actually, NA is the only value set her.)

Code:

defineDimensionedConstantWithDefault
 (
    physicoChemical::group,
    physicoChemical::NA,
    Foam::dimensionedScalar
    (
        "NA",
        dimensionSet(0, 0, 0, 0, -1),
        6.0221417930e+23
    ),
    constantphysicoChemicalNA,
    "NA"
 );

 defineDimensionedConstant
 (
    physicoChemical::group,
    physicoChemical::k,
    constantphysicoChemicalk,
    "k"
 );

I also tried the doxygen documentation, but it only leads to the turbulence k value or some integer k in the LISA atomization method.

If anyone can point me in the right direction, I would be very grateful.

Regards,
hester

msaravia June 12, 2018 23:30

The Boltzman's constant is is taken as variable by fundamentalConstants.H. Actuallyit is defined at line 41 of file LISASMDCalcMethod2.H. Check https://cpp.openfoam.org/v5/fundamen...stants_8H.html.

hester June 13, 2018 05:14

Hello msaravia,

thank you for your reply.
If you look at your mentioned source code, you will see that k in this file is not the Boltzmann constant but it is an integer used for iteration. This is the file the doxygen documentation will lead you to if your looking for physicoChemical::k (as mentioned in my initial post).

Regards,
hester

hyFoam June 17, 2018 04:55

Hi Hester,


The Boltzmann constant value is given in $WM_PROJECT_DIR/etc/controlDict



Code:

DimensionedConstants
{
    unitSet            SI; // USCS

    SICoeffs
    {
        physicoChemical
        {
            mu              mu [1 0 0 0 0 0 0] 1.66054e-27;
            k              k [1 2 -2 -1 0 0 0] 1.38065e-23;
        }
    }
}

Thanks,


Vince

hester June 18, 2018 04:47

Hi Vince,


this is exactly what I was looking for.
Thank you!


hester


All times are GMT -4. The time now is 15:50.