bstart-trb 0.2.0__tar.gz → 0.2.1__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 (25) hide show
  1. bstart_trb-0.2.1/PKG-INFO +153 -0
  2. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/README_PYPI.md +2 -2
  3. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/bstart_trb/__init__.py +1 -1
  4. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/pyproject.toml +14 -5
  5. bstart_trb-0.2.1/uv.lock +736 -0
  6. bstart_trb-0.2.0/PKG-INFO +0 -949
  7. bstart_trb-0.2.0/uv.lock +0 -251
  8. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/.gitignore +0 -0
  9. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/.python-version +0 -0
  10. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/BUILDING.md +0 -0
  11. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/LICENSE +0 -0
  12. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/PACKAGE_SUMMARY.md +0 -0
  13. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/PUBLISHING.md +0 -0
  14. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/README.md +0 -0
  15. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/README_EN.md +0 -0
  16. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/bstart_trb/_taper_slice.cp311-win_amd64.pyd +0 -0
  17. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/bstart_trb/_taper_slice.pyi +0 -0
  18. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/bstart_trb/libtaper_sl.J4R3HUMRYTOGZPKAVTEOISVEHZMIJTJT.gfortran-win_amd64.dll +0 -0
  19. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/bstart_trb/models.py +0 -0
  20. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/bstart_trb/py.typed +0 -0
  21. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/bstart_trb/wrapper.py +0 -0
  22. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/demo.xlsx +0 -0
  23. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/main.py +0 -0
  24. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/meson.build +0 -0
  25. {bstart_trb-0.2.0 → bstart_trb-0.2.1}/test_install.py +0 -0
@@ -0,0 +1,153 @@
1
+ Metadata-Version: 2.4
2
+ Name: bstart-trb
3
+ Version: 0.2.1
4
+ Summary: Add your description here
5
+ License-File: LICENSE
6
+ Requires-Python: >=3.11
7
+ Requires-Dist: numpy>=2.0.0
8
+ Provides-Extra: demo
9
+ Requires-Dist: openpyxl>=3.1.5; extra == 'demo'
10
+ Requires-Dist: pandas>=2.0.0; extra == 'demo'
11
+ Requires-Dist: plotly>=5.0.0; extra == 'demo'
12
+ Description-Content-Type: text/markdown
13
+
14
+ # BSTART-TRB
15
+
16
+ **Cylindrical/Tapered Roller Bearing Slice Stress Calculation Module**
17
+
18
+ A high-performance Python package for calculating contact stress distribution in roller bearings using the slice method with Fortran computational core.
19
+
20
+ ## Features
21
+
22
+ - 🚀 **Fast Fortran Core**: Compiled Fortran code via f2py for optimal performance
23
+ - 📦 **Pre-compiled Binary**: No Fortran compiler required for installation
24
+ - 🎯 **Type-Safe**: Complete type hints and IDE support
25
+ - 🔬 **Accurate**: Uses influence coefficient method based on elastic contact theory
26
+ - 📊 **Flexible**: Supports various crown types (linear, circular, logarithmic)
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ pip install bstart-trb
32
+ ```
33
+
34
+ **Note**: This package includes pre-compiled binaries for Windows (x64). Support for other platforms coming soon.
35
+
36
+ ## Quick Start
37
+
38
+ ```python
39
+ from bstart_trb import (
40
+ slice_stress,
41
+ RollerParams,
42
+ RacewayParams,
43
+ CrownType,
44
+ RacewayType,
45
+ )
46
+
47
+ # Define cylindrical roller parameters
48
+ roller = RollerParams(
49
+ d1=10.0, # Small end diameter (mm)
50
+ d2=10.0, # Large end diameter (mm)
51
+ length=9.6, # Effective length (mm)
52
+ alfa=0.0, # Half cone angle (degrees)
53
+ tilt=0.0, # Tilt angle (degrees)
54
+ crown_type=CrownType.LOGARITHMIC,
55
+ curve_q=14100.0, # Design load (N)
56
+ )
57
+
58
+ # Define outer ring raceway parameters
59
+ raceway = RacewayParams(
60
+ diameter=-150.0, # Negative for concave surface (mm)
61
+ raceway_type=RacewayType.OUTER,
62
+ fai=0.0, # Half cone angle (degrees)
63
+ )
64
+
65
+ # Calculate slice stress distribution
66
+ result = slice_stress(roller, raceway, load=1340.86, n_slice=30)
67
+
68
+ # Access results
69
+ print(f"Max stress: {result.max_stress:.0f} MPa")
70
+ print(f"Contact deflection: {result.deflection:.6f} mm")
71
+ print(f"Stress uniformity: {result.stress_uniformity:.2%}")
72
+ print(f"Contact slices: {result.contact_slices}/{result.n_slice}")
73
+ ```
74
+
75
+ ## What is Slice Calculation?
76
+
77
+ The slice method divides the roller-raceway contact into multiple slices along the roller length to accurately calculate stress distribution. This is essential for:
78
+
79
+ - Capturing edge stress concentration effects
80
+ - Analyzing the impact of crown modifications
81
+ - Predicting bearing life more accurately
82
+ - Understanding load distribution along roller length
83
+
84
+ ## Key Parameters
85
+
86
+ ### Roller Parameters
87
+
88
+ - `d1`, `d2`: Roller diameters (mm) - equal for cylindrical rollers
89
+ - `length`: Effective roller length (mm)
90
+ - `alfa`: Half cone angle (degrees) - 0 for cylindrical rollers
91
+ - `tilt`: Roller tilt angle (degrees)
92
+ - `crown_type`: Crown modification type
93
+ - `STRAIGHT`: No crown modification
94
+ - `CIRCULAR`: Circular crown
95
+ - `LOGARITHMIC`: Logarithmic crown (recommended)
96
+ - `curve_q`: Design load (N) for optimal stress distribution
97
+
98
+ ### Raceway Parameters
99
+
100
+ - `diameter`: Raceway diameter (mm) - negative for outer ring (concave)
101
+ - `raceway_type`: `INNER` or `OUTER`
102
+ - `fai`: Raceway cone angle (degrees)
103
+
104
+ ### Calculation Parameters
105
+
106
+ - `load`: Applied load on roller (N)
107
+ - `n_slice`: Number of slices (default 30, max 50)
108
+
109
+ ## Theory
110
+
111
+ This package implements the **influence coefficient method** based on elastic half-space contact theory:
112
+
113
+ 1. Discretizes roller into slices
114
+ 2. Calculates elastic coupling between slices (influence coefficient matrix)
115
+ 3. Solves linear system using Gaussian elimination
116
+ 4. Iterates to convergence for contact area and load balance
117
+
118
+ The method is more accurate than simplified Hertz formulas as it accounts for:
119
+ - Elastic coupling between slices
120
+ - Dynamic contact area determination
121
+ - Edge loading effects
122
+ - Crown modification influence
123
+
124
+ ## Requirements
125
+
126
+ - Python >= 3.11
127
+ - NumPy >= 2.0.0
128
+
129
+ ## Platform Support
130
+
131
+ | Platform | Status |
132
+ |----------|--------|
133
+ | Windows (x64) | ✅ Supported |
134
+ | Linux | 🚧 Coming soon |
135
+ | macOS | 🚧 Coming soon |
136
+
137
+ ## License
138
+
139
+ MIT License - See LICENSE file for details.
140
+
141
+ ## Author
142
+
143
+ Gu Lei
144
+
145
+ ## References
146
+
147
+ - Harris, T.A., Kotzalas, M.N. - *Rolling Bearing Analysis*, 5th Edition
148
+ - Johnson, K.L. - *Contact Mechanics*
149
+ - ISO/TS 16281:2008 - Rolling bearings calculation methods
150
+
151
+ ## Contributing
152
+
153
+ Contributions are welcome! Please feel free to submit issues or pull requests.
@@ -23,7 +23,7 @@ pip install bstart-trb
23
23
  ## Quick Start
24
24
 
25
25
  ```python
