MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
alphaEqnsSubCycle.H
Go to the documentation of this file.
1 
6 {
8  #include "alphaControls.H"
9 
10  surfaceScalarField phic(mag(phi/mesh.magSf()));
11  phic = min(interface.cAlpha()*phic, max(phic));
12 
13  volScalarField divU(fvc::div(fvc::absolute(phi, U)));
14 
15  if (nAlphaSubCycles > 1)
16  {
17  dimensionedScalar totalDeltaT = runTime.deltaT();
18  surfaceScalarField rhoPhiSum
19  (
20  IOobject
21  (
22  "rhoPhiSum",
23  runTime.timeName(),
24  mesh
25  ),
26  mesh,
27  dimensionedScalar("0", rhoPhi.dimensions(), 0)
28  );
29 
30  for
31  (
32  subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
33  !(++alphaSubCycle).end();
34  )
35  {
36  #include "alphaEqns.H"
37  rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
38  }
39 
40  rhoPhi = rhoPhiSum;
41  }
42  else
43  {
44  #include "alphaEqns.H"
45  }
46 }
47 ///@endcond
builds and solves the phase volume fraction equation.