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.
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
cd
into the mpsa_newmark directory is as shown in the following:python convergence_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 ofcoarse
fromTrue
toFalse
to run simulations that match those detailed in the article.save_figure
: This flag is found in runscripts which allow for generating and saving figures. Figures are saved in figures. Changesave_figure
fromTrue
toFalse
to 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_export
fromFalse
toTrue
to limit the number of files exported.
Note that not all the runscripts have have/need all the flags.
These convergence analyses are performed with homogeneous Dirichlet conditions on a 3D simplex grid. All convergence runscripts generate an output file which contains grid size, number of cells, time step size, displacement error and traction error.
-
Convergence in space and time:
- runscript_space_time_convergence_dirichlet_boundaries (this script can also save a figure of the convergence results).
-
Convergence in space:
-
Convergence in time:
-
runscript_time_convergence_dirichlet_boundaries.
The default parameters run the time convergence analysis with two refinement levels and a cell size coarser than ideal. The coarse parameter setting causes the spatial error to dominate, and we do therefore not observe the second order convergence in time.
-
All the runscripts utilize manufactured_solution_dynamic_3D as the manufactured solution setup.
Convergence of the solution is performed in a quasi-1D setting. 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,
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
=False
is time consuming and memory intensive. Be aware that it generates visualization files which require over 20GB of storage if bothcoarse = False
andlimit_file_export
=False
.