electricpy.powerset¶
- electricpy.powerset(P=None, Q=None, S=None, PF=None, find='')[source]¶
Power Triangle Conversion Function.
This function is designed to calculate all values in the set { P, Q, S, PF } when two (2) of the values are provided. The equations in this function are prepared for AC values, that is: real and reactive power, apparent power, and power factor.
- Parameters:
P (float, optional) – Real Power, unitless; default=None
Q (float, optional) – Reactive Power, unitless; default=None
S (float, optional) – Apparent Power, unitless; default=None
PF (float, optional) – Power Factor, unitless, provided as a decimal value, lagging is positive, leading is negative; default=None
find (str, optional) – Control argument to specify which value should be returned.
- Returns:
P (float) – Calculated Real Power Magnitude
Q (float) – Calculated Reactive Power Magnitude
S (float) – Calculated Apparent Power Magnitude
PF (float) – Calculated Power Factor
Examples
>>> import electricpy as ep >>> ep.powerset(P=400, Q=300) (400, 300, 500.0, 0.8) >>> ep.powerset(P=400, Q=300, find="PF") 0.8