CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Sample region of a patch

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By RobertHB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 29, 2018, 05:48
Default Sample region of a patch
  #1
New Member
 
Join Date: Mar 2015
Posts: 12
Rep Power: 11
JensD is on a distinguished road
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?
JensD is offline   Reply With Quote

Old   June 29, 2018, 07:15
Default
  #2
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
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 likes this.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   June 29, 2018, 08:10
Default
  #3
New Member
 
Join Date: Mar 2015
Posts: 12
Rep Power: 11
JensD is on a distinguished road
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?
JensD is offline   Reply With Quote

Old   June 29, 2018, 08:28
Default
  #4
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
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.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   June 29, 2018, 09:42
Default
  #5
New Member
 
Join Date: Mar 2015
Posts: 12
Rep Power: 11
JensD is on a distinguished road
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?
JensD is offline   Reply With Quote

Old   June 29, 2018, 09:48
Default
  #6
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
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.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   June 29, 2018, 10:15
Default
  #7
New Member
 
Join Date: Mar 2015
Posts: 12
Rep Power: 11
JensD is on a distinguished road
Quote:
Originally Posted by RobertHB View Post
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 ...
JensD is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
mapField error rvl565 OpenFOAM Pre-Processing 1 September 6, 2018 16:13
[Gmsh] gmshToFOAM: Found undefined faces in mesh sisi OpenFOAM Meshing & Mesh Conversion 19 March 15, 2016 08:39
Cyclic Boundary Condition Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Running, Solving & CFD 36 July 2, 2012 12:23
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15


All times are GMT -4. The time now is 14:40.