FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

zonePhaseVolumes.H

Go to the documentation of this file.
00001 {
00002     const scalarField& V = mesh.V();
00003 
00004     forAll(mesh.cellZones(), czi)
00005     {
00006         const labelList& cellLabels = mesh.cellZones()[czi];
00007 
00008         forAllConstIter(PtrDictionary<phase>, mixture.phases(), iter)
00009         {
00010             const volScalarField& alpha = iter();
00011             scalar phaseVolume = 0;
00012 
00013             forAll(cellLabels, cli)
00014             {
00015                 label celli = cellLabels[cli];
00016                 phaseVolume += alpha[celli]*V[celli];
00017             }
00018 
00019             reduce(phaseVolume, sumOp<scalar>());
00020 
00021             Info<< alpha.name()
00022                 << " phase volume in zone " << mesh.cellZones()[czi].name()
00023                 << " = " << phaseVolume*1e6 << " ml " << endl;
00024         }
00025     }
00026 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines