Tell me more ×
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

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.)

share|improve this question
(Also asked at cfd-online.com: cfd-online.com/Forums/openfoam-post-processing/…) – kar Jul 24 '12 at 9:42
1  
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). – bgschaid Jul 24 '12 at 17:59
@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 – kar Jul 25 '12 at 8:48

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.