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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fem2geo-0.1.2.tar.gz
  • Upload date:
  • Size: 49.5 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.2.tar.gz
Algorithm Hash digest
SHA256 3d0260d821f5721fc3a389ad64d9cad0110d92cc3477ad9e34c8447fd1cfbc43
MD5 6377b531d45712f30011ae692debad9a
BLAKE2b-256 f6725ce44a9b184fa85be1f21e4a274ea363e59e4f380df0ec5046cb5feeec94

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fem2geo-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4e7585298a33326bd35d0f975b8fdd2a1689353dc7c42e77da4bf0c087e19775
MD5 8bc28f2eaa7b1bd2d674f391f2b3e963
BLAKE2b-256 38d73e5b048a88cd1f38bbeb97c6da143fbf6f6e9a2ec921c2786a5db6244210

See more details on using hashes here.

Provenance

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