Skip to content

Commit

Permalink
Added 3D mesh example
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit-Kakodkar committed Jan 23, 2025
1 parent d7ea90d commit 2d660ed
Show file tree
Hide file tree
Showing 21 changed files with 833 additions and 394 deletions.
13 changes: 13 additions & 0 deletions examples/dim3/homogeneous_halfspace/DATA/CMTSOLUTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
PDE 1999 01 01 00 00 00.00 67000 67000 -25000 4.2 4.2 homog_test
event name: homog_test
time shift: 0.0000
half duration: 5.0
latorUTM: 67000.0
longorUTM: 67000.0
depth: 30.0
Mrr: -7.600000e+27
Mtt: 7.700000e+27
Mpp: -2.000000e+26
Mrt: -2.500000e+28
Mrp: 4.000000e+26
Mtp: -2.500000e+27
101 changes: 101 additions & 0 deletions examples/dim3/homogeneous_halfspace/DATA/meshfem3D_files/Mesh_Par_file
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
#-----------------------------------------------------------
#
# Meshing input parameters
#
#-----------------------------------------------------------

# coordinates of mesh block in latitude/longitude and depth in km
LATITUDE_MIN = 0.0
LATITUDE_MAX = 134000.0
LONGITUDE_MIN = 0.0
LONGITUDE_MAX = 134000.0
DEPTH_BLOCK_KM = 60.d0
UTM_PROJECTION_ZONE = 11
SUPPRESS_UTM_PROJECTION = .true.

# file that contains the interfaces of the model / mesh
INTERFACES_FILE = interfaces3.txt

# file that contains the cavity
CAVITY_FILE = no_cavity.dat

# number of elements at the surface along edges of the mesh at the surface
# (must be 8 * multiple of NPROC below if mesh is not regular and contains mesh doublings)
# (must be multiple of NPROC below if mesh is regular)
NEX_XI = 36
NEX_ETA = 36

# number of MPI processors along xi and eta (can be different)
NPROC_XI = 1
NPROC_ETA = 1

#-----------------------------------------------------------
#
# Doubling layers
#
#-----------------------------------------------------------

# Regular/irregular mesh
USE_REGULAR_MESH = .true.
# Only for irregular meshes, number of doubling layers and their position
NDOUBLINGS = 0
# NZ_DOUBLING_1 is the parameter to set up if there is only one doubling layer
# (more doubling entries can be added if needed to match NDOUBLINGS value)
NZ_DOUBLING_1 = 40
NZ_DOUBLING_2 = 48

#-----------------------------------------------------------
#
# Visualization
#
#-----------------------------------------------------------

# create mesh files for visualisation or further checking
CREATE_ABAQUS_FILES = .false.
CREATE_DX_FILES = .false.
CREATE_VTK_FILES = .true.

# stores mesh files as cubit-exported files into directory MESH/ (for single process run)
SAVE_MESH_AS_CUBIT = .false.

# path to store the databases files
LOCAL_PATH = ./OUTPUT_FILES/DATABASES_MPI

#-----------------------------------------------------------
#
# CPML
#
#-----------------------------------------------------------

# CPML perfectly matched absorbing layers
THICKNESS_OF_X_PML = 12.3d0
THICKNESS_OF_Y_PML = 12.3d0
THICKNESS_OF_Z_PML = 12.3d0

#-----------------------------------------------------------
#
# Domain materials
#
#-----------------------------------------------------------

# number of materials
NMATERIALS = 1
# define the different materials in the model as:
# #material_id #rho #vp #vs #Q_Kappa #Q_mu #anisotropy_flag #domain_id
# Q_Kappa : Q_Kappa attenuation quality factor
# Q_mu : Q_mu attenuation quality factor
# anisotropy_flag : 0 = no anisotropy / 1,2,... check the implementation in file aniso_model.f90
# domain_id : 1 = acoustic / 2 = elastic
1 2300.0 2800.0 1500.0 2444.4 300.0 0 2

#-----------------------------------------------------------
#
# Domain regions
#
#-----------------------------------------------------------

# number of regions
NREGIONS = 1
# define the different regions of the model as :
#NEX_XI_BEGIN #NEX_XI_END #NEX_ETA_BEGIN #NEX_ETA_END #NZ_BEGIN #NZ_END #material_id
1 36 1 36 1 16 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
0
0
0
0
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# number of interfaces
1
#
# We describe each interface below, structured as a 2D-grid, with several parameters :
# number of points along XI and ETA, minimal XI ETA coordinates
# and spacing between points which must be constant.
# Then the records contain the Z coordinates of the NXI x NETA points.
#
# interface number 1 (topography, top of the mesh)
.true. 2 2 0.0 0.0 1000.0 1000.0
interface1.txt
#
# for each layer, we give the number of spectral elements in the vertical direction
#
# layer number 1 (top layer)
16
Loading

0 comments on commit 2d660ed

Please sign in to comment.