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     fvc::makeAbsolute(phi, U);
00016     volScalarField divU = fvc::div(phi);
00017     fvc::makeRelative(phi, U);
00018 
00019     if (nAlphaSubCycles > 1)
00020     {
00021         dimensionedScalar totalDeltaT = runTime.deltaT();
00022         surfaceScalarField rhoPhiSum = 0.0*rhoPhi;
00023 
00024         for
00025         (
00026             subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
00027             !(++alphaSubCycle).end();
00028         )
00029         {
00030             #include "../alphaEqns.H"
00031             rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
00032         }
00033 
00034         rhoPhi = rhoPhiSum;
00035     }
00036     else
00037     {
00038         #include "../alphaEqns.H"
00039     }
00040 
00041     if (oCorr == 0)
00042     {
00043         interface.correct();
00044     }
00045 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines