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.
https://specfem.org
GNU General Public License v3.0
204 stars 147 forks source link

outputs for the Gaussian, its first derivative, and second derivative appear same from the two layered 1D seismic model #1240

Open samyog111 opened 1 month ago

samyog111 commented 1 month ago

I am currently working on a one-dimensional, two-layered seismic model using SPECfem2D and encountering some issues. Despite verifying that all parameters in the model are correctly set, the results I am getting do not align with the expected outcomes based on FLAC analyses. Specifically,I am using the Gaussian second derivative( Ricker wavelet) as source time function. However, the outputs for the Gaussian, its first derivative, and second derivative appear identical, which seems unusual. Please review my attached source and parameter files to identify any potential errors? Par_file.txt SOURCE.txt

danielpeter commented 1 month ago

please add the console output as well, otherwise it's difficult to see where it fails and what you're trying to do?

as first, for reading your Par_file, you need to fix

PERIODIC_HORIZ_DIST             = 0.5.d0

to something like 0.5d0 instead.

then, with the current SOURCE setting

time_function_type              = 8

you use your own source time function his-wave.dat.

so, there is no "internal" Gaussian functions to take, but you're overwriting the source time function with your own external file data. and as a suggestion, verify that the plot_source_time_function.txt in the OUTPUT_FILES/ folder is your expected STF.

sorry, I missed that your use initialfield in the Par_file (which I found out after being able to run your setup with some mimic files). the initialfield setting will further overwrite the source settings and use an analytical solution from Aki & Richards as input field. there is no STF to choose from as it's coming from the initial field solution, and the STF setting from the SOURCE will be ignored...

samyog111 commented 1 month ago

I am currently working on a problem related to one-dimensional seismic wave propagation through a two-layered geological medium. I have successfully simulated this case using FLAC, where I assigned the different parameters, applied Ricker's wavelet at the model's base, recorded seismic responses (velocities) at various depths, and analyzed the output data. This FLAC setup provides valuable insights into how different soil layers affect seismic wave behavior.

Similarly, I am attempting to replicate this model in Specfem2D with similar parameters, boundary conditions, and source functions. However, I am encountering discrepancies in the results between Specfem2D and FLAC. In the FLAC model, I utilized free field boundary conditions on the left and right sides and absorbing boundary conditions at the bottom. I also applied time dependent shear stress shaped by the Ricker wavelet at the model's base. I suspect that the differences in results might come from incorrect boundary conditions or source function assignments in Specfem2D. Could you provide guidance on ensuring that the Specfem2D settings correctly mirror those in FLAC? This would help resolve the inconsistencies in the simulation results. Attached are the results from the FLAC and Specfem2D for your review. FLAC results 1 2 3 1- FLAC seismic model 2- Velocity time series at base 3- Velocity time series at top

forward_image000000005 1

Specfem2D results: 1- Specfem2D model 2- Velocity time series at top

danielpeter commented 1 month ago

try using a finer mesh gridding and see if that helps resolving the STF.

regarding the boundary conditions, you have PML and Stacey as options for ABCs. to see whether your recording is affected by those you can also look at the jpeg image outputs.

samyog111 commented 1 month ago

Thank you for your insightful comments regarding the source settings and finer meshing in the simulation setup. Regarding your note on the initialfield setting in the Par_file, it's clear now that it overwrites the source settings with an analytical solution from Aki and Richards, thus ignoring our STF settings. Could you advise if there is an alternative to using the initial field conditions that would allow us to set plane waves in the model, specifically utilizing the Ricker (second Gaussian derivative) source time function?Specifically, I am interested in assigning plane waves in the model that utilize the Ricker function.

Also, I have tried using a finer mesh as you suggested, but unfortunately, the results remain similar and inaccurate.

danielpeter commented 1 month ago

the initialfield solution uses a Ricker wavelet already, with the Ricker wavelet implemented by:

  a = pi*pi*f0*f0

! Ricker, i.e. second derivative of a Gaussian
  ricker_Bielak_displ = (1 - 2*a*t**2)*exp(-a*t**2)

