delta-theory 8.0.0__tar.gz → 8.1.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. delta_theory-8.1.1/PKG-INFO +451 -0
  2. delta_theory-8.1.1/README.md +404 -0
  3. delta_theory-8.1.1/core/__main__.py +290 -0
  4. {delta_theory-8.0.0 → delta_theory-8.1.1}/core/unified_yield_fatigue_v6_9.py +55 -11
  5. delta_theory-8.1.1/delta_theory.egg-info/PKG-INFO +451 -0
  6. {delta_theory-8.0.0 → delta_theory-8.1.1}/delta_theory.egg-info/SOURCES.txt +1 -0
  7. {delta_theory-8.0.0 → delta_theory-8.1.1}/pyproject.toml +1 -1
  8. delta_theory-8.0.0/PKG-INFO +0 -640
  9. delta_theory-8.0.0/README.md +0 -593
  10. delta_theory-8.0.0/delta_theory.egg-info/PKG-INFO +0 -640
  11. {delta_theory-8.0.0 → delta_theory-8.1.1}/LICENSE +0 -0
  12. {delta_theory-8.0.0 → delta_theory-8.1.1}/apps/__init__.py +0 -0
  13. {delta_theory-8.0.0 → delta_theory-8.1.1}/apps/delta_fatigue_app.py +0 -0
  14. {delta_theory-8.0.0 → delta_theory-8.1.1}/core/Universal_Lindemann.py +0 -0
  15. {delta_theory-8.0.0 → delta_theory-8.1.1}/core/__init__.py +0 -0
  16. {delta_theory-8.0.0 → delta_theory-8.1.1}/core/dbt_unified.py +0 -0
  17. {delta_theory-8.0.0 → delta_theory-8.1.1}/core/fatigue_redis_api.py +0 -0
  18. {delta_theory-8.0.0 → delta_theory-8.1.1}/core/materials.py +0 -0
  19. {delta_theory-8.0.0 → delta_theory-8.1.1}/core/unified_flc_v7.py +0 -0
  20. {delta_theory-8.0.0 → delta_theory-8.1.1}/delta_theory.egg-info/dependency_links.txt +0 -0
  21. {delta_theory-8.0.0 → delta_theory-8.1.1}/delta_theory.egg-info/entry_points.txt +0 -0
  22. {delta_theory-8.0.0 → delta_theory-8.1.1}/delta_theory.egg-info/requires.txt +0 -0
  23. {delta_theory-8.0.0 → delta_theory-8.1.1}/delta_theory.egg-info/top_level.txt +0 -0
  24. {delta_theory-8.0.0 → delta_theory-8.1.1}/setup.cfg +0 -0
  25. {delta_theory-8.0.0 → delta_theory-8.1.1}/tests/test_core.py +0 -0
