CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   PISO in sonicFoam (http://www.cfd-online.com/Forums/openfoam-solving/58786-piso-sonicfoam.html)

srinath June 20, 2008 03:21

Hello I have a doubt in the
 
Hello

I have a doubt in the PISO loop.

In sonicFoam.C, "phid" is defined by

surfaceScalarField phid =
(
(fvc::interpolate(rho*U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
)/fvc::interpolate(p);

later in solving for pressure, the code says

fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvm::div(phid, p, "div(phid,p)")
- fvm::laplacian(rho*rUA, p)
);

pEqn.solve();

Why are we dividing by p, when defining phid and later multiplying by p, when doing fvm::div(phid, p). The corresponding term in icoFoam is treated expicitly as fvc::div(phi).

So my second question is why is this term being treated implicitly in sonicFoam, but explicitly in icoFoam?

Regards
Srinath


All times are GMT -4. The time now is 21:48.