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 volScalarField rUA = 1.0/UEqn.A();
00002 
00003 surfaceScalarField rUAf
00004 (
00005     "(rho*(1|A(U)))",
00006     fvc::interpolate(rho)*fvc::interpolate(rUA)
00007 );
00008 
00009 U = rUA*UEqn.H();
00010 phi =
00011     fvc::interpolate(rho)
00012    *(
00013        (fvc::interpolate(U) & mesh.Sf())
00014      + fvc::ddtPhiCorr(rUA, rho, U, phi)
00015     );
00016 
00017 surfaceScalarField phiU("phiU", phi);
00018 phi -= ghf*fvc::snGrad(rho)*rUAf*mesh.magSf();
00019 
00020 for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
00021 {
00022     fvScalarMatrix p_rghEqn
00023     (
00024         fvm::laplacian(rUAf, p_rgh) == fvc::ddt(rho) + fvc::div(phi)
00025     );
00026 
00027     p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
00028     p_rghEqn.solve();
00029 
00030     if (nonOrth == nNonOrthCorr)
00031     {
00032         phi -= p_rghEqn.flux();
00033     }
00034 }
00035 
00036 p == p_rgh + rho*gh;
00037 
00038 if (p_rgh.needReference())
00039 {
00040     p += dimensionedScalar
00041     (
00042         "p",
00043         p.dimensions(),
00044         pRefValue - getRefCellValue(p, pRefCell)
00045     );
00046     p_rgh = p - rho*gh;
00047 }
00048 
00049 #include <finiteVolume/rhoEqn.H>
00050 #include "compressibleContinuityErrs.H"
00051 
00052 U += rUA*fvc::reconstruct((phi - phiU)/rUAf);
00053 U.correctBoundaryConditions();
00054 
00055 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines