CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   How to Determine Patch Size (

mgdenno July 28, 2011 13:20

How to Determine Patch Size
Does anyone know how to determine the size of a patch (in say square meters)? I used snappyHexMesh to generate a mesh that conforms to an irregular surface and now I am trying to determine the inlet boundary patch size.



bigphil July 28, 2011 13:57


If you use the "patchIntegrate" utility, it will tell you the area of a patch.

patchIntegrate takes two arguments, the first is the volScalarField you wish to integrate, and the second is the patch you want to integrate over. In your case just specify any volScalarField you have. It will print out the patch area as well as the integrated value.

Hope it helps,

mgdenno July 28, 2011 16:06


Thanks for your help. I don't have my boundaries set up yet for this project so I don't have any scaler fields yet either...I will do as you suggested as soon as I get to that point.

Thanks again,


doubtsincfd July 28, 2011 16:14

mgdenno July 30, 2011 12:52

Phil and doubtsincfd thank you for your suggestions.

Phil I did as you suggested and it worked - thanks.

doubtsincfd I took a look at the link you suggested. It looked like a good solution, but maybe a little above my ability in OF at the moment as I haven't tried to do any coding with OF yet. Planning to try soon.

All times are GMT -4. The time now is 14:24.