|
[Sponsors] |
InterFoam: Different results in OF5 and OF6 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 27, 2018, 12:09 |
InterFoam: Different results in OF5 and OF6
|
#1 |
Senior Member
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 200
Rep Power: 18 |
Dear Foamers,
I ran the weirOverflow tutorial in OF5 and OF6 and got slightly different results. In the image below there are the two screen captures (for alpha.water) that correspond to the time = 8 s in OF5 and OF6. In OF6 the water seems more attached to the wall and in OF5 the water separates from the wall. What is really strange is that I sent a report about this in OpenFOAM Issue tracking system and the developer answered that he could not reproduce the problem because he got the same results in both versions and others that he tested. See https://bugs.openfoam.org/view.php?id=3011 To understand what is happening I ask if anyone can run this tutorial in OF6 and tell if they got the same results I got for t=8s. The tutorial can be found at tutorials/multiphase/interFoam/RAS/weirOverFlow All the best, Paulo Last edited by vatavuk; July 28, 2018 at 11:15. |
|
July 30, 2018, 03:53 |
|
#2 |
Member
Cyrille Bonamy
Join Date: Mar 2015
Location: Grenoble, France
Posts: 86
Rep Power: 11 |
I have run the tutorial with openfoam-5.0 and openfoam-6.
I found exactly the same results as you... In OF6 the water is attached to the wall contrary to the OF5 simulation... I don't understand why and i don t know which result is the good one... |
|
July 30, 2018, 07:46 |
|
#3 |
Senior Member
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 200
Rep Power: 18 |
Hi Cyrille,
Thanks for confirming the results. I was thinking that it could be something related to my installation. I will report this problem again to the OpenFOAM issue tracking system to see if the developers can help us. Best regards, Paulo |
|
August 15, 2018, 11:59 |
|
#4 |
Senior Member
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 200
Rep Power: 18 |
Hi Foamers,
Uptdating the information. I sent a new report to OpenFOAM issue tracking see https://bugs.openfoam.org/view.php?id=3028#c9900. For some mysterious reason the developer is not being able to reproduce our results, so he will not be able to help us. I suppose this problem could be solved comparing the source code of versions 5 and 6 of interFoam and analyzing the differences until the source of the problem is found. At this moment, I don't have time to do this. My suggestion to the users is to be careful with possible strange behaviour in version 6 of interFoam. Any help with this is welcome. Best Regards, Paulo |
|
August 20, 2018, 22:30 |
|
#5 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
I was curious about this and took a somewhat quick look into this. The first detail is that the bug reports were always closed, because only the end result at 60s was being looked at. Quoting from here: https://bugs.openfoam.org/view.php?id=3011#c9867 Quote:
The list of changes made to the folder "applications/solvers/multiphase/interFoam" can be seen online here: https://github.com/OpenFOAM/OpenFOAM...hase/interFoam As visible there, the code changes that likely affected this were:
But upon closer inspection, at 4s the front of the wave is somewhat different and has a higher speed in OpenFOAM 5.x. Therefore, it is possible that the inlet flow rate may be too close to the instable flow region where it can easily jump or not from the top if there is more or less X m3/s coming in. I haven't run more simulations on this case, given that I haven't been working on this topic and am not familiar enough on what to expect here. Best regards, Bruno
__________________
|
||
November 16, 2018, 07:24 |
|
#6 |
Senior Member
|
Hi All,
I made a quick test with capillaryRise tutorial case. Water in the thin cavity keeps oscillating with OpenFOAM 5. With OpenFOAM 6, the oscillation is damped down and this seems to be comparatively realistic The history of the averaged water level is shown in the following graphs. This change is initiated with the following commit and the cause of the difference in the weirOverflow tutorial too. https://github.com/OpenFOAM/OpenFOAM...b4438a3a038c1b The comment of the commit is Code:
commit da787200a6b208cf3fc4dfaa48b4438a3a038c1b Author: Henry Weller <http://openfoam.org> Date: Mon Jan 8 21:35:00 2018 +0000 ddtScheme::fvcDdtPhiCoeff: Improved formulation providing better stability/accuracy balance Resolves problem with pressure "staggering" when running with a very Courant number. I have not yet figured out the meanings of the code change itself. I would appreciate it if somebody could explain the theories behind the code-change. Last edited by snak; November 16, 2018 at 08:31. |
|
December 3, 2018, 07:43 |
|
#7 |
Senior Member
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 200
Rep Power: 18 |
Hi Bruno and Shinji,
Many thanks for the help in understanding this problem. As Shinji has shown, the modifications in version 6 improve the results for the capillaryRise tutorial. About the weirOverflow tutorial it is difficult to say if the results improved or not. In the next months I intend to do some tests using interFoam in classic hydraulic flows. In the tests I will include comparisons of versions 5 and 6, this may give additional information about which version has better behavior. About the commit that Shinji identified as being the source of the differences, I know the code only superficially but it seems that it changes the functions fvcDdtPhiCorr and fvcDdtUjCorr which are used to calculate the time derivative in specific situations. fvc is an explicit calculation opposed to fvm which updates a matrix. Ddt is time derivative. Phi is the mass flow across a face. Uf, I think means face velocity. All the Best, Paulo |
|
December 4, 2018, 18:00 |
|
#8 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer @snak: Given your feedback on this, I've taken another look at this commit and all signs point to this being an innocently simple correction to the code: It now uses the values from the correct time step when making corrections that are based on the previous time step.
For example, this correction: Code:
- this->fvcDdtPhiCoeff(rhoU0, phi.oldTime()) + this->fvcDdtPhiCoeff(rhoU0, phi.oldTime(), rho.oldTime())
If you have the time/curiosity, try running the case with a smaller time step or "maxCo", to see if both results improve. @Paulo: Validation data/cases are always welcome! |
|
December 5, 2018, 10:34 |
|
#9 |
Senior Member
|
Hi, Paulo and Santos,
Thank you very much for your feedback. Info from both of you is very much informative and help me and my colleagues. I will do some more test and will share results. CapillaryRise tutorial uses the parallel walls. A tube using the cylindrical coordinates shows the same tendency. However, oscillation is converged rapidly in the tube with OpenFOAM 6. Thanks again, |
|
July 9, 2020, 19:05 |
|
#10 |
Senior Member
abdikerim kurbanaliev
Join Date: Jun 2010
Location: Kyrgyzstan, Osh
Posts: 121
Rep Power: 16 |
Hello everyone,
Despite the fact that this post is already old, I decided to share my calculation results. I performed calculations with different versions of the package and got slightly different results, as noted above. For example, version 1906, 5 and 7 gives approximately the same results, while version 6.0 gives a completely different result. Please see the attached picture. The picture shows that the non-stationary flow turns into a stationary one for about 46 seconds after the start of the motion. However, according to version 6.0, this transition is almost instantaneous, which causes some doubts from a physical point of view. Therefore, I believe that the combination of two methods - interDyMFoam and interFoam for simulations of two-phase flows is not entirely successful. If we had experimental data, we could easily test this point of view. The second conclusion, that comes from the figure, relates to the visualization of the initial distribution of alpha.water. In the case of version 1906, it shows an incorrect alpha distribution, which refers to the first moment of output time. Kerim |
|
January 5, 2021, 10:32 |
InterFoam: Different results in OF5 and OF6
|
#11 |
Senior Member
abdikerim kurbanaliev
Join Date: Jun 2010
Location: Kyrgyzstan, Osh
Posts: 121
Rep Power: 16 |
Dear All,
Happy new year to all of you in 2021! I am struggling to find a source of difference between OF5 and OF6. Dear Vitavuk were you able to do some tests using interFoam in classic hydraulic flows. I post#7 you said that “In the tests, you will include comparisons of versions 5 and 6, this may give additional information about which version has better behavior”. In my own post #10, I was wrong saying that the combination of two methods - interDyMFoam and interFoam for simulations of two-phase flows is not entirely successful. Because here we have static mesh. I have attached three pictures. I have made calculations with different OF versions. 1. alpha1 – OF1906, OF5, OF6, OF7 2. alpha2 – OF4, OF2006, OF8 3. alpha3 – calculation at different mass flow rates – at 7.5, 37.5, 75, and 150 m3/s. From the above-mentioned pictures, one can see that all versions, except OF6, give us almost the same results. Question #1. If we suppose that OF6 has improved comparatively oldest versions OF4 and OF5, what we can say about more new versions OF1906, OF2006, OF7, OF8? Question #2. What is the reason to carry out calculation up to 60s, if we have stationary water flow more early, say around 10s? Question #3. The calculations at different mass flow rate show that water flow close to the inclined wall. Why? |
|
January 5, 2021, 11:37 |
|
#12 |
Senior Member
|
Hi,
The ddtScheme has been reverted to previous one with the following commit; ddtScheme::fvcDdtPhiCoeff: Reverted to previous flux-normalised scheme https://github.com/OpenFOAM/OpenFOAM...ffef6ac7c5a7a0 |
|
January 5, 2021, 12:50 |
|
#13 |
Senior Member
abdikerim kurbanaliev
Join Date: Jun 2010
Location: Kyrgyzstan, Osh
Posts: 121
Rep Power: 16 |
Hi,
Thank you very much for your quick answer. It saved a lot of our time. I downloaded OF6 2 days ago for checking any changes. the results still the same. Does it mean that no changes have been made in OF6 right? |
|
January 6, 2021, 07:39 |
|
#14 |
Senior Member
|
Hi,
https://github.com/OpenFOAM/OpenFOAM...ffef6ac7c5a7a0 The above commit is dated on 21 Feb 2019 and has a tag "20190304". https://github.com/OpenFOAM/OpenFOAM...n-7...20190304 The comparison of codes between tags "version-7" and "20190304" shows nothing. You can check differences with the code you are using. How do I know which version I am currently using? https://develop.openfoam.com/Develop...urrently-using OF6 of the initial release will not include the code changes we are talking about. After "Date: Mon Jan 8 21:35:00 2018 +0000" , the source code of OF6 includes the change. It will be better to check the exact version (commit) of OF you are using/looking into. I am not sure exactly from where, how, and which OF6 you downloaded. |
|
January 6, 2021, 09:47 |
|
#15 |
Senior Member
abdikerim kurbanaliev
Join Date: Jun 2010
Location: Kyrgyzstan, Osh
Posts: 121
Rep Power: 16 |
Hi,
On Jan 3, 2021, I downloaded OF6 from this site: https://openfoam.org/download/6-ubuntu/ I have 18.04 LTS, bionic 64bit operating system. |
|
January 6, 2021, 11:41 |
|
#16 |
Senior Member
|
Hi,
You can check information about OpenFOAM you installed with the following command; Code:
dpkg -l | grep openfoam https://github.com/OpenFOAM/OpenFOAM-dev/releases At this page, you could find the tag you got within the context of history. We can compare codes under two tags using the following page; https://github.com/OpenFOAM/OpenFOAM...n-7...20190304 If you prefer working locally, you can check the source codes you have in your system. One of the files we are discussing is /opt/openfoam6/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C. |
|
January 7, 2021, 00:00 |
|
#17 |
Senior Member
abdikerim kurbanaliev
Join Date: Jun 2010
Location: Kyrgyzstan, Osh
Posts: 121
Rep Power: 16 |
Hello,
Yes, I am doing the same work. I have finished comparing \applications\solvers\multiphase\interFoam folder for OF5, OF6, and OF7. Now I'm trying to understand methods of calculation of fvcDdtPhiCoeff as mentioned in post #8. |
|
January 25, 2021, 20:48 |
|
#18 |
Senior Member
abdikerim kurbanaliev
Join Date: Jun 2010
Location: Kyrgyzstan, Osh
Posts: 121
Rep Power: 16 |
Dear Snak,
Please, explain the physical meaning of the fvcDdtPhiCoeff. How it related to the Euler method in OF? |
|
January 26, 2021, 06:13 |
|
#19 |
Senior Member
|
||
January 26, 2021, 18:22 |
|
#20 |
Senior Member
abdikerim kurbanaliev
Join Date: Jun 2010
Location: Kyrgyzstan, Osh
Posts: 121
Rep Power: 16 |
Snak,
Thanks a lot! |
|
Tags |
interfoam |
|
|