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         scalar phaseVolume = 0;
00009 
00010         forAll(cellLabels, cli)
00011         {
00012             label celli = cellLabels[cli];
00013             phaseVolume += alpha1[celli]*V[celli];
00014         }
00015 
00016         reduce(phaseVolume, sumOp<scalar>());
00017 
00018         Info<< "Phase volume in zone " << mesh.cellZones()[czi].name()
00019             << " = " << phaseVolume*1e6 << " ml " << endl;
00020     }
00021 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines