|
[Sponsors] |
Created a bounded and modified version of kEpsilon.C |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 26, 2016, 05:19 |
Created a bounded and modified version of kEpsilon.C
|
#1 |
Member
|
Hello,
I've created a modified version of the kEpsilon model for the openFOAM version 2.2.0. It can be found here: https://github.com/11101011/modKEpsilon The models and my modification is based on this paper here: http://www.icmc.usp.br/~gustavo.busc...ew01_ijcfd.pdf The initial reason for this modification were many tests I've run with the standard OF model and I had always problems with floating point exceptions based on divisions by zero and also negative turbulence values. OpenFOAM uses a scheme in its standard kEpsilon model which bounds negative or values smaller than 1E-15. The problem is that this number generates also floating point exceptions, when for example initializing a case with k and epsilon values of this magnitude. Someone can overwrite this bounding minimum by putting the following definitions in the RASProperties dictionary: Code:
kMin 1e-5; epsilonMin 1e-5; Code:
const scalar minVsf = min(vsf).value(); if (minVsf < lowerBound.value()) { vsf.internalField() = max ( max ( vsf.internalField(), fvc::average(max(vsf, lowerBound))().internalField() * pos(-vsf.internalField()) ), lowerBound.value() ); vsf.boundaryField() = max(vsf.boundaryField(), lowerBound.value()); } ... return vsf; Regards, Sebastian |
|
February 26, 2016, 14:28 |
|
#2 | |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Dear Sebastian,
you also checked out the Code:
limitedLimitedLinear 1 1e-8 1e4 Quote:
Finally thanks for sharing.
__________________
Keep foaming, Tobias Holzmann |
||
February 29, 2016, 03:14 |
|
#3 | ||
Member
|
Hello Tobi,
Quote:
Quote:
If you have some time, I would be glad if you could run some tests with the model. Regards, Sebastian |
|||
|
|