osis-python 0.4.1__tar.gz → 0.4.4__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.
- {osis_python-0.4.1/src/osis_python.egg-info → osis_python-0.4.4}/PKG-INFO +1 -1
- {osis_python-0.4.1 → osis_python-0.4.4/src/osis_python.egg-info}/PKG-INFO +1 -1
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/__init__.py +1 -1
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/boundary/interface.py +6 -5
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/boundary/manager.py +2 -1
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/element/interface.py +17 -17
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/element/manager.py +34 -5
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/live/grade.py +19 -2
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/live/manager.py +34 -1
- osis_python-0.4.4/src/pyosis/load/loadcase.py +89 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/load/manager.py +55 -34
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/load/static.py +36 -24
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/material/interface.py +3 -3
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/node/interface.py +3 -3
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/post/design_check.py +2 -5
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/post/manager.py +1 -1
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/property/coordinate.py +19 -19
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/property/creep_shrink.py +2 -2
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/property/damping.py +4 -4
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/property/pu_curve.py +6 -6
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/section/common.py +5 -5
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/section/composite.py +78 -6
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/section/manager.py +2 -2
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/section/rib.py +10 -9
- osis_python-0.4.1/src/pyosis/load/loadcase.py +0 -62
- {osis_python-0.4.1 → osis_python-0.4.4}/LICENSE +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/README.md +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/pyproject.toml +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/setup.cfg +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/osis_python.egg-info/SOURCES.txt +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/osis_python.egg-info/dependency_links.txt +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/osis_python.egg-info/requires.txt +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/osis_python.egg-info/top_level.txt +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/boundary/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/control/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/control/control.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/control/io.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/control/manager.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/control/nonlinear.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/core/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/core/all_func.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/core/client.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/core/command.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/core/engine.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/dynamic/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/dynamic/load_to_mass.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/dynamic/manager.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/dynamic/modal.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/dynamic/seismic.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/element/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/general/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/general/interface.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/geometry/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/geometry/interface.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/geometry/manager.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/live/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/live/analysis.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/live/lane.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/load/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/load/tendon.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/material/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/material/manager.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/node/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/node/manager.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/post/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/post/combine.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/post/display.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/project/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/project/interface.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/project/manager.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/property/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/property/component_thickness.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/property/manager.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/quick_building/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/quick_building/interface.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/result/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/result/check.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/result/env.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/result/loadcase.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/result/manager.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/result/result.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/section/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/section/numeric.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/section/param.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/section/rebar.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/section/steel.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/settlement/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/settlement/interface.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/settlement/manager.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/stability/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/stability/buckling.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/stability/manager.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/stage/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/stage/define.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/stage/manager.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/stage/overall.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/thickness/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/thickness/interface.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/thickness/manager.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/transfer/__init__.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/transfer/command_map.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/transfer/generator.py +0 -0
- {osis_python-0.4.1 → osis_python-0.4.4}/src/pyosis/transfer/parser.py +0 -0
|
@@ -7,7 +7,7 @@ A library for extending OSIS functionality.
|
|
|
7
7
|
A library that allows users to use CAE with great flexibility.
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
-
__version__ = "0.4.
|
|
10
|
+
__version__ = "0.4.4"
|
|
11
11
|
__author__ = "CCCC Highway Consultant Co. Ltd." # 中交公路规划设计院 - 工程技术研究中心 - lzh - wjh - myf
|
|
12
12
|
|
|
13
13
|
from .core.engine import OSISEngine
|
|
@@ -46,7 +46,7 @@ def osis_boundary_general(nBd: int, eBoundaryType: Literal["GENERAL"]="GENERAL",
|
|
|
46
46
|
pass
|
|
47
47
|
|
|
48
48
|
@REGISTRY.register("Boundary")
|
|
49
|
-
def osis_boundary_master_slave(nBd: int, eBoundaryType: Literal["MSTSLV"]="MSTSLV", nNode: int = 1, bX: bool = 1, bY: bool = 1, bZ: bool = 1, bRX: bool = 1, bRY: bool = 1, bRZ: bool = 1):
|
|
49
|
+
def osis_boundary_master_slave(nBd: int, eBoundaryType: Literal["MSTSLV"]="MSTSLV", nNode: int = 1, bX: bool = 1, bY: bool = 1, bZ: bool = 1, bRX: bool = 1, bRY: bool = 1, bRZ: bool = 1, bCoincident: Literal[0, 1] | None = 1):
|
|
50
50
|
'''
|
|
51
51
|
## 定义或修改主从约束
|
|
52
52
|
pyosis.boundary.osis_boundary_master_slave
|
|
@@ -61,6 +61,7 @@ def osis_boundary_master_slave(nBd: int, eBoundaryType: Literal["MSTSLV"]="MSTSL
|
|
|
61
61
|
bRX (bool): 0 = 释放,1 = 约束
|
|
62
62
|
bRY (bool): 0 = 释放,1 = 约束
|
|
63
63
|
bRZ (bool): 0 = 释放,1 = 约束
|
|
64
|
+
bCoincident: 0 = 仅同位移约束,默认1,可缺省
|
|
64
65
|
Returns:
|
|
65
66
|
tuple (bool, str): 是否成功,失败原因
|
|
66
67
|
'''
|
|
@@ -69,7 +70,7 @@ def osis_boundary_master_slave(nBd: int, eBoundaryType: Literal["MSTSLV"]="MSTSL
|
|
|
69
70
|
@REGISTRY.register("Boundary")
|
|
70
71
|
def osis_boundary_rigid(nBd: int, eBoundaryType: Literal["RIGID"], nNodeI: int):
|
|
71
72
|
'''
|
|
72
|
-
##
|
|
73
|
+
## 定义或修改刚性连接
|
|
73
74
|
|
|
74
75
|
Args:
|
|
75
76
|
nBd (int): 编号
|
|
@@ -95,10 +96,10 @@ def osis_boundary_release(nBd: int, eBoundaryType: Literal["RELEASE"],
|
|
|
95
96
|
|
|
96
97
|
Args:
|
|
97
98
|
nBd (int): 编号
|
|
98
|
-
eBoundaryType (str): 固定为
|
|
99
|
+
eBoundaryType (str): 固定为 RELEASE
|
|
99
100
|
\\*_state (bool):
|
|
100
|
-
* 0 =
|
|
101
|
-
* 1 =
|
|
101
|
+
* 0 = 完全释放
|
|
102
|
+
* 1 = 完全约束
|
|
102
103
|
F\\*i and M\\*i (float): 部分约束的大小,0-1之间,表示释放后残余的约束能力的百分比
|
|
103
104
|
Returns:
|
|
104
105
|
tuple (bool, str): 是否成功,失败原因
|
|
@@ -659,11 +659,12 @@ class BoundaryManager:
|
|
|
659
659
|
bRY: Literal[0, 1] = 1,
|
|
660
660
|
bRZ: Literal[0, 1] = 1,
|
|
661
661
|
no: int | None = None,
|
|
662
|
+
bCoincident: int | None = 1,
|
|
662
663
|
) -> MstSlvBoundary:
|
|
663
664
|
"""创建主从约束"""
|
|
664
665
|
if no is None:
|
|
665
666
|
no = self._next_no()
|
|
666
|
-
ok, err = osis_boundary_master_slave(no, "MSTSLV", nNode, bX, bY, bZ, bRX, bRY, bRZ)
|
|
667
|
+
ok, err = osis_boundary_master_slave(no, "MSTSLV", nNode, bX, bY, bZ, bRX, bRY, bRZ,bCoincident)
|
|
667
668
|
if not ok:
|
|
668
669
|
raise RuntimeError(f"创建主从约束 {no} 失败: {err}")
|
|
669
670
|
return self.get(no) # type: ignore[return-value]
|
|
@@ -138,9 +138,9 @@ def osis_element_shell(nEle: int=1, eElementType: str="CABLE", bIsThin: bool=1,
|
|
|
138
138
|
Args:
|
|
139
139
|
nEle (int): 单元编号。从 1 开始编号,所有类型的单元均使用同一编号序列。
|
|
140
140
|
eElementType (str): 不能修改,固定为 SHELL,不区分大小写
|
|
141
|
-
bIsThin (bool):
|
|
141
|
+
bIsThin (bool): 0 = 厚壳,1 = 薄壳
|
|
142
142
|
nMat (int): 材料编号。
|
|
143
|
-
nThk (int):
|
|
143
|
+
nThk (int): 厚度编号
|
|
144
144
|
nNode1 (int): 节点1编号。
|
|
145
145
|
nNode1 (int): 节点2编号。
|
|
146
146
|
nNode1 (int): 节点3编号。
|
|
@@ -152,11 +152,11 @@ def osis_element_shell(nEle: int=1, eElementType: str="CABLE", bIsThin: bool=1,
|
|
|
152
152
|
pass
|
|
153
153
|
|
|
154
154
|
@REGISTRY.register("ElementDel")
|
|
155
|
-
def osis_element_del(nEle: int
|
|
155
|
+
def osis_element_del(nEle: int):
|
|
156
156
|
"""删除一个单元
|
|
157
157
|
|
|
158
158
|
Args:
|
|
159
|
-
nEle (int):
|
|
159
|
+
nEle (int): 单元编号
|
|
160
160
|
|
|
161
161
|
Returns:
|
|
162
162
|
tuple (bool, str):
|
|
@@ -166,7 +166,7 @@ def osis_element_del(nEle: int=1):
|
|
|
166
166
|
pass
|
|
167
167
|
|
|
168
168
|
@REGISTRY.register("ElementMod")
|
|
169
|
-
def osis_element_mod(nOld: int
|
|
169
|
+
def osis_element_mod(nOld: int, nNew: int):
|
|
170
170
|
"""修改一个单元的编号。单元编号存在时,交换
|
|
171
171
|
|
|
172
172
|
Args:
|
|
@@ -205,13 +205,13 @@ def osis_element_group(strName: str="单元组1", eOP: Literal["c", "a", "s", "r
|
|
|
205
205
|
@REGISTRY.register("TaperEle")
|
|
206
206
|
def osis_taperele(
|
|
207
207
|
nIndex: str,
|
|
208
|
-
strZType: Literal[
|
|
208
|
+
strZType: Literal[0, 1],
|
|
209
209
|
dZTrans: float = 1.0,
|
|
210
|
-
strZpos: Literal[
|
|
210
|
+
strZpos: Literal[0, 1] = 0,
|
|
211
211
|
dZdis: float = 0.0,
|
|
212
|
-
strYtype: Literal[
|
|
212
|
+
strYtype: Literal[0, 1]=0,
|
|
213
213
|
dYtrans: float = 1.0,
|
|
214
|
-
strYpos: Literal[
|
|
214
|
+
strYpos: Literal[0, 1] = 0,
|
|
215
215
|
dYdis: float = 0.0,
|
|
216
216
|
*eles: str,
|
|
217
217
|
|
|
@@ -221,25 +221,25 @@ def osis_taperele(
|
|
|
221
221
|
|
|
222
222
|
Args:
|
|
223
223
|
nIndex (str): 变截面单元组名称
|
|
224
|
-
strZType (
|
|
224
|
+
strZType (int): 截面Z向过渡类型,
|
|
225
225
|
* 0=线性
|
|
226
226
|
* 1=多项式
|
|
227
227
|
dZTrans (float): ZType=0时默认1.0
|
|
228
|
-
strZpos (
|
|
228
|
+
strZpos (int):
|
|
229
229
|
* 0=i
|
|
230
230
|
* 1=j
|
|
231
231
|
* ZType=0时默认i
|
|
232
232
|
dZdis (float): 对称面距,ZType=0时默认0.0
|
|
233
|
-
strYtype (
|
|
233
|
+
strYtype (int): 截面Y向过渡类型
|
|
234
234
|
* 0=线性
|
|
235
235
|
* 1=多项式
|
|
236
236
|
dYtrans (float): YType=0时默认1.0
|
|
237
|
-
strYpos (
|
|
237
|
+
strYpos (int):
|
|
238
238
|
* 0=i
|
|
239
239
|
* 1=j
|
|
240
240
|
* YType=0时默认i
|
|
241
241
|
dYdis (float): 对称面距,YType=0时默认0.0
|
|
242
|
-
*eles (str): 单元组编号,示例:1,3,5to10
|
|
242
|
+
*eles (int | str | list): 单元组编号,示例:1,3,5to10
|
|
243
243
|
|
|
244
244
|
Returns:
|
|
245
245
|
tuple (bool, str): 返回一个元组,包含:
|
|
@@ -264,13 +264,13 @@ def osis_element_tapereledel(strIndex: str) -> tuple[bool, str]:
|
|
|
264
264
|
pass
|
|
265
265
|
|
|
266
266
|
@REGISTRY.register("TaperEleMod")
|
|
267
|
-
def osis_element_taperelemod(
|
|
267
|
+
def osis_element_taperelemod(old_name: str, new_name: str) -> tuple[bool, str]:
|
|
268
268
|
"""
|
|
269
269
|
修改变截面组名称
|
|
270
270
|
|
|
271
271
|
Args:
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
old_name (str):
|
|
273
|
+
new_name (str):
|
|
274
274
|
|
|
275
275
|
Returns:
|
|
276
276
|
tuple (bool, str): 返回一个元组,包含:
|
|
@@ -386,18 +386,47 @@ class TaperEleGroupManager:
|
|
|
386
386
|
def create(
|
|
387
387
|
self,
|
|
388
388
|
name: str,
|
|
389
|
-
z_type: Literal[
|
|
389
|
+
z_type: Literal[0, 1],
|
|
390
390
|
z_trans: float = 1.0,
|
|
391
|
-
z_pos: Literal[
|
|
391
|
+
z_pos: Literal[0, 1] = 0,
|
|
392
392
|
z_dis: float = 0.0,
|
|
393
|
-
y_type: Literal[
|
|
393
|
+
y_type: Literal[0, 1] = 0,
|
|
394
394
|
y_trans: float = 1.0,
|
|
395
|
-
y_pos: Literal[
|
|
395
|
+
y_pos: Literal[0, 1] = 0,
|
|
396
396
|
y_dis: float = 0.0,
|
|
397
397
|
*eles: str,
|
|
398
398
|
|
|
399
399
|
) -> TaperEleGroup:
|
|
400
|
-
"""
|
|
400
|
+
"""
|
|
401
|
+
生成或修改变截面单元组
|
|
402
|
+
|
|
403
|
+
Args:
|
|
404
|
+
name (str): 变截面单元组名称
|
|
405
|
+
z_type (int): 截面Z向过渡类型,
|
|
406
|
+
* 0=线性
|
|
407
|
+
* 1=多项式
|
|
408
|
+
z_trans (float): ZType=0时默认1.0
|
|
409
|
+
z_pos (int):
|
|
410
|
+
* 0=i
|
|
411
|
+
* 1=j
|
|
412
|
+
* ZType=0时默认i
|
|
413
|
+
z_dis (float): 对称面距,ZType=0时默认0.0
|
|
414
|
+
y_type (int): 截面Y向过渡类型
|
|
415
|
+
* 0=线性
|
|
416
|
+
* 1=多项式
|
|
417
|
+
y_trans (float): YType=0时默认1.0
|
|
418
|
+
y_pos (int):
|
|
419
|
+
* 0=i
|
|
420
|
+
* 1=j
|
|
421
|
+
* YType=0时默认i
|
|
422
|
+
y_dis (float): 对称面距,YType=0时默认0.0
|
|
423
|
+
*eles (str): 单元组编号,示例:1,3,5to10
|
|
424
|
+
|
|
425
|
+
Returns:
|
|
426
|
+
tuple (bool, str): 返回一个元组,包含:
|
|
427
|
+
- bool: 操作是否成功
|
|
428
|
+
- str: 失败原因
|
|
429
|
+
"""
|
|
401
430
|
ok, err = osis_taperele(
|
|
402
431
|
name,
|
|
403
432
|
z_type,
|
|
@@ -73,8 +73,25 @@ def osis_livegrade_fatigue(strName: str="活载-FATIGUE", eCode: str="JTGD60_201
|
|
|
73
73
|
'''
|
|
74
74
|
pass
|
|
75
75
|
|
|
76
|
+
@REGISTRY.register("LiveGrade")
|
|
77
|
+
def osis_livegrade_custom(strName: str, eCode: Literal["CUSTOM"] = "CUSTOM", eLiveLoadType: Literal["VG"] = "VG", nGrpNum: int = 1,
|
|
78
|
+
veh_grp_layout=[]):
|
|
79
|
+
"""定义或修改活载等级。
|
|
80
|
+
|
|
81
|
+
Args:
|
|
82
|
+
strName: 活载名称
|
|
83
|
+
eCode: 规范类型,固定为 CUSTOM
|
|
84
|
+
eLiveLoadType: 活载类型,轴载组为 VG
|
|
85
|
+
nGrpNum: 轴载组数
|
|
86
|
+
veh_grp_layout: 距左侧轴的轴距, 轴载
|
|
87
|
+
|
|
88
|
+
Returns:
|
|
89
|
+
tuple (bool, str): 是否成功,失败原因
|
|
90
|
+
"""
|
|
91
|
+
pass
|
|
92
|
+
|
|
76
93
|
@REGISTRY.register("LiveGradeDel")
|
|
77
|
-
def osis_livegrade_del(strName: str
|
|
94
|
+
def osis_livegrade_del(strName: str):
|
|
78
95
|
'''
|
|
79
96
|
删除活载等级
|
|
80
97
|
|
|
@@ -89,7 +106,7 @@ def osis_livegrade_del(strName: str="活载1"):
|
|
|
89
106
|
@REGISTRY.register("LiveGradeMod")
|
|
90
107
|
def osis_livegrade_mod(strOldName: str, strNewName: str):
|
|
91
108
|
'''
|
|
92
|
-
|
|
109
|
+
修改名称
|
|
93
110
|
|
|
94
111
|
Args:
|
|
95
112
|
strOldName (str): 旧名称
|
|
@@ -23,7 +23,7 @@ from .grade import (
|
|
|
23
23
|
osis_livegrade_crowd,
|
|
24
24
|
osis_livegrade_fatigue,
|
|
25
25
|
osis_livegrade_del,
|
|
26
|
-
osis_livegrade_mod,
|
|
26
|
+
osis_livegrade_mod, osis_livegrade_custom,
|
|
27
27
|
)
|
|
28
28
|
from .analysis import (
|
|
29
29
|
osis_live_analysis,
|
|
@@ -549,6 +549,39 @@ class LiveGradeManager:
|
|
|
549
549
|
raise RuntimeError(f"创建疲劳荷载等级 {name} 失败: {err}")
|
|
550
550
|
return self.get(name)
|
|
551
551
|
|
|
552
|
+
def create_custom(self,
|
|
553
|
+
name: str,
|
|
554
|
+
nGrpNum: int = 1,
|
|
555
|
+
veh_grp_layout: list[tuple[float, float]] = (),
|
|
556
|
+
) -> LiveGrade:
|
|
557
|
+
"""创建自定义活载等级
|
|
558
|
+
Args:
|
|
559
|
+
name: 活载等级名称
|
|
560
|
+
eCode: 规范类型,固定为 CUSTOM
|
|
561
|
+
eLiveLoadType: 活载类型,轴载组为 VG
|
|
562
|
+
nGrpNum: 轴载组数
|
|
563
|
+
veh_grp_layout: 距左侧轴的轴距, 轴载
|
|
564
|
+
|
|
565
|
+
Returns:
|
|
566
|
+
创建的 LiveGrade 对象
|
|
567
|
+
|
|
568
|
+
Raises:
|
|
569
|
+
RuntimeError: 创建失败时抛出异常
|
|
570
|
+
"""
|
|
571
|
+
layout_flat: list[float] = []
|
|
572
|
+
for pair in veh_grp_layout:
|
|
573
|
+
if len(pair) != 2:
|
|
574
|
+
raise ValueError(
|
|
575
|
+
f"veh_grp_layout 每项须为 (轴距, 轴载),当前: {pair!r}"
|
|
576
|
+
)
|
|
577
|
+
layout_flat.extend((float(pair[0]), float(pair[1])))
|
|
578
|
+
ok, err = osis_livegrade_custom(
|
|
579
|
+
name, "CUSTOM","VG",nGrpNum, layout_flat
|
|
580
|
+
)
|
|
581
|
+
if not ok:
|
|
582
|
+
raise RuntimeError(f"创建自定义活载等级 {name} 失败: {err}")
|
|
583
|
+
return self.get(name)
|
|
584
|
+
|
|
552
585
|
def delete(self, name: str) -> None:
|
|
553
586
|
"""删除活载等级
|
|
554
587
|
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Interfaces of OSIS functions
|
|
3
|
+
|
|
4
|
+
========
|
|
5
|
+
|
|
6
|
+
荷载工况相关
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
from typing import Literal
|
|
10
|
+
from ..core import REGISTRY
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@REGISTRY.register("LoadCase")
|
|
14
|
+
def osis_loadcase(strName: str="自定义工况1", eLoadCaseType: Literal["USER", "CS", "D", "PS", "EV", "EH", "SH", "CR", "B", "STL",
|
|
15
|
+
"L", "IF", "CF", "LS", "BRK", "CRL", "FL", "W1", "W2", "SF", "IP",
|
|
16
|
+
"WF1", "WF2", "T", "TG", "FR",
|
|
17
|
+
"CFS", "CFD", "CFV", "E"]="USER", dScalar: float=1.0, strPrompt: str =None):
|
|
18
|
+
'''
|
|
19
|
+
创建荷载工况
|
|
20
|
+
|
|
21
|
+
Args:
|
|
22
|
+
strName (str): 荷载工况名称
|
|
23
|
+
eLoadCaseType (str): 荷载工况类型,不区分大小写。
|
|
24
|
+
* USER = 用户定义的荷载
|
|
25
|
+
* CS = 施工阶段荷载
|
|
26
|
+
* D = 结构重力
|
|
27
|
+
* PS = 预加力
|
|
28
|
+
* EV = 土的重量
|
|
29
|
+
* EH = 土侧压力
|
|
30
|
+
* SH = 收缩
|
|
31
|
+
* CR = 徐变
|
|
32
|
+
* B = 水浮力
|
|
33
|
+
* STL = 基础变位
|
|
34
|
+
* L = 汽车荷载
|
|
35
|
+
* IF = 汽车冲击力
|
|
36
|
+
* CF = 汽车离心率
|
|
37
|
+
* LS = 汽车引起的土侧压力
|
|
38
|
+
* BRK = 汽车制动力
|
|
39
|
+
* CRL = 人群荷载
|
|
40
|
+
* FL = 疲劳荷载
|
|
41
|
+
* W1 = 活载风
|
|
42
|
+
* W2 = 极限风
|
|
43
|
+
* SF = 流水压力
|
|
44
|
+
* IP = 冰压力
|
|
45
|
+
* WF1 = W1引起的波浪力
|
|
46
|
+
* WF2 = W2引起的波浪力
|
|
47
|
+
* T = 均匀温度
|
|
48
|
+
* TG = 梯度温度
|
|
49
|
+
* FR = 支座摩阻力
|
|
50
|
+
* CFS = 船舶的撞击作用
|
|
51
|
+
* CFD = 漂流物的撞击作用
|
|
52
|
+
* CFV = 汽车撞击作用
|
|
53
|
+
* E = 地震作用
|
|
54
|
+
dScalar (float): 系数,默认1.0
|
|
55
|
+
strPrompt (str): 说明,默认 None
|
|
56
|
+
Returns:
|
|
57
|
+
tuple (bool, str): 是否成功,失败原因
|
|
58
|
+
|
|
59
|
+
Example:
|
|
60
|
+
osis_loadcase("自重工况","USER",1.0,"Load")
|
|
61
|
+
'''
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
@REGISTRY.register('LoadCaseDel')
|
|
65
|
+
def osis_loadcase_del(strName: str):
|
|
66
|
+
'''
|
|
67
|
+
删除荷载工况
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
strName (str): 荷载工况名称
|
|
71
|
+
|
|
72
|
+
Returns:
|
|
73
|
+
tuple (bool, str): 是否成功,失败原因
|
|
74
|
+
'''
|
|
75
|
+
pass
|
|
76
|
+
|
|
77
|
+
@REGISTRY.register("LCMod")
|
|
78
|
+
def osis_loadcase_mod(strOldName: str, strNewName: str):
|
|
79
|
+
'''
|
|
80
|
+
定义或修改荷载工况
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
strOldName (str): 旧名称
|
|
84
|
+
strNewName (str): 新名称
|
|
85
|
+
|
|
86
|
+
Returns:
|
|
87
|
+
tuple (bool, str): 是否成功,失败原因
|
|
88
|
+
'''
|
|
89
|
+
pass
|
|
@@ -331,44 +331,41 @@ class LoadCase:
|
|
|
331
331
|
def create_displacement(
|
|
332
332
|
self,
|
|
333
333
|
nEntity: int,
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
334
|
+
bX: int = 1,
|
|
335
|
+
Dx: float = 0.0,
|
|
336
|
+
bY: int = 0,
|
|
337
|
+
Dy: float = 0.0,
|
|
338
|
+
bZ: int = 0,
|
|
339
|
+
Dz: float = 0.0,
|
|
340
|
+
bRx: int = 0,
|
|
341
|
+
Rx: float = 0.0,
|
|
342
|
+
bRy: int = 0,
|
|
343
|
+
Ry: float = 0.0,
|
|
344
|
+
bRz: int = 0,
|
|
345
|
+
Rz: float = 0.0,
|
|
346
346
|
) -> LoadCase:
|
|
347
347
|
"""添加强迫位移
|
|
348
348
|
|
|
349
349
|
Args:
|
|
350
|
-
nEntity
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
350
|
+
nEntity:节点编号
|
|
351
|
+
bX:UX方向,0 = 自由,1 = 强迫位移
|
|
352
|
+
Dx:强制位移在坐标系x方向的分量
|
|
353
|
+
bY:UY方向,0 = 自由,1 = 强迫位移
|
|
354
|
+
Dy:强制位移在坐标系y方向的分量
|
|
355
|
+
bZ:UZ方向,0 = 自由,1 = 强迫位移
|
|
356
|
+
Dz:强制位移在坐标系z方向的分量
|
|
357
|
+
bRx:RX方向,0 = 自由,1 = 强迫位移
|
|
358
|
+
Rx:绕坐标系x轴的强制旋转角度分量
|
|
359
|
+
bRy:RY方向,0 = 自由,1 = 强迫位移
|
|
360
|
+
Ry:绕坐标系y轴的强制旋转角度分量
|
|
361
|
+
bRz:RZ方向,0 = 自由,1 = 强迫位移
|
|
362
|
+
Rz:绕坐标系z轴的强制旋转角度分量
|
|
357
363
|
|
|
358
364
|
Returns:
|
|
359
365
|
更新后的 LoadCase 对象
|
|
360
366
|
"""
|
|
361
367
|
ok, err = osis_load_displacement(
|
|
362
|
-
"DISPLACEMENT",
|
|
363
|
-
self.name,
|
|
364
|
-
nEntity,
|
|
365
|
-
bDX, dDX,
|
|
366
|
-
bDY, dDY,
|
|
367
|
-
bDZ, dDZ,
|
|
368
|
-
bRX, dRX,
|
|
369
|
-
bRY, dRY,
|
|
370
|
-
bRZ, dRZ,
|
|
371
|
-
)
|
|
368
|
+
"DISPLACEMENT",self.name,nEntity,bX,Dx,bY,Dy,bZ,Dz,bRx,Rx,bRy,Ry,bRz,Rz)
|
|
372
369
|
if not ok:
|
|
373
370
|
raise RuntimeError(f"添加强迫位移到工况 {self.name} 失败: {err}")
|
|
374
371
|
return self.refresh()
|
|
@@ -606,7 +603,7 @@ class LoadCase:
|
|
|
606
603
|
Returns:
|
|
607
604
|
更新后的 LoadCase 对象
|
|
608
605
|
"""
|
|
609
|
-
raise Exception("暂不支持添加单元面荷载(方向向量)到工况")
|
|
606
|
+
# raise Exception("暂不支持添加单元面荷载(方向向量)到工况")
|
|
610
607
|
ok, err = osis_load_surface_load_vector(
|
|
611
608
|
"ESRFC", self.name, strEntity, strPlanei, strDir,
|
|
612
609
|
strXi, strYi, strZi, strP1i, strP2i, strP3i, strP4i
|
|
@@ -1442,11 +1439,35 @@ class LoadCaseManager:
|
|
|
1442
1439
|
name: 荷载工况名称
|
|
1443
1440
|
load_case_type: 荷载工况类型
|
|
1444
1441
|
USER = 用户定义的荷载
|
|
1445
|
-
D = 桥规中的荷编号1(结构重力)
|
|
1446
|
-
DC = 结构和非结构附属荷载
|
|
1447
|
-
DW = 铺装和设备荷载
|
|
1448
|
-
DD = 桩端摩擦力
|
|
1449
1442
|
CS = 施工阶段荷载
|
|
1443
|
+
D = 结构重力
|
|
1444
|
+
PS = 预加力
|
|
1445
|
+
EV = 土的重量
|
|
1446
|
+
EH = 土侧压力
|
|
1447
|
+
SH = 收缩
|
|
1448
|
+
CR = 徐变
|
|
1449
|
+
B = 水浮力
|
|
1450
|
+
STL = 基础变位
|
|
1451
|
+
L = 汽车荷载
|
|
1452
|
+
IF = 汽车冲击力
|
|
1453
|
+
CF = 汽车离心率
|
|
1454
|
+
LS = 汽车引起的土侧压力
|
|
1455
|
+
BRK = 汽车制动力
|
|
1456
|
+
CRL = 人群荷载
|
|
1457
|
+
FL = 疲劳荷载
|
|
1458
|
+
W1 = 活载风
|
|
1459
|
+
W2 = 极限风
|
|
1460
|
+
SF = 流水压力
|
|
1461
|
+
IP = 冰压力
|
|
1462
|
+
WF1 = W1引起的波浪力
|
|
1463
|
+
WF2 = W2引起的波浪力
|
|
1464
|
+
T = 均匀温度
|
|
1465
|
+
TG = 梯度温度
|
|
1466
|
+
FR = 支座摩阻力
|
|
1467
|
+
CFS = 船舶的撞击作用
|
|
1468
|
+
CFD = 漂流物的撞击作用
|
|
1469
|
+
CFV = 汽车撞击作用
|
|
1470
|
+
E = 地震作用
|
|
1450
1471
|
scalar: 系数,默认1.0
|
|
1451
1472
|
prompt: 说明
|
|
1452
1473
|
|
|
@@ -133,11 +133,11 @@ def osis_load_surface_load(eType: str, strLc: str, strEntity: str, strPlanei:str
|
|
|
133
133
|
创建或修改单元面荷载,不考虑边中节点荷载插值
|
|
134
134
|
|
|
135
135
|
Args:
|
|
136
|
-
eType (str):
|
|
136
|
+
eType (str): 荷载类型,Type = ESRFC
|
|
137
137
|
strLc (str): 荷载工况名称
|
|
138
138
|
strEntity (str): 单元编号
|
|
139
139
|
strPlanei (str): 面位置,板壳单元默认输入1,实体单元输入1,2,3,4,5,6
|
|
140
|
-
strDir (str)
|
|
140
|
+
strDir (str):方向,X,Y,Z
|
|
141
141
|
strGlobalI (str):
|
|
142
142
|
* 0 = 局部
|
|
143
143
|
* 1 = 整体
|
|
@@ -184,32 +184,38 @@ def osis_load_displacement(
|
|
|
184
184
|
eType: str = "DISPLACEMENT",
|
|
185
185
|
strLCName: str = "自定义工况1",
|
|
186
186
|
nEntity: int = 1,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
187
|
+
bX:int = 1,
|
|
188
|
+
Dx: float = 0.0,
|
|
189
|
+
bY: int = 0,
|
|
190
|
+
Dy: float = 0.0,
|
|
191
|
+
bZ: int = 0,
|
|
192
|
+
Dz: float = 0.0,
|
|
193
|
+
bRx: int = 0,
|
|
194
|
+
Rx: float = 0.0,
|
|
195
|
+
bRy: int = 0,
|
|
196
|
+
Ry: float = 0.0,
|
|
197
|
+
bRz: int = 0,
|
|
198
|
+
Rz: float = 0.0,
|
|
199
199
|
):
|
|
200
200
|
'''
|
|
201
|
-
|
|
201
|
+
创建或修改强迫位移
|
|
202
202
|
|
|
203
203
|
Args:
|
|
204
|
-
|
|
204
|
+
Type:荷载类型,固定为 DISPLACEMENT
|
|
205
205
|
strLCName (str): 荷载工况名称
|
|
206
|
-
nEntity
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
206
|
+
nEntity:节点编号
|
|
207
|
+
bX:UX方向,0 = 自由,1 = 强迫位移
|
|
208
|
+
Dx:强制位移在坐标系x方向的分量
|
|
209
|
+
bY:UY方向,0 = 自由,1 = 强迫位移
|
|
210
|
+
Dy:强制位移在坐标系y方向的分量
|
|
211
|
+
bZ:UZ方向,0 = 自由,1 = 强迫位移
|
|
212
|
+
Dz:强制位移在坐标系z方向的分量
|
|
213
|
+
bRx:RX方向,0 = 自由,1 = 强迫位移
|
|
214
|
+
Rx:绕坐标系x轴的强制旋转角度分量
|
|
215
|
+
bRy:RY方向,0 = 自由,1 = 强迫位移
|
|
216
|
+
Ry:绕坐标系y轴的强制旋转角度分量
|
|
217
|
+
bRz:RZ方向,0 = 自由,1 = 强迫位移
|
|
218
|
+
Rz:绕坐标系z轴的强制旋转角度分量
|
|
213
219
|
|
|
214
220
|
Returns:
|
|
215
221
|
tuple (bool, str): 是否成功,失败原因
|
|
@@ -234,7 +240,7 @@ def osis_load_initial(
|
|
|
234
240
|
dMZJ: float = 0,
|
|
235
241
|
):
|
|
236
242
|
'''
|
|
237
|
-
|
|
243
|
+
创建或修改初始内力
|
|
238
244
|
|
|
239
245
|
Args:
|
|
240
246
|
eType (str): 荷载类型,不区分大小写。固定为 INITIAL
|
|
@@ -314,6 +320,12 @@ def osis_load_gtemp(eType: str="GTEMP", strLCName: str="自定义工况1", nEnti
|
|
|
314
320
|
- T2 (float): H2处对应温度
|
|
315
321
|
Returns:
|
|
316
322
|
tuple (bool, str): 是否成功,失败原因
|
|
323
|
+
|
|
324
|
+
Notes:
|
|
325
|
+
R:从梁截面建模位置到温度变化点的距离
|
|
326
|
+
T:从梁顶到温度变化点的距离
|
|
327
|
+
C:从截面中心到温度变化点的距离
|
|
328
|
+
B:从梁底到温度变化点的距离
|
|
317
329
|
'''
|
|
318
330
|
pass
|
|
319
331
|
|
|
@@ -60,7 +60,7 @@ def osis_material_steel(nMat: int, strName: str, eMaterialType: Literal["STEEL"]
|
|
|
60
60
|
|
|
61
61
|
@REGISTRY.register('Material')
|
|
62
62
|
def osis_material_prestressed(nMat: int, strName: str, eMaterialType: Literal["PRESTRESSED"], eCode: Literal["JTG3362_2018", "JTGD62_2004"], eGrade: str, dDmp: float):
|
|
63
|
-
"""
|
|
63
|
+
"""创建或修改预应力材料。
|
|
64
64
|
|
|
65
65
|
Args:
|
|
66
66
|
nMat (int): 材料编号
|
|
@@ -85,7 +85,7 @@ def osis_material_prestressed(nMat: int, strName: str, eMaterialType: Literal["P
|
|
|
85
85
|
@REGISTRY.register('Material')
|
|
86
86
|
def osis_material_rebar(nMat: int, strName: str, eMaterialType: Literal["REBAR"], eCode: Literal["JTG3362_2018", "JTGD62_2004"],
|
|
87
87
|
eGrade: Literal["HPB300", "HRB400", "HRBF400", "RRB400", "HRB500"] | Literal["R235", "HRB335", "HRB400", "KL400"], dDmp: float):
|
|
88
|
-
"""
|
|
88
|
+
"""创建或修改普通钢筋材料
|
|
89
89
|
|
|
90
90
|
Args:
|
|
91
91
|
nMat (int): 材料编号
|
|
@@ -108,7 +108,7 @@ def osis_material_rebar(nMat: int, strName: str, eMaterialType: Literal["REBAR"]
|
|
|
108
108
|
|
|
109
109
|
@REGISTRY.register('Material')
|
|
110
110
|
def osis_material_custom(nMat: int, strName: str, eMaterialType: Literal["CUSTOM"], dE: float=0, dG: float=0, dMu: float=0, dExpCoeff: float=0, dUnitWeight: float=0, dDensity: float=0, dDmp: float=0):
|
|
111
|
-
"""
|
|
111
|
+
"""创建或修改自定义材料。
|
|
112
112
|
|
|
113
113
|
Args:
|
|
114
114
|
nMat (int): 材料编号
|