CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Sample region of a patch (https://www.cfd-online.com/Forums/openfoam-post-processing/203501-sample-region-patch.html)

JensD June 29, 2018 05:48

Sample region of a patch
 
I am trying to extract temperatures from a patch (a cylindrical wall), however I'm only interested in the values between specific axial coordinates. Currently, I use sampleDict to extract all temperature data of the patch and remove all undesired values manually.

For other kinds of sampling you can specify a sampling region and I'm wondering if this option is available for patch sampling. Anyone have any suggestions?

RobertHB June 29, 2018 07:15

Hello Jens,

have you tried splitting your original patch into multiple smaller patches and just sampling the subregion you are interested in? E.g. creating a faceSet of the region of interest and then using createPatch to generate a patch from that faceSet?

JensD June 29, 2018 08:10

Hi Robert

Thanks for the response. This seems like a good method. On selecting the faces, I'm thinking of first selecting a faceSet with boxToFaces (box covering the region) and then make a subset of this with the pathToFace source to select only the faces that are on the wall patch.

Would you advise this or do you have another way of tackling this?

RobertHB June 29, 2018 08:28

Sounds like the way to go. The setSet utility has an action called subset that may be used for the operation of intersecting the two set.

Another way may be creating the box set, and the cylinder set. Then substracting the cylinder from the box, leaving you will only faces that are not part of the cyclinder. Upon inverting this latest cellSet you should end up with only the faces belonging to your cylinder.

JensD June 29, 2018 09:42

I managed to create the patch, but I can't sample or visualize as the size of the patch in my polyMesh is now different from the one in my time steps. Do I need to do something similar to the simulation results (T, p, U, ...) to allow sampling of this subregion?

RobertHB June 29, 2018 09:48

Oh sorry, i should have mentioned that. My approach has to be followed before you run your simulation, so you get results for the newly created patch.

JensD June 29, 2018 10:15

Quote:

Originally Posted by RobertHB (Post 697671)
Oh sorry, i should have mentioned that. My approach has to be followed before you run your simulation, so you get results for the newly created patch.

Well ... that's unfortunate ...


All times are GMT -4. The time now is 01:53.