naturedynamics 1.3__tar.gz → 1.4__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 (147) hide show
  1. {naturedynamics-1.3 → naturedynamics-1.4}/PKG-INFO +1 -1
  2. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/__init__.py +1 -1
  3. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/constants.py +10 -0
  4. naturedynamics-1.4/naturedynamics/geophysics/convection.py +133 -0
  5. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/utils/conversions.py +1 -0
  6. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/utils/units.py +3 -0
  7. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics.egg-info/PKG-INFO +1 -1
  8. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics.egg-info/SOURCES.txt +1 -0
  9. {naturedynamics-1.3 → naturedynamics-1.4}/pyproject.toml +1 -1
  10. {naturedynamics-1.3 → naturedynamics-1.4}/LICENSE +0 -0
  11. {naturedynamics-1.3 → naturedynamics-1.4}/README.md +0 -0
  12. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/applications/__init__.py +0 -0
  13. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/applications/energy.py +0 -0
  14. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/applications/engineering.py +0 -0
  15. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/applications/environmental.py +0 -0
  16. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/applications/medical.py +0 -0
  17. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/astrophysics/__init__.py +0 -0
  18. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/astrophysics/atmospheric.py +0 -0
  19. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/astrophysics/cosmology.py +0 -0
  20. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/astrophysics/galactic.py +0 -0
  21. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/astrophysics/insolation.py +0 -0
  22. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/astrophysics/magnetism.py +0 -0
  23. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/astrophysics/orbital.py +0 -0
  24. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/astrophysics/photometry.py +0 -0
  25. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/astrophysics/planetary.py +0 -0
  26. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/astrophysics/stellar.py +0 -0
  27. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/astrophysics/tidal.py +0 -0
  28. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/biophysics/__init__.py +0 -0
  29. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/biophysics/biomechanics.py +0 -0
  30. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/biophysics/diffusion.py +0 -0
  31. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/biophysics/membrane.py +0 -0
  32. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/biophysics/neuroscience.py +0 -0
  33. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/biophysics/photosynthesis.py +0 -0
  34. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/computational/__init__.py +0 -0
  35. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/computational/finite_elements.py +0 -0
  36. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/computational/monte_carlo.py +0 -0
  37. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/computational/numerical_methods.py +0 -0
  38. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/computational/optimization.py +0 -0
  39. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/data/CIE_CMF.py +0 -0
  40. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/data/__init__.py +0 -0
  41. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/data/materials/__init__.py +0 -0
  42. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/data/materials/materials.py +0 -0
  43. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/data/spectroscopic_data/__init__.py +0 -0
  44. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/data/spectroscopic_data/spectra.py +0 -0
  45. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/electromagnetism/__init__.py +0 -0
  46. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/electromagnetism/circuits.py +0 -0
  47. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/electromagnetism/electrostatics.py +0 -0
  48. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/electromagnetism/magnetostatics.py +0 -0
  49. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/electromagnetism/maxwell.py +0 -0
  50. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/electromagnetism/optics.py +0 -0
  51. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/electromagnetism/waves.py +0 -0
  52. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/experimental/__init__.py +0 -0
  53. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/experimental/data_analysis.py +0 -0
  54. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/experimental/error_analysis.py +0 -0
  55. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/experimental/instrumentation.py +0 -0
  56. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/experimental/measurement.py +0 -0
  57. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/geophysics/__init__.py +0 -0
  58. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/geophysics/plate_kinematics.py +0 -0
  59. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/laws/__init__.py +0 -0
  60. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/laws/conservation.py +0 -0
  61. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/laws/electromagnetic.py +0 -0
  62. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/laws/momentum.py +0 -0
  63. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/laws/newtons_laws.py +0 -0
  64. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/laws/work_energy.py +0 -0
  65. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mathematical/__init__.py +0 -0
  66. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mathematical/complex_analysis.py +0 -0
  67. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mathematical/differential_equations.py +0 -0
  68. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mathematical/group_theory.py +0 -0
  69. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mathematical/mathematical_neuroscience.py +0 -0
  70. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mathematical/special_functions.py +0 -0
  71. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mathematical/tensor_calculus.py +0 -0
  72. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mechanics/__init__.py +0 -0
  73. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mechanics/continuum.py +0 -0
  74. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mechanics/dynamics.py +0 -0
  75. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mechanics/fluid_mechanics.py +0 -0
  76. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mechanics/kinematics.py +0 -0
  77. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mechanics/lagrangian.py +0 -0
  78. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mechanics/rotational_mechanics.py +0 -0
  79. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mechanics/sound.py +0 -0
  80. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mechanics/statics.py +0 -0
  81. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/mechanics/stress_strain.py +0 -0
  82. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/nuclear/__init__.py +0 -0
  83. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/nuclear/binding_energy.py +0 -0
  84. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/nuclear/decay.py +0 -0
  85. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/nuclear/fission_fusion.py +0 -0
  86. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/nuclear/particles.py +0 -0
  87. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/nuclear/reactions.py +0 -0
  88. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/oscillations/__init__.py +0 -0
  89. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/oscillations/acoustics.py +0 -0
  90. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/oscillations/coupled_oscillators.py +0 -0
  91. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/oscillations/shm.py +0 -0
  92. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/oscillations/vibrations.py +0 -0
  93. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/oscillations/wave_oscillation.py +0 -0
  94. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/plasma/__init__.py +0 -0
  95. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/plasma/basic.py +0 -0
  96. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/plasma/kinetic.py +0 -0
  97. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/plasma/magnetohydrodynamics.py +0 -0
  98. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/plasma/waves.py +0 -0
  99. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/quantum/__init__.py +0 -0
  100. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/quantum/harmonic_oscillator.py +0 -0
  101. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/quantum/hydrogen_atom.py +0 -0
  102. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/quantum/operators.py +0 -0
  103. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/quantum/perturbation.py +0 -0
  104. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/quantum/spin.py +0 -0
  105. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/quantum/statistics.py +0 -0
  106. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/quantum/tunneling.py +0 -0
  107. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/quantum/wave_functions.py +0 -0
  108. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/relativity/__init__.py +0 -0
  109. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/relativity/cosmology.py +0 -0
  110. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/relativity/general.py +0 -0
  111. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/relativity/spacetime.py +0 -0
  112. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/relativity/special.py +0 -0
  113. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/solidstate/__init__.py +0 -0
  114. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/solidstate/crystal_structure.py +0 -0
  115. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/solidstate/electronic.py +0 -0
  116. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/solidstate/magnetic.py +0 -0
  117. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/solidstate/phonons.py +0 -0
  118. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/solidstate/superconductivity.py +0 -0
  119. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/solutions/__init__.py +0 -0
  120. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/solutions/atomic.py +0 -0
  121. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/solutions/field_theory.py +0 -0
  122. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/solutions/molecular.py +0 -0
  123. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/solutions/operators.py +0 -0
  124. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/solutions/statistical.py +0 -0
  125. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/statistical_mechanics/__init__.py +0 -0
  126. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/statistical_mechanics/critical_phenomena.py +0 -0
  127. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/statistical_mechanics/distributions.py +0 -0
  128. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/statistical_mechanics/partition_functions.py +0 -0
  129. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/statistical_mechanics/quantum_statistics.py +0 -0
  130. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/thermodynamics/__init__.py +0 -0
  131. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/thermodynamics/heat_engines.py +0 -0
  132. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/thermodynamics/heat_transfer.py +0 -0
  133. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/thermodynamics/laws.py +0 -0
  134. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/thermodynamics/phase_transitions.py +0 -0
  135. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/tools/__init__.py +0 -0
  136. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/tools/calculators.py +0 -0
  137. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/tools/exporters.py +0 -0
  138. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/tools/simulators.py +0 -0
  139. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/tools/visualizers.py +0 -0
  140. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/utils/__init__.py +0 -0
  141. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/utils/decorators.py +0 -0
  142. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/utils/plotting.py +0 -0
  143. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics/utils/validators.py +0 -0
  144. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics.egg-info/dependency_links.txt +0 -0
  145. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics.egg-info/requires.txt +0 -0
  146. {naturedynamics-1.3 → naturedynamics-1.4}/naturedynamics.egg-info/top_level.txt +0 -0
  147. {naturedynamics-1.3 → naturedynamics-1.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: naturedynamics
3
- Version: 1.3
3
+ Version: 1.4
4
4
  Summary: A comprehensive physics library providing constants, equations, and formulas
5
5
  Author-email: Fabian Schober <reach@fabianschober.com>
6
6
  License: MIT
@@ -2,4 +2,4 @@
2
2
 
3
3
  from . import constants
4
4
 
5
- __version__ = "1.3"
5
+ __version__ = "1.4"
@@ -276,6 +276,13 @@ CHAPMAN_FERRARO_FACTOR = 2.0 # boundary currents roughly double the field
276
276
  BOW_SHOCK_STANDOFF_RATIO = 1.3 # bow shock / magnetopause distance
277
277
  MAGNETOTAIL_LENGTH_RATIO = 20.0 # tail length / magnetopause, very loose
278
278
  EARTH_ORBITAL_PERIOD = 31558149.504
279
+
280
+ # Earth's mantle, the reference of mantle convection (Turcotte & Schubert,
281
+ # Geodynamics, 3rd ed., 2014): thermal expansivity (1/K), thermal
282
+ # diffusivity (m^2/s) and conductivity (W/(m K)).
283
+ MANTLE_THERMAL_EXPANSIVITY = 3e-5
284
+ MANTLE_THERMAL_DIFFUSIVITY = 1e-6
285
+ MANTLE_THERMAL_CONDUCTIVITY = 4.0
279
286
  MOON_ORBITAL_PERIOD = 2.360592e6
280
287
  MOON_DISTANCE = 3.844e8
281
288
 
@@ -540,6 +547,9 @@ __all__ = [
540
547
  "BOW_SHOCK_STANDOFF_RATIO",
541
548
  "MAGNETOTAIL_LENGTH_RATIO",
542
549
  "EARTH_ORBITAL_PERIOD",
550
+ "MANTLE_THERMAL_EXPANSIVITY",
551
+ "MANTLE_THERMAL_DIFFUSIVITY",
552
+ "MANTLE_THERMAL_CONDUCTIVITY",
543
553
  "MOON_ORBITAL_PERIOD",
544
554
  "MOON_DISTANCE",
545
555
  # Conversion Factors
@@ -0,0 +1,133 @@
1
+ """Mantle convection by boundary-layer theory: how vigorously a planet's
2
+ mantle turns over, how much heat it carries, and the heat that drives it.
3
+
4
+ Formulas follow Turcotte & Schubert, *Geodynamics* (3rd ed., Cambridge
5
+ University Press, 2014), https://doi.org/10.1017/CBO9780511843877: the
6
+ Rayleigh number of a layer heated from below (ch. 6), its Nusselt number
7
+ from boundary-layer scaling (Nu ~ Ra^(1/3)), and the heat production of
8
+ the long-lived radioactive isotopes (ch. 4, table 4.2), with the bulk
9
+ silicate Earth's concentrations of McDonough & Sun 1995,
10
+ https://doi.org/10.1016/0009-2541(94)00140-4. SI units throughout; ages
11
+ in years.
12
+ """
13
+
14
+ import math
15
+
16
+ #: Present heat production per kg of isotope (W/kg), its half-life (years)
17
+ #: and its present mass fraction in the bulk silicate Earth, the mantle
18
+ #: and crust together: (heat, half_life, concentration). Uranium is 99.27%
19
+ #: U-238 and 0.72% U-235 by mass, potassium 0.0128% K-40.
20
+ ISOTOPES = {
21
+ "U-238": (9.46e-5, 4.47e9, 20.3e-9 * 0.9927),
22
+ "U-235": (5.69e-4, 7.04e8, 20.3e-9 * 0.0072),
23
+ "Th-232": (2.64e-5, 1.40e10, 79.5e-9),
24
+ "K-40": (2.92e-5, 1.25e9, 240e-6 * 1.28e-4),
25
+ }
26
+
27
+ #: Earth's age (years), the moment the concentrations above are measured.
28
+ EARTH_AGE = 4.5e9
29
+
30
+
31
+ def rayleigh_number(
32
+ density, gravity, expansivity, temperature_difference, depth, diffusivity, viscosity
33
+ ):
34
+ """
35
+ Rayleigh number of a fluid layer heated from below: buoyancy against
36
+ viscous drag and thermal diffusion, Ra = rho g alpha dT d^3 / (kappa eta)
37
+ (Turcotte & Schubert eq. 6.319). Convection sets in above ~10^3; Earth's
38
+ mantle is ~10^7.
39
+
40
+ Args:
41
+ density (float): rho (kg/m^3)
42
+ gravity (float): g (m/s^2)
43
+ expansivity (float): alpha, thermal expansion (1/K)
44
+ temperature_difference (float): dT across the layer (K)
45
+ depth (float): d, the layer's thickness (m)
46
+ diffusivity (float): kappa, thermal diffusivity (m^2/s)
47
+ viscosity (float): eta, dynamic viscosity (Pa s)
48
+
49
+ Returns:
50
+ float: Ra (dimensionless)
51
+ """
52
+ return (
53
+ density
54
+ * gravity
55
+ * expansivity
56
+ * temperature_difference
57
+ * depth**3
58
+ / (diffusivity * viscosity)
59
+ )
60
+
61
+
62
+ def nusselt_number(rayleigh, critical_rayleigh=1100.0, exponent=1 / 3):
63
+ """
64
+ Convective heat flow over conductive heat flow, from boundary-layer
65
+ scaling: Nu = (Ra / Ra_c)^beta above the onset of convection, 1 below
66
+ it (Turcotte & Schubert section 6.21; beta = 1/3 for a layer whose
67
+ boundary layers set the heat flow).
68
+
69
+ Args:
70
+ rayleigh (float): Ra
71
+ critical_rayleigh (float): Ra_c, where convection begins
72
+ exponent (float): beta
73
+
74
+ Returns:
75
+ float: Nu (dimensionless), at least 1
76
+ """
77
+ return max(1.0, (rayleigh / critical_rayleigh) ** exponent)
78
+
79
+
80
+ def convective_heat_flux(conductivity, temperature_difference, depth, nusselt):
81
+ """
82
+ Heat flow out of a convecting layer: Nu times what conduction alone
83
+ would carry, q = Nu k dT / d.
84
+
85
+ Args:
86
+ conductivity (float): k (W/(m K))
87
+ temperature_difference (float): dT across the layer (K)
88
+ depth (float): d (m)
89
+ nusselt (float): Nu
90
+
91
+ Returns:
92
+ float: q (W/m^2)
93
+ """
94
+ return nusselt * conductivity * temperature_difference / depth
95
+
96
+
97
+ def radiogenic_heat_production(age, abundance=1.0):
98
+ """
99
+ Heat produced per kg of rock by U-238, U-235, Th-232 and K-40 in a body
100
+ `age` years old that formed with `abundance` times the bulk silicate
101
+ Earth's initial concentrations. Each isotope decays as exp(-lambda t),
102
+ so going back from Earth's present each concentration grows by
103
+ exp(lambda (EARTH_AGE - age)): a newly formed Earth made about five
104
+ times today's heat (4.9).
105
+
106
+ Args:
107
+ age (float): years since the body formed
108
+ abundance (float): initial concentrations relative to Earth's
109
+
110
+ Returns:
111
+ float: H (W/kg)
112
+ """
113
+ return abundance * sum(
114
+ heat * concentration * math.exp(math.log(2) / half_life * (EARTH_AGE - age))
115
+ for heat, half_life, concentration in ISOTOPES.values()
116
+ )
117
+
118
+
119
+ def convection_degree(radius, mantle_depth, aspect_ratio):
120
+ """
121
+ The spherical-harmonic degree of convection cells `aspect_ratio` times
122
+ as wide as the mantle is deep: the number of rising-and-sinking pairs
123
+ that fit around a great circle, l = 2 pi R / (2 a d), at least 1.
124
+
125
+ Args:
126
+ radius (float): R, the planet's radius (m)
127
+ mantle_depth (float): d (m)
128
+ aspect_ratio (float): a, cell width over depth
129
+
130
+ Returns:
131
+ int: l
132
+ """
133
+ return max(1, round(2 * math.pi * radius / (2 * aspect_ratio * mantle_depth)))
@@ -265,6 +265,7 @@ VELOCITY_CONVERSIONS = {
265
265
  "mph": 0.44704,
266
266
  "ft/s": 0.3048,
267
267
  "knot": 0.514444,
268
+ "mm/yr": 1e-3 / 31557600.0,
268
269
  "c": SPEED_OF_LIGHT,
269
270
  }
270
271
 
@@ -114,6 +114,7 @@ class VelocityUnit(Enum):
114
114
  MPH = "mph"
115
115
  FT_S = "ft/s"
116
116
  KNOT = "knot"
117
+ MM_YR = "mm/yr" # plate motion
117
118
  C = "c" # speed of light
118
119
 
119
120
 
@@ -198,6 +199,8 @@ class IdentityUnit(Enum):
198
199
  TIDAL_GRADIENT = "m/s²/m"
199
200
  MOLAR_MASS = "kg/mol"
200
201
  SPECIFIC_GAS_CONSTANT = "J/(kg·K)"
202
+ VISCOSITY = "Pa·s"
203
+ HEAT_PRODUCTION = "W/kg"
201
204
  MAGNETIC_MOMENT = "A·m²"
202
205
 
203
206
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: naturedynamics
3
- Version: 1.3
3
+ Version: 1.4
4
4
  Summary: A comprehensive physics library providing constants, equations, and formulas
5
5
  Author-email: Fabian Schober <reach@fabianschober.com>
6
6
  License: MIT
@@ -54,6 +54,7 @@ naturedynamics/experimental/error_analysis.py
54
54
  naturedynamics/experimental/instrumentation.py
55
55
  naturedynamics/experimental/measurement.py
56
56
  naturedynamics/geophysics/__init__.py
57
+ naturedynamics/geophysics/convection.py
57
58
  naturedynamics/geophysics/plate_kinematics.py
58
59
  naturedynamics/laws/__init__.py
59
60
  naturedynamics/laws/conservation.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "naturedynamics"
7
- version = "1.3"
7
+ version = "1.4"
8
8
  authors = [{name = "Fabian Schober", email = "reach@fabianschober.com"}]
9
9
  description = "A comprehensive physics library providing constants, equations, and formulas"
10
10
  readme = "README.md"
File without changes
File without changes
File without changes