unitforge 0.5.18__tar.gz → 0.5.19__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 (133) hide show
  1. {unitforge-0.5.18 → unitforge-0.5.19}/Cargo.lock +2 -2
  2. {unitforge-0.5.18 → unitforge-0.5.19}/Cargo.toml +2 -2
  3. {unitforge-0.5.18 → unitforge-0.5.19}/PKG-INFO +1 -1
  4. {unitforge-0.5.18 → unitforge-0.5.19}/python/unitforge/__init__.pyi +270 -0
  5. {unitforge-0.5.18 → unitforge-0.5.19}/src/lib.rs +10 -0
  6. unitforge-0.5.19/src/quantities/heat_transfer_coefficient.rs +41 -0
  7. unitforge-0.5.19/src/quantities/stefan_boltzmann_coefficient.rs +49 -0
  8. unitforge-0.5.19/src/quantities/temperature_cubed.rs +35 -0
  9. unitforge-0.5.19/src/quantities/temperature_power_four.rs +35 -0
  10. unitforge-0.5.19/src/quantities/temperature_squared.rs +35 -0
  11. {unitforge-0.5.18 → unitforge-0.5.19}/src/relations.rs +14 -0
  12. unitforge-0.5.19/tests/radiation.rs +171 -0
  13. {unitforge-0.5.18 → unitforge-0.5.19}/tests/test_quantities.py +32 -0
  14. {unitforge-0.5.18 → unitforge-0.5.19}/tests/typecheck/mypy_smoke.py +13 -0
  15. {unitforge-0.5.18 → unitforge-0.5.19}/unitforge_macros/Cargo.toml +1 -1
  16. {unitforge-0.5.18 → unitforge-0.5.19}/.gitignore +0 -0
  17. {unitforge-0.5.18 → unitforge-0.5.19}/.gitlab-ci.yml +0 -0
  18. {unitforge-0.5.18 → unitforge-0.5.19}/Readme.md +0 -0
  19. {unitforge-0.5.18 → unitforge-0.5.19}/Readme_py.md +0 -0
  20. {unitforge-0.5.18 → unitforge-0.5.19}/install_hooks.sh +0 -0
  21. {unitforge-0.5.18 → unitforge-0.5.19}/pyproject.toml +0 -0
  22. {unitforge-0.5.18 → unitforge-0.5.19}/python/unitforge/__init__.py +0 -0
  23. {unitforge-0.5.18 → unitforge-0.5.19}/python/unitforge/py.typed +0 -0
  24. {unitforge-0.5.18 → unitforge-0.5.19}/scripts/generate_python_stubs.py +0 -0
  25. {unitforge-0.5.18 → unitforge-0.5.19}/src/errors.rs +0 -0
  26. {unitforge-0.5.18 → unitforge-0.5.19}/src/impl_macros.rs +0 -0
  27. {unitforge-0.5.18 → unitforge-0.5.19}/src/internal.rs +0 -0
  28. {unitforge-0.5.18 → unitforge-0.5.19}/src/prelude.rs +0 -0
  29. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/acceleration.rs +0 -0
  30. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/angle.rs +0 -0
  31. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/angular_acceleration.rs +0 -0
  32. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/angular_velocity.rs +0 -0
  33. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/area.rs +0 -0
  34. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/area_of_moment.rs +0 -0
  35. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/charge.rs +0 -0
  36. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/compliance.rs +0 -0
  37. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/density.rs +0 -0
  38. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/density_rate.rs +0 -0
  39. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/density_temperature.rs +0 -0
  40. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/density_temperature_rate.rs +0 -0
  41. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/distance.rs +0 -0
  42. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/distance_per_stress.rs +0 -0
  43. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/dynamic_viscosity.rs +0 -0
  44. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/force.rs +0 -0
  45. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/force_area.rs +0 -0
  46. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/force_distance.rs +0 -0
  47. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/force_div_distance_power_four.rs +0 -0
  48. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/force_per_volume.rs +0 -0
  49. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/force_rate.rs +0 -0
  50. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/force_stress.rs +0 -0
  51. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/force_time.rs +0 -0
  52. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/force_volume.rs +0 -0
  53. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/frequency.rs +0 -0
  54. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/heat_capacity.rs +0 -0
  55. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/heat_flux.rs +0 -0
  56. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/inverse_angle.rs +0 -0
  57. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/inverse_area.rs +0 -0
  58. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/inverse_distance.rs +0 -0
  59. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/inverse_stress.rs +0 -0
  60. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/inverse_temperature.rs +0 -0
  61. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/mass.rs +0 -0
  62. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/mass_flow_rate.rs +0 -0
  63. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/mass_per_distance.rs +0 -0
  64. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/molar_mass.rs +0 -0
  65. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/power.rs +0 -0
  66. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/pressure_rate.rs +0 -0
  67. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/rotational_damping.rs +0 -0
  68. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/rotational_stiffness.rs +0 -0
  69. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/specific_energy.rs +0 -0
  70. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/specific_gas_constant.rs +0 -0
  71. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/specific_heat_capacity.rs +0 -0
  72. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/stiffness.rs +0 -0
  73. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/strain.rs +0 -0
  74. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/strain_rate.rs +0 -0
  75. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/strain_squared.rs +0 -0
  76. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/stress.rs +0 -0
  77. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/stress_cubed.rs +0 -0
  78. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/stress_per_temperature.rs +0 -0
  79. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/stress_rate.rs +0 -0
  80. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/stress_rate_per_temperature.rs +0 -0
  81. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/stress_squared.rs +0 -0
  82. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/temperature.rs +0 -0
  83. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/temperature_gradient.rs +0 -0
  84. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/thermal_conductance.rs +0 -0
  85. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/thermal_conductivity.rs +0 -0
  86. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/time.rs +0 -0
  87. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/translational_damping.rs +0 -0
  88. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/universal_gas_constant.rs +0 -0
  89. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/velocity.rs +0 -0
  90. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/velocity_squared.rs +0 -0
  91. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/voltage.rs +0 -0
  92. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/volume.rs +0 -0
  93. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/volumetric_energy_density.rs +0 -0
  94. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/volumetric_flow_rate.rs +0 -0
  95. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities/volumetric_heat_capacity.rs +0 -0
  96. {unitforge-0.5.18 → unitforge-0.5.19}/src/quantities.template.rs +0 -0
  97. {unitforge-0.5.18 → unitforge-0.5.19}/src/small_linalg/bindings/matrix3_py.template.rs +0 -0
  98. {unitforge-0.5.18 → unitforge-0.5.19}/src/small_linalg/bindings/vector3_py.template.rs +0 -0
  99. {unitforge-0.5.18 → unitforge-0.5.19}/src/small_linalg/matrix2.rs +0 -0
  100. {unitforge-0.5.18 → unitforge-0.5.19}/src/small_linalg/matrix2x3.rs +0 -0
  101. {unitforge-0.5.18 → unitforge-0.5.19}/src/small_linalg/matrix3.rs +0 -0
  102. {unitforge-0.5.18 → unitforge-0.5.19}/src/small_linalg/matrix3x2.rs +0 -0
  103. {unitforge-0.5.18 → unitforge-0.5.19}/src/small_linalg/vector2.rs +0 -0
  104. {unitforge-0.5.18 → unitforge-0.5.19}/src/small_linalg/vector3.rs +0 -0
  105. {unitforge-0.5.18 → unitforge-0.5.19}/test.sh +0 -0
  106. {unitforge-0.5.18 → unitforge-0.5.19}/tests/common/mod.rs +0 -0
  107. {unitforge-0.5.18 → unitforge-0.5.19}/tests/flow_rates.rs +0 -0
  108. {unitforge-0.5.18 → unitforge-0.5.19}/tests/matrix2.rs +0 -0
  109. {unitforge-0.5.18 → unitforge-0.5.19}/tests/matrix2x3.rs +0 -0
  110. {unitforge-0.5.18 → unitforge-0.5.19}/tests/matrix3.rs +0 -0
  111. {unitforge-0.5.18 → unitforge-0.5.19}/tests/matrix3_eigen.rs +0 -0
  112. {unitforge-0.5.18 → unitforge-0.5.19}/tests/matrix3x2.rs +0 -0
  113. {unitforge-0.5.18 → unitforge-0.5.19}/tests/ndarray_dot.rs +0 -0
  114. {unitforge-0.5.18 → unitforge-0.5.19}/tests/quantities.rs +0 -0
  115. {unitforge-0.5.18 → unitforge-0.5.19}/tests/quantity_core/constants.rs +0 -0
  116. {unitforge-0.5.18 → unitforge-0.5.19}/tests/quantity_core/construction.rs +0 -0
  117. {unitforge-0.5.18 → unitforge-0.5.19}/tests/quantity_core/enum_iter.rs +0 -0
  118. {unitforge-0.5.18 → unitforge-0.5.19}/tests/quantity_core/metadata.rs +0 -0
  119. {unitforge-0.5.18 → unitforge-0.5.19}/tests/quantity_core/normalization.rs +0 -0
  120. {unitforge-0.5.18 → unitforge-0.5.19}/tests/quantity_core/plain_storage.rs +0 -0
  121. {unitforge-0.5.18 → unitforge-0.5.19}/tests/quantity_core/relations.rs +0 -0
  122. {unitforge-0.5.18 → unitforge-0.5.19}/tests/quantity_core/runtime_quantity.rs +0 -0
  123. {unitforge-0.5.18 → unitforge-0.5.19}/tests/quantity_core/scalar_edges.rs +0 -0
  124. {unitforge-0.5.18 → unitforge-0.5.19}/tests/quantity_core/unit_factors.rs +0 -0
  125. {unitforge-0.5.18 → unitforge-0.5.19}/tests/quantity_core.rs +0 -0
  126. {unitforge-0.5.18 → unitforge-0.5.19}/tests/quantity_serde.rs +0 -0
  127. {unitforge-0.5.18 → unitforge-0.5.19}/tests/small_linalg_edge_cases.rs +0 -0
  128. {unitforge-0.5.18 → unitforge-0.5.19}/tests/small_linalg_interfaces.rs +0 -0
  129. {unitforge-0.5.18 → unitforge-0.5.19}/tests/test_small_linalg.py +0 -0
  130. {unitforge-0.5.18 → unitforge-0.5.19}/tests/thermal_transient.rs +0 -0
  131. {unitforge-0.5.18 → unitforge-0.5.19}/tests/vector2.rs +0 -0
  132. {unitforge-0.5.18 → unitforge-0.5.19}/tests/vector3.rs +0 -0
  133. {unitforge-0.5.18 → unitforge-0.5.19}/unitforge_macros/src/lib.rs +0 -0
