SPEED
MAKE_RAYLEIGH_COEFFICIENTS.f90
Go to the documentation of this file.
1! Copyright (C) 2012 The SPEED FOUNDATION
2! Author: Ilario Mazzieri
3!
4! This file is part of SPEED.
5!
6! SPEED is free software; you can redistribute it and/or modify it
7! under the terms of the GNU Affero General Public License as
8! published by the Free Software Foundation, either version 3 of the
9! License, or (at your option) any later version.
10!
11! SPEED is distributed in the hope that it will be useful, but
12! WITHOUT ANY WARRANTY; without even the implied warranty of
13! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14! Affero General Public License for more details.
15!
16! You should have received a copy of the GNU Affero General Public License
17! along with SPEED. If not, see <http://www.gnu.org/licenses/>.
18
31
32
33
34 subroutine make_rayleigh_coefficients(nmat, A0_ray, A1_ray, prop_mat, QS, f_val, mpi_id)
35
36
37 implicit none
38
39
40 integer*4 :: nmat, mpi_id, im, i, j, k
41
42
43 real*8 :: f_val, fmin, fmax, esp1, esp2, deltax, &
44 rho, lambda, mu, vp2, vs2, pi
45
46 real*8 :: prop_mat(nmat,4), qs(nmat), csi(nmat),&
47 a0_ray(nmat), a1_ray(nmat)
48
49 pi = 4.d0*datan(1.d0);
50
51 csi =1./(2*qs);
52
53
54 if (f_val .le. 10) then
55 fmin = 0.05d0; !fmax = 5.d0;
56 elseif(f_val .le. 100) then
57 fmin = 5.d0; !fmax = 100.d0;
58 elseif(f_val .le. 1000) then
59 fmin = 50.d0; !fmax = 1000.d0;
60 elseif(f_val .le. 10000) then
61 fmin = 500.d0; !fmax = 10000.d0;
62 elseif(f_val .le. 100000) then
63 fmin = 5000.d0; !fmax = 100000.d0;
64 endif
65
66 fmax=100*fmin;
67
68 if(mpi_id .eq. 0) then
69 write(*,*) 'Frequency range where Quality Factor is assumed to be constant is:'
70 write(*,*) 'FMIN =' ,fmin, ' FMAX =', fmax;
71 endif
72
73
74
75 do im = 1, nmat
76
77
78 a0_ray(im) = csi(im)* 4.*pi*fmin*fmax/(fmin+fmax);
79 a1_ray(im) = csi(im)/(pi*(fmin+fmax));
80
81
82 if(mpi_id .eq. 0) then
83 write(*,*) 'RAYLEIGH COEFFICIENTS FOR MATERIAL ', im, ' ARE '
84 write(*,*) 'A0 = ', a0_ray(im)
85 write(*,*) 'A1 = ', a1_ray(im)
86 write(*,*) '----------------------------------------------------'
87 endif
88
89 enddo
90
91 return
92
93 end subroutine make_rayleigh_coefficients