First commit

这个提交包含在:
Craig Warren
2015-09-30 14:26:59 +01:00
当前提交 843ec686de
共有 122 个文件被更改,包括 16784 次插入0 次删除

0
tests/__init__.py 普通文件
查看文件

查看文件

@@ -0,0 +1,13 @@
#title: Hertzian dipole in free-space
#domain: 0.100 0.100 0.100
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 3e-9
#waveform: gaussiandot 1 1e9 myWave
#hertzian_dipole: z 0.050 0.050 0.050 myWave
#rx: 0.070 0.070 0.070
python:
for time in range(1,50):
print('#snapshot: 0.001 0.001 0.001 0.099 0.099 0.099 0.001 0.001 0.001 {} {}'.format(0.1e-9 * time, 'snap' + str(time)))
end_python:

二进制文件未显示。

查看文件

@@ -0,0 +1,157 @@
import numpy as np
from gprMax.constants import c, e0
from gprMax.utilities import rvalue
from gprMax.waveforms import Waveform
def hertzian_dipole_fs(timewindow, dt, dxdydz, rx):
"""Analytical solution of a z-directed Hertzian dipole in free space with a Gaussian current waveform (http://dx.doi.org/10.1016/0021-9991(83)90103-1).
Args:
timewindow (float): Length of time window (seconds).
dt (float): Time step (seconds).
dxdydz (float): Tuple of spatial resolution (metres).
rx (float): Tuple of coordinates of receiver position relative to transmitter position (metres).
Returns:
fields (float): Array contain electric and magnetic field components.
"""
# Waveform
w = Waveform()
w.type = 'gaussiandot'
w.amp = 1
w.freq = 1e9
# Waveform integral
wint = Waveform()
wint.type = 'gaussian'
wint.amp = w.amp
wint.freq = w.freq
# Waveform first derivative
wdot = Waveform()
wdot.type = 'gaussiandotdot'
wdot.amp = w.amp
wdot.freq = w.freq
# Time
iterations = rvalue(timewindow / dt)
time = np.linspace(0, timewindow, iterations)
# Spatial resolution
dx = dxdydz[0]
dy = dxdydz[1]
dz = dxdydz[2]
# Coordinates of Rx relative to Tx
x = rx[0]
y = rx[1]
z = rx[2]
if z == 0:
sign_z = 1
else:
sign_z = np.sign(z)
# Coordinates of Rx for Ex FDTD component
Ex_x = x + 0.5 * dx
Ex_y = y
Ex_z = z - 0.5 * dz
Er_x = np.sqrt((Ex_x**2 + Ex_y**2 + Ex_z**2))
tau_Ex = Er_x / c
# Coordinates of Rx for Ey FDTD component
Ey_x = x
Ey_y = y + 0.5 * dy
Ey_z = z - 0.5 * dz
Er_y = np.sqrt((Ey_x**2 + Ey_y**2 + Ey_z**2))
tau_Ey = Er_y / c
# Coordinates of Rx for Ez FDTD component
Ez_x = x
Ez_y = y
Ez_z = z
Er_z = np.sqrt((Ez_x**2 + Ez_y**2 + Ez_z**2))
tau_Ez = Er_z / c
# Coordinates of Rx for Hx FDTD component
Hx_x = x
Hx_y = y + 0.5 * dy
Hx_z = z
Hr_x = np.sqrt((Hx_x**2 + Hx_y**2 + Hx_z**2))
tau_Hx = Hr_x / c
# Coordinates of Rx for Hy FDTD component
Hy_x = x + 0.5 * dx
Hy_y = y
Hy_z = z
Hr_y = np.sqrt((Hy_x**2 + Hy_y**2 + Hy_z**2))
tau_Hy = Hr_y / c
# Coordinates of Rx for Hz FDTD component
Hz_x = x + 0.5 * dx
Hz_y = y + 0.5 * dy
Hz_z = z - 0.5 * dz
Hr_z = np.sqrt((Hz_x**2 + Hz_y**2 + Hz_z**2))
tau_Hz = Hr_z / c
# Initialise fields
fields = np.zeros((iterations, 6))
# Calculate fields
for timestep in range(iterations):
# Calculate values for waveform
fint_Ex = wint.calculate_value((timestep * dt) - tau_Ex, dt) * dx
f_Ex = w.calculate_value((timestep * dt) - tau_Ex, dt) * dx
fdot_Ex = wdot.calculate_value((timestep * dt) - tau_Ex, dt) * dx
fint_Ey = wint.calculate_value((timestep * dt) - tau_Ey, dt) * dy
f_Ey= w.calculate_value((timestep * dt) - tau_Ey, dt) * dy
fdot_Ey = wdot.calculate_value((timestep * dt) - tau_Ey, dt) * dy
fint_Ez = wint.calculate_value((timestep * dt) - tau_Ez, dt) * dz
f_Ez = w.calculate_value((timestep * dt) - tau_Ez, dt) * dz
fdot_Ez = wdot.calculate_value((timestep * dt) - tau_Ez, dt) * dz
fint_Hx = wint.calculate_value((timestep * dt) - tau_Hx, dt) * dx
f_Hx = w.calculate_value((timestep * dt) - tau_Hx, dt) * dx
fdot_Hx = wdot.calculate_value((timestep * dt) - tau_Hx, dt) * dx
fint_Hy = wint.calculate_value((timestep * dt) - tau_Hy, dt) * dy
f_Hy= w.calculate_value((timestep * dt) - tau_Hy, dt) * dy
fdot_Hy = wdot.calculate_value((timestep * dt) - tau_Hy, dt) * dy
fint_Hz = wint.calculate_value((timestep * dt) - tau_Hz, dt) * dz
f_Hz = w.calculate_value((timestep * dt) - tau_Hz, dt) * dz
fdot_Hz = wdot.calculate_value((timestep * dt) - tau_Hz, dt) * dz
# Ex
fields[timestep, 0] = ((Ex_x * Ex_z) / (4 * np.pi * e0 * Er_x**5)) * (3 * (fint_Ex + (tau_Ex * f_Ex)) + (tau_Ex**2 * fdot_Ex))
# Ey
try:
tmp = Ey_y / Ey_x
except ZeroDivisionError:
tmp = 0
fields[timestep, 1] = tmp * ((Ey_x * Ey_z) / (4 * np.pi * e0 * Er_y**5)) * (3 * (fint_Ey + (tau_Ey * f_Ey)) + (tau_Ey**2 * fdot_Ey))
# Ez
fields[timestep, 2] = (1 / (4 * np.pi * e0 * Er_z**5)) * ((2 * Ez_z**2 - (Ez_x**2 + Ez_y**2)) * (fint_Ez + (tau_Ez * f_Ez)) - (Ez_x**2 + Ez_y**2) * tau_Ez**2 * fdot_Ez)
# Hx
fields[timestep, 3] = - (Hx_y / (4 * np.pi * Hr_x**3)) * (f_Hx + (tau_Hx * fdot_Hx))
# Hy
try:
tmp = Hy_x / Hy_y
except ZeroDivisionError:
tmp = 0
fields[timestep, 4] = - tmp * (- (Hy_y / (4 * np.pi * Hr_y**3)) * (f_Hy + (tau_Hy * fdot_Hy)))
# Hz
fields[timestep, 5] = 0
return fields

查看文件

@@ -0,0 +1,10 @@
#title: GSSI 1.5GHz 'like' antenna in free-space
#domain: 0.250 0.187 0.183
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 8E-9
#python:
from user_libs.antennas import antenna_like_GSSI_1500
antenna_like_GSSI_1500(0.125, 0.094, 0.100)
#end_python:

二进制文件未显示。

查看文件

