FreeFOAM The Cross-Platform CFD Toolkit
zonePhaseVolumes.H
Go to the documentation of this file.
1 {
2  const scalarField& V = mesh.V();
3 
4  forAll(mesh.cellZones(), czi)
5  {
6  const labelList& cellLabels = mesh.cellZones()[czi];
7 
8  forAllConstIter(PtrDictionary<phase>, mixture.phases(), iter)
9  {
10  const volScalarField& alpha = iter();
11  scalar phaseVolume = 0;
12 
13  forAll(cellLabels, cli)
14  {
15  label celli = cellLabels[cli];
16  phaseVolume += alpha[celli]*V[celli];
17  }
18 
19  reduce(phaseVolume, sumOp<scalar>());
20 
21  Info<< alpha.name()
22  << " phase volume in zone " << mesh.cellZones()[czi].name()
23  << " = " << phaseVolume*1e6 << " ml " << endl;
24  }
25  }
26 }