Jochen Kieninger
Electrochemical Methods for the Micro- and Nanoscale
www.electrochemical-methods.org
from sympy import re, im, I, simplify, symbols, sqrt, atan
Ru, Rct, Cdl, omega = symbols('R_u R_ct C_dl, omega', real=True)
The complex impedance of a Randles circuit with uncompensated resistance $R_u$ in series with a parallel circuit of the charge transfer resistance $R_ct$ and the double layer capacity $C_{dl}$ is:
Z = Ru+1/(I*omega*Cdl + 1/Rct)
Z
Because of the uncompensated resistance, the equations are not as handsome as one would wish,
simplify(re(Z))
simplify(im(Z))
simplify(sqrt(re(Z)**2 + im(Z)**2))
simplify(atan(im(Z)/re(Z)))