FreeFOAM The Cross-Platform CFD Toolkit
alphaEqnsSubCycle.H
Go to the documentation of this file.
1 {
2  label nAlphaCorr
3  (
4  readLabel(piso.lookup("nAlphaCorr"))
5  );
6 
7  label nAlphaSubCycles
8  (
9  readLabel(piso.lookup("nAlphaSubCycles"))
10  );
11 
12  surfaceScalarField phic = mag(phi/mesh.magSf());
13  phic = min(interface.cAlpha()*phic, max(phic));
14 
15  volScalarField divU = fvc::div(phi);
16 
17  if (nAlphaSubCycles > 1)
18  {
19  dimensionedScalar totalDeltaT = runTime.deltaT();
20  surfaceScalarField rhoPhiSum = 0.0*rhoPhi;
21 
22  for
23  (
24  subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
25  !(++alphaSubCycle).end();
26  )
27  {
28  #include "alphaEqns.H"
29  rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
30  }
31 
32  rhoPhi = rhoPhiSum;
33  }
34  else
35  {
36  #include "alphaEqns.H"
37  }
38 
39  if (oCorr == 0)
40  {
41  interface.correct();
42  }
43 }
44 
45 // ************************ vim: set sw=4 sts=4 et: ************************ //