CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Fixing the alpha1 min/max under/overshoots in interFoam.C solver. (

idrama January 23, 2010 09:13

Fixing the alpha1 min/max under/overshoots in interFoam.C solver.
Hey Fomers,

I don't know if it is meaningful, therefore I like to ask you for your opinion. When the interFoam solver is running then the min/max values for alpha1 deceeds/exceeds zero and one. My idea is it to add in alphaEqnSubCycle.H a code sequence that the alpha1 values which are out of [0,1] to set the corresponding image values, i.e.:

min: alpha1=-1.0324e-20 set to alpha1 = 0,
max: alpha1=1.0045 set to alpha1 = 1.

There are any things which are opposed to do so?

Kinda regards!


Mattasmack January 27, 2010 20:34

I'm no expert, but here is my two cents:
I tried doing this in a custom solver I was working on (not interFoam) but eventually decided it is a bad idea.
Very small overshoots should not really cause problems. But if there are large or persistent overshoots, it indicates something is wrong and you need to know about it. (clipping alpha1 to between 0 and 1 would mask the problem but doesn't fix it)

All times are GMT -4. The time now is 17:19.