diff --git a/jepl/Tables/Manufacturer/SW-Spec-23055.csv b/jepl/Tables/Manufacturer/SW-Spec-23055.csv deleted file mode 100644 index 11a4118..0000000 --- a/jepl/Tables/Manufacturer/SW-Spec-23055.csv +++ /dev/null @@ -1,13 +0,0 @@ -Stock Number,Conductor Size,Stands,Insul Thickness,Ground,Inner Jacket Thickness,Diameter over Armour,Jacket Thickness,Approx Outer Diameter,Approx Weight,Min Bending Radius,Max Pull Tension,DC Resistance,AC Resistance,Inductive Reactance,Ampacity -584846,6,7,1.52,1x6,1.65,27.66,1.4,30.45,798,210.82,2100,2.21,2.66,0.1673,55 -674938,4,7,1.52,1x6,2.16,31.14,1.4,33.93,1018,236.22,3342,1.39,1.67,0.1575,75 -584848,2,6,1.52,1x6,2.16,34.16,1.4,36.96,1217,256.54,5313,0.88,1.05,0.1476,100 -584852,1,8,2.03,1x4,2.16,38.18,1.65,41.53,1534,289.56,6702,0.69,0.83,0.1509,115 -584873,1/0,18,2.03,1x4,2.16,40.21,1.65,43.56,1702,304.8,8455,0.55,0.66,0.1444,135 -584876,2/0,12,2.03,1x4,2.16,42.39,1.65,45.75,1926,320.04,10658,0.44,0.52,0.1411,150 -584883,3/0,16,2.03,1x4,2.16,44.98,1.65,48.34,2171,337.82,13439,0.34,0.41,0.1378,175 -584891,4/0,18,2.03,1x4,2.16,48.08,1.65,51.43,2554,358.14,16946,0.28,0.33,0.1345,205 -583957,250,35,2.29,1x2,2.92,53.31,1.65,56.67,3131,396.24,20025,0.23,0.28,0.1345,230 -615167,350,35,2.29,1x2,1.27,58.57,1.91,62.38,3857,434.34,28035,0.16,0.2,0.0951,280 -583961,500,35,2.29,1x1,2.92,65.15,2.03,69.37,4887,485.14,40050,0.11,0.14,0.128,350 -668789,750,53,2.29,1x1/0,2.92,74.6,2.03,78.82,6426,551.18,60075,0.08,0.1,0.1247,435 diff --git a/jepl/Tables/Manufacturer/SW-Spec-25051.csv b/jepl/Tables/Manufacturer/SW-Spec-25051.csv new file mode 100644 index 0000000..859fa44 --- /dev/null +++ b/jepl/Tables/Manufacturer/SW-Spec-25051.csv @@ -0,0 +1,39 @@ +Stock Number,Conductor Size,Conductor Number,Strand,Insulation Thickness,Ground,Inner Jacket Thickness,Dia. Over Armour,Jacket Thickness,Approx OD,Approx Weight,Min Bending Radius,DC Resistance,AC Resistance,Inductive Reactiance,Allowable Ampacity, +568605,8,2,7,1.14,1x10,1.65,20.55,1.14,22.83,594,157.48,1175,2.14,2.58,0.1706,55 +671448,8,2,7,1.14,1x10,1.65,20.55,1.14,22.83,591,157.48,1175,2.14,2.58,0.1706,55 +561963,8,3,7,1.14,1x10,1.65,21.49,1.14,23.77,707,165.1,1762,2.14,2.58,0.1706,55 +561964,8,4,7,1.14,1x10,1.65,22.99,1.4,25.78,860,180.34,2350,2.14,2.58,0.1706,44 +573821,6,2,7,1.52,1x8,1.65,23.9,1.14,26.19,804,182.88,1865,1.35,1.62,0.1673,75 +671452,6,2,7,1.52,1x8,1.65,23.9,1.14,26.19,799,182.88,1865,1.35,1.62,0.1673,75 +561965,6,3,7,1.52,1x8,1.65,27.91,1.14,30.2,1063,210.82,2799,1.35,1.62,0.1673,75 +561966,6,4,7,1.52,1x8,2.16,30.89,1.14,33.17,1323,231.14,3734,1.35,1.62,0.1673,60 +582005,4,2,7,1.52,1x8,2.16,29.06,1.4,31.85,1130,220.98,2968,0.85,1.02,0.1575,95 +561967,4,3,7,1.52,1x8,2.16,31.55,1.14,33.83,1426,236.22,4454,0.85,1.02,0.1575,95 +561968,4,4,7,1.52,1x8,2.16,33.78,1.14,36.07,1711,251.46,5941,0.85,1.02,0.1575,76 +571184,2,2,7,1.52,1x6,2.16,32.97,1.4,35.76,1563,248.92,4721,0.53,0.64,0.1476,130 +671456,2,2,7,1.52,1x6,2.16,32.97,1.4,35.76,1558,248.92,4721,0.53,0.64,0.1476,130 +561972,2,3,7,1.52,1x6,2.16,34.62,1.14,36.91,1914,256.54,7084,0.53,0.64,0.1476,130 +561973,2,4,7,1.52,1x6,2.16,37.21,1.14,39.5,2323,274.32,9447,0.53,0.64,0.1476,104 +561974,1,3,19,2.03,1x6,2.16,39.32,1.4,42.11,2387,294.64,8936,0.42,0.51,0.1509,145 +561975,1,4,19,2.03,1x6,2.16,42.47,1.4,45.26,2948,314.96,11917,0.42,0.51,0.1509,116 +561976,1/0,3,19,2.03,1x6,2.16,41.45,1.4,44.25,2766,307.34,11276,0.33,0.4,0.1444,170 +561978,1/0,4,19,2.03,1x6,2.16,44.86,1.4,47.65,3445,332.74,15037,0.33,0.4,0.1444,136 +561948,2/0,3,19,2.03,1x6,2.16,43.87,1.4,46.66,3261,325.12,14213,0.27,0.32,0.1411,195 +561949,2/0,4,19,2.03,1x6,2.16,47.88,1.4,50.67,4148,353.06,18953,0.27,0.32,0.1411,156 +586400,3/0,2,19,2.03,1x4,2.16,44.15,1.65,47.5,3039,330.2,11944,0.21,0.26,0.1378,225 +561950,3/0,3,19,2.03,1x4,2.16,46.08,1.4,48.87,3900,340.36,17920,0.21,0.26,0.1378,225 +561952,3/0,4,19,2.03,1x4,2.92,50.52,1.4,53.31,4973,370.84,23892,0.21,0.26,0.1378,180 +561953,4/0,3,19,2.03,1x4,2.16,49.35,1.65,52.71,4770,368.3,22597,0.17,0.2,0.1345,260 +561954,4/0,4,19,2.03,1x4,2.92,55.24,1.65,58.6,6174,408.94,30131,0.17,0.2,0.1345,208 +561955,250,3,37,2.29,1x4,2.92,54.51,1.4,57.3,5597,398.78,26700,0.14,0.17,0.1345,290 +561956,250,4,37,2.29,1x4,2.92,59.23,1.65,62.59,7103,436.88,35600,0.14,0.17,0.1345,232 +561957,300,3,37,2.29,1x4,2.92,58.29,1.65,61.65,6530,429.26,32040,0.12,0.15,0.1345,320 +561958,300,4,37,2.29,1x4,2.92,63.45,1.65,66.8,8225,467.36,42720,0.12,0.15,0.1345,256 +561959,350,3,37,2.29,1x3,2.92,59.94,1.65,63.3,7350,441.96,37380,0.1,0.13,0.1312,350 +561960,350,4,37,2.29,1x3,2.92,65.3,1.65,68.66,9289,480.06,49840,0.1,0.13,0.1312,280 +561961,500,3,37,2.29,1x3,2.92,66.8,1.65,70.15,9740,490.22,53400,0.07,0.1,0.128,430 +561962,500,4,37,2.29,1x3,2.92,72.95,1.65,76.3,12428,533.4,71200,0.07,0.1,0.128,344 +592314,600,3,61,2.29,1x2,2.92,72.29,2.03,76.5,11576,533.4,64080,0.06,0.08,0.128,475 +568478,750,3,61,2.29,1x2,2.92,79.12,2.03,83.39,14155,581.66,80100,0.05,0.07,0.1247,535 +568479,750,4,61,2.29,1x2,3.68,86.94,2.03,91.21,18190,637.54,106800,0.05,0.07,0.1247,428 +641155,1000,3,61,2.29,1x1,3.68,87.66,2.03,91.92,18187,642.62,106800,0.04,0.06,0.1214,615 diff --git a/jepl/Tables/Manufacturer/SW-Spec-25055.csv b/jepl/Tables/Manufacturer/SW-Spec-25055.csv new file mode 100644 index 0000000..def2c82 --- /dev/null +++ b/jepl/Tables/Manufacturer/SW-Spec-25055.csv @@ -0,0 +1,13 @@ +Stock Number,Conductor Size,Conductor Number,Strands,Insul Thickness,Ground,Inner Jacket Thickness,Diameter over Armour,Jacket Thickness,Approx Outer Diameter,Approx Weight,Min Bending Radius,Max Pull Tension,DC Resistance,AC Resistance,Inductive Reactance,Ampacity +584846,6,3,7,1.52,1x6,1.65,27.66,1.4,30.45,798,210.82,2100,2.21,2.66,0.1673,55 +674938,4,3,7,1.52,1x6,2.16,31.14,1.4,33.93,1018,236.22,3342,1.39,1.67,0.1575,75 +584848,2,3,6,1.52,1x6,2.16,34.16,1.4,36.96,1217,256.54,5313,0.88,1.05,0.1476,100 +584852,1,3,8,2.03,1x4,2.16,38.18,1.65,41.53,1534,289.56,6702,0.69,0.83,0.1509,115 +584873,1/0,3,18,2.03,1x4,2.16,40.21,1.65,43.56,1702,304.8,8455,0.55,0.66,0.1444,135 +584876,2/0,3,12,2.03,1x4,2.16,42.39,1.65,45.75,1926,320.04,10658,0.44,0.52,0.1411,150 +584883,3/0,3,16,2.03,1x4,2.16,44.98,1.65,48.34,2171,337.82,13439,0.34,0.41,0.1378,175 +584891,4/0,3,18,2.03,1x4,2.16,48.08,1.65,51.43,2554,358.14,16946,0.28,0.33,0.1345,205 +583957,250,3,35,2.29,1x2,2.92,53.31,1.65,56.67,3131,396.24,20025,0.23,0.28,0.1345,230 +615167,350,3,35,2.29,1x2,1.27,58.57,1.91,62.38,3857,434.34,28035,0.16,0.2,0.0951,280 +583961,500,3,35,2.29,1x1,2.92,65.15,2.03,69.37,4887,485.14,40050,0.11,0.14,0.128,350 +668789,750,3,53,2.29,1x1/0,2.92,74.6,2.03,78.82,6426,551.18,60075,0.08,0.1,0.1247,435 diff --git a/jepl/Tables/Manufacturer/source/SOUTHWIRE_SPEC25051.pdf b/jepl/Tables/Manufacturer/source/SOUTHWIRE_SPEC25051.pdf new file mode 100644 index 0000000..fe4eaa4 Binary files /dev/null and b/jepl/Tables/Manufacturer/source/SOUTHWIRE_SPEC25051.pdf differ diff --git a/jepl/jepl_circuits.py b/jepl/jepl_circuits.py index 06a555b..152fd06 100644 --- a/jepl/jepl_circuits.py +++ b/jepl/jepl_circuits.py @@ -47,7 +47,7 @@ def voltage_drop(nominal_voltage, current, conductor_size, material ='cu', code import os import sys - if os.path.isfile('cable.db') == False: + if os.path.isfile('jepl-cable.db') == False: return (print("Run init. \nCopy jeplinit.py to the same folder as this file and add \n%run jeplinit.py jepl/folder/location/\nto the notebook. Make sure there is a trailing slash.")) if (material == 'al'): @@ -60,6 +60,19 @@ def voltage_drop(nominal_voltage, current, conductor_size, material ='cu', code except sqlite3.OperationalError as e: print(e) + + elif (material == 'cu'): + try: + with sqlite3.connect("cable.db") as con: + cur = con.cursor() + cur.execute('SELECT "AC Resistance" FROM "SW-Spec 25051" WHERE "Conductor Number=3" AND "Conductor Size"=?', (conductor_size,)) + resistance = cur.fetchone()[0] + + except sqlite3.OperationalError as e: + print(e) + + else: + return (print("error, choose material as cu or al")) voltage = vd(nominal_voltage,current,resistance) percent = percentvd(voltage,nominal_voltage) diff --git a/jepl/jeplinit.py b/jepl/jeplinit.py index 4f02a02..4325444 100644 --- a/jepl/jeplinit.py +++ b/jepl/jeplinit.py @@ -60,7 +60,9 @@ create_database('jepl-cec21.db',CEC21_database) cable_database = [ - ['cable.db','SW-Spec 25055',location+'Tables/Manufacturer/SW-Spec-23055.csv'], - ] -create_database('cable.db',cable_database) + ['jepl-cable.db','SW-Spec 25055',location+'Tables/Manufacturer/SW-Spec-23055.csv'], + ['jepl-cable.db','SW-Spec 25051',location+'Tables/Manufacturer/SW-Spec-25055.csv'], + + ] +create_database('jepl-cable.db',cable_database)