OpenFOAM
v2512
The open source CFD toolbox
Loading...
Searching...
No Matches
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
for
(
const
volScalarField&
alpha
:
fluid
.phases())
9
{
10
scalar phaseVolume = 0;
11
12
for
(
const
label celli : cellLabels)
13
{
14
phaseVolume +=
alpha
[celli]*V[celli];
15
}
16
17
reduce(phaseVolume, sumOp<scalar>());
18
19
Info<<
alpha
.name()
20
<<
" phase volume in zone "
<<
mesh
.cellZones()[czi].name()
21
<<
" = "
<< phaseVolume*1e6 <<
" ml "
<< endl;
22
}
23
}
24
}
fluid
twoPhaseSystem & fluid
Definition
setRegionFluidFields.H:1
mesh
dynamicFvMesh & mesh
Definition
createDynamicFvMesh.H:6
Foam::Expression::V
const expr V(m.psi().mesh().V())
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition
primitiveFieldsFwd.H:46
alpha
volScalarField & alpha
Definition
readThermalProperties.H:212
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition
stdFoam.H:299
applications
solvers
multiphase
multiphaseEulerFoam
zonePhaseVolumes.H
Generated by
1.16.1