Skip to content

Commit 9593489

Browse files
authored
Merge pull request #54 from statnett/move-albedo-to-weather
Moved albedo to weather, no longer a conductor parameter.
2 parents 2a24fd4 + 10d60a4 commit 9593489

9 files changed

+62
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ span = linerate.Span(
5252
conductor=conductor,
5353
start_tower=start_tower,
5454
end_tower=end_tower,
55-
ground_albedo=0.15,
5655
num_conductors=1,
5756
)
5857

@@ -61,6 +60,7 @@ weather = linerate.Weather(
6160
air_temperature=20,
6261
wind_direction=np.radians(80), # Conductor azimuth is 0, so angle of attack is 80
6362
wind_speed=1.66,
63+
ground_albedo=0.15,
6464
clearness_ratio=0.5,
6565
)
6666

linerate/models/cigre601.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def compute_solar_heating(
5454
self, conductor_temperature: Celsius, current: Ampere
5555
) -> WattPerMeter:
5656
alpha_s = self.span.conductor.solar_absorptivity
57-
F = self.span.ground_albedo
57+
F = self.weather.ground_albedo
5858
phi = self.span.latitude
5959
gamma_c = self.span.conductor_azimuth
6060
y = self.span.conductor_altitude

linerate/types.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ class Span:
104104
#: Container for the metadata of the second tower of the span
105105
end_tower: Tower
106106

107-
#: :math:`F`. The ground albedo.
108-
ground_albedo: Unitless
109-
110107
#: Number of conductors in the span. 1 for simplex, 2 for duplex and 3 for triplex.
111108
num_conductors: Unitless
112109

@@ -173,6 +170,8 @@ class Weather:
173170
wind_direction: Radian
174171
#: :math:`v~\left[\text{m}~\text{s}^{-1}\right]`. Wind velocity
175172
wind_speed: MeterPerSecond
173+
#: :math:`F`. The ground albedo.
174+
ground_albedo: Unitless
176175
#: :math:`N_s`. The clearness ratio (or clearness number in
177176
#: :cite:p:`sharma1965interrelationships,cigre207`).
178177
clearness_ratio: Unitless = 1

tests/acceptance_tests/test_cigre_ampacity_cases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ def example_weather_b():
5757
air_temperature=20,
5858
wind_direction=np.radians(80), # Conductor azimuth is 0, so angle of attack is 80
5959
wind_speed=1.66,
60+
ground_albedo=0.15,
6061
clearness_ratio=0.5,
6162
)
6263

@@ -69,7 +70,6 @@ def example_span_b(drake_conductor_b):
6970
conductor=drake_conductor_b,
7071
start_tower=start_tower,
7172
end_tower=end_tower,
72-
ground_albedo=0.15,
7373
num_conductors=1,
7474
)
7575

tests/acceptance_tests/test_ieee_ampacity_cases.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def example_weather_B():
3333
air_temperature=40,
3434
wind_direction=np.radians(90),
3535
wind_speed=0.61,
36+
ground_albedo=0.5,
3637
clearness_ratio=1,
3738
)
3839

@@ -45,7 +46,6 @@ def example_span_B(drake_conductor_B):
4546
conductor=drake_conductor_B,
4647
start_tower=start_tower,
4748
end_tower=end_tower,
48-
ground_albedo=0.5,
4949
num_conductors=1,
5050
)
5151

@@ -71,7 +71,6 @@ def example_span_C(drake_conductor_B):
7171
conductor=drake_conductor_B,
7272
start_tower=start_tower,
7373
end_tower=end_tower,
74-
ground_albedo=0.5,
7574
num_conductors=2,
7675
)
7776

tests/acceptance_tests/test_ratekit_ampacity_cases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def example_weather_a():
3535
air_temperature=np.array(30),
3636
wind_direction=np.radians(0),
3737
wind_speed=0.60,
38+
ground_albedo=0.0,
3839
clearness_ratio=1,
3940
)
4041

