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? |
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? |
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? |
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. |
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?
|
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.
|
Quote:
|
All times are GMT -4. The time now is 01:53. |