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  mesh.moving()
15  ? fvc::div(phi + mesh.phi())
16  : fvc::div(phi)
17  );
18 
19  if (nAlphaSubCycles > 1)
20  {
21  dimensionedScalar totalDeltaT = runTime.deltaT();
22  surfaceScalarField rhoPhiSum
23  (
24  mesh.newIOobject("rhoPhiSum"),
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 }
scalar icAlpha(alphaControls.getOrDefault< scalar >("icAlpha", 0))
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
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.
volScalarField & rho1
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:43
engineTime & runTime
interfaceProperties interface(alpha1, U, thermo->transportPropertiesDict())
const volScalarField & alpha2
volScalarField divU(mesh.moving() ? fvc::div(phi+mesh.phi()) :fvc::div(phi))
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:72
dynamicFvMesh & mesh
volScalarField & rho2
surfaceScalarField phic(mixture.cAlpha() *mag(alphaPhic/mesh.magSf()))
label nAlphaSubCycles(alphaControls.get< label >("nAlphaSubCycles"))
U
Definition: pEqn.H:72
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
rhoPhi
Definition: rhoEqn.H:10
const char * end
Definition: SVGTools.H:223
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127
const volScalarField & alpha1