SU2 icon indicating copy to clipboard operation
SU2 copied to clipboard

Volume-averaging by extending MARKER_INTERNAL to support volume elements?

Open ChristianBauerEng opened this issue 2 years ago • 7 comments

Discussed in https://github.com/su2code/SU2/discussions/1877

Originally posted by ChristianBauerEng January 5, 2023 I would like to monitor the average fluid temperatures in parts of the domain volume. For example here i the part marked red. grafik

In the discussion it became clear, that surface-averages and integrals are supported by means of specifying an MARKER_INTERNAL in the mesh. Could it be possible to extend this functionality to support also volume-elements for MARKER_INTERNAL?

Which code changes would be required to make this happen?

Kind regards,

Christian

ChristianBauerEng avatar Jan 18 '23 21:01 ChristianBauerEng

It would not be necessary to tag volume elements but rather points (which is easier). In your case with Pointwise, how easy would it be to export a file with the set of point indices for the region of interest?

pcarruscag avatar Jan 18 '23 22:01 pcarruscag

Quite simple I imagine. Since I have everything in place now to open, manipulate and export the mesh in SU2 format (c.f. #1877 ) I could easily filter points and assign their IDs to arbitrary markers or elements or simply export their ID to a different file.

ChristianBauerEng avatar Jan 18 '23 22:01 ChristianBauerEng

I think that defining these regions in separate files would be better. It would keep the mesh format intact and allow users to change the regions without regenerating the mesh. We could also use the regions to define volumetric source terms.

  1. Config option to provide the file with regions
  2. Preprocess the regions in each mpi rank to define them as lists of local indices (based on the global indices that are owned by the rank).
  3. Extend the custom outputs to perform volume integrals and averages (not too different from the surface averages we already have), this would directly allow the volume averages to be used in optimizations.

pcarruscag avatar Jan 19 '23 00:01 pcarruscag

we could maybe also use multizone, and allow a zone to be selected for volume averaging and integrated variables.

bigfooted avatar Jan 19 '23 08:01 bigfooted

Our multizone implementation is terrible convergence-wise.

pcarruscag avatar Jan 19 '23 11:01 pcarruscag

@ChristianBauerEng can you try to export a list of points for an example region so that we can pick a suitable format for the file?

pcarruscag avatar Feb 16 '23 18:02 pcarruscag

Took me a while, but here it is: ROI.txt

These are the IDs of nodes in the mesh compressible_flow/Unsteady_NACA0012/unsteady_naca0012_mesh.su2

grafik

ChristianBauerEng avatar May 30 '23 08:05 ChristianBauerEng