feat: Adding flow statistics for arbitrary mesh cell element sets#4005
feat: Adding flow statistics for arbitrary mesh cell element sets#4005MelReyCG wants to merge 31 commits intobugfix/rey/split-statistics-componentsfrom
Conversation
…onents' into feature/rey/arbitrary-regions-stats
…onents' into feature/rey/arbitrary-regions-stats
…y/arbitrary-regions-stats
…nor string_view replacement)
dkachuma
left a comment
There was a problem hiding this comment.
Very useful feature.
But I would keep it simple and have a single output for each statistics node i.e. only report the statistics for all the selected sets. This would keep the csv simple and directly loadable with numpy for plotting. If the user wants statistics for another set, they can add another statistics xml element.
| TableLayout tableLayout( { | ||
| TableLayout::Column( GEOS_FMT( "Time [{}]", units::getSymbol( units::Unit::Time ))), | ||
| TableLayout::Column( "Region" ), // TODO : mention this change in PR description | ||
| TableLayout::Column( "Set" ), |
There was a problem hiding this comment.
Does that mean all the sets have data written in the same csv? Usually we want to plot these values and having to filter per set is quite tedious. Can we have a separate file for each set?
There was a problem hiding this comment.
Separating in per-set files is not an issue, I would just like to ask why it is problematic to have every sets in one file, and not problematic to have every region in one file. Because of the post-processing / paraview tools?
I remember that at some point we had one CSV for all region, sometimes resulting in a lot of files, and I got asked to merge them in one file.
There was a problem hiding this comment.
I didn't realise we also have different regions in the same file. I always assumed the statistics are written out to a different file per region. I didn't know these had ben merged. With different files way it was easy to load and plot for each region. Of course we can always filter if need be.
…onents' into feature/rey/arbitrary-regions-stats
This PR aims at extending the flow statistics components by introducing an optional
setNamesparameter toSinglePhaseStatisticsandCompositionalMultiphaseStatistics, allowing users to obtain statistics computation from arbitrary mesh element sets instead of being forced to process solver regions.Sets can already be defined with
Geometryobjects likeBox.Multiple set can be provided for a given statistics component, and in that case, statistics over all provided sets are also logged. To support intersecting sets and give valid statistics, they are computed on a compound set (union of all selected set).
Here is an example:
The infrastructure proposed here can be re-used for new statistics components which would process cell elements, and is implemented at the
StatisticsAggregatorBaselevel, introduced in the PR #3836 .The parameter has been used in the
simpleCo2InjTutorialexample to test that functionnality.