linerate 2.2.1__py3-none-any.whl → 3.0.0__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.
@@ -35,9 +35,7 @@ class Cigre207(ThermalModel):
35
35
  )
36
36
 
37
37
  @_copy_method_docstring(ThermalModel)
38
- def compute_solar_heating(
39
- self, conductor_temperature: Celsius, current: Ampere
40
- ) -> WattPerMeter:
38
+ def compute_solar_heating(self) -> WattPerMeter:
41
39
  alpha_s = self.span.conductor.solar_absorptivity
42
40
  phi = self.span.latitude
43
41
  gamma_c = self.span.conductor_azimuth
@@ -74,9 +72,7 @@ class Cigre207(ThermalModel):
74
72
  )
75
73
 
76
74
  @_copy_method_docstring(ThermalModel)
77
- def compute_convective_cooling(
78
- self, conductor_temperature: Celsius, current: Ampere
79
- ) -> WattPerMeter:
75
+ def compute_convective_cooling(self, conductor_temperature: Celsius) -> WattPerMeter:
80
76
  D = self.span.conductor.conductor_diameter
81
77
  d = self.span.conductor.outer_layer_strand_diameter
82
78
  V = self.weather.wind_speed
@@ -126,10 +122,11 @@ class Cigre207(ThermalModel):
126
122
 
127
123
  @_copy_method_docstring(ThermalModel)
128
124
  def compute_radiative_cooling(
129
- self, conductor_temperature: Celsius, current: Ampere
125
+ self,
126
+ conductor_temperature: Celsius,
130
127
  ) -> WattPerMeter:
131
128
  return super().compute_radiative_cooling(
132
- conductor_temperature=conductor_temperature, current=current
129
+ conductor_temperature=conductor_temperature,
133
130
  )
134
131
 
135
132
  @_copy_method_docstring(ThermalModel)
