qtmodel 0.5.31__tar.gz → 0.5.33__tar.gz

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.

Potentially problematic release.


This version of qtmodel might be problematic. Click here for more details.

@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qtmodel
3
- Version: 0.5.31
4
- Summary: python modeling for qt 24/10/29
3
+ Version: 0.5.33
4
+ Summary: python modeling for qt 24/10/31
5
5
  Home-page: https://github.com/Inface0443/pyqt
6
6
  Author: dqy-zhj
7
7
  Author-email: 1105417715@qq.com
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Operating System :: OS Independent
13
13
  Description-Content-Type: text/markdown
14
14
 
15
- # 最新版本 V0.5.31 - 2024.10.29
15
+ # 最新版本 V0.5.33 - 2024.10.31
16
16
  > pip install --upgrade qtmodel -i https://pypi.org/simple
17
17
  - 修改帮助文档
18
18
  ## 项目管理
@@ -167,13 +167,13 @@ Returns: 无
167
167
  > non_linear_method: 非线性方法 0-修正牛顿法 1-牛顿法
168
168
  > max_loading_steps: 最大加载步数
169
169
  > max_iteration_times: 最大迭代次数
170
- > relative_accuracy_of_displacement: 位移相对精度
171
- > relative_accuracy_of_force: 内力相对精度
170
+ > accuracy_of_displacement: 位移相对精度
171
+ > accuracy_of_force: 内力相对精度
172
172
  ```Python
173
173
  # 示例代码
174
174
  from qtmodel import *
175
175
  mdb.update_non_linear_setting(non_linear_type=-1, non_linear_method=1, max_loading_steps=-1, max_iteration_times=30,
176
- relative_accuracy_of_displacement=0.0001, relative_accuracy_of_force=0.0001)
176
+ accuracy_of_displacement=0.0001, accuracy_of_force=0.0001)
177
177
  ```
178
178
  Returns: 无
179
179
  ### update_operation_stage_setting
@@ -203,6 +203,19 @@ from qtmodel import *
203
203
  mdb.update_self_vibration_setting(do_analysis=True,method=1,matrix_type=0,mode_num=3)
204
204
  ```
205
205
  Returns: 无
206
+ ### update_response_spectrum_setting
207
+ 更新反应谱设置
208
+ > 参数:
209
+ > do_analysis:是否进行反应谱分析
210
+ > kind:组合方式 1-SRSS 2-CQC
211
+ > by_mode: 是否按照振型输入阻尼比
212
+ > damping_ratio:常数阻尼比或振型阻尼比列表
213
+ ```Python
214
+ # 示例代码
215
+ from qtmodel import *
216
+ mdb.update_response_spectrum_setting(do_analysis=True,kind=1,damping_ratio=0.05)
217
+ ```
218
+ Returns: 无
206
219
  ## 节点操作
207
220
  ### add_node
208
221
  根据坐标信息和节点编号添加节点,默认自动识别编号
@@ -476,12 +489,12 @@ Returns: 无
476
489
  将收缩徐变参数连接到材料
477
490
  > 参数:
478
491
  > index: 材料编号
479
- > creep_id: 收缩徐变编号
492
+ > creep_name: 收缩徐变名称
480
493
  > f_cuk: 材料标准抗压强度,仅自定义材料是需要输入
481
494
  ```Python
482
495
  # 示例代码
483
496
  from qtmodel import *
484
- mdb.update_material_creep(index=1,creep_id=1,f_cuk=5e7)
497
+ mdb.update_material_creep(index=1,creep_name="C60",f_cuk=5e7)
485
498
  ```
486
499
  Returns: 无
487
500
  ### remove_material
@@ -1018,6 +1031,77 @@ from qtmodel import *
1018
1031
  mdb.remove_live_load_case(name="活载工况1")
1019
1032
  ```
1020
1033
  Returns: 无
1034
+ ## 动力荷载操作
1035
+ ### add_load_to_mass
1036
+ 添加荷载转为质量
1037
+ > 参数:
1038
+ > name: 荷载工况名称
1039
+ > factor: 系数
1040
+ ```Python
1041
+ # 示例代码
1042
+ from qtmodel import *
1043
+ mdb.add_load_to_mass(name="荷载工况",factor=1)
1044
+ ```
1045
+ Returns: 无
1046
+ ### add_nodal_mass
1047
+ 添加节点质量
1048
+ > 参数:
1049
+ > node_id:节点编号,支持单个编号和编号列表
1050
+ > mass_info:[m,rmX,rmY,rmZ]
1051
+ ```Python
1052
+ # 示例代码
1053
+ from qtmodel import *
1054
+ mdb.add_nodal_mass(node_id=1,mass_info=(100,0,0,0))
1055
+ ```
1056
+ Returns: 无
1057
+ ### remove_nodal_mass
1058
+ 删除节点质量
1059
+ > 参数:
1060
+ > node_id:节点号,默认删除所有节点质量
1061
+ ```Python
1062
+ # 示例代码
1063
+ from qtmodel import *
1064
+ mdb.remove_nodal_mass(node_id=1)
1065
+ ```
1066
+ Returns: 无
1067
+ ### remove_load_to_mass
1068
+ 删除荷载转为质量
1069
+ > 参数:
1070
+ > name:荷载工况名
1071
+ ```Python
1072
+ # 示例代码
1073
+ from qtmodel import *
1074
+ mdb.remove_load_to_mass(name="荷载工况")
1075
+ ```
1076
+ Returns: 无
1077
+ ### add_spectrum_function
1078
+ 添加反应谱函数
1079
+ > 参数:
1080
+ > name:反应谱函数名
1081
+ > factor:反应谱调整系数
1082
+ > kind:反应谱类型 0-无量纲 1-加速度 2-位移
1083
+ > function_info:反应谱函数信息
1084
+ ```Python
1085
+ # 示例代码
1086
+ from qtmodel import *
1087
+ mdb.add_spectrum_function(name="反应谱函数1",factor=1.0,function_info=[(0,0.02),(1,0.03)])
1088
+ ```
1089
+ Returns: 无
1090
+ ### add_spectrum_case
1091
+ 添加反应谱工况
1092
+ > 参数:
1093
+ > name:荷载工况名
1094
+ > description:说明
1095
+ > kind:组合方式 1-求模 2-求和
1096
+ > info_x: 反应谱X向信息 (X方向函数名,系数)
1097
+ > info_y: 反应谱Y向信息 (Y方向函数名,系数)
1098
+ > info_z: 反应谱Z向信息 (Z方向函数名,系数)
1099
+ ```Python
1100
+ # 示例代码
1101
+ from qtmodel import *
1102
+ mdb.add_spectrum_case(name="反应谱工况",info_x=("函数1",1.0))
1103
+ ```
1104
+ Returns: 无
1021
1105
  ## 钢束操作
1022
1106
  ### add_tendon_group
1023
1107
  按照名称添加钢束组,添加时可指定钢束组id
@@ -1176,48 +1260,6 @@ from qtmodel import *
1176
1260
  mdb.remove_load_group(name="荷载组1")
1177
1261
  ```
1178
1262
  Returns: 无
1179
- ### add_load_to_mass
1180
- 添加荷载转为质量
1181
- > 参数:
1182
- > name: 荷载工况名称
1183
- > factor: 系数
1184
- ```Python
1185
- # 示例代码
1186
- from qtmodel import *
1187
- mdb.add_load_to_mass(name="荷载工况",factor=1)
1188
- ```
1189
- Returns: 无
1190
- ### add_nodal_mass
1191
- 添加节点质量
1192
- > 参数:
1193
- > node_id:节点编号,支持单个编号和编号列表
1194
- > mass_info:[m,rmX,rmY,rmZ]
1195
- ```Python
1196
- # 示例代码
1197
- from qtmodel import *
1198
- mdb.add_nodal_mass(node_id=1,mass_info=(100,0,0,0))
1199
- ```
1200
- Returns: 无
1201
- ### remove_nodal_mass
1202
- 删除节点质量
1203
- > 参数:
1204
- > node_id:节点号,默认删除所有节点质量
1205
- ```Python
1206
- # 示例代码
1207
- from qtmodel import *
1208
- mdb.remove_nodal_mass(node_id=1)
1209
- ```
1210
- Returns: 无
1211
- ### remove_load_to_mass
1212
- 删除荷载转为质量
1213
- > 参数:
1214
- > name:荷载工况名
1215
- ```Python
1216
- # 示例代码
1217
- from qtmodel import *
1218
- mdb.remove_load_to_mass(name="荷载工况")
1219
- ```
1220
- Returns: 无
1221
1263
  ### add_pre_stress
1222
1264
  添加预应力
1223
1265
  > 参数:
@@ -1782,7 +1824,7 @@ Returns: 无
1782
1824
  > describe:描述
1783
1825
  > combine_info:荷载组合信息 [(荷载工况类型,工况名,系数)...] 工况类型如下
1784
1826
  > _"ST"-静力荷载工况 "CS"-施工阶段荷载工况 "CB"-荷载组合_
1785
- > _"MV"-移动荷载工况 "SM"-沉降荷载工况_
1827
+ > _"MV"-移动荷载工况 "SM"-沉降荷载工况_ "RS"-反应谱工况_
1786
1828
  ```Python
1787
1829
  # 示例代码
1788
1830
  from qtmodel import *
@@ -1,4 +1,4 @@
1
- # 最新版本 V0.5.31 - 2024.10.29
1
+ # 最新版本 V0.5.33 - 2024.10.31
2
2
  > pip install --upgrade qtmodel -i https://pypi.org/simple
3
3
  - 修改帮助文档
4
4
  ## 项目管理
@@ -153,13 +153,13 @@ Returns: 无
153
153
  > non_linear_method: 非线性方法 0-修正牛顿法 1-牛顿法
154
154
  > max_loading_steps: 最大加载步数
155
155
  > max_iteration_times: 最大迭代次数
156
- > relative_accuracy_of_displacement: 位移相对精度
157
- > relative_accuracy_of_force: 内力相对精度
156
+ > accuracy_of_displacement: 位移相对精度
157
+ > accuracy_of_force: 内力相对精度
158
158
  ```Python
159
159
  # 示例代码
160
160
  from qtmodel import *
161
161
  mdb.update_non_linear_setting(non_linear_type=-1, non_linear_method=1, max_loading_steps=-1, max_iteration_times=30,
162
- relative_accuracy_of_displacement=0.0001, relative_accuracy_of_force=0.0001)
162
+ accuracy_of_displacement=0.0001, accuracy_of_force=0.0001)
163
163
  ```
164
164
  Returns: 无
165
165
  ### update_operation_stage_setting
@@ -189,6 +189,19 @@ from qtmodel import *
189
189
  mdb.update_self_vibration_setting(do_analysis=True,method=1,matrix_type=0,mode_num=3)
190
190
  ```
191
191
  Returns: 无
192
+ ### update_response_spectrum_setting
193
+ 更新反应谱设置
194
+ > 参数:
195
+ > do_analysis:是否进行反应谱分析
196
+ > kind:组合方式 1-SRSS 2-CQC
197
+ > by_mode: 是否按照振型输入阻尼比
198
+ > damping_ratio:常数阻尼比或振型阻尼比列表
199
+ ```Python
200
+ # 示例代码
201
+ from qtmodel import *
202
+ mdb.update_response_spectrum_setting(do_analysis=True,kind=1,damping_ratio=0.05)
203
+ ```
204
+ Returns: 无
192
205
  ## 节点操作
193
206
  ### add_node
194
207
  根据坐标信息和节点编号添加节点,默认自动识别编号
@@ -462,12 +475,12 @@ Returns: 无
462
475
  将收缩徐变参数连接到材料
463
476
  > 参数:
464
477
  > index: 材料编号
465
- > creep_id: 收缩徐变编号
478
+ > creep_name: 收缩徐变名称
466
479
  > f_cuk: 材料标准抗压强度,仅自定义材料是需要输入
467
480
  ```Python
468
481
  # 示例代码
469
482
  from qtmodel import *
470
- mdb.update_material_creep(index=1,creep_id=1,f_cuk=5e7)
483
+ mdb.update_material_creep(index=1,creep_name="C60",f_cuk=5e7)
471
484
  ```
472
485
  Returns: 无
473
486
  ### remove_material
@@ -1004,6 +1017,77 @@ from qtmodel import *
1004
1017
  mdb.remove_live_load_case(name="活载工况1")
1005
1018
  ```
