Coder Social home page Coder Social logo

mosgeo / bpsmautotoolbox Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 4.0 6.65 MB

This is the repository for the Stanford BPSM Automation Toolbox. The library can be used for creating and simulating basin and petroleum system models for studying probabilistic interactions.

Home Page: https://bpsm.stanford.edu/

License: BSD 3-Clause "New" or "Revised" License

MATLAB 100.00%
basin-modeling bpsm geology petroleum hydrocarbons

bpsmautotoolbox's Introduction

The BPSM Automation Toolbox for Probabilistic Interactions

The BPSM Automation toolbox is a library to automate the creation, modification, and running of models used in the Schlumberger PetroMod software. The code is written in MATLAB (Octave support has not been tested).

TopImage

Capabilities

  • A template PetroMod project can be loaded into Matlab.
  • Lithologies can be duplicated, mixed, modified, and deleted.
  • Models can be duplicated, deleted, and simulated directly from Matlab.
  • 1D, 2D, and 3D models can be modified.
  • Custom open simulator scripts can be ran (OpenSimulator license is required). Using this, results can be read back into Matlab.

Getting started

  • Create your PetroMod 2017.2 or newer "template project" (recent older versions should work too).
  • Create your output script in python to export output if needed (see below).
  • Simulate your template project and make sure everything works.
  • See the "main.m" for the procedure to load your template project in Matlab, modify parameters, duplicate models and simulate them in Matlab. You can also read the report accomponied in the repository and the workshop material included.

General tips

  • Save your PetroMod project in a folder that does not require administrator privileges.
  • It is better to create all the required lithologies in one go before updating the project as writing the lithology files takes relatively long time (a couple of seconds), i.e., do not update the project in a for loop.
  • If you are using lithology mixing, it is better to make sure everything is consistant by creating some mixes manually and comparing it to the mixes created by Matlab.
  • Some parameters are internally saved with different unit than the one that is displayed in the PetroMod GUI.

Open Simulator scripts tips

  • Open Simulator requires Python to be installed in the system. The version of required Python in 2018 or older is 2.7.
  • Check out scripts folder in PetroMod script folder for example (e.g., "C:\Program Files\Schlumberger\PetroMod 2016.2\scripts")
  • To activate your script, in the Simulator window, choose "Output", "Open Simulator" and select your script. Make sure your script run in the template project. Save the simulator window.
  • Another option is to run the written script directly from matlab as given in the example file.

Future plans

The basic framework is implemented now. Most needed functionalites can be automated in Matlab. Feature addition is on hold for now and new features will be added as needed. If you have suggestions, bugs, or feedback, please contact me through Github or Email. I would love to hear from you. What are the functionalities that you use the most? What are the things that you cannot do with it? Do you have a bug to report? You can create an Issue on GitHub or reach me directly at [email protected]

Referencing

Al Ibrahim, M. A., 2019, Petroleum system modeling of heterogeneous organic-rich mudrocks, PhD Thesis, Stanford University, p. 131-135.

bpsmautotoolbox's People

Contributors

mosgeo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bpsmautotoolbox's Issues

PM Project management

Create a Project class to manage the project. Initial features will be

  • Duplicate models.

  • Run models.

opensim output location

Right now, the demo script outputs are being stored in BPSM_PMToolbox directory. It gets overwritten if you're iterating. I changed the directory to model directory in main file for now, but this can be changed in PetroMod.m

Read pmb files

If we want to read the output directly in matlab, we have to figure out the .pmb files. It is a binary format but we still do not know how to read it in matlab.

Assertions

Include assertions (in main functions at least) to catch user errors and inform the user about the wrong inputs.

Output overlays number

A number/overlay dictionary is needed. This shouldn't be hard coded. It can be in a CSV file. Please keep track of the overlay numbers that you use so we can compile them.

Id and MD5 Tests

Perform Id tests:

  1. Check if MD5 is used.
  2. Test if any MD5 Hash can be used.
  3. Write helper function for generating new IDs and make sure it doesn't exist in the project.

Simplify modification of 1D main table

Right now, the main table is modifiable using the normal procedure of modifying any table. Because this table is complicated and is really important, a more simpler method should be used for modification by creating a customized function.

An idea of the function would be an input structure with possible changes to the table. The table would modify only those parameters automatically. Details need to be figured out. Suggestions welcomed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.