@@ -0,0 +1,82 @@
#title: GSSI 1.5GHz 'like' antenna in free-space
#domain: 0.250 0.187 0.183
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 8E-9
#material: 1.7 0.59 1.0 0.0 absorber
#material: 3.0 0.0 1.0 0.0 pcb
#material: 2.35 0.0 1.0 0.0 hdpe
#box: 0.039999999999999994 0.04 0.10400000000000001 0.21000000000000002 0.148 0.14700000000000002 hdpe
#box: 0.041999999999999996 0.042 0.10400000000000001 0.20800000000000002 0.146 0.14500000000000002 free_space
#box: 0.065 0.042 0.10400000000000001 0.18500000000000003 0.146 0.131 pec
#box: 0.067 0.044000000000000004 0.10400000000000001 0.124 0.144 0.128 pcb
#box: 0.07 0.04700000000000001 0.10400000000000001 0.121 0.141 0.129 absorber
#box: 0.126 0.044000000000000004 0.10400000000000001 0.183 0.144 0.128 pcb
#box: 0.129 0.04700000000000001 0.10400000000000001 0.18 0.141 0.129 absorber
#box: 0.07 0.04700000000000001 0.10400000000000001 0.121 0.141 0.10600000000000001 pcb
#box: 0.129 0.04700000000000001 0.10400000000000001 0.18 0.141 0.10600000000000001 pcb
#plate: 0.08499999999999999 0.079 0.10400000000000001 0.105 0.08 0.10400000000000001 pec
#plate: 0.08499999999999999 0.10700000000000001 0.10400000000000001 0.105 0.10800000000000001 0.10400000000000001 pec
#plate: 0.144 0.079 0.10400000000000001 0.16399999999999998 0.08 0.10400000000000001 pec
#plate: 0.144 0.10700000000000001 0.10400000000000001 0.16399999999999998 0.10800000000000001 0.10400000000000001 pec
#plate: 0.086 0.08 0.10400000000000001 0.104 0.081 0.10400000000000001 pec
#plate: 0.086 0.10600000000000001 0.10400000000000001 0.104 0.10700000000000001 0.10400000000000001 pec
#plate: 0.145 0.08 0.10400000000000001 0.16299999999999998 0.081 0.10400000000000001 pec
#plate: 0.145 0.10600000000000001 0.10400000000000001 0.16299999999999998 0.10700000000000001 0.10400000000000001 pec
#plate: 0.087 0.081 0.10400000000000001 0.103 0.082 0.10400000000000001 pec
#plate: 0.087 0.10500000000000001 0.10400000000000001 0.103 0.10600000000000001 0.10400000000000001 pec
#plate: 0.146 0.081 0.10400000000000001 0.16199999999999998 0.082 0.10400000000000001 pec
#plate: 0.146 0.10500000000000001 0.10400000000000001 0.16199999999999998 0.10600000000000001 0.10400000000000001 pec
#plate: 0.087 0.082 0.10400000000000001 0.103 0.083 0.10400000000000001 pec
#plate: 0.087 0.10400000000000001 0.10400000000000001 0.103 0.10500000000000001 0.10400000000000001 pec
#plate: 0.146 0.082 0.10400000000000001 0.16199999999999998 0.083 0.10400000000000001 pec
#plate: 0.146 0.10400000000000001 0.10400000000000001 0.16199999999999998 0.10500000000000001 0.10400000000000001 pec
#plate: 0.088 0.083 0.10400000000000001 0.102 0.084 0.10400000000000001 pec
#plate: 0.088 0.10300000000000001 0.10400000000000001 0.102 0.10400000000000001 0.10400000000000001 pec
#plate: 0.147 0.083 0.10400000000000001 0.16099999999999998 0.084 0.10400000000000001 pec
#plate: 0.147 0.10300000000000001 0.10400000000000001 0.16099999999999998 0.10400000000000001 0.10400000000000001 pec
#plate: 0.089 0.084 0.10400000000000001 0.10099999999999999 0.085 0.10400000000000001 pec
#plate: 0.089 0.10200000000000001 0.10400000000000001 0.10099999999999999 0.10300000000000001 0.10400000000000001 pec
#plate: 0.148 0.084 0.10400000000000001 0.15999999999999998 0.085 0.10400000000000001 pec
#plate: 0.148 0.10200000000000001 0.10400000000000001 0.15999999999999998 0.10300000000000001 0.10400000000000001 pec
#plate: 0.089 0.085 0.10400000000000001 0.10099999999999999 0.08600000000000001 0.10400000000000001 pec
#plate: 0.089 0.101 0.10400000000000001 0.10099999999999999 0.10200000000000001 0.10400000000000001 pec
#plate: 0.148 0.085 0.10400000000000001 0.15999999999999998 0.08600000000000001 0.10400000000000001 pec
#plate: 0.148 0.101 0.10400000000000001 0.15999999999999998 0.10200000000000001 0.10400000000000001 pec
#plate: 0.09 0.08600000000000001 0.10400000000000001 0.09999999999999999 0.08700000000000001 0.10400000000000001 pec
#plate: 0.09 0.1 0.10400000000000001 0.09999999999999999 0.101 0.10400000000000001 pec
#plate: 0.149 0.08600000000000001 0.10400000000000001 0.15899999999999997 0.08700000000000001 0.10400000000000001 pec
#plate: 0.149 0.1 0.10400000000000001 0.15899999999999997 0.101 0.10400000000000001 pec
#plate: 0.091 0.087 0.10400000000000001 0.09899999999999999 0.088 0.10400000000000001 pec
#plate: 0.091 0.099 0.10400000000000001 0.09899999999999999 0.1 0.10400000000000001 pec
#plate: 0.15 0.087 0.10400000000000001 0.15799999999999997 0.088 0.10400000000000001 pec
#plate: 0.15 0.099 0.10400000000000001 0.15799999999999997 0.1 0.10400000000000001 pec
#plate: 0.092 0.088 0.10400000000000001 0.09799999999999999 0.089 0.10400000000000001 pec
#plate: 0.092 0.098 0.10400000000000001 0.09799999999999999 0.099 0.10400000000000001 pec
#plate: 0.151 0.088 0.10400000000000001 0.15699999999999997 0.089 0.10400000000000001 pec
#plate: 0.151 0.098 0.10400000000000001 0.15699999999999997 0.099 0.10400000000000001 pec
#plate: 0.092 0.089 0.10400000000000001 0.09799999999999999 0.09 0.10400000000000001 pec
#plate: 0.092 0.09700000000000002 0.10400000000000001 0.09799999999999999 0.09800000000000002 0.10400000000000001 pec
#plate: 0.151 0.089 0.10400000000000001 0.15699999999999997 0.09 0.10400000000000001 pec
#plate: 0.151 0.09700000000000002 0.10400000000000001 0.15699999999999997 0.09800000000000002 0.10400000000000001 pec
#plate: 0.093 0.09 0.10400000000000001 0.097 0.091 0.10400000000000001 pec
#plate: 0.093 0.09600000000000002 0.10400000000000001 0.097 0.09700000000000002 0.10400000000000001 pec
#plate: 0.152 0.09 0.10400000000000001 0.15599999999999997 0.091 0.10400000000000001 pec
#plate: 0.152 0.09600000000000002 0.10400000000000001 0.15599999999999997 0.09700000000000002 0.10400000000000001 pec
#plate: 0.094 0.091 0.10400000000000001 0.096 0.092 0.10400000000000001 pec
#plate: 0.094 0.09500000000000001 0.10400000000000001 0.096 0.09600000000000002 0.10400000000000001 pec
#plate: 0.153 0.091 0.10400000000000001 0.15499999999999997 0.092 0.10400000000000001 pec
#plate: 0.153 0.09500000000000001 0.10400000000000001 0.15499999999999997 0.09600000000000002 0.10400000000000001 pec
#plate: 0.08399999999999999 0.10800000000000001 0.10400000000000001 0.10599999999999998 0.12300000000000001 0.10400000000000001 pec
#plate: 0.143 0.10800000000000001 0.10400000000000001 0.16499999999999998 0.12300000000000001 0.10400000000000001 pec
#edge: 0.095 0.092 0.10400000000000001 0.095 0.093 0.10400000000000001 pec
#edge: 0.095 0.094 0.10400000000000001 0.095 0.095 0.10400000000000001 pec
#edge: 0.154 0.092 0.10400000000000001 0.154 0.093 0.10400000000000001 pec
#edge: 0.154 0.094 0.10400000000000001 0.154 0.095 0.10400000000000001 pec
#plate: 0.08399999999999999 0.064 0.10400000000000001 0.10599999999999998 0.079 0.10400000000000001 pec
#plate: 0.143 0.064 0.10400000000000001 0.16499999999999998 0.079 0.10400000000000001 pec
#box: 0.039999999999999994 0.04 0.1 0.21000000000000002 0.148 0.10400000000000001 hdpe
#geometry_view: 0.03899999999999999 0.039 0.099 0.21100000000000002 0.149 0.14800000000000002 0.001 0.001 0.001 antenna_like_GSSI_1500 n
#geometry_view: 0.039999999999999994 0.04 0.1 0.21000000000000002 0.148 0.11 0.001 0.001 0.001 antenna_like_GSSI_1500_pcb f
#waveform: gaussian 1.0 1500000000.0 myGaussian
#voltage_source: y 0.154 0.093 0.10400000000000001 50 myGaussian
#rx: 0.095 0.093 0.10400000000000001

文件差异内容过多而无法显示 加载差异

二进制文件未显示。

查看文件

@@ -0,0 +1,10 @@
#title: MALA 1.2GHz 'like' antenna in free-space
#domain: 0.264 0.189 0.220
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 6e-9
#python:
from user_libs.antennas import antenna_like_MALA_1200
antenna_like_MALA_1200(0.132, 0.095, 0.100)
#end_python:

二进制文件未显示。

查看文件