1006
1019
  Returns: 无
1020
+ ## 动力荷载操作
1021
+ ### add_load_to_mass
1022
+ 添加荷载转为质量
1023
+ > 参数:
1024
+ > name: 荷载工况名称
1025
+ > factor: 系数
1026
+ ```Python
1027
+ # 示例代码
1028
+ from qtmodel import *
1029
+ mdb.add_load_to_mass(name="荷载工况",factor=1)
1030
+ ```
1031
+ Returns: 无
1032
+ ### add_nodal_mass
1033
+ 添加节点质量
1034
+ > 参数:
1035
+ > node_id:节点编号,支持单个编号和编号列表
1036
+ > mass_info:[m,rmX,rmY,rmZ]
1037
+ ```Python
1038
+ # 示例代码
1039
+ from qtmodel import *
1040
+ mdb.add_nodal_mass(node_id=1,mass_info=(100,0,0,0))
1041
+ ```
1042
+ Returns: 无
1043
+ ### remove_nodal_mass
1044
+ 删除节点质量
1045
+ > 参数:
1046
+ > node_id:节点号,默认删除所有节点质量
1047
+ ```Python
1048
+ # 示例代码
1049
+ from qtmodel import *
1050
+ mdb.remove_nodal_mass(node_id=1)
1051
+ ```
1052
+ Returns: 无
1053
+ ### remove_load_to_mass
1054
+ 删除荷载转为质量
1055
+ > 参数:
1056
+ > name:荷载工况名
1057
+ ```Python
1058
+ # 示例代码
1059
+ from qtmodel import *
1060
+ mdb.remove_load_to_mass(name="荷载工况")
1061
+ ```
1062
+ Returns: 无
1063
+ ### add_spectrum_function
1064
+ 添加反应谱函数
1065
+ > 参数:
1066
+ > name:反应谱函数名
1067
+ > factor:反应谱调整系数
1068
+ > kind:反应谱类型 0-无量纲 1-加速度 2-位移
1069
+ > function_info:反应谱函数信息
1070
+ ```Python
1071
+ # 示例代码
1072
+ from qtmodel import *
1073
+ mdb.add_spectrum_function(name="反应谱函数1",factor=1.0,function_info=[(0,0.02),(1,0.03)])
1074
+ ```
1075
+ Returns: 无
1076
+ ### add_spectrum_case
1077
+ 添加反应谱工况
1078
+ > 参数:
1079
+ > name:荷载工况名
1080
+ > description:说明
1081
+ > kind:组合方式 1-求模 2-求和
1082
+ > info_x: 反应谱X向信息 (X方向函数名,系数)
1083
+ > info_y: 反应谱Y向信息 (Y方向函数名,系数)
1084
+ > info_z: 反应谱Z向信息 (Z方向函数名,系数)
1085
+ ```Python
1086
+ # 示例代码
1087
+ from qtmodel import *
1088
+ mdb.add_spectrum_case(name="反应谱工况",info_x=("函数1",1.0))
1089
+ ```
1090
+ Returns: 无
1007
1091
  ## 钢束操作
1008
1092
  ### add_tendon_group
1009
1093
  按照名称添加钢束组,添加时可指定钢束组id
@@ -1162,48 +1246,6 @@ from qtmodel import *
1162
1246
  mdb.remove_load_group(name="荷载组1")
1163
1247
  ```
1164
1248
  Returns: 无
1165
- ### add_load_to_mass
1166
- 添加荷载转为质量
1167
- > 参数:
1168
- > name: 荷载工况名称
1169
- > factor: 系数
1170
- ```Python
1171
- # 示例代码
1172
- from qtmodel import *
1173
- mdb.add_load_to_mass(name="荷载工况",factor=1)
1174
- ```
1175
- Returns: 无
1176
- ### add_nodal_mass
1177
- 添加节点质量
1178
- > 参数:
1179
- > node_id:节点编号,支持单个编号和编号列表
1180
- > mass_info:[m,rmX,rmY,rmZ]
1181
- ```Python
1182
- # 示例代码
1183
- from qtmodel import *
1184
- mdb.add_nodal_mass(node_id=1,mass_info=(100,0,0,0))
1185
- ```
1186
- Returns: 无
1187
- ### remove_nodal_mass
1188
- 删除节点质量
1189
- > 参数:
1190
- > node_id:节点号,默认删除所有节点质量
1191
- ```Python
1192
- # 示例代码
1193
- from qtmodel import *
1194
- mdb.remove_nodal_mass(node_id=1)
1195
- ```
1196
- Returns: 无
1197
- ### remove_load_to_mass
1198
- 删除荷载转为质量
1199
- > 参数:
1200
- > name:荷载工况名
1201
- ```Python
1202
- # 示例代码
1203
- from qtmodel import *
1204
- mdb.remove_load_to_mass(name="荷载工况")
1205
- ```
1206
- Returns: 无
1207
1249
  ### add_pre_stress
1208
1250
  添加预应力
1209
1251
  > 参数:
@@ -1768,7 +1810,7 @@ Returns: 无
1768
1810
  > describe:描述
1769
1811
  > combine_info:荷载组合信息 [(荷载工况类型,工况名,系数)...] 工况类型如下
1770
1812
  > _"ST"-静力荷载工况 "CS"-施工阶段荷载工况 "CB"-荷载组合_
1771
- > _"MV"-移动荷载工况 "SM"-沉降荷载工况_
1813
+ > _"MV"-移动荷载工况 "SM"-沉降荷载工况_ "RS"-反应谱工况_
1772
1814
  ```Python
1773
1815
  # 示例代码
1774
1816
  from qtmodel import *
@@ -233,7 +233,7 @@ class Mdb:
233
233
 
234
234
  @staticmethod
