Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unknown time function #144

Open
Navids94 opened this issue Oct 29, 2022 · 10 comments
Open

unknown time function #144

Navids94 opened this issue Oct 29, 2022 · 10 comments

Comments

@Navids94
Copy link

Hi,
I want to know why I get the following error:
Warning: ignoring block line option '
unknown time function: GaussianInt
using default RickerInt function.

I used another time function but I received this error in output again.

@andersp
Copy link
Contributor

andersp commented Nov 9, 2022

@Navids94 Could you provide your input file so we can take a look? Also, which version of sw4 are you using?

@Navids94
Copy link
Author

@andersp Thank you so much. I used sw4-v2.01.

grid x=69e3 y=42e3 z=27e3 h=347

attenuation nmech=3 phasefreq=1 maxfreq=1

refinement zmax=4500
refinement zmax=2100
refinement zmax=900
refinement zmax=300

time t=120

supergrid gp=30

#Crustal model
block vp=5888 vs=3400 rho=2693 Qp=1000 Qs=500
block vp=5906 vs=3410 rho=2696 Qp=1000 Qs=500 z1=2e3
block vp=5923 vs=3420 rho=2700 Qp=1000 Qs=500 z1=4e3
block vp=6165 vs=3560 rho=2753 Qp=1000 Qs=500 z1=8e3
block vp=6200 vs=3580 rho=2761 Qp=1000 Qs=500 z1=12e3
block vp=6235 vs=3600 rho=2769 Qp=1000 Qs=500 z1=14e3
block vp=6269 vs=3620 rho=2777 Qp=1000 Qs=500 z1=16e3
block vp=6400 vs=3710 rho=2808 Qp=1000 Qs=500 z1=17e3
block vp=6250 vs=3647 rho=2772 Qp=1000 Qs=500 z1=23e3 z2=27e3

#Basin model
block vp=1380 vs=178 rho=1600 Qp=185 Qs=185 x1=12.145e3 x2=19.101e3 y1=23.905e3 y2=29.853e3
block vp=1380 vs=219 rho=1600 Qp=185 Qs=185 x1=12.145e3 x2=19.101e3 y1=23.905e3 y2=29.853e3 z1=25
block vp=1380 vs=278 rho=1600 Qp=185 Qs=185 x1=12.145e3 x2=19.101e3 y1=23.905e3 y2=29.853e3 z1=50
block vp=1380 vs=320 rho=1600 Qp=185 Qs=185 x1=12.145e3 x2=19.101e3 y1=23.905e3 y2=29.853e3 z1=75 z2=100

source x=56.855e3 y=12.145e3 z=14.5e3 strike=306 rake=94 dip=41 m0=1.32e+16 type=Gaussian freq=2.5132 t0=15

prefilter fc2=1 type=lowpass passes=2 order=2

rec x=18838 y=24822 z=0 file=Kinburn-JSBS variables=velocity nsew=1 usgsformat=1 sacformat=0
rec x=13062 y=26418 z=0 file=Kinburn-JSSS variables=velocity nsew=1 usgsformat=1 sacformat=0

@andersp
Copy link
Contributor

andersp commented Nov 14, 2022

Your case seems to run just fine using sw4 v.3.0 and I recommend you update your installation of sw4. As currently configured, your case uses about 128 million grid points and the time step is 0.00369402 sec. You will need to take about 32,500 time steps to get to t=120 sec. Note that the first line in our basin model extends all the way to the bottom of the domain. This leads to very poor resolution of the wave field on the coarser grids:
***** PPW = minVs/h/maxFrequency ********
g=0, h=3.470000e+02, minVs/h=0.801153 (Cartesian)
g=1, h=1.735000e+02, minVs/h=1.60231 (Cartesian)
g=2, h=8.675000e+01, minVs/h=3.20461 (Cartesian)
g=3, h=4.337500e+01, minVs/h=6.40922 (Cartesian)
g=4, h=2.168750e+01, minVs/h=8.20749 (Cartesian)
To resolve motions to 1 Hz, you want minVs/h >= 8 in all grids.

