ANYstructure 5.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. anystruct/ANYstructure_documentation.pdf +0 -0
  2. anystruct/SN_curve_parameters.py +35 -0
  3. anystruct/__init__.py +0 -0
  4. anystruct/__main__.py +24 -0
  5. anystruct/api.py +772 -0
  6. anystruct/buckling_calc_external.py +120 -0
  7. anystruct/bulb_anglebar_tbar_flatbar.csv +677 -0
  8. anystruct/calc_loads.py +526 -0
  9. anystruct/calc_structure.py +4838 -0
  10. anystruct/compartment_window.py +176 -0
  11. anystruct/example_data.py +532 -0
  12. anystruct/example_data_puls.py +46 -0
  13. anystruct/excel_inteface.py +244 -0
  14. anystruct/fatigue_window.py +352 -0
  15. anystruct/grid_window.py +307 -0
  16. anystruct/gui.py +24 -0
  17. anystruct/helper.py +623 -0
  18. anystruct/images/ANYstructure_logo.jpg +0 -0
  19. anystruct/images/Buckling_Strength_of_Shells.png +0 -0
  20. anystruct/images/Panel_geometry_definitions.png +0 -0
  21. anystruct/images/current_comps_NONE.png +0 -0
  22. anystruct/images/fls_button.gif +0 -0
  23. anystruct/images/img_T_L_FB.gif +0 -0
  24. anystruct/images/img_axial_stresses.gif +0 -0
  25. anystruct/images/img_ext_pressure_button.gif +0 -0
  26. anystruct/images/img_ext_pressure_button_def.gif +0 -0
  27. anystruct/images/img_fixation_parameters.gif +0 -0
  28. anystruct/images/img_generate_report.gif +0 -0
  29. anystruct/images/img_int_pressure_button.gif +0 -0
  30. anystruct/images/img_int_pressure_button_search.gif +0 -0
  31. anystruct/images/img_multi_opt.gif +0 -0
  32. anystruct/images/img_optimize.gif +0 -0
  33. anystruct/images/img_plate_and_stiffener.gif +0 -0
  34. anystruct/images/img_stf_button.gif +0 -0
  35. anystruct/images/img_stiffener.gif +0 -0
  36. anystruct/images/img_stress_button.gif +0 -0
  37. anystruct/images/img_title.gif +0 -0
  38. anystruct/images/img_transverse_stress.gif +0 -0
  39. anystruct/load_factor_window.py +166 -0
  40. anystruct/load_window.py +721 -0
  41. anystruct/main_application.py +7918 -0
  42. anystruct/make_grid_numpy.py +506 -0
  43. anystruct/make_queue.py +52 -0
  44. anystruct/make_stack.py +52 -0
  45. anystruct/ml_files/CL_CSR-Tank_req_cl_predictor.pickle +0 -0
  46. anystruct/ml_files/CL_CSR-Tank_req_cl_scaler.pickle +0 -0
  47. anystruct/ml_files/CL_CSR_plate_cl,_CSR_web_cl,_CSR_web_flange_cl,_CSR_flange_cl_predictor.pickle +0 -0
  48. anystruct/ml_files/CL_CSR_plate_cl,_CSR_web_cl,_CSR_web_flange_cl,_CSR_flange_cl_scaler.pickle +0 -0
  49. anystruct/ml_files/CL_output_cl_str_buc_110_predictor_In-plane_support_cl_1_SP.pickle +0 -0
  50. anystruct/ml_files/CL_output_cl_str_buc_110_predictor_In-plane_support_cl_1_UP.pickle +0 -0
  51. anystruct/ml_files/CL_output_cl_str_buc_110_predictor_In-plane_support_cl_2,_3_SP.pickle +0 -0
  52. anystruct/ml_files/CL_output_cl_str_buc_110_predictor_In-plane_support_cl_2,_3_UP.pickle +0 -0
  53. anystruct/ml_files/CL_output_cl_str_buc_110_scaler_In-plane_support_cl_1_SP.pickle +0 -0
  54. anystruct/ml_files/CL_output_cl_str_buc_110_scaler_In-plane_support_cl_1_UP.pickle +0 -0
  55. anystruct/ml_files/CL_output_cl_str_buc_110_scaler_In-plane_support_cl_2,_3_SP.pickle +0 -0
  56. anystruct/ml_files/CL_output_cl_str_buc_110_scaler_In-plane_support_cl_2,_3_UP.pickle +0 -0
  57. anystruct/ml_files/CL_output_cl_str_buc_115_predictor_In-plane_support_cl_1_SP.pickle +0 -0
  58. anystruct/ml_files/CL_output_cl_str_buc_115_predictor_In-plane_support_cl_1_UP.pickle +0 -0
  59. anystruct/ml_files/CL_output_cl_str_buc_115_predictor_In-plane_support_cl_2,_3_SP.pickle +0 -0
  60. anystruct/ml_files/CL_output_cl_str_buc_115_predictor_In-plane_support_cl_2,_3_UP.pickle +0 -0
  61. anystruct/ml_files/CL_output_cl_str_buc_115_scaler_In-plane_support_cl_1_SP.pickle +0 -0
  62. anystruct/ml_files/CL_output_cl_str_buc_115_scaler_In-plane_support_cl_1_UP.pickle +0 -0
  63. anystruct/ml_files/CL_output_cl_str_buc_115_scaler_In-plane_support_cl_2,_3_SP.pickle +0 -0
  64. anystruct/ml_files/CL_output_cl_str_buc_115_scaler_In-plane_support_cl_2,_3_UP.pickle +0 -0
  65. anystruct/ml_files/CL_output_cl_str_ult_110_predictor_In-plane_support_cl_1_SP.pickle +0 -0
  66. anystruct/ml_files/CL_output_cl_str_ult_110_predictor_In-plane_support_cl_1_UP.pickle +0 -0
  67. anystruct/ml_files/CL_output_cl_str_ult_110_predictor_In-plane_support_cl_2,_3_SP.pickle +0 -0
  68. anystruct/ml_files/CL_output_cl_str_ult_110_predictor_In-plane_support_cl_2,_3_UP.pickle +0 -0
  69. anystruct/ml_files/CL_output_cl_str_ult_110_scaler_In-plane_support_cl_1_SP.pickle +0 -0
  70. anystruct/ml_files/CL_output_cl_str_ult_110_scaler_In-plane_support_cl_1_UP.pickle +0 -0
  71. anystruct/ml_files/CL_output_cl_str_ult_110_scaler_In-plane_support_cl_2,_3_SP.pickle +0 -0
  72. anystruct/ml_files/CL_output_cl_str_ult_110_scaler_In-plane_support_cl_2,_3_UP.pickle +0 -0
  73. anystruct/ml_files/CL_output_cl_str_ult_115_predictor_In-plane_support_cl_1_SP.pickle +0 -0
  74. anystruct/ml_files/CL_output_cl_str_ult_115_predictor_In-plane_support_cl_1_UP.pickle +0 -0
  75. anystruct/ml_files/CL_output_cl_str_ult_115_predictor_In-plane_support_cl_2,_3_SP.pickle +0 -0
  76. anystruct/ml_files/CL_output_cl_str_ult_115_predictor_In-plane_support_cl_2,_3_UP.pickle +0 -0
  77. anystruct/ml_files/CL_output_cl_str_ult_115_scaler_In-plane_support_cl_1_SP.pickle +0 -0
  78. anystruct/ml_files/CL_output_cl_str_ult_115_scaler_In-plane_support_cl_1_UP.pickle +0 -0
  79. anystruct/ml_files/CL_output_cl_str_ult_115_scaler_In-plane_support_cl_2,_3_SP.pickle +0 -0
  80. anystruct/ml_files/CL_output_cl_str_ult_115_scaler_In-plane_support_cl_2,_3_UP.pickle +0 -0
  81. anystruct/opt_problem.py +31 -0
  82. anystruct/optimize.py +1680 -0
  83. anystruct/optimize_cylinder.py +898 -0
  84. anystruct/optimize_geometry.py +1708 -0
  85. anystruct/optimize_multiple_window.py +1507 -0
  86. anystruct/optimize_window.py +1117 -0
  87. anystruct/pl_stf_window.py +572 -0
  88. anystruct/report_generator.py +912 -0
  89. anystruct/sections.csv +202 -0
  90. anystruct/sesam_interface.py +115 -0
  91. anystruct/ship_section_example.txt +1 -0
  92. anystruct/stresses_window.py +269 -0
  93. anystruct/testCalc.py +118 -0
  94. anystructure-5.2.0.dist-info/METADATA +86 -0
  95. anystructure-5.2.0.dist-info/RECORD +99 -0
  96. anystructure-5.2.0.dist-info/WHEEL +5 -0
  97. anystructure-5.2.0.dist-info/entry_points.txt +2 -0
  98. anystructure-5.2.0.dist-info/licenses/LICENSE +21 -0
  99. anystructure-5.2.0.dist-info/top_level.txt +1 -0
