SPECFEM / specfem3d

SPECFEM3D_Cartesian simulates acoustic (fluid), elastic (solid), coupled acoustic/elastic, poroelastic or seismic wave propagation in any type of conforming mesh of hexahedra (structured & unstructured).
https://specfem.org
GNU General Public License v3.0
416 stars 231 forks source link

How to set up 1 D model #1414

Open viviantang33 opened 3 years ago

viviantang33 commented 3 years ago

As I understand, specfem3d provides three 1 D models (1d-prem, 1d-socal, and 1d-cascadia). I was wondering how to change the 1 D velocity model. I already prepared a file with Vp, Vs, density, and depth. Should I put this file under which folder and setup the input 1 D model as my model? or should I change the velocity model via Cubit or Paraveiw? Thank you in advance.

danielpeter commented 3 years ago

there are different ways to specify your input model. assuming you use the in-house mesher xmeshfem3D, for a simple homogeneous 1D model the easiest would be to define layer by layer in the DATA/meshfem3D_files/Mesh_Par_file:

..
# number of materials
NMATERIALS                      = <number_of_layers>
1  1200  1500  750  9999. 40.0  0  2    # layer1 properties
2  1400  1700  800  9999. 80.0  0  2    # layer2 properties
..
# number of regions
NREGIONS                        = <number_of_regions> # for 1D models, the same as number of materials above
#NEX_XI_BEGIN  #NEX_XI_END  #NEX_ETA_BEGIN  #NEX_ETA_END  #NZ_BEGIN #NZ_END  #material_id
1             -1            1              -1             1        <nz-layer1>        1
1             -1            1              -1             1        <nz-layer2>        1
..

if you feel more inclined to modify a fortran-subroutine, you could pick one of the routines src/generate_databases/model_1d_**, e.g., model_1d_socal.f90 modify it and set accordingly in Par_file:

MODEL = 1d_socal

this will impose the new 1D model properties onto the mesh. and then there is also the possibility to format your model as a tomographic model and use the tomo setting instead. the user manual in chapter 14 explains you more...