-
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 #241 from PrincetonUniversity/issue-158
Fluid solid bathymetry
- Loading branch information
Showing
17 changed files
with
977 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
specfem_config.yaml | ||
Par_File | ||
line_sources.yaml | ||
__pycache__ |
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,143 @@ | ||
#----------------------------------------------------------- | ||
# | ||
# Simulation input parameters | ||
# | ||
#----------------------------------------------------------- | ||
|
||
# title of job | ||
title = fluid-solid-bathymetry | ||
|
||
# parameters concerning partitioning | ||
NPROC = 1 # number of processes | ||
|
||
# Output folder to store mesh related files | ||
OUTPUT_FILES = @CMAKE_SOURCE_DIR@/examples/fluid-solid-bathymetry/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/fluid-solid-bathymetry/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 = 2 | ||
|
||
# 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 = 1.000d+04 # first receiver x in meters | ||
zdeb = 8.082d+03 # first receiver z in meters | ||
xfin = 1.000d+04 # last receiver x in meters (ignored if only one receiver) | ||
zfin = 8.082d+03 # last receiver z in meters (ignored if only one receiver) | ||
record_at_surface_same_vertical = .false. # receivers inside the medium or at the surface | ||
|
||
|
||
# second receiver set (repeat these 6 lines and adjust nreceiversets accordingly) | ||
nrec = 1 # number of receivers | ||
xdeb = 1.000d+04 # first receiver x in meters | ||
zdeb = 5.472d+03 # first receiver z in meters | ||
xfin = 1.000d+04 # last receiver x in meters (ignored if only one receiver) | ||
zfin = 5.472d+03 # 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/fluid-solid-bathymetry/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 | ||
1 1 2500.d0 3400.d0 1963.d0 0 0 9999 9999 0 0 0 0 0 0 | ||
2 1 1020.d0 1500.d0 0.d0 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/fluid-solid-bathymetry/topography_file.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 = 2.000d+04 # abscissa of right side of the model | ||
nx = 250 # number of elements along X | ||
|
||
STACEY_ABSORBING_CONDITIONS = .true. # use Stacey absorbing boundary conditions | ||
|
||
# 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 250 1 62 1 | ||
1 250 63 120 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 |
56 changes: 56 additions & 0 deletions
56
examples/fluid-solid-bathymetry/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,56 @@ | ||
parameters: | ||
|
||
header: | ||
## Header information is used for logging. It is good practice to give your simulations explicit names | ||
title: fluid-solid-bathymetry # name for your simulation | ||
# A detailed description for your simulation | ||
description: | | ||
Material systems : Elastic domain (1), Acoustic domain (1) | ||
Interfaces : Acoustic-elastic interface (1) (orientation horizontal with acoustic domain on top) | ||
Sources : Moment-tensor (234) | ||
Boundary conditions : Neumann BCs on all edges | ||
|
||
simulation-setup: | ||
## quadrature setup | ||
quadrature: | ||
quadrature-type: GLL4 | ||
|
||
## Solver setup | ||
solver: | ||
time-marching: | ||
type-of-simulation: forward | ||
time-scheme: | ||
type: Newmark | ||
dt: 1.000e-3 | ||
nstep: 32500 | ||
|
||
simulation-mode: | ||
forward: | ||
writer: | ||
seismogram: | ||
format: ascii | ||
directory: @CMAKE_SOURCE_DIR@/examples/fluid-solid-bathymetry/OUTPUT_FILES/results | ||
|
||
display: | ||
format: PNG | ||
directory: @CMAKE_SOURCE_DIR@/examples/fluid-solid-bathymetry/OUTPUT_FILES/display | ||
field: displacement | ||
simulation-field: forward | ||
time-interval: 100 | ||
|
||
receivers: | ||
stations-file: @CMAKE_SOURCE_DIR@/examples/fluid-solid-bathymetry/OUTPUT_FILES/STATIONS | ||
angle: 0.0 | ||
seismogram-type: | ||
- pressure | ||
nstep_between_samples: 10 | ||
|
||
## Runtime setup | ||
run-setup: | ||
number-of-processors: 1 | ||
number-of-runs: 1 | ||
|
||
## databases | ||
databases: | ||
mesh-database: @CMAKE_SOURCE_DIR@/examples/fluid-solid-bathymetry/OUTPUT_FILES/database.bin | ||
source-file: @CMAKE_SOURCE_DIR@/examples/fluid-solid-bathymetry/line_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/fluid-solid-bathymetry/specfem_config.yaml) | ||
configure_file(CMakeFiles/Par_File.in ${CMAKE_SOURCE_DIR}/examples/fluid-solid-bathymetry/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,39 @@ | ||
# Wave propagration through fluid-solid interface | ||
|
||
This example simulates a tele-seismic plane wave within a fluid-solid domain. This example is contributed by Sirawich Pipatprathanporn and is part of the publication [Pipatprathanporn et al. (2024)](https://doi.org/10.1093/gji/ggae238) | ||
|
||
## 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.