@Navids94
Copy link
Author

@andersp Thank you very much for your help. Could you please provide me with the link to the latest version for installation?

I have just a basin model for the top 100m with limited dimensions but when I try to use the lower(z2) and upper(z1) bound:
#Crustal model
block vp=5888 vs=3400 rho=2693 Qp=1000 Qs=500 z1=0 z2=2e3
block vp=5906 vs=3410 rho=2696 Qp=1000 Qs=500 z1=2e3 z2=4e3
block vp=5923 vs=3420 rho=2700 Qp=1000 Qs=500 z1=4e3 z2=8e3
block vp=6165 vs=3560 rho=2753 Qp=1000 Qs=500 z1=8e3 z2=12e3
block vp=6200 vs=3580 rho=2761 Qp=1000 Qs=500 z1=12e3 z2=14e3
block vp=6235 vs=3600 rho=2769 Qp=1000 Qs=500 z1=14e3 z2=16e3
block vp=6269 vs=3620 rho=2777 Qp=1000 Qs=500 z1=16e3 z2=17e3
block vp=6400 vs=3710 rho=2808 Qp=1000 Qs=500 z1=17e3 z2=23e3
block vp=6250 vs=3647 rho=2772 Qp=1000 Qs=500 z1=23e3 z2=27e3

#Basin model
block vp=1380 vs=178 rho=1600 Qp=185 Qs=185 x1=12.145e3 x2=19.101e3 y1=23.905e3 y2=29.853e3 z1=0 z2=25
block vp=1380 vs=219 rho=1600 Qp=185 Qs=185 x1=12.145e3 x2=19.101e3 y1=23.905e3 y2=29.853e3 z1=25 z2=50
block vp=1380 vs=278 rho=1600 Qp=185 Qs=185 x1=12.145e3 x2=19.101e3 y1=23.905e3 y2=29.853e3 z1=50 z2=75
block vp=1380 vs=320 rho=1600 Qp=185 Qs=185 x1=12.145e3 x2=19.101e3 y1=23.905e3 y2=29.853e3 z1=75 z2=100

I got following error:

----------- Material properties ranges ---------------
-1.00000000e+00 kg/m^3 <= Density <= 2.99300000e+03 kg/m^3
1.00000000e+00 m/s <= Vp <= 5.98800000e+03 m/s
1.00000000e+00 m/s <= Vs <= 3.51000000e+03 m/s
1.00000000e+00 <= Vp/Vs <= 7.75280899e+00
-1.00000000e+00 Pa <= mu <= 3.68740593e+10 Pa
1.00000000e+00 Pa <= lambda <= 3.35693204e+10 Pa
Using attenuation
-1.00000000e+00 <= Qs <= 5.00000000e+02
-1.00000000e+00 <= Qp <= 1.00000000e+03
------------------------------------------------------
Fatal input error: Density= -1.00000000e+00 in grid g= 0 at point (-2,35,89)
Fatal input error: Density= -1.00000000e+00 in grid g= 0 at point (-2,53,89)
Fatal input error: Density= -1.00000000e+00 in grid g= 0 at point (-2,71,89)
Fatal input error: Density= -1.00000000e+00 in grid g= 0 at point (44,-2,89)
Fatal input error: Density= -1.00000000e+00 in grid g= 0 at point (44,53,89)
Fatal input error: Density= -1.00000000e+00 in grid g= 0 at point (-2,-2,89)
Fatal input error: Density= -1.00000000e+00 in grid g= 0 at point (44,17,89)
Fatal input error: Density= -1.00000000e+00 in grid g= 0 at point (44,35,89)
Fatal input error: Density= -1.00000000e+00 in grid g= 0 at point (-2,17,89)
Fatal input error: Density= -1.00000000e+00 in grid g= 0 at point (44,71,89)

MPI_ABORT was invoked on rank 1 in communicator MPI_COMM_WORLD
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.

@andersp
Copy link
Contributor

