你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-06 20:46:52 +08:00
Improved dispersion analysis warning algorithm - checks for non-physical wave propagation and improves max frequency finding.
这个提交包含在:
@@ -84,6 +84,8 @@ class FDTDGrid(Grid):
|
||||
self.highestfreqthres = 60
|
||||
# Maximum allowable percentage physical phase-velocity phase error
|
||||
self.maxnumericaldisp = 2
|
||||
# Minimum grid sampling of smallest wavelength for physical wave propagation
|
||||
self.mingridsampling = 3
|
||||
|
||||
self.nx = 0
|
||||
self.ny = 0
|
||||
@@ -244,17 +246,16 @@ def dispersion_analysis(G):
|
||||
# Grid sampling density
|
||||
results['N'] = minwavelength / delta
|
||||
|
||||
# If there is an invalid inverse sine value set to maximum, i.e. pi/2
|
||||
try:
|
||||
tmp = np.arcsin((1 / S) * np.sin((np.pi * S) / results['N']))
|
||||
except FloatingPointError:
|
||||
tmp = np.pi / 2
|
||||
# Check grid sampling will result in physical wave propagation
|
||||
if int(np.floor(results['N'])) >= G.mingridsampling:
|
||||
# Numerical phase velocity
|
||||
vp = np.pi / (results['N'] * np.arcsin((1 / S) * np.sin((np.pi * S) / results['N'])))
|
||||
|
||||
# Numerical phase velocity
|
||||
vp = np.pi / (results['N'] * tmp)
|
||||
|
||||
# Physical phase velocity error (percentage)
|
||||
results['deltavp'] = (((vp * c) - c) / c) * 100
|
||||
# Physical phase velocity error (percentage)
|
||||
results['deltavp'] = (((vp * c) - c) / c) * 100
|
||||
|
||||
# Store rounded down value of grid sampling density
|
||||
results['N'] = int(np.floor(results['N']))
|
||||
|
||||
return results
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户