compressibleAlphaEqnSubCycle.H
Go to the documentation of this file.
1 tmp<surfaceScalarField> talphaPhi1(alphaPhi10);
2 
4 {
5  dimensionedScalar totalDeltaT = runTime.deltaT();
6 
8  (
9  IOobject
10  (
11  "alphaPhi1",
12  runTime.timeName(),
13  mesh
14  ),
15  mesh,
16  dimensionedScalar(alphaPhi10.dimensions(), Zero)
17  );
18 
19  surfaceScalarField rhoPhiSum
20  (
21  IOobject
22  (
23  "rhoPhiSum",
24  runTime.timeName(),
25  mesh
26  ),
27  mesh,
28  dimensionedScalar(rhoPhi.dimensions(), Zero)
29  );
30 
31  tmp<volScalarField> trSubDeltaT;
32 
33  if (LTS)
34  {
35  trSubDeltaT =
36  fv::localEulerDdt::localRSubDeltaT(mesh, nAlphaSubCycles);
37  }
38 
39  for
40  (
41  subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
42  !(++alphaSubCycle).end();
43  )
44  {
45  #include "alphaEqn.H"
46  talphaPhi1.ref() += (runTime.deltaT()/totalDeltaT)*alphaPhi10;
47  rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
48  }
49 
50  rhoPhi = rhoPhiSum;
51 }
52 else
53 {
54  #include "alphaEqn.H"
55 }
56 
58 
61 
62 volScalarField::Internal contErr
63 (
64  (
66  - (fvOptions(alpha1, mixture.thermo1().rho())&rho1)
67  - (fvOptions(alpha2, mixture.thermo2().rho())&rho2)
68  )()
69 );
runTime
engineTime & runTime
Definition: createEngineTime.H:13
rhoPhi
rhoPhi
Definition: rhoEqn.H:10
contErr
volScalarField::Internal contErr((fvc::ddt(rho)+fvc::div(rhoPhi) -(fvOptions(alpha1, mixture.thermo1().rho())&rho1) -(fvOptions(alpha2, mixture.thermo2().rho())&rho2))())
talphaPhi1
tmp< surfaceScalarField > talphaPhi1(alphaPhi10)
alphaPhi10
alphaPhi10
Definition: alphaEqn.H:7
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
alpha2
const volScalarField & alpha2
Definition: setRegionFluidFields.H:9
alphaPhi2
surfaceScalarField alphaPhi2("alphaPhi2", phi - alphaPhi1)
alpha1
const volScalarField & alpha1
Definition: setRegionFluidFields.H:8
nAlphaSubCycles
label nAlphaSubCycles(alphaControls.get< label >("nAlphaSubCycles"))
Foam::fac::div
tmp< GeometricField< Type, faPatchField, areaMesh > > div(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facDiv.C:50
alphaPhi1
const surfaceScalarField & alphaPhi1
Definition: compressibleAlphaEqnSubCycle.H:59
rho
rho
Definition: readInitialConditions.H:88
fvOptions
fv::options & fvOptions
Definition: setRegionFluidFields.H:23
Foam::dimensionedScalar
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Definition: dimensionedScalarFwd.H:42
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
rho2
volScalarField & rho2
Definition: setRegionFluidFields.H:30
rho1
volScalarField & rho1
Definition: setRegionFluidFields.H:27
LTS
bool LTS
Definition: createRDeltaT.H:1
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
Foam::surfaceScalarField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Definition: surfaceFieldsFwd.H:54
Foam::fac::ddt
tmp< GeometricField< Type, faPatchField, areaMesh > > ddt(const dimensioned< Type > dt, const faMesh &mesh)
Definition: facDdt.C:47
mixture
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:39