Average weighted value calc at specific plane
2 Attachment(s)
Dear Friends,
I wonder if anyone has ever tried to calculate average weighted value (ie. velocity) at localized plane within your domain? I found there were ways to calculate average weighted value at defined patch, but what if I want to do that anywhere else? Just as what I showed in the attached pics. If I want to calculate average wind velocity at the highlighted plane (in black), how can I achieve that? Should I define coordinates of the plane I want to calculate in Controldict? Pls bear with me if I repeat my questions so many times. Appreciate in advance for any help. Regards, MarkJIN |
Hi,
Let's assume, you are using OpenFOAM 4.x. Did you try surfaceRegion function object? (See http://cpp.openfoam.org/v4/a02578.html#details). There is an option to take field values from sampledSurface, you can average values. |
Quote:
Dear Alexey, Thanks for your guide. I'm using openfoam 4.1. I havent try surfaceRegion before. Is this function working when running xxFoam or working during postprocessing? Btw, where can I define the coordinates of my user defined face to be averaged? I'm quite new to openfoam and cannot understand the structure of dictionaries sometime. Regards, Mark |
Hi,
If is still relevant, - it can be run both ways, since it is function object. - definition of sampledSurface can be learned from: 1. https://github.com/OpenFOAM/OpenFOAM...es/controlDict 2. If you need plane, then maybe cuttingPlane instead of sampledTriSurfaceMesh if better choice, definition can be found, for example, here: https://github.com/OpenFOAM/OpenFOAM...m/cuttingPlane |
Quote:
Dear Alexey, Thanks for your links, seems relevant. Best regards, Mark |
finally,
how did you selected an area an then did the average of a field u? |
Quote:
How can we average a value using sampledSurface? I need to calculate force on an area inside my domain. The area is not a patch, so I can not use patchIntegrate or force. I also tried surface sampling, but I only got pressures at each point on the area, not with the cell area. Therefore, I can not quantify the force. I also tried surfaceRegion, but I am not sure which operation should I use? Do you know or have suggestions? I have been searching and trying for almost three days with this, but not yet seen a light. I would appreciate your suggestion. Thank you. eb19 |
All times are GMT -4. The time now is 13:43. |