@@ -0,0 +1,77 @@
#title: MALA 1.2GHz 'like' antenna in free-space
#domain: 0.264 0.189 0.220
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 6e-9
#material: 6.49 0.252 1.0 0.0 absorber
#material: 3.0 0.0 1.0 0.0 pcb
#material: 2.35 0.0 1.0 0.0 hdpe
#material: 2.26 0.0 1.0 0.0 polypropylene
#material: 3.0 4.255 1.0 0.0 txreslower
#material: 3.0 3.191 1.0 0.0 txresupper
#material: 3.0 13.333 1.0 0.0 rxreslower
#material: 3.0 10.000 1.0 0.0 rxresupper
#box: 0.04000000000000001 0.0405 0.10600000000000001 0.224 0.1495 0.14600000000000002 pec
#box: 0.06000000000000001 0.0425 0.10600000000000001 0.14 0.1475 0.10800000000000001 free_space
#box: 0.14 0.0425 0.10600000000000001 0.222 0.1475 0.10800000000000001 free_space
#box: 0.06000000000000001 0.0425 0.10600000000000001 0.14 0.1475 0.14400000000000002 absorber
#box: 0.14 0.0425 0.10600000000000001 0.222 0.1475 0.14400000000000002 absorber
#cylinder: 0.095 0.1415 0.10600000000000001 0.095 0.1415 0.14400000000000002 0.008 pec
#cylinder: 0.095 0.0485 0.10600000000000001 0.095 0.0485 0.14400000000000002 0.008 pec
#cylinder: 0.187 0.1415 0.10600000000000001 0.187 0.1415 0.14400000000000002 0.008 pec
#cylinder: 0.187 0.0485 0.10600000000000001 0.187 0.0485 0.14400000000000002 0.008 pec
#cylinder: 0.095 0.1415 0.10600000000000001 0.095 0.1415 0.14400000000000002 0.007 free_space
#cylinder: 0.095 0.0485 0.10600000000000001 0.095 0.0485 0.14400000000000002 0.007 free_space
#cylinder: 0.187 0.1415 0.10600000000000001 0.187 0.1415 0.14400000000000002 0.007 free_space
#cylinder: 0.187 0.0485 0.10600000000000001 0.187 0.0485 0.14400000000000002 0.007 free_space
#box: 0.094 0.1335 0.10600000000000001 0.096 0.13549999999999998 0.14400000000000002 free_space
#box: 0.094 0.0545 0.10600000000000001 0.096 0.0565 0.14400000000000002 free_space
#box: 0.186 0.1335 0.10600000000000001 0.188 0.13549999999999998 0.14400000000000002 free_space
#box: 0.186 0.0545 0.10600000000000001 0.188 0.0565 0.14400000000000002 free_space
#box: 0.06000000000000001 0.058499999999999996 0.10600000000000001 0.222 0.1315 0.10800000000000001 pcb
#box: 0.07200000000000001 0.0625 0.10600000000000001 0.134 0.1245 0.14300000000000002 pec
#box: 0.07300000000000001 0.0635 0.10600000000000001 0.133 0.1235 0.14300000000000002 absorber
#box: 0.14800000000000002 0.0625 0.10600000000000001 0.21000000000000002 0.1245 0.14300000000000002 pec
#box: 0.14900000000000002 0.0635 0.10600000000000001 0.20900000000000002 0.1235 0.14300000000000002 free_space
#box: 0.134 0.1185 0.14100000000000001 0.14800000000000002 0.1245 0.14300000000000002 pec
#box: 0.134 0.0625 0.14100000000000001 0.14800000000000002 0.0685 0.14300000000000002 pec
#box: 0.07300000000000001 0.0635 0.10600000000000001 0.133 0.1235 0.10800000000000001 pcb
#box: 0.14900000000000002 0.0635 0.10600000000000001 0.20900000000000002 0.1235 0.10800000000000001 pcb
#triangle: 0.10300000000000001 0.0915 0.10600000000000001 0.07700000000000001 0.0665 0.10600000000000001 0.129 0.0665 0.10600000000000001 0 pec
#edge: 0.10300000000000001 0.0915 0.10600000000000001 0.10300000000000001 0.0925 0.10600000000000001 pec
#triangle: 0.10300000000000001 0.0945 0.10600000000000001 0.07700000000000001 0.1195 0.10600000000000001 0.129 0.1195 0.10600000000000001 0 pec
#edge: 0.10300000000000001 0.0935 0.10600000000000001 0.10300000000000001 0.0945 0.10600000000000001 pec
#triangle: 0.179 0.0915 0.10600000000000001 0.153 0.0665 0.10600000000000001 0.205 0.0665 0.10600000000000001 0 pec
#edge: 0.179 0.0915 0.10600000000000001 0.179 0.0925 0.10600000000000001 pec
#triangle: 0.179 0.0945 0.10600000000000001 0.153 0.1195 0.10600000000000001 0.205 0.1195 0.10600000000000001 0 pec
#edge: 0.179 0.0935 0.10600000000000001 0.179 0.0945 0.10600000000000001 pec
#edge: 0.08000000000000002 0.0635 0.10600000000000001 0.08000000000000002 0.0665 0.10600000000000001 txreslower
#edge: 0.08100000000000002 0.0635 0.10600000000000001 0.08100000000000002 0.0665 0.10600000000000001 txreslower
#edge: 0.10300000000000001 0.0635 0.10600000000000001 0.10300000000000001 0.0665 0.10600000000000001 txreslower
#edge: 0.10400000000000001 0.0635 0.10600000000000001 0.10400000000000001 0.0665 0.10600000000000001 txreslower
#edge: 0.125 0.0635 0.10600000000000001 0.125 0.0665 0.10600000000000001 txreslower
#edge: 0.126 0.0635 0.10600000000000001 0.126 0.0665 0.10600000000000001 txreslower
#edge: 0.08000000000000002 0.1195 0.10600000000000001 0.08000000000000002 0.1235 0.10600000000000001 txresupper
#edge: 0.08100000000000002 0.1195 0.10600000000000001 0.08100000000000002 0.1235 0.10600000000000001 txresupper
#edge: 0.10300000000000001 0.1195 0.10600000000000001 0.10300000000000001 0.1235 0.10600000000000001 txresupper
#edge: 0.10400000000000001 0.1195 0.10600000000000001 0.10400000000000001 0.1235 0.10600000000000001 txresupper
#edge: 0.125 0.1195 0.10600000000000001 0.125 0.1235 0.10600000000000001 txresupper
#edge: 0.126 0.1195 0.10600000000000001 0.126 0.1235 0.10600000000000001 txresupper
#edge: 0.15600000000000003 0.0635 0.10600000000000001 0.15600000000000003 0.0665 0.10600000000000001 rxreslower
#edge: 0.15700000000000003 0.0635 0.10600000000000001 0.15700000000000003 0.0665 0.10600000000000001 rxreslower
#edge: 0.179 0.0635 0.10600000000000001 0.179 0.0665 0.10600000000000001 rxreslower
#edge: 0.18 0.0635 0.10600000000000001 0.18 0.0665 0.10600000000000001 rxreslower
#edge: 0.201 0.0635 0.10600000000000001 0.201 0.0665 0.10600000000000001 rxreslower
#edge: 0.202 0.0635 0.10600000000000001 0.202 0.0665 0.10600000000000001 rxreslower
#edge: 0.15600000000000003 0.1195 0.10600000000000001 0.15600000000000003 0.1235 0.10600000000000001 rxresupper
#edge: 0.15700000000000003 0.1195 0.10600000000000001 0.15700000000000003 0.1235 0.10600000000000001 rxresupper
#edge: 0.179 0.1195 0.10600000000000001 0.179 0.1235 0.10600000000000001 rxresupper
#edge: 0.18 0.1195 0.10600000000000001 0.18 0.1235 0.10600000000000001 rxresupper
#edge: 0.201 0.1195 0.10600000000000001 0.201 0.1235 0.10600000000000001 rxresupper
#edge: 0.202 0.1195 0.10600000000000001 0.202 0.1235 0.10600000000000001 rxresupper
#box: 0.04000000000000001 0.0405 0.1 0.224 0.1495 0.10300000000000001 polypropylene
#box: 0.04000000000000001 0.0405 0.10300000000000001 0.224 0.1495 0.10600000000000001 hdpe
#geometry_view: 0.03900000000000001 0.0395 0.099 0.225 0.1505 0.14700000000000002 0.001 0.001 0.001 antenna_like_MALA_1200 n
#geometry_view: 0.04000000000000001 0.0405 0.1 0.224 0.1495 0.11 0.001 0.001 0.001 antenna_like_MALA_1200_pcb f
#waveform: gaussian 1.0 978000000.0 myGaussian
#voltage_source: y 0.10300000000000001 0.0925 0.10600000000000001 1000 myGaussian
#rx: 0.179 0.0925 0.10600000000000001

文件差异内容过多而无法显示 加载差异

二进制文件未显示。

查看文件

@@ -0,0 +1,27 @@
#title: Test of geometry commands and averaging behaviour
#domain: 0.1 0.1 0.1
#time_window: 1
#dx_dy_dz: 0.001 0.001 0.001
#material: 2 0 1 0 mat2
#material: 3 0 1 0 mat3
#material: 4 0 1 0 mat4
#material: 5 0 1 0 mat5
plate: 0.050 0.010 0.030 0.050 0.030 0.050 mat2
box: 0.020 0.020 0.020 0.040 0.040 0.040 mat2
cylinder: 0.090 0.020 0.010 0.090 0.080 0.010 0.005 mat3
cylinder: 0.050 0.050 0.020 0.070 0.070 0.080 0.005 mat3
#cylindrical_sector: x 0.050 0.050 0.040 0.050 0.015 0 90 mat3
sphere: 0.100 0.100 0.100 0.040 mat4
#triangle: 0.020 0.020 0.020 0.020 0.035 0.035 0.020 0.050 0.020 0 mat5
triangle: 0.020 0.020 0.020 0.020 0.035 0.035 0.020 0.050 0.020 0.010 mat5
#geometry_view: 0 0 0 0.1 0.1 0.1 0.001 0.001 0.001 geometry_averaging_solid n
#geometry_view: 0 0 0 0.1 0.1 0.1 0.001 0.001 0.001 geometry_averaging_IDs f

查看文件

