Skip to content

Commit

Permalink
Add export/import of summary and grid cell expressions using external…
Browse files Browse the repository at this point in the history
… text file
  • Loading branch information
magnesj committed Dec 7, 2023
1 parent 2866d09 commit 062573d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
23 changes: 13 additions & 10 deletions content/Calculated Data/AggregationOfGridCellValues.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ published = true
weight = 20
+++

## Aggregation of of Grid Cell Values and Statistics
- import a grid case ensemble
- define a summation in the grid calculator, mySum := sum(cellProperty)
- in the Statistics case, select the grid calculation expression
- create a view on the Statistics case
- select a set of cells
- in the Statistics case, select the view as a filter
- click compute
- the result of the summation is displayed as text in Messages window. The statistics based on values in each time step is displayed below the individual realization values.
### Calculate statistics for sum of mobile oil for an ensemble

**Workflow description**

- Import an ensemble of grid models with identical IJK into a **Grid Case Group**.
- Create a view on one of the source grid models, and create a cell filter.
- Create an expression for mobile oil `MOBILE_OIL := if(((SOIL-SOWCR) < 0.00), 0.00, PORV*(SOIL-SOWCR))`
- Optionally select a subset of time steps
- Create an expression to sum values for all visible cells `SUM_MOBILE_OIL := sum(MOBILE_OIL)` Use the result from the previous calculation as input to the variable, use `MOBILE_OIL` from the **Generated** category.
- The individual values for each realization and time step is displayed as text in **Messages**. The statistics for each time step is displayed at the bottom.

See draft https://github.com/OPM/ResInsight/discussions/10902

![image](https://github.com/OPM/ResInsight/assets/1793152/bf53a448-94ce-4fbb-850e-b912c060a6d4)

See draft workflow with screenshots here:
https://github.com/OPM/ResInsight/discussions/10913
3 changes: 3 additions & 0 deletions content/Calculated Data/CaseGroupsAndStatistics.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
title = "Grid Case Groups and Statistics"
published = true
weight = 120
aliases = [
"/3d-main-window/casegroupsandstatistics/"
]
+++

![]({{< relref "" >}}images/3d-main-window/GridCaseGroupTree.png)
Expand Down
2 changes: 2 additions & 0 deletions content/Calculated Data/CurveCalculator.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The summary curve calculator is a tool to do calculations on a set of curves. Th

The calculator can be run by pressing the calculator icon {{< image-in-text src="images/Calculator.svg" >}} in the menu bar, or by right-clicking on either a summary case or the summary plot collection.

Expressions can be saved to a text file using the **Export Calculations** button. The default location for calculations can be set in **Preference->Import/Export**.

More details on mathematical operations are described in [Calculator Expressions]({{< ref "CalculatorExpressions.md" >}})

## Calculation Settings
Expand Down
2 changes: 2 additions & 0 deletions content/Calculated Data/GridPropertyCalculator.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ aliases = [
ResInsight offers a built-in property calculator for grid parameters.
The **Grid Property Calculator** enables arithmetic expressions to be parsed and calculated for visualization purposes. The expression can be applied to one or multiple grid models, and the expression text can be stored to a file for later use.

Expressions can be saved to a text file using the **Export Calculations** button. The default location for calculations can be set in **Preference->Import/Export**.

More details on mathematical operations are described in [Calculator Expressions]({{< ref "CalculatorExpressions.md" >}})

## Invoking the Grid Property Calculator
Expand Down
Binary file modified static/images/3d-main-window/GridPropertyCalculatorMain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/images/calculated-data/curve-calculator-ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 062573d

Please sign in to comment.