235
235
  def update_non_linear_setting(non_linear_type: int = 1, non_linear_method: int = 1, max_loading_steps: int = 1, max_iteration_times: int = 30,
236
- relative_accuracy_of_displacement: float = 0.0001, relative_accuracy_of_force: float = 0.0001):
236
+ accuracy_of_displacement: float = 0.0001, accuracy_of_force: float = 0.0001):
237
237
  """
238
238
  更新非线性设置
239
239
  Args:
@@ -241,23 +241,23 @@ class Mdb:
241
241
  non_linear_method: 非线性方法 0-修正牛顿法 1-牛顿法
242
242
  max_loading_steps: 最大加载步数
243
243
  max_iteration_times: 最大迭代次数
244
- relative_accuracy_of_displacement: 位移相对精度
245
- relative_accuracy_of_force: 内力相对精度
244
+ accuracy_of_displacement: 位移相对精度
245
+ accuracy_of_force: 内力相对精度
246
246
  Example:
247
247
  mdb.update_non_linear_setting(non_linear_type=-1, non_linear_method=1, max_loading_steps=-1, max_iteration_times=30,
248
- relative_accuracy_of_displacement=0.0001, relative_accuracy_of_force=0.0001)
248
+ accuracy_of_displacement=0.0001, accuracy_of_force=0.0001)
249
249
  Returns: 无
250
250
  """
251
251
  try:
252
252
  qt_model.UpdateNonLinearSetting(
253
253
  nonLinearType=non_linear_type, nonLinearMethod=non_linear_method, maxLoadingSteps=max_loading_steps,
254
- maxIterationTimes=max_iteration_times, relativeAccuracyOfDisplacement=relative_accuracy_of_displacement,
255
- relativeAccuracyOfInternalForce=relative_accuracy_of_force)
254
+ maxIterationTimes=max_iteration_times, relativeAccuracyOfDisplacement=accuracy_of_displacement,
255
+ relativeAccuracyOfInternalForce=accuracy_of_force)
256
256
  except Exception as ex:
257
257
  raise Exception(ex)
258
258
 
259
259
  @staticmethod
