Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 18 additions & 46 deletions cdb_tpv23/cdb_tpv23.ipynb → cdb_tpv23/cdb_tpv23_qwx.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"* linear-slip weakening (LSW) friction\n",
"* Continuum Damage Breakage Model from [Lyakhovsky et al. (2016)](https://academic.oup.com/gji/article-abstract/206/2/1126/2606007)\n",
"\n",
"![](tpv23.png)\n",
"![](figures/tpv23.png)\n",
"\n",
"[Detailed benchmark description (SCEC)](https://strike.scec.org/cvws/download/TPV22_23_Description_v08.pdf)."
]
Expand Down Expand Up @@ -89,7 +89,7 @@
"\n",
"More detailed results are shown in our paper that is going to be submitted soon (Niu et al., 2025, in preparation).\n",
"\n",
"![](off_fault_damage.png)"
"![](figures/off_fault_damage.png)"
]
},
{
Expand Down Expand Up @@ -117,37 +117,7 @@
"id": "9c1ccdeb-8036-42b3-b919-6be58215d5c3",
"metadata": {},
"source": [
"We start from finding the location of our output files. "
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "e48ebace-664e-4547-82f5-c75a3dc29340",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/opt/notebooks/cdb_tpv23\n"
]
}
],
"source": [
"!pwd # ! in the front keeps the command running in the terminal, instead of the notebook"
]
},
{
"cell_type": "markdown",
"id": "a2881c6a-e640-475d-882d-b1901a917fb9",
"metadata": {},
"source": [
"You will see you are at `/opt/notebooks/Training/quakeworx/cdb_tpv23`.\n",
"\n",
"`/opt/notebooks` is the system directory where all your jobs are stored and `Training/quakeworx/cdb_tpv23` is the structure of the Github repository you just cloned.\n",
"\n",
"You can check all the job names `{YOUR_JOB_NAME}` you have submitted:"
"We start from checking all the job names `{YOUR_JOB_NAME}` you have submitted:"
]
},
{
Expand All @@ -157,7 +127,8 @@
"metadata": {},
"outputs": [],
"source": [
"!ls /opt/notebooks # list all job names"
"# ! in the front keeps the command running in the terminal, instead of the notebook\n",
"!ls /jobs # list all job names"
]
},
{
Expand All @@ -176,8 +147,8 @@
"outputs": [],
"source": [
"# Replace {YOUR_JOB_NAME} with the job name you used to run your cdb_tpv23 job.\n",
"# result_dir = '/opt/notebooks/{YOUR_JOB_NAME}/'\n",
"result_dir = '/opt/notebooks/SeisSol_cdb_tpv23/'"
"# result_dir = '/jobs/{YOUR_JOB_NAME}/'\n",
"result_dir = '/jobs/SeisSol_cdb_tpv23/'"
]
},
{
Expand All @@ -204,11 +175,16 @@
"from matplotlib import pyplot as plt\n",
"from mpl_toolkits.mplot3d.art3d import Poly3DCollection\n",
"import matplotlib.colors as mcolors\n",
"%matplotlib inline\n",
"\n",
"plt.rcParams['font.size'] = 18\n",
"\n",
"# Dedicated library for post-processing HDF5 format SeisSol output\n",
"import seissolxdmf as seisx"
"import seissolxdmf as seisx\n",
"\n",
"# Additional standard python library to access file names inside a folder\n",
"import os\n",
"import re"
]
},
{
Expand All @@ -227,7 +203,7 @@
"outputs": [],
"source": [
"# Load data\n",
"xdmfFilename = result_dir + \"outputs/cdb_tpv23-fault.xdmf\"\n",
"xdmfFilename = os.path.join(result_dir,\"outputs/cdb_tpv23-fault.xdmf\")\n",
"sx = seisx.seissolxdmf(xdmfFilename)\n",
"ndt = sx.ReadNdt() - 1 #sx.ReadNdt() provides the total number of time steps that have been written out\n",
"xyz = sx.ReadGeometry()\n",
Expand Down Expand Up @@ -358,7 +334,7 @@
"ax2.view_init(elev=15, azim=250)\n",
"\n",
"#plt.tight_layout()\n",
"plt.show()\n"
"plt.show();"
]
},
{
Expand Down Expand Up @@ -520,10 +496,6 @@
"metadata": {},
"outputs": [],
"source": [
"## Additional standard python library to access file names inside a folder\n",
"import os\n",
"import re\n",
"\n",
"import pandas as pd"
]
},
Expand Down Expand Up @@ -636,8 +608,8 @@
"plt.grid(False)\n",
"\n",
"plt.tight_layout(pad=0.4, w_pad=0.5, h_pad=1.0)\n",
"\n",
"#plt.savefig(\"p_shearTrac.pdf\")"
"#plt.savefig(\"p_shearTrac.pdf\")\n",
"plt.show();"
]
},
{
Expand Down Expand Up @@ -672,7 +644,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.7"
"version": "3.11.11"
}
},
"nbformat": 4,
Expand Down
File renamed without changes
95 changes: 49 additions & 46 deletions earthquake-tsunami/ttpv_qwx.ipynb

