capytaine 2.3.1__cp314-cp314t-macosx_14_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- capytaine/.dylibs/libgcc_s.1.1.dylib +0 -0
- capytaine/.dylibs/libgfortran.5.dylib +0 -0
- capytaine/.dylibs/libquadmath.0.dylib +0 -0
- capytaine/__about__.py +16 -0
- capytaine/__init__.py +36 -0
- capytaine/bem/__init__.py +0 -0
- capytaine/bem/airy_waves.py +111 -0
- capytaine/bem/engines.py +441 -0
- capytaine/bem/problems_and_results.py +600 -0
- capytaine/bem/solver.py +594 -0
- capytaine/bodies/__init__.py +4 -0
- capytaine/bodies/bodies.py +1221 -0
- capytaine/bodies/dofs.py +19 -0
- capytaine/bodies/predefined/__init__.py +6 -0
- capytaine/bodies/predefined/cylinders.py +151 -0
- capytaine/bodies/predefined/rectangles.py +111 -0
- capytaine/bodies/predefined/spheres.py +70 -0
- capytaine/green_functions/FinGreen3D/.gitignore +1 -0
- capytaine/green_functions/FinGreen3D/FinGreen3D.f90 +3589 -0
- capytaine/green_functions/FinGreen3D/LICENSE +165 -0
- capytaine/green_functions/FinGreen3D/Makefile +16 -0
- capytaine/green_functions/FinGreen3D/README.md +24 -0
- capytaine/green_functions/FinGreen3D/test_program.f90 +39 -0
- capytaine/green_functions/LiangWuNoblesse/.gitignore +1 -0
- capytaine/green_functions/LiangWuNoblesse/LICENSE +504 -0
- capytaine/green_functions/LiangWuNoblesse/LiangWuNoblesseWaveTerm.f90 +751 -0
- capytaine/green_functions/LiangWuNoblesse/Makefile +16 -0
- capytaine/green_functions/LiangWuNoblesse/README.md +2 -0
- capytaine/green_functions/LiangWuNoblesse/test_program.f90 +28 -0
- capytaine/green_functions/__init__.py +2 -0
- capytaine/green_functions/abstract_green_function.py +64 -0
- capytaine/green_functions/delhommeau.py +507 -0
- capytaine/green_functions/hams.py +204 -0
- capytaine/green_functions/libs/Delhommeau_float32.cpython-314t-darwin.so +0 -0
- capytaine/green_functions/libs/Delhommeau_float64.cpython-314t-darwin.so +0 -0
- capytaine/green_functions/libs/__init__.py +0 -0
- capytaine/io/__init__.py +0 -0
- capytaine/io/bemio.py +153 -0
- capytaine/io/legacy.py +328 -0
- capytaine/io/mesh_loaders.py +1086 -0
- capytaine/io/mesh_writers.py +692 -0
- capytaine/io/meshio.py +38 -0
- capytaine/io/wamit.py +479 -0
- capytaine/io/xarray.py +668 -0
- capytaine/matrices/__init__.py +16 -0
- capytaine/matrices/block.py +592 -0
- capytaine/matrices/block_toeplitz.py +325 -0
- capytaine/matrices/builders.py +89 -0
- capytaine/matrices/linear_solvers.py +232 -0
- capytaine/matrices/low_rank.py +395 -0
- capytaine/meshes/__init__.py +6 -0
- capytaine/meshes/clipper.py +465 -0
- capytaine/meshes/collections.py +342 -0
- capytaine/meshes/geometry.py +409 -0
- capytaine/meshes/mesh_like_protocol.py +37 -0
- capytaine/meshes/meshes.py +890 -0
- capytaine/meshes/predefined/__init__.py +6 -0
- capytaine/meshes/predefined/cylinders.py +314 -0
- capytaine/meshes/predefined/rectangles.py +261 -0
- capytaine/meshes/predefined/spheres.py +62 -0
- capytaine/meshes/properties.py +276 -0
- capytaine/meshes/quadratures.py +80 -0
- capytaine/meshes/quality.py +448 -0
- capytaine/meshes/surface_integrals.py +63 -0
- capytaine/meshes/symmetric.py +462 -0
- capytaine/post_pro/__init__.py +6 -0
- capytaine/post_pro/free_surfaces.py +88 -0
- capytaine/post_pro/impedance.py +92 -0
- capytaine/post_pro/kochin.py +54 -0
- capytaine/post_pro/rao.py +60 -0
- capytaine/tools/__init__.py +0 -0
- capytaine/tools/cache_on_disk.py +26 -0
- capytaine/tools/deprecation_handling.py +18 -0
- capytaine/tools/lists_of_points.py +52 -0
- capytaine/tools/lru_cache.py +49 -0
- capytaine/tools/optional_imports.py +27 -0
- capytaine/tools/prony_decomposition.py +150 -0
- capytaine/tools/symbolic_multiplication.py +149 -0
- capytaine/tools/timer.py +66 -0
- capytaine/ui/__init__.py +0 -0
- capytaine/ui/cli.py +28 -0
- capytaine/ui/rich.py +5 -0
- capytaine/ui/vtk/__init__.py +3 -0
- capytaine/ui/vtk/animation.py +329 -0
- capytaine/ui/vtk/body_viewer.py +28 -0
- capytaine/ui/vtk/helpers.py +82 -0
- capytaine/ui/vtk/mesh_viewer.py +461 -0
- capytaine-2.3.1.dist-info/LICENSE +674 -0
- capytaine-2.3.1.dist-info/METADATA +750 -0
- capytaine-2.3.1.dist-info/RECORD +92 -0
- capytaine-2.3.1.dist-info/WHEEL +6 -0
- capytaine-2.3.1.dist-info/entry_points.txt +3 -0
|
@@ -0,0 +1,751 @@
|
|
|
1
|
+
!
|
|
2
|
+
!==================================================================================
|
|
3
|
+
!
|
|
4
|
+
! Purpose: This program evaluates the three-dimensional free-surface
|
|
5
|
+
! Green function and derivatives in deep water
|
|
6
|
+
!
|
|
7
|
+
! Code Original Author: Hui Liang created on 2016.12.26
|
|
8
|
+
! Superficially adapted for Capytaine by Matthieu Ancellin, 2022--2024
|
|
9
|
+
!
|
|
10
|
+
! License:
|
|
11
|
+
!
|
|
12
|
+
!
|
|
13
|
+
! This routine is a free software package: you can redistribute it and/or modify it
|
|
14
|
+
! under the terms of the GNU Lesser General Public License as published by the
|
|
15
|
+
! Free Software Foundation, either version 3 of the License, or (at your option)
|
|
16
|
+
! any later version.
|
|
17
|
+
!
|
|
18
|
+
! You should have received a copy of the GNU General Public License (either V3
|
|
19
|
+
! or later), along with this routine. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
!
|
|
21
|
+
! Modified on:
|
|
22
|
+
!
|
|
23
|
+
! January 02, 2018
|
|
24
|
+
!
|
|
25
|
+
! Reference:
|
|
26
|
+
!
|
|
27
|
+
!
|
|
28
|
+
! [1] H. Wu, C. Zhang, Y. Zhu, W. Li, D. Wan, F. Noblesse,
|
|
29
|
+
! A global approximation to the Green function for
|
|
30
|
+
! diffraction radiation of water waves,
|
|
31
|
+
! Eur. J. Mech. B Fluids 65 (2017) 54-64.
|
|
32
|
+
!
|
|
33
|
+
! [2] H. Liang, H. Wu, F. Noblesse,
|
|
34
|
+
! Validation of a global approximation for
|
|
35
|
+
! wave diffraction-radiation in deep water,
|
|
36
|
+
! Appl. Ocean Res. 74 (2018) 80-86.
|
|
37
|
+
!
|
|
38
|
+
! Remarks
|
|
39
|
+
!
|
|
40
|
+
! The local-flow component is approximated by mean of the global
|
|
41
|
+
! approximations [1]. The computations reported in [2] provides
|
|
42
|
+
! strong evidence that the global approximations are sufficiently
|
|
43
|
+
! accurate to compute linear and second-order wave loads in practice.
|
|
44
|
+
!
|
|
45
|
+
!
|
|
46
|
+
! It should be noted that the Rankine source term -2/d appeared in L_z
|
|
47
|
+
! given by (8a) in Ref. [2] is not evaluated here (there is a typo in (8a)).
|
|
48
|
+
! These Rankine source components are required to evaluate in another routine
|
|
49
|
+
! due to strong singular behavior.
|
|
50
|
+
!
|
|
51
|
+
! For any questions, please contact: lianghuistar@gmail.com
|
|
52
|
+
!
|
|
53
|
+
! We define the flow-field point (x,y,z) and source point (xi,eta,zeta).
|
|
54
|
+
! Please note that all variables are non-dimensionalized with respect to
|
|
55
|
+
! the wavenumber k0
|
|
56
|
+
!
|
|
57
|
+
! The Green function is defiend as
|
|
58
|
+
!
|
|
59
|
+
! G = -1/r-1/d+GF,
|
|
60
|
+
!
|
|
61
|
+
! where
|
|
62
|
+
!
|
|
63
|
+
! r = sqrt((x-xi)^2+(y-eta)^2+(z-zeta)^2);
|
|
64
|
+
! d = sqrt((x-xi)^2+(y-eta)^2+(z+zeta)^2).
|
|
65
|
+
!
|
|
66
|
+
! Parameters:
|
|
67
|
+
!
|
|
68
|
+
! Input: hh --- sqrt((x-xi)^2 + (y-eta)^2)
|
|
69
|
+
! vv --- z+zeta
|
|
70
|
+
!
|
|
71
|
+
! Output: GF --- free surface itself GF
|
|
72
|
+
! GFh --- derivative of GF with respect to hh
|
|
73
|
+
!
|
|
74
|
+
! ==================================================================================
|
|
75
|
+
|
|
76
|
+
module LiangWuNoblesseWaveTerm
|
|
77
|
+
|
|
78
|
+
implicit none
|
|
79
|
+
|
|
80
|
+
real(8), parameter :: pi = 4.0d0*datan(1.0d0)
|
|
81
|
+
real(8), parameter :: gama = 0.5772156649d0
|
|
82
|
+
complex(8), parameter :: Im = dcmplx(0.0d0,1.0d0)
|
|
83
|
+
|
|
84
|
+
contains
|
|
85
|
+
|
|
86
|
+
!===============================================================
|
|
87
|
+
subroutine HavelockGF(hh,vv,GF,GFh)
|
|
88
|
+
implicit none
|
|
89
|
+
! --- Variables -------------------------------------------
|
|
90
|
+
real(8),intent(in) :: hh,vv
|
|
91
|
+
complex(8),intent(out) :: GF, GFh
|
|
92
|
+
|
|
93
|
+
! --- Local variables -------------------------------------
|
|
94
|
+
real(8) :: dd, alpha, beta, rho
|
|
95
|
+
|
|
96
|
+
dd = sqrt(hh*hh+vv*vv)
|
|
97
|
+
alpha = -vv/dd
|
|
98
|
+
beta = hh/dd
|
|
99
|
+
rho = dd/(1.0d0+dd)
|
|
100
|
+
|
|
101
|
+
GF = GF_Func_L0(hh, vv, dd, alpha, beta, rho) + GF_Func_W(hh, vv)
|
|
102
|
+
GFh = GF_Func_Ls(hh, vv, dd, alpha, beta, rho) + GF_Func_Wh(hh, vv)
|
|
103
|
+
|
|
104
|
+
end subroutine HavelockGF
|
|
105
|
+
|
|
106
|
+
!=============================================================
|
|
107
|
+
|
|
108
|
+
function GF_Func_L0(hh,vv, dd, alpha, beta, rho)
|
|
109
|
+
|
|
110
|
+
implicit none
|
|
111
|
+
|
|
112
|
+
! --- Variables -------------------------------------------
|
|
113
|
+
real(8),intent(in) :: hh,vv, dd, alpha, beta, rho
|
|
114
|
+
|
|
115
|
+
! --- Local variables -------------------------------------
|
|
116
|
+
real(8) :: PP,Lp
|
|
117
|
+
real(8) :: GF_Func_L0
|
|
118
|
+
|
|
119
|
+
PP = dlog(0.5d0*(dd-vv))+gama-2.0d0*dd*dd
|
|
120
|
+
PP = dexp(vv)*PP
|
|
121
|
+
PP = PP+dd*dd-vv
|
|
122
|
+
|
|
123
|
+
Lp = GF_Func_Lp(hh,vv, dd, alpha, beta, rho)
|
|
124
|
+
|
|
125
|
+
GF_Func_L0 = 2.0d0*PP/(1.0d0+dd**3)+2.0d0*Lp
|
|
126
|
+
|
|
127
|
+
return
|
|
128
|
+
end function GF_Func_L0
|
|
129
|
+
|
|
130
|
+
!=============================================================
|
|
131
|
+
function GF_Func_Lp(hh,vv, dd, alpha, beta, rho)
|
|
132
|
+
|
|
133
|
+
implicit none
|
|
134
|
+
|
|
135
|
+
! --- Variables -------------------------------------------
|
|
136
|
+
real(8),intent(in) :: hh,vv, dd, alpha, beta, rho
|
|
137
|
+
|
|
138
|
+
! --- Local variables -------------------------------------
|
|
139
|
+
real(8) :: A,B,C,D,RR
|
|
140
|
+
real(8) :: GF_Func_Lp
|
|
141
|
+
|
|
142
|
+
A = GF_FuncA(rho)
|
|
143
|
+
B = GF_FuncB(rho)
|
|
144
|
+
C = GF_FuncC(rho)
|
|
145
|
+
D = GF_FuncD(rho)
|
|
146
|
+
|
|
147
|
+
RR = (1.0d0-beta)*A
|
|
148
|
+
RR = RR-beta*B
|
|
149
|
+
RR = RR-alpha*C/(1.0d0+6.0d0*alpha*rho*(1.0d0-rho))
|
|
150
|
+
RR = RR+beta*(1.0d0-beta)*D
|
|
151
|
+
|
|
152
|
+
GF_Func_Lp = rho*(1.0d0-rho)**3*RR
|
|
153
|
+
|
|
154
|
+
return
|
|
155
|
+
end function GF_Func_Lp
|
|
156
|
+
|
|
157
|
+
!=============================================================
|
|
158
|
+
function GF_Func_W(hh,vv)
|
|
159
|
+
|
|
160
|
+
implicit none
|
|
161
|
+
|
|
162
|
+
! --- Variables -------------------------------------------
|
|
163
|
+
real(8),intent(in) :: hh,vv
|
|
164
|
+
|
|
165
|
+
! --- Local variables -------------------------------------
|
|
166
|
+
real(8) :: H0,J0
|
|
167
|
+
complex(8) :: GF_Func_W
|
|
168
|
+
|
|
169
|
+
H0 = StruveH0(hh)
|
|
170
|
+
J0 = BesselJ0(hh)
|
|
171
|
+
|
|
172
|
+
GF_Func_W = 2.0d0*pi*(H0-Im*J0)*dexp(vv)
|
|
173
|
+
|
|
174
|
+
return
|
|
175
|
+
end function GF_Func_W
|
|
176
|
+
|
|
177
|
+
!=============================================================
|
|
178
|
+
function GF_FuncA(tt)
|
|
179
|
+
|
|
180
|
+
implicit none
|
|
181
|
+
|
|
182
|
+
! --- Variables -------------------------------------------
|
|
183
|
+
real(8),intent(in) :: tt
|
|
184
|
+
|
|
185
|
+
! --- Local variables -------------------------------------
|
|
186
|
+
real(8) :: A0,A1,A2,A3,A4
|
|
187
|
+
real(8) :: A5,A6,A7,A8,A9
|
|
188
|
+
real(8) :: GF_FuncA
|
|
189
|
+
|
|
190
|
+
data A0,A1,A2,A3,A4,A5,A6,A7,A8,A9 &
|
|
191
|
+
/ +1.21d0, -13.328d0, +215.896d0, &
|
|
192
|
+
-1763.96d0, +8418.94d0, -24314.21d0, &
|
|
193
|
+
+42002.57d0,-41592.9d0, 21859.0d0, &
|
|
194
|
+
-4838.6d0 /
|
|
195
|
+
|
|
196
|
+
GF_FuncA = (A8+A9*tt)*tt
|
|
197
|
+
GF_FuncA = (A7+GF_FuncA)*tt
|
|
198
|
+
GF_FuncA = (A6+GF_FuncA)*tt
|
|
199
|
+
GF_FuncA = (A5+GF_FuncA)*tt
|
|
200
|
+
GF_FuncA = (A4+GF_FuncA)*tt
|
|
201
|
+
GF_FuncA = (A3+GF_FuncA)*tt
|
|
202
|
+
GF_FuncA = (A2+GF_FuncA)*tt
|
|
203
|
+
GF_FuncA = (A1+GF_FuncA)*tt
|
|
204
|
+
GF_FuncA = A0+GF_FuncA
|
|
205
|
+
|
|
206
|
+
return
|
|
207
|
+
end function GF_FuncA
|
|
208
|
+
|
|
209
|
+
!=============================================================
|
|
210
|
+
function GF_FuncB(tt)
|
|
211
|
+
|
|
212
|
+
implicit none
|
|
213
|
+
|
|
214
|
+
! --- Variables -------------------------------------------
|
|
215
|
+
real(8),intent(in) :: tt
|
|
216
|
+
|
|
217
|
+
! --- Local variables -------------------------------------
|
|
218
|
+
real(8) :: B0,B1,B2,B3,B4
|
|
219
|
+
real(8) :: B5,B6,B7,B8,B9
|
|
220
|
+
real(8) :: GF_FuncB
|
|
221
|
+
|
|
222
|
+
data B0,B1,B2,B3,B4,B5,B6,B7,B8,B9 &
|
|
223
|
+
/ +0.938d0, +5.737d0, -67.92d0, &
|
|
224
|
+
+796.534d0, -4780.77d0, +17137.74d0, &
|
|
225
|
+
-36618.81d0,+44894.06d0,-29030.24d0, &
|
|
226
|
+
+7671.22d0 /
|
|
227
|
+
|
|
228
|
+
GF_FuncB = (B8+B9*tt)*tt
|
|
229
|
+
GF_FuncB = (B7+GF_FuncB)*tt
|
|
230
|
+
GF_FuncB = (B6+GF_FuncB)*tt
|
|
231
|
+
GF_FuncB = (B5+GF_FuncB)*tt
|
|
232
|
+
GF_FuncB = (B4+GF_FuncB)*tt
|
|
233
|
+
GF_FuncB = (B3+GF_FuncB)*tt
|
|
234
|
+
GF_FuncB = (B2+GF_FuncB)*tt
|
|
235
|
+
GF_FuncB = (B1+GF_FuncB)*tt
|
|
236
|
+
GF_FuncB = B0+GF_FuncB
|
|
237
|
+
|
|
238
|
+
return
|
|
239
|
+
end function GF_FuncB
|
|
240
|
+
|
|
241
|
+
!=============================================================
|
|
242
|
+
function GF_FuncC(tt)
|
|
243
|
+
|
|
244
|
+
implicit none
|
|
245
|
+
|
|
246
|
+
! --- Variables -------------------------------------------
|
|
247
|
+
real(8),intent(in) :: tt
|
|
248
|
+
|
|
249
|
+
! --- Local variables -------------------------------------
|
|
250
|
+
real(8) :: C0,C1,C2,C3,C4
|
|
251
|
+
real(8) :: C5,C6,C7
|
|
252
|
+
real(8) :: GF_FuncC
|
|
253
|
+
|
|
254
|
+
data C0,C1,C2,C3,C4,C5,C6,C7 &
|
|
255
|
+
/ +1.268d0, -9.747d0, +209.653d0, &
|
|
256
|
+
-1397.89d0, +5155.67d0, -9844.35d0, &
|
|
257
|
+
+9136.4d0, -3272.62d0 /
|
|
258
|
+
|
|
259
|
+
GF_FuncC = (C6+C7*tt)*tt
|
|
260
|
+
GF_FuncC = (C5+GF_FuncC)*tt
|
|
261
|
+
GF_FuncC = (C4+GF_FuncC)*tt
|
|
262
|
+
GF_FuncC = (C3+GF_FuncC)*tt
|
|
263
|
+
GF_FuncC = (C2+GF_FuncC)*tt
|
|
264
|
+
GF_FuncC = (C1+GF_FuncC)*tt
|
|
265
|
+
GF_FuncC = C0+GF_FuncC
|
|
266
|
+
|
|
267
|
+
return
|
|
268
|
+
end function GF_FuncC
|
|
269
|
+
|
|
270
|
+
!=============================================================
|
|
271
|
+
function GF_FuncD(tt)
|
|
272
|
+
|
|
273
|
+
implicit none
|
|
274
|
+
|
|
275
|
+
! --- Variables -------------------------------------------
|
|
276
|
+
real(8),intent(in) :: tt
|
|
277
|
+
|
|
278
|
+
! --- Local variables -------------------------------------
|
|
279
|
+
real(8) :: D0,D1,D2,D3,D4
|
|
280
|
+
real(8) :: D5,D6,D7,D8,D9
|
|
281
|
+
real(8) :: GF_FuncD
|
|
282
|
+
|
|
283
|
+
data D0,D1,D2,D3,D4,D5,D6,D7,D8,D9 &
|
|
284
|
+
/ +0.632d0, -40.97d0, +667.16d0, &
|
|
285
|
+
-6072.07d0, +31127.39d0,-96293.05d0, &
|
|
286
|
+
+181856.75d0, -205690.43d0, &
|
|
287
|
+
+128170.2d0,-33744.6d0 /
|
|
288
|
+
|
|
289
|
+
GF_FuncD = (D8+D9*tt)*tt
|
|
290
|
+
GF_FuncD = (D7+GF_FuncD)*tt
|
|
291
|
+
GF_FuncD = (D6+GF_FuncD)*tt
|
|
292
|
+
GF_FuncD = (D5+GF_FuncD)*tt
|
|
293
|
+
GF_FuncD = (D4+GF_FuncD)*tt
|
|
294
|
+
GF_FuncD = (D3+GF_FuncD)*tt
|
|
295
|
+
GF_FuncD = (D2+GF_FuncD)*tt
|
|
296
|
+
GF_FuncD = (D1+GF_FuncD)*tt
|
|
297
|
+
GF_FuncD = D0+GF_FuncD
|
|
298
|
+
|
|
299
|
+
return
|
|
300
|
+
end function GF_FuncD
|
|
301
|
+
|
|
302
|
+
!=============================================================
|
|
303
|
+
function GF_Func_Ls(hh,vv, dd, alpha, beta, rho)
|
|
304
|
+
|
|
305
|
+
implicit none
|
|
306
|
+
|
|
307
|
+
! --- Variables -------------------------------------------
|
|
308
|
+
real(8),intent(in) :: hh,vv, dd, alpha, beta, rho
|
|
309
|
+
|
|
310
|
+
! --- Local variables -------------------------------------
|
|
311
|
+
real(8) :: PS,QS,Lsp
|
|
312
|
+
real(8) :: GF_Func_Ls
|
|
313
|
+
|
|
314
|
+
PS = (beta+hh)/(dd-vv)
|
|
315
|
+
PS = PS-2.0d0*beta+2.0d0*dexp(vv)*dd-hh
|
|
316
|
+
|
|
317
|
+
QS = dexp(-dd)*(1.0d0-beta)
|
|
318
|
+
QS = QS*(1.0d0+dd/(1.0d0+dd**3))
|
|
319
|
+
|
|
320
|
+
Lsp = GF_Func_Lsp(hh,vv, dd, alpha, beta, rho)
|
|
321
|
+
|
|
322
|
+
GF_Func_Ls = 2.0d0*PS/(1.0d0+dd**3)-4.0d0*QS+2.0d0*Lsp
|
|
323
|
+
|
|
324
|
+
return
|
|
325
|
+
end function GF_Func_Ls
|
|
326
|
+
|
|
327
|
+
!=============================================================
|
|
328
|
+
function GF_Func_Lsp(hh,vv, dd, alpha, beta, rho)
|
|
329
|
+
|
|
330
|
+
implicit none
|
|
331
|
+
|
|
332
|
+
! --- Variables -------------------------------------------
|
|
333
|
+
real(8),intent(in) :: hh,vv, dd, alpha, beta, rho
|
|
334
|
+
|
|
335
|
+
! --- Local variables -------------------------------------
|
|
336
|
+
real(8) :: A,B,C,RR
|
|
337
|
+
real(8) :: GF_Func_Lsp
|
|
338
|
+
|
|
339
|
+
A = GF_dFuncA(rho)
|
|
340
|
+
B = GF_dFuncB(rho)
|
|
341
|
+
C = GF_dFuncC(rho)
|
|
342
|
+
|
|
343
|
+
RR = beta*A
|
|
344
|
+
RR = RR-(1.0d0-alpha)*B
|
|
345
|
+
RR = RR+beta*(1.0d0-beta)*rho*(1.0d0-2.0d0*rho)*C
|
|
346
|
+
|
|
347
|
+
GF_Func_Lsp = rho*(1.0d0-rho)**3*RR
|
|
348
|
+
|
|
349
|
+
return
|
|
350
|
+
end function GF_Func_Lsp
|
|
351
|
+
|
|
352
|
+
!=============================================================
|
|
353
|
+
function GF_Func_Wh(hh,vv)
|
|
354
|
+
|
|
355
|
+
implicit none
|
|
356
|
+
|
|
357
|
+
! --- Variables -------------------------------------------
|
|
358
|
+
real(8),intent(in) :: hh,vv
|
|
359
|
+
|
|
360
|
+
! --- Local variables -------------------------------------
|
|
361
|
+
real(8) :: H1,J1
|
|
362
|
+
complex(8) :: GF_Func_Wh
|
|
363
|
+
|
|
364
|
+
H1 = StruveH1(hh)
|
|
365
|
+
J1 = BesselJ1(hh)
|
|
366
|
+
|
|
367
|
+
GF_Func_Wh = 2.0d0*pi*(2.0d0/pi-H1+Im*J1)*dexp(vv)
|
|
368
|
+
|
|
369
|
+
return
|
|
370
|
+
end function GF_Func_Wh
|
|
371
|
+
|
|
372
|
+
!=============================================================
|
|
373
|
+
function GF_dFuncA(tt)
|
|
374
|
+
|
|
375
|
+
implicit none
|
|
376
|
+
|
|
377
|
+
! --- Variables -------------------------------------------
|
|
378
|
+
real(8),intent(in) :: tt
|
|
379
|
+
|
|
380
|
+
! --- Local variables -------------------------------------
|
|
381
|
+
real(8) :: A0,A1,A2,A3,A4
|
|
382
|
+
real(8) :: A5,A6,A7,A8,A9
|
|
383
|
+
real(8) :: GF_dFuncA
|
|
384
|
+
|
|
385
|
+
data A0,A1,A2,A3,A4,A5,A6,A7,A8,A9 &
|
|
386
|
+
/ +2.948d0, -24.53d0, +249.69d0, &
|
|
387
|
+
-754.85d0, -1187.71d0, +16370.75d0, &
|
|
388
|
+
-48811.41d0,+68220.87d0,-46688.0d0, &
|
|
389
|
+
+12622.25d0 /
|
|
390
|
+
|
|
391
|
+
GF_dFuncA = (A8+A9*tt)*tt
|
|
392
|
+
GF_dFuncA = (A7+GF_dFuncA)*tt
|
|
393
|
+
GF_dFuncA = (A6+GF_dFuncA)*tt
|
|
394
|
+
GF_dFuncA = (A5+GF_dFuncA)*tt
|
|
395
|
+
GF_dFuncA = (A4+GF_dFuncA)*tt
|
|
396
|
+
GF_dFuncA = (A3+GF_dFuncA)*tt
|
|
397
|
+
GF_dFuncA = (A2+GF_dFuncA)*tt
|
|
398
|
+
GF_dFuncA = (A1+GF_dFuncA)*tt
|
|
399
|
+
GF_dFuncA = A0+GF_dFuncA
|
|
400
|
+
|
|
401
|
+
return
|
|
402
|
+
end function GF_dFuncA
|
|
403
|
+
|
|
404
|
+
!=============================================================
|
|
405
|
+
function GF_dFuncB(tt)
|
|
406
|
+
|
|
407
|
+
implicit none
|
|
408
|
+
|
|
409
|
+
! --- Variables -------------------------------------------
|
|
410
|
+
real(8),intent(in) :: tt
|
|
411
|
+
|
|
412
|
+
! --- Local variables -------------------------------------
|
|
413
|
+
real(8) :: B0,B1,B2,B3,B4
|
|
414
|
+
real(8) :: B5,B6,B7,B8,B9
|
|
415
|
+
real(8) :: GF_dFuncB
|
|
416
|
+
|
|
417
|
+
data B0,B1,B2,B3,B4,B5,B6,B7,B8,B9 &
|
|
418
|
+
/ +1.11d0, +2.894d0, -76.765d0, &
|
|
419
|
+
+1565.35d0, -11336.19d0,+44270.15d0, &
|
|
420
|
+
-97014.11d0,+118879.26d0,-76209.82d0, &
|
|
421
|
+
+19923.28d0 /
|
|
422
|
+
|
|
423
|
+
GF_dFuncB = (B8+B9*tt)*tt
|
|
424
|
+
GF_dFuncB = (B7+GF_dFuncB)*tt
|
|
425
|
+
GF_dFuncB = (B6+GF_dFuncB)*tt
|
|
426
|
+
GF_dFuncB = (B5+GF_dFuncB)*tt
|
|
427
|
+
GF_dFuncB = (B4+GF_dFuncB)*tt
|
|
428
|
+
GF_dFuncB = (B3+GF_dFuncB)*tt
|
|
429
|
+
GF_dFuncB = (B2+GF_dFuncB)*tt
|
|
430
|
+
GF_dFuncB = (B1+GF_dFuncB)*tt
|
|
431
|
+
GF_dFuncB = B0+GF_dFuncB
|
|
432
|
+
|
|
433
|
+
return
|
|
434
|
+
end function GF_dFuncB
|
|
435
|
+
|
|
436
|
+
!=============================================================
|
|
437
|
+
function GF_dFuncC(tt)
|
|
438
|
+
|
|
439
|
+
implicit none
|
|
440
|
+
|
|
441
|
+
! --- Variables -------------------------------------------
|
|
442
|
+
real(8),intent(in) :: tt
|
|
443
|
+
|
|
444
|
+
! --- Local variables -------------------------------------
|
|
445
|
+
real(8) :: C0,C1,C2,C3,C4,C5
|
|
446
|
+
real(8) :: GF_dFuncC
|
|
447
|
+
|
|
448
|
+
data C0,C1,C2,C3,C4,C5 &
|
|
449
|
+
/ +14.19d0, -148.24d0, +847.8d0, &
|
|
450
|
+
-2318.58d0, +3168.35d0, -1590.27d0 /
|
|
451
|
+
|
|
452
|
+
GF_dFuncC = (C4+C5*tt)*tt
|
|
453
|
+
GF_dFuncC = (C3+GF_dFuncC)*tt
|
|
454
|
+
GF_dFuncC = (C2+GF_dFuncC)*tt
|
|
455
|
+
GF_dFuncC = (C1+GF_dFuncC)*tt
|
|
456
|
+
GF_dFuncC = C0+GF_dFuncC
|
|
457
|
+
|
|
458
|
+
return
|
|
459
|
+
end function GF_dFuncC
|
|
460
|
+
|
|
461
|
+
!**************************************
|
|
462
|
+
function BesselJ0(xx)
|
|
463
|
+
!
|
|
464
|
+
implicit none
|
|
465
|
+
|
|
466
|
+
! --- Variables -------------------------------------------
|
|
467
|
+
real(8),intent(in) :: xx
|
|
468
|
+
|
|
469
|
+
! --- Local variables -------------------------------------
|
|
470
|
+
real(8) :: yy,y2,f0,theta0
|
|
471
|
+
real(8) :: BesselJ0
|
|
472
|
+
real(8) :: P0,P1,P2,P3,P4,P5,P6
|
|
473
|
+
real(8) :: R0,R1,R2,R3,R4,R5
|
|
474
|
+
real(8) :: S1,S2,S3,S4,S5
|
|
475
|
+
|
|
476
|
+
data P0,P1,P2,P3,P4,P5,P6 &
|
|
477
|
+
/ +0.999999999d0, -2.249999879d0, +1.265623060d0, &
|
|
478
|
+
-0.316394552d0, +0.044460948d0, -0.003954479d0, &
|
|
479
|
+
+0.000212950d0 /
|
|
480
|
+
|
|
481
|
+
data R0,R1,R2,R3,R4,R5 &
|
|
482
|
+
/ +0.79788454d0, -0.00553897d0, +0.00099336d0, &
|
|
483
|
+
-0.00044346d0, +0.00020445d0, -0.00004959d0 /
|
|
484
|
+
|
|
485
|
+
data S1,S2,S3,S4,S5 &
|
|
486
|
+
/ -0.04166592d0, +0.00239399d0, -0.00073984d0, &
|
|
487
|
+
+0.00031099d0, -0.00007605d0 /
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
if(xx <= 3.0d0) then
|
|
491
|
+
yy = (xx/3.0d0)**2
|
|
492
|
+
BesselJ0 = P0+(P1+(P2+(P3+(P4+(P5+P6*yy)*yy)*yy)*yy)*yy)*yy
|
|
493
|
+
else
|
|
494
|
+
yy = 3.0d0/xx
|
|
495
|
+
y2 = yy**2
|
|
496
|
+
|
|
497
|
+
f0 = R0+(R1+(R2+(R3+(R4+R5*y2)*y2)*y2)*y2)*y2
|
|
498
|
+
|
|
499
|
+
theta0 = xx - 0.25d0*pi &
|
|
500
|
+
+(S1+(S2+(S3+(S4+S5*y2)*y2)*y2)*y2)*yy
|
|
501
|
+
|
|
502
|
+
BesselJ0 = f0*dcos(theta0)/dsqrt(xx)
|
|
503
|
+
end if
|
|
504
|
+
|
|
505
|
+
return
|
|
506
|
+
end function BesselJ0
|
|
507
|
+
|
|
508
|
+
!===============================================================
|
|
509
|
+
function BesselJ1(xx)
|
|
510
|
+
!
|
|
511
|
+
implicit none
|
|
512
|
+
|
|
513
|
+
! --- Variables -------------------------------------------
|
|
514
|
+
real(8),intent(in) :: xx
|
|
515
|
+
|
|
516
|
+
! --- Local variables -------------------------------------
|
|
517
|
+
real(8) :: yy,y2,f1,theta1
|
|
518
|
+
real(8) :: BesselJ1
|
|
519
|
+
|
|
520
|
+
real(8) :: P0,P1,P2,P3,P4,P5,P6
|
|
521
|
+
real(8) :: R0,R1,R2,R3,R4,R5
|
|
522
|
+
real(8) :: S1,S2,S3,S4,S5
|
|
523
|
+
|
|
524
|
+
data P0,P1,P2,P3,P4,P5,P6 &
|
|
525
|
+
/ +0.500000000d0, -0.562499992d0, +0.210937377d0, &
|
|
526
|
+
-0.039550040d0, +0.004447331d0, -0.000330547d0, &
|
|
527
|
+
+0.000015525d0 /
|
|
528
|
+
|
|
529
|
+
data R0,R1,R2,R3,R4,R5 &
|
|
530
|
+
/ +0.79788459d0, +0.01662008d0, -0.00187002d0, &
|
|
531
|
+
+0.00068519d0, -0.00029440d0, +0.00006952d0 /
|
|
532
|
+
|
|
533
|
+
data S1,S2,S3,S4,S5 &
|
|
534
|
+
/ +0.12499895d0, -0.00605240d0, +0.00135825d0, &
|
|
535
|
+
-0.00049616d0, +0.00011531d0 /
|
|
536
|
+
|
|
537
|
+
if(xx <= 3.0d0) then
|
|
538
|
+
yy = xx/3.0d0
|
|
539
|
+
y2 = yy*yy
|
|
540
|
+
BesselJ1 = P0+(P1+(P2+(P3+(P4+(P5+P6*y2)*y2)*y2)*y2)*y2)*y2
|
|
541
|
+
|
|
542
|
+
BesselJ1 = BesselJ1*xx
|
|
543
|
+
else
|
|
544
|
+
yy = 3.0d0/xx
|
|
545
|
+
y2 = yy*yy
|
|
546
|
+
f1 = R0+(R1+(R2+(R3+(R4+R5*y2)*y2)*y2)*y2)*y2
|
|
547
|
+
|
|
548
|
+
theta1 = xx - 0.75d0*pi &
|
|
549
|
+
+(S1+(S2+(S3+(S4+S5*y2)*y2)*y2)*y2)*yy
|
|
550
|
+
|
|
551
|
+
BesselJ1 = f1*dcos(theta1)/dsqrt(xx)
|
|
552
|
+
end if
|
|
553
|
+
|
|
554
|
+
return
|
|
555
|
+
end function BesselJ1
|
|
556
|
+
|
|
557
|
+
!===============================================================
|
|
558
|
+
function BesselY0(xx)
|
|
559
|
+
!
|
|
560
|
+
implicit none
|
|
561
|
+
|
|
562
|
+
! --- Variables -------------------------------------------
|
|
563
|
+
real(8),intent(in) :: xx
|
|
564
|
+
|
|
565
|
+
! --- Local variables -------------------------------------
|
|
566
|
+
real(8) :: f0,theta0
|
|
567
|
+
real(8) :: BesselY0
|
|
568
|
+
|
|
569
|
+
if(xx <= 3.0d0) then
|
|
570
|
+
BesselY0 = (2.0d0/pi)*dlog(xx/2.0d0)*BesselJ0(xx) &
|
|
571
|
+
+0.367466907d0 &
|
|
572
|
+
+0.605593797d0*(xx/3.0d0)**2 &
|
|
573
|
+
-0.743505078d0*(xx/3.0d0)**4 &
|
|
574
|
+
+0.253005481d0*(xx/3.0d0)**6 &
|
|
575
|
+
-0.042619616d0*(xx/3.0d0)**8 &
|
|
576
|
+
+0.004285691d0*(xx/3.0d0)**10 &
|
|
577
|
+
-0.000250716d0*(xx/3.0d0)**12
|
|
578
|
+
else
|
|
579
|
+
f0 = 0.79788454d0 &
|
|
580
|
+
-0.00553897d0*(3.0d0/xx)**2 &
|
|
581
|
+
+0.00099336d0*(3.0d0/xx)**4 &
|
|
582
|
+
-0.00044346d0*(3.0d0/xx)**6 &
|
|
583
|
+
+0.00020445d0*(3.0d0/xx)**8 &
|
|
584
|
+
-0.00004959d0*(3.0d0/xx)**10
|
|
585
|
+
|
|
586
|
+
theta0 = xx - 0.25d0*pi &
|
|
587
|
+
-0.04166592d0*(3.0d0/xx)**1 &
|
|
588
|
+
+0.00239399d0*(3.0d0/xx)**3 &
|
|
589
|
+
-0.00073984d0*(3.0d0/xx)**5 &
|
|
590
|
+
+0.00031099d0*(3.0d0/xx)**7 &
|
|
591
|
+
-0.00007605d0*(3.0d0/xx)**9
|
|
592
|
+
|
|
593
|
+
BesselY0 = f0*dsin(theta0)/dsqrt(xx)
|
|
594
|
+
|
|
595
|
+
end if
|
|
596
|
+
|
|
597
|
+
return
|
|
598
|
+
end function BesselY0
|
|
599
|
+
|
|
600
|
+
!===============================================================
|
|
601
|
+
function BesselY1(xx)
|
|
602
|
+
!
|
|
603
|
+
implicit none
|
|
604
|
+
|
|
605
|
+
! --- Variables -------------------------------------------
|
|
606
|
+
real(8),intent(in) :: xx
|
|
607
|
+
|
|
608
|
+
! --- Local variables -------------------------------------
|
|
609
|
+
real(8) :: f1,theta1
|
|
610
|
+
real(8) :: BesselY1
|
|
611
|
+
|
|
612
|
+
if(xx <= 3.0d0) then
|
|
613
|
+
BesselY1 = (2.0d0/pi)*(dlog(xx/2.0d0)*BesselJ1(xx)-1.0d0/xx) &
|
|
614
|
+
+0.07373571d0*(xx/3.0d0)**1 &
|
|
615
|
+
+0.72276433d0*(xx/3.0d0)**3 &
|
|
616
|
+
-0.43885620d0*(xx/3.0d0)**5 &
|
|
617
|
+
+0.10418264d0*(xx/3.0d0)**7 &
|
|
618
|
+
-0.01340825d0*(xx/3.0d0)**9 &
|
|
619
|
+
+0.00094249d0*(xx/3.0d0)**11
|
|
620
|
+
else
|
|
621
|
+
f1 = 0.79788459d0 &
|
|
622
|
+
+0.01662008d0*(3.0d0/xx)**2 &
|
|
623
|
+
-0.00187002d0*(3.0d0/xx)**4 &
|
|
624
|
+
+0.00068519d0*(3.0d0/xx)**6 &
|
|
625
|
+
-0.00029440d0*(3.0d0/xx)**8 &
|
|
626
|
+
+0.00006952d0*(3.0d0/xx)**10
|
|
627
|
+
|
|
628
|
+
theta1 = xx - 3.0d0*pi/4.0d0 &
|
|
629
|
+
+0.12499895d0*(3.0d0/xx)**1 &
|
|
630
|
+
-0.00605240d0*(3.0d0/xx)**3 &
|
|
631
|
+
+0.00135825d0*(3.0d0/xx)**5 &
|
|
632
|
+
-0.00049616d0*(3.0d0/xx)**7 &
|
|
633
|
+
+0.00011531d0*(3.0d0/xx)**9
|
|
634
|
+
|
|
635
|
+
BesselY1 = f1*dsin(theta1)/dsqrt(xx)
|
|
636
|
+
|
|
637
|
+
end if
|
|
638
|
+
|
|
639
|
+
return
|
|
640
|
+
end function BesselY1
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
!===============================================================
|
|
644
|
+
function StruveH0(xx)
|
|
645
|
+
|
|
646
|
+
implicit none
|
|
647
|
+
|
|
648
|
+
! --- Variables -------------------------------------------
|
|
649
|
+
real(8),intent(in) :: xx
|
|
650
|
+
|
|
651
|
+
! --- Local variables -------------------------------------
|
|
652
|
+
|
|
653
|
+
real(8) :: P0,P1,P2
|
|
654
|
+
real(8) :: P3,P4,P5
|
|
655
|
+
real(8) :: a0,a1,a2,a3
|
|
656
|
+
real(8) :: b1,b2,b3
|
|
657
|
+
real(8) :: c1,c2
|
|
658
|
+
real(8) :: yy,StruveH0
|
|
659
|
+
|
|
660
|
+
if(xx <= 3.0d0) then
|
|
661
|
+
|
|
662
|
+
yy = (xx/3.0d0)**2
|
|
663
|
+
|
|
664
|
+
P0 = +1.909859164d0
|
|
665
|
+
P1 = -1.909855001d0
|
|
666
|
+
P2 = +0.687514637d0
|
|
667
|
+
P3 = -0.126164557d0
|
|
668
|
+
P4 = +0.013828813d0
|
|
669
|
+
P5 = -0.000876918d0
|
|
670
|
+
|
|
671
|
+
StruveH0 = P0+(P1+(P2+(P3+(P4+P5*yy)*yy)*yy)*yy)*yy
|
|
672
|
+
|
|
673
|
+
StruveH0 = StruveH0*(xx/3.0d0)
|
|
674
|
+
|
|
675
|
+
else
|
|
676
|
+
|
|
677
|
+
yy = (3.0d0/xx)**2
|
|
678
|
+
|
|
679
|
+
a0 = 0.99999906d0
|
|
680
|
+
a1 = 4.77228920d0
|
|
681
|
+
a2 = 3.85542044d0
|
|
682
|
+
a3 = 0.32303607d0
|
|
683
|
+
|
|
684
|
+
b1 = 4.88331068d0
|
|
685
|
+
b2 = 4.28957333d0
|
|
686
|
+
b3 = 0.52120508d0
|
|
687
|
+
|
|
688
|
+
c1 = 2.0d0*(a0 + (a1+(a2+a3*yy)*yy)*yy)
|
|
689
|
+
c2 = pi*xx*(1.0d0+ (b1+(b2+b3*yy)*yy)*yy)
|
|
690
|
+
|
|
691
|
+
StruveH0 = c1/c2+ BesselY0(xx)
|
|
692
|
+
|
|
693
|
+
end if
|
|
694
|
+
|
|
695
|
+
return
|
|
696
|
+
end function StruveH0
|
|
697
|
+
|
|
698
|
+
!===============================================================
|
|
699
|
+
function StruveH1(xx)
|
|
700
|
+
|
|
701
|
+
implicit none
|
|
702
|
+
|
|
703
|
+
! --- Variables -------------------------------------------
|
|
704
|
+
real(8),intent(in) :: xx
|
|
705
|
+
|
|
706
|
+
! --- Local variables -------------------------------------
|
|
707
|
+
|
|
708
|
+
real(8) :: P1,P2,P3
|
|
709
|
+
real(8) :: P4,P5,P6
|
|
710
|
+
real(8) :: a0,a1,a2,a3
|
|
711
|
+
real(8) :: b1,b2,b3
|
|
712
|
+
real(8) :: c1,c2,yy
|
|
713
|
+
real(8) :: StruveH1
|
|
714
|
+
|
|
715
|
+
if(xx <= 3.0d0) then
|
|
716
|
+
|
|
717
|
+
yy = (xx/3.0d0)**2
|
|
718
|
+
|
|
719
|
+
P1 = +1.909859286d0
|
|
720
|
+
P2 = -1.145914713d0
|
|
721
|
+
P3 = +0.294656958d0
|
|
722
|
+
P4 = -0.042070508d0
|
|
723
|
+
P5 = +0.003785727d0
|
|
724
|
+
P6 = -0.000207183d0
|
|
725
|
+
|
|
726
|
+
StruveH1 = (P1+(P2+(P3+(P4+(P5+P6*yy)*yy)*yy)*yy)*yy)*yy
|
|
727
|
+
|
|
728
|
+
else
|
|
729
|
+
|
|
730
|
+
yy = (3.0d0/xx)**2
|
|
731
|
+
|
|
732
|
+
a0 = 1.00000004d0
|
|
733
|
+
a1 = 3.92205313d0
|
|
734
|
+
a2 = 2.64893033d0
|
|
735
|
+
a3 = 0.27450895d0
|
|
736
|
+
|
|
737
|
+
b1 = 3.81095112d0
|
|
738
|
+
b2 = 2.26216956d0
|
|
739
|
+
b3 = 0.10885141d0
|
|
740
|
+
|
|
741
|
+
c1 = 2.0d0*(a0 + (a1+(a2+a3*yy)*yy)*yy)
|
|
742
|
+
c2 = pi*(1.0d0 + (b1+(b2+b3*yy)*yy)*yy)
|
|
743
|
+
|
|
744
|
+
StruveH1 = c1/c2 + BesselY1(xx)
|
|
745
|
+
|
|
746
|
+
end if
|
|
747
|
+
|
|
748
|
+
return
|
|
749
|
+
end function StruveH1
|
|
750
|
+
|
|
751
|
+
end module LiangWuNoblesseWaveTerm
|