@@ -0,0 +1,88 @@
#title: GSSI 1.5GHz 'like' antenna in free-space
#domain: 0.250 0.187 0.183
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 8E-9
#medium: 1.7 0 0 0.59 1.0 0.0 absorber
#medium: 3.0 0 0 0.0 1.0 0.0 pcb
#medium: 2.35 0 0 0.0 1.0 0.0 hdpe
#box: 0.039999999999999994 0.04 0.10400000000000001 0.21000000000000002 0.148 0.14700000000000002 hdpe
#box: 0.041999999999999996 0.042 0.10400000000000001 0.20800000000000002 0.146 0.14500000000000002 free_space
#box: 0.065 0.042 0.10400000000000001 0.18500000000000003 0.146 0.131 pec
#box: 0.067 0.044000000000000004 0.10400000000000001 0.124 0.144 0.128 pcb
#box: 0.07 0.04700000000000001 0.10400000000000001 0.121 0.141 0.129 absorber
#box: 0.126 0.044000000000000004 0.10400000000000001 0.183 0.144 0.128 pcb
#box: 0.129 0.04700000000000001 0.10400000000000001 0.18 0.141 0.129 absorber
#box: 0.07 0.04700000000000001 0.10400000000000001 0.121 0.141 0.10600000000000001 pcb
#box: 0.129 0.04700000000000001 0.10400000000000001 0.18 0.141 0.10600000000000001 pcb
#plate: 0.08499999999999999 0.079 0.10400000000000001 0.105 0.08 0.10400000000000001 pec
#plate: 0.08499999999999999 0.10700000000000001 0.10400000000000001 0.105 0.10800000000000001 0.10400000000000001 pec
#plate: 0.144 0.079 0.10400000000000001 0.16399999999999998 0.08 0.10400000000000001 pec
#plate: 0.144 0.10700000000000001 0.10400000000000001 0.16399999999999998 0.10800000000000001 0.10400000000000001 pec
#plate: 0.086 0.08 0.10400000000000001 0.104 0.081 0.10400000000000001 pec
#plate: 0.086 0.10600000000000001 0.10400000000000001 0.104 0.10700000000000001 0.10400000000000001 pec
#plate: 0.145 0.08 0.10400000000000001 0.16299999999999998 0.081 0.10400000000000001 pec
#plate: 0.145 0.10600000000000001 0.10400000000000001 0.16299999999999998 0.10700000000000001 0.10400000000000001 pec
#plate: 0.087 0.081 0.10400000000000001 0.103 0.082 0.10400000000000001 pec
#plate: 0.087 0.10500000000000001 0.10400000000000001 0.103 0.10600000000000001 0.10400000000000001 pec
#plate: 0.146 0.081 0.10400000000000001 0.16199999999999998 0.082 0.10400000000000001 pec
#plate: 0.146 0.10500000000000001 0.10400000000000001 0.16199999999999998 0.10600000000000001 0.10400000000000001 pec
#plate: 0.087 0.082 0.10400000000000001 0.103 0.083 0.10400000000000001 pec
#plate: 0.087 0.10400000000000001 0.10400000000000001 0.103 0.10500000000000001 0.10400000000000001 pec
#plate: 0.146 0.082 0.10400000000000001 0.16199999999999998 0.083 0.10400000000000001 pec
#plate: 0.146 0.10400000000000001 0.10400000000000001 0.16199999999999998 0.10500000000000001 0.10400000000000001 pec
#plate: 0.088 0.083 0.10400000000000001 0.102 0.084 0.10400000000000001 pec
#plate: 0.088 0.10300000000000001 0.10400000000000001 0.102 0.10400000000000001 0.10400000000000001 pec
#plate: 0.147 0.083 0.10400000000000001 0.16099999999999998 0.084 0.10400000000000001 pec
#plate: 0.147 0.10300000000000001 0.10400000000000001 0.16099999999999998 0.10400000000000001 0.10400000000000001 pec
#plate: 0.089 0.084 0.10400000000000001 0.10099999999999999 0.085 0.10400000000000001 pec
#plate: 0.089 0.10200000000000001 0.10400000000000001 0.10099999999999999 0.10300000000000001 0.10400000000000001 pec
#plate: 0.148 0.084 0.10400000000000001 0.15999999999999998 0.085 0.10400000000000001 pec
#plate: 0.148 0.10200000000000001 0.10400000000000001 0.15999999999999998 0.10300000000000001 0.10400000000000001 pec
#plate: 0.089 0.085 0.10400000000000001 0.10099999999999999 0.08600000000000001 0.10400000000000001 pec
#plate: 0.089 0.101 0.10400000000000001 0.10099999999999999 0.10200000000000001 0.10400000000000001 pec
#plate: 0.148 0.085 0.10400000000000001 0.15999999999999998 0.08600000000000001 0.10400000000000001 pec
#plate: 0.148 0.101 0.10400000000000001 0.15999999999999998 0.10200000000000001 0.10400000000000001 pec
#plate: 0.09 0.08600000000000001 0.10400000000000001 0.09999999999999999 0.08700000000000001 0.10400000000000001 pec
#plate: 0.09 0.1 0.10400000000000001 0.09999999999999999 0.101 0.10400000000000001 pec
#plate: 0.149 0.08600000000000001 0.10400000000000001 0.15899999999999997 0.08700000000000001 0.10400000000000001 pec
#plate: 0.149 0.1 0.10400000000000001 0.15899999999999997 0.101 0.10400000000000001 pec
#plate: 0.091 0.087 0.10400000000000001 0.09899999999999999 0.088 0.10400000000000001 pec
#plate: 0.091 0.099 0.10400000000000001 0.09899999999999999 0.1 0.10400000000000001 pec
#plate: 0.15 0.087 0.10400000000000001 0.15799999999999997 0.088 0.10400000000000001 pec
#plate: 0.15 0.099 0.10400000000000001 0.15799999999999997 0.1 0.10400000000000001 pec
#plate: 0.092 0.088 0.10400000000000001 0.09799999999999999 0.089 0.10400000000000001 pec
#plate: 0.092 0.098 0.10400000000000001 0.09799999999999999 0.099 0.10400000000000001 pec
#plate: 0.151 0.088 0.10400000000000001 0.15699999999999997 0.089 0.10400000000000001 pec
#plate: 0.151 0.098 0.10400000000000001 0.15699999999999997 0.099 0.10400000000000001 pec
#plate: 0.092 0.089 0.10400000000000001 0.09799999999999999 0.09 0.10400000000000001 pec
#plate: 0.092 0.09700000000000002 0.10400000000000001 0.09799999999999999 0.09800000000000002 0.10400000000000001 pec
#plate: 0.151 0.089 0.10400000000000001 0.15699999999999997 0.09 0.10400000000000001 pec
#plate: 0.151 0.09700000000000002 0.10400000000000001 0.15699999999999997 0.09800000000000002 0.10400000000000001 pec
#plate: 0.093 0.09 0.10400000000000001 0.097 0.091 0.10400000000000001 pec
#plate: 0.093 0.09600000000000002 0.10400000000000001 0.097 0.09700000000000002 0.10400000000000001 pec
#plate: 0.152 0.09 0.10400000000000001 0.15599999999999997 0.091 0.10400000000000001 pec
#plate: 0.152 0.09600000000000002 0.10400000000000001 0.15599999999999997 0.09700000000000002 0.10400000000000001 pec
#plate: 0.094 0.091 0.10400000000000001 0.096 0.092 0.10400000000000001 pec
#plate: 0.094 0.09500000000000001 0.10400000000000001 0.096 0.09600000000000002 0.10400000000000001 pec
#plate: 0.153 0.091 0.10400000000000001 0.15499999999999997 0.092 0.10400000000000001 pec
#plate: 0.153 0.09500000000000001 0.10400000000000001 0.15499999999999997 0.09600000000000002 0.10400000000000001 pec
#plate: 0.08399999999999999 0.10800000000000001 0.10400000000000001 0.10599999999999998 0.12300000000000001 0.10400000000000001 pec
#plate: 0.143 0.10800000000000001 0.10400000000000001 0.16499999999999998 0.12300000000000001 0.10400000000000001 pec
#edge: 0.095 0.092 0.10400000000000001 0.095 0.093 0.10400000000000001 pec
#edge: 0.095 0.094 0.10400000000000001 0.095 0.095 0.10400000000000001 pec
#edge: 0.154 0.092 0.10400000000000001 0.154 0.093 0.10400000000000001 pec
#edge: 0.154 0.094 0.10400000000000001 0.154 0.095 0.10400000000000001 pec
#plate: 0.08399999999999999 0.064 0.10400000000000001 0.10599999999999998 0.079 0.10400000000000001 pec
#plate: 0.143 0.064 0.10400000000000001 0.16499999999999998 0.079 0.10400000000000001 pec
#box: 0.039999999999999994 0.04 0.1 0.21000000000000002 0.148 0.10400000000000001 hdpe
#geometry_vtk: 0.03899999999999999 0.039 0.099 0.21100000000000002 0.149 0.14800000000000002 0.001 0.001 0.001 antenna_like_GSSI_1500 n
#geometry_vtk: 0.039999999999999994 0.04 0.1 0.21000000000000002 0.148 0.11 0.001 0.001 0.001 antenna_like_GSSI_1500_pcb f
#messages: y
#num_of_procs: 8
#abc_type: pml
#pml_layers: 10
#voltage_source: 1.0 1500000000.0 gaussian 50 myGaussian
#analysis: 1 antenna_GSSI_1500_fs_proc_oldstyle.out b
#rx: 0.095 0.093 0.10400000000000001
#tx: y 0.154 0.093 0.10400000000000001 myGaussian 0 8e-09
#end_analysis:

查看文件

@@ -0,0 +1,10 @@
#title: GSSI 1.5GHz 'like' antenna in free-space
#domain: 0.250 0.187 0.183
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 8E-9
#python:
from user_libs.antennas import antenna_like_GSSI_1500
antenna_like_GSSI_1500(0.125, 0.094, 0.100)
#end_python:

二进制文件未显示。

查看文件