@@ -351,7 +351,7 @@ checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
351
351
 
352
352
  [[package]]
353
353
  name = "unitforge"
354
- version = "0.5.18"
354
+ version = "0.5.19"
355
355
  dependencies = [
356
356
  "ndarray",
357
357
  "num-traits",
@@ -367,7 +367,7 @@ dependencies = [
367
367
 
368
368
  [[package]]
369
369
  name = "unitforge_macros"
370
- version = "0.5.18"
370
+ version = "0.5.19"
371
371
  dependencies = [
372
372
  "regex",
373
373
  ]
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "unitforge"
3
- version = "0.5.18"
3
+ version = "0.5.19"
4
4
  edition = "2021"
5
5
  authors = ["Dr.Q team <info@askdrq.com>", "Henrik Stromberg <henrik@askdrq.com>"]
6
6
  description = "A library for unit and quantity consistent computations in Rust"
@@ -20,7 +20,7 @@ pyo3 = { version = "0.28.3", features = ["extension-module", "auto-initialize",
20
20
  numpy = { version = "0.28.0", optional = true }
21
21
  strum = { version = "0.28.0", optional = true }
22
22
  strum_macros = { version = "0.28.0", optional = true }
23
- unitforge_macros = { version = "0.5.18", path = "unitforge_macros" }
23
+ unitforge_macros = { version = "0.5.19", path = "unitforge_macros" }
24
24
 
25
25
  [features]
26
26
  default = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unitforge
3
- Version: 0.5.18
3
+ Version: 0.5.19
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -330,6 +330,8 @@ class Area:
330
330
  @overload
331
331
  def __mul__(self, rhs: "HeatFlux") -> "Power": ...
332
332
  @overload
333
+ def __mul__(self, rhs: "HeatTransferCoefficient") -> "ThermalConductance": ...
334
+ @overload
333
335
  def __mul__(self, rhs: "InverseArea") -> float: ...
334
336
  @overload
335
337
  def __mul__(self, rhs: "InverseDistance") -> "Distance": ...
@@ -1974,8 +1976,16 @@ class HeatFlux:
1974
1976
  @overload
1975
1977
  def __truediv__(self, rhs: "HeatFlux") -> float: ...
1976
1978
  @overload
1979
+ def __truediv__(self, rhs: "HeatTransferCoefficient") -> "Temperature": ...
1980
+ @overload
1981
+ def __truediv__(self, rhs: "StefanBoltzmannCoefficient") -> "TemperaturePowerFour": ...
1982
+ @overload
1983
+ def __truediv__(self, rhs: "Temperature") -> "HeatTransferCoefficient": ...
1984
+ @overload
1977
1985
  def __truediv__(self, rhs: "TemperatureGradient") -> "ThermalConductivity": ...
1978
1986
  @overload
1987
+ def __truediv__(self, rhs: "TemperaturePowerFour") -> "StefanBoltzmannCoefficient": ...
1988
+ @overload
1979
1989
  def __truediv__(self, rhs: "ThermalConductivity") -> "TemperatureGradient": ...
1980
1990
  @overload
1981
1991
  def __truediv__(self, rhs: "VolumetricFlowRate") -> "ForcePerDistancePowerFour": ...
@@ -1988,8 +1998,16 @@ class HeatFlux:
1988
1998
  @overload
1989
1999
  def __mod__(self, rhs: "HeatFlux") -> float: ...
1990
2000
  @overload
2001
+ def __mod__(self, rhs: "HeatTransferCoefficient") -> "Temperature": ...
2002
+ @overload
2003
+ def __mod__(self, rhs: "StefanBoltzmannCoefficient") -> "TemperaturePowerFour": ...
2004
+ @overload
2005
+ def __mod__(self, rhs: "Temperature") -> "HeatTransferCoefficient": ...
2006
+ @overload
1991
2007
  def __mod__(self, rhs: "TemperatureGradient") -> "ThermalConductivity": ...
1992
2008
  @overload
2009
+ def __mod__(self, rhs: "TemperaturePowerFour") -> "StefanBoltzmannCoefficient": ...
2010
+ @overload
1993
2011
  def __mod__(self, rhs: "ThermalConductivity") -> "TemperatureGradient": ...
1994
2012
  @overload
1995
2013
  def __mod__(self, rhs: "VolumetricFlowRate") -> "ForcePerDistancePowerFour": ...
@@ -1999,6 +2017,56 @@ class HeatFlux:
1999
2017
  def __repr__(self) -> str: ...
2000
2018
  def __str__(self) -> str: ...
2001
2019
 
2020
+ class HeatTransferCoefficientUnit:
2021
+ W_msqK: ClassVar["HeatTransferCoefficientUnit"]
2022
+ mW_msqK: ClassVar["HeatTransferCoefficientUnit"]
2023
+ kW_msqK: ClassVar["HeatTransferCoefficientUnit"]
2024
+
2025
+ class HeatTransferCoefficient:
2026
+ def __init__(self, value: float, unit: "HeatTransferCoefficientUnit") -> None: ...
2027
+ @classmethod
2028
+ def zero(cls: Type["HeatTransferCoefficient"]) -> "HeatTransferCoefficient": ...
2029
+ def to(self, unit: "HeatTransferCoefficientUnit") -> float: ...
2030
+ def close_abs(self, other: "HeatTransferCoefficient", threshold: "HeatTransferCoefficient") -> bool: ...
2031
+ def close_rel(self, other: "HeatTransferCoefficient", threshold: float) -> bool: ...
2032
+ def __neg__(self) -> "HeatTransferCoefficient": ...
2033
+ def __abs__(self) -> "HeatTransferCoefficient": ...
2034
+ def __add__(self, rhs: "HeatTransferCoefficient") -> "HeatTransferCoefficient": ...
2035
+ def __sub__(self, rhs: "HeatTransferCoefficient") -> "HeatTransferCoefficient": ...
2036
+ @overload
2037
+ def __mul__(self, rhs: float) -> "HeatTransferCoefficient": ...
2038
+ @overload
2039
+ def __mul__(self, rhs: Vector3) -> Vector3: ...
2040
+ @overload
2041
+ def __mul__(self, rhs: "Area") -> "ThermalConductance": ...
2042
+ @overload
2043
+ def __mul__(self, rhs: "Temperature") -> "HeatFlux": ...
2044
+ @overload
2045
+ def __mul__(self, rhs: Any) -> Any: ...
2046
+ @overload
2047
+ def __truediv__(self, rhs: float) -> "HeatTransferCoefficient": ...
2048
+ @overload
2049
+ def __truediv__(self, rhs: "HeatTransferCoefficient") -> float: ...
2050
+ @overload
2051
+ def __truediv__(self, rhs: "StefanBoltzmannCoefficient") -> "TemperatureCubed": ...
2052
+ @overload
2053
+ def __truediv__(self, rhs: "TemperatureCubed") -> "StefanBoltzmannCoefficient": ...
2054
+ @overload
2055
+ def __truediv__(self, rhs: Any) -> Any: ...
2056
+ @overload
2057
+ def __mod__(self, rhs: float) -> "HeatTransferCoefficient": ...
2058
+ @overload
2059
+ def __mod__(self, rhs: "HeatTransferCoefficient") -> float: ...
2060
+ @overload
2061
+ def __mod__(self, rhs: "StefanBoltzmannCoefficient") -> "TemperatureCubed": ...
2062
+ @overload
2063
+ def __mod__(self, rhs: "TemperatureCubed") -> "StefanBoltzmannCoefficient": ...
2064
+ @overload
2065
+ def __mod__(self, rhs: Any) -> Any: ...
2066
+ def __rmul__(self, rhs: float) -> "HeatTransferCoefficient": ...
2067
+ def __repr__(self) -> str: ...
2068
+ def __str__(self) -> str: ...
2069
+
2002
2070
  class InverseAngleUnit:
2003
2071
  _rad: ClassVar["InverseAngleUnit"]
2004
2072
 
@@ -2882,6 +2950,48 @@ class SpecificHeatCapacity:
2882
2950
  def __repr__(self) -> str: ...
2883
2951
  def __str__(self) -> str: ...
2884
2952
 
2953
+ class StefanBoltzmannCoefficientUnit:
2954
+ W_msqKpow4: ClassVar["StefanBoltzmannCoefficientUnit"]
2955
+
2956
+ class StefanBoltzmannCoefficient:
2957
+ def __init__(self, value: float, unit: "StefanBoltzmannCoefficientUnit") -> None: ...
2958
+ @classmethod
2959
+ def zero(cls: Type["StefanBoltzmannCoefficient"]) -> "StefanBoltzmannCoefficient": ...
2960
+ def to(self, unit: "StefanBoltzmannCoefficientUnit") -> float: ...
2961
+ def close_abs(self, other: "StefanBoltzmannCoefficient", threshold: "StefanBoltzmannCoefficient") -> bool: ...
2962
+ def close_rel(self, other: "StefanBoltzmannCoefficient", threshold: float) -> bool: ...
2963
+ def __neg__(self) -> "StefanBoltzmannCoefficient": ...
2964
+ def __abs__(self) -> "StefanBoltzmannCoefficient": ...
2965
+ def __add__(self, rhs: "StefanBoltzmannCoefficient") -> "StefanBoltzmannCoefficient": ...
2966
+ def __sub__(self, rhs: "StefanBoltzmannCoefficient") -> "StefanBoltzmannCoefficient": ...
2967
+ @overload
2968
+ def __mul__(self, rhs: float) -> "StefanBoltzmannCoefficient": ...
2969
+ @overload
2970
+ def __mul__(self, rhs: Vector3) -> Vector3: ...
2971
+ @overload
2972
+ def __mul__(self, rhs: "TemperatureCubed") -> "HeatTransferCoefficient": ...
2973
+ @overload
2974
+ def __mul__(self, rhs: "TemperaturePowerFour") -> "HeatFlux": ...
2975
+ @overload
2976
+ def __mul__(self, rhs: Any) -> Any: ...
2977
+ @overload
2978
+ def __truediv__(self, rhs: float) -> "StefanBoltzmannCoefficient": ...
2979
+ @overload
2980
+ def __truediv__(self, rhs: "StefanBoltzmannCoefficient") -> float: ...
2981
+ @overload
2982
+ def __truediv__(self, rhs: Any) -> Any: ...
2983
+ @overload
2984
+ def __mod__(self, rhs: float) -> "StefanBoltzmannCoefficient": ...
2985
+ @overload
2986
+ def __mod__(self, rhs: "StefanBoltzmannCoefficient") -> float: ...
2987
+ @overload
2988
+ def __mod__(self, rhs: Any) -> Any: ...
2989
+ def __rmul__(self, rhs: float) -> "StefanBoltzmannCoefficient": ...
2990
+ def __repr__(self) -> str: ...
2991
+ def __str__(self) -> str: ...
2992
+ @staticmethod
2993
+ def sigma() -> "StefanBoltzmannCoefficient": ...
2994
+
2885
2995
  class StiffnessUnit:
2886
2996
  N_mm: ClassVar["StiffnessUnit"]
2887
2997
  kN_mm: ClassVar["StiffnessUnit"]
@@ -3576,6 +3686,8 @@ class Temperature:
3576
3686
  @overload
3577
3687
  def __mul__(self, rhs: "HeatCapacity") -> "ForceDistance": ...
3578
3688
  @overload
3689
+ def __mul__(self, rhs: "HeatTransferCoefficient") -> "HeatFlux": ...
3690
+ @overload
3579
3691
  def __mul__(self, rhs: "InverseTemperature") -> "Strain": ...
3580
3692
  @overload
3581
3693
  def __mul__(self, rhs: "SpecificGasConstant") -> "VelocitySquared": ...
@@ -3586,6 +3698,12 @@ class Temperature:
3586
3698
  @overload
3587
3699
  def __mul__(self, rhs: "StressRatePerTemperature") -> "StressRate": ...
3588
3700
  @overload
3701
+ def __mul__(self, rhs: "Temperature") -> "TemperatureSquared": ...
3702
+ @overload
3703
+ def __mul__(self, rhs: "TemperatureCubed") -> "TemperaturePowerFour": ...
3704
+ @overload
3705
+ def __mul__(self, rhs: "TemperatureSquared") -> "TemperatureCubed": ...
3706
+ @overload
3589
3707
  def __mul__(self, rhs: "ThermalConductance") -> "Power": ...
3590
3708
  @overload
3591
3709
  def __mul__(self, rhs: "VolumetricHeatCapacity") -> "VolumetricEnergyDensity": ...
@@ -3615,6 +3733,54 @@ class Temperature:
3615
3733
  def __repr__(self) -> str: ...
3616
3734
  def __str__(self) -> str: ...
3617
3735
 
3736
+ class TemperatureCubedUnit:
3737
+ Kcb: ClassVar["TemperatureCubedUnit"]
3738
+
3739
+ class TemperatureCubed:
3740
+ def __init__(self, value: float, unit: "TemperatureCubedUnit") -> None: ...
3741
+ @classmethod
3742
+ def zero(cls: Type["TemperatureCubed"]) -> "TemperatureCubed": ...
3743
+ def to(self, unit: "TemperatureCubedUnit") -> float: ...
3744
+ def close_abs(self, other: "TemperatureCubed", threshold: "TemperatureCubed") -> bool: ...
3745
+ def close_rel(self, other: "TemperatureCubed", threshold: float) -> bool: ...
3746
+ def __neg__(self) -> "TemperatureCubed": ...
3747
+ def __abs__(self) -> "TemperatureCubed": ...
3748
+ def __add__(self, rhs: "TemperatureCubed") -> "TemperatureCubed": ...
3749
+ def __sub__(self, rhs: "TemperatureCubed") -> "TemperatureCubed": ...
3750
+ @overload
3751
+ def __mul__(self, rhs: float) -> "TemperatureCubed": ...
3752
+ @overload
3753
+ def __mul__(self, rhs: Vector3) -> Vector3: ...
3754
+ @overload
3755
+ def __mul__(self, rhs: "StefanBoltzmannCoefficient") -> "HeatTransferCoefficient": ...
3756
+ @overload
3757
+ def __mul__(self, rhs: "Temperature") -> "TemperaturePowerFour": ...
3758
+ @overload
3759
+ def __mul__(self, rhs: Any) -> Any: ...
3760
+ @overload
3761
+ def __truediv__(self, rhs: float) -> "TemperatureCubed": ...
3762
+ @overload
3763
+ def __truediv__(self, rhs: "Temperature") -> "TemperatureSquared": ...
3764
+ @overload
3765
+ def __truediv__(self, rhs: "TemperatureCubed") -> float: ...
3766
+ @overload
3767
+ def __truediv__(self, rhs: "TemperatureSquared") -> "Temperature": ...
3768
+ @overload
3769
+ def __truediv__(self, rhs: Any) -> Any: ...
3770
+ @overload
3771
+ def __mod__(self, rhs: float) -> "TemperatureCubed": ...
3772
+ @overload
3773
+ def __mod__(self, rhs: "Temperature") -> "TemperatureSquared": ...
3774
+ @overload
3775
+ def __mod__(self, rhs: "TemperatureCubed") -> float: ...
3776
+ @overload
3777
+ def __mod__(self, rhs: "TemperatureSquared") -> "Temperature": ...
3778
+ @overload
3779
+ def __mod__(self, rhs: Any) -> Any: ...
3780
+ def __rmul__(self, rhs: float) -> "TemperatureCubed": ...
3781
+ def __repr__(self) -> str: ...
3782
+ def __str__(self) -> str: ...
3783
+
3618
3784
  class TemperatureGradientUnit:
3619
3785
  K_m: ClassVar["TemperatureGradientUnit"]
3620
3786
  K_mm: ClassVar["TemperatureGradientUnit"]
@@ -3657,6 +3823,102 @@ class TemperatureGradient:
3657
3823
  def __repr__(self) -> str: ...
3658
3824
  def __str__(self) -> str: ...
3659
3825
 
3826
+ class TemperaturePowerFourUnit:
3827
+ Kpow4: ClassVar["TemperaturePowerFourUnit"]
3828
+
3829
+ class TemperaturePowerFour:
3830
+ def __init__(self, value: float, unit: "TemperaturePowerFourUnit") -> None: ...
3831
+ @classmethod
3832
+ def zero(cls: Type["TemperaturePowerFour"]) -> "TemperaturePowerFour": ...
3833
+ def to(self, unit: "TemperaturePowerFourUnit") -> float: ...
3834
+ def close_abs(self, other: "TemperaturePowerFour", threshold: "TemperaturePowerFour") -> bool: ...
3835
+ def close_rel(self, other: "TemperaturePowerFour", threshold: float) -> bool: ...
3836
+ def __neg__(self) -> "TemperaturePowerFour": ...
3837
+ def __abs__(self) -> "TemperaturePowerFour": ...
3838
+ def __add__(self, rhs: "TemperaturePowerFour") -> "TemperaturePowerFour": ...
3839
+ def __sub__(self, rhs: "TemperaturePowerFour") -> "TemperaturePowerFour": ...
3840
+ @overload
3841
+ def __mul__(self, rhs: float) -> "TemperaturePowerFour": ...
3842
+ @overload
3843
+ def __mul__(self, rhs: Vector3) -> Vector3: ...
3844
+ @overload
3845
+ def __mul__(self, rhs: "StefanBoltzmannCoefficient") -> "HeatFlux": ...
3846
+ @overload
3847
+ def __mul__(self, rhs: Any) -> Any: ...
3848
+ @overload
3849
+ def __truediv__(self, rhs: float) -> "TemperaturePowerFour": ...
3850
+ @overload
3851
+ def __truediv__(self, rhs: "Temperature") -> "TemperatureCubed": ...
3852
+ @overload
3853
+ def __truediv__(self, rhs: "TemperatureCubed") -> "Temperature": ...
3854
+ @overload
3855
+ def __truediv__(self, rhs: "TemperaturePowerFour") -> float: ...
3856
+ @overload
3857
+ def __truediv__(self, rhs: "TemperatureSquared") -> "TemperatureSquared": ...
3858
+ @overload
3859
+ def __truediv__(self, rhs: Any) -> Any: ...
3860
+ @overload
3861
+ def __mod__(self, rhs: float) -> "TemperaturePowerFour": ...
3862
+ @overload
3863
+ def __mod__(self, rhs: "Temperature") -> "TemperatureCubed": ...
3864
+ @overload
3865
+ def __mod__(self, rhs: "TemperatureCubed") -> "Temperature": ...
3866
+ @overload
3867
+ def __mod__(self, rhs: "TemperaturePowerFour") -> float: ...
3868
+ @overload
3869
+ def __mod__(self, rhs: "TemperatureSquared") -> "TemperatureSquared": ...
3870
+ @overload
3871
+ def __mod__(self, rhs: Any) -> Any: ...
3872
+ def __rmul__(self, rhs: float) -> "TemperaturePowerFour": ...
3873
+ def __repr__(self) -> str: ...
3874
+ def __str__(self) -> str: ...
3875
+ def sqrt(self) -> "TemperatureSquared": ...
3876
+
3877
+ class TemperatureSquaredUnit:
3878
+ Ksq: ClassVar["TemperatureSquaredUnit"]
3879
+
3880
+ class TemperatureSquared:
3881
+ def __init__(self, value: float, unit: "TemperatureSquaredUnit") -> None: ...
3882
+ @classmethod
3883
+ def zero(cls: Type["TemperatureSquared"]) -> "TemperatureSquared": ...
3884
+ def to(self, unit: "TemperatureSquaredUnit") -> float: ...
3885
+ def close_abs(self, other: "TemperatureSquared", threshold: "TemperatureSquared") -> bool: ...
3886
+ def close_rel(self, other: "TemperatureSquared", threshold: float) -> bool: ...
3887
+ def __neg__(self) -> "TemperatureSquared": ...
3888
+ def __abs__(self) -> "TemperatureSquared": ...
3889
+ def __add__(self, rhs: "TemperatureSquared") -> "TemperatureSquared": ...
3890
+ def __sub__(self, rhs: "TemperatureSquared") -> "TemperatureSquared": ...
3891
+ @overload
3892
+ def __mul__(self, rhs: float) -> "TemperatureSquared": ...
3893
+ @overload
3894
+ def __mul__(self, rhs: Vector3) -> Vector3: ...
3895
+ @overload
3896
+ def __mul__(self, rhs: "Temperature") -> "TemperatureCubed": ...
3897
+ @overload
3898
+ def __mul__(self, rhs: "TemperatureSquared") -> "TemperaturePowerFour": ...
3899
+ @overload
3900
+ def __mul__(self, rhs: Any) -> Any: ...
3901
+ @overload
3902
+ def __truediv__(self, rhs: float) -> "TemperatureSquared": ...
3903
+ @overload
3904
+ def __truediv__(self, rhs: "Temperature") -> "Temperature": ...
3905
+ @overload
3906
+ def __truediv__(self, rhs: "TemperatureSquared") -> float: ...
3907
+ @overload
3908
+ def __truediv__(self, rhs: Any) -> Any: ...
3909
+ @overload
3910
+ def __mod__(self, rhs: float) -> "TemperatureSquared": ...
3911
+ @overload
3912
+ def __mod__(self, rhs: "Temperature") -> "Temperature": ...
3913
+ @overload
3914
+ def __mod__(self, rhs: "TemperatureSquared") -> float: ...
3915
+ @overload
3916
+ def __mod__(self, rhs: Any) -> Any: ...
3917
+ def __rmul__(self, rhs: float) -> "TemperatureSquared": ...
3918
+ def __repr__(self) -> str: ...
3919
+ def __str__(self) -> str: ...
3920
+ def sqrt(self) -> "Temperature": ...
3921
+
3660
3922
  class ThermalConductanceUnit:
3661
3923
  mW_K: ClassVar["ThermalConductanceUnit"]
3662
3924
  W_K: ClassVar["ThermalConductanceUnit"]
@@ -3686,8 +3948,12 @@ class ThermalConductance:
3686
3948
  @overload
3687
3949
  def __truediv__(self, rhs: float) -> "ThermalConductance": ...
3688
3950
  @overload
3951
+ def __truediv__(self, rhs: "Area") -> "HeatTransferCoefficient": ...
3952
+ @overload
3689
3953
  def __truediv__(self, rhs: "Distance") -> "ThermalConductivity": ...
3690
3954
  @overload
3955
+ def __truediv__(self, rhs: "HeatTransferCoefficient") -> "Area": ...
3956
+ @overload
3691
3957
  def __truediv__(self, rhs: "MassFlowRate") -> "SpecificHeatCapacity": ...
3692
3958
  @overload
3693
3959
  def __truediv__(self, rhs: "SpecificGasConstant") -> "MassFlowRate": ...
@@ -3708,8 +3974,12 @@ class ThermalConductance:
3708
3974
  @overload
3709
3975
  def __mod__(self, rhs: float) -> "ThermalConductance": ...
3710
3976
  @overload
3977
+ def __mod__(self, rhs: "Area") -> "HeatTransferCoefficient": ...
3978
+ @overload
3711
3979
  def __mod__(self, rhs: "Distance") -> "ThermalConductivity": ...
3712
3980
  @overload
3981
+ def __mod__(self, rhs: "HeatTransferCoefficient") -> "Area": ...
3982
+ @overload
3713
3983
  def __mod__(self, rhs: "MassFlowRate") -> "SpecificHeatCapacity": ...
3714
3984
  @overload
3715
3985
  def __mod__(self, rhs: "SpecificGasConstant") -> "MassFlowRate": ...
@@ -55,6 +55,16 @@ unitforge_macros::generate_python_module_definition!();
55
55
  pub use prelude::*;
56
56
 
57
57
  pub mod quantities {
58
+ pub mod heat_transfer_coefficient;
59
+ pub use heat_transfer_coefficient::*;
60
+ pub mod temperature_power_four;
61
+ pub use temperature_power_four::*;
62
+ pub mod temperature_cubed;
63
+ pub use temperature_cubed::*;
64
+ pub mod temperature_squared;
65
+ pub use temperature_squared::*;
66
+ pub mod stefan_boltzmann_coefficient;
67
+ pub use stefan_boltzmann_coefficient::*;
58
68
  pub mod strain_rate;
59
69
  pub use strain_rate::*;
60
70
  pub mod dynamic_viscosity;
@@ -0,0 +1,41 @@
1
+ use crate::impl_macros::macros::*;
2
+
3
+ #[cfg_attr(feature = "strum", derive(EnumIter))]
4
+ #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5
+ #[derive(Copy, Clone, PartialEq, Debug, Hash, Eq)]
6
+ #[cfg_attr(feature = "pyo3", pyclass(eq, eq_int, from_py_object))]
7
+ pub enum HeatTransferCoefficientUnit {
8
+ W_msqK,
9
+ mW_msqK,
10
+ kW_msqK,
11
+ }
12
+
13
+ impl HeatTransferCoefficientUnit {
14
+ pub const fn base_per_x_const(self) -> (f64, i32) {
15
+ match self {
16
+ Self::W_msqK => (1., 0),
17
+ Self::mW_msqK => (1., -3),
18
+ Self::kW_msqK => (1., 3),
19
+ }
20
+ }
21
+ }
22
+
23
+ impl PhysicsUnit for HeatTransferCoefficientUnit {
24
+ fn name(&self) -> &str {
25
+ match self {
26
+ Self::W_msqK => "W/(m²·K)",
27
+ Self::mW_msqK => "mW/(m²·K)",
28
+ Self::kW_msqK => "kW/(m²·K)",
29
+ }
30
+ }
31
+ fn base_per_x(&self) -> (f64, i32) {
32
+ (*self).base_per_x_const()
33
+ }
34
+ }
35
+
36
+ impl_quantity!(
37
+ HeatTransferCoefficient,
38
+ HeatTransferCoefficientUnit,
39
+ [HeatTransferCoefficientUnit::W_msqK]
40
+ );
41
+ impl_div_with_self_to_f64!(HeatTransferCoefficient);
@@ -0,0 +1,49 @@
1
+ //! Radiation coefficient in W/(m²·K⁴).
2
+ //!
3
+ //! `StefanBoltzmannCoefficient::sigma()` is const-compatible and stores
4
+ //! 5.670374419e-8, a finite approximation to the exact physical constant.
5
+ //! Source: [NIST CODATA](https://physics.nist.gov/cgi-bin/cuu/Value?sigma).
6
+
7
+ use crate::impl_macros::macros::*;
8
+
9
+ #[cfg_attr(feature = "strum", derive(EnumIter))]
10
+ #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11
+ #[derive(Copy, Clone, PartialEq, Debug, Hash, Eq)]
12
+ #[cfg_attr(feature = "pyo3", pyclass(eq, eq_int, from_py_object))]
13
+ pub enum StefanBoltzmannCoefficientUnit {
14
+ W_msqKpow4,
15
+ }
16
+
17
+ impl StefanBoltzmannCoefficientUnit {
18
+ pub const fn base_per_x_const(self) -> (f64, i32) {
19
+ match self {
20
+ Self::W_msqKpow4 => (1., 0),
21
+ }
22
+ }
23
+ }
24
+
25
+ impl PhysicsUnit for StefanBoltzmannCoefficientUnit {
26
+ fn name(&self) -> &str {
27
+ match self {
28
+ Self::W_msqKpow4 => "W/(m²·K⁴)",
29
+ }
30
+ }
31
+ fn base_per_x(&self) -> (f64, i32) {
32
+ (*self).base_per_x_const()
33
+ }
34
+ }
35
+
36
+ impl_const!(
37
+ StefanBoltzmannCoefficient,
38
+ sigma,
39
+ "sigma",
40
+ 5.670_374_419,
41
+ -8
42
+ );
43
+
44
+ impl_quantity!(
45
+ StefanBoltzmannCoefficient,
46
+ StefanBoltzmannCoefficientUnit,
47
+ [StefanBoltzmannCoefficientUnit::W_msqKpow4]
48
+ );
49
+ impl_div_with_self_to_f64!(StefanBoltzmannCoefficient);
@@ -0,0 +1,35 @@
1
+ use crate::impl_macros::macros::*;
2
+
3
+ #[cfg_attr(feature = "strum", derive(EnumIter))]
4
+ #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5
+ #[derive(Copy, Clone, PartialEq, Debug, Hash, Eq)]
6
+ #[cfg_attr(feature = "pyo3", pyclass(eq, eq_int, from_py_object))]
7
+ pub enum TemperatureCubedUnit {
8
+ Kcb,
9
+ }
10
+
11
+ impl TemperatureCubedUnit {
12
+ pub const fn base_per_x_const(self) -> (f64, i32) {
13
+ match self {
14
+ Self::Kcb => (1., 0),
15
+ }
16
+ }
17
+ }
18
+
19
+ impl PhysicsUnit for TemperatureCubedUnit {
20
+ fn name(&self) -> &str {
21
+ match self {
22
+ Self::Kcb => "K³",
23
+ }
24
+ }
25
+ fn base_per_x(&self) -> (f64, i32) {
26
+ (*self).base_per_x_const()
27
+ }
28
+ }
29
+
30
+ impl_quantity!(
31
+ TemperatureCubed,
32
+ TemperatureCubedUnit,
33
+ [TemperatureCubedUnit::Kcb]
34
+ );
35
+ impl_div_with_self_to_f64!(TemperatureCubed);
@@ -0,0 +1,35 @@
1
+ use crate::impl_macros::macros::*;
2
+
3
+ #[cfg_attr(feature = "strum", derive(EnumIter))]
4
+ #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5
+ #[derive(Copy, Clone, PartialEq, Debug, Hash, Eq)]
6
+ #[cfg_attr(feature = "pyo3", pyclass(eq, eq_int, from_py_object))]
7
+ pub enum TemperaturePowerFourUnit {
8
+ Kpow4,
9
+ }
10
+
11
+ impl TemperaturePowerFourUnit {
12
+ pub const fn base_per_x_const(self) -> (f64, i32) {
13
+ match self {
14
+ Self::Kpow4 => (1., 0),
15
+ }
16
+ }
17
+ }
18
+
19
+ impl PhysicsUnit for TemperaturePowerFourUnit {
20
+ fn name(&self) -> &str {
21
+ match self {
22
+ Self::Kpow4 => "K⁴",
23
+ }
24
+ }
25
+ fn base_per_x(&self) -> (f64, i32) {
26
+ (*self).base_per_x_const()
27
+ }
28
+ }
29
+
30
+ impl_quantity!(
31
+ TemperaturePowerFour,
32
+ TemperaturePowerFourUnit,
33
+ [TemperaturePowerFourUnit::Kpow4]
34
+ );
35
+ impl_div_with_self_to_f64!(TemperaturePowerFour);
@@ -0,0 +1,35 @@
1
+ use crate::impl_macros::macros::*;
2
+
3
+ #[cfg_attr(feature = "strum", derive(EnumIter))]
4
+ #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5
+ #[derive(Copy, Clone, PartialEq, Debug, Hash, Eq)]
6
+ #[cfg_attr(feature = "pyo3", pyclass(eq, eq_int, from_py_object))]
7
+ pub enum TemperatureSquaredUnit {
8
+ Ksq,
9
+ }
10
+
11
+ impl TemperatureSquaredUnit {
12
+ pub const fn base_per_x_const(self) -> (f64, i32) {
13
+ match self {
14
+ Self::Ksq => (1., 0),
15
+ }
16
+ }
17
+ }
18
+
19
+ impl PhysicsUnit for TemperatureSquaredUnit {
20
+ fn name(&self) -> &str {
21
+ match self {
22
+ Self::Ksq => "K²",
23
+ }
24
+ }
25
+ fn base_per_x(&self) -> (f64, i32) {
26
+ (*self).base_per_x_const()
27
+ }
28
+ }
29
+
30
+ impl_quantity!(
31
+ TemperatureSquared,
32
+ TemperatureSquaredUnit,
33
+ [TemperatureSquaredUnit::Ksq]
34
+ );
35
+ impl_div_with_self_to_f64!(TemperatureSquared);
@@ -176,3 +176,17 @@ impl_mul_relation_with_other!(Compliance, Stiffness, f64);
176
176
  // Deliberately directional: preserve existing operator result types.
177
177
  impl_mul!(RotationalStiffness, AngularVelocity, Power);
178
178
  impl_div!(Power, AngularVelocity, RotationalStiffness);
179
+
180
+ // Radiation in absolute temperature; tangent coefficient is 4 * emissivity * sigma * T³.
181
+ impl_mul_relation_with_self!(Temperature, TemperatureSquared);
182
+ impl_mul_relation_with_other!(TemperatureSquared, Temperature, TemperatureCubed);
183
+ impl_mul_relation_with_other!(TemperatureCubed, Temperature, TemperaturePowerFour);
184
+ impl_mul_relation_with_self!(TemperatureSquared, TemperaturePowerFour);
185
+ impl_mul_relation_with_other!(StefanBoltzmannCoefficient, TemperaturePowerFour, HeatFlux);
186
+ impl_mul_relation_with_other!(
187
+ StefanBoltzmannCoefficient,
188
+ TemperatureCubed,
189
+ HeatTransferCoefficient
190
+ );
191
+ impl_mul_relation_with_other!(HeatTransferCoefficient, Temperature, HeatFlux);
192
+ impl_mul_relation_with_other!(HeatTransferCoefficient, Area, ThermalConductance);