CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Calculus syntax (http://www.cfd-online.com/Forums/openfoam/60989-calculus-syntax.html)

chris1980 April 28, 2006 12:25

I am wondering if some is able
 
I am wondering if some is able to "translate" me the code in a more mathematican way.

phi = fvc::interpolate(rho)
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U));

> what is phi in this context? I do not understand how it is computed!

for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvc::div(phi)
- fvm::laplacian(rho*rUA, p)
);

>How to determine this equation? I think this is PISO related stuff.

pEqn.solve();

hartinger April 29, 2006 09:26

Hi Chris, in foam usually a
 
Hi Chris,

in foam usually all variables are stored at the cell centre. But for calculating the divergence of a field the face values are needed. So fvc::interpolate returns a field containing the face values interpolated from the cell-centre values. The interpolation scheme is defined in system/fvScheme by the entry interpolationScheme, usually linear.

phi is in your example the mass-flux across the faces corrected for mesh-motion by fvc::meshPhi.

the pEqn is part of PISO, probably you look in one of the foam thesis' for it's derivation or ferziger and peric

regards
Markus


All times are GMT -4. The time now is 17:22.