1
-
!! Cone-shaped beam calculations for 3D acoustics
4
-
!! Provides cone formulas for 3D beam computations
14
#####
SUBROUTINE ConeFormulas2D( z_xx, z_xy, z_yy, nBdry, xs, tradial, xray, BotTop )
15
-
!! analytic formula for the conical seamount
17
-
REAL (KIND=8), INTENT( IN ) :: xs( 3 ), tradial( 2 ), xray( 2 )
18
-
CHARACTER (LEN=3), INTENT( IN ) :: BotTop ! Flag indicating bottom or top reflection
19
-
REAL (KIND=8), INTENT( OUT ) :: z_xx, z_xy, z_yy, nBdry( 2 )
20
-
REAL (KIND=8) :: nBdry3dCone( 3 ), theta, phi, Rray, Radius, x, y ! for cone reflection
22
#####
IF ( BotTop == 'BOT' ) THEN
23
#####
phi = 15 * DegRad ! 15 degree angle of seamount
24
#####
Rray = xray( 1 ) ! cylindrical range of ray from source
26
-
! get bearing from cone to ray using (x,y) coordinate of the ray
27
#####
x = xs( 1 ) + Rray * tradial( 1 )
28
#####
y = xs( 2 ) + Rray * tradial( 2 )
29
#####
theta = atan2( y, x )
31
#####
nBdry3dCone = [ -cos( theta ) * sin( phi ), -sin( theta ) * sin( phi ), cos( phi ) ]
33
-
! nBdry3dCone = -[ -cos( theta ) * tan( phi ), -sin( theta ) * tan( phi ), 1.0D0 ]
34
-
! nBdry3dCone = -[ ray2D( is )%x( 1 ), ray2D( is )%x( 2 ), -1.0D0 ]
35
-
! nBdry3dCone = NBdry3dCone / NORM2( NBdry3dCone )
37
#####
nBdry( 1 ) = DOT_PRODUCT( nBdry3dCone( 1 : 2 ), tradial )
38
#####
nBdry( 2 ) = nBdry3dCone( 3 )
41
#####
Radius = SQRT( x ** 2 + y ** 2 ) ! radius of seamount at the bounce point
43
-
! z = z_xx / 2 * x^2 + z_xy * xy + z_yy / 2 * y^2; coefs are the kappa matrix
45
#####
z_xx = y * y / Radius**3 * tan( phi )
46
#####
z_xy = - x * y / Radius**3 * tan( phi )
47
#####
z_yy = x * x / Radius**3 * tan( phi )
49
#####
END SUBROUTINE ConeFormulas2D
51
#####
SUBROUTINE ConeFormulas3D( z_xx, z_xy, z_yy, nBdry, xs, xray, BotTop )
52
-
!! analytic formula for the conical seamount
54
-
REAL (KIND=8), INTENT( IN ) :: xs( 3 ), xray( 3 )
55
-
CHARACTER (LEN=3), INTENT( IN ) :: BotTop ! Flag indicating bottom or top reflection
56
-
REAL (KIND=8), INTENT( OUT ) :: z_xx, z_xy, z_yy, nBdry( 3 )
57
-
REAL (KIND=8) :: theta, phi, Radius, x, y, RLen
59
#####
IF ( BotTop == 'BOT' ) THEN
60
#####
phi = 15 * DegRad ! 15 degree angle of seamount
65
#####
theta = atan2( y, x ) ! bearing from origin (center of cone) to ray
66
-
! could write the folowing in terms of x, y, and z ...
67
#####
nBdry = [ -cos( theta ) * sin( phi ), -sin( theta ) * sin( phi ), cos( phi ) ] ! unit normal to bdry
71
#####
Radius = SQRT( x ** 2 + y ** 2 ) ! radius of seamount at the bounce point
72
-
! z = z_xx / 2 * x^2 + z_xy * xy + z_yy * y^2 ! coefs are the kappa matrix
74
#####
RLen = SQRT( 1 + TAN( phi ) ** 2 ) ! 1 + fx^2 + fy^2
75
#####
z_xx = y * y / Radius**3 * tan( phi ) / RLen
76
#####
z_xy = - x * y / Radius**3 * tan( phi ) / RLen
77
#####
z_yy = x * x / Radius**3 * tan( phi ) / RLen
79
#####
END SUBROUTINE ConeFormulas3D