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/)
-   -   alpha fields in multiphase tutorial cases (https://www.cfd-online.com/Forums/openfoam-programming-development/131280-alpha-fields-multiphase-tutorial-cases.html)

maybee March 12, 2014 08:57

alpha fields in multiphase tutorial cases
 
hi,

I have looked up now several multiphase tutorial cases and within the 0 folders are some kind of phase fraction fields (alpha) already stored (E.g. tutorial case bubbleColumn of multiphaseEulerFoam.)

My questions are...

1. How can the fields (internal fields) have been described without running "blockMesh" before and therefore not knowing the mesh-structure and cell-numbers?

2. If this is some kind of special procedure - how does it work and where are the fields read and stored in multiphaseEulerFoam?

Edit:

3. Most importantly: Can I access the phasefraction fields of each phase by doing
Code:

PtrDictionary<phaseModel>& PhasesPtrDictionary = fluid.phases();
wordList Phasenames
(
    PhasesPtrDictionary.toc()
);
for (int currentLoopPass = 0; currentLoopPass <= 5; currentLoopPass++ )
{
word actualPhase = Phasenames[currentLoopPass];
phaseModel* ActualPhase = PhasesPtrDictionary.lookupPtr(actualPhase);
volScalarField& AlphaActualPhase = *ActualPhase;
}

?

greetings
maybee

Chethan March 12, 2014 17:40

Accessing values of a phase in a certain cell zone
 
Hi,
In regard to your 3rd question:
You can definitely access the zone volumes. In fact it is automatically displayed onto your log during run time. The only pre- requisite is that, you need to have defined cell zones in your mesh.

You can define it in your blockMeshDict when you define your block. You can verify the existence of your zones in the poly mesh directory after running blockMesh.

Another hint for tracking cell zone based values would be through the use of libsofunctionobjects in controlDict, again a cell zone must be defined while creating the mesh.


Hope this helps.


Regards,
Chethan

maybee March 13, 2014 04:44

Quote:

You can definitely access the zone volumes. In fact it is automatically displayed onto your log during run time. The only pre- requisite is that, you need to have defined cell zones in your mesh.
Actually I did not want to access the zone volumes, but the phase fractions of each phase. Will my code work?


All times are GMT -4. The time now is 00:29.