FreeFOAM The Cross-Platform CFD Toolkit
alphaEqnsSubCycle.H
Go to the documentation of this file.
1 label nAlphaCorr
2 (
3  readLabel(piso.lookup("nAlphaCorr"))
4 );
5 
6 label nAlphaSubCycles
7 (
8  readLabel(piso.lookup("nAlphaSubCycles"))
9 );
10 
12 {
13  surfaceScalarField rhoPhiSum = 0.0*rhoPhi;
14  dimensionedScalar totalDeltaT = runTime.deltaT();
15 
16  for
17  (
18  subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
19  !(++alphaSubCycle).end();
20  )
21  {
22 # include "alphaEqns.H"
23  rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
24  }
25 
26  rhoPhi = rhoPhiSum;
27 }
28 else
29 {
30 # include "alphaEqns.H"
31 }
32 
33 interface.correct();
34 
35 {
36  volScalarField rhoNew = alpha1*rho1 + alpha2*rho2 + alpha3*rho3;
37 
38  //solve(fvm::ddt(rho) + fvc::div(rhoPhi));
39  //Info<< "density error = "
40  // << max((mag(rho - rhoNew)/mag(rhoNew))().internalField()) << endl;
41 
42  rho == rhoNew;
43 }