osis-python 0.3.1__tar.gz → 0.3.3__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.3.1/src/osis_python.egg-info → osis_python-0.3.3}/PKG-INFO +1 -1
- {osis_python-0.3.1 → osis_python-0.3.3/src/osis_python.egg-info}/PKG-INFO +1 -1
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/__init__.py +1 -1
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/boundary/manager.py +12 -20
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/core/client.py +1 -1
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/load/manager.py +47 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/load/static.py +23 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/LICENSE +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/README.md +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/pyproject.toml +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/setup.cfg +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/osis_python.egg-info/SOURCES.txt +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/osis_python.egg-info/dependency_links.txt +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/osis_python.egg-info/requires.txt +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/osis_python.egg-info/top_level.txt +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/boundary/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/boundary/interface.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/control/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/control/control.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/control/io.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/control/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/control/nonlinear.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/core/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/core/all_func.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/core/command.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/core/engine.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/dynamic/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/dynamic/load_to_mass.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/dynamic/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/dynamic/modal.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/dynamic/seismic.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/element/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/element/interface.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/element/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/general/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/general/interface.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/geometry/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/geometry/interface.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/geometry/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/live/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/live/analysis.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/live/grade.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/live/lane.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/live/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/load/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/load/loadcase.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/load/tendon.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/material/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/material/interface.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/material/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/node/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/node/interface.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/node/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/post/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/post/combine.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/post/design_check.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/post/display.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/post/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/project/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/project/interface.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/project/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/property/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/property/component_thickness.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/property/coordinate.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/property/creep_shrink.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/property/damping.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/property/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/property/pu_curve.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/quick_building/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/quick_building/interface.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/result/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/result/check.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/result/env.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/result/loadcase.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/result/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/result/result.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/section/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/section/common.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/section/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/section/numeric.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/section/param.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/section/rebar.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/section/rib.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/section/steel.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/settlement/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/settlement/interface.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/settlement/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/stability/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/stability/buckling.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/stability/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/stage/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/stage/define.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/stage/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/stage/overall.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/thickness/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/thickness/interface.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/thickness/manager.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/transfer/__init__.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/transfer/command_map.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/src/pyosis/transfer/generator.py +0 -0
- {osis_python-0.3.1 → osis_python-0.3.3}/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.3.
|
|
10
|
+
__version__ = "0.3.3"
|
|
11
11
|
__author__ = "CCCC Highway Consultant Co. Ltd." # 中交公路规划设计院 - 工程技术研究中心 - lzh - wjh - myf
|
|
12
12
|
|
|
13
13
|
# from .core import engine
|
|
@@ -134,6 +134,18 @@ class Boundary:
|
|
|
134
134
|
|
|
135
135
|
def __repr__(self) -> str:
|
|
136
136
|
return f"Boundary(no={self.no}, type={self.boundary_type.name})"
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def assign(
|
|
140
|
+
self,
|
|
141
|
+
eOP: Literal["a", "s", "r", "aa", "ra"] = "a",
|
|
142
|
+
param: list | None = None,
|
|
143
|
+
) -> None:
|
|
144
|
+
"""分配边界给节点"""
|
|
145
|
+
ok, err = osis_assign_boundary(self.no, eOP, param if param is not None else [])
|
|
146
|
+
if not ok:
|
|
147
|
+
raise RuntimeError(f"分配边界 {self.no} 到节点 {param} 失败: {err}")
|
|
148
|
+
|
|
137
149
|
|
|
138
150
|
@dataclass(frozen=True)
|
|
139
151
|
class GeneralBoundary(Boundary):
|
|
@@ -192,16 +204,6 @@ class GeneralBoundary(Boundary):
|
|
|
192
204
|
def rw(self) -> int:
|
|
193
205
|
return self.constraints[6] if len(self.constraints) > 6 else 0
|
|
194
206
|
|
|
195
|
-
def assign(
|
|
196
|
-
self,
|
|
197
|
-
eOP: Literal["a", "s", "r", "aa", "ra"] = "a",
|
|
198
|
-
param: list | None = None,
|
|
199
|
-
) -> None:
|
|
200
|
-
"""分配边界给节点"""
|
|
201
|
-
ok, err = osis_assign_boundary(self.no, eOP, param if param is not None else [])
|
|
202
|
-
if not ok:
|
|
203
|
-
raise RuntimeError(f"分配边界 {self.no} 到节点 {param} 失败: {err}")
|
|
204
|
-
|
|
205
207
|
|
|
206
208
|
@dataclass(frozen=True)
|
|
207
209
|
class MstSlvBoundary(Boundary):
|
|
@@ -300,16 +302,6 @@ class ElstcSptBoundary(Boundary):
|
|
|
300
302
|
def __repr__(self) -> str:
|
|
301
303
|
return f"ElstcSptBoundary(no={self.no}, constraints={self.constraints})"
|
|
302
304
|
|
|
303
|
-
def assign(
|
|
304
|
-
self,
|
|
305
|
-
eOP: Literal["a", "s", "r", "aa", "ra"] = "a",
|
|
306
|
-
param: list | None = None,
|
|
307
|
-
) -> None:
|
|
308
|
-
"""分配边界给节点(节点弹性支撑)"""
|
|
309
|
-
ok, err = osis_assign_boundary(self.no, eOP, param if param is not None else [])
|
|
310
|
-
if not ok:
|
|
311
|
-
raise RuntimeError(f"分配边界 {self.no} 到节点 {param} 失败: {err}")
|
|
312
|
-
|
|
313
305
|
|
|
314
306
|
@dataclass(frozen=True)
|
|
315
307
|
class GeneralElstcSptBoundary(Boundary):
|
|
@@ -24,7 +24,7 @@ session.mount("http://", adapter)
|
|
|
24
24
|
session.mount("https://", adapter) # 如果你后续用HTTPS
|
|
25
25
|
|
|
26
26
|
# ========== 通用客户端函数(复用连接池) ==========
|
|
27
|
-
def osis_client(func_name: str, payload: dict) -> dict
|
|
27
|
+
def osis_client(func_name: str, payload: dict) -> dict:
|
|
28
28
|
"""
|
|
29
29
|
通用 OSIS 接口客户端(复用连接池,高效批量调用)
|
|
30
30
|
Args:
|
|
@@ -43,6 +43,7 @@ from .static import (
|
|
|
43
43
|
osis_load_gravity,
|
|
44
44
|
osis_load_nforce,
|
|
45
45
|
osis_load_line,
|
|
46
|
+
osis_load_concentrated,
|
|
46
47
|
osis_load_surface_load,
|
|
47
48
|
osis_load_surface_load_vector,
|
|
48
49
|
osis_load_displacement,
|
|
@@ -281,6 +282,52 @@ class LoadCase:
|
|
|
281
282
|
raise RuntimeError(f"添加线荷载到工况 {self.name} 失败: {err}")
|
|
282
283
|
return self.refresh()
|
|
283
284
|
|
|
285
|
+
def create_concentrated_force(
|
|
286
|
+
self,
|
|
287
|
+
nEntity: int,
|
|
288
|
+
eCoordSystem: Literal[0, 1] = 1,
|
|
289
|
+
is_moment: bool = False,
|
|
290
|
+
forces: list[list[float]] = None,
|
|
291
|
+
) -> LoadCase:
|
|
292
|
+
"""添加任意节间集中力/力矩
|
|
293
|
+
|
|
294
|
+
Args:
|
|
295
|
+
nEntity: 单元编号
|
|
296
|
+
eCoordSystem: 坐标系
|
|
297
|
+
* 0 = 单元坐标系
|
|
298
|
+
* 1 = 整体坐标系
|
|
299
|
+
is_moment: 是否为集中力矩(True=力矩PTM,False=力PTF)
|
|
300
|
+
forces: 各组力/力矩参数列表,每组为 [offsetX, offsetY, offsetZ, Px, Py, Pz]
|
|
301
|
+
最多5组,例如:
|
|
302
|
+
[[0.5, 0, 0, 100, 0, 0]] # 1组力
|
|
303
|
+
[[0.25, 0, 0, 50, 0, 0], [0.75, 0, 0, 50, 0, 0]] # 2组力
|
|
304
|
+
|
|
305
|
+
Returns:
|
|
306
|
+
更新后的 LoadCase 对象
|
|
307
|
+
"""
|
|
308
|
+
if forces is None:
|
|
309
|
+
forces = []
|
|
310
|
+
|
|
311
|
+
nLoadRange = len(forces)
|
|
312
|
+
if nLoadRange < 1 or nLoadRange > 5:
|
|
313
|
+
raise ValueError(f"forces 组数必须在 1~5 之间,当前为 {nLoadRange}")
|
|
314
|
+
|
|
315
|
+
# 展平参数列表
|
|
316
|
+
params = []
|
|
317
|
+
for force in forces:
|
|
318
|
+
if len(force) != 6:
|
|
319
|
+
raise ValueError(f"每组力/力矩必须包含6个参数 [offsetX, offsetY, offsetZ, Px, Py, Pz],当前为 {len(force)}")
|
|
320
|
+
params.extend(force)
|
|
321
|
+
|
|
322
|
+
eType = "PTM" if is_moment else "PTF"
|
|
323
|
+
ok, err = osis_load_concentrated(
|
|
324
|
+
eType, self.name, nEntity, eCoordSystem, nLoadRange, params
|
|
325
|
+
)
|
|
326
|
+
if not ok:
|
|
327
|
+
force_type = "集中力矩" if is_moment else "集中力"
|
|
328
|
+
raise RuntimeError(f"添加{force_type}到工况 {self.name} 失败: {err}")
|
|
329
|
+
return self.refresh()
|
|
330
|
+
|
|
284
331
|
def create_displacement(
|
|
285
332
|
self,
|
|
286
333
|
nEntity: int,
|
|
@@ -104,6 +104,29 @@ def osis_load_line(eType: Literal['LINE'], strLCName: str, nEntity: int, eCoordS
|
|
|
104
104
|
'''
|
|
105
105
|
pass
|
|
106
106
|
|
|
107
|
+
@REGISTRY.register("Load")
|
|
108
|
+
def osis_load_concentrated(eType: Literal['PTF', 'PTM'], strLCName: str, nEntity: int,
|
|
109
|
+
eCoordSystem: Literal[0, 1], nLoadRange: Literal[1, 2, 3, 4, 5],
|
|
110
|
+
params: list):
|
|
111
|
+
'''
|
|
112
|
+
创建或修改任意节间集中力/力矩
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
eType (str): 荷载类型,不区分大小写。PTF = 集中力,PTM = 集中力矩
|
|
116
|
+
strLCName (str): 荷载工况名称
|
|
117
|
+
nEntity (int): 单元编号
|
|
118
|
+
eCoordSystem (int):
|
|
119
|
+
* 0-单元坐标系
|
|
120
|
+
* 1-整体坐标系
|
|
121
|
+
nLoadRange (int): 力/力矩组数,1~5
|
|
122
|
+
params (list): 各组力/力矩参数,按顺序填入:
|
|
123
|
+
[offsetX1, offsetY1, offsetZ1, Px1, Py1, Pz1, offsetX2, offsetY2, offsetZ2, Px2, Py2, Pz2, ...]
|
|
124
|
+
每组包含6个参数:偏移量X/L, Y轴偏移量, Z轴偏移量, x方向力/力矩, y方向力/力矩, z方向力/力矩
|
|
125
|
+
Returns:
|
|
126
|
+
tuple (bool, str): 是否成功,失败原因
|
|
127
|
+
'''
|
|
128
|
+
pass
|
|
129
|
+
|
|
107
130
|
@REGISTRY.register("Load")
|
|
108
131
|
def osis_load_surface_load(eType: str, strLc: str, strEntity: str, strPlanei:str, strDir:str, strGlobalI:Literal["0","1","2"], strP1i:str, strP2i:str,strP3i:str,strP4i:str) -> tuple[bool, str]:
|
|
109
132
|
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|