compressibleAlphaEqnSubCycle.H
Go to the documentation of this file.
1 fvModels.source(alpha1, mixture.thermo1().rho());
2 
3 tmp<surfaceScalarField> talphaPhi1(alphaPhi10);
4 
6 {
7  dimensionedScalar totalDeltaT = runTime.deltaT();
8 
10  (
11  IOobject
12  (
13  "alphaPhi1",
14  runTime.timeName(),
15  mesh
16  ),
17  mesh,
18  dimensionedScalar(alphaPhi10.dimensions(), 0)
19  );
20 
21  surfaceScalarField rhoPhiSum
22  (
23  IOobject
24  (
25  "rhoPhiSum",
26  runTime.timeName(),
27  mesh
28  ),
29  mesh,
30  dimensionedScalar(rhoPhi.dimensions(), 0)
31  );
32 
33  tmp<volScalarField> trSubDeltaT;
34 
35  if (LTS)
36  {
37  trSubDeltaT =
38  fv::localEulerDdt::localRSubDeltaT(mesh, nAlphaSubCycles);
39  }
40 
41  for
42  (
43  subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
44  !(++alphaSubCycle).end();
45  )
46  {
47  #include "alphaEqn.H"
48  talphaPhi1.ref() += (runTime.deltaT()/totalDeltaT)*alphaPhi10;
49  rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
50  }
51 
52  rhoPhi = rhoPhiSum;
53 }
54 else
55 {
56  #include "alphaEqn.H"
57 }
58 
59 const surfaceScalarField& alphaPhi1 = talphaPhi1();
60 surfaceScalarField alphaPhi2("alphaPhi2", phi - alphaPhi1);
61 
62 volScalarField::Internal contErr
63 (
64  (
66  - (fvModels.source(alpha1, mixture.thermo1().rho())&rho1)
67  - (fvModels.source(alpha2, mixture.thermo2().rho())&rho2)
68  )()
69 );
const volScalarField & rho1
volScalarField::Internal contErr((fvc::ddt(rho)+fvc::div(rhoPhi) -(fvModels.source(alpha1, mixture.thermo1().rho())&rho1) -(fvModels.source(alpha2, mixture.thermo2().rho())&rho2))())
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Definition: fvcDiv.C:47
engineTime & runTime
volScalarField & alpha1(mixture.alpha1())
surfaceScalarField alphaPhi10(alphaPhi10Header, phi *fvc::interpolate(alpha1))
alpha2
Definition: alphaEqn.H:115
tmp< GeometricField< Type, fvPatchField, volMesh > > ddt(const dimensioned< Type > dt, const fvMesh &mesh)
Definition: fvcDdt.C:45
dynamicFvMesh & mesh
phi
Definition: correctPhi.H:3
bool LTS
Definition: createRDeltaT.H:1
const label nAlphaSubCycles(alphaControls.lookup< label >("nAlphaSubCycles"))
Foam::fvModels & fvModels
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const volScalarField & rho2
rhoPhi
Definition: rhoEqn.H:10
tmp< surfaceScalarField > talphaPhi1(alphaPhi10)
surfaceScalarField alphaPhi2("alphaPhi2", phi - alphaPhi1)
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField