You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user/examples/crustal-strikeslip-2d/step01-slip.md
+55Lines changed: 55 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,61 @@ At the end of the output written to the terminal, we see that the solver advance
142
142
The linear solve converged after 19 iterations and the norm of the residual met the absolute convergence tolerance (`ksp_atol`) .
143
143
The nonlinear solve converged in 1 iteration, which we expect because this is a linear problem, and the residual met the absolute convergence tolerance (`snes_atol`).
144
144
145
+
### Earthquake rupture parameters
146
+
147
+
We use the `pylith_eqinfo` utility to compute rupture information, such as earthquake magnitude, seismic moment, seismic potency, and average slip.
148
+
For 2D simulations, the average slip provides the most useful information.
149
+
[`pylith_eqinfo`](../../run-pylith/utilities.md) is a Pyre application and you specify parameters using `cfg` files and the command line.
150
+
It writes results to a Python script for use in post-processing of simulation results.
151
+
152
+
The file `eqinfoapp.cfg` holds the parameters for `pylith_eqinfo` in this example.
153
+
By default, `pylith_eqinfo` extracts information for the final time step in the output file.
154
+
In order to compute the seismic moment and moment magnitude, we need the shear modulus, which in this case is uniform over the domain.
155
+
Consquently, we specify the density and shear wave speed using a `UniformDB` in `eqinfoapp.cfg`.
156
+
157
+
```{code-block} console
158
+
---
159
+
caption: Run `pylith_eqinfo` for the Step 1 simulation.
160
+
---
161
+
$ pylith_eqinfo
162
+
```
163
+
164
+
```{code-block} python
165
+
---
166
+
caption: Contents of `output/step01_slip-eqinfo.py` generated by `pylith_eqinfo`. The `all` object includes earthquake rupture information combined from the three the individual faults. The average slip matches the uniform slip prescribed on each fault.
167
+
---
168
+
class RuptureStats(object):
169
+
pass
170
+
all = RuptureStats()
171
+
all.timestamp = [ 3.155760e+07]
172
+
all.ruparea = [ 5.387992e+04]
173
+
all.potency = [ 1.733080e+05]
174
+
all.moment = [ 3.899430e+15]
175
+
all.avgslip = [ 3.216560e+00]
176
+
all.mommag = [ 4.360667e+00]
177
+
main_fault = RuptureStats()
178
+
main_fault.timestamp = [ 3.155760e+07]
179
+
main_fault.ruparea = [ 3.577375e+04]
180
+
main_fault.potency = [ 1.430950e+05]
181
+
main_fault.moment = [ 3.219637e+15]
182
+
main_fault.avgslip = [ 4.000000e+00]
183
+
main_fault.mommag = [ 4.305205e+00]
184
+
east_branch = RuptureStats()
185
+
east_branch.timestamp = [ 3.155760e+07]
186
+
east_branch.ruparea = [ 5.999357e+03]
187
+
east_branch.potency = [ 5.999357e+03]
188
+
east_branch.moment = [ 1.349855e+14]
189
+
east_branch.avgslip = [ 1.000000e+00]
190
+
east_branch.mommag = [ 3.386858e+00]
191
+
west_branch = RuptureStats()
192
+
west_branch.timestamp = [ 3.155760e+07]
193
+
west_branch.ruparea = [ 1.210682e+04]
194
+
west_branch.potency = [ 2.421364e+04]
195
+
west_branch.moment = [ 5.448068e+14]
196
+
west_branch.avgslip = [ 2.000000e+00]
197
+
west_branch.mommag = [ 3.790828e+00]
198
+
```
199
+
145
200
## Visualizing the results
146
201
147
202
The `output` directory contains the simulation output.
Copy file name to clipboardExpand all lines: docs/user/examples/crustal-strikeslip-3d/step01-slip.md
+52Lines changed: 52 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,58 @@ At the end of the output written to the terminal, we see that the solver advance
111
111
The linear solve converged after 88 iterations and the norm of the residual met the absolute convergence tolerance (`ksp_atol`) .
112
112
The nonlinear solve converged in 1 iteration, which we expect because this is a linear problem, and the residual met the absolute convergence tolerance (`snes_atol`).
113
113
114
+
### Earthquake rupture parameters
115
+
116
+
We use the `pylith_eqinfo` utility to compute rupture information, such as earthquake magnitude, seismic moment, seismic potency, and average slip.
117
+
The file `eqinfoapp.cfg` holds the parameters for `pylith_eqinfo` in this example.
118
+
By default, `pylith_eqinfo` extracts information for the final time step in the output file.
119
+
In order to compute the seismic moment and moment magnitude, we need the shear modulus, which in this case is uniform over the domain.
120
+
Consquently, we specify the density and shear wave speed using a `UniformDB` in `eqinfoapp.cfg`.
121
+
The average slip, rupture area, seismic moment, and seismic potency are all given in SI units.
122
+
123
+
```{code-block} console
124
+
---
125
+
caption: Run `pylith_eqinfo` for the Step 1 simulation.
126
+
---
127
+
$ pylith_eqinfo
128
+
```
129
+
130
+
```{code-block} python
131
+
---
132
+
caption: Contents of `output/step01_slip-eqinfo.py` generated by `pylith_eqinfo`. The `all` object includes earthquake rupture information combined from the three the individual faults. The average slip matches the uniform slip prescribed on each fault.
133
+
---
134
+
class RuptureStats(object):
135
+
pass
136
+
all = RuptureStats()
137
+
all.timestamp = [ 3.155760e+07]
138
+
all.ruparea = [ 8.140700e+08]
139
+
all.potency = [ 2.623065e+09]
140
+
all.moment = [ 5.901897e+19]
141
+
all.avgslip = [ 3.222162e+00]
142
+
all.mommag = [ 7.147328e+00]
143
+
main_fault = RuptureStats()
144
+
main_fault.timestamp = [ 3.155760e+07]
145
+
main_fault.ruparea = [ 5.424291e+08]
146
+
main_fault.potency = [ 2.169716e+09]
147
+
main_fault.moment = [ 4.881862e+19]
148
+
main_fault.avgslip = [ 4.000000e+00]
149
+
main_fault.mommag = [ 7.092390e+00]
150
+
east_branch = RuptureStats()
151
+
east_branch.timestamp = [ 3.155760e+07]
152
+
east_branch.ruparea = [ 8.993288e+07]
153
+
east_branch.potency = [ 8.993288e+07]
154
+
east_branch.moment = [ 2.023490e+18]
155
+
east_branch.avgslip = [ 1.000000e+00]
156
+
east_branch.mommag = [ 6.170734e+00]
157
+
west_branch = RuptureStats()
158
+
west_branch.timestamp = [ 3.155760e+07]
159
+
west_branch.ruparea = [ 1.817081e+08]
160
+
west_branch.potency = [ 3.634162e+08]
161
+
west_branch.moment = [ 8.176864e+18]
162
+
west_branch.avgslip = [ 2.000000e+00]
163
+
west_branch.mommag = [ 6.575058e+00]
164
+
```
165
+
114
166
## Visualizing the results
115
167
116
168
The `output` directory contains the simulation output.
Copy file name to clipboardExpand all lines: docs/user/examples/strikeslip-2d/step04-varslip.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,6 +151,48 @@ At the end of the output written to the terminal, we see that the solver advance
151
151
The linear solve converged after 27 iterations and the norm of the residual met the absolute convergence tolerance (`ksp_atol`).
152
152
The nonlinear solve converged in 1 iteration, which we expect because this is a linear problem, and the residual met the absolute convergence tolerance (`snes_atol`).
153
153
154
+
## Earthquake rupture parameters
155
+
156
+
We use the `pylith_eqinfo` utility to compute rupture information, such as earthquake magnitude, seismic moment, seismic potency, and average slip.
157
+
For 2D simulations, the average slip provides the most useful information.
158
+
[`pylith_eqinfo`](../../run-pylith/utilities.md) is a Pyre application and you specify parameters using `cfg` files and the command line.
159
+
It writes results to a Python script for use in post-processing of simulation results.
160
+
161
+
The file `eqinfoapp.cfg` holds the parameters for `pylith_eqinfo` in this example.
162
+
By default, `pylith_eqinfo` extracts information for the final time step in the output file.
163
+
In order to compute the seismic moment and moment magnitude, we need the shear modulus for the fault.
164
+
We account for the contrast in rigidity across the fault by using the effective shear modulus from {cite:t}`Wu:Chen:2003` and set the shear wave speed to 3.46 km/s.
165
+
166
+
167
+
```{code-block} console
168
+
---
169
+
caption: Run `pylith_eqinfo` for the Step 4 simulation.
170
+
---
171
+
$ pylith_eqinfo
172
+
```
173
+
174
+
```{code-block} python
175
+
---
176
+
caption: Contents of `output/step04_varslip-eqinfo.py` generated by `pylith_eqinfo`. The `all` object includes earthquake rupture information combined from all of the individual faults.
177
+
---
178
+
class RuptureStats(object):
179
+
pass
180
+
all = RuptureStats()
181
+
all.timestamp = [ 3.155760e+07]
182
+
all.ruparea = [ 6.300870e+04]
183
+
all.potency = [ 1.306180e+04]
184
+
all.moment = [ 3.909267e+14]
185
+
all.avgslip = [ 2.073016e-01]
186
+
all.mommag = [ 3.694730e+00]
187
+
fault = RuptureStats()
188
+
fault.timestamp = [ 3.155760e+07]
189
+
fault.ruparea = [ 6.300870e+04]
190
+
fault.potency = [ 1.306180e+04]
191
+
fault.moment = [ 3.909267e+14]
192
+
fault.avgslip = [ 2.073016e-01]
193
+
fault.mommag = [ 3.694730e+00]
194
+
```
195
+
154
196
## Visualizing the results
155
197
156
198
In {numref}`fig:example:strikeslip:2d:step04:solution` we use the `pylith_viz` utility to visualize the y displacement field.
This utility computes the moment magnitude, seismic moment, seismic potency, and average slip at user-specified time snapshots from PyLith fault HDF5 output.
340
-
The utility works with output from simulations with either prescribed slip and/or spontaneous rupture.
341
-
Currently, we compute the shear modulus from a user-specified spatial database at the centroid of the fault cells. In the future we plan to account for lateral variations in shear modulus across the fault when calculating the seismic moment.
342
-
The Python script is a Pyre application, so its parameters can be specified using `cfg` and command line arguments just like PyLith.
340
+
The utility works with output from simulations with either prescribed slip or spontaneous rupture.
341
+
The moment magnitudes, seismic moment, and seismic potentency for 2D simulation have limited value, because they use on a 1D fault.
342
+
Currently, we compute the shear modulus from a user-specified spatial database at the centroid of the fault cells.
343
+
In the future we plan to automatically account for lateral variations in shear modulus across the fault when calculating the seismic moment.
344
+
The average slip, rupture area, seismic moment, and seismic potency are all given in SI units.
345
+
346
+
```{tip}
347
+
From {cite:t}`Wu:Chen:2003` the seismic moment, $M_0$, when considering a laterial variation in the shear modulus across the fault is
348
+
349
+
\begin{equation}
350
+
M_0 = \mu_\mathit{eff} A D
351
+
\end{equation}
352
+
353
+
where $A$ is the rupture area, $D$ is the average slip, and $\mu_\mathit{eff}$ is the effective shear modulus given by
where $\mu^+$ and $\mu^-$ are the shear modulus on each side of the fault.
360
+
```
361
+
362
+
The Python script is a Pyre application, so its parameters can be specified using `cfg` files (`eqinfoapp.cfg` will be read if it exists) or command line arguments just like PyLith.
343
363
344
364
The Pyre properties and facilities include:
345
365
346
366
:output_filename: Filename for output of slip information.
367
+
:coordsys: Coordinate system associated with mesh in simulation.
347
368
:faults: Array of fault names.
348
369
:filename_pattern: Filename pattern in C/Python format for creating filename for each fault. Default is `output/fault_\%s.h5`.
349
370
:snapshots: Array of timestamps for slip snapshosts ([-1] means use last time step in file, which is the default).
350
371
:snapshot_units: Units for timestamps in array of snapshots.
351
372
:db_properties: Spatial database for elastic properties.
352
-
:coordsys: Coordinate system associated with mesh in simulation.
373
+
```{code-block} cfg
374
+
---
375
+
caption: Example `cfg` file for running `pylith_eqinfo` in `examples/strikeslip-2d` to compute the earthquake magnitude, seismic moment, and average slip for step04_varslip.
0 commit comments