CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Bug about MULES::implicitSolve for interPhaseChangeFoam in OF-1.6 (http://www.cfd-online.com/Forums/openfoam-bugs/70666-bug-about-mules-implicitsolve-interphasechangefoam-1-6-a.html)

chiven December 2, 2009 02:49

Bug about MULES::implicitSolve for interPhaseChangeFoam in OF-1.6
 
1 Attachment(s)
These days, many frields meet the same problem how to set the alpha1 for interPhaseChangeFoam in system/fvSolution in OF-1.6. I believe there is a bug in MULES::implicitSolve.
The dambreak case for interPhaseChangeFoam in OF-1.5 (http://www.cfd-online.com/Forums/ope...rial-15-a.html) is updated for OF-1.6, it is OK when MULES::implicitSolve() in alphaEqn.H is revised as MULES::explicitSolve().
However, for the interPhaseChangeFoam with MULES::implicitSolve(), the errors occur (attached as follows). What a pity, I have NOT found where and what the bug. The dambreak case is attached. Hope it helps to move things on.
Best regards,
Chiven

Code:

    alpha1
    {
        MULESImplicit
        {
        maxIter 1000;
        nLimiterIter 10;
        maxUnboundedness 1;
        CoCoeff 0.2;
        solver
        {
            solver PBiCG;
            preconditioner DILU;
            tolerance 1e-10;
            relTol 0;
        }
        }
    }

HTML Code:

Create time
Create mesh for time = 0
 
Reading g
Reading field p
Reading field alpha1
Reading field U
Reading/calculating face flux field phi
Creating phaseChangeTwoPhaseMixture
Selecting phaseChange model Kunz
Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting turbulence model type LESModel
Selecting LES turbulence model laminar
--> FOAM Warning :
    From function cubeRootVolDelta::calcDelta()
    in file cubeRootVolDelta/cubeRootVolDelta.C at line 53
    Case is 2D, LES is not strictly applicable
time step continuity errors : sum local = 0, global = 0, cumulative = 0
DICPCG:  Solving for pcorr, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
Courant Number mean: 0 max: 0
Starting time loop
Courant Number mean: 0 max: 0
deltaT = 2.39981e-05
Time = 2.39981e-05
 
Attempt to return dictionary entry as a primitive
file: /work/g2/e090012/dambreak/system/fvSolution::solver from line 59 to line 62.
    From function ITstream& primitiveEntry::stream() const
    in file db/dictionary/dictionaryEntry/dictionaryEntry.C at line 83.
FOAM aborting
#0  _ZN4Foam5error10printStackERNS_7OstreamE-0x1466af0
 in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.6/lib/linuxIA64GccDPOpt/libOpenFOAM.so"
#1  _ZN4Foam7IOerror5abortEv-0x1989560
 in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.6/lib/linuxIA64GccDPOpt/libOpenFOAM.so"
#2  _ZNK4Foam15dictionaryEntry6streamEv-0x1921900
 in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.6/lib/linuxIA64GccDPOpt/libOpenFOAM.so"
#3  _ZNK4Foam10dictionary6lookupERKNS_4wordEbb-0x19476e0
 in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.6/lib/linuxIA64GccDPOpt/libOpenFOAM.so"
#4  void Foam::MULES::implicitSolve<Foam::oneField, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >(Foam::oneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, double, double) in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxIA64GccDPOpt/interPhaseChangeFoam"
#5  main in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxIA64GccDPOpt/interPhaseChangeFoam"
#6  __libc_start_main-0x1060880
 in "/lib/tls/libc.so.6.1"
#7  _start in "/home/g2/e090012/OpenFOAM/OpenFOAM-1.6/applications/bin/linuxIA64GccDPOpt/interPhaseChangeFoam"
Abort


henry December 2, 2009 18:45

I have corrected and simplified the solver selection for implicit MULES and pushed the change into our OpenFOAM-1.6.x git repository.

I will also put together a tutorial case for the interPhaseChangeFoam solver and push it is when ready.

H

chiven December 4, 2009 01:03

1 Attachment(s)
Hi, Henry, OpenFOAM-1.6.x seems OK, thanks.

Chiven

henry December 18, 2009 14:36

We have just pushed a tutorial case for interPhaseChangeFoam into OpenFOAM-1.6.x:

OpenFOAM-1.6.x/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet

H

chiven December 19, 2009 23:13

Hi, Henry, the OpenFOAM-1.6.x does have the new case of cavitatingBullet, and it run well. thank you.

However, another error attached is met when furtherly rebuild the OF using Allwmake. I am not sure whether it is a bug.

Best regards,
chiven

Quote:

In file included from db/dictionary/functionEntries/removeEntry/removeEntry.C:29:
lnInclude/stringListOps.H:43:31: error: wordReListMatcher.H: No such file or directory
In file included from db/dictionary/functionEntries/removeEntry/removeEntry.C:29:
lnInclude/stringListOps.H:54: error: expected ',' or '...' before '&' token
lnInclude/stringListOps.H:56: error: ISO C++ forbids declaration of 'wordReListMatcher' with no type
lnInclude/stringListOps.H: In function 'bool Foam::findStrings(int)':
lnInclude/stringListOps.H:58: error: 'matcher' was not declared in this scope
lnInclude/stringListOps.H:58: error: 'str' was not declared in this scope
lnInclude/stringListOps.H: At global scope:
lnInclude/stringListOps.H:130: error: expected ',' or '...' before '&' token
lnInclude/stringListOps.H:133: error: ISO C++ forbids declaration of 'wordReListMatcher' with no type
lnInclude/stringListOps.H: In function 'Foam::labelList Foam::findStrings(int)':
lnInclude/stringListOps.H:135: error: 'matcher' was not declared in this scope
lnInclude/stringListOps.H:135: error: 'lst' was not declared in this scope
lnInclude/stringListOps.H:135: error: 'invert' was not declared in this scope
lnInclude/stringListOps.H: At global scope:
lnInclude/stringListOps.H:209: error: expected ',' or '...' before '&' token
lnInclude/stringListOps.H:212: error: ISO C++ forbids declaration of 'wordReListMatcher' with no type
lnInclude/stringListOps.H: In function 'StringListType Foam::subsetStrings(int)':
lnInclude/stringListOps.H:214: error: 'matcher' was not declared in this scope
lnInclude/stringListOps.H:214: error: 'lst' was not declared in this scope
lnInclude/stringListOps.H:214: error: 'invert' was not declared in this scope
lnInclude/stringListOps.H: At global scope:
lnInclude/stringListOps.H:287: error: expected ',' or '...' before '&' token
lnInclude/stringListOps.H:290: error: ISO C++ forbids declaration of 'wordReListMatcher' with no type
lnInclude/stringListOps.H: In function 'void Foam::inplaceSubsetStrings(int)':
lnInclude/stringListOps.H:292: error: 'matcher' was not declared in this scope
lnInclude/stringListOps.H:292: error: 'lst' was not declared in this scope
lnInclude/stringListOps.H:292: error: 'invert' was not declared in this scope
db/dictionary/functionEntries/removeEntry/removeEntry.C: In static member function 'static bool Foam::functionEntries::removeEntry::execute(Foam:: dictionary&, Foam::Istream&)':
db/dictionary/functionEntries/removeEntry/removeEntry.C:71: error: no matching function for call to 'findStrings(Foam::wordReList&, Foam::wordList&)'
lnInclude/stringListOps.H:56: note: candidates are: bool Foam::findStrings(int)
make: *** [Make/linuxIA64GccDPOpt/removeEntry.o] Error 1

henry December 20, 2009 04:09

I added some new files which will need to be linked into the lnInclude directories. Try running wcleanLnIncludeAll before Allwmake.

H

sandy January 9, 2010 00:50

Quote:

Originally Posted by henry (Post 240437)
We have just pushed a tutorial case for interPhaseChangeFoam into OpenFOAM-1.6.x:

OpenFOAM-1.6.x/tutorials/multiphase/interPhaseChangeFoam/cavitatingBullet

H

Hi henry, where did you release above tutorial? Why I could not find in http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/release/ ??

chiven January 9, 2010 01:43

You can download the OpenFOM-1.6.x from internet using the git kit, which includes this case. Please see this web page:

http://www.opencfd.co.uk/openfoam/download.html

Best regards,
Chiven

sandy January 24, 2010 10:24

Hi Chiven,

What about you to use the interPhaseChangeFoam solver in OpenFOAM-1.6.x ?

I ever installed the OpenFOAM-1.6 in my OpenFOAM folder. After you told me OpenFOAM-1.6.x, I tried to also install it in my OpenFOAM folder according to the README file:

git clone http://repo.or.cz/r/OpenFOAM-1.6.x.git
cd OpenFOAM-1.6.x
git pull


But it seems not to be compiled, I try to run the cavitationbutter case by this solver, I found it seemed to transfer to use the old interPhaseChangeFoam solver in OpenFOAM-1.6 .

Furthermore, I changed the MULESTemplate.C files of OpenFOAM-1.6, and use "wmake libso" to recompile it in the OpenFOAM/OpenFOAM-1.6/src/finiteVolum/ , however, it gave me the error information:

............
In file included from fvMatrices/solvers/MULES/MULES.H:130,
from fvMatrices/solvers/MULES/MULES.C:27:
fvMatrices/solvers/MULES/MULESTemplates.C:148:6: error: invalid preprocessing directive #const
fvMatrices/solvers/MULES/MULESTemplates.C:263:14: error: invalid preprocessing directive #MULEScontrols
make: *** [Make/linuxGccDPOpt/MULES.o] error 1



What are the matters, you think ?

In addition, how to source the environment setting, you think? Still to add the line :

. $HOME/OpenFOAM-1.6/etc

to the end of .bashrc file? ?


However, why not is:

. $HOME/OpenFOAM-1.6.x/etc

??

Please help me out. Thank you very much.

Regards,
Sandy

chiven January 24, 2010 20:00

Hi, Sandy, I reply your email.

regards,
Chiven

sandy January 25, 2010 02:12

Thanks, Chiven. I got it!

sandy January 30, 2010 04:18

Quote:

Originally Posted by henry (Post 238560)
I have corrected and simplified the solver selection for implicit MULES and pushed the change into our OpenFOAM-1.6.x git repository.

I will also put together a tutorial case for the interPhaseChangeFoam solver and push it is when ready.

H

Hi Henry,

About the Kunz's model, why the Cv and Cc are 900000 and 30000 respectively in many references? however, they are all 1000 in the cavitatingBullet case of interPhaseChangeFoam solver. Which parameter should I choose to set, you think?

Sandy

sandy January 30, 2010 04:25

Quote:

Originally Posted by chiven (Post 238691)
Hi, Henry, OpenFOAM-1.6.x seems OK, thanks.

Chiven

Hi Chiven,

In your dambreak case, you set the Cc and Cv are 1000 and 10000 respectively. Why?

Sandy

henry January 31, 2010 06:01

The cavitatingBullet case is set to run the Schnerr-Sauer model with coefficients

SchnerrSauerCoeffs
{
n n [0 -3 0 0 0 0 0] 1.6e+09;
dNuc dNuc [0 1 0 0 0 0 0] 2.0e-06;
Cc Cc [0 0 0 0 0 0 0] 1;
Cv Cv [0 0 0 0 0 0 0] 1;
}

If you would rather run it with the Kunz model feel free to do so and set the coefficients to anything that you feel is appropriate.

H

ovie May 8, 2010 02:10

Chiven,

Did you manage to implement MULES::ImplicitSolve for alpha1 in interFoam? I am particulary interested in how this affects the time step. Does it allow for LARGER values of delta t when you use ImplicitSolve for alpha1?

sandy May 9, 2010 19:43

Quote:

Originally Posted by ovie (Post 258002)
Chiven,

Did you manage to implement MULES::ImplicitSolve for alpha1 in interFoam? I am particulary interested in how this affects the time step. Does it allow for LARGER values of delta t when you use ImplicitSolve for alpha1?


Yes, I change the delta T, MaxCo and MaxDeltaT in the controlDict file, but the time step still keeps the same value. I don't know why?

vahid.najafi February 24, 2012 03:17

mass dest and prod in kunz model
 
Hello OpenFoam users ,
I'm studying on the Kunz model.we know in this model we have two term for mass dest and prod.(m+ and m-)
What mean mDotAlphal() and mDotP() In interphasechangeFoam?
What is the difference between these two?

nimasam February 24, 2012 03:38

Hi Dear vahid
its not appropriate place for your question :), its a post to report the bug :)
However
it is almost the same, just it is used pos (p) not p so then they can multiply mDotP() further in p in pEqn.H

sandy April 18, 2013 22:56

Please help
 
Hi everybody, I totally can not get correct pressure in the stagnation point when I use the interPhaseChangeFoam of OF 2.1.0 and 2.1.1 to simulate a NACA foil. Who can help me out? Please.


All times are GMT -4. The time now is 17:33.