compressibleAlphaEqnSubCycle.H
Go to the documentation of this file.
1tmp<surfaceScalarField> talphaPhi1(alphaPhi10);
2
4{
5 dimensionedScalar totalDeltaT = runTime.deltaT();
6
7 talphaPhi1 = new surfaceScalarField
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}
52else
53{
54 #include "alphaEqn.H"
55}
56
58
59const surfaceScalarField& alphaPhi1 = talphaPhi1();
60surfaceScalarField alphaPhi2("alphaPhi2", phi - alphaPhi1);
61
62volScalarField::Internal contErr
63(
64 (
65 fvc::ddt(rho) + fvc::div(rhoPhi)
66 - (fvOptions(alpha1, mixture.thermo1().rho())&rho1)
67 - (fvOptions(alpha2, mixture.thermo2().rho())&rho2)
68 )()
69);
rhoPhi
Definition: rhoEqn.H:10
fv::options & fvOptions
surfaceScalarField & phi
const volScalarField & alpha1
volScalarField & rho2
const volScalarField & alpha2
volScalarField & rho1
const surfaceScalarField & alphaPhi2
tmp< surfaceScalarField > talphaPhi1(alphaPhi10)
const surfaceScalarField & alphaPhi1
volScalarField::Internal contErr((fvc::ddt(rho)+fvc::div(rhoPhi) -(fvOptions(alpha1, mixture.thermo1().rho())&rho1) -(fvOptions(alpha2, mixture.thermo2().rho())&rho2))())
alphaPhi10
Definition: alphaEqn.H:7
dynamicFvMesh & mesh
engineTime & runTime
bool LTS
Definition: createRDeltaT.H:1
Info<< "Creating temperaturePhaseChangeTwoPhaseMixture\n"<< endl;autoPtr< temperaturePhaseChangeTwoPhaseMixture > mixture
Definition: createFields.H:39
label nAlphaSubCycles(alphaControls.get< label >("nAlphaSubCycles"))