CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

zonePhaseVolumes.H in multiphaseEulerFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   March 12, 2014, 07:53
Default zonePhaseVolumes.H in multiphaseEulerFOAM
Senior Member
Join Date: Jan 2012
Posts: 159
Rep Power: 7
maybee is on a distinguished road
hi, am I right that the following code of file "zonePhaseVolumes.H" calculates the phase volumes for each phase in each cell?
    2     const scalarField& V = mesh.V();
    4     forAll(mesh.cellZones(), czi)
    5     {
    6         const labelList& cellLabels = mesh.cellZones()[czi];
    8         forAllConstIter(PtrDictionary<phaseModel>, fluid.phases(), iter)
    9         {
   10             const volScalarField& alpha = iter();
   11             scalar phaseVolume = 0;
   13             forAll(cellLabels, cli)
   14             {
   15                 label celli = cellLabels[cli];
   16                 phaseVolume += alpha[celli]*V[celli];
   17             }
   19             reduce(phaseVolume, sumOp<scalar>());
   21             Info<<
   22                 << " phase volume in zone " << mesh.cellZones()[czi].name()
   23                 << " = " << phaseVolume*1e6 << " ml " << endl;
   24         }
   25     }
   26 }
with reduce(...) see:

I think sometimes a brief description of the content and especially the results of included files in solvers would be great. With results I mean what is calculated and where is it stored in the end...

maybee is offline   Reply With Quote

Old   March 12, 2014, 18:51
Default Zone phase volumes
New Member
Chethan Mohan Kumar
Join Date: Mar 2014
Posts: 2
Rep Power: 0
Chethan is on a distinguished road
You are right. You can access the zone phase 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.

Chethan is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
multiphaseEulerFoam + kineticTheoryProperties vasava OpenFOAM Running, Solving & CFD 4 November 18, 2015 02:22
How to tune up interfaceCompression and virtualMass in multiphaseEulerFoam? petr.f. OpenFOAM Running, Solving & CFD 4 October 28, 2015 06:37
query regarding deltaT in multiphaseEulerFoam bigboss.abhishek OpenFOAM Running, Solving & CFD 6 September 24, 2015 15:56
multiphaseEulerFoam: efficient way of implementing fields for all phases maybee OpenFOAM Programming & Development 0 January 23, 2014 05:16
multiphaseEulerFoam kwardle OpenFOAM 3 March 25, 2013 11:31

All times are GMT -4. The time now is 16:36.