alphaEqnSubCycle.H
Go to the documentation of this file.
2 {
3  dimensionedScalar totalDeltaT = runTime.deltaT();
4  surfaceScalarField rhoPhiSum
5  (
6  IOobject
7  (
8  "rhoPhiSum",
9  runTime.timeName(),
10  mesh
11  ),
12  mesh,
13  dimensionedScalar("0", rhoPhi.dimensions(), 0)
14  );
15 
16  for
17  (
18  subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
19  !(++alphaSubCycle).end();
20  )
21  {
22  #include "alphaEqn.H"
23  rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
24  }
25 
26  rhoPhi = rhoPhiSum;
27 }
28 else
29 {
30  #include "alphaEqn.H"
31 }
32 
33 {
34  volScalarField rhoNew(alpha1*rho1 + alpha2*rho2 + alpha3*rho3);
35 
36  // solve(fvm::ddt(rho) + fvc::div(rhoPhi));
37  // Info<< "density error = "
38  // << max((mag(rho - rhoNew)/mag(rhoNew))().primitiveField()) << endl;
39 
40  rho == rhoNew;
41 }
engineTime & runTime
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:52
dynamicFvMesh & mesh
const volScalarField & alpha1
alpha2
Definition: alphaEqn.H:115
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
rhoPhi
Definition: rhoEqn.H:10
const dimensionedScalar & rho2
Definition: createFields.H:40
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const dimensionedScalar & rho1
Definition: createFields.H:39
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")))