geodynamics / pylith-tutorials

1 stars 1 forks source link

Tutorials for CDM2024 #19

Open baagaard-usgs opened 5 months ago

baagaard-usgs commented 5 months ago

Tutorials

  1. Introduction to PyLith v4.1
  2. Static without faults: reverse-2d
    1. meshing (Gmsh)
    2. gravity (Step 1a,b,c)
    3. surface loading (Step 4)
  3. Quasi-static with prescribed slip: reverse-2d
    1. one fault (Step 5a,b,c)
    2. two faults with different origin times (Step 6)
  4. troubleshooting-2d
  5. Advanced meshing with Gmsh
    1. 2D with nonplanar embedded fault crustal-strikeslip-2d
    2. 3D with nonplanar embedded fault crustal-strikeslip-3d
  6. Quasi-static with prescribed slip: subduction-2d
    1. Interseismic (Step 2)
    2. Eq cycle with prescribed slip (Step 3)
  7. Static Green's functions: strikeslip-2d
    1. Variable slip (Step 4)
    2. Green's functions (Step 5)
    3. Inversion (Step 6)
  8. Numerical modeling 101 (Fri morning)

To-do

Update examples

For each example, make sure we cover:

  1. Goal (physics)
  2. Orientation (context)
  3. Setup (what is needed)
  4. Instructions
  5. Validation (verify results)

Tutorial slides

Record tutorials

baagaard-usgs commented 5 months ago

Terrain meshing: https://gitlab.onelab.info/gmsh/gmsh/blob/gmsh_4_12_2/tutorials/python/x2.py

Proposed workflow

  1. Download elevation model as GeoTiff
  2. Create STL file
    1. Use GDAL gdal.Translate() to get subset and convert to netCDF.
    2. Use netCDF4 to get coordinates of points
    3. Reshape to array of points
    4. Transform points to model CRS
    5. Triangulate using class scipy.spatial.Delaunay(points, furthest_site=False, incremental=False, qhull_options=None)
    6. Use numpy-stl to write STL file
  3. Create geometry in Gmesh
    1. Create block in Gmsh using occ
    2. Create topographic surface using STL file
    3. Cut off top of block using surface
baagaard-usgs commented 3 months ago

PyVista notes

Mesh Quality

Slide widget for selecting threshold in mesh quality.

Checkbox widget for selecting component.

PyVista To-do