@@ -47,7 +48,6 @@ def example_span_a(parrot_conductor):
4748
conductor=parrot_conductor,
4849
start_tower=start_tower,
4950
end_tower=end_tower,
50-
ground_albedo=0.0,
5151
num_conductors=1,
5252
)
5353

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
"""Test cases from Annex E of CIGRE TB 601."""
2+
3+
import numpy as np
4+
import pytest
5+
6+
import linerate
7+
8+
9+
@pytest.fixture
10+
def drake_conductor_a():
11+
return linerate.Conductor(
12+
core_diameter=10.4e-3,
13+
conductor_diameter=28.1e-3,
14+
outer_layer_strand_diameter=4.4e-3,
15+
emissivity=0.8,
16+
solar_absorptivity=0.8,
17+
temperature1=25,
18+
temperature2=75,
19+
resistance_at_temperature2=8.688e-5,
20+
resistance_at_temperature1=7.283e-5,
21+
aluminium_cross_section_area=float("nan"),
22+
constant_magnetic_effect=1,
23+
current_density_proportional_magnetic_effect=0,
24+
max_magnetic_core_relative_resistance_increase=1,
25+
)
26+
27+
28+
@pytest.fixture
29+
def example_weather_a():
30+
return linerate.Weather(
31+
air_temperature=40,
32+
wind_direction=np.radians(30), # Conductor azimuth is 90, so 90 - 30 is 30
33+
wind_speed=0.61,
34+
ground_albedo=0.1,
35+
clearness_ratio=1,
36+
)
37+
38+
39+
@pytest.fixture
40+
def example_span_a(drake_conductor_a):
41+
start_tower = linerate.Tower(latitude=30, longitude=0.0001, altitude=0)
42+
end_tower = linerate.Tower(latitude=30, longitude=-0.0001, altitude=0)
43+
return linerate.Span(
44+
conductor=drake_conductor_a,
45+
start_tower=start_tower,
46+
end_tower=end_tower,
47+
num_conductors=1,
48+
)
49+
50+
51+
@pytest.fixture
52+
def example_model_a(example_span_a, example_weather_a):
53+
return linerate.Cigre601(example_span_a, example_weather_a, np.datetime64("2016-06-10 11:00"))

tests/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def example_weather_a():
4545
air_temperature=40,
4646
wind_direction=np.radians(30), # Conductor azimuth is 90, so 90 - 30 is 30
4747
wind_speed=0.61,
48+
ground_albedo=0.1,
4849
clearness_ratio=1,
4950
)
5051

@@ -57,7 +58,6 @@ def example_span_1_conductor(drake_conductor_a):
5758
conductor=drake_conductor_a,
5859
start_tower=start_tower,
5960
end_tower=end_tower,
60-
ground_albedo=0.1,
6161
num_conductors=1,
6262
)
6363

@@ -70,7 +70,6 @@ def example_span_2_conductors(drake_conductor_a):
7070
conductor=drake_conductor_a,
7171
start_tower=start_tower,
7272
end_tower=end_tower,
73-
ground_albedo=0.1,
7473
num_conductors=2,
7574
)
7675

tests/integration_tests/test_vectorization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def get_zeros(index, length):
3434
air_temperature=get_zeros(13, 25),
3535
wind_direction=get_zeros(14, 25),
3636
wind_speed=get_zeros(15, 25),
37+
ground_albedo=get_zeros(23, 25),
3738
clearness_ratio=get_zeros(16, 25),
3839
)
3940
span = linerate.Span(
@@ -48,7 +49,6 @@ def get_zeros(index, length):
4849
0.1 + get_zeros(21, 25),
4950
10 + get_zeros(22, 25),
5051
),
51-
ground_albedo=get_zeros(23, 25),
5252
num_conductors=1,
5353
)
5454
time = np.array([np.datetime64("2022-01-01")]).reshape([1] * 25)

0 commit comments

Comments
 (0)