260
- def update_operation_stage_setting(do_analysis: bool, final_stage: str = "", static_load_cases: list[str] = None,
260
+ def update_operation_stage_setting(do_analysis: bool = True, final_stage: str = "", static_load_cases: list[str] = None,
261
261
  sink_load_cases: list[str] = None, live_load_cases: list[str] = None, ):
262
262
  """
263
263
  更新运营阶段分析设置
@@ -279,7 +279,7 @@ class Mdb:
279
279
  raise Exception(ex)
280
280
 
281
281
  @staticmethod
282
- def update_self_vibration_setting(do_analysis: bool = False, method: int = 1, matrix_type: int = 0, mode_num: int = 3):
282
+ def update_self_vibration_setting(do_analysis: bool = True, method: int = 1, matrix_type: int = 0, mode_num: int = 3):
283
283
  """
284
284
  更新自振分析设置
285
285
  Args:
@@ -296,6 +296,30 @@ class Mdb:
296
296
  except Exception as ex:
297
297
  raise Exception(ex)
298
298
 
299
+ @staticmethod
300
+ def update_response_spectrum_setting(do_analysis: bool = True, kind: int = 1, by_mode: bool = False,
301
+ damping_ratio: (Union[float, List[float]]) = 0.05):
302
+ """
303
+ 更新反应谱设置
304
+ Args:
305
+ do_analysis:是否进行反应谱分析
306
+ kind:组合方式 1-SRSS 2-CQC
307
+ by_mode: 是否按照振型输入阻尼比
308
+ damping_ratio:常数阻尼比或振型阻尼比列表
309
+ Example:
310
+ mdb.update_response_spectrum_setting(do_analysis=True,kind=1,damping_ratio=0.05)
311
+ Returns: 无
312
+ """
313
+ try:
314
+ if isinstance(damping_ratio, float) and damping_ratio > 0:
315
+ qt_model.UpdateResponseSpectrumSetting(doAnalysis=do_analysis, kind=kind, isDampingByMode=by_mode, dampingRatio=damping_ratio)
316
+ elif isinstance(damping_ratio, list) and all(x > 0 for x in damping_ratio):
317
+ qt_model.UpdateResponseSpectrumSetting(doAnalysis=do_analysis, kind=kind, isDampingByMode=by_mode, dampingRatio=damping_ratio)
318
+ else:
319
+ raise Exception("操作失败,要求阻尼比大于零")
320
+ except Exception as ex:
321
+ raise Exception(ex)
322
+
299
323
  # endregion
300
324
 
301
325
  # region 节点操作
@@ -775,19 +799,19 @@ class Mdb:
775
799
  raise Exception(ex)
776
800
 
777
801
  @staticmethod
778
- def update_material_creep(index: int = 1, creep_id: int = 1, f_cuk: float = 0):
802
+ def update_material_creep(index: int = 1, creep_name: str = "", f_cuk: float = 0):
779
803
  """
780
804
  将收缩徐变参数连接到材料
781
805
  Args:
782
806
  index: 材料编号
783
- creep_id: 收缩徐变编号
807
+ creep_name: 收缩徐变名称
784
808
  f_cuk: 材料标准抗压强度,仅自定义材料是需要输入
785
809
  Example:
786
- mdb.update_material_creep(index=1,creep_id=1,f_cuk=5e7)
810
+ mdb.update_material_creep(index=1,creep_name="C60",f_cuk=5e7)
787
811
  Returns: 无
788
812
  """
789
813
  try:
790
- qt_model.UpdateMaterialCreep(materialId=index, timePatameterId=creep_id, fcuk=f_cuk)
814
+ qt_model.UpdateMaterialCreep(materialId=index, creepName=creep_name, fcuk=f_cuk)
791
815
  qt_model.UpdateModel()
792
816
  except Exception as ex:
793
817
  raise Exception(ex)
@@ -930,7 +954,7 @@ class Mdb:
930
954
  """
931
955
  try:
932
956
  qt_model.AddTapperSection(id=index, name=name, secType=sec_type, secBegin=sec_begin, secEnd=sec_end,
933
- shearConsider=shear_consider,secNormalize=sec_normalize)
957
+ shearConsider=shear_consider, secNormalize=sec_normalize)
934
958
  except Exception as ex:
935
959
  raise Exception(ex)
936
960
 
@@ -1654,6 +1678,119 @@ class Mdb:
1654
1678
 
1655
1679
  # endregion
1656
1680
 
1681
+ # region 动力荷载操作
1682
+ @staticmethod
1683
+ def add_load_to_mass(name: str, factor: float = 1):
1684
+ """
1685
+ 添加荷载转为质量
1686
+ Args:
1687
+ name: 荷载工况名称
1688
+ factor: 系数
1689
+ Example:
1690
+ mdb.add_load_to_mass(name="荷载工况",factor=1)
1691
+ Returns: 无
1692
+ """
1693
+ try:
1694
+ qt_model.AddLoadToMass(name=name, factor=factor)
1695
+ qt_model.UpdateModel()
1696
+ except Exception as ex:
1697
+ raise Exception(ex)
1698
+
1699
+ @staticmethod
1700
+ def add_nodal_mass(node_id: (Union[int, List[int]]) = 1, mass_info: tuple[float, float, float, float] = None):
1701
+ """
1702
+ 添加节点质量
1703
+ Args:
1704
+ node_id:节点编号,支持单个编号和编号列表
1705
+ mass_info:[m,rmX,rmY,rmZ]
1706
+ Example:
1707
+ mdb.add_nodal_mass(node_id=1,mass_info=(100,0,0,0))
1708
+ Returns: 无
1709
+ """
1710
+ try:
1711
+ if mass_info is None:
1712
+ raise Exception("操作错误,节点质量信息列表不能为空")
1713
+ qt_model.AddNodalMass(nodeId=node_id, massInfo=mass_info)
1714
+ qt_model.UpdateModel()
1715
+ except Exception as ex:
1716
+ raise Exception(ex)
1717
+
1718
+ @staticmethod
1719
+ def remove_nodal_mass(node_id: (Union[int, List[int]]) = -1):
1720
+ """
1721
+ 删除节点质量
1722
+ Args:
1723
+ node_id:节点号,默认删除所有节点质量
1724
+ Example:
1725
+ mdb.remove_nodal_mass(node_id=1)
1726
+ Returns: 无
1727
+ """
1728
+ try:
1729
+ if node_id == -1:
1730
+ qt_model.RemoveAllNodalMass()
1731
+ else:
1732
+ qt_model.RemoveNodalMass(nodeId=node_id)
1733
+ except Exception as ex:
1734
+ raise Exception(ex)
1735
+
1736
+ @staticmethod
1737
+ def remove_load_to_mass(name: str):
1738
+ """
1739
+ 删除荷载转为质量
1740
+ Args:
1741
+ name:荷载工况名
1742
+ Example:
1743
+ mdb.remove_load_to_mass(name="荷载工况")
1744
+ Returns: 无
1745
+ """
1746
+ try:
1747
+ qt_model.RemoveLoadToMass(name=name)
1748
+ except Exception as ex:
1749
+ raise Exception(ex)
1750
+
1751
+ @staticmethod
1752
+ def add_spectrum_function(name: str = "", factor: float = 1.0, kind: int = 0, function_info: list[tuple[float, float]] = None):
1753
+ """
1754
+ 添加反应谱函数
1755
+ Args:
1756
+ name:反应谱函数名
1757
+ factor:反应谱调整系数
1758
+ kind:反应谱类型 0-无量纲 1-加速度 2-位移
1759
+ function_info:反应谱函数信息
1760
+ Example:
1761
+ mdb.add_spectrum_function(name="反应谱函数1",factor=1.0,function_info=[(0,0.02),(1,0.03)])
1762
+ Returns: 无
1763
+ """
1764
+ try:
1765
+ qt_model.AddResponseSpectrumFunction(name=name, factor=factor, kind=kind, functionInfo=function_info)
1766
+ except Exception as ex:
1767
+ raise Exception(ex)
1768
+
1769
+ @staticmethod
1770
+ def add_spectrum_case(name: str = "", description: str = "", kind: int = 1, info_x: tuple[str, float] = None,
1771
+ info_y: tuple[str, float] = None, info_z: tuple[str, float] = None):
1772
+ """
1773
+ 添加反应谱工况
1774
+ Args:
1775
+ name:荷载工况名
1776
+ description:说明
1777
+ kind:组合方式 1-求模 2-求和
1778
+ info_x: 反应谱X向信息 (X方向函数名,系数)
1779
+ info_y: 反应谱Y向信息 (Y方向函数名,系数)
1780
+ info_z: 反应谱Z向信息 (Z方向函数名,系数)
1781
+ Example:
1782
+ mdb.add_spectrum_case(name="反应谱工况",info_x=("函数1",1.0))
1783
+ Returns: 无
1784
+ """
1785
+ try:
1786
+ if info_x is None and info_y is None and info_z is None:
1787
+ raise Exception("添加反应谱函数错误,无反应谱分项信息")
1788
+ qt_model.AddResponseSpectrumCase(name=name, description=description, kind=kind, infoX=info_x, info_y=info_y, info_z=info_z)
1789
+ except Exception as ex:
1790
+ raise Exception(ex)
1791
+
1792
+ # endregion
1793
+
1657
1794
  # region 钢束操作
1658
1795
  @staticmethod
1659
1796
  def add_tendon_group(name: str = "", index: int = -1):
@@ -1930,75 +2067,6 @@ class Mdb:
1930
2067
  except Exception as ex:
1931
2068
  raise Exception(ex)
1932
2069
 
1933
- @staticmethod
1934
- def add_load_to_mass(name: str, factor: float = 1):
1935
- """
1936
- 添加荷载转为质量
1937
- Args:
1938
- name: 荷载工况名称
1939
- factor: 系数
1940
- Example:
1941
- mdb.add_load_to_mass(name="荷载工况",factor=1)
1942
- Returns: 无
1943
- """
1944
- try:
1945
- qt_model.AddLoadToMass(name=name, factor=factor)
1946
- qt_model.UpdateModel()
1947
- except Exception as ex:
1948
- raise Exception(ex)
1949
-
1950
- @staticmethod
1951
- def add_nodal_mass(node_id: (Union[int, List[int]]) = 1, mass_info: tuple[float, float, float, float] = None):
1952
- """
1953
- 添加节点质量
1954
- Args:
1955
- node_id:节点编号,支持单个编号和编号列表
1956
- mass_info:[m,rmX,rmY,rmZ]
1957
- Example:
1958
- mdb.add_nodal_mass(node_id=1,mass_info=(100,0,0,0))
1959
- Returns: 无
1960
- """
1961
- try:
1962
- if mass_info is None:
1963
- raise Exception("操作错误,节点质量信息列表不能为空")
1964
- qt_model.AddNodalMass(nodeId=node_id, massInfo=mass_info)
1965
- qt_model.UpdateModel()
1966
- except Exception as ex:
1967
- raise Exception(ex)
1968
-
1969
- @staticmethod
1970
- def remove_nodal_mass(node_id: (Union[int, List[int]]) = -1):
1971
- """
1972
- 删除节点质量
1973
- Args:
1974
- node_id:节点号,默认删除所有节点质量
1975
- Example:
1976
- mdb.remove_nodal_mass(node_id=1)
1977
- Returns: 无
1978
- """
1979
- try:
1980
- if node_id == -1:
1981
- qt_model.RemoveAllNodalMass()
1982
- else:
1983
- qt_model.RemoveNodalMass(nodeId=node_id)
1984
- except Exception as ex:
1985
- raise Exception(ex)
1986
-
1987
- @staticmethod
1988
- def remove_load_to_mass(name: str):
1989
- """
1990
- 删除荷载转为质量
1991
- Args:
1992
- name:荷载工况名
1993
- Example:
1994
- mdb.remove_load_to_mass(name="荷载工况")
1995
- Returns: 无
1996
- """
1997
- try:
1998
- qt_model.RemoveLoadToMass(name=name)
1999
- except Exception as ex:
2000
- raise Exception(ex)
2001
-
2002
2070
  @staticmethod
2003
2071
  def add_pre_stress(case_name: str = "", tendon_name: (Union[str, List[str]]) = "", tension_type: int = 2,
2004
2072
  force: float = 1395000, group_name: str = "默认荷载组"):
@@ -2882,7 +2950,7 @@ class Mdb:
2882
2950
  describe:描述
2883
2951
  combine_info:荷载组合信息 [(荷载工况类型,工况名,系数)...] 工况类型如下
2884
2952
  _"ST"-静力荷载工况 "CS"-施工阶段荷载工况 "CB"-荷载组合_
2885
- _"MV"-移动荷载工况 "SM"-沉降荷载工况_
2953
+ _"MV"-移动荷载工况 "SM"-沉降荷载工况_ "RS"-反应谱工况_
2886
2954
  Example:
2887
2955
  mdb.add_load_combine(name="荷载组合1",combine_type=1,describe="无",combine_info=[("CS","合计值",1),("CS","恒载",1)])
2888
2956
  Returns: 无
@@ -282,7 +282,7 @@ class Odb:
282
282
  def plot_reaction_result(file_path: str, stage_id: int = 1, load_case_name: str = "", show_increment: bool = False,
283
283
  envelope_type: int = 1, component: int = 1,
284
284
  show_number: bool = True, text_rotation=0, max_min_kind: int = -1,
285
- show_legend: bool = True, digital_count=0, show_exponential: bool = True, arrow_scale: float = 1):
285
+ show_legend: bool = True, digital_count=3, show_exponential: bool = True, arrow_scale: float = 1):
286
286
  """
287
287
  保存结果图片到指定文件甲
288
288
  Args:
@@ -317,7 +317,7 @@ class Odb:
317
317
  envelope_type: int = 1, component: int = 1,
318
318
  show_deformed: bool = True, deformed_scale: float = 1.0, deformed_actual: bool = False,
319
319
  show_number: bool = True, text_rotation=0, max_min_kind: int = 1,
320
- show_legend: bool = True, digital_count=0, show_exponential: bool = True, show_pre_deformed: bool = True):
320
+ show_legend: bool = True, digital_count=3, show_exponential: bool = True, show_pre_deformed: bool = True):
321
321
  """
322
322
  保存结果图片到指定文件甲
323
323
  Args:
@@ -357,7 +357,7 @@ class Odb:
357
357
  show_line_chart: bool = True, line_scale: float = 1.0, flip_plot: bool = True,
358
358
  show_deformed: bool = True, deformed_actual: bool = False, deformed_scale: float = 1.0,
359
359
  show_number: bool = False, text_rotation: int = 0, max_min_kind: int = 0,
360
- show_legend: bool = True, digital_count: int = 0, show_exponential: bool = True,
360
+ show_legend: bool = True, digital_count: int = 3, show_exponential: bool = True,
361
361
  show_pre_deformed: bool = False, position: int = 0):
362
362
  """
