Skip to main content

Physics-based Modeling to Structural Geology and Seismology

Project description

fem2geo

Physics-Based Modeling to Structural Geology and Seismology

A Python library for structural geology and seismology analyses on outputs from finite element (FEM) or boundary element (BEM) models

fem2geo bridges numerical simulations and field observations: it loads model outputs, extracts regions of interest, computes geomechanical variables, and produces publication-quality stereonet figures.

Key capabilities:

  • Load and normalise FEM/BEM simulation outputs (VTK/VTU) via a flexible solver schema system
  • Extract spatial subsets (spheres, bounding boxes) from large models
  • Reconstruct stress tensors and compute volume-weighted average stress, principal directions, and stress invariants
  • Slip and dilation tendency analysis on stereonets
  • Compare multiple model realisations at the same location
  • Run analyses from a YAML config file with sensible defaults and optional customisation

Table of Contents


Installation

Latest version

sudo apt install git python3-pip python3-venv
git clone https://github.com/pabloitu/fem2geo
cd fem2geo
python3 -m venv venv
source venv/bin/activate
pip install -e .

Stable version (from PyPI)

python3 -m venv venv
source venv/bin/activate
pip install fem2geo

Tutorials are not included in the PyPI package. Download them separately:

fem2geo download-tutorials

Run

Each tutorial folder contains a config.yaml for the basic case and a config_advanced.yaml with full plot customisation. Run either with:

cd tutorials/1_probing_model
fem2geo config.yaml
fem2geo config_advanced.yaml

The job key in the config selects the analysis. Currently supported jobs:

Job Description
principal_directions Stereonet of average (and optional cell-level) principal stress directions for one or multiple models
tendency_plot Slip and/or dilation tendency contour with average principal directions overlaid

Tutorials

# Folder Job Description
1 1_probing_model principal_directions Probe average stress state at a location in a single model
2 2_model_comparison principal_directions Compare principal stress directions across multiple models
3 3_structural_data compare_structural Overlay field structural measurements on model predictions
4 4_tendency_plot tendency_plot Slip and dilation tendency with average directions

Roadmap / Known Issues

  • Borehole module: sample model variables along a borehole trajectory
  • Seismic catalog module: import focal mechanisms and compare with model stress orientations
  • Raster module: compare model plan-view outputs with surface observations
  • Inversion module: find the model configuration that best fits a dataset
  • Schema: add a lithostatic flag to mark whether outputs include lithostatic pressure
  • Stress reconstruction warning fires on every stress access — should fire once per instance

Project details


Download files

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

Source Distribution

fem2geo-0.1.1.tar.gz (48.4 kB view details)

Uploaded Source

Built Distribution

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

fem2geo-0.1.1-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

Details for the file fem2geo-0.1.1.tar.gz.

File metadata

  • Download URL: fem2geo-0.1.1.tar.gz
  • Upload date:
  • Size: 48.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for fem2geo-0.1.1.tar.gz
Algorithm Hash digest
SHA256 65ee3a79807c6417e3e3f4e3c838d62dc025dc7021800024e1bb31085ebce095
MD5 becf178720aef0a8599e1b40ede9fd53
BLAKE2b-256 37dfb8b8f88b2f74e3f8fc249e7ad08015a3f413cd92c2a830f9ce19cc571580

See more details on using hashes here.

Provenance

The following attestation bundles were made for fem2geo-0.1.1.tar.gz:

Publisher: publish-pypi.yml on pabloitu/fem2geo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fem2geo-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fem2geo-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 38.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for fem2geo-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d7d64240b2029f6e64dec47d562550f49106b448bb51af3ce2a59e6cd5c71b9c
MD5 3dadf11617dc1971fc895dc9cfd322fa
BLAKE2b-256 ce1d760375e901590f3777f8aa21db427f968f89ae11f69838c7d4d18c862a97

See more details on using hashes here.

Provenance

The following attestation bundles were made for fem2geo-0.1.1-py3-none-any.whl:

Publisher: publish-pypi.yml on pabloitu/fem2geo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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