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/)
-   -   Run-time wall pressure sampling - Nodal / Cell-Centered values (https://www.cfd-online.com/Forums/openfoam-post-processing/140623-run-time-wall-pressure-sampling-nodal-cell-centered-values.html)

amanbearpig August 19, 2014 13:39

Run-time wall pressure sampling - Nodal / Cell-Centered values
 
Hello, I am using OpenFOAM for an LES case of fluid through a wall-bounded region. I'm outputing the wall pressure at each time-step using sampling function objects in the controlDict (see below). These values are exported at the cell-center of each element along the wall surface. Is there an easy way to export the pressure a nodes instead of cell-centers? This is an option in Fluent,and I was wondering if there is a simple option/way of doing this without having to add in any of my own code or using a post-processing script to do some kind of interpolation. Thank you! :)


My function in controlDict to export wall pressure:

wallPressure
{
type surfaces;
functionObjectLibs ("libsampling.so");
surfaceFormat raw; // vtk;
outputControl timeStep;
outputInterval 1;
interpolationScheme cellPoint; //cell
enabled true;
timeStart 14.0;

fields
(p);

surfaces
(
Wall
{
type patch;
patches ("Wall");
interpolate false;
triangulate false;
}
);

}

amanbearpig August 25, 2014 07:41

No one has any thoughts? Perhaps I should have posted this in the main OpenFOAM forum instead of the Post-Processing sub-forum. :o

kmooney August 25, 2014 22:47

It appears that you already have cellPoint 'cell-to-point' interpolation activated. Are you sure you aren't already writing out the field you need?

amanbearpig August 26, 2014 12:39

Quote:

Originally Posted by kmooney (Post 507767)
It appears that you already have cellPoint 'cell-to-point' interpolation activated. Are you sure you aren't already writing out the field you need?

Hi Kyle, thanks for the reply.

Yes, I have "cellPoint" chosen as an interpolationScheme, but I think this refers to how the pressure is calculated (I could be wrong as the documentation is a little unclear) not where it is written. I have tested this by writing out pressure using both "cellPoint" and "cell" for the interpolationScheme, and both options wrote out data for the cell-center, not at the nodes.

kmooney August 26, 2014 12:41

Have you also tried to set

Code:

interpolate true;
for the Wall patch?

amanbearpig August 26, 2014 16:08

Yes, I've tried setting "interpolate true;" for the Wall patch. It affects the values that the sampling function object exports, but not the location. The location is the cell center for either choice. :)

It appears that this uses the nodal values to calculate the pressure using the "cellPoint" interpolation scheme, but there doesn't seem to be (at least not that I can see :o ) an option to just export these nodal values themselves? Thanks for your help!

kmooney August 26, 2014 16:12

I believe that OF writes node based values when it outputs in VTK format. You could try to write the vtk then check the ascii values within the file perhaps.

amanbearpig August 28, 2014 08:35

Well, I tried changing the "surfaceFormat" to "vtk" instead of "raw", but it is still exporting values at the cell centers. Is this what you were referring to?


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