electronics.capacitor_equivalence¶
Functions¶
|
Ceq = C1 + C2 + ... + Cn |
|
Ceq = 1/ (1/C1 + 1/C2 + ... + 1/Cn) |
Module Contents¶
- electronics.capacitor_equivalence.capacitor_parallel(capacitors: list[float]) float ¶
Ceq = C1 + C2 + … + Cn Calculate the equivalent resistance for any number of capacitors in parallel. >>> capacitor_parallel([5.71389, 12, 3]) 20.71389 >>> capacitor_parallel([5.71389, 12, -3]) Traceback (most recent call last):
…
ValueError: Capacitor at index 2 has a negative value!
- electronics.capacitor_equivalence.capacitor_series(capacitors: list[float]) float ¶
Ceq = 1/ (1/C1 + 1/C2 + … + 1/Cn) >>> capacitor_series([5.71389, 12, 3]) 1.6901062252507735 >>> capacitor_series([5.71389, 12, -3]) Traceback (most recent call last):
…
ValueError: Capacitor at index 2 has a negative or zero value! >>> capacitor_series([5.71389, 12, 0.000]) Traceback (most recent call last):
…
ValueError: Capacitor at index 2 has a negative or zero value!