你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-07 15:10:13 +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
|
self.highestfreqthres = 60
|
||||||
# Maximum allowable percentage physical phase-velocity phase error
|
# Maximum allowable percentage physical phase-velocity phase error
|
||||||
self.maxnumericaldisp = 2
|
self.maxnumericaldisp = 2
|
||||||
|
# Minimum grid sampling of smallest wavelength for physical wave propagation
|
||||||
|
self.mingridsampling = 3
|
||||||
|
|
||||||
self.nx = 0
|
self.nx = 0
|
||||||
self.ny = 0
|
self.ny = 0
|
||||||
@@ -244,17 +246,16 @@ def dispersion_analysis(G):
|
|||||||
# Grid sampling density
|
# Grid sampling density
|
||||||
results['N'] = minwavelength / delta
|
results['N'] = minwavelength / delta
|
||||||
|
|
||||||
# If there is an invalid inverse sine value set to maximum, i.e. pi/2
|
# Check grid sampling will result in physical wave propagation
|
||||||
try:
|
if int(np.floor(results['N'])) >= G.mingridsampling:
|
||||||
tmp = np.arcsin((1 / S) * np.sin((np.pi * S) / results['N']))
|
# Numerical phase velocity
|
||||||
except FloatingPointError:
|
vp = np.pi / (results['N'] * np.arcsin((1 / S) * np.sin((np.pi * S) / results['N'])))
|
||||||
tmp = np.pi / 2
|
|
||||||
|
|
||||||
# Numerical phase velocity
|
# Physical phase velocity error (percentage)
|
||||||
vp = np.pi / (results['N'] * tmp)
|
results['deltavp'] = (((vp * c) - c) / c) * 100
|
||||||
|
|
||||||
# Physical phase velocity error (percentage)
|
# Store rounded down value of grid sampling density
|
||||||
results['deltavp'] = (((vp * c) - c) / c) * 100
|
results['N'] = int(np.floor(results['N']))
|
||||||
|
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
在新工单中引用
屏蔽一个用户