alphaEqnSubCycle.H
Go to the documentation of this file.
1 {
2  // Standard face-flux compression coefficient
3  surfaceScalarField phic(interface.cAlpha()*mag(phi/mesh.magSf()));
4 
5  // Add the optional isotropic compression contribution
6  if (icAlpha > 0)
7  {
8  phic *= (1.0 - icAlpha);
9  phic += (interface.cAlpha()*icAlpha)*fvc::interpolate(mag(U));
10  }
11 
13 
14  if (nAlphaSubCycles > 1)
15  {
16  dimensionedScalar totalDeltaT = runTime.deltaT();
17  surfaceScalarField rhoPhiSum
18  (
19  IOobject
20  (
21  "rhoPhiSum",
22  runTime.timeName(),
23  mesh
24  ),
25  mesh,
26  dimensionedScalar(rhoPhi.dimensions(), Zero)
27  );
28 
29  for
30  (
31  subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
32  !(++alphaSubCycle).end();
33  )
34  {
35  #include "alphaEqn.H"
36  rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
37  }
38 
39  rhoPhi = rhoPhiSum;
40  }
41  else
42  {
43  #include "alphaEqn.H"
44  }
45 
46  rho == alpha1*rho1 + alpha2*rho2;
47 }
runTime
engineTime & runTime
Definition: createEngineTime.H:13
rhoPhi
rhoPhi
Definition: rhoEqn.H:10
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
alpha2
const volScalarField & alpha2
Definition: setRegionFluidFields.H:9
interface
interfaceProperties interface(alpha1, U, thermo->transportPropertiesDict())
alphaEqn.H
alpha1
const volScalarField & alpha1
Definition: setRegionFluidFields.H:8
nAlphaSubCycles
label nAlphaSubCycles(alphaControls.get< label >("nAlphaSubCycles"))
rho
rho
Definition: alphaEqnSubCycle.H:70
Foam::fac::div
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:50
phic
surfaceScalarField phic(mixture.cAlpha() *mag(alphaPhic/mesh.magSf()))
divU
volScalarField divU(fvc::div(phi))
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:43
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
rho2
volScalarField & rho2
Definition: setRegionFluidFields.H:30
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
rho1
volScalarField & rho1
Definition: setRegionFluidFields.H:27
icAlpha
scalar icAlpha(alphaControls.getOrDefault< scalar >("icAlpha", 0))
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
stdFoam::end
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
Definition: stdFoam.H:121
U
U
Definition: pEqn.H:72
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::fac::interpolate
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.