osis-python 0.7.4__tar.gz → 0.7.5__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.
Files changed (119) hide show
  1. {osis_python-0.7.4/src/osis_python.egg-info → osis_python-0.7.5}/PKG-INFO +4 -3
  2. {osis_python-0.7.4 → osis_python-0.7.5}/README.md +3 -2
  3. {osis_python-0.7.4 → osis_python-0.7.5/src/osis_python.egg-info}/PKG-INFO +4 -3
  4. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/__init__.py +1 -1
  5. osis_python-0.7.5/src/pyosis/property/creep_shrink.py +71 -0
  6. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/property/manager.py +51 -13
  7. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/transfer/generator.py +3 -0
  8. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/transfer/out_to_python.py +10 -0
  9. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/transfer/routes.py +27 -0
  10. osis_python-0.7.4/src/pyosis/property/creep_shrink.py +0 -53
  11. {osis_python-0.7.4 → osis_python-0.7.5}/LICENSE +0 -0
  12. {osis_python-0.7.4 → osis_python-0.7.5}/pyproject.toml +0 -0
  13. {osis_python-0.7.4 → osis_python-0.7.5}/setup.cfg +0 -0
  14. {osis_python-0.7.4 → osis_python-0.7.5}/src/osis_python.egg-info/SOURCES.txt +0 -0
  15. {osis_python-0.7.4 → osis_python-0.7.5}/src/osis_python.egg-info/dependency_links.txt +0 -0
  16. {osis_python-0.7.4 → osis_python-0.7.5}/src/osis_python.egg-info/requires.txt +0 -0
  17. {osis_python-0.7.4 → osis_python-0.7.5}/src/osis_python.egg-info/top_level.txt +0 -0
  18. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/boundary/__init__.py +0 -0
  19. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/boundary/interface.py +0 -0
  20. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/boundary/manager.py +0 -0
  21. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/control/__init__.py +0 -0
  22. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/control/control.py +0 -0
  23. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/control/io.py +0 -0
  24. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/control/manager.py +0 -0
  25. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/control/nonlinear.py +0 -0
  26. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/core/__init__.py +0 -0
  27. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/core/all_func.py +0 -0
  28. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/core/apdl_sync.py +0 -0
  29. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/core/basic_manager.py +0 -0
  30. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/core/batch.py +0 -0
  31. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/core/client.py +0 -0
  32. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/core/command.py +0 -0
  33. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/core/engine.py +0 -0
  34. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/core/exceptions.py +0 -0
  35. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/core/references.py +0 -0
  36. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/core/solver.py +0 -0
  37. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/core/sync_apdl_cli.py +0 -0
  38. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/display/__init__.py +0 -0
  39. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/display/interface.py +0 -0
  40. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/display/manager.py +0 -0
  41. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/dynamic/__init__.py +0 -0
  42. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/dynamic/load_to_mass.py +0 -0
  43. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/dynamic/manager.py +0 -0
  44. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/dynamic/modal.py +0 -0
  45. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/dynamic/seismic.py +0 -0
  46. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/element/__init__.py +0 -0
  47. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/element/interface.py +0 -0
  48. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/element/manager.py +0 -0
  49. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/general/__init__.py +0 -0
  50. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/general/interface.py +0 -0
  51. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/geometry/__init__.py +0 -0
  52. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/geometry/interface.py +0 -0
  53. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/geometry/manager.py +0 -0
  54. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/live/__init__.py +0 -0
  55. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/live/analysis.py +0 -0
  56. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/live/grade.py +0 -0
  57. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/live/lane.py +0 -0
  58. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/live/manager.py +0 -0
  59. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/load/__init__.py +0 -0
  60. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/load/loadcase.py +0 -0
  61. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/load/manager.py +0 -0
  62. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/load/static.py +0 -0
  63. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/load/tendon.py +0 -0
  64. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/material/__init__.py +0 -0
  65. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/material/interface.py +0 -0
  66. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/material/manager.py +0 -0
  67. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/node/__init__.py +0 -0
  68. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/node/interface.py +0 -0
  69. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/node/manager.py +0 -0
  70. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/post/__init__.py +0 -0
  71. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/post/combine.py +0 -0
  72. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/post/design_check.py +0 -0
  73. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/post/display.py +0 -0
  74. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/post/manager.py +0 -0
  75. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/project/__init__.py +0 -0
  76. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/project/interface.py +0 -0
  77. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/project/manager.py +0 -0
  78. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/property/__init__.py +0 -0
  79. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/property/component_thickness.py +0 -0
  80. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/property/coordinate.py +0 -0
  81. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/property/damping.py +0 -0
  82. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/property/pu_curve.py +0 -0
  83. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/quick_building/__init__.py +0 -0
  84. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/quick_building/interface.py +0 -0
  85. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/result/__init__.py +0 -0
  86. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/result/check.py +0 -0
  87. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/result/env.py +0 -0
  88. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/result/loadcase.py +0 -0
  89. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/result/manager.py +0 -0
  90. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/result/result.py +0 -0
  91. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/section/__init__.py +0 -0
  92. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/section/common.py +0 -0
  93. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/section/composite.py +0 -0
  94. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/section/manager.py +0 -0
  95. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/section/numeric.py +0 -0
  96. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/section/param.py +0 -0
  97. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/section/rebar.py +0 -0
  98. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/section/rib.py +0 -0
  99. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/section/steel.py +0 -0
  100. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/settlement/__init__.py +0 -0
  101. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/settlement/interface.py +0 -0
  102. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/settlement/manager.py +0 -0
  103. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/stability/__init__.py +0 -0
  104. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/stability/buckling.py +0 -0
  105. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/stability/manager.py +0 -0
  106. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/stage/__init__.py +0 -0
  107. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/stage/define.py +0 -0
  108. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/stage/manager.py +0 -0
  109. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/stage/overall.py +0 -0
  110. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/thickness/__init__.py +0 -0
  111. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/thickness/interface.py +0 -0
  112. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/thickness/manager.py +0 -0
  113. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/transfer/__init__.py +0 -0
  114. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/transfer/matrix.py +0 -0
  115. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/transfer/parser.py +0 -0
  116. {osis_python-0.7.4 → osis_python-0.7.5}/src/pyosis/transfer/split.py +0 -0
  117. {osis_python-0.7.4 → osis_python-0.7.5}/tests/test_batch.py +0 -0
  118. {osis_python-0.7.4 → osis_python-0.7.5}/tests/test_delete_occupied.py +0 -0
  119. {osis_python-0.7.4 → osis_python-0.7.5}/tests/test_project_manager.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: osis-python
