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/)
-   -   RANS - Calculate k&epsilon if there are not present (https://www.cfd-online.com/Forums/openfoam-solving/215913-rans-calculate-k-epsilon-if-there-not-present.html)

Siassei March 21, 2019 14:34

RANS - Calculate k&epsilon if there are not present
 
Hello,

I try to write an unverisal function for an challange and has no idea for the universal part.
If in the RANS simulation is
k := turbulent kinetic energy
or/and
epsilon := energy dissipation rate
are not present (e.g. k-omega turb. model), how can I calculate the values/fields. The formula are present (k, epsilon)

Please tell me an way to calculate the values in a function that are written to system/controlDict

Code:

...
functions
{
    calcSomething
    {
        libs        ("libutilityFunctionObjects.so");
        type coded;
        name abc;
        codeWrite
        #{
            // if epsilon is not present
              // do calc
            // if k is not present
              // do calc
            // ...
        #};
    }
}



All times are GMT -4. The time now is 06:20.