FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

alphaEqnsSubCycle.H

Go to the documentation of this file.
00001 {
00002     label nAlphaCorr
00003     (
00004         readLabel(piso.lookup("nAlphaCorr"))
00005     );
00006 
00007     label nAlphaSubCycles
00008     (
00009         readLabel(piso.lookup("nAlphaSubCycles"))
00010     );
00011 
00012     surfaceScalarField phic = mag(phi/mesh.magSf());
00013     phic = min(interface.cAlpha()*phic, max(phic));
00014 
00015     volScalarField divU = fvc::div(phi);
00016 
00017     if (nAlphaSubCycles > 1)
00018     {
00019         dimensionedScalar totalDeltaT = runTime.deltaT();
00020         surfaceScalarField rhoPhiSum = 0.0*rhoPhi;
00021 
00022         for
00023         (
00024             subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
00025             !(++alphaSubCycle).end();
00026         )
00027         {
00028             #include "alphaEqns.H"
00029             rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
00030         }
00031 
00032         rhoPhi = rhoPhiSum;
00033     }
00034     else
00035     {
00036         #include "alphaEqns.H"
00037     }
00038 
00039     if (oCorr == 0)
00040     {
00041         interface.correct();
00042     }
00043 }
00044 
00045 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines