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 label nAlphaCorr
00002 (
00003     readLabel(piso.lookup("nAlphaCorr"))
00004 );
00005 
00006 label nAlphaSubCycles
00007 (
00008     readLabel(piso.lookup("nAlphaSubCycles"))
00009 );
00010 
00011 if (nAlphaSubCycles > 1)
00012 {
00013     surfaceScalarField rhoPhiSum = 0.0*rhoPhi;
00014     dimensionedScalar totalDeltaT = runTime.deltaT();
00015 
00016     for
00017     (
00018         subCycle<volScalarField> alphaSubCycle(alpha1, nAlphaSubCycles);
00019         !(++alphaSubCycle).end();
00020     )
00021     {
00022 #       include "alphaEqns.H"
00023         rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi;
00024     }
00025 
00026     rhoPhi = rhoPhiSum;
00027 }
00028 else
00029 {
00030 #       include "alphaEqns.H"
00031 }
00032 
00033 interface.correct();
00034 
00035 {
00036     volScalarField rhoNew = alpha1*rho1 + alpha2*rho2 + alpha3*rho3;
00037 
00038     //solve(fvm::ddt(rho) + fvc::div(rhoPhi));
00039     //Info<< "density error = "
00040     //    << max((mag(rho - rhoNew)/mag(rhoNew))().internalField()) << endl;
00041 
00042     rho == rhoNew;
00043 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines