GEOS icon indicating copy to clipboard operation
GEOS copied to clipboard

Implement arbitrary region statistics

Open dkachuma opened this issue 11 months ago • 1 comments

The purpose of this PR is to allow the user to report region statistics for arbitrary cell regions (cell collections) that are not linked to the simulation (solvers or constitutive models).

The idea is that the user will create a task similar to CompositionalMultiphaseStatistics. With that they can specify the properties to report and then target this with an event.

    <Tasks>
        <RegionMultiphaseStatistics
            name="REGION.STATISTICS"
            flowSolverName="FLOW.SOLVER"
            regionNames="{ PLATFORM_A, PLATFORM_B1, PLATFORM_B2 }"
            regionIdentifiers="{ 13, 28, 3 }"
            propertyNames="{ pressure, poreVolume, volumeFraction }"
            writeCSV="1"
            logLevel="1" />
    </Tasks>
    <Events>
        <PeriodicEvent
            name="REGION.STATISTICS"
            target="/Tasks/REGION.STATISTICS"
            timeFrequency="7200" />
    </Events>

In this example, there are 3 non-overlapping regions named PLATFORM_A, PLATFORM_B1 and PLATFORM_B2 not linked to the simulation and the user wants statistics for pressure, pore volume and volume fraction in these regions. The 3 regions are identified by an attribute and these are assigned values 13, 28 and 3 respectively. The creation of the task will create a fieldName REGION.STATISTICS_region for each grid cell. The user can use this field to load a property and mark the cells belonging to each region. For example

    <Mesh>
        <VTKMesh
            name="MESH"
            file="mesh.vtu"
            regionAttribute="attribute"
            fieldsToImport="{ report }"
            fieldNamesInGEOSX="{ REGION.STATISTICS_region }"
            logLevel="5" />
    </Mesh>

dkachuma avatar Mar 11 '24 21:03 dkachuma

Great idea. Can we make it work with '<Geometry>' define boxes too ?

jafranc avatar Mar 13 '24 16:03 jafranc