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 
16  volScalarField divU = fvc::div(phi);
18 
19  if (nAlphaSubCycles > 1)
20  {
21  dimensionedScalar totalDeltaT = runTime.deltaT();
22  surfaceScalarField rhoPhiSum = 0.0*rhoPhi;
23 
24  for
25  (
26  subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
27  !(++alphaSubCycle).end();
28  )
29  {
30  #include "../alphaEqns.H"
31  rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
32  }
33 
34  rhoPhi = rhoPhiSum;
35  }
36  else
37  {
38  #include "../alphaEqns.H"
39  }
40 
41  if (oCorr == 0)
42  {
43  interface.correct();
44  }
45 }