Files
openfoam/applications/solvers/multiphase/compressibleInterFoam/compressibleInterIsoFoam/alphaSuSp.H
Mark Olesen c21c5e070a COMP: relocate compressibleInterIsoFoam (#1726)
- place under compressibleInterFoam to ensure that the library
  dependency on VoFphaseCompressibleTurbulenceModels is satisfied
2020-06-15 14:16:52 +02:00

44 lines
743 B
C

volScalarField::Internal Sp
(
IOobject
(
"Sp",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar(dgdt.dimensions(), Zero)
);
volScalarField::Internal Su
(
IOobject
(
"Su",
runTime.timeName(),
mesh
),
mesh,
dimensionedScalar(dgdt.dimensions(), Zero)
);
forAll(dgdt, celli)
{
if (dgdt[celli] > 0.0)
{
Sp[celli] -= dgdt[celli]/max(1.0 - alpha1[celli], 1e-4);
Su[celli] += dgdt[celli]/max(1.0 - alpha1[celli], 1e-4);
}
else if (dgdt[celli] < 0.0)
{
Sp[celli] += dgdt[celli]/max(alpha1[celli], 1e-4);
}
}
volScalarField::Internal divU
(
mesh.moving()
? fvc::div(phi + mesh.phi())
: fvc::div(phi)
);