CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Writing equations (http://www.cfd-online.com/Forums/openfoam/93351-writing-equations.html)

mikeP October 12, 2011 09:38

Writing equations
 
I have a question regarding how the Navier-Stokes is formulated in icoFoam.C file.

fvVectorMatrix UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
- fvm::laplacian(nu, U)
);

solve(UEqn == -fvc::grad(p));


Above, all density terms are simplified except the one included in phi (phi = rho x U). How is this possible?

Shouldn't it be something like below:

fvm::ddt(rho, U)
+ fvm::div(phi, U)
- fvm::laplacian(mu, U)
==
- fvc::grad(p)

marupio October 12, 2011 11:34

In icoFoam, since density is uniform and constant, it is pulled out of the equation. Even "phi" is actually volume flux.


All times are GMT -4. The time now is 04:53.