multiphaseInterFoam access to alpha.water
Hi all,
to modify the multiphaseInterFoam solver I'm trying to use alpha.water in the UEqn. How can I adress it? My approach: Code:
volScalarField& alphaWater = objectRegistry::lookupObject<volScalarField>("alpha.water"); Edit: Compilation error: Quote:
|
Hi Martin,
Could you find answer to your question? I am trying to address alpha of my first phase. Thanks |
I am struggling with the same problem. Any help would be welcome!
|
Hi Gary,
You have to include your changes e.g. new parameter in multiphaseMixture. |
Thanks for your comment, bbita. I tried it, but I did not get it to work. I am not an experienced programmer. Could you show me how you solved it?
|
Hi gary,
It completely depends on the changes you want to apply in your code. I suggest you to understand different sections in the file. For instance, if you want to add a new parameter, you can do that similar to the way that rho is defined. |
Hay!
If i remember correctly, in interMultiphaseFoam, all the phase fields are stored in phases_ of multiphaseMixture. So accessing one of them would probably look like: volScalarField& alphaWater= mixture.phases()["water"]; mixture - name of multiphaseMixture class phases() - returns PtrDictionary<phase> phases_ ["sth"] - looks if there is a phase that has a name "sth" in phases_, and returns it hope it helps |
All times are GMT -4. The time now is 16:20. |