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 or not).
GNU General Public License v3.0
407 stars 226 forks source link

PML thickness #1374

Open flimberg opened 4 years ago

flimberg commented 4 years ago

Dear all,

i am facing problems with totally absorbing boundaries for my model. Can somebody give recommendations concerning the thickness of the PML?

Theoretical example: My model ist 6000m long (50m cellsize), source (vertical) is a 1Hz Ricker Wavelet positioned at the surface and Vp=2300m/s, Vs=1500m/s. Free surface is used. What could be a good thickness for the PML to absord the wave at the boundaries?

Thanks a lot;) Stay healthy.

kaoutar2222 commented 4 years ago

Dear schlimber,

You can use the code "add__CPML_layers_to_an_existing_mesh" and choose the option "compute the size of the PML elements to add automatically using the average size of edge elements" and the code will generate for you the thickness that you can use for your model. I hope that this answers your question. I am facing another problem when I try to use the code "xconvert_external_layers_of_a_given_mesh_to_CPML_layers" when I am using a free surface at the top of the model. The code generates a " free_or_absorbing_surface_file_zmax" file which contains only "0" as a value. And then when I try to execute the specfem3d code, it generates the error " wrong or empty definition of upper surface of the mesh in file free_or_absorbing_surface_file_zmax" Can please anyone help me with that ?

Thanks a lot :) Have a good day.

flimberg commented 4 years ago

Thanks for the quick answer. Unfortunately i receive an error. Not during using the script itself, but with the solver afterwards. Maybe i can solve the problem soon. Concerning the thickness of the layers, "add__CPML_layers_to_an_existing_mesh" calculates actually same sizes that i normally used for my simulations (3-4 element size). But still, i get reflections at the boundaries using the recommended sizes.

To you problem, using "xconvert_external_layers_of_a_given_mesh_to_CPML_layers": I save the original "free_or_absorbing_surface_file_zmax" file and replace the wrong output of the "xconvert_external_layers_of_a_given_mesh_to_CPML_layers" script after converting the layers of the given mesh ;) this worked for me.

Best

kaoutar2222 commented 4 years ago

Thank you for your answer. I did what you recommended me to do, (replaced the free_or_absorbing_surface_file_zmax, with the one I had before using the cpml code). However after I ran the xgenerate_databases i received the error :
error element face midpoint distance: 3.4609373E+10 - edge length: 5.4250000E+10 tolerance: 5.4250004E+07 Do you have any idea how i can fix that ?

Thank you, Have a nice day

flimberg commented 4 years ago

Sorry, i have no solution for this specific error, but the numbers seem to be really high (edge length of 5E+10 ?)

Just to be sure about the steps i do to get the mesh:

  1. make a mesh in cubit/trelis and export to specfem format (see SPECFEM manual)
  2. back up the generated free_or_absorbing_surface_file_zmax file in the MESH-folder
  3. execute the "xconvert_external_layers_of_a_given_mesh_to_CPML_layers" script in the MESH folder and give desired PML thickness etc.
  4. delete the new generated free_or_absorbing_surface_file_zmax file (the bad one with the "0") and take the backup file instead.

By this, the database generation is working for me, since the surface file is the original one from the cubit to specfem conversion ;) Hope this helps?!

Best regards