@@ -0,0 +1,82 @@
#title: GSSI 1.5GHz 'like' antenna in free-space
#domain: 0.250 0.187 0.183
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 8E-9
#material: 1.7 0.59 1.0 0.0 absorber
#material: 3.0 0.0 1.0 0.0 pcb
#material: 2.35 0.0 1.0 0.0 hdpe
#box: 0.039999999999999994 0.04 0.10400000000000001 0.21000000000000002 0.148 0.14700000000000002 hdpe
#box: 0.041999999999999996 0.042 0.10400000000000001 0.20800000000000002 0.146 0.14500000000000002 free_space
#box: 0.065 0.042 0.10400000000000001 0.18500000000000003 0.146 0.131 pec
#box: 0.067 0.044000000000000004 0.10400000000000001 0.124 0.144 0.128 pcb
#box: 0.07 0.04700000000000001 0.10400000000000001 0.121 0.141 0.129 absorber
#box: 0.126 0.044000000000000004 0.10400000000000001 0.183 0.144 0.128 pcb
#box: 0.129 0.04700000000000001 0.10400000000000001 0.18 0.141 0.129 absorber
#box: 0.07 0.04700000000000001 0.10400000000000001 0.121 0.141 0.10600000000000001 pcb
#box: 0.129 0.04700000000000001 0.10400000000000001 0.18 0.141 0.10600000000000001 pcb
#plate: 0.08499999999999999 0.079 0.10400000000000001 0.105 0.08 0.10400000000000001 pec
#plate: 0.08499999999999999 0.10700000000000001 0.10400000000000001 0.105 0.10800000000000001 0.10400000000000001 pec
#plate: 0.144 0.079 0.10400000000000001 0.16399999999999998 0.08 0.10400000000000001 pec
#plate: 0.144 0.10700000000000001 0.10400000000000001 0.16399999999999998 0.10800000000000001 0.10400000000000001 pec
#plate: 0.086 0.08 0.10400000000000001 0.104 0.081 0.10400000000000001 pec
#plate: 0.086 0.10600000000000001 0.10400000000000001 0.104 0.10700000000000001 0.10400000000000001 pec
#plate: 0.145 0.08 0.10400000000000001 0.16299999999999998 0.081 0.10400000000000001 pec
#plate: 0.145 0.10600000000000001 0.10400000000000001 0.16299999999999998 0.10700000000000001 0.10400000000000001 pec
#plate: 0.087 0.081 0.10400000000000001 0.103 0.082 0.10400000000000001 pec
#plate: 0.087 0.10500000000000001 0.10400000000000001 0.103 0.10600000000000001 0.10400000000000001 pec
#plate: 0.146 0.081 0.10400000000000001 0.16199999999999998 0.082 0.10400000000000001 pec
#plate: 0.146 0.10500000000000001 0.10400000000000001 0.16199999999999998 0.10600000000000001 0.10400000000000001 pec
#plate: 0.087 0.082 0.10400000000000001 0.103 0.083 0.10400000000000001 pec
#plate: 0.087 0.10400000000000001 0.10400000000000001 0.103 0.10500000000000001 0.10400000000000001 pec
#plate: 0.146 0.082 0.10400000000000001 0.16199999999999998 0.083 0.10400000000000001 pec
#plate: 0.146 0.10400000000000001 0.10400000000000001 0.16199999999999998 0.10500000000000001 0.10400000000000001 pec
#plate: 0.088 0.083 0.10400000000000001 0.102 0.084 0.10400000000000001 pec
#plate: 0.088 0.10300000000000001 0.10400000000000001 0.102 0.10400000000000001 0.10400000000000001 pec
#plate: 0.147 0.083 0.10400000000000001 0.16099999999999998 0.084 0.10400000000000001 pec
#plate: 0.147 0.10300000000000001 0.10400000000000001 0.16099999999999998 0.10400000000000001 0.10400000000000001 pec
#plate: 0.089 0.084 0.10400000000000001 0.10099999999999999 0.085 0.10400000000000001 pec
#plate: 0.089 0.10200000000000001 0.10400000000000001 0.10099999999999999 0.10300000000000001 0.10400000000000001 pec
#plate: 0.148 0.084 0.10400000000000001 0.15999999999999998 0.085 0.10400000000000001 pec
#plate: 0.148 0.10200000000000001 0.10400000000000001 0.15999999999999998 0.10300000000000001 0.10400000000000001 pec
#plate: 0.089 0.085 0.10400000000000001 0.10099999999999999 0.08600000000000001 0.10400000000000001 pec
#plate: 0.089 0.101 0.10400000000000001 0.10099999999999999 0.10200000000000001 0.10400000000000001 pec
#plate: 0.148 0.085 0.10400000000000001 0.15999999999999998 0.08600000000000001 0.10400000000000001 pec
#plate: 0.148 0.101 0.10400000000000001 0.15999999999999998 0.10200000000000001 0.10400000000000001 pec
#plate: 0.09 0.08600000000000001 0.10400000000000001 0.09999999999999999 0.08700000000000001 0.10400000000000001 pec
#plate: 0.09 0.1 0.10400000000000001 0.09999999999999999 0.101 0.10400000000000001 pec
#plate: 0.149 0.08600000000000001 0.10400000000000001 0.15899999999999997 0.08700000000000001 0.10400000000000001 pec
#plate: 0.149 0.1 0.10400000000000001 0.15899999999999997 0.101 0.10400000000000001 pec
#plate: 0.091 0.087 0.10400000000000001 0.09899999999999999 0.088 0.10400000000000001 pec
#plate: 0.091 0.099 0.10400000000000001 0.09899999999999999 0.1 0.10400000000000001 pec
#plate: 0.15 0.087 0.10400000000000001 0.15799999999999997 0.088 0.10400000000000001 pec
#plate: 0.15 0.099 0.10400000000000001 0.15799999999999997 0.1 0.10400000000000001 pec
#plate: 0.092 0.088 0.10400000000000001 0.09799999999999999 0.089 0.10400000000000001 pec
#plate: 0.092 0.098 0.10400000000000001 0.09799999999999999 0.099 0.10400000000000001 pec
#plate: 0.151 0.088 0.10400000000000001 0.15699999999999997 0.089 0.10400000000000001 pec
#plate: 0.151 0.098 0.10400000000000001 0.15699999999999997 0.099 0.10400000000000001 pec
#plate: 0.092 0.089 0.10400000000000001 0.09799999999999999 0.09 0.10400000000000001 pec
#plate: 0.092 0.09700000000000002 0.10400000000000001 0.09799999999999999 0.09800000000000002 0.10400000000000001 pec
#plate: 0.151 0.089 0.10400000000000001 0.15699999999999997 0.09 0.10400000000000001 pec
#plate: 0.151 0.09700000000000002 0.10400000000000001 0.15699999999999997 0.09800000000000002 0.10400000000000001 pec
#plate: 0.093 0.09 0.10400000000000001 0.097 0.091 0.10400000000000001 pec
#plate: 0.093 0.09600000000000002 0.10400000000000001 0.097 0.09700000000000002 0.10400000000000001 pec
#plate: 0.152 0.09 0.10400000000000001 0.15599999999999997 0.091 0.10400000000000001 pec
#plate: 0.152 0.09600000000000002 0.10400000000000001 0.15599999999999997 0.09700000000000002 0.10400000000000001 pec
#plate: 0.094 0.091 0.10400000000000001 0.096 0.092 0.10400000000000001 pec
#plate: 0.094 0.09500000000000001 0.10400000000000001 0.096 0.09600000000000002 0.10400000000000001 pec
#plate: 0.153 0.091 0.10400000000000001 0.15499999999999997 0.092 0.10400000000000001 pec
#plate: 0.153 0.09500000000000001 0.10400000000000001 0.15499999999999997 0.09600000000000002 0.10400000000000001 pec
#plate: 0.08399999999999999 0.10800000000000001 0.10400000000000001 0.10599999999999998 0.12300000000000001 0.10400000000000001 pec
#plate: 0.143 0.10800000000000001 0.10400000000000001 0.16499999999999998 0.12300000000000001 0.10400000000000001 pec
#edge: 0.095 0.092 0.10400000000000001 0.095 0.093 0.10400000000000001 pec
#edge: 0.095 0.094 0.10400000000000001 0.095 0.095 0.10400000000000001 pec
#edge: 0.154 0.092 0.10400000000000001 0.154 0.093 0.10400000000000001 pec
#edge: 0.154 0.094 0.10400000000000001 0.154 0.095 0.10400000000000001 pec
#plate: 0.08399999999999999 0.064 0.10400000000000001 0.10599999999999998 0.079 0.10400000000000001 pec
#plate: 0.143 0.064 0.10400000000000001 0.16499999999999998 0.079 0.10400000000000001 pec
#box: 0.039999999999999994 0.04 0.1 0.21000000000000002 0.148 0.10400000000000001 hdpe
#geometry_view: 0.03899999999999999 0.039 0.099 0.21100000000000002 0.149 0.14800000000000002 0.001 0.001 0.001 antenna_like_GSSI_1500 n
#geometry_view: 0.039999999999999994 0.04 0.1 0.21000000000000002 0.148 0.11 0.001 0.001 0.001 antenna_like_GSSI_1500_pcb f
#waveform: gaussian 1.0 1500000000.0 myGaussian
#voltage_source: y 0.154 0.093 0.10400000000000001 50 myGaussian
#rx: 0.095 0.093 0.10400000000000001

二进制文件未显示。

查看文件