@@ -22,12 +22,14 @@ from linerate.units import (
22
22
 
23
23
 
24
24
  class BaseCigre601(ThermalModel):
25
+ DEFAULT_MAX_REYNOLDS_NUMBER = 4000.0 # Max value of the angle correction in CIGRE601
26
+
25
27
  def __init__(
26
28
  self,
27
29
  span: Span,
28
30
  weather: BaseWeather,
29
31
  time: Date,
30
- max_reynolds_number: Unitless = 4000.0, # Max value of the angle correction in CIGRE601
32
+ max_reynolds_number: Unitless = DEFAULT_MAX_REYNOLDS_NUMBER,
31
33
  ):
32
34
  super().__init__(span, weather)
33
35
  self.time = time
@@ -49,7 +51,8 @@ class BaseCigre601(ThermalModel):
49
51
 
50
52
  @_copy_method_docstring(ThermalModel)
51
53
  def compute_convective_cooling(
52
- self, conductor_temperature: Celsius, current: Ampere
54
+ self,
55
+ conductor_temperature: Celsius,
53
56
  ) -> WattPerMeter:
54
57
  D = self.span.conductor.conductor_diameter
55
58
  d = self.span.conductor.outer_layer_strand_diameter
@@ -105,10 +108,11 @@ class BaseCigre601(ThermalModel):
105
108
 
106
109
  @_copy_method_docstring(ThermalModel)
107
110
  def compute_radiative_cooling(
108
- self, conductor_temperature: Celsius, current: Ampere
111
+ self,
112
+ conductor_temperature: Celsius,
109
113
  ) -> WattPerMeter:
110
114
  return super().compute_radiative_cooling(
111
- conductor_temperature=conductor_temperature, current=current
115
+ conductor_temperature=conductor_temperature,
112
116
  )
113
117
 
114
118
  def compute_temperature_gradient(
@@ -142,12 +146,14 @@ class BaseCigre601(ThermalModel):
142
146
 
143
147
 
144
148
  class Cigre601(BaseCigre601):
149
+ """Extension of the BaseCigre601 model that uses the solar radiation parametrisation in CIGRE601."""
150
+
145
151
  def __init__(
146
152
  self,
147
153
  span: Span,
148
154
  weather: Weather,
149
155
  time: Date,
150
- max_reynolds_number: Unitless = 4000.0, # Max value of the angle correction in CIGRE601
156
+ max_reynolds_number: Unitless = BaseCigre601.DEFAULT_MAX_REYNOLDS_NUMBER,
151
157
  ):
152
158
  self.span = span
153
159
  self.weather = weather
@@ -155,9 +161,7 @@ class Cigre601(BaseCigre601):
155
161
  self.max_reynolds_number = max_reynolds_number
156
162
 
157
163
  @_copy_method_docstring(ThermalModel)
158
- def compute_solar_heating(
159
- self, conductor_temperature: Celsius, current: Ampere
160
- ) -> WattPerMeter:
164
+ def compute_solar_heating(self) -> WattPerMeter:
161
165
  alpha_s = self.span.conductor.solar_absorptivity
162
166
  F = self.weather.ground_albedo
163
167
  y = self.span.conductor_altitude
@@ -183,18 +187,22 @@ class Cigre601(BaseCigre601):
183
187
 
184
188
 
185
189
  class Cigre601WithSolarRadiation(BaseCigre601):
186
- """Extension of the Cigre601 model that accepts external solar radiation data for direct and diffuse solar
190
+ """Extension of the BaseCigre601 model that accepts external solar radiation data for direct and diffuse solar
187
191
  radiation."""
188
192
 
189
- def __init__(self, span: Span, weather: WeatherWithSolarRadiation, time: Date):
193
+ def __init__(
194
+ self,
195
+ span: Span,
196
+ weather: WeatherWithSolarRadiation,
197
+ time: Date,
198
+ max_reynolds_number: Unitless = BaseCigre601.DEFAULT_MAX_REYNOLDS_NUMBER,
199
+ ):
190
200
  self.span = span
191
201
  self.weather = weather
192
202
  self.time = time
193
- self.weather = weather
203
+ self.max_reynolds_number = max_reynolds_number
194
204
 
195
- def compute_solar_heating(
196
- self, conductor_temperature: Celsius, current: Ampere
197
- ) -> WattPerMeter:
205
+ def compute_solar_heating(self) -> WattPerMeter:
198
206
  alpha_s = self.span.conductor.solar_absorptivity
199
207
  F = self.weather.ground_albedo
200
208
  D = self.span.conductor.conductor_diameter
@@ -34,7 +34,7 @@ class IEEE738(ThermalModel):
34
34
 
35
35
  @_copy_method_docstring(ThermalModel)
36
36
  def compute_solar_heating(
37
- self, conductor_temperature: Celsius, current: Ampere
37
+ self,
38
38
  ) -> WattPerMeter:
39
39
  alpha_s = self.span.conductor.solar_absorptivity # alpha in IEEE
40
40
  phi = self.span.latitude # Lat in IEEE
@@ -56,9 +56,7 @@ class IEEE738(ThermalModel):
56
56
  return ieee738.solar_heating.compute_solar_heating(alpha_s, Q_se, cos_theta, D)
57
57
 
58
58
  @_copy_method_docstring(ThermalModel)
59
- def compute_convective_cooling(
60
- self, conductor_temperature: Celsius, current: Ampere
61
- ) -> WattPerMeter:
59
+ def compute_convective_cooling(self, conductor_temperature: Celsius) -> WattPerMeter:
62
60
  D = self.span.conductor.conductor_diameter # D_0 in IEEE
63
61
  y = self.span.conductor_altitude # H_e in IEEE
64
62
  V = self.weather.wind_speed # V_w in IEEE
@@ -83,9 +81,7 @@ class IEEE738(ThermalModel):
83
81
  return ieee738.convective_cooling.compute_convective_cooling(q_cf, q_cn)
84
82
 
85
83
  @_copy_method_docstring(ThermalModel)
86
- def compute_radiative_cooling(
87
- self, conductor_temperature: Celsius, current: Ampere
88
- ) -> WattPerMeter:
84
+ def compute_radiative_cooling(self, conductor_temperature: Celsius) -> WattPerMeter:
89
85
  return super().compute_radiative_cooling(
90
- conductor_temperature=conductor_temperature, current=current
86
+ conductor_temperature=conductor_temperature,
91
87
  )
@@ -84,17 +84,10 @@ class ThermalModel(ABC):
84
84
 
85
85
  @abstractmethod
86
86
  def compute_solar_heating(
87
- self, conductor_temperature: Celsius, current: Ampere
87
+ self,
88
88
  ) -> WattPerMeter:
89
89
  r"""Compute the solar heating, :math:`P_S~\left[\text{W}~\text{m}^{-1}\right]`.
90
90
 
91
- Parameters
92
- ----------
93
- conductor_temperature:
94
- :math:`T_\text{av}~\left[^\circ\text{C}\right]`. The average conductor temperature.
95
- current:
96
- :math:`I~\left[\text{A}\right]`. The current.
97
-
98
91
  Returns
99
92
  -------
100
93
  Union[float, float64, ndarray[Any, dtype[float64]]]
@@ -104,7 +97,8 @@ class ThermalModel(ABC):
104
97
 
105
98
  @abstractmethod
106
99
  def compute_convective_cooling(
107
- self, conductor_temperature: Celsius, current: Ampere
100
+ self,
101
+ conductor_temperature: Celsius,
108
102
  ) -> WattPerMeter:
109
103
  r"""Compute the convective cooling, :math:`P_c~\left[\text{W}~\text{m}^{-1}\right]`.
110
104
 
@@ -112,8 +106,6 @@ class ThermalModel(ABC):
112
106
  ----------
113
107
  conductor_temperature:
114
108
  :math:`T_\text{av}~\left[^\circ\text{C}\right]`. The average conductor temperature.
115
- current:
116
- :math:`I~\left[\text{A}\right]`. The current.
117
109
 
118
110
  Returns
119
111
  -------
@@ -124,7 +116,8 @@ class ThermalModel(ABC):
124
116
 
125
117
  @abstractmethod
126
118
  def compute_radiative_cooling(
127
- self, conductor_temperature: Celsius, current: Ampere
119
+ self,
120
+ conductor_temperature: Celsius,
128
121
  ) -> WattPerMeter:
129
122
  r"""Compute the radiative cooling, :math:`P_r~\left[\text{W}~\text{m}^{-1}\right]`.
130
123
 
@@ -132,8 +125,6 @@ class ThermalModel(ABC):
132
125
  ----------
133
126
  conductor_temperature:
134
127
  :math:`T_\text{av}~\left[^\circ\text{C}\right]`. The average conductor temperature.
135
- current:
136
- :math:`I~\left[\text{A}\right]`. The current.
137
128
 
138
129
  Returns
139
130
  -------
@@ -163,9 +154,9 @@ class ThermalModel(ABC):
163
154
  :math:`P_J + P_s - P_c - P_r~\left[\text{W}~\text{m}^{-1}\right]`. The heat balance.
164
155
  """
165
156
  P_j = self.compute_joule_heating(conductor_temperature, current)
166
- P_s = self.compute_solar_heating(conductor_temperature, current)
167
- P_c = self.compute_convective_cooling(conductor_temperature, current)
168
- P_r = self.compute_radiative_cooling(conductor_temperature, current)
157
+ P_s = self.compute_solar_heating()
158
+ P_c = self.compute_convective_cooling(conductor_temperature)
159
+ P_r = self.compute_radiative_cooling(conductor_temperature)
169
160
  return P_j + P_s - P_c - P_r
170
161
 
171
162
  def compute_info(
@@ -186,10 +177,10 @@ class ThermalModel(ABC):
186
177
  A dictionary with the magnitude of the different heating and cooling effects.
187
178
  """
188
179
  return {
189
- "convective_cooling": self.compute_convective_cooling(conductor_temperature, current),
190
- "radiative_cooling": self.compute_radiative_cooling(conductor_temperature, current),
180
+ "convective_cooling": self.compute_convective_cooling(conductor_temperature),
181
+ "radiative_cooling": self.compute_radiative_cooling(conductor_temperature),
191
182
  "joule_heating": self.compute_joule_heating(conductor_temperature, current),
192
- "solar_heating": self.compute_solar_heating(conductor_temperature, current),
183
+ "solar_heating": self.compute_solar_heating(),
193
184
  }
194
185
 
195
186
  def compute_steady_state_ampacity(
linerate/units.py CHANGED
@@ -12,6 +12,7 @@ FloatOrFloatArray = Union[float, np.floating, npt.NDArray[np.floating]]
12
12
  BoolOrBoolArray = Union[bool, np.bool_, npt.NDArray[np.bool_]]
13
13
 
14
14
  OhmPerMeter = Annotated[FloatOrFloatArray, "Ω/m"]
15
+ OhmPerMeterPerCelsius = Annotated[FloatOrFloatArray, "Ω/(m °C)"]
15
16
  Ampere = Annotated[FloatOrFloatArray, "A"]
16
17
  Radian = Annotated[FloatOrFloatArray, "rad"]
17
18
  Degrees = Annotated[FloatOrFloatArray, "°"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: linerate
3
- Version: 2.2.1
3
+ Version: 3.0.0
4
4
  Summary: Library for computing line ampacity ratings for overhead lines
5
5
  Author-email: Statnett Datascience <Datascience.Drift@Statnett.no>, Yngve Mardal Moe <yngve.m.moe@gmail.com>
6
6
  Requires-Python: >=3.9
@@ -3,7 +3,7 @@ linerate/model.py,sha256=SUj4NunXdCctezpGeS62OQNmFGf5IKO2plYQlsGJLow,651
3
3
  linerate/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  linerate/solver.py,sha256=cXL7t_Q0otnCJnCScVuo7yWRVHrO4WGlw2DWBYivQA8,6724
5
5
  linerate/types.py,sha256=ygFECWP_DX1fWujvIrYPXDf4VcoSCf5T6srEybRomx8,7255
6
- linerate/units.py,sha256=MyJkBiHDfsJXHga_uW7yAGYVPCWtyfFtPiQxwkXIwl4,1478
6
+ linerate/units.py,sha256=cvBAup0l14xDMecfEM2T6sl3XEwwG5IHNKreR3Drtw0,1545
7
7
  linerate/equations/__init__.py,sha256=cNvISWCp5TbXv4gZ8SWPf0pICRpwDzLSaOxYy5lftsU,464
8
8
  linerate/equations/convective_cooling.py,sha256=K6-PxzUHBPOfGloE_uwao5dV0JuHFUmu3Pp_31qUi1g,1387
9
9
  linerate/equations/dimensionless.py,sha256=omvurTJUfCMLwqQNvi4Yz_sVeUXcENqaY6K_3GIuO0Y,5625
@@ -26,12 +26,12 @@ linerate/equations/ieee738/convective_cooling.py,sha256=fKUZVxFHMYSqx2Dmi6bJ1S2n
26
26
  linerate/equations/ieee738/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  linerate/equations/ieee738/solar_heating.py,sha256=l3uOUCexDShTW3jOfUw6EOHUY2azWxZuetMdn_8NrmM,4559
28
28
  linerate/models/Cigre207.md,sha256=FCKspzRL5zX9kH3gj1D78F6eUHJeET9yuvrhGs-PQBg,1685
29
- linerate/models/cigre207.py,sha256=vnVtF4Uaxwf9s6sSFeCFb70md-utrXFQTLhWRLoFIUI,5480
30
- linerate/models/cigre601.py,sha256=aFPiZBnZ6ihQ8bpiToldkhMSfps_8tEuJXxDarJaWK0,7932
31
- linerate/models/ieee738.py,sha256=5hRsXisb177AdN3xXfL9qBBQxWAVFYl1O2l7fciqiU4,4281
32
- linerate/models/thermal_model.py,sha256=uRnqDZMQO_YnvPTZ37wEtEF2RHKxbUqUjyrRmz_lO-o,11311
33
- linerate-2.2.1.dist-info/licenses/LICENSE,sha256=HDUtv1ujna13BmYSP7JtGGsG5kGPAaZY2C2qJrANAOo,1059
34
- linerate-2.2.1.dist-info/METADATA,sha256=pYArGqT9-_NS9FIv-aYVZein97h6H6kNqG7QNeB1fk0,4285
35
- linerate-2.2.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
36
- linerate-2.2.1.dist-info/top_level.txt,sha256=xHXGAzhQ04AqJCM-MG30tP_me8vBQ9PMlRWsbMLJdgE,9
37
- linerate-2.2.1.dist-info/RECORD,,
29
+ linerate/models/cigre207.py,sha256=T0VNoytzxcEl81tyxvkYnBt55pMhuy_nAaGzpUt9W4g,5362
30
+ linerate/models/cigre601.py,sha256=ZwK3YTI_1aPgGcH4Khc6ZCP3PWH7LYtWh1A4AToIxsw,8077
31
+ linerate/models/ieee738.py,sha256=uHYtYoplTVwAMYduiYwRwAvpexnzP6puPIZU6aP-z7o,4155
32
+ linerate/models/thermal_model.py,sha256=swjYA9EyKS05tfwg0wVG-kr9N3iDtfonvzr4-pmseb4,10760
33
+ linerate-3.0.0.dist-info/licenses/LICENSE,sha256=HDUtv1ujna13BmYSP7JtGGsG5kGPAaZY2C2qJrANAOo,1059
34
+ linerate-3.0.0.dist-info/METADATA,sha256=XX-KIV0-vrqI0I3qpCxlDt7Ky3mLpMabSFrpAK9ykVc,4285
35
+ linerate-3.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
36
+ linerate-3.0.0.dist-info/top_level.txt,sha256=xHXGAzhQ04AqJCM-MG30tP_me8vBQ9PMlRWsbMLJdgE,9
37
+ linerate-3.0.0.dist-info/RECORD,,