SPECFEM / specfem2d

SPECFEM2D simulates forward and adjoint seismic wave propagation in two-dimensional acoustic, (an)elastic, poroelastic or coupled acoustic-(an)elastic-poroelastic media, with Convolution PML absorbing conditions.
GNU General Public License v3.0
204 stars 147 forks source link

How to write attenuation parameters in external tomo file #1185

Open himansh78 opened 1 year ago

himansh78 commented 1 year ago

Hi, I am trying to implement Q_mu and Q_kappa values for the model defined using a tomo file. But I don't know how should I provide Q values in the tomo file. For starters, I have turned on the viscoelastic attenuation flag in the Par file- ATTENUATION_VISCOELASTIC = .true.

And I use the velocity model as-

1 -1 0 0 1.0 0 0 0 0 0 0 0 0 0 0

TOMOGRAPHY_FILE                 = ./DATA/tomo_file.xyz

I am writing tomo file using the createTomographyFile.py script in the utils directory of specfem2d repository

Please suggest on how can I include Qkappa and Qmu in tomo file?

Thanks in advance

danielpeter commented 1 year ago

well, specifying Q-values for variable attenuation coefficients in tomography files is not supported yet. thus, there is not much you can do with the python script.

for tomo models, the Q values for Qmu and Qkappa are set to 9999 - that is basically turning viscoelastic effects off even if the flag ATTENUATION_VISCOELASTIC would be on.

it wouldn't be much work though to add such capability in the code - just let me know if needed and I'll add something similar as in the SPECFEM3D version.

himansh78 commented 1 year ago

Hello Daniel, I appreciate your response and your suggestion sounds reasonable. If it's feasible, it would be highly beneficial to incorporate variable attenuation into the tomo file reading process. This would likely require modifying the read_external_model.f90 file to read supplementary columns from the tomo file. Please let me know whatever you decide.

Thanks again,

danielpeter commented 1 year ago

okay, added the feature with PR #1186 you can now add Qp and Qs values after the vp, vs, rho values in your tomo file

himansh78 commented 1 year ago

Great. Thanks @danielpeter . Just confirming, these are Qp and Qs and not the Qkappa and Qmu? Thanks,

danielpeter commented 1 year ago

yes, it is Qp and Qs values (same as in 3D_Cartesian version).

the Q-values are optional, thus the new line format becomes either:

! data line format
#x #z #vp #vs #rho

or with Q-values:

! new data line format
#x #z #vp #vs #rho #Qp #Qs

the code will convert those given Qp and Qs values internally into Qkappa and Qmu accordingly for attenuation.