@@ -0,0 +1,84 @@
#title: MALA 1.2GHz 'like' antenna in free-space
#domain: 0.264 0.189 0.220
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 6e-9
#nips_number: 40
#medium: 6.49 0 0 0.252 1.0 0.0 absorber
#medium: 3.0 0 0 0.0 1.0 0.0 pcb
#medium: 2.35 0 0 0.0 1.0 0.0 hdpe
#medium: 2.26 0 0 0.0 1.0 0.0 polypropylene
#medium: 3.0 0 0 4.255 1.0 0.0 txreslower
#medium: 3.0 0 0 3.191 1.0 0.0 txresupper
#medium: 3.0 0 0 13.333 1.0 0.0 rxreslower
#medium: 3.0 0 0 10.000 1.0 0.0 rxresupper
#box: 0.04000000000000001 0.0405 0.10600000000000001 0.224 0.1495 0.14600000000000002 pec
#box: 0.06000000000000001 0.0425 0.10600000000000001 0.14 0.1475 0.10800000000000001 free_space
#box: 0.14 0.0425 0.10600000000000001 0.222 0.1475 0.10800000000000001 free_space
#box: 0.06000000000000001 0.0425 0.10600000000000001 0.14 0.1475 0.14400000000000002 absorber
#box: 0.14 0.0425 0.10600000000000001 0.222 0.1475 0.14400000000000002 absorber
#cylinder_new: 0.095 0.1415 0.10600000000000001 0.095 0.1415 0.14400000000000002 0.008 pec
#cylinder_new: 0.095 0.0485 0.10600000000000001 0.095 0.0485 0.14400000000000002 0.008 pec
#cylinder_new: 0.187 0.1415 0.10600000000000001 0.187 0.1415 0.14400000000000002 0.008 pec
#cylinder_new: 0.187 0.0485 0.10600000000000001 0.187 0.0485 0.14400000000000002 0.008 pec
#cylinder_new: 0.095 0.1415 0.10600000000000001 0.095 0.1415 0.14400000000000002 0.007 free_space
#cylinder_new: 0.095 0.0485 0.10600000000000001 0.095 0.0485 0.14400000000000002 0.007 free_space
#cylinder_new: 0.187 0.1415 0.10600000000000001 0.187 0.1415 0.14400000000000002 0.007 free_space
#cylinder_new: 0.187 0.0485 0.10600000000000001 0.187 0.0485 0.14400000000000002 0.007 free_space
#box: 0.094 0.1335 0.10600000000000001 0.096 0.13549999999999998 0.14400000000000002 free_space
#box: 0.094 0.0545 0.10600000000000001 0.096 0.0565 0.14400000000000002 free_space
#box: 0.186 0.1335 0.10600000000000001 0.188 0.13549999999999998 0.14400000000000002 free_space
#box: 0.186 0.0545 0.10600000000000001 0.188 0.0565 0.14400000000000002 free_space
#box: 0.06000000000000001 0.058499999999999996 0.10600000000000001 0.222 0.1315 0.10800000000000001 pcb
#box: 0.07200000000000001 0.0625 0.10600000000000001 0.134 0.1245 0.14300000000000002 pec
#box: 0.07300000000000001 0.0635 0.10600000000000001 0.133 0.1235 0.14300000000000002 absorber
#box: 0.14800000000000002 0.0625 0.10600000000000001 0.21000000000000002 0.1245 0.14300000000000002 pec
#box: 0.14900000000000002 0.0635 0.10600000000000001 0.20900000000000002 0.1235 0.14300000000000002 free_space
#box: 0.134 0.1185 0.14100000000000001 0.14800000000000002 0.1245 0.14300000000000002 pec
#box: 0.134 0.0625 0.14100000000000001 0.14800000000000002 0.0685 0.14300000000000002 pec
#box: 0.07300000000000001 0.0635 0.10600000000000001 0.133 0.1235 0.10800000000000001 pcb
#box: 0.14900000000000002 0.0635 0.10600000000000001 0.20900000000000002 0.1235 0.10800000000000001 pcb
#triangle: 0.10300000000000001 0.0915 0.10600000000000001 0.07700000000000001 0.0665 0.10600000000000001 0.129 0.0665 0.10600000000000001 pec
#edge: 0.10300000000000001 0.0915 0.10600000000000001 0.10300000000000001 0.0925 0.10600000000000001 pec
#triangle: 0.10300000000000001 0.0935 0.10600000000000001 0.07700000000000001 0.1185 0.10600000000000001 0.129 0.1185 0.10600000000000001 pec
#edge: 0.10300000000000001 0.0935 0.10600000000000001 0.10300000000000001 0.0945 0.10600000000000001 pec
#triangle: 0.179 0.0915 0.10600000000000001 0.153 0.0665 0.10600000000000001 0.205 0.0665 0.10600000000000001 pec
#edge: 0.179 0.0915 0.10600000000000001 0.179 0.0925 0.10600000000000001 pec
#triangle: 0.179 0.0935 0.10600000000000001 0.153 0.1185 0.10600000000000001 0.205 0.1185 0.10600000000000001 pec
#edge: 0.179 0.0935 0.10600000000000001 0.179 0.0945 0.10600000000000001 pec
#edge: 0.08000000000000002 0.0635 0.10600000000000001 0.08000000000000002 0.0665 0.10600000000000001 txreslower
#edge: 0.08100000000000002 0.0635 0.10600000000000001 0.08100000000000002 0.0665 0.10600000000000001 txreslower
#edge: 0.10300000000000001 0.0635 0.10600000000000001 0.10300000000000001 0.0665 0.10600000000000001 txreslower
#edge: 0.10400000000000001 0.0635 0.10600000000000001 0.10400000000000001 0.0665 0.10600000000000001 txreslower
#edge: 0.125 0.0635 0.10600000000000001 0.125 0.0665 0.10600000000000001 txreslower
#edge: 0.126 0.0635 0.10600000000000001 0.126 0.0665 0.10600000000000001 txreslower
#edge: 0.08000000000000002 0.1195 0.10600000000000001 0.08000000000000002 0.1235 0.10600000000000001 txresupper
#edge: 0.08100000000000002 0.1195 0.10600000000000001 0.08100000000000002 0.1235 0.10600000000000001 txresupper
#edge: 0.10300000000000001 0.1195 0.10600000000000001 0.10300000000000001 0.1235 0.10600000000000001 txresupper
#edge: 0.10400000000000001 0.1195 0.10600000000000001 0.10400000000000001 0.1235 0.10600000000000001 txresupper
#edge: 0.125 0.1195 0.10600000000000001 0.125 0.1235 0.10600000000000001 txresupper
#edge: 0.126 0.1195 0.10600000000000001 0.126 0.1235 0.10600000000000001 txresupper
#edge: 0.15600000000000003 0.0635 0.10600000000000001 0.15600000000000003 0.0665 0.10600000000000001 rxreslower
#edge: 0.15700000000000003 0.0635 0.10600000000000001 0.15700000000000003 0.0665 0.10600000000000001 rxreslower
#edge: 0.179 0.0635 0.10600000000000001 0.179 0.0665 0.10600000000000001 rxreslower
#edge: 0.18 0.0635 0.10600000000000001 0.18 0.0665 0.10600000000000001 rxreslower
#edge: 0.201 0.0635 0.10600000000000001 0.201 0.0665 0.10600000000000001 rxreslower
#edge: 0.202 0.0635 0.10600000000000001 0.202 0.0665 0.10600000000000001 rxreslower
#edge: 0.15600000000000003 0.1195 0.10600000000000001 0.15600000000000003 0.1235 0.10600000000000001 rxresupper
#edge: 0.15700000000000003 0.1195 0.10600000000000001 0.15700000000000003 0.1235 0.10600000000000001 rxresupper
#edge: 0.179 0.1195 0.10600000000000001 0.179 0.1235 0.10600000000000001 rxresupper
#edge: 0.18 0.1195 0.10600000000000001 0.18 0.1235 0.10600000000000001 rxresupper
#edge: 0.201 0.1195 0.10600000000000001 0.201 0.1235 0.10600000000000001 rxresupper
#edge: 0.202 0.1195 0.10600000000000001 0.202 0.1235 0.10600000000000001 rxresupper
#box: 0.04000000000000001 0.0405 0.1 0.224 0.1495 0.10300000000000001 polypropylene
#box: 0.04000000000000001 0.0405 0.10300000000000001 0.224 0.1495 0.10600000000000001 hdpe
#geometry_vtk: 0.03900000000000001 0.0395 0.099 0.225 0.1505 0.14700000000000002 0.001 0.001 0.001 antenna_like_MALA_1200 n
#geometry_vtk: 0.04000000000000001 0.0405 0.1 0.224 0.1495 0.11 0.001 0.001 0.001 antenna_like_MALA_1200_pcb f
#messages: y
#num_of_procs: 8
#abc_type: pml
#pml_layers: 10
#voltage_source: 1.0 978000000.0 gaussian 1000 myGaussian
#analysis: 1 antenna_MALA_1200_fs_proc_oldstyle.out b
#rx: 0.179 0.0925 0.10600000000000001
#tx: y 0.10300000000000001 0.0925 0.10600000000000001 myGaussian 0 6e-09
#end_analysis:

查看文件

@@ -0,0 +1,10 @@
#title: MALA 1.2GHz 'like' antenna in free-space
#domain: 0.264 0.189 0.220
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 6e-9
#python:
from user_libs.antennas import antenna_like_MALA_1200
antenna_like_MALA_1200(0.132, 0.095, 0.100)
#end_python:

二进制文件未显示。

查看文件

