FastSlipPy: Induced Seismic Fault Slip Modeling
FastSlipPy is a scientific software package for modeling quasi-dynamic fault slip in induced seismicity. It is designed to simulate the behavior of faults under various stress conditions, providing insights into the mechanisms driving induced earthquakes. The software is based on the Finite Difference Method (FDM).
The initial version of this software is based on the open-source code IndNuc, which is a Matlab-based code specifically developed for modeling induced seismicity in Groningen area. FastSlipPy has been rewritten in Python to enhance its accessibility and usability, allowing for easier integration with other scientific tools and libraries.
The ambitious goal of FastSlipPy is to provide an easy-to-use, efficient, and flexible platform for the multi-scale and multi-physics modeling of induced seismicity, which may include the following features in the future:
- Multiscale modeling: coupling with Discrete Element Method (DEM) for the simulation of fault gouge.
- Multiphysics modeling: supporting the coupling of fluid, thermal, and mechanical processes.
Table of Contents
- Main Features
- Dependencies
- Instructions
- Examples
- Documentation
- How to Contribute
- How to Cite
- Authorship
- License
Main Features
This program can be used for modeling induced seismicity in a fault system. The main features of this program include:
- Easy-to-install and run on different platforms (Windows or Linux).
- Adaptive time stepping for efficient simulation of dynamic fault slip.
- Support different friction models, such as rate-and-state friction and others (under development).
- Support different fault angles.
- Post-processing in the format of both Paraview and Matplotlib for visualization of results.
- Modular design for easy integration with other scientific tools and libraries.
Dependencies
FastSlipPy is fully written in the Python programming language and adopts the Object Oriented Programming (OOP) paradigm to offer modularity and extensibility.
Please make sure you have installed Python3.X.X on your PC. Currently, Python3.10.X is recommended, as other versions haven't been tested.
All the required Python libraries will be added automatically. Some of them are:
- numpy
- matplotlib
- meshio
Instructions
Install
Install for users
pip install fastslippy
Install for developers
Step 1: Download this software or use Git:
git clone https://github.com/ChengshunShang1996/FastSlipPy.git
Step 2: Installation.
(Windows users can jump this step) For Linux users, the virtual environment is suggested to be used:
python3 -m venv ~/my_env
source ~/my_env/bin/activate
In the project folder, run cmd command:
pip install -e .
Successful installation?
Test it:
from fastslippy import FastSlipPy
For Linux or HPC users:
python3 -c "from fastslippy import FastSlipPy; print('Success')"
If you see the logo of FastSlipPy, you have successfully installed it. To run an example, please check the examples section.
Input and Output Files
- Input Parameters:
All the default parameters are defined in the file model_parameters.py. You can modify the parameters in the running script.
Grid stretching options are also available in model_parameters.py:
x_stretch_enabled,y_stretch_enabledx_stretch_inner_size,y_stretch_inner_sizex_stretch_inner_points,y_stretch_inner_pointsx_stretch_power,y_stretch_powerx_stretch_max_cell_size,y_stretch_max_cell_size(optional caps for the largest stretched cells)
If a max-cell-size cap is violated, FastSlipPy raises a ValueError and reports a suggested larger odd Nx/Ny while keeping the inner mesh point count unchanged.
By default, FastSlipPy uses a uniform grid.
Stretched mesh support in the elastic solver is currently experimental. To run with stretched mesh anyway, set:
allow_nonuniform_solver=True
If stretched mesh is enabled without this explicit opt-in, FastSlipPy now raises an error to prevent silently unreliable results.
Fault endpoint ownership is configurable independently of the named benchmark
with fault_reaches_surface and fault_reaches_bottom. Leaving either value as
None preserves the established defaults: both endpoints belong to the fault
for the California/BP3 case and to the outer boundary for the Lab and Groningen
cases. Traction-free and fault-interface stress operators themselves are shared
by all cases on both uniform and stretched meshes.
For large-scale runs that hit memory limits during sparse LU factorization, you can switch to the iterative linear solver in model_parameters.py:
linear_solver="iterative"iterative_method="gmres"(or"bicgstab")ilu_drop_tol,ilu_fill_factor,iterative_rtol,iterative_maxiter
By default, linear_solver="direct" is kept for backward compatibility. If direct LU runs out of memory, FastSlipPy can automatically fall back to iterative mode with:
fallback_to_iterative_on_oom=True
- Output files:
The output files are generated in the specified output directory [output] and
can be visualized using ParaView or Matplotlib. Matplotlib visualization is used
by default. Enable ParaView output with output_vtk_option=True; set
vtk_interval to control its cadence independently of checkpoints. The final
accepted state is always written when VTK output is enabled, and
vtu_results/results.pvd records the physical time of every frame.
Open that PVD file in ParaView to load the left domain, right domain, and fault
as one time-aware collection. Domain displacement, velocity, and quasi-static
shear stress are point data; quasi-static normal stress is quad cell data.
Running Simulations
To run a simulation, use one of the short, self-contained scripts in the examples folder. For example:
python examples/run_case_groningen.py
or with your preferred way to run Python scripts. The simulation will start, and the output files will be generated in the specified output directory.
Examples
The examples folder contains the supported quick-start cases for Groningen,
laboratory shear, BP3, stretched meshes, and iterative solving. BP3 development
diagnostics, convergence studies, and plotting runners live under
tools/bp3/.
- Groningen case
- Lab-scale shear case
A high Young's modulus is used in the lab-scale shear case to generate the above figure.
Documentation
Please read this README.md for information.
Restarting a Simulation
Use the same model configuration and output directory to resume a checkpoint:
model = FastSlipPy(params=params, output_dir="output", checkpointer=1000)
model.run()
This reads output/data_1000.npz. params.Nt specifies additional steps;
params.tfinal remains the absolute end time. Output and checkpoint intervals
use cumulative step numbers, including VTK filenames.
On restart, dataall.npz retains samples through the checkpoint time and
appends new samples. Samples after an earlier restart point are replaced.
BP3 surface histories and exported station files follow the same history.
Only written samples are saved, without unused zero-filled columns. Keep
dataall.npz alongside the checkpoint: missing or previously overwritten
history cannot be reconstructed from a single checkpoint. Older histories
without surface data retain missing surface samples as NaN.
Restarting at or beyond tfinal leaves existing result files untouched.
Groningen checkpoints now include both pore-pressure fields; older checkpoints
reconstruct them from elapsed time and the configured loading schedule.
How to Contribute
Please check the contribution guidelines.
How to Cite
To cite this repository, you can use the metadata from this file.
Authorship
- Chengshun Shang 1 (c.shang@uu.nl)
1 Utrecht University (UU)
Acknowledgement
The program was initially developed under the context of the FastSlip project. The author would like to thank the project team (Dr. André Niemeijer et al.) for their support and guidance. The author also acknowledges the contributions of the open-source community, particularly the developer of IndNuc, Dr. Meng Li, whose work served as a foundation for this software.
License
FastSlipPy is licensed under the MIT license, which allows the program to be freely used by anyone for modification, private use, commercial use, and distribution, only requiring the preservation of copyright and license notices. No liability and warranty are provided.
Metadata
Release files for fastslippy 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fastslippy-0.1.3.tar.gz | 164.6 kB | With provenance | Details for fastslippy-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fastslippy-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for fastslippy-0.1.3-py3-none-any.whl |
Total release size: 299.5 kB
Release files / fastslippy-0.1.3.tar.gz
| Download URL | fastslippy-0.1.3.tar.gz |
|---|---|
| Size | 164.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08f551679a6ce1da3b6050a8cb95c8070f4df4db80cac9842c0386b255af1c1a
|
|
BLAKE2b-256 checksum How to use checksums |
e2ab585e944502e03158ffe53b98904078cc1c64a4ce15c7fdfb30a791ab15e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency logRelease files / fastslippy-0.1.3-py3-none-any.whl
| Download URL | fastslippy-0.1.3-py3-none-any.whl |
|---|---|
| Size | 134.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc187386a5a404404ca0cd0f8028d8cf4fddfb01f2c15b7fac5150f979db9c7d
|
|
BLAKE2b-256 checksum How to use checksums |
dfbd1753b589848f9e4a6ee6fff2c1813b0373326a51ed2677bedc662fc5c6c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency logSecurity for fastslippy 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for fastslippy-0.1.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.