CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   multiphaseEulerFoam: scalarCoeffSymmTable::const_iterator cAlpha in solveAlphase() (https://www.cfd-online.com/Forums/openfoam-programming-development/128462-multiphaseeulerfoam-scalarcoeffsymmtable-const_iterator-calpha-solvealphase.html)

maybee January 13, 2014 05:30

multiphaseEulerFoam: scalarCoeffSymmTable::const_iterator cAlpha in solveAlphase()
 
hi,

in method solveAlphas() of multiphasesystem.C of multiphaseEulerFoam is found:

Question 1:

Code:

scalarCoeffSymmTable::const_iterator cAlpha                                                                                         
            (                                                                                                                                                               
                cAlphas_.find(interfacePair(phase1, phase2))  //scalarCoeffSymmTable cAlphas_;                                                                                                                                                                       
            );                                                                    //in multiphasesystem.H

Am I right that in "cAlphas_" is searched for the "interfacePair(phase1, phase2) entry" and if found/existant "scalarCoeffSymmTable::const_iterator cAlpha" is set to the position of the pair?

Question 2:

Later on the following line appears:

Code:

phir += min(cAlpha()*phic, max(phic))*nHatf(phase1, phase2);
with the operator ():

Code:

inline T& Foam::HashTable<T, Key, Hash>::operator()(const Key& key) //Find and return a hashedEntry, create it null if not present.
146*{
147* iterator iter = this->find(key);
148*
149* if (iter == this->end())
150* {
151* this->insert(key, T());
152* return *find(key);
153* }
154* else
155* {
156* return *iter;
157* }
158*}

Is this the right operator () ? and what is exactly the "key" since the operator is called on "scalarCoeffSymmTable::const_iterator cAlpha" (see first code snippet)?

greetings
maybee

jpeter3 September 16, 2015 14:43

multiphaseSystem::solveAlphas() - How does it work?
 
I am also interested in this part of the code, just working through the solveAlphas() method to get good understanding of how openfoam calculates transport of alphas.

Is there any book or an article describing the method used for this calculations?

P.S.:
link to source file, line 59

Cheers,
Jaka


All times are GMT -4. The time now is 23:14.