bound() function of the bound.C file
Hi everybody,
yesterday I had a discussion with my colleague about the bound function. We were digging into the code and were finally surprised how interesting this function is working. Actually we needed just the max() function but for unknown reason we went the wrong direction at the beginning. Nevertheless it was good that we discussed about the bound() functionality. However, it is always nice to have the code implementation and be able to understand it but in that particular case, does anybody know if there is a mathematical background behind this interesting expression? After small drafts we realized that the unbounded values will get some values which are somehow an average of the field values. We can imagine that this makes much more sense than setting it to a - lets say - minimum value e.g. 0. The question as already mentioned is. Does anybody know if there is some mathematical background / formula behind that? At least there should be some mathematical or physical background for that implementation. https://cpp.openfoam.org/v5/bound_8C_source.html Code:
32 Foam::volScalarField& 33 Foam::bound(volScalarField& vsf, const dimensionedScalar& lowerBound) |
Hi Tobi,
I'm studying about the bound function... so unfortunately I can not help you in your post. I have a question and maybe you can help me..., related to the kEpsilon model. Based on original file: kEpsilon On lines 132 and 133 I could substitute for: Quote:
Quote:
OBS: I understand that SMALL is the default value of this function. |
Quote:
I quess the averaging is made in order to suppress numerical oscillations. As far as I know the bounding is performed to help the solver to find a solution or avoid that the solver diverges. |
All times are GMT -4. The time now is 12:40. |