CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   Monitoring/Sampling points (https://www.cfd-online.com/Forums/su2/247046-monitoring-sampling-points.html)

kingeorge January 10, 2023 07:12

Monitoring/Sampling points
 
Dear all,


I was wondering if it is possible to define sampling/monitoring points within the volume and sample field variables at those points in time. I am doing IDDES simulations with a 20 million points grid and it is a bit irrational to save the whole volume at every time step, then extract time evolution of a field variable at some point, just to be able to perform 2-point correlation to calculate integral length scale.



There must be some convenient approach for this task, I am clueless though.


Thanks in advance!

bigfootedrockmidget January 10, 2023 17:56

There is currently no way to save point data. However, you can save surface data.

What you can do is define an internal surface and write the information on that surface to a file.

First, you define an internal surface, and the easiest way to define it is by using existing mesh points. This surface can be for instance a face of an existing cell in the domain or any points that define a triangle or a quadrilateral. Some meshing tools allow adding an internal face, in that case you just need to make sure that the face is very small and that the surface mesh consists of only one cell. Else you need to find the ID of some existing points in the mesh.

If you are manually adding the internal face to the su2 file, then simply increase the nr of markers by 1 and add a marker. For a quadrilateral, the surface type is "9", followed by the ID of the 4 points, for a triangle it is "5" followed by the ID of the 3 points:

Code:

NMARK= 10  // increase this number
MARKER_TAG= internal
MARKER_ELEMS= 1
9 8 230 3980 357 // 9 p1 p2 p3 p4
...


Then, you add this to your config file:

Code:

MARKER_PLOTTING= ( internal  )  // name(s) of the surfaces
OUTPUT_FILES= SURFACE_CSV    // type of file
SURFACE_FILENAME= monitorsurface // filename
WRT_SURFACE_OVERWRITE= NO  // do not overwrite the file, you will get a file for every OUTPUT_WRT_FREQ iteration
OUTPUT_WRT_FREQ= 1 // writing frequency


kingeorge January 12, 2023 04:45

Thank you for the reply. I will try this approach with internal sampling face again, although I did try it in the past and, I might have made some mistake though, it did not work because I think SU2 sees internal face as a wall (the internal face was defined as a two-sided infinitely thin surface). My mesh is in 3D and if this approach works, then great!!! That also means that I can use internal face around solid body to sample unsteady pressure for aeroacoustic post-processing.



Will be back to this post soon.



Cheers!

Dónal February 2, 2023 05:04

Thanks for your quick reply (to https://www.cfd-online.com/Forums/su...ady-state.html), this exactly what I was looking for. I'm replying here just to keep this discussion together for anyone who comes looking for the same thing.

Will the internal marker definitely not have any effect on the flow?

kingeorge February 2, 2023 05:12

Quote:

Originally Posted by Dónal (Post 843855)
Thanks for your quick reply, this exactly what I was looking for. I'm replying here just to keep this discussion together for anyone who comes looking for the same thing.

Will the internal marker definitely not have any effect on the flow?

I am going to make a small test today/tomorrow with the version 7.4 and ivestigate what the internal zero-thickness face (marker internal) does to the flow. Ideally, it should let the flow pass through undisturbed (transparency), I am afraid it will not happen and I am not sure why.



Will keep you posted.

bigfootedrockmidget February 2, 2023 07:24

Internal markers are ignored as boundary conditions.

The main challenge is to find an existing cell face that is close to the location that you would like to monitor. If you need exact point locations, you need to define the faces of the cell containing your actual point of interest as internal markers. You can then determine the information at the point location by bilinear interpolation.

pcg February 4, 2023 22:57

I've implemented point probes here https://github.com/su2code/SU2/pull/1909
They will be in the next release of SU2


All times are GMT -4. The time now is 11:30.