This repository contains runscripts and model class setups needed for reproducing the results in the MPSA-Newmark article.
That includes:
- Runscripts for the convergence and energy decay analyses.
- Runscripts for all simulation examples.
- Standardized model class setup for solving the elastic wave equation using PorePy (https://github.com/pmgbergen/porepy).
- Utility material which is used in the various simulations.
Additional material: We have included runscripts for separate space and time convergence analyses of MPSA-Newmark with Dirichlet boundary conditions. These analysis runs are available for simplex and Cartesian grids in tree dimensions.
A Docker image with the full environment (including PorePy and PETSc) for reproducing the results in the article is available on Zenodo here.
-
All scripts should be run from the mpsa_newmark directory. An example of how to run a script after
cdinto the mpsa_newmark directory is as shown in the following:python convergence_and_stability_analysis/runscript_energy_decay_vary_theta.py -
There are certain boolean flags to adapt the simulations and outputs of the simulation runscripts:
coarse: Some of the simulations are quite time consuming and memory intensive. To ensure low default memory usage and low default wall clock time for running the runscripts, all simulation runscripts are assigned coarse default parameter values. Change the value ofcoarsefromTruetoFalseto run simulations that match those detailed in the article.grid_type: Some of the convergence analyses are available both for simplex and Cartesian grids. Simply define the variablegrid_typeto be either"simplex"or"cartesian"to set the grid type of your choice.save_figure: This flag is found in runscripts which allow for generating and saving figures. Figures are saved in figures. Changesave_figurefromTruetoFalseto not generate and save figures.limit_file_export: Certain runscripts generate large amounts of vtu and pvd files. Default behavior is to generate files for each time step. This flag allows to only generate files for the time steps which are presented in the article. Changelimit_file_exportfromFalsetoTrueto limit the number of files exported.
Note that not all the runscripts have/need all the flags.
The convergence analysis is performed with homogeneous Dirichlet conditions in 3D. The convergence runscript generates an output file which contains grid size, number of cells, time step size, displacement error and traction error, as well as a figure with the results:
The runscript utilizes manufactured_solution_dynamic_3D as the manufactured solution setup.
Convergence of the solution is performed in isotropic, anisotropic, homogeneous and heterogeneous media. We have performed a convergence analysis with successive refinemenet in both space and time. The script generates a file with displacement and traction errors in the convergence analysis results directory, as well as a convergence plot of the results:
The runscript utilizes model_convergence_ABC as the model class setup.
The energy decay analysis is performed both for successive refinement of the grid, as well as for varying wave incidence angles. In both cases the kinetic energy values for each time step in each simulation are saved in files within the directory energy_values.
Grid refinement:
Varying the wave incidence angle,
Both these runscripts utilize model_energy_decay_analysis as the model class setup.
Simulation example runscripts are found within a dedicated example runscripts directory.
The simulation from Example 1.1, which considers a seismic source located inside an inner transversely isotropic domain:
The simulation from Example 1.2, which considers a seismic source located outside an inner transversely isotropic domain:
The simulation from Example 2, which considers a layered heterogeneous medium with an open fracture:
-
runscript_example_2_heterogeneous_fractured_domain.
Note: The example 2 simulation with
coarse=Falseis time consuming and memory intensive. Be aware that it generates visualization files which require over 20GB of storage if bothcoarse = Falseandlimit_file_export=False.