alphaSuSp.H
Go to the documentation of this file.
1 volScalarField::Internal Sp
2 (
3  IOobject
4  (
5  "Sp",
6  runTime.timeName(),
7  mesh
8  ),
9  mesh,
10  dimensionedScalar(dgdt.dimensions(), Zero)
11 );
12 
13 volScalarField::Internal Su
14 (
15  IOobject
16  (
17  "Su",
18  runTime.timeName(),
19  mesh
20  ),
21  mesh,
22  dimensionedScalar(dgdt.dimensions(), Zero)
23 );
24 
25 forAll(dgdt, celli)
26 {
27  if (dgdt[celli] > 0.0)
28  {
29  Sp[celli] -= dgdt[celli]/max(1.0 - alpha1[celli], 1e-4);
30  Su[celli] += dgdt[celli]/max(1.0 - alpha1[celli], 1e-4);
31  }
32  else if (dgdt[celli] < 0.0)
33  {
34  Sp[celli] += dgdt[celli]/max(alpha1[celli], 1e-4);
35  }
36 }
37 
38 volScalarField::Internal divU
39 (
40  mesh.moving()
41  ? fvc::div(phiCN() + mesh.phi())
42  : fvc::div(phiCN())
43 );
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Sp
zeroField Sp
Definition: alphaSuSp.H:2
forAll
forAll(dgdt, celli)
Definition: alphaSuSp.H:25
alpha1
const volScalarField & alpha1
Definition: setRegionFluidFields.H:8
Foam::fac::div
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:50
Su
zeroField Su
Definition: alphaSuSp.H:1
divU
zeroField divU
Definition: alphaSuSp.H:3
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:43
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::constant::electromagnetic::e
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
phiCN
tmp< surfaceScalarField > phiCN(alphaPhic)