CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Patch size (http://www.cfd-online.com/Forums/openfoam-post-processing/61458-patch-size.html)

anja June 1, 2006 07:07

Hi all, can someone please he
 
Hi all,
can someone please help me with getting the size of a patch?

For example something like that:
scalarField af = mesh.magSf().boundaryField()[inletIndex];
A +=gSum(af);

does not work.

Thanks
Anja

pierre June 1, 2006 12:06

const fvPatchList& patches(mes
 
const fvPatchList& patches(mesh.boundary());
forAll (patches, patchi)
{
if (patches[patchi].name()==word("inlet"))
{
scalar areaP = sum(patches[patchi].magSf());
}
}

Hope this helps

Pierre

eugene June 2, 2006 10:22

This scalar A = gSum(mesh.b
 
This

scalar A = gSum(mesh.boundaryField()[inletIndex].magSf());

should work fine.


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