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.3.tar.gz (49.7 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.3-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fem2geo-0.1.3.tar.gz
  • Upload date:
  • Size: 49.7 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.3.tar.gz
Algorithm Hash digest
SHA256 8a3ae56c3f633ceea65637746373edca68cebe12635f32370c51ec7d564910a1
MD5 8ad9a7bb8dc2924c894e710f810706aa
BLAKE2b-256 54e47bb39202c6f10dd3d28c798c7223f579ceef3cad4d4ece12fb4b7df7d8bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for fem2geo-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: fem2geo-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ec0c876f6297917393d6282c2d43dbffc671f79eb9d61abd59da54faa125e535
MD5 2ffbda50aaea5d983b1c2a0d4a915749
BLAKE2b-256 75d440dc32a268371a1928b9439f2113df6d4f5d6a0f73f4beea456a208d6f63

See more details on using hashes here.

Provenance

The following attestation bundles were made for fem2geo-0.1.3-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