Large diffs are not rendered by default.

23 changes: 17 additions & 6 deletions kaikoura/Kaikoura.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "4ccb0e80",
"metadata": {},
"source": [
"# SeisSol 3D dynamic rupture training example: the 2016 Mw 7.8 Kaikōura, New Zealand earthquake\n",
Expand All @@ -11,12 +12,13 @@
"All files to reproduce the published high-resolution model are openly available at [zenodo](https://zenodo.org/record/2538024#.Yu948S8RphA).\n",
"\n",
"The dynamic rupture earthquake scenario, eproduces key characteristics of the earthquake and constraints puzzling features inferred from high-quality observations including a large gap separating surface rupture traces, the possibility of significant slip on the subduction interface, the non-rupture of the Hope fault, and slow apparent rupture speed. This model shows that the observed rupture cascade is dynamically consistent with regional stress estimates and a crustal fault network geometry inferred from seismic and geodetic data. Our model proposes that the complex fault system operates at low apparent friction thanks to the combined effects of overpressurized fluids, low dynamic friction and stress concentrations induced by deep fault creep.\n",
"![](Kaikoura_Fig1.png)\n",
"![](figures/Kaikoura_Fig1.png)\n",
"*Fault network geometry prescribed for dynamic earthquake rupture modeling. Colors on fault surfaces indicate dipping angle (dip), highlighting the flattening with depth of the Jordan Thrust, Kekerengu, and Needles faults. All segments dip westwards, except for the Humps Fault Zone. The Hope, Culverden, and Leonard Mound faults, dipping, respectively, 70° toward NorthWest, 70° toward South, and 50° toward SouthEast, are displayed in yellow. These faults do not rupture in our dynamic rupture model. Also shown are the high-resolution topography and bathymetry (Mitchell et al., 2012), and S-wave speeds (Vs) on four cross-sections of the 3D subsurface structure (Eberhart-Phillips et al., 2010) incorporated in the model.*\n"
]
},
{
"cell_type": "markdown",
"id": "650784a1",
"metadata": {},
"source": [
"## Mesh\n",
Expand All @@ -27,7 +29,7 @@
"2. CAD 2: Creating the complex fault network constrained by fault traces and varying fault dip and intersect all faults with each other and with topo-bathymetry in a manifold manner;\n",
"3. Mesh: Automatic volumetric meshing using unstructured tetrahedral elements. Keep in mind our two differing resolution criteria: the CFL criterion determines the required resolution for seismic wave propagation, and the dynamic rupture process zone/cohesive zone size, the region behind the rupture front where the fault strength drops from its static to dynamic level ([Day et al., 2005](https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2005jb003813); for SeisSol: [Wollherr et al., 2018](https://academic.oup.com/gji/article/214/3/1556/5017447?login=true)).\n",
"\n",
"![](Kaikoura_Fig3.png)\n",
"![](figures/Kaikoura_Fig3.png)\n",
"*Snapshot of the wavefield (absolute particle velocity in m/s) across the fault network at a rupture time of 55 s. The high-resolution model is discretized by an unstructured mesh accounting for three-dimensional (3D) subsurface structure and high-resolution topography and featuring refined resolution in the vicinity of the faults. It incorporates the nonlinear interaction between frictional on-fault failure, off-fault plasticity, and seismic wave propagation.*\n",
"\n",
"We recorded two (non-narrated) demos of all meshing steps for a similar mesh using Simmodeler and a few simple scripts available in the SeisSol repository, which are available [here](https://drive.google.com/file/d/1Y3mTAoPTAyUMdXfTzW_Ap62u4EpJM0Zf/view?usp=sharing) and [here](https://drive.google.com/file/d/1ts3QZCWUeHMwB3ZEhUpV-CmNcG-4Vwj8/view?usp=sharing).\n",
Expand All @@ -38,6 +40,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "6f9bc8ed",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -54,13 +57,15 @@
},
{
"cell_type": "markdown",
"id": "d0ce6206",
"metadata": {},
"source": [
"## Run the code"
]
},
{
"cell_type": "markdown",
"id": "fae70175",
"metadata": {},
"source": [
"Now we run SeisSol using one of the parameter files provided in the Kaikoura training directory. We handle the 3D heterogeneous subsurface velocity data set using [ASAGI](https://seissol.readthedocs.io/en/latest/asagi.html), our open-source software for efficient reading, interpolation, and writing of parallel, adaptive geoinformation ([Rettenberger et al., 2016](http://dl.acm.org/citation.cfm?id=2938618)).\n",
Expand All @@ -75,6 +80,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "853873d5",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -85,22 +91,24 @@
},
{
"cell_type": "markdown",
"id": "2f328c31",
"metadata": {},
"source": [
"## Visualization"
]
},
{
"cell_type": "markdown",
"id": "c4d9d56f",
"metadata": {},
"source": [
"We now visualize what we call the fault output generated by SeisSol. These are the modeled fields across the complex fault surfaces. Note that generating this output includes interpolation, since SeisSol is solving the governing PDEs in their weak form. We can visualise all processes occurring across the fault surface during dynamic rupture, e.g. slip rates, slip, shear and normal stresses, effective friction etc.\n",
"\n",
"This is how the published high-resolution rupture looks like:\n",
"![](Kaikoura_Fig2.png)\n",
"![](figures/Kaikoura_Fig2.png)\n",
"*Overview of the simulated rupture propagation. Snapshots of the absolute slip rate are shown every 5 s. The figure focuses on four different portions of the fault system, following the rupture front as it propagates from South to North. Labels indicate remarkable dynamic features of the rupture.*\n",
"\n",
"![](Kaikoura_Fig4.png)\n",
"![](figures/Kaikoura_Fig4.png)\n",
"*Source properties of the published dynamic rupture model and comparison to observational inferences. Final slip magnitude a) modeled here and b) inferred by Xu et al., 2018. Final rake angle c) modeled and d) inferred by Xu et al., 2018, e) Modeled rupture velocity. f) Modeled moment rate function compared with those inferred by Bai et al., 2017, from teleseismic and tsunami data, by Zhang et al., 2017, from seismic waveform inversion and from teleseismic data by the SCARDEC method, Vallee et al., 2011.*\n",
"\n",
"Check out the [documentation](https://seissol.readthedocs.io/en/latest/fault-output.html#outputmask) for an explanation of the variable names and change 'SRs' to other quantities of interest."
Expand All @@ -109,6 +117,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ea5e1b60",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -134,6 +143,7 @@
},
{
"cell_type": "markdown",
"id": "5beccbfa",
"metadata": {},
"source": [
"The fault output, as well as all other surface and volume outputs, can be written [asynchronously](https://seissol.readthedocs.io/en/latest/environment-variables.html#asynchronous-output), i.e. specific threads or nodes can be dedicated to write these outputs.\n",
Expand Down Expand Up @@ -168,6 +178,7 @@
},
{
"cell_type": "markdown",
"id": "0cd8bdf8",
"metadata": {},
"source": [
"### Effect of initial loading on cascading rupture dynamics\n",
Expand All @@ -177,7 +188,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -191,7 +202,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.11.11"
}
},
"nbformat": 4,
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Loading
Loading