freepaths 2.0__tar.gz → 2.0.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 (34) hide show
  1. {freepaths-2.0 → freepaths-2.0.1}/PKG-INFO +4 -4
  2. {freepaths-2.0 → freepaths-2.0.1}/freepaths/__main__.py +1 -1
  3. {freepaths-2.0 → freepaths-2.0.1}/freepaths/holes.py +15 -7
  4. {freepaths-2.0 → freepaths-2.0.1}/freepaths/main_mfp_sampling.py +3 -2
  5. {freepaths-2.0 → freepaths-2.0.1}/freepaths.egg-info/PKG-INFO +4 -4
  6. {freepaths-2.0 → freepaths-2.0.1}/setup.py +3 -3
  7. {freepaths-2.0 → freepaths-2.0.1}/README.md +0 -0
  8. {freepaths-2.0 → freepaths-2.0.1}/freepaths/animation.py +0 -0
  9. {freepaths-2.0 → freepaths-2.0.1}/freepaths/config.py +0 -0
  10. {freepaths-2.0 → freepaths-2.0.1}/freepaths/data.py +0 -0
  11. {freepaths-2.0 → freepaths-2.0.1}/freepaths/default_config.py +0 -0
  12. {freepaths-2.0 → freepaths-2.0.1}/freepaths/flight.py +0 -0
  13. {freepaths-2.0 → freepaths-2.0.1}/freepaths/main_tracing.py +0 -0
  14. {freepaths-2.0 → freepaths-2.0.1}/freepaths/maps.py +0 -0
  15. {freepaths-2.0 → freepaths-2.0.1}/freepaths/materials.py +0 -0
  16. {freepaths-2.0 → freepaths-2.0.1}/freepaths/move.py +0 -0
  17. {freepaths-2.0 → freepaths-2.0.1}/freepaths/output_info.py +0 -0
  18. {freepaths-2.0 → freepaths-2.0.1}/freepaths/output_plots.py +0 -0
  19. {freepaths-2.0 → freepaths-2.0.1}/freepaths/output_structure.py +0 -0
  20. {freepaths-2.0 → freepaths-2.0.1}/freepaths/phonon.py +0 -0
  21. {freepaths-2.0 → freepaths-2.0.1}/freepaths/progress.py +0 -0
  22. {freepaths-2.0 → freepaths-2.0.1}/freepaths/run_phonon.py +0 -0
  23. {freepaths-2.0 → freepaths-2.0.1}/freepaths/scattering.py +0 -0
  24. {freepaths-2.0 → freepaths-2.0.1}/freepaths/scattering_primitives.py +0 -0
  25. {freepaths-2.0 → freepaths-2.0.1}/freepaths/scattering_semicircle.py +0 -0
  26. {freepaths-2.0 → freepaths-2.0.1}/freepaths/scattering_types.py +0 -0
  27. {freepaths-2.0 → freepaths-2.0.1}/freepaths/sources.py +0 -0
  28. {freepaths-2.0 → freepaths-2.0.1}/freepaths.egg-info/SOURCES.txt +0 -0
  29. {freepaths-2.0 → freepaths-2.0.1}/freepaths.egg-info/dependency_links.txt +0 -0
  30. {freepaths-2.0 → freepaths-2.0.1}/freepaths.egg-info/entry_points.txt +0 -0
  31. {freepaths-2.0 → freepaths-2.0.1}/freepaths.egg-info/requires.txt +0 -0
  32. {freepaths-2.0 → freepaths-2.0.1}/freepaths.egg-info/top_level.txt +0 -0
  33. {freepaths-2.0 → freepaths-2.0.1}/pyproject.toml +0 -0
  34. {freepaths-2.0 → freepaths-2.0.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: freepaths
3
- Version: 2.0
3
+ Version: 2.0.1
4
4
  Summary: Phonon Monte Carlo simulator
5
5
  Home-page: https://github.com/anufrievroman/freepaths
6
6
  Author: Roman Anufriev
@@ -11,12 +11,12 @@ Classifier: License :: OSI Approved :: GNU General Public License (GPL)
11
11
  Classifier: Environment :: Console
12
12
  Classifier: Natural Language :: English
13
13
  Classifier: Operating System :: OS Independent
14
- Classifier: Programming Language :: Python :: 3.7
15
- Classifier: Programming Language :: Python :: 3.8
16
14
  Classifier: Programming Language :: Python :: 3.9
17
15
  Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Topic :: Utilities
19
- Requires-Python: ~=3.8
19
+ Requires-Python: ~=3.11
20
20
  Description-Content-Type: text/markdown
21
21
  Requires-Dist: numpy
22
22
  Requires-Dist: matplotlib
@@ -7,7 +7,7 @@ from colorama import Fore, Style
7
7
  import freepaths.main_tracing
8
8
  import freepaths.main_mfp_sampling
9
9
 
10
- __version__ = "2.0"
10
+ __version__ = "2.0.1"
11
11
 
12
12
  colorama.init()
13
13
 
@@ -75,23 +75,31 @@ class CircularHole(Hole):
75
75
  class RectangularHole(Hole):
76
76
  """Shape of a rectangular hole"""
77
77
 
78
- def __init__(self, x=0, y=0, size_x=100e-9, size_y=100e-9):
78
+ def __init__(self, x=0, y=0, size_x=100e-9, size_y=100e-9, depth=None):
79
79
  self.x0 = x
80
80
  self.y0 = y
81
81
  self.size_x = size_x
82
82
  self.size_y = size_y
83
+ self.depth = depth
83
84
 
84
85
  def is_inside(self, x, y, z, cf):
85
- """Check if phonon with given coordinates traverses the boundary"""
86
- return (abs(x - self.x0) <= self.size_x / 2) and (abs(y - self.y0) <= self.size_y / 2)
86
+ """Check if phonon with given coordinates traverses the boundary. It also depens on in the hole is complete or partial."""
87
+ if self.depth and z:
88
+ return (abs(x - self.x0) <= self.size_x / 2) and (abs(y - self.y0) <= self.size_y / 2) and (z > cf.thickness/2 - self.depth)
89
+ else:
90
+ return (abs(x - self.x0) <= self.size_x / 2) and (abs(y - self.y0) <= self.size_y / 2)
91
+
87
92
 
88
93
  def scatter(self, ph, scattering_types, x, y, z, cf):
89
94
  """Calculate the new direction after scattering on the hole"""
90
95
 
91
- # Coordinate y of the intersection with the hole side:
92
- y1 = (self.y0 - y) + cos(ph.theta) * (
93
- self.size_x / 2 - abs(self.x0 - x)
94
- ) / abs(sin(ph.theta))
96
+ # If phonon arrives from below, then it's bottom scattering:
97
+ if self.depth and ph.z < (cf.thickness/2 - self.depth):
98
+ scattering_types.holes = in_plane_surface_scattering(ph, cf.top_roughness)
99
+ return
100
+
101
+ # Otherwise, calculate coordinate y of the intersection with the hole side:
102
+ y1 = (self.y0 - y) + cos(ph.theta) * (self.size_x / 2 - abs(self.x0 - x)) / abs(sin(ph.theta))
95
103
 
96
104
  # Scattering on the left wall:
97
105
  if abs(y1) <= self.size_y / 2 and x < self.x0:
@@ -15,7 +15,7 @@ from freepaths.config import cf
15
15
  from freepaths.run_phonon import run_phonon
16
16
  from freepaths.phonon import Phonon
17
17
  from freepaths.flight import Flight
18
- from freepaths.data import ScatteringData, GeneralData, SegmentData, PathData
18
+ from freepaths.data import ScatteringData, GeneralData, SegmentData, PathData, TriangleScatteringData
19
19
  from freepaths.progress import Progress
20
20
  from freepaths.materials import Si, SiC, Graphite
21
21
  from freepaths.maps import ScatteringMap, ThermalMaps
@@ -45,6 +45,7 @@ def main(input_file):
45
45
  scatter_stats = ScatteringData()
46
46
  general_stats = GeneralData()
47
47
  segment_stats = SegmentData()
48
+ places_stats = TriangleScatteringData()
48
49
  path_stats = PathData()
49
50
  scatter_maps = ScatteringMap()
50
51
  thermal_maps = ThermalMaps()
@@ -67,7 +68,7 @@ def main(input_file):
67
68
  flight = Flight(phonon)
68
69
 
69
70
  # Run this phonon through the structure:
70
- run_phonon(phonon, flight, scatter_stats, segment_stats, thermal_maps, scatter_maps, material)
71
+ run_phonon(phonon, flight, scatter_stats, places_stats, segment_stats, thermal_maps, scatter_maps, material)
71
72
 
72
73
  # Heat capacity, Ref. PRB 88 155318 (2013):
73
74
  omega = 2 * math.pi * phonon.f
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: freepaths
3
- Version: 2.0
3
+ Version: 2.0.1
4
4
  Summary: Phonon Monte Carlo simulator
5
5
  Home-page: https://github.com/anufrievroman/freepaths
6
6
  Author: Roman Anufriev
@@ -11,12 +11,12 @@ Classifier: License :: OSI Approved :: GNU General Public License (GPL)
11
11
  Classifier: Environment :: Console
12
12
  Classifier: Natural Language :: English
13
13
  Classifier: Operating System :: OS Independent
14
- Classifier: Programming Language :: Python :: 3.7
15
- Classifier: Programming Language :: Python :: 3.8
16
14
  Classifier: Programming Language :: Python :: 3.9
17
15
  Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Topic :: Utilities
19
- Requires-Python: ~=3.8
19
+ Requires-Python: ~=3.11
20
20
  Description-Content-Type: text/markdown
21
21
  Requires-Dist: numpy
22
22
  Requires-Dist: matplotlib
@@ -25,17 +25,17 @@ setuptools.setup(
25
25
  },
26
26
  install_requires=['numpy', 'matplotlib', 'scipy', 'imageio', 'colorama'],
27
27
  version=version,
28
- python_requires='~=3.8',
28
+ python_requires='~=3.11',
29
29
  classifiers=[
30
30
  "Development Status :: 4 - Beta",
31
31
  "License :: OSI Approved :: GNU General Public License (GPL)",
32
32
  "Environment :: Console",
33
33
  "Natural Language :: English",
34
34
  "Operating System :: OS Independent",
35
- "Programming Language :: Python :: 3.7",
36
- "Programming Language :: Python :: 3.8",
37
35
  "Programming Language :: Python :: 3.9",
38
36
  "Programming Language :: Python :: 3.10",
37
+ "Programming Language :: Python :: 3.11",
38
+ "Programming Language :: Python :: 3.12",
39
39
  "Topic :: Utilities",
40
40
  ],
41
41
  packages=["freepaths"],
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes