CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Sampling scalar Fields on a surface over time

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 1, 2021, 16:26
Default Sampling scalar Fields on a surface over time
  #1
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Hi,


I have created a couple of faceZones to sample pressure and temperature over time (area averaged). Unfortunately they are volume fields and areaAverage doenst work with those. So first I have to interpolate the volume fields onto the faceZone. I am not able to run the surfaceInterpolate utility and cant find a tutorial or an example.


Did anyone face this problem and can show me an example? Is there a better solution for this problem? I am using openfoam4.1.
shock77 is offline   Reply With Quote

Old   April 1, 2021, 19:51
Default
  #2
KTG
Senior Member
 
Abe
Join Date: May 2016
Posts: 119
Rep Power: 9
KTG is on a distinguished road
Are you sure you want/need the values at the face zones? What boundary conditions are you using? If they are zeroGradient, it should be sufficient to grab the values at the cell centers adjacent to the patches I think. If that would work for you, you should be able to make a cellSet from the face set in your topoSet, and then just sample it.


Hope it helps -
KTG is offline   Reply With Quote

Old   April 2, 2021, 06:08
Default
  #3
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Hi and thanks for your reply.


Actually the faceZone is not a boundary, but a faceZone inside a pipe. I am sampling the mass flux at this faceZone. Additionally I would like to sample the area averaged pressure and temperature at this faceZone. Obviously I could create a cellZone with the thickness of 1 cell and use that instead. Just want to know if there is a clever way how to do it with a faceZone.
shock77 is offline   Reply With Quote

Old   April 2, 2021, 16:09
Default
  #4
KTG
Senior Member
 
Abe
Join Date: May 2016
Posts: 119
Rep Power: 9
KTG is on a distinguished road
Its not elegant, but one possible workaround would be to export the face centers to text, and then use the sampleFields function object on those points, which would allow you to choose whatever interpolation scheme you want.
KTG is offline   Reply With Quote

Old   April 7, 2021, 06:32
Default
  #5
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
How exactly can I export the faceCenters to text? What do you mean?
shock77 is offline   Reply With Quote

Old   April 7, 2021, 17:27
Default
  #6
KTG
Senior Member
 
Abe
Join Date: May 2016
Posts: 119
Rep Power: 9
KTG is on a distinguished road
If you don't mind doing a little programming I think you can get the cell centers with:


const surfaceVectorField& Cf = mesh.Cf();

Here is a thread where they implemented somthing like that:

How to export patch face centre Coordinate during sampling ?

I feel like there should be a simpler way to do this, but I am not sure what is it. You can veiw the faceSet in paraview, but there is no cell center info there. Maybe you can find a way to generate it though.
KTG is offline   Reply With Quote

Old   April 8, 2021, 04:23
Default
  #7
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Hm I actually dont mind programming, but I dont think its worth the effort.
I also think there must be some easiert way and its seems strange that I cant find one. Thanks anyway for your kind help!
shock77 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
courant number increases to rather large values 6863523 OpenFOAM Running, Solving & CFD 22 July 5, 2023 23:48
laplacianFoam with source term Herwig OpenFOAM Running, Solving & CFD 17 November 19, 2019 13:47
pressure in incompressible solvers e.g. simpleFoam chrizzl OpenFOAM Running, Solving & CFD 13 March 28, 2017 05:49
Issue symmetryPlane 2.5d extruded airfoil simulation 281419 OpenFOAM Running, Solving & CFD 5 November 28, 2015 13:09
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 01:47


All times are GMT -4. The time now is 20:26.