andersp commented Nov 14, 2022

Version 3.0-beta is available from https://github.com/geodynamics/sw4 under releases.
The material model must be defined at all grid points in the model, including 2 ghost points above the top grid and below the bottom grid. So you need to leave out z1=0 in the top line of the crustal and basin models and leave out z2=27e3 in the bottom line of the crustal model;

@Navids94
Copy link
Author

@andersp Thank you so much for sharing it. I installed this version. In spite of my efforts, I have not been able to resolve the issue since last week.
For basin model I have 4 range: Vs(0-25m)= 178m/s, Vs(25-50m)=219m/s, Vs(50-75)=278 and for Vs(75-100)=320.
I used following lines based on your suggestion:

grid x=36e3 y=36e3 z=40e3 h=400

time t=5

supergrid gp=30

attenuation nmech=3 phasefreq=2.5 maxfreq=1

refinement zmax=2000
refinement zmax=5000

#Crustal model
block vp=5888 vs=3400 rho=2693 Qp=1000 Qs=500 z1=0
block vp=5906 vs=3410 rho=2696 Qp=1000 Qs=500 z1=2000 z2=4000
block vp=5923 vs=3420 rho=2700 Qp=1000 Qs=500 z1=4000 z2=8000
block vp=6165 vs=3560 rho=2753 Qp=1000 Qs=500 z1=8000 z2=12000
block vp=6200 vs=3580 rho=2761 Qp=1000 Qs=500 z2=40000

#Basin model
block vp=1380 vs=178 rho=1600 Qp=185 Qs=185 x1=15.145e3 x2=16.101e3 y1=15.905e3 y2=16.853e3 z1=0
block vp=1380 vs=219 rho=1600 Qp=185 Qs=185 x1=15.145e3 x2=16.101e3 y1=15.905e3 y2=16.853e3 z1=25 z2=50
block vp=1380 vs=278 rho=1600 Qp=185 Qs=185 x1=15.145e3 x2=16.101e3 y1=15.905e3 y2=16.853e3 z1=50 z2=75
block vp=1380 vs=320 rho=1600 Qp=185 Qs=185 x1=15.145e3 x2=16.101e3 y1=15.905e3 y2=16.853e3 z2=100

But I got following error again(considered wrong Vs for layers):
Warning: ignoring block line option ''
      Warning: ignoring block line option ''

----------- Material properties ranges ---------------
1.60000000e+03 kg/m^3 <= Density <= 2.76100000e+03 kg/m^3
1.38000000e+03 m/s <= Vp <= 6.20000000e+03 m/s
1.78000000e+02 m/s <= Vs <= 3.58000000e+03 m/s
1.73176471e+00 <= Vp/Vs <= 7.75280899e+00
5.06944000e+07 Pa <= mu <= 3.53860804e+10 Pa
2.71936000e+09 Pa <= lambda <= 3.53606792e+10 Pa
Using attenuation
1.85000000e+02 <= Qs <= 5.00000000e+02
1.85000000e+02 <= Qp <= 1.00000000e+03
------------------------------------------------------

***** PPW = minVs/h/maxFrequency ********
g=0, h=4.000000e+02, minVs/h=0.445 (Cartesian)
g=1, h=2.000000e+02, minVs/h=0.89 (Cartesian)
g=2, h=1.000000e+02, minVs/h=1.78 (Cartesian)

*** Attenuation parameters calculated for 3 mechanisms,
max freq=1.000000e+00 [Hz], min_freq=1.000000e-02 [Hz], velo_freq=2.500000e+00 [Hz]

@andersp
Copy link
Contributor

andersp commented Nov 16, 2022

@Navids94 The machine you are running sw4 on, what operating system is it using? Are you preparing the input file on some other machine with a different operating system? Did you test your installation with pytest/test_sw4.py ? Do test_sw4.py --help for instructions.
Also, your block commands are not setup properly. Right now, the last block command for the basin will override all previous ones. Same with the crustal model. Read the user's guide for detailed instructions.

@Navids94
Copy link
Author

@andersp Thank you so much for your suggestions.
I use supercomputer Canada(Linux). 2 of 48 tests failed, but rest ran ok.
I used following lines and resolved my problem:
grid x=69e3 y=42e3 z=27e3 h=347
time t=0.1
supergrid gp=30

attenuation nmech=3 phasefreq=2.5 maxfreq=1

refinement zmax=4500
refinement zmax=2100
refinement zmax=900
refinement zmax=300

#Crustal model
block vp=6250 vs=3647 rho=2772 Qp=1000 Qs=500 (# for depth of 23km to 27km(end of computational domain) )
block vp=5888 vs=3400 rho=2693 Qp=1000 Qs=500 z1=0 z2=2000
block vp=5906 vs=3410 rho=2696 Qp=1000 Qs=500 z1=2000 z2=4000
block vp=5923 vs=3420 rho=2700 Qp=1000 Qs=500 z1=4000 z2=8000
block vp=6165 vs=3560 rho=2753 Qp=1000 Qs=500 z1=8000 z2=12000
block vp=6200 vs=3580 rho=2761 Qp=1000 Qs=500 z1=12000 z2=14000
block vp=6235 vs=3600 rho=2769 Qp=1000 Qs=500 z1=14000 z2=16000
block vp=6269 vs=3620 rho=2777 Qp=1000 Qs=500 z1=16000 z2=17000
block vp=6400 vs=3710 rho=2808 Qp=1000 Qs=500 z1=17000 z2=23000

#Basin model
block vp=1380 vs=178 rho=1600 Qp=185 Qs=185 x1=12.145e3 x2=19.101e3 y1=23.905e3 y2=29.853e3 z1=0 z2=25
block vp=1380 vs=219 rho=1600 Qp=185 Qs=185 x1=12.145e3 x2=19.101e3 y1=23.905e3 y2=29.853e3 z1=25 z2=50
block vp=1380 vs=278 rho=1600 Qp=185 Qs=185 x1=12.145e3 x2=19.101e3 y1=23.905e3 y2=29.853e3 z1=50 z2=75
block vp=1380 vs=320 rho=1600 Qp=185 Qs=185 x1=12.145e3 x2=19.101e3 y1=23.905e3 y2=29.853e3 z1=75 z2=100

source x=56.855e3 y=12.145e3 z=14.5e3 strike=306 rake=94 dip=41 m0=1.32e+16 type=Gaussian freq=2.5132 t0=15

And I got this one(attached):

Total number of grid points (without ghost points): 1.25586e+08

      Warning: ignoring block line option ''
Block 1 has bounds -6.90530000e+04 1.38106000e+05 -4.23340000e+04 8.46680000e+04 -1.00000000e+10 1.00000271e+10
Block 2 has bounds -6.90530000e+04 1.38106000e+05 -4.23340000e+04 8.46680000e+04 0.00000000e+00 2.00000000e+03
      Warning: ignoring block line option ''
Block 3 has bounds -6.90530000e+04 1.38106000e+05 -4.23340000e+04 8.46680000e+04 2.00000000e+03 4.00000000e+03
Block 4 has bounds -6.90530000e+04 1.38106000e+05 -4.23340000e+04 8.46680000e+04 4.00000000e+03 8.00000000e+03
      Warning: ignoring block line option ''
Block 5 has bounds -6.90530000e+04 1.38106000e+05 -4.23340000e+04 8.46680000e+04 8.00000000e+03 1.20000000e+04
Block 6 has bounds -6.90530000e+04 1.38106000e+05 -4.23340000e+04 8.46680000e+04 1.20000000e+04 1.40000000e+04
Block 7 has bounds -6.90530000e+04 1.38106000e+05 -4.23340000e+04 8.46680000e+04 1.40000000e+04 1.60000000e+04
Block 8 has bounds -6.90530000e+04 1.38106000e+05 -4.23340000e+04 8.46680000e+04 1.60000000e+04 1.70000000e+04
Block 9 has bounds -6.90530000e+04 1.38106000e+05 -4.23340000e+04 8.46680000e+04 1.70000000e+04 2.30000000e+04
Block 10 has bounds 1.21450000e+04 1.91010000e+04 2.39050000e+04 2.98530000e+04 0.00000000e+00 2.50000000e+01
Block 11 has bounds 1.21450000e+04 1.91010000e+04 2.39050000e+04 2.98530000e+04 2.50000000e+01 5.00000000e+01
Block 12 has bounds 1.21450000e+04 1.91010000e+04 2.39050000e+04 2.98530000e+04 5.00000000e+01 7.50000000e+01
Block 13 has bounds 1.21450000e+04 1.91010000e+04 2.39050000e+04 2.98530000e+04 7.50000000e+01 1.00000000e+02

Material properties ranges ---------------
1.60000000e+03 kg/m^3 <= Density <= 2.80800000e+03 kg/m^3
1.38000000e+03 m/s <= Vp <= 6.40000000e+03 m/s
1.78000000e+02 m/s <= Vs <= 3.71000000e+03 m/s
1.71373732e+00 <= Vp/Vs <= 7.75280899e+00
5.06944000e+07 Pa <= mu <= 3.86495928e+10 Pa
2.71936000e+09 Pa <= lambda <= 3.77164944e+10 Pa
Using attenuation
1.85000000e+02 <= Qs <= 5.00000000e+02
1.85000000e+02 <= Qp <= 1.00000000e+03

***** PPW = minVs/h/maxFrequency ********
g=0, h=3.470000e+02, minVs/h=9.82709 (Cartesian)
g=1, h=1.735000e+02, minVs/h=19.5965 (Cartesian)
g=2, h=8.675000e+01, minVs/h=39.1931 (Cartesian)
g=3, h=4.337500e+01, minVs/h=78.3862 (Cartesian)
g=4, h=2.168750e+01, minVs/h=8.20749 (Cartesian)

Assigning SG arrays: standard case with default epsL

*** Attenuation parameters calculated for 3 mechanisms,
max freq=1.000000e+00 [Hz], min_freq=1.000000e-02 [Hz], velo_freq=2.500000e+00 [Hz]

As I need 1Hz and the top and bottom frequencies are correct, but the mid-layer frequencies are higher than 1Hz(for example for g=2 minVs/h/1hz=39.19 so we have ppw=39.19 but ppw should be less than 12 . Are there any problems?
Also, if I use type=Gaussian and variables=velocity, will the program give me acceleration?
Thank you for taking time to read this

test.txt

@andersp
Copy link
Contributor

andersp commented Nov 19, 2022

Now I understand where the warnings come from: you can not add a comment on the same line as a command. Comments must be on separate lines, starting with the "#" character. Also, the way you have specified the block commands is still dubious. For verification, I recommend you use the image command to save a couple of vertical slices of your material model. It is always a good idea to start with a coarse mesh without any refinement commands to first verify that the model is correct. Then gradually add the refinement commands back in while checking the resolution.

@Navids94
Copy link
Author

@andersp Thank you so much. I did not use any comment when I was trying.
My problem was solved:
g=0, h=3.470000e+02, minVs/h=9.85591 (Cartesian)
g=1, h=1.735000e+02, minVs/h=19.6542 (Cartesian)
g=2, h=8.675000e+01, minVs/h=39.1931 (Cartesian)
g=3, h=4.337500e+01, minVs/h=78.3862 (Cartesian)
g=4, h=2.168750e+01, minVs/h=8.20749 (Cartesian)
Attenuation parameters calculated for 3 mechanisms,
max freq=1.000000e+00
Considering that I need 1Hz and the top(g=4 ppw=minVs/h/fmax=8.20749) and bottom(g=0 ppw=minVs/h/fmax=9.85591) have correct ppw (8<ppw<12)but in the mid-layer ppw are higher than 12 (for example, we have ppw=39.19 for g=2). Can these high values for PPW cause problems?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants