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

pEqn.H

Go to the documentation of this file.
00001 U = rUA*UEqn().H();
00002 
00003 if (nCorr <= 1)
00004 {
00005     UEqn.clear();
00006 }
00007 
00008 phi = (fvc::interpolate(U) & mesh.Sf())
00009     + fvc::ddtPhiCorr(rUA, U, phi);
00010 
00011 adjustPhi(phi, U, p);
00012 
00013 // Non-orthogonal pressure corrector loop
00014 for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
00015 {
00016     // Pressure corrector
00017     fvScalarMatrix pEqn
00018     (
00019         fvm::laplacian(rUA, p) == fvc::div(phi)
00020     );
00021 
00022     pEqn.setReference(pRefCell, pRefValue);
00023 
00024     if
00025     (
00026         oCorr == nOuterCorr-1
00027      && corr == nCorr-1
00028      && nonOrth == nNonOrthCorr
00029     )
00030     {
00031         pEqn.solve(mesh.solver("pFinal"));
00032     }
00033     else
00034     {
00035         pEqn.solve();
00036     }
00037 
00038     if (nonOrth == nNonOrthCorr)
00039     {
00040         phi -= pEqn.flux();
00041     }
00042 }
00043 
00044 #include <finiteVolume/continuityErrs.H>
00045 
00046 // Explicitly relax pressure for momentum corrector except for last corrector
00047 if (oCorr != nOuterCorr-1)
00048 {
00049     p.relax();
00050 }
00051 
00052 U -= rUA*fvc::grad(p);
00053 U.correctBoundaryConditions();
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines