# 2023 PyLith Hackathon: Potential Projects

## Overview of Hackathon

The 2023 PyLith hackathon will be held at the Colorado School of Mines in Golden, CO, over 7 days (June 12-17, Mon-Sat); participants will arrive on June 11 and depart on June 17 or 18. Our target is to have 3-4 projects with 3-4 people working on each project. **In addition to the list of potential projects below, prospective participants may also propose projects by contacting the PyLith developers (send an email to baagaard@usgs.gov).** We will open applications in early March.

Projects involve implementing new features or examples in PyLith. Recommended prerequisites for participating in the hackathon:

- Desire to learn modern software development techniques
- Comfortable with using the command line (terminal) on Unix operating systems
- Familiar with C, C++, and/or Python
- Familiar with boundary value problems and partial differential equations
- Ability to spend time preparing for the hackathon
- At least some knowledge of object-oriented programming

## Potential Projects

### Poroelasticity

Extend the current poroelasticity implementation and examples.

The main tasks include:

- Add examples and benchmarks that use poroelasticity.
- Add poroelastic effects for faulting,

### Integration of Bayesian Inversion with PyLith

Create benchmark problems for using PyLith Green’s functions in a Bayesian inversion framework, such as CATMIP (Bayesian inversion for finite fault earthquake source models I—theory and algorithm | Geophysical Journal International | Oxford Academic) or hIPPYlib (https://hippylib.github.io/).

The main tasks include:

- Define the benchmark inversion problem.
- Incorporate PyLith forward simulations into the inversion framework.

### Examples for 3D Crustal Faults

Create examples of prescribed fault slip on a small system of 3D crustal faults to complement the existing 3D subduction zone example.

This is a great project for someone who wants to learn how to use PyLith in a research problem involving crustal faults with realistic geometry and material properties.

The main tasks include:

- Creating a mesh using Gmsh that uses realistic 3D fault geometry for crustal faults.
- Create a suite of examples that demonstrate a variety of PyLith features.

### Earthquake cycle

Couple quasi-static interseismic and dynamic coseismic simulations to resolve the full dynamics of the earthquake cycle, including rupture propagation and radiated seismic waves and viscoelastic relaxation and aseismic creep.

The main tasks include:

- Implement a new problem type for earthquake cycle simulations with appropriate high-level parameters.
- Implement transfering the solution and state information from one problem/mesh/solver to another.
- Implement the appropriate trigger for switching between the quasi-static and dynamic solvers leveraging previous studies.

### Point dislocation earthquake sources

Implement point dislocation earthquake sources using a moment tensor.

This provide a point source implementation to complement the finite-source implementation of cohesive cells.

Point dislocations are useful for modeling events whose rupture dimensions are small compared to the discretization size.

The main tasks include:

- Implement point dislocations via a moment tensor.
- Use PETSc to locate the cell where the moment tensor should be applied.
- Design and implement user-friendly parameters for specifying the moment tensors.

### Viscoelastic bulk rheologies using strain rate

The current Maxwell and power-law viscoelastic rheologies are formulated with strain as the primary variable.

The time-dependent nature of the viscoelastic relaxation is approximated with a series expansion.

A more natural formulation is to use strain rate rather than strain as the primary variable.

This project would add new implementations of the Maxwell, generalized Maxwell, and power-law viscoelastic bulk rheologies that use strain rate rather than strain as the primary variable.

**Before the hackathon** we expect that the project participants would work with the PyLith developers to derive the new bulk constitutive equations.

The hackathon would be used to implement the new bulk constitutive models, create appropriate tests, benchmarks, and examples, and update the documentation.

### Adaptive mesh refinement

Add support for adaptive mesh refinement (AMR) in PyLith by leveraging the AMR capabilities in PETSc. The main tasks include:

- Remove any remaining dependencies of the problem specification on the finite-element mesh.
- Add the ability to switch to a different (refined) mesh within a given problem/simulation.
- Develop an appropriate error metric that can be used to refine the mesh.