delta-theory 8.1.1__tar.gz → 8.2.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.
- {delta_theory-8.1.1 → delta_theory-8.2.0}/PKG-INFO +1 -1
- {delta_theory-8.1.1 → delta_theory-8.2.0}/core/__init__.py +111 -47
- {delta_theory-8.1.1 → delta_theory-8.2.0}/core/__main__.py +194 -129
- delta_theory-8.2.0/core/banners.py +283 -0
- delta_theory-8.2.0/core/unified_flc_v8_1.py +765 -0
- {delta_theory-8.1.1 → delta_theory-8.2.0}/core/unified_yield_fatigue_v6_9.py +2 -63
- {delta_theory-8.1.1 → delta_theory-8.2.0}/delta_theory.egg-info/PKG-INFO +1 -1
- {delta_theory-8.1.1 → delta_theory-8.2.0}/delta_theory.egg-info/SOURCES.txt +2 -1
- {delta_theory-8.1.1 → delta_theory-8.2.0}/pyproject.toml +1 -1
- delta_theory-8.1.1/core/unified_flc_v7.py +0 -727
- {delta_theory-8.1.1 → delta_theory-8.2.0}/LICENSE +0 -0
- {delta_theory-8.1.1 → delta_theory-8.2.0}/README.md +0 -0
- {delta_theory-8.1.1 → delta_theory-8.2.0}/apps/__init__.py +0 -0
- {delta_theory-8.1.1 → delta_theory-8.2.0}/apps/delta_fatigue_app.py +0 -0
- {delta_theory-8.1.1 → delta_theory-8.2.0}/core/Universal_Lindemann.py +0 -0
- {delta_theory-8.1.1 → delta_theory-8.2.0}/core/dbt_unified.py +0 -0
- {delta_theory-8.1.1 → delta_theory-8.2.0}/core/fatigue_redis_api.py +0 -0
- {delta_theory-8.1.1 → delta_theory-8.2.0}/core/materials.py +0 -0
- {delta_theory-8.1.1 → delta_theory-8.2.0}/delta_theory.egg-info/dependency_links.txt +0 -0
- {delta_theory-8.1.1 → delta_theory-8.2.0}/delta_theory.egg-info/entry_points.txt +0 -0
- {delta_theory-8.1.1 → delta_theory-8.2.0}/delta_theory.egg-info/requires.txt +0 -0
- {delta_theory-8.1.1 → delta_theory-8.2.0}/delta_theory.egg-info/top_level.txt +0 -0
- {delta_theory-8.1.1 → delta_theory-8.2.0}/setup.cfg +0 -0
- {delta_theory-8.1.1 → delta_theory-8.2.0}/tests/test_core.py +0 -0
|
@@ -7,10 +7,11 @@ Unified materials science prediction based on geometric first principles.
|
|
|
7
7
|
|
|
8
8
|
Modules:
|
|
9
9
|
- unified_yield_fatigue_v6_9: Main yield + fatigue model (v6.9b)
|
|
10
|
-
-
|
|
10
|
+
- unified_flc_v8_1: FLC prediction with v6.9 integration (v8.1)
|
|
11
11
|
- dbt_unified: Ductile-Brittle Transition Temperature prediction
|
|
12
12
|
- materials: Material database
|
|
13
13
|
- fatigue_redis_api: FatigueData-AM2022 Redis API (optional)
|
|
14
|
+
- banners: ASCII Art banners (random selection)
|
|
14
15
|
|
|
15
16
|
Version History:
|
|
16
17
|
v5.0 - Yield stress from δ-theory (f_d, E_bond, crystal geometry)
|
|
@@ -18,20 +19,27 @@ Version History:
|
|
|
18
19
|
v6.10 - Universal fatigue validation (2472 points, 5 AM materials)
|
|
19
20
|
v7.2 - FLC from free volume consumption
|
|
20
21
|
v8.0 - Forming-Fatigue integration (η → r_th_eff)
|
|
22
|
+
v8.1 - FLC 7-mode discrete formulation + v6.9 integration
|
|
23
|
+
- "Nature is Geometry" - ε₁ = |V|_eff × C_j / R_j
|
|
21
24
|
|
|
22
25
|
Example:
|
|
23
26
|
>>> from delta_theory import calc_sigma_y, MATERIALS
|
|
24
27
|
>>> sigma_y = calc_sigma_y(MATERIALS['Fe'])
|
|
25
28
|
|
|
26
|
-
>>> from delta_theory import FLCPredictor
|
|
29
|
+
>>> from delta_theory import FLCPredictor, predict_flc
|
|
27
30
|
>>> flc = FLCPredictor()
|
|
28
|
-
>>>
|
|
31
|
+
>>> flc.add_from_v69('SPCC', flc0=0.225, base_element='Fe')
|
|
32
|
+
>>> eps1 = flc.predict('SPCC', 'Plane Strain')
|
|
29
33
|
|
|
30
|
-
>>> from delta_theory import
|
|
31
|
-
>>>
|
|
32
|
-
>>> r_th_eff = integrator.effective_r_th(eta_forming=0.4, structure='BCC')
|
|
34
|
+
>>> from delta_theory import show_banner
|
|
35
|
+
>>> show_banner() # Random ASCII art!
|
|
33
36
|
"""
|
|
34
37
|
|
|
38
|
+
# ==============================================================================
|
|
39
|
+
# Banners (ASCII Art) - Load first for startup display
|
|
40
|
+
# ==============================================================================
|
|
41
|
+
from .banners import show_banner, get_random_banner, BANNERS
|
|
42
|
+
|
|
35
43
|
# ==============================================================================
|
|
36
44
|
# Core: Yield + Fatigue (v6.9b)
|
|
37
45
|
# ==============================================================================
|
|
@@ -54,51 +62,77 @@ from .unified_yield_fatigue_v6_9 import (
|
|
|
54
62
|
|
|
55
63
|
# Multiaxial (τ/σ, R)
|
|
56
64
|
yield_by_mode,
|
|
65
|
+
tau_over_sigma,
|
|
66
|
+
sigma_c_over_sigma_t,
|
|
57
67
|
T_TWIN,
|
|
58
68
|
R_COMP,
|
|
69
|
+
C_CLASS_DEFAULT,
|
|
59
70
|
)
|
|
60
71
|
|
|
61
72
|
# ==============================================================================
|
|
62
|
-
# FLC
|
|
73
|
+
# FLC v8.1: 7-Mode Discrete + v6.9 Integration
|
|
63
74
|
# ==============================================================================
|
|
64
|
-
from .
|
|
65
|
-
#
|
|
75
|
+
from .unified_flc_v8_1 import (
|
|
76
|
+
# Main class
|
|
66
77
|
FLCPredictor,
|
|
67
|
-
FLCParams,
|
|
68
78
|
FLCMaterial,
|
|
69
79
|
FLC_MATERIALS,
|
|
70
80
|
|
|
71
|
-
# Forming-Fatigue integration (v8.0)
|
|
72
|
-
FormingFatigueIntegrator,
|
|
73
|
-
FormingState,
|
|
74
|
-
DeltaFormingAnalyzer,
|
|
75
|
-
|
|
76
81
|
# Convenience functions
|
|
77
82
|
predict_flc,
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
predict_flc_curve,
|
|
84
|
+
get_flc0,
|
|
85
|
+
calibrate_V_eff,
|
|
86
|
+
create_material_from_v69,
|
|
87
|
+
|
|
88
|
+
# Core functions
|
|
89
|
+
calc_R_eff,
|
|
90
|
+
calc_K_coeff,
|
|
91
|
+
predict_flc_mode,
|
|
92
|
+
|
|
93
|
+
# v6.9 parameter helpers
|
|
94
|
+
get_tau_sigma,
|
|
95
|
+
get_R_comp,
|
|
96
|
+
get_v69_material,
|
|
80
97
|
|
|
81
98
|
# Constants
|
|
99
|
+
STANDARD_MODES,
|
|
100
|
+
MODE_ORDER,
|
|
101
|
+
LOCALIZATION_COEFFS,
|
|
82
102
|
R_TH_VIRGIN,
|
|
83
|
-
|
|
103
|
+
ELEMENT_STRUCTURE,
|
|
104
|
+
|
|
105
|
+
# Flags
|
|
106
|
+
V69_AVAILABLE,
|
|
84
107
|
)
|
|
85
108
|
|
|
86
109
|
# ==============================================================================
|
|
87
110
|
# DBT: Ductile-Brittle Transition
|
|
88
111
|
# ==============================================================================
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
112
|
+
try:
|
|
113
|
+
from .dbt_unified import (
|
|
114
|
+
DBTUnified,
|
|
115
|
+
DBTCore,
|
|
116
|
+
GrainSizeView,
|
|
117
|
+
TemperatureView,
|
|
118
|
+
SegregationView,
|
|
119
|
+
MATERIAL_FE,
|
|
120
|
+
)
|
|
121
|
+
except ImportError:
|
|
122
|
+
DBTUnified = None
|
|
123
|
+
DBTCore = None
|
|
124
|
+
GrainSizeView = None
|
|
125
|
+
TemperatureView = None
|
|
126
|
+
SegregationView = None
|
|
127
|
+
MATERIAL_FE = None
|
|
97
128
|
|
|
98
129
|
# ==============================================================================
|
|
99
130
|
# Materials Database (GPU-accelerated)
|
|
100
131
|
# ==============================================================================
|
|
101
|
-
|
|
132
|
+
try:
|
|
133
|
+
from .materials import MaterialGPU
|
|
134
|
+
except ImportError:
|
|
135
|
+
MaterialGPU = None
|
|
102
136
|
|
|
103
137
|
# ==============================================================================
|
|
104
138
|
# Optional: FatigueDB (requires upstash-redis)
|
|
@@ -111,10 +145,15 @@ except ImportError:
|
|
|
111
145
|
# ==============================================================================
|
|
112
146
|
# Package Metadata
|
|
113
147
|
# ==============================================================================
|
|
114
|
-
__version__ = "8.
|
|
148
|
+
__version__ = "8.1.0"
|
|
115
149
|
__author__ = "Masamichi Iizumi & Tamaki"
|
|
116
150
|
|
|
117
151
|
__all__ = [
|
|
152
|
+
# === Banners ===
|
|
153
|
+
"show_banner",
|
|
154
|
+
"get_random_banner",
|
|
155
|
+
"BANNERS",
|
|
156
|
+
|
|
118
157
|
# === v6.9 Yield + Fatigue ===
|
|
119
158
|
"Material",
|
|
120
159
|
"MATERIALS",
|
|
@@ -126,25 +165,34 @@ __all__ = [
|
|
|
126
165
|
"fatigue_life_const_amp",
|
|
127
166
|
"generate_sn_curve",
|
|
128
167
|
"yield_by_mode",
|
|
168
|
+
"tau_over_sigma",
|
|
169
|
+
"sigma_c_over_sigma_t",
|
|
129
170
|
"FATIGUE_CLASS_PRESET",
|
|
130
171
|
"T_TWIN",
|
|
131
172
|
"R_COMP",
|
|
173
|
+
"C_CLASS_DEFAULT",
|
|
132
174
|
|
|
133
|
-
# ===
|
|
175
|
+
# === v8.1 FLC ===
|
|
134
176
|
"FLCPredictor",
|
|
135
|
-
"FLCParams",
|
|
136
177
|
"FLCMaterial",
|
|
137
178
|
"FLC_MATERIALS",
|
|
138
179
|
"predict_flc",
|
|
180
|
+
"predict_flc_curve",
|
|
181
|
+
"get_flc0",
|
|
182
|
+
"calibrate_V_eff",
|
|
183
|
+
"create_material_from_v69",
|
|
184
|
+
"calc_R_eff",
|
|
185
|
+
"calc_K_coeff",
|
|
186
|
+
"predict_flc_mode",
|
|
187
|
+
"get_tau_sigma",
|
|
188
|
+
"get_R_comp",
|
|
189
|
+
"get_v69_material",
|
|
190
|
+
"STANDARD_MODES",
|
|
191
|
+
"MODE_ORDER",
|
|
192
|
+
"LOCALIZATION_COEFFS",
|
|
139
193
|
"R_TH_VIRGIN",
|
|
140
|
-
"
|
|
141
|
-
|
|
142
|
-
# === v8.0 Forming-Fatigue ===
|
|
143
|
-
"FormingFatigueIntegrator",
|
|
144
|
-
"FormingState",
|
|
145
|
-
"DeltaFormingAnalyzer",
|
|
146
|
-
"effective_fatigue_threshold",
|
|
147
|
-
"critical_forming_consumption",
|
|
194
|
+
"ELEMENT_STRUCTURE",
|
|
195
|
+
"V69_AVAILABLE",
|
|
148
196
|
|
|
149
197
|
# === DBT ===
|
|
150
198
|
"DBTUnified",
|
|
@@ -159,6 +207,9 @@ __all__ = [
|
|
|
159
207
|
|
|
160
208
|
# === FatigueDB (optional) ===
|
|
161
209
|
"FatigueDB",
|
|
210
|
+
|
|
211
|
+
# === Info ===
|
|
212
|
+
"info",
|
|
162
213
|
]
|
|
163
214
|
|
|
164
215
|
|
|
@@ -166,31 +217,44 @@ __all__ = [
|
|
|
166
217
|
# Quick Reference
|
|
167
218
|
# ==============================================================================
|
|
168
219
|
def info():
|
|
169
|
-
"""Print δ-Theory library overview."""
|
|
220
|
+
"""Print δ-Theory library overview with random ASCII banner."""
|
|
221
|
+
show_banner() # 🎲 Random banner every time!
|
|
170
222
|
print(f"""
|
|
171
223
|
╔══════════════════════════════════════════════════════════════════════╗
|
|
172
224
|
║ δ-Theory Core Library v{__version__} ║
|
|
173
|
-
║ "Nature is Geometry"
|
|
225
|
+
║ "Nature is Geometry" ─ ε₁ = |V|_eff × C_j / R_j ║
|
|
174
226
|
╠══════════════════════════════════════════════════════════════════════╣
|
|
175
227
|
║ ║
|
|
176
|
-
║ YIELD STRESS (
|
|
228
|
+
║ YIELD STRESS (v6.9b) ║
|
|
177
229
|
║ σ_y = f(crystal_structure, f_d, E_bond, T) ║
|
|
230
|
+
║ Mean error: 2.6% across 10 metals (ZERO fitting parameters) ║
|
|
178
231
|
║ >>> calc_sigma_y(MATERIALS['Fe']) ║
|
|
179
232
|
║ ║
|
|
180
233
|
║ FATIGUE LIFE (v6.10) ║
|
|
181
234
|
║ N = f(r, r_th, structure) | r_th: BCC=0.65, FCC=0.02, HCP=0.20 ║
|
|
235
|
+
║ Universal r-N normalization across AM materials ║
|
|
182
236
|
║ >>> fatigue_life_const_amp(sigma_a, MATERIALS['Fe']) ║
|
|
183
237
|
║ ║
|
|
184
|
-
║ FLC -
|
|
185
|
-
║
|
|
186
|
-
║
|
|
238
|
+
║ FLC v8.1 - 7-MODE DISCRETE FORMULATION ║
|
|
239
|
+
║ ε₁,j = |V|_eff × C_j / R_j ║
|
|
240
|
+
║ C_j = 1 + 0.75β + 0.48β² (localization, frozen) ║
|
|
241
|
+
║ R_j = w_σ + w_τ/(τ/σ) + w_c/R_comp (mixed resistance) ║
|
|
242
|
+
║ Mean error: 4.7% across 49 points (7 materials × 7 modes) ║
|
|
187
243
|
║ ║
|
|
188
|
-
║
|
|
189
|
-
║
|
|
190
|
-
║ >>>
|
|
244
|
+
║ >>> flc = FLCPredictor() ║
|
|
245
|
+
║ >>> flc.add_from_v69('SPCC', flc0=0.225, base_element='Fe') ║
|
|
246
|
+
║ >>> eps1 = flc.predict('SPCC', 'Plane Strain') ║
|
|
191
247
|
║ ║
|
|
192
248
|
║ DBT TEMPERATURE ║
|
|
249
|
+
║ 3 views: Grain size / Temperature / Segregation (time) ║
|
|
193
250
|
║ >>> DBTUnified().predict_dbtt(material, grain_size) ║
|
|
194
251
|
║ ║
|
|
252
|
+
╠══════════════════════════════════════════════════════════════════════╣
|
|
253
|
+
║ Core Equations: ║
|
|
254
|
+
║ Λ = K / |V|_eff (Λ > 1 → yield/fracture) ║
|
|
255
|
+
║ τ/σ = (α_s/α_t) × C_class × T_twin × A_texture ║
|
|
256
|
+
║ FLC: 1-point calibration from FLC₀ → all 7 modes ║
|
|
257
|
+
║ ║
|
|
258
|
+
║ Authors: Masamichi Iizumi & Tamaki ║
|
|
195
259
|
╚══════════════════════════════════════════════════════════════════════╝
|
|
196
260
|
""")
|