3
- Version: 0.7.4
3
+ Version: 0.7.5
4
4
  Summary: A Python client library for Osis APDL
5
5
  Author-email: "CCCC Highway Consultant Co. Ltd." <support@osisbim.com>
6
6
  License-Expression: MIT
@@ -255,9 +255,10 @@ engine.prop.coord.create_three_point(
255
255
  p3x=0, p3y=1, p3z=0,
256
256
  )
257
257
 
258
- # Creep and shrinkage(no, name, avg_humidity, birth_time, type_coeff, shrink_birth)
258
+ # Creep and shrinkage(no, name, code, fcuk, avg_humidity,
259
+ # component_approximate_size, type_coeff, birth_by_shrinking, fly_ash_ratio)
259
260
  engine.prop.creep_shrink.create(no=1, name="Creep1", avg_humidity=70.0,
260
- birth_time=7, type_coeff=5.0, shrink_birth=3)
261
+ type_coeff=5.0, birth_by_shrinking=3)
261
262
 
262
263
  # Damping (Rayleigh 自定义系数)
263
264
  engine.prop.damping.create_rayleigh_custom(name="Damping1", alpha=0.05, beta=0.005)
@@ -224,9 +224,10 @@ engine.prop.coord.create_three_point(
224
224
  p3x=0, p3y=1, p3z=0,
225
225
  )
226
226
 
227
- # Creep and shrinkage(no, name, avg_humidity, birth_time, type_coeff, shrink_birth)
227
+ # Creep and shrinkage(no, name, code, fcuk, avg_humidity,
228
+ # component_approximate_size, type_coeff, birth_by_shrinking, fly_ash_ratio)
228
229
  engine.prop.creep_shrink.create(no=1, name="Creep1", avg_humidity=70.0,
229
- birth_time=7, type_coeff=5.0, shrink_birth=3)
230
+ type_coeff=5.0, birth_by_shrinking=3)
230
231
 
