Circuit Functions#

JMK Engineering Inc. Python Library for design and such. by: Jeff MacKinnon

email: jeff@jmkengineering.com

Circuit Design Functions

jmktools.circuits.cable_schedule_naming(conductor_size, conductors, runs=1, bond='BOND')#

Converts the conductor size from the above functions to something that can be added to a database/schedule.

jmktools.circuits.conductor_ampacity(conductor, temp=75, material='cu', code='CEC', raceway=True, ambient=30)#

Calculates the ampacity of a conductor size and material using code tables.

jmktools.circuits.conductor_size(current, temp=75, material='cu', code='CEC', raceway=True, ambient=30, max=500, load_type=None)#

The default temp column will be the 75C column as most terminals are rated for this. The default code is CEC as that is where I am.

I still need to incorporate ambient temperature deratings, but that will be a future improvement

jmktools.circuits.conduit_size(num_cc, cc_con, bond, insulation='RW90', voltage=1000, jacketed=False, material='SCH80', code='CEC')#

Calculated the necessary conduit size for the circuit using code tables. num_cc = The number of current carrying conductors, including neutral. cc_con = The current carrying conductor size bond = The bond size insulation = The insulation class of the conductors. voltage = The voltage rating of the insulation, typically 600 or 1000 [V]. jacketed = Whether or not the conductor is jacketed, typically this is false. material = The material of the conduit. The default is SCH80 as it is the “worse case” in most configurations as it has a high difference from trade size to inner diameter. code = CEC or NEC, although NEC is lagging in the development front at the moment, so stick with CEC.

The calculation is completed in the following steps: 1. Check to make sure the variables are valid. 2. Determine the percent fill limitation based on the number of current carrying conductors. 3. Look up the outer diameter of the conductors and bond. Calculate the total area. 4. Look up the trade size conduit, of the correct material, that meets the requirements. 5. Return the trade size, inner diameter and “result name”.

jmktools.circuits.current_for_lookup(current, max_current)#

This is a helper function for conductor_size. It is used to calculate the number of parallel runs needed, and the conductor current for those runs.

jmktools.circuits.voltage_drop(voltage, current, conductor_size, length, num_phase=3, material='cu', num_runs=1, code='CEC', power_factor='dc', raceway=True, insul_temp=75)#

This function will return the drop in voltage and in percent of the supply.

For CEC this function uses Table D3 and the function VD = K * F * i * L / 1000 K -> is a table lookup based on the conductor material, size raceway and powerfactor F -> is the system factor, 2 for single phase and sqrt(3) for three phase