I’m trying to run a model with topology and CPML in SPECFEM3D_Cartesian.But some problems came to me when I was run database generation. The error is as follow:
error element face midpoint distance : 6.640625E-02 594.957275
This problem has been bothering me for a long time. Maybe the edge curve is too fluctuating? Could you please help me to figure out how to solve this problem?
I also have the same problem
when I mesh a very small scale mesh model,
for example 4x4km 192x192 maybe ok
but 256x256 I will receive the error like this
Does anyone know what’s this error mean?
I am not an expert in the code, but have run into similar issues in the past (i.e., similar error invoking the element face midpoint distance). How I ultimately was able to get around the problem was by changing the TOL_DIST variable in specfem3d/src/shared/get_element_face.f90. This value is typically set to 1.e-4, which I found was too small for the higher resolution topography meshes I was building. Changing this value to 1.e-3 fixed the error and (seemingly) did not cause any instabilities in the code or my outputs.
So I would suggest trying to increase your TOL_DIST value, and seeing if that avoids the error.
Hello,
I just started using specfem3d, and I want to simulate wave propagation on a homogenous medium with 5 sides PML and a free surface at the top of the model.
But I am facing a problem with it : when I use the codes “xadd_CPML_layers_to_an_existing_mesh” and “xconvert_external_layers_of_a_given_mesh_to_CPML_layers” it generates a “free_or_absorbing_surface_file_zmax” which contains only “0” value.
What I did, is replace it with the “free_or_absorbing_surface_file_zmax” that I had before using the CPML codes.
But when I ran the xspecfem3d code, I have the error :
error element face midpoint distance: 3.4609373E+10 - edge length:
5.4250000E+10 tolerance: 5.4250004E+07
I tried to change the TOL_DIST variable like you said, but it didn’t work for me.
Do you have an idea on how I can fix this problem ?
Unfortunately, I have never been able to successfully run Specfem using PML boundary conditions, so I cannot directly address your issue. One important thing, though: I do not think the free_or_absorbing_surface_file_zmax would be the same between the CPML and original version of your mesh. The node and element ID’s do not stay the same between the two meshes, so the values listed in the free surface file for one will be different from the values listed in the other. I think your best bet would be to try and figure out why “xadd_CPML_layers_to_an_existing_mesh” and “xconvert_external_layers_of_a_given_mesh_to_CPML_layers” are not producing a proper free surface file. Or, if your mesh is not too complicated and does not have topography, you may be able to write a script yourself to find the ID’s of nodes and elements at the top surface of the PML mesh and writes a free surface file.
Finally the cpml worked for me.
It actually works when I enter the pml thickness manually, but not when I use the code “add__CPML_layers_to_an_existing_mesh”.
In another subject, do you know how to implement a pressure source in an acoustic or elastic domain using SPECFEM3D ?
I have read the manual, but I only find FORCESOLUTION or CMTSOLUTION sources.