Skip to main content

3D geological modelling

Project description

LoopStructural: Loop3D Implicit Geological Modelling

3D model of Hamersley created using loopstructural PyPI version GitHub license Documentation loop3d.github.io/LoopStructural/

Overview

LoopStructural is an opensource Python library for 3D geological modelling. The library has been built in the scope of the Loop project (Loop3d.org). LoopStructural can:

  • Model fault networks integrating fault kinematics and overprinting relationships
  • Model folds using structural elements (fold axis, fold axial surface) for multiple fold events
  • Use different implicit interpolation algorithms (Finite Difference, Piecewiese Linear, RBF)
  • Export models to vtk, geoh5, omf, gocad, csv, obj formats
  • Visualise models in an interactive python environment.

Installation

Google colab

LoopStructural can be used inside a google colab notebook, however interactive visualisation using kitware trame does not work. Only static plots can be displayed.

Pip

pip install loopstructural

Optional dependencies are:

  • loopstructuralvisualisation (wrapper for pyvista to interface with loopstructural objects)
  • pyvista (3D visualisation)
  • geoh5py (export to .geoh5 format)
  • mira-omf (export to .omf format to load in Leapfrog)
  • pyevtk
  • dill (serialize loop models to a pickle file)
  • tqdm (progress bars)
  • loopsolver (experimental solver for admm inequality constraints)

You can install all of the optional dependencies using: pip install loopstructural[all]

conda

conda install -c conda-forge -c loop3d loopstructural

to install the working 3D visualisation environment conda install -c conda-forge -c loop3d loopstructural loopstructuralvisualisation pyvista trame trame-vtk trame-vuetify

Quickstart

  • A basic geological model
from LoopStructural import GeologicalModel
from LoopStructural.datatypes import BoundingBox
from LoopStructural.visualisation import Loop3DView
from LoopStructural.datasets import load_claudius

import numpy as np
data, bb = load_claudius()

#bb constaints origin and maximum of axis aligned bounding box
#data is a pandas dataframe with X,Y,Z,val,nx,ny,nz, feature_name

model = GeologicalModel(bb[0,:],bb[1,:])
model.data = data
# nelements specifies the number of discrete interpolation elements
# 'stratí' is the feature name in the data dataframe
model.create_and_add_foliation('strati',nelements=1e5)
model.update()
# get the value of the interpolator at some random locations
locations = np.array(
    [
        np.random.uniform(bb[0, 0], bb[1, 0],5),
        np.random.uniform(bb[0, 1], bb[1, 1],5),
        np.random.uniform(bb[0, 2], bb[1, 2],5),
    ]
).T
val = model.evaluate_feature_value('strati', locations)
# get the gradient of the interpolator
gradient = model.evaluate_feature_gradient('strati',locations)

#Plot the scalar field of the model
model['strati'].scalar_field().plot()

Documentation

The LoopStructural documentation can be found here

Problems

Any bugs/feature requests/comments please create a new issue.

Acknowledgements

The Loop platform is an open source 3D probabilistic geological and geophysical modelling platform, initiated by Geoscience Australia and the OneGeology consortium. The project is funded by Australian territory, State and Federal Geological Surveys, the Australian Research Council and the MinEx Collaborative Research Centre.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

loopstructural-1.6.27.tar.gz (532.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

loopstructural-1.6.27-py3-none-any.whl (595.1 kB view details)

Uploaded Python 3

File details

Details for the file loopstructural-1.6.27.tar.gz.

File metadata

  • Download URL: loopstructural-1.6.27.tar.gz
  • Upload date:
  • Size: 532.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for loopstructural-1.6.27.tar.gz
Algorithm Hash digest
SHA256 d5ba9e4d03eb675c05a4718b66cb300edb1c45ead7b9e2e6b190aed85a4c1e3b
MD5 fbe3234c10afefebcc5dbce3e221c04f
BLAKE2b-256 c9885783a4c2064ea2092f78ee7f750610639c1f58714c9b8ba616f8b717316c

See more details on using hashes here.

File details

Details for the file loopstructural-1.6.27-py3-none-any.whl.

File metadata

  • Download URL: loopstructural-1.6.27-py3-none-any.whl
  • Upload date:
  • Size: 595.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for loopstructural-1.6.27-py3-none-any.whl
Algorithm Hash digest
SHA256 e0d0413ebcc5d07d77a6944c5aac791c25ae65f4454d7c040051704390653727
MD5 cda607acb1dbb129d9572737793c80a5
BLAKE2b-256 9dced79840c66631822a863b9253272f7e19dbe77f0db37185879a20cfe2a411

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page