231
232
  # Damping (Rayleigh 自定义系数)
232
233
  engine.prop.damping.create_rayleigh_custom(name="Damping1", alpha=0.05, beta=0.005)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: osis-python
3
- Version: 0.7.4
3
+ Version: 0.7.5
4
4
  Summary: A Python client library for Osis APDL
5
5
  Author-email: "CCCC Highway Consultant Co. Ltd." <support@osisbim.com>
6
6
  License-Expression: MIT
@@ -255,9 +255,10 @@ engine.prop.coord.create_three_point(
255
255
  p3x=0, p3y=1, p3z=0,
256
256
  )
257
257
 
258
- # Creep and shrinkage(no, name, avg_humidity, birth_time, type_coeff, shrink_birth)
258
+ # Creep and shrinkage(no, name, code, fcuk, avg_humidity,
259
+ # component_approximate_size, type_coeff, birth_by_shrinking, fly_ash_ratio)
259
260
  engine.prop.creep_shrink.create(no=1, name="Creep1", avg_humidity=70.0,
260
- birth_time=7, type_coeff=5.0, shrink_birth=3)
261
+ type_coeff=5.0, birth_by_shrinking=3)
261
262
 
262
263
  # Damping (Rayleigh 自定义系数)
263
264
  engine.prop.damping.create_rayleigh_custom(name="Damping1", alpha=0.05, beta=0.005)
@@ -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.7.4"
10
+ __version__ = "0.7.5"
11
11
 
12
12
  from .core.engine import OSISEngine
13
13
  from .core.batch import batch, flush, batch_state, BatchError
@@ -0,0 +1,71 @@
1
+ '''
2
+ pyosis.property.creep_shrink 的 Docstring
3
+
4
+ 时间依存性材料属性
5
+ '''
6
+ from ..core import REGISTRY
7
+
8
+ @REGISTRY.register("CrpShrk")
9
+ def osis_creep_shrink(
10
+ nNO: int = 1,
11
+ strName: str = "收缩徐变1",
12
+ strCode: str = "JTG3362_2018",
13
+ dFcuk: float = 5.0e7,
14
+ dAvgHumidity: float = 70.0,
15
+ dComponentApproximateSize: float = 1.0,
16
+ dTypeCoeff: float = 5.0,
17
+ nBirthByShrinking: int = 3,
18
+ dFlyAshRatio: float = 0.0,
19
+ ):
20
+ """
21
+ 创建或修改收缩徐变特性
22
+
23
+ 命令流:CrpShrk, Index, Name, Code, Fcuk, AVG.Humidity,
24
+ ComponentApproximateSize, Type.Coeff, BirthByShrinking, FlyAshRatio
25
+ 参数按此顺序组装,共 9 个,缺一不可(软件侧会校验参数个数)。
26
+
27
+ Args:
28
+ nNO (int): 收缩徐变特性编号(Index)
29
+ strName (str): 名称(Name)
30
+ strCode (str): 规范(Code),目前只支持 JTG3362_2018
31
+ dFcuk (float): 28天龄期的混凝土强度(Fcuk),按工程当前压力单位填写,
32
+ 默认单位 Pa 下 5.0e7 即 50MPa,合法区间 1MPa~200MPa
33
+ dAvgHumidity (float): 周围环境的相对湿度,百分比,取值 40~99
34
+ dComponentApproximateSize (float): 构件大致尺寸(m),必须大于 0
35
+ dTypeCoeff (float): 水泥种类系数(Type.Coeff)
36
+ nBirthByShrinking (int): 收缩开始时的混凝土龄期,天数(BirthByShrinking)
37
+ dFlyAshRatio (float): 粉煤灰添加量,百分比,取值 0~50
38
+
39
+ Returns:
40
+ tuple (bool, str): 是否成功,失败原因
41
+ """
42
+ pass
43
+
44
+ @REGISTRY.register('CrpShrkDel')
45
+ def osis_creep_shrink_del(nNO: int):
46
+ """删除收缩徐变特性
47
+
48
+ Args:
49
+ nNO (int): 收缩徐变特性编号
50
+
51
+ Returns:
52
+ tuple (bool, str):
53
+ - bool: 操作是否成功
54
+ - str: 失败原因(如果操作失败)
55
+ """
56
+ pass
57
+
58
+ @REGISTRY.register('CrpShrkMod')
59
+ def osis_creep_shrink_mod(nOld: int, nNew: int):
60
+ """修改一个收缩徐变特性的编号。收缩徐变特性编号存在时,交换
61
+
62
+ Args:
63
+ nOld (int): 旧编号
64
+ nNew (int): 新编号
65
+
66
+ Returns:
67
+ tuple (bool, str):
68
+ - bool: 操作是否成功
69
+ - str: 失败原因(如果操作失败)
70
+ """
71
+ pass
@@ -3,7 +3,7 @@
3
3
  用法:
4
4
  >>> from pyosis.property import property_manager
5
5
  >>> property_manager.coord.create_three_point(1, 0, 0, 0, 10, 0, 0, 0, 10, 0)
6
- >>> property_manager.creep_shrink.create(1, "CS1", 70.0, 7, 5.0, 3)
6
+ >>> property_manager.creep_shrink.create(1, "CS1", "JTG3362_2018", 5.0e7, 70.0, 1.0, 5.0, 3)
7
7
  >>> property_manager.damping.create_modal("Damp1", 0.05)
8
8
  >>> property_manager.pu_curve.create(1, "PU1", 0, 3, 0.0, 0.01, 0.02, 0.0, 100.0, 150.0)
9
9
  """
@@ -295,24 +295,39 @@ class CoordinateManager(BasicManager):
295
295
  class CreepShrink:
296
296
  """收缩徐变对象"""
297
297
  avg_humidity: float
298
- birth_by_shrinking: int
299
- birth_time: int
298
+ birth_by_shrinking: int # 收缩起始龄期(天),接口字段 birthByShrinking
299
+ birth_time: int # 只读遗留字段,当前命令流已不再写入
300
+ code: str # 规范,仅 JTG3362_2018
301
+ component_approximate_size: float # 构件大致尺寸(m)
302
+ fcuk: float # 28天龄期混凝土强度,工程当前压力单位
303
+ fly_ash_ratio: float # 粉煤灰添加量(%)
300
304
  name: str
301
305
  no: int
302
- shrink_birth: int
303
306
  related_material: list[int]
307
+ shrink_birth: int # 同 birth_by_shrinking 的旧名,读到的是同一个值
304
308
  type_coeff: float
305
309
  @classmethod
306
310
  def _from_dict(cls, d: dict) -> CreepShrink:
307
- """从接口 dict 构造 CreepShrink 对象(内部使用)"""
311
+ """从接口 dict 构造 CreepShrink 对象(内部使用)
312
+
313
+ 收缩起始龄期的接口字段名是 birthByShrinking;旧的 shrinkBirth 读出来
314
+ 恒为 None,因此 birth_by_shrinking 与 shrink_birth 两个属性都取该字段。
315
+ """
316
+ birth = d.get("birthByShrinking")
317
+ if birth is None:
318
+ birth = d.get("shrinkBirth")
308
319
  return cls(
309
320
  avg_humidity=d.get("avgHumidity"),
310
- birth_by_shrinking=d.get("birthByShrinking"),
321
+ birth_by_shrinking=birth,
311
322
  birth_time=d.get("birthTime"),
323
+ code=d.get("code"),
324
+ component_approximate_size=d.get("componentApproximateSize"),
325
+ fcuk=d.get("fcuk"),
326
+ fly_ash_ratio=d.get("flyAshRatio"),
312
327
  name=d.get("name"),
313
328
  no=d.get("no"),
314
- shrink_birth=d.get("shrinkBirth"),
315
329
  related_material=list(d.get("relatedMaterial") or []),
330
+ shrink_birth=birth,
316
331
  type_coeff = d.get("typeCoeff"),
317
332
  )
318
333
 
@@ -373,20 +388,33 @@ class CreepShrinkManager(BasicManager):
373
388
  self,
374
389
  no: int = 1,
375
390
  name: str = "收缩徐变1",
391
+ code: str = "JTG3362_2018",
392
+ fcuk: float = 5.0e7,
376
393
  avg_humidity: float = 70.0,
377
- birth_time: int = 7,
394
+ component_approximate_size: float = 1.0,
378
395
  type_coeff: float = 5.0,
379
- shrink_birth: int = 3,
396
+ birth_by_shrinking: int = 3,
397
+ fly_ash_ratio: float = 0.0,
398
+ shrink_birth: int | None = None,
380
399
  ) -> CreepShrink:
381
400
  '''创建或修改收缩徐变特性
382
401
 
402
+ 形参顺序与命令流字段顺序一致:
403
+ CrpShrk, Index, Name, Code, Fcuk, AVG.Humidity,
404
+ ComponentApproximateSize, Type.Coeff, BirthByShrinking, FlyAshRatio
405
+
383
406
  Args:
384
407
  no (int): 收缩徐变特性编号
385
408
  name (str): 特性名称
386
- avg_humidity (float): 年平均湿度(百分比)
387
- birth_time (int): 混凝土龄期(天)
409
+ code (str): 规范,目前只支持 JTG3362_2018
410
+ fcuk (float): 28天龄期的混凝土强度,按工程当前压力单位填写,
411
+ 默认单位 Pa 下 5.0e7 即 50MPa,合法区间 1MPa~200MPa
412
+ avg_humidity (float): 周围环境的相对湿度(百分比),40~99
413
+ component_approximate_size (float): 构件大致尺寸(m),大于 0
388
414
  type_coeff (float): 水泥种类系数
389
- shrink_birth (int): 收缩开始时的混凝土龄期(天数)
415
+ birth_by_shrinking (int): 收缩开始时的混凝土龄期(天数)
416
+ fly_ash_ratio (float): 粉煤灰添加量(百分比),0~50
417
+ shrink_birth (int|None): birth_by_shrinking 的旧写法,传了就覆盖上面的值
390
418
 
391
419
  Returns:
392
420
  创建的 CreepShrink 对象
@@ -394,8 +422,18 @@ class CreepShrinkManager(BasicManager):
394
422
  Raises:
395
423
  RuntimeError: 创建失败时抛出
396
424
  '''
425
+ if shrink_birth is not None:
426
+ birth_by_shrinking = shrink_birth
397
427
  ok, err = osis_creep_shrink(
398
- no, name, avg_humidity, birth_time, type_coeff, shrink_birth,
428
+ nNO=no,
429
+ strName=name,
430
+ strCode=code,
431
+ dFcuk=fcuk,
432
+ dAvgHumidity=avg_humidity,
433
+ dComponentApproximateSize=component_approximate_size,
434
+ dTypeCoeff=type_coeff,
435
+ nBirthByShrinking=birth_by_shrinking,
436
+ dFlyAshRatio=fly_ash_ratio,
399
437
  )
400
438
  if not ok:
401
439
  raise RuntimeError(f"创建收缩徐变特性 {no} 失败: {err}")
@@ -61,6 +61,9 @@ def _render_route(cmd: ParsedCommand) -> str:
61
61
  fields = cmd.fields[1:]
62
62
 
63
63
  if isinstance(route, str):
64
+ fixer = REST_FIXERS.get(_route_key(cmd.name))
65
+ if fixer is not None:
66
+ fields = fixer(fields)
64
67
  formatted = [_format_value(v) for v in fields]
65
68
  if not formatted:
66
69
  return f"{route}()"
@@ -20,6 +20,16 @@ from collections import defaultdict
20
20
  from pathlib import Path
21
21
  from typing import Iterable
22
22
 
23
+ # 以脚本方式直接运行(python src/pyosis/transfer/out_to_python.py)时,
24
+ # sys.path[0] 是本文件所在目录,`pyosis` 会被 site-packages 里 pip 装的那份
25
+ # 旧副本先解析掉,本仓库的改动一律不生效。这里把本仓库的 src 顶到最前。
26
+ _SRC_ROOT = Path(__file__).resolve().parents[2]
27
+ if (_SRC_ROOT / "pyosis" / "__init__.py").is_file():
28
+ _src = str(_SRC_ROOT)
29
+ if _src in sys.path:
30
+ sys.path.remove(_src)
31
+ sys.path.insert(0, _src)
32
+
23
33
  from pyosis.transfer.generator import generate_lines
24
34
  from pyosis.transfer.parser import (
25
35
  BLANK_RE,
@@ -46,9 +46,36 @@ def _fix_section_part(rest: list[str]) -> list[str]:
46
46
  return rest
47
47
 
48
48
 
49
+ def _fix_creep_shrk(rest: list[str]) -> list[str]:
50
+ """CrpShrk 旧命令流 → 新 9 字段序(同软件侧 UpdatePreviousCommand 的升级逻辑)
51
+
52
+ 新: Index, Name, Code, Fcuk, AVG.Humidity, ComponentApproximateSize,
53
+ Type.Coeff, BirthByShrinking, FlyAshRatio
54
+ 早期5.01: Index, Name, Humidity, Birth, Type.Coeff, BirthByShrinking,
55
+ FlyAshRatio, ComponentApproximateSize (8 字段)
56
+ 4.9.6: Index, Name, Humidity, Birth, Type.Coeff, BirthByShrinking (6 字段)
57
+
58
+ 旧格式的 Birth(加载龄期)在新命令流里已取消,直接丢弃;
59
+ Code/Fcuk/尺寸/粉煤灰补齐为软件升级时写入的默认值。
60
+ """
61
+ n = len(rest)
62
+ if n == 9:
63
+ return rest
64
+ if n == 6:
65
+ index, name, humidity, _birth, type_coeff, shrink_age = rest
66
+ fly_ash, size = "0", "1"
67
+ elif n == 8:
68
+ index, name, humidity, _birth, type_coeff, shrink_age, fly_ash, size = rest
69
+ else:
70
+ return rest
71
+ return [index, name, "JTG3362_2018", "50000000", humidity, size,
72
+ type_coeff, shrink_age, fly_ash]
73
+
74
+
49
75
  REST_FIXERS = {
50
76
  "SectionMesh": _fix_section_mesh,
51
77
  "SectionPart": _fix_section_part,
78
+ "CrpShrk": _fix_creep_shrk,
52
79
  }
53
80
 
54
81
  ROUTES = {
@@ -1,53 +0,0 @@
1
- '''
2
- pyosis.property.creep_shrink 的 Docstring
3
-
4
- 时间依存性材料属性
5
- '''
6
- from ..core import REGISTRY
7
-
8
- @REGISTRY.register("CrpShrk")
9
- def osis_creep_shrink(nNO: int=1, strName: str="收缩徐变1", dAvgHumidity: float=70.0, nBirthTime: int=7, dTypeCoeff: float=5.0, nBirthByShrinking: int=3):
10
- """
11
- 创建或修改收缩徐变特性
12
-
13
- Args:
14
- nNO (int): 收缩徐变特性编号
15
- strName (str): 特性名称
16
- dAvgHumidity (float): 年平均湿度(百分比)
17
- nBirthTime (int): 混凝土龄期(天)
18
- dTypeCoeff (float): 水泥种类系数
19
- nBirthByShrinking (int): 收缩开始时的混凝土龄期(天数)
20
-
21
- Returns:
22
- tuple (bool, str): 是否成功,失败原因
23
- """
24
- pass
25
-
26
- @REGISTRY.register('CrpShrkDel')
27
- def osis_creep_shrink_del(nNO: int):
28
- """删除收缩徐变特性
29
-
30
- Args:
31
- nNO (int): 收缩徐变特性编号
32
-
33
- Returns:
34
- tuple (bool, str):
35
- - bool: 操作是否成功
36
- - str: 失败原因(如果操作失败)
37
- """
38
- pass
39
-
40
- @REGISTRY.register('CrpShrkMod')
41
- def osis_creep_shrink_mod(nOld: int, nNew: int):
42
- """修改一个收缩徐变特性的编号。收缩徐变特性编号存在时,交换
43
-
44
- Args:
45
- nOld (int): 旧编号
46
- nNew (int): 新编号
47
-
48
- Returns:
49
- tuple (bool, str):
50
- - bool: 操作是否成功
51
- - str: 失败原因(如果操作失败)
52
- """
53
- pass
File without changes
File without changes
File without changes