-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #383 from PrincetonUniversity/issue-369
Issue 369 - Adds homework 9 from JT's class
- Loading branch information
Showing
18 changed files
with
688 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
#----------------------------------------------------------- | ||
# | ||
# Simulation input parameters | ||
# | ||
#----------------------------------------------------------- | ||
|
||
# title of job | ||
title = Flat fluid/solid interface | ||
|
||
# parameters concerning partitioning | ||
NPROC = 1 # number of processes | ||
|
||
# Output folder to store mesh related files | ||
OUTPUT_FILES = @CMAKE_SOURCE_DIR@/examples/solid-solid-interface/OUTPUT_FILES | ||
|
||
#----------------------------------------------------------- | ||
# | ||
# Mesh | ||
# | ||
#----------------------------------------------------------- | ||
|
||
# Partitioning algorithm for decompose_mesh | ||
PARTITIONING_TYPE = 3 # SCOTCH = 3, ascending order (very bad idea) = 1 | ||
|
||
# number of control nodes per element (4 or 9) | ||
NGNOD = 9 | ||
|
||
# location to store the mesh | ||
database_filename = @CMAKE_SOURCE_DIR@/examples/solid-solid-interface/OUTPUT_FILES/database.bin | ||
|
||
#----------------------------------------------------------- | ||
# | ||
# Receivers | ||
# | ||
#----------------------------------------------------------- | ||
|
||
# use an existing STATION file found in ./DATA or create a new one from the receiver positions below in this Par_file | ||
use_existing_STATIONS = .false. | ||
|
||
# number of receiver sets (i.e. number of receiver lines to create below) | ||
nreceiversets = 1 | ||
|
||
# orientation | ||
anglerec = 0.d0 # angle to rotate components at receivers | ||
rec_normal_to_surface = .false. # base anglerec normal to surface (external mesh and curve file needed) | ||
|
||
# first receiver set (repeat these 6 lines and adjust nreceiversets accordingly) | ||
nrec = 1 # number of receivers | ||
xdeb = 150000.d0 # first receiver x in meters | ||
zdeb = 80000.d0 # first receiver z in meters | ||
xfin = 150000.d0 # last receiver x in meters (ignored if only one receiver) | ||
zfin = 3480000.d0 # last receiver z in meters (ignored if only one receiver) | ||
record_at_surface_same_vertical = .false. # receivers inside the medium or at the surface | ||
|
||
# filename to store stations file | ||
stations_filename = @CMAKE_SOURCE_DIR@/examples/solid-solid-interface/OUTPUT_FILES/STATIONS | ||
|
||
#----------------------------------------------------------- | ||
# | ||
# Velocity and density models | ||
# | ||
#----------------------------------------------------------- | ||
|
||
# number of model materials | ||
nbmodels = 2 | ||
# available material types (see user manual for more information) | ||
# acoustic: model_number 1 rho Vp 0 0 0 QKappa Qmu 0 0 0 0 0 0 | ||
# elastic: model_number 1 rho Vp Vs 0 0 QKappa Qmu 0 0 0 0 0 0 | ||
# anistoropic: model_number 2 rho c11 c13 c15 c33 c35 c55 c12 c23 c25 0 0 0 | ||
# poroelastic: model_number 3 rhos rhof phi c kxx kxz kzz Ks Kf Kfr etaf mufr Qmu | ||
# tomo: model_number -1 0 9999 9999 A 0 0 9999 9999 0 0 0 0 0 | ||
# | ||
# The problem values are as follows: | ||
# top: rho = 2.60 * 10^3 kg/m3, kappa= 5.2 * 10^10 Pa, mu =2.66 * 10^10 Pa | ||
# bottom: rho = 3.38 * 10^3 kg/m3, kappa= 1.3 * 10^11 Pa, mu = 6.8 * 10^10 Pa | ||
# After conversion to VP/VS we have following model values. | ||
1 1 3380.d0 8079.98d0 4485.35d0 0 0 9999 9999 0 0 0 0 0 0 | ||
2 1 2600.d0 5859.90d0 3199.40d0 0 0 9999 9999 0 0 0 0 0 0 | ||
|
||
# external tomography file | ||
TOMOGRAPHY_FILE = ./DATA/tomo_file.xyz | ||
|
||
# use an external mesh created by an external meshing tool or use the internal mesher | ||
read_external_mesh = .false. | ||
|
||
#----------------------------------------------------------- | ||
# | ||
# PARAMETERS FOR EXTERNAL MESHING | ||
# | ||
#----------------------------------------------------------- | ||
|
||
# data concerning mesh, when generated using third-party app (more info in README) | ||
# (see also absorbing_conditions above) | ||
mesh_file = ./DATA/Mesh_canyon/canyon_mesh_file # file containing the mesh | ||
nodes_coords_file = ./DATA/Mesh_canyon/canyon_nodes_coords_file # file containing the nodes coordinates | ||
materials_file = ./DATA/Mesh_canyon/canyon_materials_file # file containing the material number for each element | ||
free_surface_file = ./DATA/Mesh_canyon/canyon_free_surface_file # file containing the free surface | ||
axial_elements_file = ./DATA/axial_elements_file # file containing the axial elements if AXISYM is true | ||
absorbing_surface_file = ./DATA/Mesh_canyon/canyon_absorbing_surface_file # file containing the absorbing surface | ||
acoustic_forcing_surface_file = ./DATA/MSH/Surf_acforcing_Bottom_enforcing_mesh # file containing the acoustic forcing surface | ||
absorbing_cpml_file = ./DATA/absorbing_cpml_file # file containing the CPML element numbers | ||
tangential_detection_curve_file = ./DATA/courbe_eros_nodes # file containing the curve delimiting the velocity model | ||
|
||
#----------------------------------------------------------- | ||
# | ||
# PARAMETERS FOR INTERNAL MESHING | ||
# | ||
#----------------------------------------------------------- | ||
|
||
# file containing interfaces for internal mesh | ||
interfacesfile = @CMAKE_SOURCE_DIR@/examples/solid-solid-interface/topography.dat | ||
|
||
# geometry of the model (origin lower-left corner = 0,0) and mesh description | ||
xmin = 0.d0 # abscissa of left side of the model | ||
xmax = 200000.d0 # abscissa of right side of the model | ||
nx = 188 # number of elements along X | ||
|
||
STACEY_ABSORBING_CONDITIONS = .true. | ||
|
||
# absorbing boundary parameters (see absorbing_conditions above) | ||
absorbbottom = .true. | ||
absorbright = .true. | ||
absorbtop = .false. | ||
absorbleft = .true. | ||
|
||
# define the different regions of the model in the (nx,nz) spectral-element mesh | ||
nbregions = 2 # then set below the different regions and model number for each region | ||
1 188 1 38 1 | ||
1 188 39 76 2 | ||
|
||
#----------------------------------------------------------- | ||
# | ||
# Display parameters | ||
# | ||
#----------------------------------------------------------- | ||
|
||
# meshing output | ||
output_grid_Gnuplot = .false. # generate a GNUPLOT file containing the grid, and a script to plot it | ||
output_grid_ASCII = .false. # dump the grid in an ASCII text file consisting of a set of X,Y,Z points or not |
54 changes: 54 additions & 0 deletions
54
examples/solid-solid-interface/CMakeFiles/specfem_config.yaml.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
## Coupling interfaces have code flow that is dependent on orientation of the interface. | ||
## This test is to check the code flow for horizontal acoustic-elastic interface with acoustic domain on top. | ||
|
||
parameters: | ||
|
||
header: | ||
## Header information is used for logging. It is good practice to give your simulations explicit names | ||
title: Heterogeneous elastic-elastic medium with 1 elastic-elastic interface (orientation horizontal) # name for your simulation | ||
# A detailed description for your simulation | ||
description: | | ||
Material systems : Elastic domain (1), Elastic domain (1) | ||
Interfaces : Elastic-elastic interface (1) (orientation horizontal slower medium on top) | ||
Sources : Force source (1) | ||
Boundary conditions : Neumann BCs on all edges | ||
Debugging comments: This tests checks coupling elastic-elastic interface implementation. | ||
The orientation of the interface is horizontal with elastic domain on top. | ||
|
||
simulation-setup: | ||
## quadrature setup | ||
quadrature: | ||
quadrature-type: GLL4 | ||
|
||
## Solver setup | ||
solver: | ||
time-marching: | ||
type-of-simulation: forward | ||
time-scheme: | ||
type: Newmark | ||
dt: 5.0e-3 | ||
nstep: 10000 | ||
|
||
simulation-mode: | ||
forward: | ||
writer: | ||
seismogram: | ||
format: ascii | ||
directory: "@CMAKE_SOURCE_DIR@/examples/solid-solid-interface/OUTPUT_FILES/results" | ||
|
||
receivers: | ||
stations-file: "@CMAKE_SOURCE_DIR@/examples/solid-solid-interface/OUTPUT_FILES/STATIONS" | ||
angle: 0.0 | ||
seismogram-type: | ||
- displacement | ||
nstep_between_samples: 1 | ||
|
||
## Runtime setup | ||
run-setup: | ||
number-of-processors: 1 | ||
number-of-runs: 1 | ||
|
||
## databases | ||
databases: | ||
mesh-database: "@CMAKE_SOURCE_DIR@/examples/solid-solid-interface/OUTPUT_FILES/database.bin" | ||
source-file: "@CMAKE_SOURCE_DIR@/examples/solid-solid-interface/sources.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
CMAKE_MINIMUM_REQUIRED(VERSION 3.17.5) | ||
|
||
configure_file(CMakeFiles/specfem_config.yaml.in ${CMAKE_SOURCE_DIR}/examples/solid-solid-interface/specfem_config.yaml) | ||
configure_file(CMakeFiles/Par_File.in ${CMAKE_SOURCE_DIR}/examples/solid-solid-interface/Par_File) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Wave propagration through solid-solid interface | ||
|
||
This example is for a solid-solid simulation that is often used in Jeroen | ||
Tromp's Computational Seismology course at Princeton University. | ||
|
||
For a step-by-step guide on this example, please refer to the | ||
[documentation](https://specfem2d-kokkos.readthedocs.io/en/latest/cookbooks/dim2/solid-solid-interface/index.html). | ||
|
||
## Running the examples | ||
|
||
To run the examples, you first need to install poetry following these | ||
[instructions](https://python-poetry.org/docs/#installation). Once you've done | ||
so, you can install the dependencies for the examples by running the following | ||
command in the current directory: | ||
|
||
```bash | ||
# verify poetry is installed | ||
poetry --version | ||
|
||
# install dependencies | ||
poetry install | ||
|
||
``` | ||
|
||
After installing the dependencies, you can run the examples by running the | ||
following command within the example directory you want to run: | ||
|
||
```bash | ||
|
||
# run the example | ||
poetry run snakemake -j 1 | ||
|
||
# or to run the example on a slurm cluster | ||
poetry run snakemake --executor slurm -j 1 | ||
|
||
``` | ||
|
||
## Cleaning up | ||
|
||
To clean up the example directory, you can run the following command in the | ||
directory of the example you want to clean up: | ||
|
||
```bash | ||
|
||
# clean up the example | ||
poetry run snakemake clean | ||
|
||
``` |
Oops, something went wrong.