363
363
  绘制梁单元结果图并保存到指定文件
@@ -404,7 +404,7 @@ class Odb:
404
404
  show_line_chart: bool = True, line_scale: float = 1.0, flip_plot: bool = True,
405
405
  show_deformed: bool = True, deformed_actual: bool = False, deformed_scale: float = 1.0,
406
406
  show_number: bool = False, text_rotation: int = 0, max_min_kind: int = 0,
407
- show_legend: bool = True, digital_count: int = 0, show_exponential: bool = True,
407
+ show_legend: bool = True, digital_count: int = 3, show_exponential: bool = True,
408
408
  show_pre_deformed: bool = False, position: int = 0):
409
409
  """
410
410
  绘制杆单元结果图并保存到指定文件
@@ -450,7 +450,7 @@ class Odb:
450
450
  envelope_type: int = 1, force_kind: int = 0, component: int = 0,
451
451
  show_number: bool = False, text_rotation_angle: int = 0, max_min_kind: int = 0,
452
452
  show_deformed: bool = True, deformed_scale: float = 1.0, deformed_actual: bool = False,
453
- show_legend: bool = True, digital_count: int = 0, show_as_exponential: bool = True,
453
+ show_legend: bool = True, digital_count: int = 3, show_as_exponential: bool = True,
454
454
  show_pre_deformed: bool = False, ):
455
455
  """
456
456
  绘制板单元结果图并保存到指定文件
@@ -493,7 +493,7 @@ class Odb:
493
493
  show_line_chart: bool = True, line_scale: float = 1.0, flip_plot: bool = True,
494
494
  show_deformed: bool = True, deformed_actual: bool = False, deformed_scale: float = 1.0,
495
495
  show_number: bool = False, text_rotation: int = 0, max_min_kind: int = 0,
496
- show_legend: bool = True, digital_count: int = 1, show_exponential: bool = True,
496
+ show_legend: bool = True, digital_count: int = 3, show_exponential: bool = True,
497
497
  show_pre_deformed: bool = False, position: int = 0):
