diff --git a/Sample.html b/Sample.html index 47719f7..a35622d 100644 --- a/Sample.html +++ b/Sample.html @@ -46,7 +46,7 @@

Tank Design Report - Sample.html

- +
Thickness0.0 in0.0011464968152866241 in
Features
@@ -65,7 +65,7 @@

Tank Design Report - Sample.html

Internal Pressure - 0 psi + 1 psi External Pressure @@ -77,7 +77,7 @@

Tank Design Report - Sample.html

Bottom Head Type - Conical + Flat @@ -222,12 +222,7 @@

Tank Design Report - Sample.html

Storage Type - Liquid - - - - Specific Gravity - 0 + Gas @@ -240,7 +235,7 @@

Tank Design Report - Sample.html

Type: - Ellipsoidal + Flat Live load @@ -251,7 +246,7 @@

Tank Design Report - Sample.html

0 lbf -
Top Head
+
Shell
@@ -262,7 +257,7 @@

Tank Design Report - Sample.html

- + @@ -278,7 +273,29 @@

Tank Design Report - Sample.html

Parameter Hand Lay-Up
Hoop Tensile Modulus:Hoop Tensile Modulus 0 psi
0 psi
- +
Nozzle
+ + + + + + + + + + + + + + + + + + + + + +
ParameterValue
Number of Nozzles0
Length of Nozzle0 in
Thickness of Nozzle0 in
Diameter of Nozzle0 in
\ No newline at end of file diff --git a/connectors/formulas.py b/connectors/formulas.py index ce4fe3a..749f05a 100644 --- a/connectors/formulas.py +++ b/connectors/formulas.py @@ -14,6 +14,7 @@ Yc = 1.860E+004 # Compressive Strength (psi) S = 1.290E+004 # Shear Strength (psi) g = 9.81 # Gravity (m/s^2) +dEglass = 158.6 # Density of E-Glass (lb/ft^3) def calculateTank(tank): @@ -29,26 +30,24 @@ def calculateTank(tank): float(tank['liquid_height'])*float(tank['specific_gravity']) t = 0 if tank['tensile_force'] and tank['outdoor']: - t1 = tensileForceThickness(tank['operating_moment'], tank['diameter'], - tank['tensile_force_value'], tank['internal_pressure']) + t1 = tensileForceThickness( + tank['operating_moment'], tank['diameter'], tank['tensile_force_value']) t2 = operatingCompressiveForceThickness(tank) t = max(t1, t2) elif tank['outdoor'] and not tank['tensile_force']: t = operatingCompressiveForceThickness(tank) elif tank['tensile_force'] and not tank['outdoor']: - t = tensileForceThickness(tank['operating_moment'], tank['diameter'], - tank['tensile_force_value'], tank['internal_pressure']) - else: - t, Eh = idealThickness( - tank['diameter'], tank['internal_pressure'], tank['hoop_tensile_modulus']) - tank['hoop_tensile_modulus'] = Eh + t = tensileForceThickness( + tank['operating_moment'], tank['diameter'], tank['tensile_force_value']) + + t += idealThickness(tank['diameter'], tank['internal_pressure']) tank['internal_pressure'] = p tank['thickness'] = t + tank['corrosion_barrier_thickness'] + \ tank['corrosion_liner_thickness'] return tank -def idealThickness(D=0.0, Pi=0.0, Eh=0.0): +def idealThickness(D=0.0, Pi=0.0): """ Ideal thickness formula used when none of the modifiers are selected @@ -61,15 +60,12 @@ def idealThickness(D=0.0, Pi=0.0, Eh=0.0): t = (PD)/(2*(0.001*Eh)) Returns: t = thickness - Eh = hoop tensile modulus """ # check if we should use the default hoop tensile modulus - if Eh == 0: - Eh = E1 - return ((float(Pi)*float(D)*10)/(2*Xt), Eh) + return (float(Pi)*float(D)*10)/(2*Xt) -def tensileForceThickness(Ma=0.0, D=0.0, Fat=0.0, Pi=0.0): +def tensileForceThickness(Ma=0.0, D=0.0, Fat=0.0): """ Thickness formula when accounting for tensile force @@ -77,13 +73,12 @@ def tensileForceThickness(Ma=0.0, D=0.0, Fat=0.0, Pi=0.0): Ma = Bending moment from operating loads D = inside diameter Fat = Axial Tensile force - Pi = internal pressure (probably 15) 10 is design factor Formula: - t = ((Ma*8.8507457916)/(PI()*((D/2)^2)*(Xt/10))) + ((Fat*0.2248089431)/(PI()*D*(Xt/10))) + ((P*D)/(4*(Xt/10))); + t = ((Ma*8.8507457916)/(PI()*((D/2)^2)*(Xt/10))) + ((Fat*0.2248089431)/(PI()*D*(Xt/10))) """ - return ((float(Ma))/(math.pi*((float(D)/2)**2)*(Xt/10))) + ((float(Fat))/(math.pi*float(D)*(Xt/10))) + ((float(Pi)*float(D))/(4*(Xt/10))) + return ((float(Ma))/(math.pi*((float(D)/2)**2)*(Xt/10))) + ((float(Fat))/(math.pi*float(D)*(Xt/10))) def operatingCompressiveForceThickness(tank): @@ -122,12 +117,14 @@ def operatingCompressiveForceThickness(tank): t2 = (((((Ma) + Mb)/(PI()*((D/2)^2))) + (((Fac)+Fbc)/(PI()*D)) + ((Pe*D)/4)) * ((5*(D/2))/(0.3*((E2*E1)^(1/2)))))^(1/2); """ # get values + nozzle = (2.0*math.pi*(float(tank['diameter'])/24.0)*(float( + tank['nozzle_length'])/12.0)*(float(tank['nozzle_thickness'])/12.0))*dEglass Ma = float(tank['operating_moment']) D = float(tank['diameter']) Fac = float(tank['compressive_force']) Pe = float(tank['external_pressure']) height = float(tank['height']) - deadLoad = float(tank['dead_load']) + deadLoad = float(tank['dead_load']) + nozzle liveLoad = float(tank['live_load']) Ce = float(tank['snow_Ce']) Ct = float(tank['snow_Ct']) diff --git a/connectors/templates.py b/connectors/templates.py index 4724e24..1fd5560 100644 --- a/connectors/templates.py +++ b/connectors/templates.py @@ -262,7 +262,7 @@ {{ dead_load }} lbf -
Top Head
+
Shell
@@ -273,7 +273,7 @@ - + @@ -289,7 +289,29 @@
Parameter{{ shell }}
Hoop Tensile Modulus:Hoop Tensile Modulus {{ hoop_tensile_modulus }} psi
{{ axial_tensile_strength }} psi
- +
Nozzle
+ + + + + + + + + + + + + + + + + + + + + +
ParameterValue
Number of Nozzles{{ nozzles }}
Length of Nozzle{{ nozzle_length }} in
Thickness of Nozzle{{ nozzle_thickness }} in
Diameter of Nozzle{{ nozzle_diameter }} in
diff --git a/ui.py b/ui.py index 874f170..df6b8c7 100644 --- a/ui.py +++ b/ui.py @@ -110,6 +110,18 @@ def app(): sg.Spin(values=[i for i in range(0, 100, 1)], initial_value=0, key='dead_load', size=(5, 20))], ] + # Nozzle + nozzle = [ + [sg.Text('Number of Nozzles:', pad=(10, 3)), + sg.Spin(values=[i for i in range(0, 100, 1)], initial_value=0, key='nozzles', size=(5, 20))], + [sg.Text('Length of Nozzle (in):', pad=(10, 3)), + sg.Spin(values=[i for i in range(0, 100, 1)], initial_value=0, key='nozzle_length', size=(5, 20))], + [sg.Text('Thickness of Nozzle (in):', pad=(10, 3)), + sg.Spin(values=[i for i in range(0, 100, 1)], initial_value=0, key='nozzle_thickness', size=(5, 20))], + [sg.Text('Diameter of Nozzle (in):', pad=(10, 3)), + sg.Spin(values=[i for i in range(0, 100, 1)], initial_value=0, key='nozzle_diameter', size=(5, 20))], + ] + # Shell shell = [ [sg.Text('Type:', pad=(10, 3)), @@ -133,7 +145,8 @@ def app(): layout = [ [sg.Menu(menu_def, font='_ 12', key='-MENUBAR-')], [[sg.TabGroup([[sg.Tab('Features', features), sg.Tab('Environment', environment), sg.Tab('Contents', contents), - sg.Tab('Top Head', top_head), sg.Tab('Shell', shell),]], + sg.Tab('Top Head', top_head), sg.Tab('Shell', shell), + sg.Tab('Nozzle', nozzle)]], key='-TAB GROUP-', expand_x=True, expand_y=True),]], [actions]] window = sg.Window("Auto FRP Tank", layout, resizable=True,