|
[Sponsors] |
Sampling scalar Fields on a surface over time |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 1, 2021, 16:26 |
Sampling scalar Fields on a surface over time
|
#1 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
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. |
|
April 1, 2021, 19:51 |
|
#2 |
Senior Member
Abe
Join Date: May 2016
Posts: 119
Rep Power: 9 |
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 - |
|
April 2, 2021, 06:08 |
|
#3 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
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. |
|
April 2, 2021, 16:09 |
|
#4 |
Senior Member
Abe
Join Date: May 2016
Posts: 119
Rep Power: 9 |
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.
|
|
April 7, 2021, 06:32 |
|
#5 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
How exactly can I export the faceCenters to text? What do you mean?
|
|
April 7, 2021, 17:27 |
|
#6 |
Senior Member
Abe
Join Date: May 2016
Posts: 119
Rep Power: 9 |
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. |
|
April 8, 2021, 04:23 |
|
#7 |
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 |
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! |
|
|
|
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 |