compressibleAlphaEqnSubCycle.H
Go to the documentation of this file.
1 if (pimple.nCorrPIMPLE() > 1)
2 {
3  if (!pimple.firstIter())
4  {
5  // Resetting alpha1 to value before advection in first PIMPLE
6  // iteration.
7  alpha1 = alpha1.oldTime();
8  }
9 }
10 tmp<surfaceScalarField> talphaPhi1(alphaPhi10);
11 
13 {
14  dimensionedScalar totalDeltaT = runTime.deltaT();
15 
17  (
18  IOobject
19  (
20  "alphaPhi1",
21  runTime.timeName(),
22  mesh
23  ),
24  mesh,
25  dimensionedScalar(alphaPhi10.dimensions(), Zero)
26  );
27 
28  surfaceScalarField rhoPhiSum
29  (
30  IOobject
31  (
32  "rhoPhiSum",
33  runTime.timeName(),
34  mesh
35  ),
36  mesh,
37  dimensionedScalar(rhoPhi.dimensions(), Zero)
38  );
39 
40  for
41  (
42  subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
43  !(++alphaSubCycle).end();
44  )
45  {
46  #include "alphaEqn.H"
47  talphaPhi1.ref() += (runTime.deltaT()/totalDeltaT)*alphaPhi10;
48  rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
49  }
50 
51  rhoPhi = rhoPhiSum;
52 }
53 else
54 {
55  #include "alphaEqn.H"
56 }
57 
59 
62 
63 volScalarField::Internal contErr
64 (
65  (
67  - (fvOptions(alpha1, mixture.thermo1().rho())&rho1)
68  - (fvOptions(alpha2, mixture.thermo2().rho())&rho2)
69  )()
70 );
volScalarField & rho1
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:43
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:39
engineTime & runTime
const volScalarField & alpha2
const surfaceScalarField & alphaPhi1
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
Definition: facDdt.C:40
fv::options & fvOptions
volScalarField::Internal contErr((fvc::ddt(rho)+fvc::div(rhoPhi) -(fvOptions(alpha1, mixture.thermo1().rho())&rho1) -(fvOptions(alpha2, mixture.thermo2().rho())&rho2))())
dynamicFvMesh & mesh
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
Definition: stdFoam.H:201
pimpleControl & pimple
volScalarField & rho2
alphaPhi10
Definition: alphaEqn.H:7
label nAlphaSubCycles(alphaControls.get< label >("nAlphaSubCycles"))
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
rhoPhi
Definition: rhoEqn.H:10
tmp< surfaceScalarField > talphaPhi1(alphaPhi10)
surfaceScalarField alphaPhi2("alphaPhi2", phi - alphaPhi1)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127
const volScalarField & alpha1