CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   divergence (https://www.cfd-online.com/Forums/openfoam/68880-divergence.html)

r2d2 October 5, 2009 08:27

divergence
 
Hi,
I want to create a volumeScalar field with the value for the divergence
of a quantity S*V where S is a scalar and V a vector (velocity).
For this I do

phiS = linearInterpolate(S*V)&mesh.Sf();
forAll(mesh.cells()cellI){
netFluxVol[cellI] = 0.0;
forAll(mesh.cells()[cellI],iface)
{
netFluxVol[cellI]+=phiS[iface]
}
}
Is this right?
many thanks,
Radu


All times are GMT -4. The time now is 08:27.