2
$\begingroup$

I would like to use patchAverage to obtain the average pressure on an object that consists of multiple patches (due to different boundary conditions), however patchAverage only averages over single patches. As long as the constituent patches aren't shared with other objects, I could simply take the area-weighted average of each patch's average.

However, due to a dynamic geometry where the individual patches change area in time, this would become quite messy. So instead, my idea is to use topoSet to define a faceSet and turn that into a new object patch via createPatch (replacing the old ones, which are no longer needed after simulating).

Would createPatch correctly map the simulated fields to the new patch or would I end up with values being mapped to the wrong vertices? Or is there another way to achieve this? (I also considered using sample, which can obtain the values for multiple surfaces at once, but then I'd have to manually average, and I'm not sure this way I'd weigh the patch faces correctly.)

$\endgroup$
3
  • $\begingroup$ (Also asked at cfd-online.com: cfd-online.com/Forums/openfoam-post-processing/…) $\endgroup$ Commented Jul 24, 2012 at 9:42
  • 1
    $\begingroup$ I think CFD-online is a better place for this question. The patches are different at each timestep? Then you'll have a lot of fun with createPatch. I (but that is me) would go for a solution with swak4Foam (funkyDoCalc if you want the evaluation as a postprocessor. A functionObject if you want it during the run). $\endgroup$
    – bgschaid
    Commented Jul 24, 2012 at 17:59
  • $\begingroup$ @bgschaid in this case I agree with you, I still wanted to see whether I might get some input here. I'll have a look at swak4Foam, thanks $\endgroup$ Commented Jul 25, 2012 at 8:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.