multiphaseInterFoam - creation of the phases in MultiphaseMixture and the iNew class
Hi all. I'm trying to understand the details of the multiphaseInterFoam solver.
My aim is to modify the explicit density based solver dbnsFoam of the extend project for use of a mixture of arbitrarily many compressible materials with Mie-Gruneisen type equation of state (no viscosity, no contact angle stuff etc., very simple), and i hope i can use a datastructure similar to the MultiphaseMixture class of multiphaseInterFoam. In the MultiphaseMixture class I just can't figure out how and when the phases in the phases_ PtrDictionary are created. In the phase.H header i stumble over the definition of the nested class iNew: Code:
//- Return a pointer to a new phase created on freestore I gess the creation of the phase objects is done in the constructor of MultiphaseMixture, where the constructor for the phases_ PtrDictionary is called in the line Code:
phases_(lookup("phases"), phase::iNew(U, phi)), What i suppose is: the lookup("phases") command gives back the list of dictionaries for the properties of the component phases, which are read from the transportProperties dictionary. But i only see a call of the iNew contructor which of course gives back an object of type iNew, but i can find nowhere a definition of a constructor of a PtrDictionary which takes an argument of type phase::iNew or something like that. Nor do i find a call of iNew:: operator()(Istream& is), as mentioned. I tried to find out by going through the damBrek4phase tutorial case step by step with a debugger, but didn't manage to get it done right. Can anybody explain what i'm getting wrong? Since this mechanism with iNew is also used in other solvers, i think it would be worth the time making clear how it works. |
Quote:
Hi, I want to manipulate multiphaseInterFoam so I need to have a deep understanding about the criteria of the code. Would you please let me know if you know any paper which the code is written based on it? Cheers, Elham |
multiphaseInterFoam is interFoam with some additional features, e.g. an arbitrary number n of phases instead of only 2. I think some things in interFoam are explaned in the PhD thesis of Ubbink (i didn't read it thoroughly, i must admit).
|
constructor
Hi
If you take a look at doxygen (https://cpp.openfoam.org/v5/classFoa...b457a9b01e2c06) the answer is in PtrDictionary constructor which is: Code:
PtrDictionary ( Istream & is, I have a problem in alpha gradient definition (https://www.cfd-online.com/Forums/op...interfoam.html). I'll be appreciated if you can share your info. |
All times are GMT -4. The time now is 05:47. |