@@ -0,0 +1,77 @@
#title: MALA 1.2GHz 'like' antenna in free-space
#domain: 0.264 0.189 0.220
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 6e-9
#material: 6.49 0.252 1.0 0.0 absorber
#material: 3.0 0.0 1.0 0.0 pcb
#material: 2.35 0.0 1.0 0.0 hdpe
#material: 2.26 0.0 1.0 0.0 polypropylene
#material: 3.0 4.255 1.0 0.0 txreslower
#material: 3.0 3.191 1.0 0.0 txresupper
#material: 3.0 13.333 1.0 0.0 rxreslower
#material: 3.0 10.000 1.0 0.0 rxresupper
#box: 0.04000000000000001 0.0405 0.10600000000000001 0.224 0.1495 0.14600000000000002 pec
#box: 0.06000000000000001 0.0425 0.10600000000000001 0.14 0.1475 0.10800000000000001 free_space
#box: 0.14 0.0425 0.10600000000000001 0.222 0.1475 0.10800000000000001 free_space
#box: 0.06000000000000001 0.0425 0.10600000000000001 0.14 0.1475 0.14400000000000002 absorber
#box: 0.14 0.0425 0.10600000000000001 0.222 0.1475 0.14400000000000002 absorber
#cylinder: 0.095 0.1415 0.10600000000000001 0.095 0.1415 0.14400000000000002 0.008 pec
#cylinder: 0.095 0.0485 0.10600000000000001 0.095 0.0485 0.14400000000000002 0.008 pec
#cylinder: 0.187 0.1415 0.10600000000000001 0.187 0.1415 0.14400000000000002 0.008 pec
#cylinder: 0.187 0.0485 0.10600000000000001 0.187 0.0485 0.14400000000000002 0.008 pec
#cylinder: 0.095 0.1415 0.10600000000000001 0.095 0.1415 0.14400000000000002 0.007 free_space
#cylinder: 0.095 0.0485 0.10600000000000001 0.095 0.0485 0.14400000000000002 0.007 free_space
#cylinder: 0.187 0.1415 0.10600000000000001 0.187 0.1415 0.14400000000000002 0.007 free_space
#cylinder: 0.187 0.0485 0.10600000000000001 0.187 0.0485 0.14400000000000002 0.007 free_space
#box: 0.094 0.1335 0.10600000000000001 0.096 0.13549999999999998 0.14400000000000002 free_space
#box: 0.094 0.0545 0.10600000000000001 0.096 0.0565 0.14400000000000002 free_space
#box: 0.186 0.1335 0.10600000000000001 0.188 0.13549999999999998 0.14400000000000002 free_space
#box: 0.186 0.0545 0.10600000000000001 0.188 0.0565 0.14400000000000002 free_space
#box: 0.06000000000000001 0.058499999999999996 0.10600000000000001 0.222 0.1315 0.10800000000000001 pcb
#box: 0.07200000000000001 0.0625 0.10600000000000001 0.134 0.1245 0.14300000000000002 pec
#box: 0.07300000000000001 0.0635 0.10600000000000001 0.133 0.1235 0.14300000000000002 absorber
#box: 0.14800000000000002 0.0625 0.10600000000000001 0.21000000000000002 0.1245 0.14300000000000002 pec
#box: 0.14900000000000002 0.0635 0.10600000000000001 0.20900000000000002 0.1235 0.14300000000000002 free_space
#box: 0.134 0.1185 0.14100000000000001 0.14800000000000002 0.1245 0.14300000000000002 pec
#box: 0.134 0.0625 0.14100000000000001 0.14800000000000002 0.0685 0.14300000000000002 pec
#box: 0.07300000000000001 0.0635 0.10600000000000001 0.133 0.1235 0.10800000000000001 pcb
#box: 0.14900000000000002 0.0635 0.10600000000000001 0.20900000000000002 0.1235 0.10800000000000001 pcb
#triangle: 0.10300000000000001 0.0915 0.10600000000000001 0.07700000000000001 0.0665 0.10600000000000001 0.129 0.0665 0.10600000000000001 0 pec
#edge: 0.10300000000000001 0.0915 0.10600000000000001 0.10300000000000001 0.0925 0.10600000000000001 pec
#triangle: 0.10300000000000001 0.0945 0.10600000000000001 0.07700000000000001 0.1195 0.10600000000000001 0.129 0.1195 0.10600000000000001 0 pec
#edge: 0.10300000000000001 0.0935 0.10600000000000001 0.10300000000000001 0.0945 0.10600000000000001 pec
#triangle: 0.179 0.0915 0.10600000000000001 0.153 0.0665 0.10600000000000001 0.205 0.0665 0.10600000000000001 0 pec
#edge: 0.179 0.0915 0.10600000000000001 0.179 0.0925 0.10600000000000001 pec
#triangle: 0.179 0.0945 0.10600000000000001 0.153 0.1195 0.10600000000000001 0.205 0.1195 0.10600000000000001 0 pec
#edge: 0.179 0.0935 0.10600000000000001 0.179 0.0945 0.10600000000000001 pec
#edge: 0.08000000000000002 0.0635 0.10600000000000001 0.08000000000000002 0.0665 0.10600000000000001 txreslower
#edge: 0.08100000000000002 0.0635 0.10600000000000001 0.08100000000000002 0.0665 0.10600000000000001 txreslower
#edge: 0.10300000000000001 0.0635 0.10600000000000001 0.10300000000000001 0.0665 0.10600000000000001 txreslower
#edge: 0.10400000000000001 0.0635 0.10600000000000001 0.10400000000000001 0.0665 0.10600000000000001 txreslower
#edge: 0.125 0.0635 0.10600000000000001 0.125 0.0665 0.10600000000000001 txreslower
#edge: 0.126 0.0635 0.10600000000000001 0.126 0.0665 0.10600000000000001 txreslower
#edge: 0.08000000000000002 0.1195 0.10600000000000001 0.08000000000000002 0.1235 0.10600000000000001 txresupper
#edge: 0.08100000000000002 0.1195 0.10600000000000001 0.08100000000000002 0.1235 0.10600000000000001 txresupper
#edge: 0.10300000000000001 0.1195 0.10600000000000001 0.10300000000000001 0.1235 0.10600000000000001 txresupper
#edge: 0.10400000000000001 0.1195 0.10600000000000001 0.10400000000000001 0.1235 0.10600000000000001 txresupper
#edge: 0.125 0.1195 0.10600000000000001 0.125 0.1235 0.10600000000000001 txresupper
#edge: 0.126 0.1195 0.10600000000000001 0.126 0.1235 0.10600000000000001 txresupper
#edge: 0.15600000000000003 0.0635 0.10600000000000001 0.15600000000000003 0.0665 0.10600000000000001 rxreslower
#edge: 0.15700000000000003 0.0635 0.10600000000000001 0.15700000000000003 0.0665 0.10600000000000001 rxreslower
#edge: 0.179 0.0635 0.10600000000000001 0.179 0.0665 0.10600000000000001 rxreslower
#edge: 0.18 0.0635 0.10600000000000001 0.18 0.0665 0.10600000000000001 rxreslower
#edge: 0.201 0.0635 0.10600000000000001 0.201 0.0665 0.10600000000000001 rxreslower
#edge: 0.202 0.0635 0.10600000000000001 0.202 0.0665 0.10600000000000001 rxreslower
#edge: 0.15600000000000003 0.1195 0.10600000000000001 0.15600000000000003 0.1235 0.10600000000000001 rxresupper
#edge: 0.15700000000000003 0.1195 0.10600000000000001 0.15700000000000003 0.1235 0.10600000000000001 rxresupper
#edge: 0.179 0.1195 0.10600000000000001 0.179 0.1235 0.10600000000000001 rxresupper
#edge: 0.18 0.1195 0.10600000000000001 0.18 0.1235 0.10600000000000001 rxresupper
#edge: 0.201 0.1195 0.10600000000000001 0.201 0.1235 0.10600000000000001 rxresupper
#edge: 0.202 0.1195 0.10600000000000001 0.202 0.1235 0.10600000000000001 rxresupper
#box: 0.04000000000000001 0.0405 0.1 0.224 0.1495 0.10300000000000001 polypropylene
#box: 0.04000000000000001 0.0405 0.10300000000000001 0.224 0.1495 0.10600000000000001 hdpe
#geometry_view: 0.03900000000000001 0.0395 0.099 0.225 0.1505 0.14700000000000002 0.001 0.001 0.001 antenna_like_MALA_1200 n
#geometry_view: 0.04000000000000001 0.0405 0.1 0.224 0.1495 0.11 0.001 0.001 0.001 antenna_like_MALA_1200_pcb f
#waveform: gaussian 1.0 978000000.0 myGaussian
#voltage_source: y 0.10300000000000001 0.0925 0.10600000000000001 1000 myGaussian
#rx: 0.179 0.0925 0.10600000000000001

二进制文件未显示。

查看文件

@@ -0,0 +1,22 @@
#title: Hertzian dipole in free-space
#domain: 0.100 0.100 0.100
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 3e-9
#medium: 80.10000000000001 4.9 9.231e-12 0 1 0 myWater
#box: 0 0 0 0.100 0.100 0.100 myWater
python:
for time in range(1,50):
print('#snapshot: 0.001 0.001 0.001 0.099 0.099 0.099 0.001 0.001 0.001 {} {}'.format(0.1e-9 * time, 'snap' + str(time)))
end_python:
#messages: y
#num_of_procs: 8
#abc_type: pml
#pml_layers: 10
#hertzian_dipole: 1.0 1e9 ricker myWave
#analysis: 1 hertzian_dipole_dispersive_oldstyle.out b
#rx: 0.050 0.070 0.050
#tx: y 0.050 0.050 0.050 myWave 0 3e-09
#end_analysis:

查看文件

@@ -0,0 +1,17 @@
#title: Hertzian dipole in free-space
#domain: 0.100 0.100 0.100
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 3e-9
#waveform: gaussiandot 1.0 1e9 myWave
#hertzian_dipole: y 0.050 0.050 0.050 myWave
#rx: 0.050 0.070 0.050
#material: 4.9 0 1 0 myWater
#add_dispersion_debye: 1 75.2 9.231e-12 myWater
#box: 0 0 0 0.100 0.100 0.100 myWater
python:
for time in range(1,50):
print('#snapshot: 0.001 0.001 0.001 0.099 0.099 0.099 0.001 0.001 0.001 {} {}'.format(0.1e-9 * time, 'snap' + str(time)))
end_python:

查看文件

@@ -0,0 +1,19 @@
#title: Hertzian dipole in free-space
#domain: 0.100 0.100 0.100
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 3e-9
python:
for time in range(1,50):
print('#snapshot: 0.001 0.001 0.001 0.099 0.099 0.099 0.001 0.001 0.001 {} {}'.format(0.1e-9 * time, 'snap' + str(time)))
end_python:
#messages: y
#num_of_procs: 8
#abc_type: pml
#pml_layers: 10
#hertzian_dipole: 1.0 1e9 ricker myWave
#analysis: 1 hertzian_dipole_fs_oldstyle.out b
#rx: 0.050 0.070 0.050
#tx: y 0.050 0.050 0.050 myWave 0 3e-09
#end_analysis:

查看文件

@@ -0,0 +1,13 @@
#title: Hertzian dipole in free-space
#domain: 0.100 0.100 0.100
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 3e-9
#waveform: gaussiandot 1.0 1e9 myWave
#hertzian_dipole: y 0.050 0.050 0.050 myWave
#rx: 0.050 0.070 0.050
python:
for time in range(1,50):
print('#snapshot: 0.001 0.001 0.001 0.099 0.099 0.099 0.001 0.001 0.001 {} {}'.format(0.1e-9 * time, 'snap' + str(time)))
end_python:

二进制文件未显示。

查看文件

@@ -0,0 +1,22 @@
#title: Hertzian dipole over a half-space
#domain: 0.100 0.100 0.100
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 3e-9
#medium: 8 0 0 0 1 0 half_space
#box: 0 0 0 0.100 0.100 0.050 half_space
python:
for time in range(1,50):
print('#snapshot: 0.001 0.001 0.001 0.099 0.099 0.099 0.001 0.001 0.001 {} {}'.format(0.1e-9 * time, 'snap' + str(time)))
end_python:
#messages: y
#num_of_procs: 8
#abc_type: pml
#pml_layers: 10
#hertzian_dipole: 1.0 1e9 ricker myWave
#analysis: 1 hertzian_dipole_hs_oldstyle.out b
#rx: 0.050 0.070 0.050
#tx: y 0.050 0.050 0.050 myWave 0 3e-09
#end_analysis:

查看文件

@@ -0,0 +1,16 @@
#title: Hertzian dipole over a half-space
#domain: 0.100 0.100 0.100
#dx_dy_dz: 0.001 0.001 0.001
#time_window: 3e-9
#waveform: gaussiandot 1.0 1e9 myWave
#hertzian_dipole: y 0.050 0.050 0.050 myWave
#rx: 0.050 0.070 0.050
#material: 8 0 1 0 half_space
#box: 0 0 0 0.100 0.100 0.050 half_space
python:
for time in range(1,50):
print('#snapshot: 0.001 0.001 0.001 0.099 0.099 0.099 0.001 0.001 0.001 {} {}'.format(0.1e-9 * time, 'snap' + str(time)))
end_python:

二进制文件未显示。

查看文件

