new features in sgems - stanford earth · 2010. 5. 7. · rahul gupta computer sciences, stanford...

27
New Features in SGeMS Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir Forecasting Stanford Center for Reservoir Forecasting Annual Meeting 2010

Upload: others

Post on 17-Aug-2020

6 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

New Features in SGeMS

Rahul GuptaComputer Sciences, Stanford University

Alexandre BoucherEESS, Stanford University

Stanford Center for Reservoir ForecastingStanford Center for Reservoir Forecasting

Annual Meeting 2010

Page 2: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

SCRF 2010

Outline• Introduction to SGeMS

– What is SGeMS– Resources

• New Features– Improved user-interface

• Context Sensitive Menus

– Geostatistics• Regions• Geobody Connectivity• Octant search

– Extended Python-SGeMS Interface• Connection with External Software• Complex workflows

• Work in Progress

Page 3: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

Stanford Geostatistical Modeling Software• Developed in C++• Cross-platform• 32 and 64 bits• More than 25,000 downloads (non unique)• 600 downloads/month average

SCRF 2010

Page 4: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

Resources

• sgems.sourceforge.netSource code and binaryOnline help and forums

• Applied Geostatistics with SGeMS; A User’s Guide, Remy, Boucher and Wu, 2009, Cambridge, University Press

SCRF 2010

Page 5: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

SCRF 2010 5

Page 6: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

SCRF 2010 6

Page 7: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

• Quick access to common operationsrename, delete, histogram

• Data TransformsUnary operations on propertiesinverse, log, unitScaling, …

• Trends• Data Management

Easily swap large files to/from disk

• User defined Python Scripts• New class of commands

Accessible from right-click menue.g. Geobody

Context Sensitive Menus

SCRF 2010

Page 8: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

Pluggable Python Scripts

Custom python script(s) accessible from property menu

Two steps to extending SGeMSWrite the custom algorithm (aka, the python script)

Place the script in the folder ${INSTALLATION}/actions/python

No compilation needed

No limit on the number of scripts

SCRF 2010

import sgemsfrom scipy import array, argsort

data = array(sgems.get_property(grid,prop))id = argsort(data)sgems.set_property(grid,prop+"_argsorted",id.tolist())

Example: Compute the ordering sequence of property values

Page 9: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

SCRF 2010

Page 10: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

SCRF 2010

Page 11: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

RegionsPartition a grid into active and inactive cellsAccessible for:– Data exploration (histogram, scatter-plot, qqplot)– Search neighborhood– Python script– Graphical interface

Commands to manipulate regions

SCRF 2010

Page 12: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

SCRF 2010 12

Page 13: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

SCRF 2010 13

Page 14: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

e

SCRF 2010 14

Page 15: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

SCRF 2010

Page 16: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

SCRF 2010

Page 17: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

SCRF 2010

Page 18: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

Search Strategy

• Option to consider others regions for conditioning (smooth transition)

• Octant Search : Especially important with vertical wells– Minimum # of non-empty octant– The minimum of samples per octant to be

considered non-empty– Max samples per octant to consider

• Improved kd-tree structure for neighborhood search on point set (approx 10 times faster)

SCRF 2010

Page 19: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

Recall: Python scripting

SGeMS integrate Python for scripting

Python is widely used languageScientific capabilitiesVisualizationInput/OutputFree and open source

SGeMS provides commands to interact with Pyhton allowing the building of complex workflow, e.g.

Calling external programsSensitivity analysisHierarchical modeling…

SCRF 2010

Page 20: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

New: extended python commands• Dimensions of a grid: get_dims()

• List of properties of a grid: get_property_list()

• Index given a location (x,y,z): get_location()

• Location (x,y,z) given an index: get_nodeid()

• Manipulation of regionsSetRegionFromComplement,

SetRegionFromPropertyIf,

DeleteObjectRegions,

MergeObjectRegionsIntersection,

MergeObjectRegionsUnion

• Create masked grid from cartesian grid based on region: CreateMgridFromCgrid

SCRF 2010

Page 21: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

Extending SGeMSAlgorithms

Write a C++ pluginWrite a pluggable python scriptCall a program from SGeMS through PythonCall SGeMS externally (e.g. Matlab, Java )

Input/Output FiltersStreamsim (Eclipse-based) binary fileCSV file with alphanumeric entries

Example:StudioSl: streamlines history matchingMATLAB: mGstat

SCRF 2010

Page 22: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

Example 1: MGSTAT

• Compeletely develop by a third party Prof Thomas Mejer, Denmark

• Call SGeMS from Matlab.The matlab user is unaware of the SGeMS interface

SCRF 2010

S1=sgems_get_par('snesim_std'); …S1.XML.parameters.Nb_Realizations.value=4; S1=sgems_grid(S1);

http://mgstat.sourceforge.net

Page 23: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

Example 2: StudioSl and History Matching (ppm) with Streamlines

• StudioSL is a flow simulator using streamlines developed by Streamsim Technologies Inc.

• With the help of Dr. Darryl Fenwick, we build an interface such that SGeMS was called when performing PPM

• Tested on a large fractured Middle East field (dual porosity model)

• Once the script are set-up the users do not have to interact with SGeMS interfaces.

SCRF 2010

Page 24: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

Dual porosity history matching

SCRF 2010

StudioSLHM

SGeMSGeomodel

Streamlines

Compute HM errors

plugin to read bininc format

plugin to write bininc format

Page 25: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

Streamsim-history matching script

#Load the training imagesLoadObjectFromFile dla::sgems

LoadObjectFromFile ti_grid::sgems

#Load the probability field from ppmLoadObjectFromFile ppmProportionsCube.bininc::All

#Create a 2D grid and simulate the fracturesNewCartesianGrid ppmProportionsLayer::129::276::1

RunScript pfield_dla_manager.py

#Run a 2D simulation for the fracture setRunGeostatAlgorithm snesim …

#Run a 3D Simulation for the superKRunGeostatAlgorithm snesim …

#combine the 2d and 3d simulationsRunScript snesim-2d-to-3d.py

#Save the resulting simulationSaveGeostatGrid ppmProportionsCube::fracture.bininc::streamsim

SCRF 2010

Page 26: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

Work in Progress

• Explicit support for categorical variables• Improved data management

– Grouping of relevant properties– Distributions

• Project workspace restoration

SCRF 2010

Page 27: New Features in SGeMS - Stanford Earth · 2010. 5. 7. · Rahul Gupta Computer Sciences, Stanford University Alexandre Boucher EESS, Stanford University Stanford Center for Reservoir

Questions ?

SCRF 2010