26
- from slice_wrapper import (
26
+ from bstart_trb import (
27
27
  slice_stress,
28
28
  RollerParams,
29
29
  RacewayParams,
@@ -110,7 +110,7 @@ The method is more accurate than simplified Hertz formulas as it accounts for:
110
110
 
111
111
  ## Requirements
112
112
 
113
- - Python >= 3.12
113
+ - Python >= 3.11
114
114
  - NumPy >= 2.0.0
115
115
 
116
116
  ## Platform Support
@@ -60,4 +60,4 @@ __all__ = [
60
60
  "is_fortran_available",
61
61
  ]
62
62
 
63
- __version__ = "0.2.0"
63
+ __version__ = "0.2.1"
@@ -1,14 +1,18 @@
1
1
  [project]
2
2
  name = "bstart-trb"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "Add your description here"
5
- readme = "README.md"
5
+ readme = "README_PYPI.md"
6
6
  requires-python = ">=3.11"
7
7
  dependencies = [
8
- "numpy>=2.4.2",
8
+ "numpy>=2.0.0",
9
+ ]
10
+
11
+ [project.optional-dependencies]
12
+ demo = [
9
13
  "openpyxl>=3.1.5",
10
- "pandas>=3.0.0",
11
- "plotly>=6.5.2",
14
+ "pandas>=2.0.0",
15
+ "plotly>=5.0.0",
12
16
  ]
13
17
 
14
18
  [build-system]
@@ -42,3 +46,8 @@ exclude = [
42
46
  "bstart_trb/_taper_slice/**",
43
47
  "bstart_trb/__pycache__/**",
44
48
  ]
49
+
50
+ [dependency-groups]
51
+ dev = [
52
+ "twine>=6.2.0",
53
+ ]