@@ -0,0 +1,83 @@
import sys, os
import h5py
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from tools.plot_fields import plot_Ascan
from tests.analytical_solutions import hertzian_dipole_fs
"""Compare field outputs
Usage:
cd gprMax
python -m tests.test_compare_analytical path_to_model_output
"""
modelfile = sys.argv[1]
path = '/rxs/rx1/'
# Key refers to subplot location
fields = {0: 'Ex', 1: 'Ey', 2: 'Ez', 3: 'Hx', 4: 'Hy', 5: 'Hz'}
plotorder = {0: 0, 1: 3, 2: 1, 3: 4, 4: 2, 5: 5}
# Model results
f = h5py.File(modelfile, 'r')
# Get model/file attributes
floattype = f[path + 'Ex'].dtype
iterations = f.attrs['Iterations']
dt = f.attrs['dt']
dxdydz = f.attrs['dx, dy, dz']
model = np.zeros((iterations, 6), dtype=floattype)
time = np.arange(0, dt * iterations, dt) / 1e-9
rxpos = f[path + 'Position']
txpos = f['/txs/tx1/Position']
rxposrelative = ((rxpos[0] - txpos[0]), (rxpos[1] - txpos[1]), (rxpos[2] - txpos[2]))
# Read fields
for ID, name in fields.items():
model[:,ID] = f[path + str(name)][:]
f.close()
# Analytical solution of a dipole in free space
analytical = hertzian_dipole_fs(iterations * dt, dt, dxdydz, rxposrelative)
# Differences
threshold = 1e-4 # Threshold, below which ignore differences
diffs = np.zeros((iterations, 6), dtype=floattype)
for ID, name in fields.items():
max = np.amax(np.abs(analytical[:,ID]))
if max < threshold:
diffs[:,ID] = 0
diffsum = 0
print('Detected differences of less than {} when comparing {} field component, therefore set as zero.'.format(threshold, fields[ID]))
else:
diffs[:,ID] = (np.abs(analytical[:,ID] - model[:,ID]) / max) * 100
diffsum = (np.sum(np.abs(analytical[:,ID] - model[:,ID])) / np.sum(np.abs(analytical[:,ID]))) * 100
print('Total differences in field component {}: {:.1f}%'.format(name, diffsum))
# Plot model
fig1, plt1 = plot_Ascan(modelfile + ' versus analytical solution', time, model[:,0], model[:,1], model[:,2], model[:,3], model[:,4], model[:,5])
# Add analytical solution and set legend
for index, ax in enumerate(fig1.axes):
if index in [0, 2, 4]:
ax.plot(time, analytical[:,plotorder[index]], 'r', label='analytical', lw=2, ls='--')
else:
ax.plot(time, analytical[:,plotorder[index]], label='analytical', lw=2, ls='--')
ax.set_xlim(0, time[-1])
handles, existlabels = ax.get_legend_handles_labels()
ax.legend(handles, ['Model', 'Analytical'])
# Plots of differences
fig2, plt2 = plot_Ascan('Deltas: ' + modelfile + ' versus analytical solution', time, diffs[:,0], diffs[:,1], diffs[:,2], diffs[:,3], diffs[:,4], diffs[:,5])
[ax.set_xlim(0, time[-1]) for ax in fig2.axes]
[ax.set_ylim(0, np.ceil(np.amax(np.abs(diffs)))) for ax in fig2.axes]
ylabels = ['$E_x$', '$H_x$', '$E_y$', '$H_y$', '$E_z$', '$H_z$']
ylabels = [ylabel + ', percentage difference [%]' for ylabel in ylabels]
[ax.set_ylabel(ylabels[index]) for index, ax in enumerate(fig2.axes)]
# Show/print plots
savename = os.path.abspath(os.path.dirname(modelfile)) + os.sep + os.path.splitext(os.path.split(modelfile)[1])[0] + '_vs_analytical'
#fig1.savefig(savename + '.pdf', dpi=None, format='pdf', bbox_inches='tight', pad_inches=0.1)
#fig2.savefig(savename + '_diffs.pdf', dpi=None, format='pdf', bbox_inches='tight', pad_inches=0.1)
plt1.show()
plt2.show()

查看文件

@@ -0,0 +1,59 @@
import sys, os
import h5py
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
"""Compare field outputs
Usage:
cd gprMax
python -m tests.test_compare_experimental path_to_model_output path_to_real_output
"""
modelfile = sys.argv[1]
realfile = sys.argv[2]
path = '/rxs/rx1/'
# Key refers to subplot location
fields = {0: 'Ex', 1: 'Ey', 2: 'Ez', 3: 'Hx', 4: 'Hy', 5: 'Hz'}
plotorder = list(fields.keys())
# Model results
f = h5py.File(modelfile, 'r')
floattype = f[path + 'Ex'].dtype
model = np.zeros((f.attrs['Iterations'], 6), dtype=floattype)
timemodel = np.zeros((f.attrs['Iterations']), dtype=floattype)
timemodel = np.arange(0, f.attrs['dt'] * f.attrs['Iterations'], f.attrs['dt']) / 1e-9
for ID, name in fields.items():
model[:,ID] = f[path + str(name)][:] * -1
model[:,ID] = model[:,ID] / np.amax(np.abs(model[:,ID]))
f.close()
# Select model field of interest and find max
modelmax = np.where(np.abs(model[:,1]) == 1)[0][0]
# Real results
with open(realfile, 'r') as f:
real = np.loadtxt(f)
real[:,1] = real[:,1] / np.amax(np.abs(real[:,1]))
realmax = np.where(np.abs(real[:,1]) == 1)[0][0]
difftime = - (timemodel[modelmax] - real[realmax,0])
# Plot modelled and real data
fig, ax = plt.subplots(num=modelfile + ' versus ' + realfile, figsize=(20, 10), facecolor='w', edgecolor='w')
ax.plot(timemodel + difftime, model[:,1], 'r', lw=2, label='Model')
ax.plot(real[:,0], real[:,1], 'r', ls='--', lw=2, label='Experiment')
ax.set_xlabel('Time [ns]')
ax.set_ylabel('Amplitude')
ax.set_xlim([0, timemodel[-1]])
ax.set_ylim([-1, 1])
ax.legend()
[label.set_bbox(dict(facecolor='white', edgecolor='None', alpha=0.65 )) for label in ax.get_xticklabels() + ax.get_yticklabels()]
ax.grid()
# Show/print plots
savename = os.path.abspath(os.path.dirname(modelfile)) + os.sep + os.path.splitext(os.path.split(modelfile)[1])[0] + '_vs_' + os.path.splitext(os.path.split(realfile)[1])[0]
#fig.savefig(savename + '.pdf', dpi=None, format='pdf', bbox_inches='tight', pad_inches=0.1)
plt.show()

查看文件

@@ -0,0 +1,88 @@
import sys, os
import h5py
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from tools.plot_fields import plot_Ascan
"""Compare field outputs
Usage:
cd gprMax
python -m tests.test_compare_numerical path_to_new_file path_to_old_file
"""
newfile = sys.argv[1]
oldfile = sys.argv[2]
path = '/rxs/rx1/'
# Key refers to subplot location
fields = {0: 'Ex', 2: 'Ey', 4: 'Ez', 1: 'Hx', 3: 'Hy', 5: 'Hz'}
plotorder = list(fields.keys())
# New results
f = h5py.File(newfile, 'r')
floattype = f[path + 'Ex'].dtype
new = np.zeros((f.attrs['Iterations'], 6), dtype=floattype)
timenew = np.zeros((f.attrs['Iterations']), dtype=floattype)
timenew = np.arange(0, f.attrs['dt'] * f.attrs['Iterations'], f.attrs['dt']) / 1e-9
for ID, name in fields.items():
new[:,ID] = f[path + str(name)][:]
f.close()
# Old results
f = h5py.File(oldfile, 'r')
old = np.zeros((f.attrs['Iterations'], 6), dtype=floattype)
timeold = np.zeros((f.attrs['Iterations']), dtype=floattype)
timeold = np.arange(0, f.attrs['dt'] * f.attrs['Iterations'], f.attrs['dt']) / 1e-9
for ID, name in fields.items():
old[:,ID] = f[path + str(name)][:]
f.close()
# Differences
# In case there is any difference in the number of iterations, take the smaller
timesmallest = np.amin((timeold.shape, timenew.shape))
fieldssmallest = np.amin((old.shape[0], new.shape[0]))
threshold = 1e-4 # Threshold, below which ignore differences
diffs = np.zeros((fieldssmallest, 6), dtype=floattype)
for ID, name in fields.items():
max = np.amax(np.abs(new[:fieldssmallest,ID]))
if max < threshold:
diffs[:,ID] = 0
diffsum = 0
print('Detected differences of less than {} when comparing {} field component, therefore set as zero.'.format(threshold, fields[ID]))
else:
diffs[:,ID] = (np.abs(new[:fieldssmallest,ID] - old[:fieldssmallest,ID]) / max) * 100
diffsum = (np.sum(np.abs(new[:fieldssmallest,ID] - old[:fieldssmallest,ID])) / np.sum(np.abs(new[:fieldssmallest,ID]))) * 100
print('Total differences in field component {}: {:.1f}%'.format(name, diffsum))
# Plot new
fig1, plt1 = plot_Ascan(newfile + ' versus ' + oldfile, timenew, new[:,0], new[:,2], new[:,4], new[:,1], new[:,3], new[:,5])
# Add old and set legend
for index, ax in enumerate(fig1.axes):
if plotorder[index] in [0, 2, 4]:
ax.plot(timeold, old[:,plotorder[index]], 'r', label='old', lw=2, ls='--')
else:
ax.plot(timeold, old[:,plotorder[index]], label='old', lw=2, ls='--')
ax.set_xlim(0, timeold[-1])
handles, existlabels = ax.get_legend_handles_labels()
ax.legend(handles, ['Model (new code)', 'Model (old C code)'])
# Plots of differences
fig2, plt2 = plot_Ascan('Deltas: ' + newfile + ' versus ' + oldfile, timenew[:timesmallest], diffs[:,0], diffs[:,2], diffs[:,4], diffs[:,1], diffs[:,3], diffs[:,5])
[ax.set_xlim(0, timenew[timesmallest - 1]) for ax in fig2.axes]
[ax.set_ylim(0, np.ceil(np.amax(np.abs(diffs)))) for ax in fig2.axes]
ylabels = ['$E_x$', '$H_x$', '$E_y$', '$H_y$', '$E_z$', '$H_z$']
ylabels = [ylabel + ', percentage difference [%]' for ylabel in ylabels]
[ax.set_ylabel(ylabels[index]) for index, ax in enumerate(fig2.axes)]
# Show/print plots
savename = os.path.abspath(os.path.dirname(newfile)) + os.sep + os.path.splitext(os.path.split(newfile)[1])[0] + '_vs_' + os.path.splitext(os.path.split(oldfile)[1])[0]
#fig1.savefig(savename + '.pdf', dpi=None, format='pdf', bbox_inches='tight', pad_inches=0.1)
#fig2.savefig(savename + '_diffs.pdf', dpi=None, format='pdf', bbox_inches='tight', pad_inches=0.1)
plt1.show()
plt2.show()