GEOS-DEV / GEOS

GEOS Simulation Framework
GNU Lesser General Public License v2.1
212 stars 85 forks source link

Time history outputs in multi-region problems #1636

Open cssherman opened 3 years ago

cssherman commented 3 years ago

What is the requested feature? The objectPath attribute in PackCollection seems to require a full path to the object in question (objectPath="ElementRegions/ALL_TETRA/REGION_NAME"). Other things, such as FieldSpecification tend to allow a higher level path, which is then applied to its children (objectPath="ElementRegions/ALL_TETRA/").

For problems with many regions, this can require the user to duplicate the PackCollection, TimeHistory, and Events entries for each region:

<?xml version="1.0" ?>

<Problem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="/usr/workspace/uwisc/GEOSX/src/coreComponents/fileIO/schema/schema.xsd">

  <Outputs>
    <TimeHistory
      name="pressure_a"
      sources="{ /Tasks/pressure_a }"
      filename="well_pressure_a"/>
    <TimeHistory
      name="pressure_b"
      sources="{ /Tasks/pressure_b }"
      filename="well_pressure_b"/>
    ...
  </Outputs>

  <Tasks>
    <PackCollection
      name="pressure_a"
      objectPath="ElementRegions/ALL_TETRA/ALL_TETRA"
      fieldName="pressure"
      setNames="{ $monitor_wells$ }"/>
    <PackCollection
      name="pressure_b"
      objectPath="ElementRegions/ALL_TETRA/FAULT_RFF_TETRA"
      fieldName="pressure"
      setNames="{ $monitor_wells$ }"/>
    ...
  </Tasks>

  <Events>
    <PeriodicEvent
      name="wellPressureCollection">
      <PeriodicEvent
        name="pressure_a"
        target="/Tasks/pressure_a"/>
      <PeriodicEvent
        name="pressure_b"
        target="/Tasks/pressure_b"/>
      ...
    </PeriodicEvent>

    <PeriodicEvent
      name="wellPressureOutput"
      timeFrequency="$history_frequency$"
      targetExactTimestep="0">
      <PeriodicEvent
        name="pressure_a"
        target="/Outputs/pressure_a"/>
      <PeriodicEvent
        name="pressure_b"
        target="/Outputs/pressure_b"/>
      ...
    </PeriodicEvent>
  </Events>

</Problem>

I'm not sure if there is a reason for this behavior, but it would be great if it were consistent with the other uses of objectPath

wrtobin commented 1 year ago

This should be resolved as part of the approach to issue #2300. Though work hasn't starting on a PR related to that yet so far as I know.

untereiner commented 1 year ago

I stumbled upon this this afternoon as I am looking on a way to output statistics. I am digging, not sure to propose something in the next days

francoishamon commented 1 year ago

I am following up on this issue encountered by @sohailwaziri

When we don't specify the elementSubRegion in the objectPath of PackCollection, then GEOS segfaults: https://fcmaelstrom.slack.com/archives/CFBTC6GAG/p1689023078341419