CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Limiting k and epsilon (

ksv July 11, 2013 05:04

Limiting k and epsilon
Dear Foamers,
Kindly help me in limiting k & epsilon values. Am using LaunderSharmaKE model and want to limit the k and epsilon values within certain range. I tried something like below
k_ = min(k_, 5)
in LaunderSharmaKE.C file and compiled. But nothing works. Kindly correct me.

Tobi July 11, 2013 06:42

I am not 100% sure but maybe you can use the following scheme:


div(phi, Epsilon) Gauss limitedLimitedLinear 0 5 1;

In which line did you insert your line?
And what is the reason for limiting your k - value?

ksv July 11, 2013 21:02

Hi Tobi,
Thanks your suggestion and will try it today. I inserted it below the solve(kEqn) line in the LaunderSharmaKE.C file. Honestly speaking I dont know as where to put it. The reason for limiting k values is that it is blowing up to huge values in my simulations.

Tobi July 13, 2013 03:12


if your values blow up ... then its possible that you have wrong BC or a bad mesh or anything is going wrong.

All times are GMT -4. The time now is 05:26.