View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002448 | OpenFOAM | Feature | public | 2017-01-31 12:27 | 2017-07-03 08:04 |
Reporter | ALU | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | GNU/Linux | OS | Ubuntu | OS Version | 14.04 |
Summary | 0002448: twoLiquidMixingFoam Courant number limit | ||||
Description | Very small time steps are needed due to MULES. The semi-implicit variant is not available. Option for relaxing the alphaDiffusion equation and relaxing pressure is also missing. A steady steady state version of the solver or at least allowing large time steps would be nice. | ||||
Tags | No tags attached. | ||||
|
Can you provide a patch to add this functionality to twoLiquidMixingFoam? |
|
In case of mixing fluids wouldn't it be better to simply add the convection term in the alpha equation instead of using MULES, at least for the steady state approach? |
|
MULES is necessary to guarantee boundedness of the convection process. |
|
Don't know how to adept MULES for a steady state approach, so I added the convection term in the alpha equation and changed the pimple to simple algorithm. Boundedness can be achieved using bounded schemes, of course resulting in more numerical diffusion... |
|
Bounded schemes do not guarantee boundedness, only MULES does that. Maybe for your case there is sufficient diffusion that unboundedness is not generated and if conservation is not critical you could clip the phase-fraction. |
|
Pending contribution. |
|
Finally found some time to test twoLiquidMixingFoam witch IMULES and CMULES. For my case IMULES is more stable and accurate than CMULES. Also added p_rgh.relax() in pEqn.H. Moved the alpha-equations into the pimple-loop, could be better for larger time steps? I upload the patch if you are interested. |
|
|
|
Support for IMULES has been dropped because unlike CMULES it does not guarantee boundedness. Relaxing pressure is OK for steady-state simulations or in PIMPLE provided sufficient iterations are used to converge the system so it may be useful as an option. Putting the alpha equation in the PIMPLE loop would be useful to maintain accuracy for large time-steps but it may not help and in fact may hinder stability, you will need to test this on a range of cases to see which approach is preferable. |
|
Attached is the CMULES-patch of twoLiquidMixingFoam. The implementation is adopted from driftFluxFoam, it works but not sure if everything is done right. The alpha-equations are now outside of the pimple-loop again. Concernig boundedness: Maybe in case of mixing fluids boundedness is not as critical as in immiscible fluids? |
|
If boundedness is not critical for your cases then you do not need MULES at all and a more traditional and efficient implicit transport with NVD/TVD scheme might be sufficient. Did you need to put the alpha-equation outside the PIMPLE loop? What differences do you see with it inside vs outside? |
|
I put the alpha-equations out of the PIMPLE loop because my test-case (jet) runs 10% faster with just very slight loss of accuracy for Courant numbers up to 50 (or even higher). Also you said it my hinder stability. I think the field of application of twoLiquidMixingFoam would be much bigger allowing the user two choose between MULES, CMULES and also IMULES or NVD/TVD scheme if boundedness is not critical. In my test-case IMULES runs smarter and allows larger times-steps than CMULES and is as accurate. By the way, I think the naming of twoLiquidMixingFoam is a little bit misleading because I sea no reason why you should not use it with gases. |
|
Switching between ?MULES and NVD/TVD would be possible but adds complexity, we would need to know it is sufficiently useful before releasing and maintaining it. Do your cases run OK with implicit NVD/TVD? If boundedness is important and ?MULES is needed then IMULES is not good enough. If boundedness is not important then implicit NVD/TVD is more accurate and efficient. twoLiquidMixingFoam is named that way for historical reasons, but for mixing gases it is more logical to mix the composition as done in reactingFoam with reactions switched-off. |
|
Have you considered writing a composition mixing application rather than using twoLiquidMixingFoam? At the moment it is not clear which approach is preferable but it would be more consistent with the other solvers to mix composition rather the miscible phases. |
|
I will do some further testing using vanLeer scheme. I will tell you the conclusion after lunch ... |
|
I uploaded a plot of the distribution of alpha after the nozzle. For Courant < 0.5 MULES, linear scheme and vanLeer scheme give matchable results. For Courant < 50 upwind scheme does better than IMULES and CMUlES, vanLeer was not stable. |
|
|
|
How would you like to proceed with this? Are you happy to continue with upwind for which ?MULES is not needed? |
|
Upwind has proved its worth for the field of application I am actually working on. It is stable and bounded for high Co-Numbers (at least in my applications). For Co-Numbers of 5 vanLeer is also working in a simple test case (not tested on complex geometry) and is more accurate than CMULES, so maybe it could be an option. Putting alphaEqn into the PIMPLE-loop makes vanLeer diverge at the last PIMPLE iteration for CO > 1, but allows even bigger time-steps for upwind if p is relaxed. Putting mixture.correct() before the alphaEqn is slightly better in my cases. I think twoLiquidMixingFoam is an effective approach for incompressible, isothermal cases where no reaction is needed. |
|
Have you compared twoLiquidMixingFoam with using a liquid composition approach? Are you sure twoLiquidMixingFoam is better? |
|
You mean your former proposal to use reactingFoam? Not yet, I can try it next week. |
|
I am not suggesting to use reactingFoam because that is setup for compressible flow but it would be possible to write an incompressible solver for liquid composition to replace twoLiquidMixingFoam but it is not clear without trying it what the advantages and disadvantages are. |
|
Now I am not sure about the composition mixing approach. Is it an Euler-Euler approach? |
|
No, it would solve for the compositon mass-fractions in an analogous manner to the solving of Y in reactingFoam. |
|
I don't see much difference between solving the phase fraction or the mass fraction in case of incompressible fluids. YEqn.H looks very similar to alphaEqn.H in the approach I am using for now. |
|
@ALU : You stopped commenting on this issue 3 months ago. Did you resolve it? |
|
Yes, I used twoLiquidMixingFoam and towLiquidMixingPimpleFoam with upwind sheme. It was stable with high CO numbers and accurate enough for me (alpha distribution after a nozzle, plot_alpha-2.png in the attached files). |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-01-31 12:27 | ALU | New Issue | |
2017-01-31 13:29 | wyldckat | Category | Bug => Feature |
2017-01-31 13:34 | henry | Note Added: 0007697 | |
2017-02-02 05:34 | ALU | Note Added: 0007698 | |
2017-02-02 07:29 | henry | Note Added: 0007699 | |
2017-02-06 09:20 | ALU | Note Added: 0007708 | |
2017-02-06 09:43 | henry | Note Added: 0007709 | |
2017-02-08 10:59 | henry | Assigned To | => henry |
2017-02-08 10:59 | henry | Status | new => closed |
2017-02-08 10:59 | henry | Resolution | open => fixed |
2017-02-08 10:59 | henry | Note Added: 0007718 | |
2017-03-01 13:32 | ALU | Status | closed => feedback |
2017-03-01 13:32 | ALU | Resolution | fixed => reopened |
2017-03-01 13:32 | ALU | Note Added: 0007837 | |
2017-03-01 13:32 | ALU | File Added: twoLiquidMixingFoam_patch.tar.gz | |
2017-03-01 14:24 | henry | Note Added: 0007838 | |
2017-03-01 16:02 | ALU | File Added: twoLiquidMixingFoam_patch2.tar.gz | |
2017-03-01 16:02 | ALU | Note Added: 0007839 | |
2017-03-01 16:02 | ALU | Status | feedback => assigned |
2017-03-01 16:11 | henry | Note Added: 0007840 | |
2017-03-02 06:54 | ALU | Note Added: 0007841 | |
2017-03-02 07:46 | henry | Note Added: 0007842 | |
2017-03-02 08:06 | henry | Note Added: 0007843 | |
2017-03-02 09:59 | ALU | Note Added: 0007844 | |
2017-03-02 13:53 | ALU | File Added: plot_alpha.png | |
2017-03-02 13:53 | ALU | Note Added: 0007845 | |
2017-03-02 13:55 | ALU | File Added: plot_alpha-2.png | |
2017-03-09 16:33 | henry | Note Added: 0007872 | |
2017-03-10 08:39 | ALU | Note Added: 0007899 | |
2017-03-10 08:56 | henry | Note Added: 0007900 | |
2017-03-10 10:34 | ALU | Note Added: 0007903 | |
2017-03-10 10:56 | henry | Note Added: 0007904 | |
2017-03-10 11:15 | ALU | Note Added: 0007905 | |
2017-03-10 11:17 | henry | Note Added: 0007907 | |
2017-03-10 11:43 | ALU | Note Added: 0007908 | |
2017-06-30 12:38 | chris | Note Added: 0008310 | |
2017-07-03 05:37 | ALU | Note Added: 0008320 | |
2017-07-03 08:04 | henry | Status | assigned => closed |
2017-07-03 08:04 | henry | Resolution | reopened => no change required |