# Problem Running SH Plane-Wave Simulations

**URL:** <https://community.geodynamics.org/t/problem-running-sh-plane-wave-simulations/1835>\
**Category:** SPECFEM\
**Tags:** specfem2d\
**Created:** [May 13, 2021, 4:59am UTC](https://community.geodynamics.org/t/problem-running-sh-plane-wave-simulations/1835 "2021-05-13T04:59:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Varun.Singla](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/varun.singla/32/783_2.png) [@Varun.Singla](https://community.geodynamics.org/u/Varun.Singla)\
**Post date:** [May 13, 2021, 4:59am UTC](https://community.geodynamics.org/t/problem-running-sh-plane-wave-simulations/1835/1 "2021-05-13T04:59:03Z")

</div>

Hi everyone!

I would like to run **plane-wave** simulations of **SH waves** in SPECFEM2D. As mentioned in its user manual, I set ‘P\_SV’ and ‘initialfield’ parameters in DATA/Par\_file to ‘.false.’ and ‘.true.’ respectively. Further, I set ‘source\_type’ parameter in DATA/SOURCE to ‘2’ to select the case of S wave. However, when I run the solver, I get weird simulations that do not correspond to SH plane-waves.

Can you please let me know where I am going wrong?

You may note that when I set ‘P\_SV’ parameter (in DATA/Par\_file) to ‘.true.’ and the remaining parameters same as above, I am able to successfully simulate propagation of SV plane-waves.

Thanks and Kind Regards,  
Varun Singla

Research Scientist,  
School of Earth Sciences, University College Dublin

---

<div class="post-metadata">

**Author:** ![dpeter](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/dpeter/32/227_2.png) [@dpeter](https://community.geodynamics.org/u/dpeter)\
**Post date:** [May 13, 2021, 4:33pm UTC](https://community.geodynamics.org/t/problem-running-sh-plane-wave-simulations/1835/2 "2021-05-13T16:33:23Z")

</div>

could you post your setup files (Par\_file, SOURCE) and the output to check? and how does it look when you would use source type 1 for your SH-wave simulations?

---

<div class="post-metadata">

**Author:** ![Varun.Singla](https://yyz2.discourse-cdn.com/flex036/user_avatar/community.geodynamics.org/varun.singla/32/783_2.png) [@Varun.Singla](https://community.geodynamics.org/u/Varun.Singla)\
**Post date:** [May 14, 2021, 6:25am UTC](https://community.geodynamics.org/t/problem-running-sh-plane-wave-simulations/1835/3 "2021-05-14T06:25:39Z")

</div>

> [@dpeter](#):
>
> could you post your setup files (Par\_file, SOURCE) and the output to check?

Sure. Being a new user, however, I am unable to append these files here and have thus uploaded these on Gdrive:

[Source\_type\_2\_files](https://drive.google.com/drive/folders/1sODVxSNd5jx0wsnIL3YJWUdXLetcFZjf?usp=sharing)

This is a segment of the output that I get in the terminal:

* * *

Preparing initial field for plane wave source  
Implementing an analytical initial plane wave…

\*\*\* calculation of the initial plane wave \*\*\*

To change the initial plane wave, change source\_type in DATA/SOURCE and use:  
1 or 4 - for a plane P wave  
2 or 5 - for a plane SV wave  
3 - for a Rayleigh wave  
6 - for a mode initial displacement

selected source\_type = 2  
anglesource = 0.17453292519943295

initial SV wave of 10.000000000000000 degrees introduced.

angle source = 0.17453292519943295

reflected convert plane wave angle: 22.459233779924258  
mesh dimensions:  
x min/max = 0.00000000 5000.00000  
z min/max = 0.00000000 5000.00000

Number of grid points = 160801

You can modify the location of the initial plane wave by changing xs and zs in DATA/SOURCE.  
for instance: xs= 2500.0000000000000 zs= 5000.0000000000000 (zs can/should be the height of the free surface)

Max norm of initial elastic displacement = 2.00748444

Preparing source time function  
time stepping scheme: Newmark  
time stepping stages: 1  
time step size : 1.00000005E-03

number of time steps: 3200  
initital field : T

Preparing image coloring  
allocating color image arrays  
locating all the pixels of color images  
total number of image pixels = 648830  
done locating all the pixels of color images  
coloring image background based on vp

done, preparation successful

* * *

The medium is homogeneous, elastic, and isotropic with width=height=8 km. Simulation is for right-travelling waves incident at an angle of 10 degrees. Ricker wavelet of frequency 6 Hz is chosen as source function. It appears from the above output that instead of incident SH plane-waves, SV plane-waves have been considered by SPECFEM2D. This is weird considering that I have set P\_SV=‘.false.’ in Par\_file.  
Below is a contour image of the displacements at an initial time-step, which also indicates that the case of an SH plane-wave has not been considered (there should be only 2 plane-waves: one incident and one reflected, whereas this image shows three).

 ![forward_image000000005](https://canada1.discourse-cdn.com/flex036/uploads/geodynamics/original/1X/adbf7b732e51fad10d151a76a5f3fdc8b7951015.jpeg)

> [@dpeter](#):
>
> and how does it look when you would use source type 1 for your SH-wave simulations?

It looks similar for source type 1, i.e., instead of incident plane SH waves, incident plane P waves are considered by SPECFEM2D. Weirdly enough, the output files correspond to displacement along only y-direction for both source type 1 and 2 (displacements for incident P and SV plane-waves should occur along x- and z-directions only).

Much thanks for taking the time to go through my files!  
Varun
