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 rho = thermo.rho();
00002 
00003 volScalarField rUA = 1.0/UEqn.A();
00004 U = rUA*UEqn.H();
00005 
00006 surfaceScalarField phid
00007 (
00008     "phid",
00009     fvc::interpolate(psi)
00010    *(
00011         (fvc::interpolate(U) & mesh.Sf())
00012       + fvc::ddtPhiCorr(rUA, rho, U, phi)
00013     )
00014 );
00015 
00016 for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
00017 {
00018     fvScalarMatrix pEqn
00019     (
00020         fvm::ddt(psi, p)
00021       + fvm::div(phid, p)
00022       - fvm::laplacian(rho*rUA, p)
00023     );
00024 
00025     pEqn.solve();
00026 
00027     if (nonOrth == nNonOrthCorr)
00028     {
00029         phi = pEqn.flux();
00030     }
00031 }
00032 
00033 #include <finiteVolume/rhoEqn.H>
00034 #include <finiteVolume/compressibleContinuityErrs.H>
00035 
00036 U -= rUA*fvc::grad(p);
00037 U.correctBoundaryConditions();
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines