add example of using Cole-Cole model

这个提交包含在:
majsylw
2021-07-26 19:43:11 +02:00
父节点 cf3eae5ad8
当前提交 e524c95a10
共有 4 个文件被更改,包括 519 次插入0 次删除

查看文件

@@ -180,6 +180,9 @@ class Relaxation(object):
self.rl, self.im = q.real, q.imag self.rl, self.im = q.real, q.imag
if self.number_of_debye_poles == -1: if self.number_of_debye_poles == -1:
print("\n#########",
"Try to automaticaly fit number of Debye poles, up to 20!",
"##########\n", sep="")
error = np.infty # artificial best error starting value error = np.infty # artificial best error starting value
self.number_of_debye_poles = 1 self.number_of_debye_poles = 1
iteration = 1 iteration = 1

文件差异因一行或多行过长而隐藏

查看文件

@@ -0,0 +1,43 @@
# I. Giannakis, A. Giannopoulos and N. Davidson,
# "Incorporating dispersive electrical properties in FDTD GPR models
# using a general Cole-Cole dispersion function,"
# 2012 14th International Conference on Ground Penetrating Radar (GPR), 2012, pp. 232-236
from Debye_Fit import HavriliakNegami
if __name__ == "__main__":
# set Havrilak-Negami function with initial parameters
setup = HavriliakNegami(f_min=1e4, f_max=1e11,
alpha=0.3, beta=1,
e_inf=3.4, de=2.7, tau_0=.8e-10,
sigma=0.45e-3, mu=1, mu_sigma=0,
material_name="dry_sand", f_n=100,
plot=True, save=False,
optimizer_options={'swarmsize':30,
'maxiter':100,
'omega':0.5,
'phip':1.4,
'phig':1.4,
'minstep':1e-8,
'minfun':1e-8,
'seed': 111,
'pflag': True})
### Dry Sand in case of 3, 5
# and automatically set number of Debye poles (-1)
for number_of_debye_poles in [3, 5, -1]:
setup.number_of_debye_poles = number_of_debye_poles
setup.run()
### Moist sand
# set Havrilak-Negami function parameters
setup.material_name="moist_sand"
setup.alpha = 0.25
setup.beta = 1
setup.e_inf = 5.6
setup.de = 3.3
setup.tau_0 = 1.1e-10,
setup.sigma = 2e-3
# calculate for different number of Debye poles
for number_of_debye_poles in [3, 5, -1]:
setup.number_of_debye_poles = number_of_debye_poles
setup.run()

查看文件

@@ -97,6 +97,8 @@ class Optimizer(object):
x (array): The number of current iterations. x (array): The number of current iterations.
y (array): The objective value at for all x points. y (array): The objective value at for all x points.
""" """
# it clears an axes
plt.cla()
plt.plot(x, y, "b-", linewidth=1.0) plt.plot(x, y, "b-", linewidth=1.0)
plt.ylim(min(y) - 0.1 * min(y), plt.ylim(min(y) - 0.1 * min(y),
max(y) + 0.1 * max(y)) max(y) + 0.1 * max(y))