498
498
  """
499
499
  绘制组合梁单元结果图并保存到指定文件
@@ -541,7 +541,7 @@ class Odb:
541
541
  show_line_chart: bool = True, line_scale: float = 1.0, flip_plot: bool = True,
542
542
  show_deformed: bool = True, deformed_actual: bool = False, deformed_scale: float = 1.0,
543
543
  show_number: bool = False, text_rotation: int = 0, max_min_kind: int = 0,
544
- show_legend: bool = True, digital_count: int = 0, show_exponential: bool = True,
544
+ show_legend: bool = True, digital_count: int = 3, show_exponential: bool = True,
545
545
  show_pre_deformed: bool = False, position: int = 0):
546
546
  """
547
547
  绘制梁单元应力结果图并保存到指定文件
@@ -587,7 +587,7 @@ class Odb:
587
587
  show_line_chart: bool = True, line_scale: float = 1.0, flip_plot: bool = True,
588
588
  show_deformed: bool = True, deformed_actual: bool = False, deformed_scale: float = 1.0,
589
589
  show_number: bool = False, text_rotation: int = 0, max_min_kind: int = 0,
590
- show_legend: bool = True, digital_count: int = 0, show_exponential: bool = True,
590
+ show_legend: bool = True, digital_count: int = 3, show_exponential: bool = True,
591
591
  show_pre_deformed: bool = False, position: int = 0):
592
592
  """
593
593
  绘制杆单元结果图并保存到指定文件
@@ -632,7 +632,7 @@ class Odb:
632
632
  show_line_chart: bool = True, line_scale: float = 1.0, flip_plot: bool = True,
633
633
  show_deformed: bool = True, deformed_actual: bool = False, deformed_scale: float = 1.0,
634
634
  show_number: bool = False, text_rotation: int = 0, max_min_kind: int = 0,
635
- show_legend: bool = True, digital_count: int = 0, show_exponential: bool = True,
635
+ show_legend: bool = True, digital_count: int = 3, show_exponential: bool = True,
636
636
  show_pre_deformed: bool = False, position: int = 0):
637
637
  """
638
638
  绘制组合梁单元结果图并保存到指定文件
@@ -679,7 +679,7 @@ class Odb:
679
679
  envelope_type: int = 1, stress_kind: int = 0, component: int = 0,
680
680
  show_number: bool = False, text_rotation_angle: int = 0, max_min_kind: int = 0,
681
681
  show_deformed: bool = True, deformed_scale: float = 1.0, deformed_actual: bool = False,
682
- show_legend: bool = True, digital_count: int = 1, show_as_exponential: bool = True,
682
+ show_legend: bool = True, digital_count: int = 3, show_as_exponential: bool = True,
683
683
  show_pre_deformed: bool = False, position: int = 0):
