pypiles 0.3.0__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.
- pypiles-0.3.0/.github/workflows/publish.yml +41 -0
- pypiles-0.3.0/.gitignore +6 -0
- pypiles-0.3.0/.idea/.gitignore +5 -0
- pypiles-0.3.0/.idea/PyPile.iml +8 -0
- pypiles-0.3.0/.idea/inspectionProfiles/Project_Default.xml +16 -0
- pypiles-0.3.0/.idea/inspectionProfiles/profiles_settings.xml +6 -0
- pypiles-0.3.0/.idea/misc.xml +7 -0
- pypiles-0.3.0/.idea/modules.xml +8 -0
- pypiles-0.3.0/.idea/vcs.xml +6 -0
- pypiles-0.3.0/Benchmark/BH25/BH25.py +68 -0
- pypiles-0.3.0/Benchmark/BH25/test.py +18 -0
- pypiles-0.3.0/Benchmark/BH29/BH29.pdf +0 -0
- pypiles-0.3.0/Benchmark/BH29/CBH26.py +34 -0
- pypiles-0.3.0/Benchmark/BH29/CBH29.py +34 -0
- pypiles-0.3.0/Benchmark/BH29/Design Sheet.pdf +0 -0
- pypiles-0.3.0/Benchmark/BH29/ResBH29-D2.5.xlsx +0 -0
- pypiles-0.3.0/Benchmark/SEISMIC ANALYSIS AND DESIGN OF FOUNDATIONS/357/274/215AASHTO LRFD Bridge Design Specifications 10th Ed. 2024 US.pdf +0 -0
- pypiles-0.3.0/PKG-INFO +52 -0
- pypiles-0.3.0/README.md +37 -0
- pypiles-0.3.0/constants.py +18 -0
- pypiles-0.3.0/main.py +31 -0
- pypiles-0.3.0/pypile/LICENSE +21 -0
- pypiles-0.3.0/pypile/__init__.py +22 -0
- pypiles-0.3.0/pypile/_version.py +24 -0
- pypiles-0.3.0/pypile/configs.py +235 -0
- pypiles-0.3.0/pypile/core.py +270 -0
- pypiles-0.3.0/pypile/correlations.py +53 -0
- pypiles-0.3.0/pypile/solver.py +91 -0
- pypiles-0.3.0/pypile/test/Test-01/Case01.md +98 -0
- pypiles-0.3.0/pypile/test/Test-01/test_case_01.py +65 -0
- pypiles-0.3.0/pypiles.egg-info/PKG-INFO +52 -0
- pypiles-0.3.0/pypiles.egg-info/SOURCES.txt +34 -0
- pypiles-0.3.0/pypiles.egg-info/dependency_links.txt +1 -0
- pypiles-0.3.0/pypiles.egg-info/top_level.txt +1 -0
- pypiles-0.3.0/pyproject.toml +36 -0
- pypiles-0.3.0/setup.cfg +4 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Publish Python Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-and-publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- name: Check out the repository
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: '3.10'
|
|
25
|
+
|
|
26
|
+
- name: Install build dependencies
|
|
27
|
+
run: |
|
|
28
|
+
python -m pip install --upgrade pip
|
|
29
|
+
pip install build
|
|
30
|
+
|
|
31
|
+
- name: Build the package
|
|
32
|
+
run: |
|
|
33
|
+
python -m build
|
|
34
|
+
|
|
35
|
+
- name: Publish to PyPI (Using Twine)
|
|
36
|
+
env:
|
|
37
|
+
TWINE_USERNAME: __token__
|
|
38
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
39
|
+
run: |
|
|
40
|
+
python -m pip install --upgrade twine
|
|
41
|
+
twine upload --verbose dist/*
|
pypiles-0.3.0/.gitignore
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="PYTHON_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$" />
|
|
5
|
+
<orderEntry type="jdk" jdkName="Python 3.14" jdkType="Python SDK" />
|
|
6
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
7
|
+
</component>
|
|
8
|
+
</module>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<component name="InspectionProjectProfileManager">
|
|
2
|
+
<profile version="1.0">
|
|
3
|
+
<option name="myName" value="Project Default" />
|
|
4
|
+
<inspection_tool class="LossyEncoding" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
5
|
+
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
|
6
|
+
<option name="ignoredErrors">
|
|
7
|
+
<list>
|
|
8
|
+
<option value="N802" />
|
|
9
|
+
<option value="N806" />
|
|
10
|
+
<option value="N803" />
|
|
11
|
+
</list>
|
|
12
|
+
</option>
|
|
13
|
+
</inspection_tool>
|
|
14
|
+
<inspection_tool class="PyTypeCheckerInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
|
15
|
+
</profile>
|
|
16
|
+
</component>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="Black">
|
|
4
|
+
<option name="sdkName" value="Python 3.12" />
|
|
5
|
+
</component>
|
|
6
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.14" project-jdk-type="Python SDK" />
|
|
7
|
+
</project>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
from pypile import EquipmentConfig
|
|
2
|
+
from pypile.core import SoilLayer, Borehole
|
|
3
|
+
|
|
4
|
+
rig_safety = EquipmentConfig(hammer_energy_ratio=0.60)
|
|
5
|
+
# 创建钻孔 BH25,地下水位 6.35m
|
|
6
|
+
BH25 = Borehole(water_table_depth=6.35, equipment=rig_safety)
|
|
7
|
+
|
|
8
|
+
# 0.00 - 1.50m: DARK GRAY Lean CLAY with shell (CL) - N=3 (1+2)
|
|
9
|
+
BH25.add_layer(SoilLayer(0.0, 1.5, 'clay', n_field=3, description="Lean CLAY with shell (CL)"))
|
|
10
|
+
|
|
11
|
+
# 1.50 - 3.00m: DARK GRAY Lean CLAY (CL) - N=2 (1+1)
|
|
12
|
+
BH25.add_layer(SoilLayer(1.5, 3.0, 'clay', n_field=2, description="Lean CLAY (CL)"))
|
|
13
|
+
|
|
14
|
+
# 3.00 - 4.50m: DARK GRAY Lean CLAY (CL) - N=2 (1+1)
|
|
15
|
+
BH25.add_layer(SoilLayer(3.0, 4.5, 'clay', n_field=2, description="Lean CLAY (CL)"))
|
|
16
|
+
|
|
17
|
+
# 4.50 - 6.00m: DARK GRAY Lean CLAY (CL) - N=3 (2+1)
|
|
18
|
+
BH25.add_layer(SoilLayer(4.5, 6.0, 'clay', n_field=3, description="Lean CLAY (CL)"))
|
|
19
|
+
|
|
20
|
+
# 6.00 - 7.50m: DARK GRAY Lean CLAY (CL) - N=4 (2+2)
|
|
21
|
+
BH25.add_layer(SoilLayer(6.0, 7.5, 'clay', n_field=4, description="Lean CLAY (CL)"))
|
|
22
|
+
|
|
23
|
+
# 7.50 - 9.00m: DARK GRAY Lean CLAY (CL) - N=3 (2+1)
|
|
24
|
+
BH25.add_layer(SoilLayer(7.5, 9.0, 'clay', n_field=3, description="Lean CLAY (CL)"))
|
|
25
|
+
|
|
26
|
+
# 9.00 - 10.50m: DARK GRAY Lean CLAY (CL) - N=4 (2+2)
|
|
27
|
+
BH25.add_layer(SoilLayer(9.0, 10.5, 'clay', n_field=4, description="Lean CLAY (CL)"))
|
|
28
|
+
|
|
29
|
+
# 10.50 - 12.00m: DARK GRAY Sandy Lean CLAY with shell (CL) - N=12 (5+7)
|
|
30
|
+
BH25.add_layer(SoilLayer(10.5, 12.0, 'clay', n_field=12, description="Sandy Lean CLAY with shell (CL)"))
|
|
31
|
+
|
|
32
|
+
# 12.00 - 13.50m: BROWNISH GRAY Silty SAND (SM) - N=43 (20+23)
|
|
33
|
+
BH25.add_layer(SoilLayer(12.0, 13.5, 'sand', n_field=43, description="Silty SAND (SM)"))
|
|
34
|
+
|
|
35
|
+
# --- 以下为 N>50 的硬土层,作为 IGM 处理 ---
|
|
36
|
+
|
|
37
|
+
# 13.50 - 15.00m: BROWNISH GRAY Silty SAND (SM) - N=51 (24+27)
|
|
38
|
+
BH25.add_layer(SoilLayer(13.5, 15.0, 'igm_sand', n_field=51, description="Silty SAND (SM), Very Dense"))
|
|
39
|
+
|
|
40
|
+
# 15.00 - 16.50m: BROWN Clayey SAND with gravel (SC) - N=57 (27+30)
|
|
41
|
+
BH25.add_layer(SoilLayer(15.0, 16.5, 'igm_sand', n_field=57, description="Clayey SAND with gravel (SC)"))
|
|
42
|
+
|
|
43
|
+
# 16.50 - 18.00m: BROWN Clayey SAND with gravel (SC) - N=61 (29+32)
|
|
44
|
+
BH25.add_layer(SoilLayer(16.5, 18.0, 'igm_sand', n_field=61, description="Clayey SAND with gravel (SC)"))
|
|
45
|
+
|
|
46
|
+
# 18.00 - 19.50m: DARK BROWN Silty SAND with gravel (SM) - N=64 (31+33)
|
|
47
|
+
BH25.add_layer(SoilLayer(18.0, 19.5, 'igm_sand', n_field=64, description="Silty SAND with gravel (SM)"))
|
|
48
|
+
|
|
49
|
+
# 19.50 - 21.00m: DARK BROWN Clayey SAND with gravel (SC) - N=67 (34+33)
|
|
50
|
+
BH25.add_layer(SoilLayer(19.5, 21.0, 'igm_sand', n_field=67, description="Clayey SAND with gravel (SC)"))
|
|
51
|
+
|
|
52
|
+
# 21.00 - 22.50m: DARK BROWN Clayey SAND with gravel (SC) - N=78 (39+39) -> 规范建议截断至60~80之间,保守取78
|
|
53
|
+
BH25.add_layer(SoilLayer(21.0, 22.5, 'igm_sand', n_field=78, description="Clayey SAND with gravel (SC)"))
|
|
54
|
+
|
|
55
|
+
# 22.50 - 24.00m: DARK BROWN Silty SAND with gravel (SM) - 击数 89/20cm,取等效 N=60
|
|
56
|
+
BH25.add_layer(SoilLayer(22.5, 24.0, 'igm_sand', n_field=60, description="Silty SAND with gravel (SM)"))
|
|
57
|
+
|
|
58
|
+
# 24.00 - 25.50m: DARK BROWN Silty SAND (SM) - 击数 50/12cm,取等效 N=60
|
|
59
|
+
BH25.add_layer(SoilLayer(24.0, 25.5, 'igm_sand', n_field=60, description="Silty SAND (SM)"))
|
|
60
|
+
|
|
61
|
+
# 25.50 - 27.00m: DARK BROWN Clayey SAND with gravel (SC) - 击数 95/20cm,取等效 N=60
|
|
62
|
+
BH25.add_layer(SoilLayer(25.5, 27.0, 'igm_sand', n_field=60, description="Clayey SAND with gravel (SC)"))
|
|
63
|
+
|
|
64
|
+
# 27.00 - 28.50m: DARK BROWN Silty SAND (SM) - 击数 50/10cm,取等效 N=60
|
|
65
|
+
BH25.add_layer(SoilLayer(27.0, 28.5, 'igm_sand', n_field=60, description="Silty SAND (SM)"))
|
|
66
|
+
|
|
67
|
+
# 28.50 - 29.78m: DARK BROWN Clayey SAND with gravel (SC) - 击数 50/8cm,孔底深度29.78m,取等效 N=60
|
|
68
|
+
BH25.add_layer(SoilLayer(28.5, 29.78, 'igm_sand', n_field=60, description="Clayey SAND with gravel (SC)"))
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
from pypile.configs import EquipmentConfig, AnalysisConfig
|
|
2
|
+
from pypile.core import SoilLayer, Borehole, Pile
|
|
3
|
+
from pypile.solver import LRFDSolver
|
|
4
|
+
|
|
5
|
+
from BH25 import BH25
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def run_analysis():
|
|
9
|
+
# 4. 运行
|
|
10
|
+
pile = Pile(diameter=2.5, length=45)
|
|
11
|
+
solver = LRFDSolver(pile, BH25, config=AnalysisConfig())
|
|
12
|
+
result = solver.solve()
|
|
13
|
+
|
|
14
|
+
print(f"Capacity: {result['total_factored']:.2f} kN")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
if __name__ == "__main__":
|
|
18
|
+
run_analysis()
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from pypile.configs import AnalysisConfig
|
|
2
|
+
from pypile.core import SoilLayer, Borehole, Pile
|
|
3
|
+
import pandas as pd
|
|
4
|
+
|
|
5
|
+
def run_analysis():
|
|
6
|
+
# 1. 规范版本
|
|
7
|
+
rules = AnalysisConfig(ver=2024)
|
|
8
|
+
# 2. 桩基配置
|
|
9
|
+
pile = Pile(diameter=2.5, length=30.0, casing_length=15.0, casing_rf=0.6)
|
|
10
|
+
# 3. 钻孔
|
|
11
|
+
bh = Borehole(analys_config=rules, water_table_depth=0.0, hammer_energy_ratio=0.60, pile=pile)
|
|
12
|
+
bh.add_layer(SoilLayer(1, 0, 1, 'sand', n_field=2, unit_weight=18))
|
|
13
|
+
bh.add_layer(SoilLayer(2, 1, 2, 'sand', n_field=2, unit_weight=18))
|
|
14
|
+
bh.add_layer(SoilLayer(3, 2, 3, 'clay', n_field=3, unit_weight=16, su=18))
|
|
15
|
+
bh.add_layer(SoilLayer(4, 3, 4, 'sand', n_field=3, unit_weight=18))
|
|
16
|
+
bh.add_layer(SoilLayer(5, 4, 5, 'sand', n_field=3, unit_weight=18))
|
|
17
|
+
bh.add_layer(SoilLayer(6, 5, 6, 'clay', n_field=6, unit_weight=16, su=36))
|
|
18
|
+
for tep in range(30):
|
|
19
|
+
bh.add_layer(SoilLayer(7 + tep, 6 + tep, 7 + tep, 'sand', n_field=50, unit_weight=19))
|
|
20
|
+
|
|
21
|
+
df1 = bh.report_layers()
|
|
22
|
+
df2 = bh.report_compress_result()
|
|
23
|
+
|
|
24
|
+
file_path = 'ResBH29-D2.5.xlsx'
|
|
25
|
+
with pd.ExcelWriter(file_path, engine='xlsxwriter') as writer:
|
|
26
|
+
# 将 df1 写入名为 'Layers' 的 sheet 中
|
|
27
|
+
df1.to_excel(writer, sheet_name='Layers', index=False)
|
|
28
|
+
# 将 df2 写入名为 'Compress_Result' 的 sheet 中
|
|
29
|
+
df2.to_excel(writer, sheet_name='Compress_Result', index=False)
|
|
30
|
+
print(f"数据已成功保存至 {file_path}")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
if __name__ == "__main__":
|
|
34
|
+
run_analysis()
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from pypile.configs import AnalysisConfig
|
|
2
|
+
from pypile.core import SoilLayer, Borehole, Pile
|
|
3
|
+
import pandas as pd
|
|
4
|
+
|
|
5
|
+
def run_analysis():
|
|
6
|
+
# 1. 规范版本
|
|
7
|
+
rules = AnalysisConfig(ver=2024)
|
|
8
|
+
# 2. 桩基配置
|
|
9
|
+
pile = Pile(diameter=2.5, length=30.0, casing_length=15.0, casing_rf=0.6)
|
|
10
|
+
# 3. 钻孔
|
|
11
|
+
bh = Borehole(analys_config=rules, water_table_depth=0.0, hammer_energy_ratio=0.60, pile=pile)
|
|
12
|
+
bh.add_layer(SoilLayer(1, 0, 1, 'sand', n_field=2, unit_weight=18))
|
|
13
|
+
bh.add_layer(SoilLayer(2, 1, 2, 'sand', n_field=2, unit_weight=18))
|
|
14
|
+
bh.add_layer(SoilLayer(3, 2, 3, 'clay', n_field=3, unit_weight=16, su=18))
|
|
15
|
+
bh.add_layer(SoilLayer(4, 3, 4, 'sand', n_field=3, unit_weight=18))
|
|
16
|
+
bh.add_layer(SoilLayer(5, 4, 5, 'sand', n_field=3, unit_weight=18))
|
|
17
|
+
bh.add_layer(SoilLayer(6, 5, 6, 'clay', n_field=6, unit_weight=16, su=36))
|
|
18
|
+
for tep in range(30):
|
|
19
|
+
bh.add_layer(SoilLayer(7 + tep, 6 + tep, 7 + tep, 'sand', n_field=50, unit_weight=19))
|
|
20
|
+
|
|
21
|
+
df1 = bh.report_layers()
|
|
22
|
+
df2 = bh.report_compress_result()
|
|
23
|
+
|
|
24
|
+
file_path = 'ResBH29-D2.5.xlsx'
|
|
25
|
+
with pd.ExcelWriter(file_path, engine='xlsxwriter') as writer:
|
|
26
|
+
# 将 df1 写入名为 'Layers' 的 sheet 中
|
|
27
|
+
df1.to_excel(writer, sheet_name='Layers', index=False)
|
|
28
|
+
# 将 df2 写入名为 'Compress_Result' 的 sheet 中
|
|
29
|
+
df2.to_excel(writer, sheet_name='Compress_Result', index=False)
|
|
30
|
+
print(f"数据已成功保存至 {file_path}")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
if __name__ == "__main__":
|
|
34
|
+
run_analysis()
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
pypiles-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pypiles
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: AASHTO LRFD Drilled Shaft Analysis Tool
|
|
5
|
+
Author-email: Bill HU <billhu0228@icloud.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/billhu0228/PyPile
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/billhu0228/PyPile/issues
|
|
8
|
+
Keywords: geotechnical,piles,drilled shafts,AASHTO,LRFD
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
13
|
+
Requires-Python: >=3.8
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# PyPile: AASHTO LRFD Drilled Shaft Analysis
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+

|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
**PyPile** 是一个模块化、面向对象的 Python 库,专门用于按照 **AASHTO LRFD Bridge Design Specifications (9th Edition)** 和 **FHWA-NHI-10-016** 标准计算钻孔灌注桩(Drilled Shafts / Bored Piles)的轴向承载力。
|
|
23
|
+
|
|
24
|
+
该项目旨在为岩土工程师提供一个透明、可扩展且自动化的计算工具,替代繁琐且容易出错的 Excel 表格。
|
|
25
|
+
|
|
26
|
+
## 🚀 主要特性 (Key Features)
|
|
27
|
+
|
|
28
|
+
* **规范合规 (Code Compliance):** 严格遵循 AASHTO LRFD 规范,内置抗力系数 ($\varphi$) 和极限阻力限制 (Limits)。
|
|
29
|
+
* **多地层处理 (Multi-Layer Stratigraphy):** 支持复杂的“上软下硬”地层、夹层以及地下水位影响。
|
|
30
|
+
* **自动化参数关联 (Auto-Correlations):**
|
|
31
|
+
* 自动将野外 SPT $N$ 值修正为 $N_{60}$。
|
|
32
|
+
* 基于 $N$ 值自动估算土体重度 ($\gamma$)、内摩擦角 ($\phi'$) 和不排水抗剪强度 ($S_u$)。
|
|
33
|
+
* **高级算法 (Advanced Solvers):**
|
|
34
|
+
* **黏土 (Clay):** $\alpha$-Method (Total Stress).
|
|
35
|
+
* **砂土 (Sand):** $\beta$-Method (Effective Stress).
|
|
36
|
+
* **中间岩土材料 (IGM):** 针对 $N > 50$ 的极密实土层或软岩的特殊处理逻辑。
|
|
37
|
+
* **模块化架构:** 易于扩展新的计算方法或集成到更大的 Web/Desktop 应用中。
|
|
38
|
+
|
|
39
|
+
## 📦 安装 (Installation)
|
|
40
|
+
|
|
41
|
+
目前 PyPile 处于开发阶段,建议通过克隆仓库进行本地安装:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
git clone [https://github.com/yourusername/pypile.git](https://github.com/yourusername/pypile.git)
|
|
45
|
+
cd pypile
|
|
46
|
+
|
|
47
|
+
# (可选) 创建虚拟环境
|
|
48
|
+
python -m venv venv
|
|
49
|
+
source venv/bin/activate # Windows: venv\Scripts\activate
|
|
50
|
+
|
|
51
|
+
# 安装依赖 (如果有)
|
|
52
|
+
pip install -r requirements.txt
|
pypiles-0.3.0/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# PyPile: AASHTO LRFD Drilled Shaft Analysis
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
**PyPile** 是一个模块化、面向对象的 Python 库,专门用于按照 **AASHTO LRFD Bridge Design Specifications (9th Edition)** 和 **FHWA-NHI-10-016** 标准计算钻孔灌注桩(Drilled Shafts / Bored Piles)的轴向承载力。
|
|
8
|
+
|
|
9
|
+
该项目旨在为岩土工程师提供一个透明、可扩展且自动化的计算工具,替代繁琐且容易出错的 Excel 表格。
|
|
10
|
+
|
|
11
|
+
## 🚀 主要特性 (Key Features)
|
|
12
|
+
|
|
13
|
+
* **规范合规 (Code Compliance):** 严格遵循 AASHTO LRFD 规范,内置抗力系数 ($\varphi$) 和极限阻力限制 (Limits)。
|
|
14
|
+
* **多地层处理 (Multi-Layer Stratigraphy):** 支持复杂的“上软下硬”地层、夹层以及地下水位影响。
|
|
15
|
+
* **自动化参数关联 (Auto-Correlations):**
|
|
16
|
+
* 自动将野外 SPT $N$ 值修正为 $N_{60}$。
|
|
17
|
+
* 基于 $N$ 值自动估算土体重度 ($\gamma$)、内摩擦角 ($\phi'$) 和不排水抗剪强度 ($S_u$)。
|
|
18
|
+
* **高级算法 (Advanced Solvers):**
|
|
19
|
+
* **黏土 (Clay):** $\alpha$-Method (Total Stress).
|
|
20
|
+
* **砂土 (Sand):** $\beta$-Method (Effective Stress).
|
|
21
|
+
* **中间岩土材料 (IGM):** 针对 $N > 50$ 的极密实土层或软岩的特殊处理逻辑。
|
|
22
|
+
* **模块化架构:** 易于扩展新的计算方法或集成到更大的 Web/Desktop 应用中。
|
|
23
|
+
|
|
24
|
+
## 📦 安装 (Installation)
|
|
25
|
+
|
|
26
|
+
目前 PyPile 处于开发阶段,建议通过克隆仓库进行本地安装:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
git clone [https://github.com/yourusername/pypile.git](https://github.com/yourusername/pypile.git)
|
|
30
|
+
cd pypile
|
|
31
|
+
|
|
32
|
+
# (可选) 创建虚拟环境
|
|
33
|
+
python -m venv venv
|
|
34
|
+
source venv/bin/activate # Windows: venv\Scripts\activate
|
|
35
|
+
|
|
36
|
+
# 安装依赖 (如果有)
|
|
37
|
+
pip install -r requirements.txt
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# pypile/constants.py
|
|
2
|
+
|
|
3
|
+
G = 9.81 # 重力加速度
|
|
4
|
+
WATER_UNIT_WEIGHT = 9.81 # kN/m3
|
|
5
|
+
PA = 100.0 # 大气压 kPa
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# AASHTO LRFD Limits
|
|
9
|
+
# Ref: AASHTO LRFD 9th Ed, Art. 10.8.3.5.2b (Eq. 10.8.3.5.2b-1)
|
|
10
|
+
MAX_SIDE_RESISTANCE = 192.0 # kPa (limit for Beta method)
|
|
11
|
+
MAX_TIP_RESISTANCE_SAND = 3000.0 # kPa (limit for sand without load test)
|
|
12
|
+
|
|
13
|
+
# Resistance Factors (Phi) - Table 10.5.5.2.4-1
|
|
14
|
+
PHI_SIDE_CLAY = 0.45
|
|
15
|
+
PHI_SIDE_SAND = 0.55
|
|
16
|
+
PHI_TIP_CLAY = 0.40
|
|
17
|
+
PHI_TIP_SAND = 0.50
|
|
18
|
+
PHI_IGM = 0.60
|
pypiles-0.3.0/main.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from pypile.configs import EquipmentConfig, AnalysisConfig
|
|
2
|
+
from pypile.core import SoilLayer, Borehole, Pile
|
|
3
|
+
from pypile.solver import LRFDSolver
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def run_analysis():
|
|
7
|
+
# 1. 定义设备 (Define Equipment)
|
|
8
|
+
# 这台钻机是 Automatic Hammer (ER=90%)
|
|
9
|
+
rig_alpha = EquipmentConfig(hammer_energy_ratio=0.90)
|
|
10
|
+
|
|
11
|
+
# 2. 定义钻孔 (Define Borehole with that Equipment)
|
|
12
|
+
# 当 layer 被 add 进去时,N60 就已经被算出并固定了
|
|
13
|
+
bh = Borehole(water_table_depth=0.0, equipment=rig_alpha)
|
|
14
|
+
|
|
15
|
+
bh.add_layer(SoilLayer(0, 5, 'sand', n_field=10))
|
|
16
|
+
# ^ 此时 layer 内部: n60 = 10 * (0.9/0.6) = 15.0
|
|
17
|
+
|
|
18
|
+
# 3. 定义计算规则 (Define Analysis Rules)
|
|
19
|
+
# 使用标准 AASHTO 规范
|
|
20
|
+
aashto_rules = AnalysisConfig()
|
|
21
|
+
|
|
22
|
+
# 4. 运行
|
|
23
|
+
pile = Pile(diameter=1.0, length=10.0)
|
|
24
|
+
solver = LRFDSolver(pile, bh, config=aashto_rules)
|
|
25
|
+
result = solver.solve()
|
|
26
|
+
|
|
27
|
+
print(f"Capacity: {result['total_factored']:.2f} kN")
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
if __name__ == "__main__":
|
|
31
|
+
run_analysis()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bill HU
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from .core import SoilLayer, Borehole, Pile
|
|
2
|
+
from .configs import AnalysisConfig
|
|
3
|
+
from .solver import LRFDSolver
|
|
4
|
+
|
|
5
|
+
# --- 智能版本号处理 ---
|
|
6
|
+
try:
|
|
7
|
+
# 尝试读取 setuptools_scm 自动生成的文件
|
|
8
|
+
from ._version import version as __version__
|
|
9
|
+
except ImportError:
|
|
10
|
+
# 如果文件不存在(比如你刚 clone 下来,还没 pip install),
|
|
11
|
+
# 或者你在纯源码模式下开发,
|
|
12
|
+
# 我们给它一个默认的开发占位符,防止代码报错。
|
|
13
|
+
__version__ = "0.0.0.dev0+unknown"
|
|
14
|
+
|
|
15
|
+
__all__ = [
|
|
16
|
+
"SoilLayer",
|
|
17
|
+
"Borehole",
|
|
18
|
+
"Pile",
|
|
19
|
+
"AnalysisConfig",
|
|
20
|
+
"LRFDSolver",
|
|
21
|
+
"__version__"
|
|
22
|
+
]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# file generated by vcs-versioning
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"__version__",
|
|
7
|
+
"__version_tuple__",
|
|
8
|
+
"version",
|
|
9
|
+
"version_tuple",
|
|
10
|
+
"__commit_id__",
|
|
11
|
+
"commit_id",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
version: str
|
|
15
|
+
__version__: str
|
|
16
|
+
__version_tuple__: tuple[int | str, ...]
|
|
17
|
+
version_tuple: tuple[int | str, ...]
|
|
18
|
+
commit_id: str | None
|
|
19
|
+
__commit_id__: str | None
|
|
20
|
+
|
|
21
|
+
__version__ = version = '0.3.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 3, 0)
|
|
23
|
+
|
|
24
|
+
__commit_id__ = commit_id = 'g102510cf9'
|