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
409 stars 228 forks source link

PML for heterogeneous media #1747

Open charlie-garcia opened 1 week ago

charlie-garcia commented 1 week ago

Hi,

I'm trying to use specfem for underwater bioacoustic problems and I cannot find a way to use PML for heterogeneous media. I'm meshing cubit.

A very simple example would be this: A half space fluid elastic half water (top) half elastic (bottom)

half_space

How do I set the PML across all boundaries? My simulations worked fine if I set only an acoustic medium with PMLs. However, I don't have any clue about PML in heterogeneous media. Especially if there's more than one acoustic or elastic medium at the boundaries or in the presence of different materials.

I was suggested that maybe @tianshi-liu, @casarotti or @danielpeter could give me a hand?

Thank you,

Carlos

tianshi-liu commented 6 days ago

Hi Carlos,

Thanks a lot for posting the issue. First of all, just hoping to confirm the meaning of "heterogeneous media", does it mean the existence of different types of media (e.g., acoustic and elastic) in your situation? Because in seismology, "heterogeneous" specifically means having non-uniform properties (e.g., seismic velocity varies with spatial locations).

I have never used PML in case of acoustic-elastic interface, but based on my understanding of how PML and acoustic-elastic interface work in SPECFEM, there should be no problem with having both acoustic and elastic elements and designating elements (either acoustic or elastic) as PML elements. SPECFEM handles acoustic and elastic elements (including their own PML memory variables) independently, and imposes the continuity condition weakly at the acoustic-elastic interface.

Have you tried running a simulation in the presence of both acoustic and elastic elements, and just setting elements as PML the same way you would do with purely acoustic/elastic simulations? If you haven't, could you please take a try and see if it works just fine? My guess is that everything has been handled well in the program. If you have tried and had problems, could you let us know specifically where did the problem occur (e.g., mesher / generate_databases / solver)? It would be always helpful if you could post the error message and the OUTPUTFILES/output*.txt file.

Let me know if there's any doubts.

Tianshi

charlie-garcia commented 5 days ago

Hi Tianshi,

Thank you for your quick response. And yes, by heterogeneous media I mean not only different acoustic-elastic media but also different media where density may vary (acoustic and/or elastic).

I'm working with Cubit to mesh my model. I've created manually the PML layers and all the respective flags (as stated in the documentation. In the homogeneous case, I tested an acoustic medium and it worked pretty well. I must also assign a material to the PML, so I set the same fluid properties.

Now, in my actual case, I have a heterogeneous medium segment coming from a CT scan, so at the boundaries I have different materials of different kinds. I can create PML layers and elements but then I don't know which material properties I must assign to the PML!

So far, I've tested two cases:

Case One: If I create the PML and I assign (within Cubit) the material properties of the fluid I do not have reflections for the acoustic media but I do for the elastic media. So I thought it was because of the impedance difference that I have such reflections and the PML is nor working propertly.

Case Two: I extruded the last layer, i.e. the mesh and the material properties at the boundaries to create the PML. So, there are different materials in the PML. This case does not work. The program stops at the generating databases step. The last log line is "maximum Vp in C-PML 3476."

I've attached the output_generate_databases_PML_error.txt for this case. I forgot to mention, I'm working with version specfem3d V.3

Thank you!

Carlos