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 surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA));
00005 U = rUA*UEqn.H();
00006 
00007 surfaceScalarField phiU
00008 (
00009     fvc::interpolate(rho)
00010    *(
00011         (fvc::interpolate(U) & mesh.Sf())
00012       + fvc::ddtPhiCorr(rUA, rho, U, phi)
00013     )
00014 );
00015 
00016 phi = phiU - rhorUAf*ghf*fvc::snGrad(rho)*mesh.magSf();
00017 
00018 for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
00019 {
00020     surfaceScalarField rhorUAf = fvc::interpolate(rho*rUA);
00021 
00022     fvScalarMatrix p_rghEqn
00023     (
00024         fvm::ddt(psi, p_rgh) + fvc::ddt(psi, rho)*gh
00025       + fvc::div(phi)
00026       - fvm::laplacian(rhorUAf, p_rgh)
00027     );
00028 
00029     p_rghEqn.solve
00030     (
00031         mesh.solver(p_rgh.select(corr == nCorr-1 && nonOrth == nNonOrthCorr))
00032     );
00033 
00034     if (nonOrth == nNonOrthCorr)
00035     {
00036         phi += p_rghEqn.flux();
00037     }
00038 }
00039 
00040 p = p_rgh + rho*gh;
00041 
00042 #include <finiteVolume/rhoEqn.H>
00043 #include <finiteVolume/compressibleContinuityErrs.H>
00044 
00045 U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf);
00046 U.correctBoundaryConditions();
00047 
00048 DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines