delta-theory 8.1.2__py3-none-any.whl → 8.2.1__py3-none-any.whl
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.
- core/__init__.py +111 -57
- core/__main__.py +194 -129
- core/unified_flc_v8_1.py +768 -0
- {delta_theory-8.1.2.dist-info → delta_theory-8.2.1.dist-info}/METADATA +150 -124
- {delta_theory-8.1.2.dist-info → delta_theory-8.2.1.dist-info}/RECORD +9 -9
- core/unified_flc_v7.py +0 -727
- {delta_theory-8.1.2.dist-info → delta_theory-8.2.1.dist-info}/WHEEL +0 -0
- {delta_theory-8.1.2.dist-info → delta_theory-8.2.1.dist-info}/entry_points.txt +0 -0
- {delta_theory-8.1.2.dist-info → delta_theory-8.2.1.dist-info}/licenses/LICENSE +0 -0
- {delta_theory-8.1.2.dist-info → delta_theory-8.2.1.dist-info}/top_level.txt +0 -0
core/__init__.py
CHANGED
|
@@ -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)
|
|
@@ -108,18 +142,18 @@ try:
|
|
|
108
142
|
except ImportError:
|
|
109
143
|
FatigueDB = None # upstash-redis not installed
|
|
110
144
|
|
|
111
|
-
# ==============================================================================
|
|
112
|
-
# Banners (ASCII Art)
|
|
113
|
-
# ==============================================================================
|
|
114
|
-
from .banners import show_banner, get_random_banner, BANNERS
|
|
115
|
-
|
|
116
145
|
# ==============================================================================
|
|
117
146
|
# Package Metadata
|
|
118
147
|
# ==============================================================================
|
|
119
|
-
__version__ = "8.1.
|
|
148
|
+
__version__ = "8.1.0"
|
|
120
149
|
__author__ = "Masamichi Iizumi & Tamaki"
|
|
121
150
|
|
|
122
151
|
__all__ = [
|
|
152
|
+
# === Banners ===
|
|
153
|
+
"show_banner",
|
|
154
|
+
"get_random_banner",
|
|
155
|
+
"BANNERS",
|
|
156
|
+
|
|
123
157
|
# === v6.9 Yield + Fatigue ===
|
|
124
158
|
"Material",
|
|
125
159
|
"MATERIALS",
|
|
@@ -131,25 +165,34 @@ __all__ = [
|
|
|
131
165
|
"fatigue_life_const_amp",
|
|
132
166
|
"generate_sn_curve",
|
|
133
167
|
"yield_by_mode",
|
|
168
|
+
"tau_over_sigma",
|
|
169
|
+
"sigma_c_over_sigma_t",
|
|
134
170
|
"FATIGUE_CLASS_PRESET",
|
|
135
171
|
"T_TWIN",
|
|
136
172
|
"R_COMP",
|
|
173
|
+
"C_CLASS_DEFAULT",
|
|
137
174
|
|
|
138
|
-
# ===
|
|
175
|
+
# === v8.1 FLC ===
|
|
139
176
|
"FLCPredictor",
|
|
140
|
-
"FLCParams",
|
|
141
177
|
"FLCMaterial",
|
|
142
178
|
"FLC_MATERIALS",
|
|
143
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",
|
|
144
193
|
"R_TH_VIRGIN",
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
# === v8.0 Forming-Fatigue ===
|
|
148
|
-
"FormingFatigueIntegrator",
|
|
149
|
-
"FormingState",
|
|
150
|
-
"DeltaFormingAnalyzer",
|
|
151
|
-
"effective_fatigue_threshold",
|
|
152
|
-
"critical_forming_consumption",
|
|
194
|
+
"ELEMENT_STRUCTURE",
|
|
195
|
+
"V69_AVAILABLE",
|
|
153
196
|
|
|
154
197
|
# === DBT ===
|
|
155
198
|
"DBTUnified",
|
|
@@ -164,11 +207,9 @@ __all__ = [
|
|
|
164
207
|
|
|
165
208
|
# === FatigueDB (optional) ===
|
|
166
209
|
"FatigueDB",
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
"
|
|
170
|
-
"get_random_banner",
|
|
171
|
-
"BANNERS",
|
|
210
|
+
|
|
211
|
+
# === Info ===
|
|
212
|
+
"info",
|
|
172
213
|
]
|
|
173
214
|
|
|
174
215
|
|
|
@@ -176,31 +217,44 @@ __all__ = [
|
|
|
176
217
|
# Quick Reference
|
|
177
218
|
# ==============================================================================
|
|
178
219
|
def info():
|
|
179
|
-
"""Print δ-Theory library overview."""
|
|
220
|
+
"""Print δ-Theory library overview with random ASCII banner."""
|
|
221
|
+
show_banner() # 🎲 Random banner every time!
|
|
180
222
|
print(f"""
|
|
181
223
|
╔══════════════════════════════════════════════════════════════════════╗
|
|
182
224
|
║ δ-Theory Core Library v{__version__} ║
|
|
183
|
-
║ "Nature is Geometry"
|
|
225
|
+
║ "Nature is Geometry" ─ ε₁ = |V|_eff × C_j / R_j ║
|
|
184
226
|
╠══════════════════════════════════════════════════════════════════════╣
|
|
185
227
|
║ ║
|
|
186
|
-
║ YIELD STRESS (
|
|
228
|
+
║ YIELD STRESS (v6.9b) ║
|
|
187
229
|
║ σ_y = f(crystal_structure, f_d, E_bond, T) ║
|
|
230
|
+
║ Mean error: 2.6% across 10 metals (ZERO fitting parameters) ║
|
|
188
231
|
║ >>> calc_sigma_y(MATERIALS['Fe']) ║
|
|
189
232
|
║ ║
|
|
190
233
|
║ FATIGUE LIFE (v6.10) ║
|
|
191
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 ║
|
|
192
236
|
║ >>> fatigue_life_const_amp(sigma_a, MATERIALS['Fe']) ║
|
|
193
237
|
║ ║
|
|
194
|
-
║ FLC -
|
|
195
|
-
║
|
|
196
|
-
║
|
|
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) ║
|
|
197
243
|
║ ║
|
|
198
|
-
║
|
|
199
|
-
║
|
|
200
|
-
║ >>>
|
|
244
|
+
║ >>> flc = FLCPredictor() ║
|
|
245
|
+
║ >>> flc.add_from_v69('SPCC', flc0=0.225, base_element='Fe') ║
|
|
246
|
+
║ >>> eps1 = flc.predict('SPCC', 'Plane Strain') ║
|
|
201
247
|
║ ║
|
|
202
248
|
║ DBT TEMPERATURE ║
|
|
249
|
+
║ 3 views: Grain size / Temperature / Segregation (time) ║
|
|
203
250
|
║ >>> DBTUnified().predict_dbtt(material, grain_size) ║
|
|
204
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 ║
|
|
205
259
|
╚══════════════════════════════════════════════════════════════════════╝
|
|
206
260
|
""")
|