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 A = UEqn.A();
00004 U = UEqn.H()/A;
00005 
00006 if (transonic)
00007 {
00008     surfaceScalarField phid
00009     (
00010         "phid",
00011         fvc::interpolate(psi)
00012        *((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
00013     );
00014 
00015     for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
00016     {
00017         fvScalarMatrix pEqn
00018         (
00019             fvm::ddt(psi, p)
00020           + fvm::div(phid, p)
00021           - fvm::laplacian(rho/A, p)
00022          ==
00023             Sevap
00024         );
00025 
00026         pEqn.solve();
00027 
00028         if (nonOrth == nNonOrthCorr)
00029         {
00030             phi == pEqn.flux();
00031         }
00032     }
00033 }
00034 else
00035 {
00036     phi = fvc::interpolate(rho)
00037          *((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U));
00038 
00039     for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
00040     {
00041         fvScalarMatrix pEqn
00042         (
00043             fvm::ddt(psi, p)
00044           + fvc::div(phi)
00045           - fvm::laplacian(rho/A, p)
00046          ==
00047             Sevap
00048         );
00049 
00050         pEqn.solve();
00051 
00052         if (nonOrth == nNonOrthCorr)
00053         {
00054             phi += pEqn.flux();
00055         }
00056     }
00057 }
00058 
00059 #include "rhoEqn.H"
00060 #include <finiteVolume/compressibleContinuityErrs.H>
00061 
00062 U -= fvc::grad(p)/A;
00063 U.correctBoundaryConditions();
00064 
00065 DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);
00066 
00067 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines