delta-theory 6.10.0__tar.gz → 6.10.3__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 (22) hide show
  1. {delta_theory-6.10.0/delta_theory.egg-info → delta_theory-6.10.3}/PKG-INFO +2 -2
  2. {delta_theory-6.10.0 → delta_theory-6.10.3}/core/__init__.py +30 -2
  3. {delta_theory-6.10.0 → delta_theory-6.10.3}/core/unified_yield_fatigue_v6_9.py +18 -5
  4. {delta_theory-6.10.0 → delta_theory-6.10.3/delta_theory.egg-info}/PKG-INFO +2 -2
  5. {delta_theory-6.10.0 → delta_theory-6.10.3}/delta_theory.egg-info/SOURCES.txt +2 -3
  6. delta_theory-6.10.3/delta_theory.egg-info/top_level.txt +2 -0
  7. {delta_theory-6.10.0 → delta_theory-6.10.3}/pyproject.toml +2 -2
  8. delta_theory-6.10.0/delta_theory.egg-info/top_level.txt +0 -3
  9. delta_theory-6.10.0/validation/__init__.py +0 -10
  10. {delta_theory-6.10.0 → delta_theory-6.10.3}/LICENSE +0 -0
  11. {delta_theory-6.10.0 → delta_theory-6.10.3}/README.md +0 -0
  12. {delta_theory-6.10.0 → delta_theory-6.10.3}/apps/__init__.py +0 -0
  13. {delta_theory-6.10.0 → delta_theory-6.10.3}/apps/delta_fatigue_app.py +0 -0
  14. {delta_theory-6.10.0 → delta_theory-6.10.3}/core/Universal_Lindemann.py +0 -0
  15. {delta_theory-6.10.0 → delta_theory-6.10.3}/core/dbt_unified.py +0 -0
  16. {delta_theory-6.10.0/validation → delta_theory-6.10.3/core}/fatigue_redis_api.py +0 -0
  17. {delta_theory-6.10.0 → delta_theory-6.10.3}/core/materials.py +0 -0
  18. {delta_theory-6.10.0 → delta_theory-6.10.3}/delta_theory.egg-info/dependency_links.txt +0 -0
  19. {delta_theory-6.10.0 → delta_theory-6.10.3}/delta_theory.egg-info/entry_points.txt +0 -0
  20. {delta_theory-6.10.0 → delta_theory-6.10.3}/delta_theory.egg-info/requires.txt +0 -0
  21. {delta_theory-6.10.0 → delta_theory-6.10.3}/setup.cfg +0 -0
  22. {delta_theory-6.10.0 → delta_theory-6.10.3}/tests/test_core.py +0 -0
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: delta-theory
3
- Version: 6.10.0
3
+ Version: 6.10.3
4
4
  Summary: Unified materials strength and fatigue prediction based on geometric first principles
5
5
  Author: Tamaki
6
- Author-email: Masamichi Iizumi <masamichi@miosync.com>
6
+ Author-email: Masamichi Iizumi <m.iizumi@miosync.email>
7
7
  Maintainer-email: Masamichi Iizumi <masamichi@miosync.com>
8
8
  License: MIT
9
9
  Project-URL: Homepage, https://github.com/miosync/delta-theory
@@ -1,13 +1,13 @@
1
1
  """
2
2
  δ-Theory Core Library
3
3
  =====================
4
-
5
4
  Unified yield stress and fatigue life prediction based on geometric first principles.
6
5
 
7
6
  Modules:
8
7
  - unified_yield_fatigue_v6_9: Main yield + fatigue model (v6.9b)
9
8
  - dbt_unified: Ductile-Brittle Transition Temperature prediction
10
9
  - materials: Material database
10
+ - fatigue_redis_api: FatigueData-AM2022 Redis API (optional)
11
11
  """
12
12
 
13
13
  from .unified_yield_fatigue_v6_9 import (
@@ -31,5 +31,33 @@ from .dbt_unified import (
31
31
 
32
32
  from .materials import MaterialGPU
33
33
 
34
- __version__ = "6.9.0"
34
+ # Optional: FatigueDB (requires upstash-redis)
35
+ try:
36
+ from .fatigue_redis_api import FatigueDB
37
+ except ImportError:
38
+ FatigueDB = None # upstash-redis not installed
39
+
40
+ __version__ = "6.10.1"
35
41
  __author__ = "Masamichi Iizumi & Tamaki"
42
+
43
+ __all__ = [
44
+ # v6.9
45
+ "Material",
46
+ "MATERIALS",
47
+ "calc_sigma_y",
48
+ "fatigue_life_const_amp",
49
+ "generate_sn_curve",
50
+ "yield_by_mode",
51
+ "FATIGUE_CLASS_PRESET",
52
+ # DBT
53
+ "DBTUnified",
54
+ "DBTCore",
55
+ "GrainSizeView",
56
+ "TemperatureView",
57
+ "SegregationView",
58
+ "MATERIAL_FE",
59
+ # Materials
60
+ "MaterialGPU",
61
+ # FatigueDB (optional)
62
+ "FatigueDB",
63
+ ]
@@ -432,12 +432,14 @@ def fatigue_life_const_amp(
432
432
  C_class: float = C_CLASS_DEFAULT,
433
433
  bcc_w110: float = DEFAULT_BCC_W110,
434
434
  apply_C_class_hcp: bool = False,
435
+ r_th_override: float | None = None,
436
+ n_override: float | None = None,
435
437
  ) -> Dict[str, float | str]:
436
438
  """Fatigue life under constant amplitude for the chosen loading mode."""
437
439
 
438
- preset = FATIGUE_CLASS_PRESET.get(mat.structure, FATIGUE_CLASS_PRESET['FCC'])
439
- r_th = preset['r_th']
440
- n = preset['n']
440
+ preset = FATIGUE_CLASS_PRESET[mat.structure]
441
+ r_th = r_th_override if r_th_override is not None else preset['r_th']
442
+ n = n_override if n_override is not None else preset['n']
441
443
 
442
444
  A_int = A_INT_DB.get(mat.name, 1.0)
443
445
  A_eff = A_int * A_ext
@@ -485,6 +487,8 @@ def generate_sn_curve(
485
487
  C_class: float = C_CLASS_DEFAULT,
486
488
  bcc_w110: float = DEFAULT_BCC_W110,
487
489
  apply_C_class_hcp: bool = False,
490
+ r_th_override: float | None = None,
491
+ n_override: float | None = None,
488
492
  ) -> np.ndarray:
489
493
  Ns = []
490
494
  for s in sigmas_MPa:
@@ -498,6 +502,8 @@ def generate_sn_curve(
498
502
  C_class=C_class,
499
503
  bcc_w110=bcc_w110,
500
504
  apply_C_class_hcp=apply_C_class_hcp,
505
+ r_th_override=r_th_override,
506
+ n_override=n_override,
501
507
  )
502
508
  Ns.append(out['N_fail'])
503
509
  return np.array(Ns, dtype=float)
@@ -576,6 +582,8 @@ def cmd_point(args: argparse.Namespace) -> None:
576
582
  C_class=args.C_class,
577
583
  bcc_w110=args.bcc_w110,
578
584
  apply_C_class_hcp=args.apply_C_class_hcp,
585
+ r_th_override=args.r_th,
586
+ n_override=args.n_exp,
579
587
  )
580
588
  else:
581
589
  out = None
@@ -670,8 +678,9 @@ def cmd_calibrate(args: argparse.Namespace) -> None:
670
678
  )
671
679
  sigma_y = y['sigma_y']
672
680
 
673
- preset = FATIGUE_CLASS_PRESET.get(mat.structure, FATIGUE_CLASS_PRESET['FCC'])
674
- r_th, n = preset['r_th'], preset['n']
681
+ preset = FATIGUE_CLASS_PRESET[mat.structure]
682
+ r_th = r_th_override if r_th_override is not None else preset['r_th']
683
+ n = n_override if n_override is not None else preset['n']
675
684
 
676
685
  y_mode, _ = yield_by_mode(
677
686
  mat,
@@ -755,6 +764,8 @@ def cmd_sn(args: argparse.Namespace) -> None:
755
764
  C_class=args.C_class,
756
765
  bcc_w110=args.bcc_w110,
757
766
  apply_C_class_hcp=args.apply_C_class_hcp,
767
+ r_th_override=args.r_th,
768
+ n_override=args.n_exp,
758
769
  )
759
770
 
760
771
  label = f"structure={mat.structure}" if args.structure_only else f"metal={mat.name} ({mat.structure})"
@@ -818,6 +829,8 @@ def build_parser() -> argparse.ArgumentParser:
818
829
  sp.add_argument('--mode', choices=['tensile', 'compression', 'shear'], default='tensile')
819
830
  sp.add_argument('--A_ext', type=float, default=2.46e-4, help='external factor (1-point calibration)')
820
831
  sp.add_argument('--D_fail', type=float, default=0.5)
832
+ sp.add_argument('--r_th', type=float, default=None, help='Override r_th (fatigue threshold ratio)')
833
+ sp.add_argument('--n_exp', type=float, default=None, help='Override n (fatigue exponent)')
821
834
 
822
835
  sp_point = sub.add_parser('point', help='compute yield (+ optional fatigue life)')
823
836
  add_common(sp_point)
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: delta-theory
3
- Version: 6.10.0
3
+ Version: 6.10.3
4
4
  Summary: Unified materials strength and fatigue prediction based on geometric first principles
5
5
  Author: Tamaki
6
- Author-email: Masamichi Iizumi <masamichi@miosync.com>
6
+ Author-email: Masamichi Iizumi <m.iizumi@miosync.email>
7
7
  Maintainer-email: Masamichi Iizumi <masamichi@miosync.com>
8
8
  License: MIT
9
9
  Project-URL: Homepage, https://github.com/miosync/delta-theory
@@ -6,6 +6,7 @@ apps/delta_fatigue_app.py
6
6
  core/Universal_Lindemann.py
7
7
  core/__init__.py
8
8
  core/dbt_unified.py
9
+ core/fatigue_redis_api.py
9
10
  core/materials.py
10
11
  core/unified_yield_fatigue_v6_9.py
11
12
  delta_theory.egg-info/PKG-INFO
@@ -14,6 +15,4 @@ delta_theory.egg-info/dependency_links.txt
14
15
  delta_theory.egg-info/entry_points.txt
15
16
  delta_theory.egg-info/requires.txt
16
17
  delta_theory.egg-info/top_level.txt
17
- tests/test_core.py
18
- validation/__init__.py
19
- validation/fatigue_redis_api.py
18
+ tests/test_core.py
@@ -0,0 +1,2 @@
1
+ apps
2
+ core
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "delta-theory"
7
- version = "6.10.0"
7
+ version = "6.10.3"
8
8
  description = "Unified materials strength and fatigue prediction based on geometric first principles"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
11
11
  authors = [
12
- {name = "Masamichi Iizumi", email = "masamichi@miosync.com"},
12
+ {name = "Masamichi Iizumi", email = "m.iizumi@miosync.email"},
13
13
  {name = "Tamaki"},
14
14
  ]
15
15
  maintainers = [
@@ -1,3 +0,0 @@
1
- apps
2
- core
3
- validation
@@ -1,10 +0,0 @@
1
- """
2
- δ-Theory Validation Tools
3
- =========================
4
-
5
- Tools for validating δ-theory predictions against experimental data.
6
- """
7
-
8
- from .fatigue_redis_api import FatigueDB
9
-
10
- __all__ = ["FatigueDB"]
File without changes
File without changes
File without changes