CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Strange interPhaseChangeFoam behavior after restart (https://www.cfd-online.com/Forums/openfoam-bugs/181227-strange-interphasechangefoam-behavior-after-restart.html)

karamiag December 10, 2016 06:12

Strange interPhaseChangeFoam behavior after restart
 
1 Attachment(s)
Hi all,
I am using interPhaseChangeFoam (OpenFOAM-dev) solver and I am experiencing difficoulties
similar to those described by vkrastev in his post even if the solver is different. The solution to those problems was well explained by Alberto Passalacqua:
Quote:

The flux phi was locally re-declared inside the main function. This made the local value accessible to the all the instructions explicitly present in the main function. However an inconsistent value was provided to the turbulence model, whose autoPtr is declared in createFields.H, outside the main().

Other problem that was going to happen: the stored "phi" was the one declared in createFields. The one locally re-declared in main was not stored at all, since its IOobject write option is not set to AUTO_WRITE.
This would have led to an inconsistent value of phi at restart, which was causing the problem.
Attached there is a very simplified case consisting of a cavity case (with only four cells) solved
with interPhaseChangeFoam. Inside the attached tar file there are four time directories 0, 1, 2, 3:
  • the directory named 2 is obtained restarting calculations from the time 1;
  • the directory named 3 is obtained starting calculations from the time 0 till time 2 (I have renamed it because I am using binary write format and I want to check values using paraFoam) ;
Results in the directories 2 and 3 are quite different.
Could this be reported as a bug of the interPhaseChangeFoam solver or I'm doing something wrong?
Thank you very much!

karamiag December 29, 2016 12:16

OK,
I am trying to trace through which fields are different between the continuous run and the restart but I am not able to find where in the source code it is written to read the
alpha.water field.
Can someone please help me?


All times are GMT -4. The time now is 02:35.