you would need to check if that is the same Ricker definition as used by the other software.

and if finer gridding leads to the same solution, then you're resolving the source frequencies correctly. that is, you're simulation setup is fine and the solution is what you get with SEM modeling.

samyog111 commented 1 month ago

Thank you for the suggestions. I have one more question. Is there an alternative to using the initial field option for assigning plane waves in the model, while still utilizing the Ricker (second Gaussian derivative) source time function? So,I am trying to assign the source to multiple points at the base of the model using a vector for the location, rather than specifying a single point source in the SOURCE file. Could you advise on how I can do this within the Source_file in SPECfem2D?

danielpeter commented 1 month ago

unfortunately, there are not other input parameter options for plane waves.

in principle you could try to set many point sources at the bottom to mimick the effect of a plane wave. you would just add more source entries in the DATA/SOURCE file, all at slightly shifted positions. however, that has its limitations due to boundary reflections and seems a bit tricky for your "thin" model setup.

samyog111 commented 1 month ago

I appreciate your previous advice on setting up multiple point sources at the bottom of the model to mimic plane waves. This approach has significantly improved the simulation consistency between FLAC and Specfem2D, particularly in matching the wave shapes. However, I have observed that the amplitude values from Specfem2D are consistently higher than those from FLAC, which leads me to suspect an issue with the 'factor' setting in the source time function especially (Rickers wavelet-second derivative).

In FLAC, I applied stress at the base of the model using a Ricker wavelet pattern. To align SPECfem2D more closely with FLAC, I am considering adjusting the 'factor' in the source time function to dynamically represent stress values for different timesteps. Is it feasible to use a data file to specify the 'factor' values throughout the simulation?

Moreover, I attempted to implement this by using source function type 8 and linking a .dat file. Unfortunately, it seems that the simulation is not properly recognizing this .dat file(his1D-sxy.dat). I have attached the SOURCE file and the problematic .dat file for your review. Could you please examine these and advise on any potential errors?

his1D-sxy.txt(note:his1D-sxy and interface file is in .dat form in my simulation) interfaces_elastic_analytic.txt Par_file.txt SOURCE.txt

samyog111 commented 1 month ago

Following the above message on aligning the amplitude responses between FLAC and SPECfem2D simulations, I have implemented the method of using multiple point sources at the base of the model and stress value as a factor to approximate plane waves. This approach worked well.

However, the amplitude values, particularly X-velocities from SPECfem2D are higher (1.25 times) than those from FLAC. Can you please advise me on these higher values?

danielpeter commented 1 month ago

what is the issue with the source time function file his1D-sxy.dat?

having it in your work folder, it should get read in. note that the file path is relative to where you run the solver, so if you run it in a directory folder say my-run/, then your setup with $ ls my-run/* would look like

./his1D-sxy.dat

./DATA:
Par_file
SOURCE
interfaces_elastic_analytic.dat

./bin:
xmeshfem2D
xspecfem2D

regarding the amplitudes, that depends on your STF file again: his1D-sxy

and the amplification factor specified in the SOURCE file:

## Amplification (factor to amplify source time function)
factor                          = 2.0d0        # amplification factor

i'm afraid that you'll have to figure out a way how this translates to the FLAC source time function.

samyog111 commented 1 month ago

I wanted to express my sincere thanks for all your help with my SPECfem2D setup. I am happy to report that I have successfully replicated the same results as I got with FLAC using SPECfem2D for 1D model and I have attached the result herewith. Your suggestions regarding the boundary conditions and source functions were invaluable.

I now want to apply the Standard Linear Solid (SLS) mechanism (Zener damping) in my model. However, I encountered a message indicating that I cannot apply the Zener model to SH (shear-horizontal) propagating waves, and that it should be applied to either P (primary) or SV (shear-vertical) waves. Could you please advise me on how I can implement Zener damping correctly for my model?

Results 1

samyog111 commented 1 month ago

P.S The errors show that attenuation and anisotropy cannot be applied to SH waves. We need to set P.Sv option as true.