electricpy.reactance

electricpy.reactance(z, freq=60, sensetivity=1e-12)[source]

Capacitance/Inductance from Impedance.

Calculates the Capacitance or Inductance in Farads or Henreys (respectively) provided the impedance of an element. Will return capacitance (in Farads) if ohmic impedance is negative (1), or inductance (in Henrys) if ohmic impedance is positive (2). If imaginary: calculate with j factor (imaginary number).

(1)\[C = \frac{1}{\omega*Z}\]
(2)\[L = \frac{Z}{\omega}\]

This requires that the radian frequency is found as follows:

\[\omega = 2*\pi*freq\]

where freq is the frequency in Hertz.

Note

It’s worth noting here, that the resistance will be found by extracting the real part of a complex value. That is:

\[R = Real( R + jX )\]
Parameters:
z : complex

The Impedance Provided, may be complex (R+jI)

freq : float, optional

The Frequency Base for Provided Impedance, default=60

sensetivity : float, optional

The sensetivity used to check if a resistance was provided, default=1e-12

Returns:

float

Return type:

Capacitance or Inductance of Impedance

Examples

>>> import electricpy as ep
>>> ep.reactance(z=5) # ohms - inductive impedance
0.0132629...