@@ -0,0 +1,451 @@
1
+ Metadata-Version: 2.4
2
+ Name: delta-theory
3
+ Version: 8.1.1
4
+ Summary: Unified materials strength and fatigue prediction based on geometric first principles
5
+ Author: Tamaki
6
+ Author-email: Masamichi Iizumi <m.iizumi@miosync.email>
7
+ Maintainer-email: Masamichi Iizumi <m.iizumi@miosync.email>
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/miosync/delta-theory
10
+ Project-URL: Documentation, https://github.com/miosync/delta-theory#readme
11
+ Project-URL: Repository, https://github.com/miosync/delta-theory.git
12
+ Project-URL: Issues, https://github.com/miosync/delta-theory/issues
13
+ Project-URL: Changelog, https://github.com/miosync/delta-theory/blob/main/CHANGELOG.md
14
+ Keywords: materials-science,fatigue,yield-strength,crystallography,delta-theory,physics,mechanical-engineering
15
+ Classifier: Development Status :: 4 - Beta
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: License :: OSI Approved :: MIT License
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Topic :: Scientific/Engineering :: Physics
25
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
26
+ Requires-Python: >=3.9
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ Requires-Dist: numpy>=1.20.0
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
32
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
33
+ Requires-Dist: black>=23.0.0; extra == "dev"
34
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
35
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
36
+ Provides-Extra: analysis
37
+ Requires-Dist: scipy>=1.9.0; extra == "analysis"
38
+ Requires-Dist: pandas>=1.5.0; extra == "analysis"
39
+ Requires-Dist: matplotlib>=3.6.0; extra == "analysis"
40
+ Provides-Extra: validation
41
+ Requires-Dist: upstash-redis>=1.0.0; extra == "validation"
42
+ Provides-Extra: app
43
+ Requires-Dist: streamlit>=1.20.0; extra == "app"
44
+ Provides-Extra: all
45
+ Requires-Dist: delta-theory[analysis,app,dev,validation]; extra == "all"
46
+ Dynamic: license-file
47
+
48
+ # δ-Theory: Unified Materials Strength & Fatigue Framework
49
+
50
+ <div align="center">
51
+
52
+ **"Nature is Geometry"** — Predicting material properties from geometric first principles
53
+
54
+ [![PyPI](https://img.shields.io/pypi/v/delta-theory.svg)](https://pypi.org/project/delta-theory/)
55
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
56
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
57
+ [![Version](https://img.shields.io/badge/version-8.0.0-green.svg)](CHANGELOG.md)
58
+ [![codecov](https://codecov.io/gh/miosync/delta-theory/branch/main/graph/badge.svg)](https://codecov.io/gh/miosync/delta-theory)
59
+
60
+ </div>
61
+
62
+ ---
63
+
64
+ ## 🎯 Overview
65
+
66
+ δ-Theory is a unified framework that predicts material properties from **crystal structure geometry**. Unlike traditional empirical fitting approaches, it derives material behavior from physical first principles.
67
+
68
+ ### Core Equation
69
+
70
+ $$\Lambda = \frac{K}{|V|_{\text{eff}}}$$
71
+
72
+ - **K**: Destructive energy density (stress, thermal, electromagnetic, etc.)
73
+ - **|V|_eff**: Effective cohesive energy density (bond strength)
74
+ - **Λ = 1**: Critical condition (fracture / phase transition)
75
+
76
+ ### What Can δ-Theory Predict?
77
+
78
+ | Module | Predicts | Key Parameters | Accuracy |
79
+ |--------|----------|----------------|----------|
80
+ | **v5.0** | Yield stress σ_y | f_d, E_bond, crystal geometry | 2.6% |
81
+ | **v6.10** | Fatigue life N | r_th (BCC=0.65, FCC=0.02, HCP=0.20) | 4-7% |
82
+ | **v7.2** | Forming Limit Curve FLC(β) | Free volume consumption | 2.7% |
83
+ | **v8.0** | Post-forming fatigue life | η_forming → r_th_eff | — |
84
+ | **DBT** | Ductile-Brittle Transition | Grain size, segregation | — |
85
+
86
+ ---
87
+
88
+ ## 📦 Installation
89
+
90
+ ```bash
91
+ pip install delta-theory
92
+ ```
93
+
94
+ ### From Source
95
+
96
+ ```bash
97
+ git clone https://github.com/miosync/delta-theory.git
98
+ cd delta-theory
99
+ pip install -e .
100
+ ```
101
+
102
+ ---
103
+
104
+ ## 🚀 Quick Start
105
+
106
+ ### Yield Stress
107
+
108
+ ```python
109
+ from core import calc_sigma_y, MATERIALS
110
+
111
+ mat = MATERIALS['Fe']
112
+ result = calc_sigma_y(mat, T_K=300)
113
+ print(f"σ_y = {result['sigma_y']:.1f} MPa")
114
+ ```
115
+
116
+ ### Fatigue Life
117
+
118
+ ```python
119
+ from core import fatigue_life_const_amp, MATERIALS
120
+
121
+ result = fatigue_life_const_amp(
122
+ MATERIALS['Fe'],
123
+ sigma_a_MPa=150,
124
+ sigma_y_tension_MPa=200,
125
+ )
126
+ print(f"N_fail = {result['N_fail']:.2e} cycles")
127
+ ```
128
+
129
+ ### FLC Prediction (NEW in v8.0!)
130
+
131
+ ```python
132
+ from core import FLCPredictor
133
+
134
+ flc = FLCPredictor()
135
+ for beta in [-0.5, 0.0, 1.0]:
136
+ Em = flc.predict(beta, 'SPCC')
137
+ print(f"β={beta:+.1f}: FLC = {Em:.3f}")
138
+ ```
139
+
140
+ ### Forming-Fatigue Integration (NEW in v8.0!)
141
+
142
+ ```python
143
+ from core import FormingFatigueIntegrator
144
+
145
+ integrator = FormingFatigueIntegrator()
146
+
147
+ # After 40% free volume consumption from forming:
148
+ r_th_eff = integrator.effective_r_th(eta_forming=0.40, structure='BCC')
149
+ print(f"r_th: 0.65 → {r_th_eff:.3f}") # Fatigue threshold drops!
150
+ ```
151
+
152
+ ---
153
+
154
+ ## 📦 Repository Structure
155
+
156
+ ```
157
+ delta-theory/
158
+ ├── core/ # 🔧 Main modules
159
+ │ ├── unified_yield_fatigue_v6_9.py # Unified yield + fatigue model
160
+ │ ├── unified_flc_v7.py # ★ FLC + Forming-Fatigue (NEW!)
161
+ │ ├── dbt_unified.py # DBT/DBTT prediction model
162
+ │ ├── materials.py # Materials database
163
+ │ └── fatigue_redis_api.py # FatigueData-AM2022 API
164
+
165
+ ├── apps/ # 🖥️ Applications
166
+ │ └── delta_fatigue_app.py # Streamlit Web App
167
+
168
+ ├── examples/ # 📚 Usage examples
169
+ └── tests/ # 🧪 Tests
170
+ ```
171
+
172
+ ---
173
+
174
+ ## 🔬 Core Modules
175
+
176
+ ### 1. unified_yield_fatigue_v6_9.py
177
+
178
+ **Unified v5.0 yield stress + v6.8 fatigue damage model**
179
+
180
+ #### Yield Model (v5.0)
181
+
182
+ $$\sigma_y = \sigma_{\text{base}}(\delta) + \Delta\sigma_{\text{ss}}(c) + \Delta\sigma_\rho(\varepsilon) + \Delta\sigma_{\text{ppt}}(r, f)$$
183
+
184
+ | Component | Description | Accuracy |
185
+ |-----------|-------------|----------|
186
+ | σ_base | δ-theory base strength | Pure metals: 2.6% |
187
+ | Δσ_ss | Solid solution strengthening | 1-2% |
188
+ | Δσ_ρ | Work hardening (Taylor) | 4-7% |
189
+ | Δσ_ppt | Precipitation strengthening (auto-switch) | Cutting/Orowan |
190
+
191
+ #### Fatigue Model (v6.10)
192
+
193
+ $$\frac{dD}{dN} = \begin{cases} 0 & (r \leq r_{th}) \\ A_{\text{eff}} \cdot (r - r_{th})^n & (r > r_{th}) \end{cases}$$
194
+
195
+ **Structure Presets (No Fitting Required):**
196
+
197
+ | Structure | r_th | n | Fatigue Limit | Representative Materials |
198
+ |-----------|------|---|---------------|--------------------------|
199
+ | BCC | 0.65 | 10 | ✅ Clear | Fe, W, Mo |
200
+ | FCC | 0.02 | 7 | ❌ None | Cu, Al, Ni |
201
+ | HCP | 0.20 | 9 | △ Intermediate | Ti, Mg, Zn |
202
+
203
+ ---
204
+
205
+ ### 2. unified_flc_v7.py (NEW in v8.0!)
206
+
207
+ **FLC Prediction + Forming-Fatigue Integration**
208
+
209
+ #### FLC Model (v7.2)
210
+
211
+ $$\text{FLC}(\beta) = \text{FLC}_0^{\text{pure}} \times (1 - \eta_{\text{total}}) \times h(\beta, R, \tau/\sigma)$$
212
+
213
+ | Parameter | Description |
214
+ |-----------|-------------|
215
+ | FLC₀_pure | Pure metal formability from δ-theory |
216
+ | η_total | Free volume consumed by strengthening mechanisms |
217
+ | h(β) | V-shape factor from multiaxial stress state |
218
+ | R | Compression/tension ratio (twin effect for HCP) |
219
+ | τ/σ | Shear/tension ratio |
220
+
221
+ **Free Volume Consumption:**
222
+
223
+ ```
224
+ η_total = η_ss + η_ppt + η_wh + η_HP
225
+ = k_ss×C_ss + k_ppt×f_ppt + k_wh×log(ρ/ρ_ref) + k_HP×(√(d_ref/d)-1)
226
+ ```
227
+
228
+ **Why SPCC vs DP590 have different FLC:**
229
+
230
+ | Material | Free Volume Remaining | FLC₀ |
231
+ |----------|----------------------|------|
232
+ | SPCC | 90.6% | 0.25 |
233
+ | DP590 | 71.4% | 0.20 |
234
+
235
+ #### Forming-Fatigue Integration (v8.0)
236
+
237
+ **Revolutionary insight:** Forming consumes free volume → Less available for fatigue!
238
+
239
+ $$r_{th}^{\text{eff}} = r_{th}^{\text{virgin}} \times (1 - \eta_{\text{forming}})$$
240
+
241
+ | η_forming | r_th_eff (BCC) | Implication |
242
+ |-----------|----------------|-------------|
243
+ | 0% | 0.65 | Virgin material |
244
+ | 20% | 0.52 | Some forming |
245
+ | 40% | 0.39 | Heavy forming |
246
+ | 60% | 0.26 | Severe forming |
247
+
248
+ **Critical η:** The forming level where "infinite life" becomes "finite life"
249
+
250
+ ```python
251
+ from core import critical_forming_consumption
252
+
253
+ eta_crit = critical_forming_consumption(r_applied=0.50, structure='BCC')
254
+ print(f"η_critical = {eta_crit*100:.1f}%") # → 23.1%
255
+ ```
256
+
257
+ ---
258
+
259
+ ### 3. dbt_unified.py
260
+
261
+ **Unified Ductile-Brittle Transition Temperature (DBTT) Prediction Model**
262
+
263
+ | View | Fixed Axis | Solve For | Use Case |
264
+ |------|------------|-----------|----------|
265
+ | View 1 | Temperature T | Grain size d* | Ductile window detection |
266
+ | View 2 | Grain size d | Temperature T* | DBTT prediction |
267
+ | View 3 | d, T | Time t | Segregation evolution |
268
+
269
+ ```python
270
+ from core import DBTUnified
271
+
272
+ model = DBTUnified()
273
+ result = model.temp_view.find_DBTT(d=30e-6, c=0.005)
274
+ print(f"DBTT = {result['T_star']:.0f} K")
275
+ ```
276
+
277
+ ---
278
+
279
+ ## ⌨️ CLI Reference
280
+
281
+ ### Yield & Fatigue
282
+
283
+ ```bash
284
+ # Single point calculation
285
+ python -m core.unified_yield_fatigue_v6_9 point --metal Fe --sigma_a 150
286
+
287
+ # Generate S-N curve
288
+ python -m core.unified_yield_fatigue_v6_9 sn --metal Fe --sigma_min 100 --sigma_max 300
289
+
290
+ # Calibrate A_ext
291
+ python -m core.unified_yield_fatigue_v6_9 calibrate --metal Fe --sigma_a 244 --N_fail 7.25e7
292
+ ```
293
+
294
+ ### FLC (NEW!)
295
+
296
+ ```bash
297
+ # Single material FLC
298
+ python3 -c "
299
+ from core import FLCPredictor
300
+ flc = FLCPredictor()
301
+ for b in [-0.5, -0.25, 0, 0.25, 0.5, 1.0]:
302
+ print(f'β={b:+.2f}: {flc.predict(b, \"SPCC\"):.3f}')
303
+ "
304
+
305
+ # Quick FLC value
306
+ python3 -c "from core import predict_flc; print(predict_flc('SPCC', 0.0))"
307
+
308
+ # Forming-fatigue analysis
309
+ python3 -c "
310
+ from core import FormingFatigueIntegrator
311
+ integrator = FormingFatigueIntegrator()
312
+ for eta in [0.0, 0.2, 0.4, 0.6]:
313
+ r_th = integrator.effective_r_th(eta, 'BCC')
314
+ print(f'η={eta:.0%}: r_th_eff = {r_th:.3f}')
315
+ "
316
+
317
+ # Critical η calculation
318
+ python3 -c "
319
+ from core import critical_forming_consumption
320
+ for r in [0.3, 0.4, 0.5, 0.6]:
321
+ eta = critical_forming_consumption(r, 'BCC')
322
+ print(f'r={r:.1f}: η_critical = {eta*100:.1f}%')
323
+ "
324
+ ```
325
+
326
+ ### DBT
327
+
328
+ ```bash
329
+ # Single point calculation
330
+ python -m core.dbt_unified point --d 30 --c 0.5 --T 300
331
+
332
+ # Temperature axis analysis (DBTT)
333
+ python -m core.dbt_unified T_axis --d 30 --c 0.5
334
+
335
+ # Grain size axis analysis (ductile window)
336
+ python -m core.dbt_unified d_axis --T 300 --c 0.5 --find_c_crit
337
+ ```
338
+
339
+ ---
340
+
341
+ ## 📊 Validation Data
342
+
343
+ ### FatigueData-AM2022 (Upstash Redis)
344
+
345
+ Instant access to 1.49M fatigue data points:
346
+
347
+ ```python
348
+ from core import FatigueDB
349
+
350
+ db = FatigueDB()
351
+ ti64 = db.get_sn_for_delta('Ti-6Al-4V', R=-1.0)
352
+
353
+ # δ-theory validation
354
+ for point in ti64:
355
+ r = point['r'] # = σ_a / σ_y
356
+ if r <= 0.20: # HCP r_th
357
+ assert point['runout'], "Should be runout below r_th"
358
+ ```
359
+
360
+ **Data Scale:**
361
+ - 116 materials
362
+ - S-N: 15,146 points
363
+ - ε-N: 1,840 points
364
+ - da/dN: 1,472,923 points
365
+
366
+ ---
367
+
368
+ ## 🖥️ Web Application
369
+
370
+ ```bash
371
+ cd apps
372
+ streamlit run delta_fatigue_app.py
373
+ ```
374
+
375
+ Features:
376
+ - 📈 S-N curve prediction (multi-material comparison)
377
+ - 🎯 A_ext one-point calibration
378
+ - 📚 Theory explanation
379
+
380
+ ---
381
+
382
+ ## 🧪 Testing
383
+
384
+ ```bash
385
+ pytest tests/ -v
386
+ ```
387
+
388
+ ---
389
+
390
+ ## 📖 Theory Background
391
+
392
+ ### Why "δ-Theory"?
393
+
394
+ **δ_L (Lindemann Parameter)** — The critical ratio of atomic displacement at melting point. This purely geometric parameter unifies explanations from material strength to fatigue limits.
395
+
396
+ ### Key Insights
397
+
398
+ 1. **Materials = Highly Viscous Fluids** — Deformation is "flow", not "fracture"
399
+ 2. **Fatigue Limits = Geometric Consequence of Crystal Structure** — BCC/FCC/HCP differences emerge naturally
400
+ 3. **Free Volume = Shared Resource** — Strength, ductility, and fatigue compete for the same "余白"
401
+ 4. **Fitting Parameters ≈ 0** — Derived from crystal geometry, not curve fitting
402
+
403
+ ### Version History
404
+
405
+ | Version | Feature |
406
+ |---------|---------|
407
+ | v5.0 | Yield stress from δ-theory |
408
+ | v6.9b | Unified yield + fatigue with multiaxial |
409
+ | v6.10 | Universal fatigue validation (2472 points) |
410
+ | v7.2 | FLC from free volume consumption |
411
+ | **v8.0** | **Forming-Fatigue integration** |
412
+
413
+ ---
414
+
415
+ ## 📄 License
416
+
417
+ MIT License (Code) — See [LICENSE](LICENSE)
418
+
419
+ Data sources (FatigueData-AM2022): CC BY 4.0
420
+
421
+ ---
422
+
423
+ ## 👥 Authors
424
+
425
+ - **Masamichi Iizumi** — Miosync, Inc. CEO
426
+ - **Tamaki** — Sentient Digital Partner
427
+
428
+ ---
429
+
430
+ ## 📚 Citation
431
+
432
+ ```bibtex
433
+ @software{delta_theory_2025,
434
+ author = {Iizumi, Masamichi and Tamaki},
435
+ title = {δ-Theory: Unified Materials Strength, Fatigue, and Forming Framework},
436
+ version = {8.0.0},
437
+ year = {2025},
438
+ url = {https://github.com/miosync/delta-theory},
439
+ doi = {10.5281/zenodo.18457897}
440
+ }
441
+ ```
442
+
443
+ ---
444
+
445
+ <div align="center">
446
+
447
+ **"Nature is Geometry"** 🔬
448
+
449
+ *From yield stress to fatigue life to forming limits — all from crystal structure*
450
+
451
+ </div>