electricpy.curdiv

electricpy.curdiv(Ri, Rset, Vin=None, Iin=None, Vout=False, combine=True)[source]

Electrical Current Divider Function.

This function is disigned to accept the input current, or input voltage to a resistor (or impedance) network of parallel resistors (impedances) and calculate the current through a particular element.

Parameters:
Ri : float

The Particular Resistor of Interest, should not be included in the tuple passed to Rset.

Rset : float

Tuple of remaining resistances (impedances) in network.

Vin : float, optional

The input voltage for the system, default=None

Iin : float, optional

The input current for the system, default=None

Vout : bool, optional

Control argument to enable return of the voltage across the resistor (impedance) of interest (Ri)

combine : bool, optional

Control argument to force resistance combination. default=True

Returns:

  • Opt1 - Ii (The Current through the resistor (impedance) of interest)

  • Opt2 - (Ii,Vi) (The afore mentioned current, and voltage across the) – resistor (impedance) of interest

Examples

>>> from electricpy.constants import k
>>> import electricpy as ep
>>> ep.curdiv(Ri=1*k, Rset=(1*k, 1*k), Iin=12) # 12-amps, split three ways
4.0
>>> ep.curdiv(Ri=1*k, Rset=(1*k, 1*k), Iin=12, Vout=True) # Find Voltage
(4.0, 4000.0)