684
684
  """
685
685
  绘制板单元结果图并保存到指定文件
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qtmodel
3
- Version: 0.5.31
4
- Summary: python modeling for qt 24/10/29
3
+ Version: 0.5.33
4
+ Summary: python modeling for qt 24/10/31
5
5
  Home-page: https://github.com/Inface0443/pyqt
6
6
  Author: dqy-zhj
7
7
  Author-email: 1105417715@qq.com
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Operating System :: OS Independent
13
13
  Description-Content-Type: text/markdown
14
14
 
15
- # 最新版本 V0.5.31 - 2024.10.29
15
+ # 最新版本 V0.5.33 - 2024.10.31
16
16
  > pip install --upgrade qtmodel -i https://pypi.org/simple
17
17
  - 修改帮助文档
18
18
  ## 项目管理
@@ -167,13 +167,13 @@ Returns: 无
167
167
  > non_linear_method: 非线性方法 0-修正牛顿法 1-牛顿法
168
168
  > max_loading_steps: 最大加载步数
169
169
  > max_iteration_times: 最大迭代次数
170
- > relative_accuracy_of_displacement: 位移相对精度
171
- > relative_accuracy_of_force: 内力相对精度
170
+ > accuracy_of_displacement: 位移相对精度
171
+ > accuracy_of_force: 内力相对精度
172
172
  ```Python
173
173
  # 示例代码
174
174
  from qtmodel import *
175
175
  mdb.update_non_linear_setting(non_linear_type=-1, non_linear_method=1, max_loading_steps=-1, max_iteration_times=30,
176
- relative_accuracy_of_displacement=0.0001, relative_accuracy_of_force=0.0001)
176
+ accuracy_of_displacement=0.0001, accuracy_of_force=0.0001)
177
177
  ```
178
178
  Returns: 无
179
179
  ### update_operation_stage_setting
@@ -203,6 +203,19 @@ from qtmodel import *
203
203
  mdb.update_self_vibration_setting(do_analysis=True,method=1,matrix_type=0,mode_num=3)
204
204
  ```
205
205
  Returns: 无
206
+ ### update_response_spectrum_setting
207
+ 更新反应谱设置
208
+ > 参数:
209
+ > do_analysis:是否进行反应谱分析
210
+ > kind:组合方式 1-SRSS 2-CQC
211
+ > by_mode: 是否按照振型输入阻尼比
212
+ > damping_ratio:常数阻尼比或振型阻尼比列表
213
+ ```Python
214
+ # 示例代码
215
+ from qtmodel import *
216
+ mdb.update_response_spectrum_setting(do_analysis=True,kind=1,damping_ratio=0.05)
217
+ ```
218
+ Returns: 无
206
219
  ## 节点操作
207
220
  ### add_node
208
221
  根据坐标信息和节点编号添加节点,默认自动识别编号
@@ -476,12 +489,12 @@ Returns: 无
476
489
  将收缩徐变参数连接到材料
477
490
  > 参数:
478
491
  > index: 材料编号
479
- > creep_id: 收缩徐变编号
492
+ > creep_name: 收缩徐变名称
480
493
  > f_cuk: 材料标准抗压强度,仅自定义材料是需要输入
481
494
  ```Python
482
495
  # 示例代码
483
496
  from qtmodel import *
484
- mdb.update_material_creep(index=1,creep_id=1,f_cuk=5e7)
497
+ mdb.update_material_creep(index=1,creep_name="C60",f_cuk=5e7)
485
498
  ```
486
499
  Returns: 无
487
500
  ### remove_material
@@ -1018,6 +1031,77 @@ from qtmodel import *
1018
1031
  mdb.remove_live_load_case(name="活载工况1")
1019
1032
  ```
1020
1033
  Returns: 无
1034
+ ## 动力荷载操作
1035
+ ### add_load_to_mass
1036
+ 添加荷载转为质量
1037
+ > 参数:
1038
+ > name: 荷载工况名称
1039
+ > factor: 系数
1040
+ ```Python
1041
+ # 示例代码
1042
+ from qtmodel import *
1043
+ mdb.add_load_to_mass(name="荷载工况",factor=1)
1044
+ ```
1045
+ Returns: 无
1046
+ ### add_nodal_mass
1047
+ 添加节点质量
1048
+ > 参数:
1049
+ > node_id:节点编号,支持单个编号和编号列表
1050
+ > mass_info:[m,rmX,rmY,rmZ]
1051
+ ```Python
1052
+ # 示例代码
1053
+ from qtmodel import *
1054
+ mdb.add_nodal_mass(node_id=1,mass_info=(100,0,0,0))
1055
+ ```
1056
+ Returns: 无
1057
+ ### remove_nodal_mass
1058
+ 删除节点质量
1059
+ > 参数:
1060
+ > node_id:节点号,默认删除所有节点质量
1061
+ ```Python
1062
+ # 示例代码
1063
+ from qtmodel import *
1064
+ mdb.remove_nodal_mass(node_id=1)
1065
+ ```
1066
+ Returns: 无
1067
+ ### remove_load_to_mass
1068
+ 删除荷载转为质量
1069
+ > 参数:
1070
+ > name:荷载工况名
1071
+ ```Python
1072
+ # 示例代码
1073
+ from qtmodel import *
1074
+ mdb.remove_load_to_mass(name="荷载工况")
1075
+ ```
1076
+ Returns: 无
1077
+ ### add_spectrum_function
1078
+ 添加反应谱函数
1079
+ > 参数:
1080
+ > name:反应谱函数名
1081
+ > factor:反应谱调整系数
1082
+ > kind:反应谱类型 0-无量纲 1-加速度 2-位移
1083
+ > function_info:反应谱函数信息
1084
+ ```Python
1085
+ # 示例代码
1086
+ from qtmodel import *
1087
+ mdb.add_spectrum_function(name="反应谱函数1",factor=1.0,function_info=[(0,0.02),(1,0.03)])
1088
+ ```
1089
+ Returns: 无
1090
+ ### add_spectrum_case
1091
+ 添加反应谱工况
1092
+ > 参数:
1093
+ > name:荷载工况名
1094
+ > description:说明
1095
+ > kind:组合方式 1-求模 2-求和
1096
+ > info_x: 反应谱X向信息 (X方向函数名,系数)
1097
+ > info_y: 反应谱Y向信息 (Y方向函数名,系数)
1098
+ > info_z: 反应谱Z向信息 (Z方向函数名,系数)
1099
+ ```Python
1100
+ # 示例代码
1101
+ from qtmodel import *
1102
+ mdb.add_spectrum_case(name="反应谱工况",info_x=("函数1",1.0))
1103
+ ```
1104
+ Returns: 无
1021
1105
  ## 钢束操作
1022
1106
  ### add_tendon_group
1023
1107
  按照名称添加钢束组,添加时可指定钢束组id
@@ -1176,48 +1260,6 @@ from qtmodel import *
1176
1260
  mdb.remove_load_group(name="荷载组1")
1177
1261
  ```
1178
1262
  Returns: 无
1179
- ### add_load_to_mass
1180
- 添加荷载转为质量
1181
- > 参数:
1182
- > name: 荷载工况名称
1183
- > factor: 系数
1184
- ```Python
1185
- # 示例代码
1186
- from qtmodel import *
1187
- mdb.add_load_to_mass(name="荷载工况",factor=1)
1188
- ```
1189
- Returns: 无
1190
- ### add_nodal_mass
1191
- 添加节点质量
1192
- > 参数:
1193
- > node_id:节点编号,支持单个编号和编号列表
1194
- > mass_info:[m,rmX,rmY,rmZ]
1195
- ```Python
1196
- # 示例代码
1197
- from qtmodel import *
1198
- mdb.add_nodal_mass(node_id=1,mass_info=(100,0,0,0))
1199
- ```
1200
- Returns: 无
1201
- ### remove_nodal_mass
1202
- 删除节点质量
1203
- > 参数:
1204
- > node_id:节点号,默认删除所有节点质量
1205
- ```Python
1206
- # 示例代码
1207
- from qtmodel import *
1208
- mdb.remove_nodal_mass(node_id=1)
1209
- ```
1210
- Returns: 无
1211
- ### remove_load_to_mass
1212
- 删除荷载转为质量
1213
- > 参数:
1214
- > name:荷载工况名
1215
- ```Python
1216
- # 示例代码
1217
- from qtmodel import *
1218
- mdb.remove_load_to_mass(name="荷载工况")
1219
- ```
1220
- Returns: 无
1221
1263
  ### add_pre_stress
1222
1264
  添加预应力
1223
1265
  > 参数:
@@ -1782,7 +1824,7 @@ Returns: 无
1782
1824
  > describe:描述
1783
1825
  > combine_info:荷载组合信息 [(荷载工况类型,工况名,系数)...] 工况类型如下
1784
1826
  > _"ST"-静力荷载工况 "CS"-施工阶段荷载工况 "CB"-荷载组合_
1785
- > _"MV"-移动荷载工况 "SM"-沉降荷载工况_
1827
+ > _"MV"-移动荷载工况 "SM"-沉降荷载工况_ "RS"-反应谱工况_
1786
1828
  ```Python
1787
1829
  # 示例代码
1788
1830
  from qtmodel import *
@@ -7,10 +7,10 @@ with open("README.md", "r", encoding="utf-8") as fh:
7
7
  # twine upload dist/*
8
8
  setup(
9
9
  name="qtmodel",
10
- version="0.5.31",
10
+ version="0.5.33",
11
11
  author="dqy-zhj",
12
12
  author_email="1105417715@qq.com",
13
- description="python modeling for qt 24/10/29 ",
13
+ description="python modeling for qt 24/10/31 ",
14
14
  long_description=long_description, # 使用读取的 README.md 文件内容
15
15
  long_description_content_type="text/markdown", # 指明内容格式为markdown
16
16
  url="https://github.com/Inface0443/pyqt",
File without changes
File without changes
File without changes