Skip to content

Commit b89d006

Browse files
authored
Improvement: add Zarc element (#268)
* add Zarc element
1 parent 8a9df33 commit b89d006

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

impedance/models/circuits/elements.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,25 @@ def K(p, f):
313313
return Z
314314

315315

316+
@element(num_params=3, units=['Ohm', 'sec', ''])
317+
def Zarc(p, f):
318+
""" An RQ element rewritten with resistance and
319+
and time constant as paramenters. Equivalent to a
320+
Cole-Cole relaxation in dielectrics.
321+
322+
Notes
323+
-----
324+
.. math::
325+
326+
Z = \\frac{R}{1 + (j \\omega \\tau_k)^\\gamma }
327+
328+
"""
329+
omega = 2*np.pi*np.array(f)
330+
R, tau_k, gamma = p[0], p[1], p[2]
331+
Z = R/(1 + ((1j*omega*tau_k)**gamma))
332+
return Z
333+
334+
316335
@element(num_params=3, units=["Ohm", "F sec^(gamma - 1)", ""])
317336
def TLMQ(p, f):
318337
"""Simplified transmission-line model as defined in Eq. 11 of [1]

impedance/tests/test_circuit_elements.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ def test_each_element():
6868
(0.038772663673915 - 0.048723166143232j),
6969
(6.332569967499333e-08 - 7.957742115295703e-05j),
7070
],
71+
"Zarc": [
72+
(0.08900974-0.00486384j),
73+
(0.04818879-0.01198904j),
74+
(0.00969182-0.00436265j),
75+
],
7176
}
7277
input_vals = [0.1, 0.2, 0.3, 0.4]
7378
for key, f in circuit_elements.items():

0 commit comments

Comments
 (0)