CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   alpha1 grows unbounded in interDyMFoam (http://www.cfd-online.com/Forums/openfoam-solving/115137-alpha1-grows-unbounded-interdymfoam.html)

tayo March 24, 2013 23:08

alpha1 grows unbounded in interDyMFoam
 
Hello all,

I'm running rising bubble case using interDyMFoam. The issue is that alpha1 blows up whenever I run with flow velocity i.e. maximum alpha1 grows unbounded beyond 1 and minimum alpha1 also grows beyond zero even after the first time step. However, it behaves fine when I run without flow velocity.

I've tried running implicitly and then played around with the div(phi,alpha) & div(phirb,alpha) in fvSchemes, and then with calpha and nAlphaSubCycles in fvSolution. I've even set maxCo & maxAlphaCo to 0.01 yet it still grows. Please I need ideas on how to make alpha1 stay bounded between 0 and 1 irrespective of flow velocity. I would really appreciate any help. Thank you.

tayo March 27, 2013 17:10

Please I'm still waiting for response/ideas on how to keep alpha1 bounded using interDyMFoam. Thank you.

Lieven March 27, 2013 17:47

Hi Tayo,

A thing you can try (at least this is what I would do) is to select the 'upwind' interpolation for all operators in the fvSchemes. It is first order, so you don't want to keep it, but it is bounded. So you should not get the under/overshoots. Next, replace each upwind by a second order scheme until you see the problem arising. For that operation you need to pick a more advanced scheme (TVD, explicitly bounded scheme, filtered, ...).

Cheers,

Lieven

tayo March 27, 2013 18:44

Thanks Lieven,

I've just tried upward scheme on div(phi,alpha) but it still grows unbounded, then, I tried vanLeer01 but same result. I'm currently using limitedVanLeer 0 1 but it's not looking any different. I'm currently running at time step of 1e-6sec. The wield thing is that when I ran the case without adaptive meshing (interFoam), alpha1 didn't blow up although I had to use maxCo and maxAlphaCo of 0.1. So I strongly think it has to do with interDyMFoam but I don't know how to correct the solver:confused:. I really need adaptive meshing for my case.

Lieven March 28, 2013 09:16

hi Tayo,

I really meant to use the upward scheme for all operators as starting point. At this point, there is really no reason yet to think it is a problem of the solver. Low mesh quality or poor initial conditions e.g. are more likely.

Cheers,

L

tayo April 1, 2013 15:18

Update!
I noticed that I got worst void fraction results as I increased calpha and calpha = 0 had "best result" (instead of the reverse occuring). Upward schemes also made it worst as expected too. Could this "unboundedness" be as a result of the interfaceCompression scheme? Any other recommendable schemes for the div(phi, alpha) and div(phirb, alpha)?

tayo April 4, 2013 03:42

Hello all,

I've been able to fix the issue. First of all, I discovered that the problem of unbounded alpha1 was not unique to interDyMFoam alone, it also blew up in interFoam. By the way, my flow velocity was quite high (~1m/s) but alpha1 still blew up even with low vel (~0.01m/s). The div schemes did not help much, neither did a very very low maxAlphaCo (0.01).

To solve it, I solved the solution implicitly setting Sp as zero. But for Su term, I defined as divU*alpha1:D. This extra divergence term helped keep the alpha1 equation stable along with the right combination of maxAlphaCo. This has kept my max alpha1 bounded to 1 while you won't lose computation time since maxAlphaCo of 0.4 has worked fine. Hope this helps anyone else with unbounded alpha1 issue. Thanks

k.kshitij July 14, 2013 10:36

Hi,

I simulating a nozzle flow using k-e turbulence model in interFoam, and getting a negative phase fraction. I'm a newbie to C programming, can you tell where to add the corrections you have given. I ran a grep command to find out where the SpType is used and found
these locations
applications/solvers/multiphase/interFoam/LTSInterFoam/MULESTemplates.C
src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C

But didnt find where Sp is defined in them, can you please guide me through this.

tayo July 17, 2013 17:38

Quote:

Originally Posted by k.kshitij (Post 439645)
Hi,

I simulating a nozzle flow using k-e turbulence model in interFoam, and getting a negative phase fraction. I'm a newbie to C programming, can you tell where to add the corrections you have given. I ran a grep command to find out where the SpType is used and found
these locations
applications/solvers/multiphase/interFoam/LTSInterFoam/MULESTemplates.C
src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C

But didnt find where Sp is defined in them, can you please guide me through this.

Hi Kshitij, you're probably solving interFoam explicitly. See interPhaseChangeFoam for example on how to add Sp & Su terms and then solve implicitly. You're probably not doing any phase change for now so set Sp to zero. However, to ensure that alpha1 stays bounded, include "divU*alpha1" in the Su term. Hope this helps.

Hale September 5, 2013 03:09

Quote:

Originally Posted by tayo (Post 440409)
Hi Kshitij, you're probably solving interFoam explicitly. See interPhaseChangeFoam for example on how to add Sp & Su terms and then solve implicitly. You're probably not doing any phase change for now so set Sp to zero. However, to ensure that alpha1 stays bounded, include "divU*alpha1" in the Su term. Hope this helps.

Hi Tayo,

I am very new to OpenFoam and C++ coding and I'm facing the same problem as yours where alpha1 becomes negative. Would you please post the files with required changes in order to avoid this problem?

I really appreciate your help.
Hale

jhoepken September 10, 2013 03:13

Quote:

Originally Posted by Hale (Post 449990)
Hi Tayo,

I am very new to OpenFoam and C++ coding and I'm facing the same problem as yours where alpha1 becomes negative. Would you please post the files with required changes in order to avoid this problem?

I really appreciate your help.
Hale

Have you double checked your boundary conditions?

Hale September 13, 2013 08:14

Quote:

Originally Posted by jhoepken (Post 450836)
Have you double checked your boundary conditions?

I solved the problem. There was problems with the boundary conditions :-)

Galchenko September 17, 2013 04:42

Hi Hale!

I'm having the same problem as discussed before, though adding Su term as tayo adviced didn't help. What boundary conditions caused you problem? May be I have some similliar mistake..

Regards,
Olga

Hale September 17, 2013 05:00

Hi Galchenko,

I had zeroGradient on the both pressure and velocity for the inlet and zeroGradient for the velocity and a negative pressure for the outlet, which was equal to the pressure difference between inlet and outlet. This was apparently a very poorly defined boundary condition for my system which made it very unstable and therefore alpha1 became negative.

My intention by setting those boundary conditions was to let the model determine the velocity at the inlet but the system was apparently an overdetermined system which could not be solved in OF.

I changed the BC to the following and it worked fine:

Inlet:
U: fixedValue uniform (x 0 0);
p_rgh: buoyantPressure;

Outlet
U: zeroGradient
p_rgh: fixedValue uniform 0;

zhouhoucun April 1, 2015 12:27

Hello,tayo, I meet the same problem as you with interPhaseChangeFoam, could you send me you case files for me?Thank you in advance

Nori4U May 8, 2015 03:35

Quote:

Originally Posted by zhouhoucun (Post 539506)
Hello,tayo, I meet the same problem as you with interPhaseChangeFoam, could you send me you case files for me?Thank you in advance

Hi Zhouhoucun,

I'm working on the same problem, can you upload your case files please so I can cross check with mine.

Thanks,
Sam


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