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 
16  talphaPhi1.reset
17  (
19  (
20  mesh.newIOobject("alphaPhi1"),
21  mesh,
22  dimensionedScalar(alphaPhi10.dimensions(), Zero)
23  )
24  );
25 
26  surfaceScalarField rhoPhiSum
27  (
28  mesh.newIOobject("rhoPhiSum"),
29  mesh,
30  dimensionedScalar(rhoPhi.dimensions(), Zero)
31  );
32 
33  for
34  (
35  subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
36  !(++alphaSubCycle).end();
37  )
38  {
39  #include "alphaEqn.H"
40  talphaPhi1.ref() += (runTime.deltaT()/totalDeltaT)*alphaPhi10;
41  rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
42  }
43 
44  rhoPhi = rhoPhiSum;
45 }
46 else
47 {
48  #include "alphaEqn.H"
49 }
50 
52 
55 
56 volScalarField::Internal contErr
57 (
58  (
60  - (fvOptions(alpha1, mixture.thermo1().rho())&rho1)
61  - (fvOptions(alpha2, mixture.thermo2().rho())&rho2)
62  )()
63 );
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