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.
- anystruct/ANYstructure_documentation.pdf +0 -0
- anystruct/SN_curve_parameters.py +35 -0
- anystruct/__init__.py +0 -0
- anystruct/__main__.py +24 -0
- anystruct/api.py +772 -0
- anystruct/buckling_calc_external.py +120 -0
- anystruct/bulb_anglebar_tbar_flatbar.csv +677 -0
- anystruct/calc_loads.py +526 -0
- anystruct/calc_structure.py +4838 -0
- anystruct/compartment_window.py +176 -0
- anystruct/example_data.py +532 -0
- anystruct/example_data_puls.py +46 -0
- anystruct/excel_inteface.py +244 -0
- anystruct/fatigue_window.py +352 -0
- anystruct/grid_window.py +307 -0
- anystruct/gui.py +24 -0
- anystruct/helper.py +623 -0
- anystruct/images/ANYstructure_logo.jpg +0 -0
- anystruct/images/Buckling_Strength_of_Shells.png +0 -0
- anystruct/images/Panel_geometry_definitions.png +0 -0
- anystruct/images/current_comps_NONE.png +0 -0
- anystruct/images/fls_button.gif +0 -0
- anystruct/images/img_T_L_FB.gif +0 -0
- anystruct/images/img_axial_stresses.gif +0 -0
- anystruct/images/img_ext_pressure_button.gif +0 -0
- anystruct/images/img_ext_pressure_button_def.gif +0 -0
- anystruct/images/img_fixation_parameters.gif +0 -0
- anystruct/images/img_generate_report.gif +0 -0
- anystruct/images/img_int_pressure_button.gif +0 -0
- anystruct/images/img_int_pressure_button_search.gif +0 -0
- anystruct/images/img_multi_opt.gif +0 -0
- anystruct/images/img_optimize.gif +0 -0
- anystruct/images/img_plate_and_stiffener.gif +0 -0
- anystruct/images/img_stf_button.gif +0 -0
- anystruct/images/img_stiffener.gif +0 -0
- anystruct/images/img_stress_button.gif +0 -0
- anystruct/images/img_title.gif +0 -0
- anystruct/images/img_transverse_stress.gif +0 -0
- anystruct/load_factor_window.py +166 -0
- anystruct/load_window.py +721 -0
- anystruct/main_application.py +7918 -0
- anystruct/make_grid_numpy.py +506 -0
- anystruct/make_queue.py +52 -0
- anystruct/make_stack.py +52 -0
- anystruct/ml_files/CL_CSR-Tank_req_cl_predictor.pickle +0 -0
- anystruct/ml_files/CL_CSR-Tank_req_cl_scaler.pickle +0 -0
- anystruct/ml_files/CL_CSR_plate_cl,_CSR_web_cl,_CSR_web_flange_cl,_CSR_flange_cl_predictor.pickle +0 -0
- anystruct/ml_files/CL_CSR_plate_cl,_CSR_web_cl,_CSR_web_flange_cl,_CSR_flange_cl_scaler.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_predictor_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_predictor_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_predictor_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_predictor_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_scaler_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_scaler_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_scaler_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_110_scaler_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_predictor_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_predictor_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_predictor_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_predictor_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_scaler_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_scaler_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_scaler_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_buc_115_scaler_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_predictor_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_predictor_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_predictor_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_predictor_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_scaler_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_scaler_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_scaler_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_110_scaler_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_predictor_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_predictor_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_predictor_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_predictor_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_scaler_In-plane_support_cl_1_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_scaler_In-plane_support_cl_1_UP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_scaler_In-plane_support_cl_2,_3_SP.pickle +0 -0
- anystruct/ml_files/CL_output_cl_str_ult_115_scaler_In-plane_support_cl_2,_3_UP.pickle +0 -0
- anystruct/opt_problem.py +31 -0
- anystruct/optimize.py +1680 -0
- anystruct/optimize_cylinder.py +898 -0
- anystruct/optimize_geometry.py +1708 -0
- anystruct/optimize_multiple_window.py +1507 -0
- anystruct/optimize_window.py +1117 -0
- anystruct/pl_stf_window.py +572 -0
- anystruct/report_generator.py +912 -0
- anystruct/sections.csv +202 -0
- anystruct/sesam_interface.py +115 -0
- anystruct/ship_section_example.txt +1 -0
- anystruct/stresses_window.py +269 -0
- anystruct/testCalc.py +118 -0
- anystructure-5.2.0.dist-info/METADATA +86 -0
- anystructure-5.2.0.dist-info/RECORD +99 -0
- anystructure-5.2.0.dist-info/WHEEL +5 -0
- anystructure-5.2.0.dist-info/entry_points.txt +2 -0
- anystructure-5.2.0.dist-info/licenses/LICENSE +21 -0
- anystructure-5.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
import copy
|
|
3
|
+
# Not used in releases
|
|
4
|
+
|
|
5
|
+
from api import CylStru
|
|
6
|
+
import pandas as pd
|
|
7
|
+
|
|
8
|
+
def get_stresses(file = 'C:\DNV\RTHfisk\stress_results.txt'):
|
|
9
|
+
if 'txt' in file:
|
|
10
|
+
nas = ['',]
|
|
11
|
+
spaces = ''
|
|
12
|
+
for val in range(20):
|
|
13
|
+
spaces += ' '
|
|
14
|
+
nas.append(spaces)
|
|
15
|
+
nas_final = list()
|
|
16
|
+
for val in nas:
|
|
17
|
+
nas_final.append(val + 'N/A')
|
|
18
|
+
|
|
19
|
+
pd_data = pd.read_csv(file,header=0, sep=r'\t', engine='python',
|
|
20
|
+
na_values = nas_final)
|
|
21
|
+
pd_data.columns = [val.strip() for val in pd_data.columns.values]
|
|
22
|
+
pd.set_option('display.max_columns', None)
|
|
23
|
+
print(pd_data)
|
|
24
|
+
else:
|
|
25
|
+
pd_data = pd.read_excel(file)
|
|
26
|
+
# for val in pd_data.iterrows():
|
|
27
|
+
# print(val[1])
|
|
28
|
+
# quit()
|
|
29
|
+
return pd_data
|
|
30
|
+
|
|
31
|
+
def calc_buckling_single(val):
|
|
32
|
+
|
|
33
|
+
my_cyl = CylStru(calculation_domain='Longitudinal Stiffened panel')
|
|
34
|
+
my_cyl.set_stresses(smsd=val[1].SIGMX / 1e6, tQsd=abs(val[1].TAUMXY) / 1e6, shsd=val[1].SIGMY / 1e6)
|
|
35
|
+
my_cyl.set_material(mat_yield=355, emodule=210000, material_factor=1.1, poisson=0.3)
|
|
36
|
+
my_cyl.set_imperfection()
|
|
37
|
+
my_cyl.set_fabrication_method()
|
|
38
|
+
my_cyl.set_end_cap_pressure_included_in_stress(is_included=True)
|
|
39
|
+
my_cyl.set_uls_or_als(kind='ULS')
|
|
40
|
+
# my_cyl.set_exclude_ring_stiffener()
|
|
41
|
+
my_cyl.set_length_between_girder(val=3300)
|
|
42
|
+
my_cyl.set_panel_spacing(val=680)
|
|
43
|
+
my_cyl.set_shell_geometry(radius=13000 / 2, thickness=1000 * val[1].Thickness, tot_length_of_shell=30000,
|
|
44
|
+
distance_between_rings=3300)
|
|
45
|
+
my_cyl.set_longitudinal_stiffener(hw=260, tw=12, bf=49, tf=28, spacing=680)
|
|
46
|
+
# my_cyl.set_ring_girder(hw=500, tw=15, bf=200, tf=25, stf_type='T', spacing=700)
|
|
47
|
+
my_cyl.set_shell_buckling_parmeters()
|
|
48
|
+
results = my_cyl.get_buckling_results()
|
|
49
|
+
scan_idx = tuple(val[1].ScanIndex.split(','))[1].replace(' ','')
|
|
50
|
+
return [scan_idx, val[1]['X-coord'], val[1]['Y-coord'], val[1]['Z-coord'],
|
|
51
|
+
val[1].Thickness, val[1].SIGMX, val[1].SIGMY, val[1].TAUMXY, val[1].Element,
|
|
52
|
+
results['Unstiffened shell'], results['Longitudinal stiffened shell'], results['Ring stiffened shell'],
|
|
53
|
+
max([val for val in [results['Unstiffened shell'], results['Longitudinal stiffened shell'],
|
|
54
|
+
results['Ring stiffened shell']] if val is not None])]
|
|
55
|
+
|
|
56
|
+
def calc_buckling(stresses):
|
|
57
|
+
res_list = list()
|
|
58
|
+
for val in stresses.iterrows():
|
|
59
|
+
|
|
60
|
+
my_cyl = CylStru(calculation_domain='Longitudinal Stiffened shell')
|
|
61
|
+
my_cyl.set_stresses(sasd=val[1].SIGMX/1e6, tQsd=abs(val[1].TAUMXY)/1e6, shsd=val[1].SIGMY/1e6)
|
|
62
|
+
my_cyl.set_material(mat_yield=355, emodule=210000, material_factor=1.1, poisson=0.3)
|
|
63
|
+
my_cyl.set_imperfection()
|
|
64
|
+
my_cyl.set_fabrication_method()
|
|
65
|
+
my_cyl.set_end_cap_pressure_included_in_stress(is_included=True)
|
|
66
|
+
my_cyl.set_uls_or_als(kind='ULS')
|
|
67
|
+
#my_cyl.set_exclude_ring_stiffener()
|
|
68
|
+
#my_cyl.set_length_between_girder(val=8000)
|
|
69
|
+
my_cyl.set_panel_spacing(val=680)
|
|
70
|
+
my_cyl.set_shell_geometry(radius=13000/2,thickness=1000*val[1].Thickness, tot_length_of_shell=30000,
|
|
71
|
+
distance_between_rings=3300)
|
|
72
|
+
my_cyl.set_longitudinal_stiffener(hw=260, tw=23, bf=49, tf=28, spacing=680)
|
|
73
|
+
#my_cyl.set_ring_girder(hw=500, tw=15, bf=200, tf=25, stf_type='T', spacing=700)
|
|
74
|
+
my_cyl.set_shell_buckling_parmeters()
|
|
75
|
+
results = my_cyl.get_buckling_results()
|
|
76
|
+
res_list.append((val[1].Case, val[1]['X-coord'], val[1]['Y-coord'], val[1]['Z-coord'],
|
|
77
|
+
val[1].Thickness, val[1].SIGMX, val[1].SIGMY, val[1].TAUMXY, val[1].Element,
|
|
78
|
+
results['Unstiffened shell']))
|
|
79
|
+
|
|
80
|
+
final_pd = pd.DataFrame(res_list, columns=['Load case', 'x', 'y', 'z', 'Thickness', 'SIGMX', 'SIGMY', 'TAUMXY',
|
|
81
|
+
'Element', 'UF'])
|
|
82
|
+
final_pd.to_csv(r'C:\DNV\RTHfisk\buckling_res.csv')
|
|
83
|
+
|
|
84
|
+
def read_generated_csv(file = r'C:\DNV\RTHfisk\|.csv'):
|
|
85
|
+
data = pd.read_csv(file, index_col=0)
|
|
86
|
+
return data
|
|
87
|
+
|
|
88
|
+
def calc_cyl_buckling_from_folder(folder, files, add_to_file_name: str = ''):
|
|
89
|
+
reslist = list()
|
|
90
|
+
reslist_puls = list()
|
|
91
|
+
for file in files:
|
|
92
|
+
stress_file = get_stresses(folder + file)
|
|
93
|
+
for stress in stress_file.iterrows():
|
|
94
|
+
if not np.isnan(stress[1].Thickness):
|
|
95
|
+
this_result = calc_buckling_single(stress)
|
|
96
|
+
element = this_result[8]
|
|
97
|
+
this_result.insert(0, file)
|
|
98
|
+
this_result.insert(0, str(element)+ '_' + file)
|
|
99
|
+
reslist.append(tuple(this_result))
|
|
100
|
+
|
|
101
|
+
all_res = pd.DataFrame(reslist, columns=['id', 'File', 'ScanIndex', 'x', 'y', 'z', 'thk', 'SIGMX', 'SIGMY',
|
|
102
|
+
'TAUMXY', 'Element', 'Unstiffened shell', 'Longitudinal stiffened shell',
|
|
103
|
+
'Ring stiffened shell', 'Max UF'])
|
|
104
|
+
all_res['PULS SIGMX'] = -1*all_res['SIGMX'].values/1e6
|
|
105
|
+
all_res['PULS SIGMY1'] = -1 * all_res['SIGMY'].values / 1e6
|
|
106
|
+
all_res['PULS SIGMY2'] = -1 * all_res['SIGMY'].values / 1e6
|
|
107
|
+
all_res['PULS TAUMXY'] = -1 * all_res['TAUMXY'].values / 1e6
|
|
108
|
+
all_res['PULS THICKNESS'] = all_res['thk'].values * 1000
|
|
109
|
+
all_res.to_excel(folder + 'buckling_results' + add_to_file_name+'.xlsx')
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
if __name__ == '__main__':
|
|
113
|
+
#stresses = read_generated_csv()
|
|
114
|
+
# stresses = get_stresses()
|
|
115
|
+
# buckling = calc_buckling(stresses=stresses)
|
|
116
|
+
|
|
117
|
+
folder = 'C:\DNV\Workspaces\\OV15MW_Disc25m\\OV_Octa_Gen2_SaAr_NoCo_D1\\Analysis_max_min_1\\'
|
|
118
|
+
files = ['Dstress_TAUXY_absmax', 'Dstress_SIGMY_max', 'Dstress_SIGMY_min', 'Dstress_SIGMX_max', 'Dstress_SIGMX_min']
|
|
119
|
+
files = [file + '.txt' for file in files]
|
|
120
|
+
calc_cyl_buckling_from_folder(folder, files, add_to_file_name='_1')
|