CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   interPhaseChangeFoam with nOuterCorrectors != 1 (http://www.cfd-online.com/Forums/openfoam-bugs/83657-interphasechangefoam-noutercorrectors-1-a.html)

akidess January 6, 2011 10:17

interPhaseChangeFoam with nOuterCorrectors != 1
 
I'm comparing the implementations of alphaEqn and alphaEqnSubCycle in interFoam and interPhaseChangeFoam, and they're pretty much equivalent except that interPhaseChangeFoam only calls interface.correct() if nOuterCorr is 1. This doesn't make sense to me, because if nOuterCorr is not 1, the interface curvature is never updated, and this would naturally lead to wrong results.

If someone can confirm this is a bug I will file a bug report with OpenCFD. If it isn't, I would appreciate an explanation why :)

Zheng.Zhi December 31, 2012 17:38

Quote:

Originally Posted by akidess (Post 289481)
I'm comparing the implementations of alphaEqn and alphaEqnSubCycle in interFoam and interPhaseChangeFoam, and they're pretty much equivalent except that interPhaseChangeFoam only calls interface.correct() if nOuterCorr is 1. This doesn't make sense to me, because if nOuterCorr is not 1, the interface curvature is never updated, and this would naturally lead to wrong results.

If someone can confirm this is a bug I will file a bug report with OpenCFD. If it isn't, I would appreciate an explanation why :)

I find the same problem and I can't understand it too

abe April 8, 2013 07:36

I have got the same conclusion. In my solver, I have removed the 'if' condition. So, the interface.correct() will be performed after solving alpha equation

ABE

sandy April 19, 2013 00:43

Hi ABC, can you use interPhaseChangeFoam to get good results? Which version do you use?

abe April 19, 2013 03:02

Hi Sandy,

I have tried OF 2.1x and 2.2x. Unfortunately, until now I was not able to get good results.

ABE

wyldckat April 26, 2013 20:53

Greetings to all!

You might want to check the following bug report and see if it's directly related to the problems you're having: http://www.openfoam.org/mantisbt/view.php?id=817

Best regards,
Bruno

sandy April 26, 2013 21:43

Quote:

Originally Posted by wyldckat (Post 423444)
Greetings to all!

You might want to check the following bug report and see if it's directly related to the problems you're having: http://www.openfoam.org/mantisbt/view.php?id=817

Best regards,
Bruno

Hi , what's the difference between two versions ?? I think , they are the same.

wyldckat April 28, 2013 06:05

Hi Sandy,

If these two bug reports are essentially the same, then the issue has been fixed: http://www.openfoam.org/mantisbt/view.php?id=817
The two relevant commits are:
________________________

Although, from Anton's original post, the current code still has:
Quote:

https://github.com/OpenFOAM/OpenFOAM...angeFoam.C#L86
Code:

        if (pimple.nCorrPIMPLE() == 1)
        {
            interface.correct();
        }


But if we compare to the source code on the compressibleInterFoam source code:
Quote:

https://github.com/OpenFOAM/OpenFOAM...nterFoam.C#L84
Code:

            // correct interface on first PIMPLE corrector
            if (pimple.corr() == 1)
            {
                interface.correct();
            }


It would seem that something very strange is indeed going on...

I had a look at 1.6-ext source code and things were still strange as well:


interFoam on the other hand, always calls "interface.correct()". Well... I suppose this could be submitted as a possible bug report for code review, since there doesn't seem to exist any explicit indication of where we can look of information on a related paper...

Best regards,
Bruno

sfigato May 3, 2013 02:53

Greetings to all!

I am using the interPhaseChangeFoam in OpenFoam version 2.1.x! I did not understand if is there or not a bug for this solver in this OpenFoam version!

Anyway, I made the variations of the link:

https://github.com/OpenFOAM/OpenFOAM...231425dd4b2bd8

and I got this compiling message error:

Quote:

ifas@lg-208-linux:~/OpenFOAM/ifas-2.1.x/applications/solver/interPhaseChangeFoamx> wmake
Making dependency list for source file interPhaseChangeFoamx.C
could not open file fvIOoptionList.H for source file interPhaseChangeFoamx.C
Making dependency list for source file phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C
Making dependency list for source file phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C
Making dependency list for source file phaseChangeTwoPhaseMixtures/Kunz/Kunz.C
Making dependency list for source file phaseChangeTwoPhaseMixtures/Merkle/Merkle.C
Making dependency list for source file phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C
SOURCE=interPhaseChangeFoamx.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/OpenFOAM/OpenFOAM-2.1.x/src/transportModels -I/opt/OpenFOAM/OpenFOAM-2.1.x/src/transportModels/incompressible/lnInclude -I/opt/OpenFOAM/OpenFOAM-2.1.x/src/transportModels/interfaceProperties/lnInclude -I/opt/OpenFOAM/OpenFOAM-2.1.x/src/turbulenceModels/incompressible/turbulenceModel -IphaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture -I/opt/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/lnInclude -I/opt/OpenFOAM/OpenFOAM-2.1.x/src/meshTools/lnInclude -I/opt/OpenFOAM/OpenFOAM-2.1.x/src/fvOptions/lnInclude -I/opt/OpenFOAM/OpenFOAM-2.1.x/src/sampling/lnInclude -IlnInclude -I. -I/opt/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/opt/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/interPhaseChangeFoamx.o
interPhaseChangeFoamx.C:50:28: fatal error: fvIOoptionList.H: Datei oder Verzeichnis nicht gefunden
compilation terminated.
make: *** [Make/linux64GccDPOpt/interPhaseChangeFoamx.o] Fehler 1
Could anyone explain to me which bug has this solver?
Moreover, Anyone knows what is that error (I just followed the passages in the link)?


Thanks in advance
Regards

Marco

abe May 3, 2013 03:23

Hi Marco,

The bug was about the using incorrect alpha value in the twophasemixture function. To overcome this, 'alpha2' has been presented and used in the upgraded OF2.2.x.
I am not sure what is the reason of the error you have encountered, but for sure, it should be something from your setting.

ABE

sfigato May 3, 2013 03:35

Hi Abe,

first of all thanks for the quick reply!
If I understood correctly, The bug is already solved in OF2.2.x version, am I right?

This bug was in the .-/src/transportModel/.../twoPhaseIncompressibleMixture?

I am currently using the OpenFoam version 2.1.x. Do you know if there is a procedure to fix this bug for this version??

Anyway, Did you get better results with bug-free version of this solver?

Thank you
Regards
Marco

abe May 3, 2013 04:56

Yes, in the current version of OF2.2.x, the bug has been corrected.

The bug was about twoPhaseProperties (http://www.openfoam.org/mantisbt/view.php?id=817).

I suggest that you upgrade to OF22x. In the case that you prefer to use OF21x, I think it would be possible to solve the bug by some modifications. The best way could be comparing solvers of the two versions. Send me your email, so I send the interPhaseChangeFoam solver of OF22x.

Yes, I was really impressed by the solver stability and accuracy of the results (for my case cavitation around flat plate).


ABE

sfigato May 3, 2013 05:30

Hi Abe,

thank you very much,
my mail is: m.longhitano88@gmail.com

I think that, you should send the solver and the library in src folder as well!

Anyway, I implemented a diverse mass transfer coeffcients (Singhal et al. /2005/) in the interPhaseChangeModel!

If you want, I can send to you and you can test them with yours test cases!

Last question, do you know if it is possible to update the openfoam version?

Let me know
Regards
Marco

abe May 3, 2013 08:28

Hi,

Yes it is possible to update. Here you can find the way:
https://github.com/OpenFOAM/OpenFOAM-2.2.x

I have sent the OF22x original interPhaseChange solver.

Yes, I would be thankful if you send the singhal modified solver.

Regards,
Abolfazl

wyldckat May 3, 2013 10:59

FYI: there has been yet another update on 2.2.x: https://github.com/OpenFOAM/OpenFOAM...911775e177eaa5

sfigato May 3, 2013 11:06

Hi Bruno,

A short question,

Can I update the 2.1.x version or must I install the 2.2.x? (I have tried but I got compiling errors)

Thanks
Regards
Marco

wyldckat May 3, 2013 11:49

Hi Marco,

As Abe wrote, it's preferable that you install OpenFOAM 2.2.x as well. You can easily have more than one OpenFOAM version installed in your machine. See http://www.cfd-online.com/Forums/ope...tml#post416327 - post #5, for ideas.

As for applying the changes made on 2.2.x to 2.1.x, I should be possible, but there were considerable changes in this solver between versions. It requires a laborious side-by-side comparison of the source codes and applying manually the necessary changes.
For example, the error you got was due to the new feature "fvOptions" that was introduced in OpenFOAM 2.2: http://www.openfoam.org/version2.2.0/fvOptions.php - which is something that isn't present in 2.1.x.

Best regards,
Bruno

sfigato May 3, 2013 11:54

Hi Bruno,

All right!
thanks for the quick reply. In order to avoid to back to you again I have another question!

Which procedure do you suggest to follow to install openFoam 2.2.x (I am using OpenSuse 12.something (sorry I do not remember and I am not in my office))

I ask it because everytime I follow the official web site I get some problems!

P.S.: I also want to have a debug compiling

Thanks in advance
Marco

wyldckat May 5, 2013 12:32

Hi Marco,

If it's openSUSE 12.3: http://albertopassalacqua.com/?p=1290

Other than that, check: http://openfoamwiki.net/index.php/In...2.2.0/openSUSE - from these you can get the information on the packages to install. Then cross-reference with the instructions on the previous link, which was for openSUSE 12.3.

Best regards,
Bruno

sfigato May 6, 2013 07:17

Hi Bruno,

I am using openSuse 12.3 so I cross the two links that you wrote! Moreover I will follow what you suggested in this threads:

http://www.cfd-online.com/Forums/ope...oam-1-6-a.html

to use the debug version

Thanks again Bruno

Regards
Marco


All times are GMT -4. The time now is 03:04.