Binary file
@@ -0,0 +1,166 @@
1
+ # Audun
2
+
3
+ import tkinter as tk
4
+ import os
5
+ from _tkinter import TclError
6
+
7
+ class CreateLoadFactorWindow:
8
+ '''
9
+ self._load_factors_dict = {'dnva':[1.3,1.2,0.7], 'dnvb':[1,1,1.3], 'tanktest':[1,1,0]} # DNV loads factors
10
+ '''
11
+
12
+ def __init__(self,master, app=None):
13
+ super(CreateLoadFactorWindow, self).__init__()
14
+ self._frame = master
15
+ self._frame.wm_title("Load factor modifications here.")
16
+ self._frame.geometry('800x800')
17
+ self._frame.grab_set()
18
+ self._app = app
19
+ if __name__ == '__main__':
20
+ self._load_factors_dict = {'dnva': [1.3, 1.2, 0.7], 'dnvb': [1, 1, 1.3],
21
+ 'tanktest': [1, 1, 0]} # DNV loads factors
22
+
23
+
24
+ else:
25
+ self._load_factors_dict = app._load_factors_dict
26
+
27
+ self.new_conda_lff1 = tk.DoubleVar()
28
+ self.new_conda_lff2 = tk.DoubleVar()
29
+ self.new_conda_lff3 = tk.DoubleVar()
30
+ self.new_condb_lff1 = tk.DoubleVar()
31
+ self.new_condb_lff2 = tk.DoubleVar()
32
+ self.new_condb_lff3 = tk.DoubleVar()
33
+ self.new_condtt_lff1 = tk.DoubleVar()
34
+ self.new_condtt_lff2 = tk.DoubleVar()
35
+ self.new_condtt_lff3 = tk.DoubleVar()
36
+
37
+ self.new_change_default = tk.BooleanVar()
38
+ self.new_change_existing = tk.BooleanVar()
39
+
40
+ self.new_conda_lff1.set(self._load_factors_dict['dnva'][0])
41
+ self.new_conda_lff2.set(self._load_factors_dict['dnva'][1])
42
+ self.new_conda_lff3.set(self._load_factors_dict['dnva'][2])
43
+ self.new_condb_lff1.set(self._load_factors_dict['dnvb'][0])
44
+ self.new_condb_lff2.set(self._load_factors_dict['dnvb'][1])
45
+ self.new_condb_lff3.set(self._load_factors_dict['dnvb'][2])
46
+ self.new_condtt_lff1.set(self._load_factors_dict['tanktest'][0])
47
+ self.new_condtt_lff2.set(self._load_factors_dict['tanktest'][1])
48
+ self.new_condtt_lff3.set(self._load_factors_dict['tanktest'][2])
49
+
50
+ ent_w = 20
51
+ tk.Label(self._frame, text='Static and dynamic load factors is specified here', font='Verdana 15 bold')\
52
+ .grid(row = 1, column = 1, sticky = tk.W)
53
+ tk.Label(self._frame, text='Note that DNV is used as reference, '
54
+ 'but the load factors can be any other rule set such as ISO.', font='Verdana 8 bold')\
55
+ .grid(row = 2, column = 1, sticky = tk.W)
56
+
57
+ tk.Label(self._frame, text=' ', font='Verdana 8 bold')\
58
+ .grid(row = 3, column = 1, sticky = tk.W)
59
+
60
+ tk.Label(self._frame, text='Condition a) - Static load factor "unknown loads"', font='Verdana 8 bold')\
61
+ .grid(row = 4, column = 1, sticky = tk.W)
62
+ tk.Label(self._frame, text='Condition a) - Static load factor well defined loads', font='Verdana 8 bold')\
63
+ .grid(row = 5, column = 1, sticky = tk.W)
64
+ tk.Label(self._frame, text='Condition a) - Dynamic load factor', font='Verdana 8 bold')\
65
+ .grid(row = 6, column = 1, sticky = tk.W)
66
+ self.ent_conda_lf1 = tk.Entry(self._frame, textvariable=self.new_conda_lff1, width=ent_w)
67
+ self.ent_conda_lf2 = tk.Entry(self._frame, textvariable=self.new_conda_lff2, width=ent_w)
68
+ self.ent_conda_lf3 = tk.Entry(self._frame, textvariable=self.new_conda_lff3, width=ent_w)
69
+ self.ent_conda_lf1.grid(row=4, column=2)
70
+ self.ent_conda_lf2.grid(row=5, column=2)
71
+ self.ent_conda_lf3.grid(row=6, column=2)
72
+
73
+
74
+
75
+ tk.Label(self._frame, text=' ', font='Verdana 8 bold')\
76
+ .grid(row = 7, column = 1, sticky = tk.W)
77
+
78
+ tk.Label(self._frame, text='Condition b) - Static load factor "unknown loads"', font='Verdana 8 bold')\
79
+ .grid(row = 8, column = 1, sticky = tk.W)
80
+ tk.Label(self._frame, text='Condition b) - Static load factor well defined loads', font='Verdana 8 bold')\
81
+ .grid(row = 9, column = 1, sticky = tk.W)
82
+ tk.Label(self._frame, text='Condition b) - Dynamic load factor', font='Verdana 8 bold')\
83
+ .grid(row = 10, column = 1, sticky = tk.W)
84
+ self.ent_condb_lf1 = tk.Entry(self._frame, textvariable=self.new_condb_lff1, width=ent_w)
85
+ self.ent_condb_lf2 = tk.Entry(self._frame, textvariable=self.new_condb_lff2, width=ent_w)
86
+ self.ent_condb_lf3 = tk.Entry(self._frame, textvariable=self.new_condb_lff3, width=ent_w)
87
+ self.ent_condb_lf1.grid(row=8, column=2)
88
+ self.ent_condb_lf2.grid(row=9, column=2)
89
+ self.ent_condb_lf3.grid(row=10, column=2)
90
+
91
+ tk.Label(self._frame, text=' ', font='Verdana 8 bold')\
92
+ .grid(row = 11, column = 1, sticky = tk.W)
93
+
94
+ tk.Label(self._frame, text='Tank test) - Static load factor "unknown loads"', font='Verdana 8 bold')\
95
+ .grid(row = 12, column = 1, sticky = tk.W)
96
+ tk.Label(self._frame, text='Tank test) - Static load factor well defined loads', font='Verdana 8 bold')\
97
+ .grid(row = 13, column = 1, sticky = tk.W)
98
+ tk.Label(self._frame, text='Tank test) - Dynamic load factor', font='Verdana 8 bold')\
99
+ .grid(row = 14, column = 1, sticky = tk.W)
100
+ self.ent_condtt_lf1 = tk.Entry(self._frame, textvariable=self.new_condtt_lff1, width=ent_w)
101
+ self.ent_condtt_lf2 = tk.Entry(self._frame, textvariable=self.new_condtt_lff2, width=ent_w)
102
+ self.ent_condtt_lf3 = tk.Entry(self._frame, textvariable=self.new_condtt_lff3, width=ent_w)
103
+ self.ent_condtt_lf1.grid(row=12, column=2)
104
+ self.ent_condtt_lf2.grid(row=13, column=2)
105
+ self.ent_condtt_lf3.grid(row=14, column=2)
106
+
107
+ tk.Label(self._frame, text=' ', font='Verdana 8 bold')\
108
+ .grid(row = 15, column = 1, sticky = tk.W)
109
+ # tk.Label(self._frame, text='Change all current load factors', font='Verdana 8 bold')\
110
+ # .grid(row = 16, column = 1, sticky = tk.W)
111
+ # tk.Checkbutton(self._frame, variable=self.new_change_existing)\
112
+ # .grid(row=17, column=1, sticky = tk.W)
113
+ # tk.Label(self._frame, text='Change default load factors', font='Verdana 8 bold')\
114
+ # .grid(row = 18, column = 1, sticky = tk.W)
115
+ # tk.Checkbutton(self._frame, variable=self.new_change_default)\
116
+ # .grid(row=19, column=1, sticky=tk.W)
117
+ #
118
+ tk.Label(self._frame, text=' ', font='Verdana 8 bold')\
119
+ .grid(row = 16, column = 1, sticky = tk.W)
120
+
121
+ destroy_and_return = tk.Button(self._frame, text='Return specified load factors and change existing',
122
+ command=self.return_load_factors, bg='green', font='Verdana 12', fg='yellow')
123
+ destroy_and_return.grid(row = 17, column = 1)
124
+
125
+ tk.Label(self._frame, text=' ', font='Verdana 8 bold')\
126
+ .grid(row = 18, column = 1)
127
+
128
+ try:
129
+ img_file_name = 'img_dnv_load_combinations.gif'
130
+ if os.path.isfile('images/' + img_file_name):
131
+ file_path ='images/' + img_file_name
132
+ else:
133
+ file_path = app._root_dir + '/images/' + img_file_name
134
+ photo_transverse = tk.PhotoImage(file=file_path)
135
+ label_trans = tk.Label(self._frame, image=photo_transverse)
136
+ label_trans.image = photo_transverse # keep a reference!
137
+ label_trans.grid(row = 19, column = 1, columnspan = 2)
138
+ except TclError:
139
+ pass
140
+
141
+ def return_load_factors(self):
142
+ '''
143
+ self._load_factors_dict = {'dnva':[1.3,1.2,0.7], 'dnvb':[1,1,1.3], 'tanktest':[1,1,0]} # DNV loads factors
144
+ :return:
145
+ '''
146
+ self._load_factors_dict['dnva'] = [self.new_conda_lff1.get(), self.new_conda_lff2.get(),
147
+ self.new_conda_lff3.get()]
148
+ self._load_factors_dict['dnvb'] = [self.new_condb_lff1.get(), self.new_condb_lff2.get(),
149
+ self.new_condb_lff3.get()]
150
+ self._load_factors_dict['tanktest'] = [self.new_condtt_lff1.get(), self.new_condtt_lff2.get(),
151
+ self.new_condtt_lff3.get()]
152
+ if __name__ == '__main__':
153
+ self._frame.destroy()
154
+ print({'returned lf dict': self._load_factors_dict,
155
+ 'change exisiting': self.new_change_existing.get(),
156
+ 'change default': self.new_change_default.get()})
157
+ return
158
+
159
+ self._app.on_close_load_factor_window({'returned lf dict': self._load_factors_dict,
160
+ 'change exisiting': self.new_change_existing.get(),
161
+ 'change default': self.new_change_default.get()})
162
+ self._frame.destroy()
163
+ if __name__ == '__main__':
164
+ root = tk.Tk()
165
+ my_app = CreateLoadFactorWindow(root,app=None)
166
+ root.mainloop()