From 21a248181b77948940560fcdee82377246306dcf Mon Sep 17 00:00:00 2001 From: jeff Date: Thu, 26 Oct 2023 15:47:08 -0300 Subject: [PATCH] added cec tables 1,3, and 4 --- jepl.py | 9 ++--- tables.py | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 109 insertions(+), 10 deletions(-) diff --git a/jepl.py b/jepl.py index 52203c6..1f81231 100644 --- a/jepl.py +++ b/jepl.py @@ -40,16 +40,13 @@ def conductor_size(current, temp = 75, material = 'cu', code = 'CEC', raceway = # select the correct code table if (code == 'CEC') & (material == 'CU') & (raceway == False): - #code_table = tables.CEC_table1 - return (' I haven\'t created this table yet') + code_table = tables.CEC_table1 elif (code == 'CEC') & (material == 'CU') & (raceway == True): code_table = tables.CEC_table2 elif (code =='CEC') & (material =='AL') & (raceway == False): - #code_table = tables.CEC_table3 - return (' I haven\'t created this table yet') + code_table = tables.CEC_table3 elif (code =='CEC') & (material =='AL') & (raceway == True): - #code_table = tables.CEC_table4 - return (' I haven\'t created this table yet') + code_table = tables.CEC_table4 elif (code =='NEC') & (material =='CU'): return (' I haven\'t created this table yet') elif (code =='NEC') & (material =='AL'): diff --git a/tables.py b/tables.py index 561b4ba..5f5827a 100644 --- a/tables.py +++ b/tables.py @@ -1,6 +1,39 @@ import pandas as pd -CEC21_table2 = pd.DataFrame([['14',15,20,25], +CEC21_table1 = pd.DataFrame([ + ['14',25,30,35], + ['12',30,35,40], + ['10',40,50,55], + ['8',60,70,80], + ['6',80,95,105], + ['4',105,125,140], + ['3',120,145,165], + ['2',140,170,190], + ['1',165,195,220], + ['0',195,230,260], + ['00',220,265,300], + ['000',260,310,350], + ['0000',300,360,405], + ['250',340,405,455], + ['300',370,445,500], + ['350',425,505,570], + ['400',455,545,615], + ['500',520,620,700], + ['600',580,690,780], + ['700',630,755,850], + ['750',655,785,885], + ['800',680,815,920], + ['1000',785,870,980], + ['1250',890,1065,1200], + ['1500',985,1175,1325], + ['1750',1070,1280,1445], + ['2000',1160,1385,1560] + ], + columns = ['size','60','75','90'] + ) + +CEC21_table2 = pd.DataFrame([ + ['14',15,20,25], ['12',20,25,30], ['10',30,35,40], ['8',40,50,55], @@ -23,10 +56,79 @@ CEC21_table2 = pd.DataFrame([['14',15,20,25], ['750',400,475,535], ['800',410,490,555], ['900',435,520,585], - ['1000',455,545,615] - + ['1000',455,545,615], + ['1250',495,590,615], + ['1500',525,625,705], + ['1750',545,650,735], + ['2000',555,665,750] ], columns = ['size','60','75','90'] ) -CEC_table2 = CEC21_table2 \ No newline at end of file +CEC21_table3 = pd.DataFrame([ + ['12',25,30,35], + ['10',35,40,45], + ['8',45,55,60], + ['4',65,75,85], + ['3',95,115,130], + ['2',115,135,150], + ['1',1340,155,175], + ['0',150,180,205], + ['00',175,210,235], + ['000',200,240,270], + ['0000',235,280,315], + ['250',265,315,355], + ['300',295,350,395], + ['350',330,395,445], + ['400',355,425,480], + ['500',405,485,545], + ['600',455,545,615], + ['700',500,595,670], + ['750',520,620,700], + ['800',540,645,725], + ['900',585,700,790], + ['1000',630,750,845], + ['1250',715,855,965], + ['1500',795,950,1070], + ['1750',880,1050,1185], + ['2000',965,1150,1295] + ], + columns = ['size','60','75','90'] + ) + +CEC21_table4 = pd.DataFrame([ + ['12',15,20,25], + ['10',25,30,35], + ['8',35,40,45], + ['6',40,50,55], + ['4',55,65,75], + ['3',65,75,85], + ['2',75,90,100], + ['1',85,100,115], + ['0',100,120,165], + ['00',115,165,150], + ['000',160,155,175], + ['0000',150,180,205], + ['250',170,205,230], + ['300',195,230,260], + ['350',210,250,280], + ['400',225,270,305], + ['500',260,310,350], + ['600',285,340,385], + ['700',315,375,425], + ['750',320,385,435], + ['800',330,395,445], + ['900',355,425,480], + ['1000',375,445,500], + ['1250',405,485,545], + ['1500',435,520,585], + ['1750',455,545,615], + ['2000',470,560,630] + ], + columns = ['size','60','75','90'] + ) + +CEC_table1 = CEC21_table1 +CEC_table2 = CEC21_table2 +CEC_table3 = CEC21_table3 +CEC_table4 = CEC21_table4 \ No newline at end of file