Skip to content

Commit 9d81f9f

Browse files
committed
Move modelchain parameters to functions and add parameters
1 parent d0a74d4 commit 9d81f9f

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

tests/test_modelchain.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ def setup_class(self):
1515
'd_rotor': 80,
1616
'turbine_name': 'ENERCON E 126 7500',
1717
'fetch_curve': 'p'}
18-
self.test_modelchain = {'wind_model': 'logarithmic',
19-
'rho_model': 'barometric',
20-
'temperature_model': 'gradient'}
21-
self.test_mc = mc.ModelChain(wt.WindTurbine(**self.test_turbine),
22-
**self.test_modelchain)
2318

2419
def test_v_wind_hub(self):
20+
# Test modelchain with wind_model='logarithmic'
21+
test_mc = mc.ModelChain(wt.WindTurbine(**self.test_turbine),
22+
wind_model='logarithmic')
23+
# Test modelchain with wind_model='hellman'
24+
test_mc_2 = mc.ModelChain(wt.WindTurbine(**self.test_turbine),
25+
wind_model='hellman')
2526
weather = {'v_wind': pd.Series(data=[5.0, 6.5]),
2627
'v_wind_2': pd.Series(data=[4.0, 5.0]),
2728
'z0': 0.15}
@@ -62,6 +63,16 @@ def test_v_wind_hub(self):
6263
v_wind_exp)
6364

6465
def test_rho_hub(self):
66+
# Test modelchain with rho_model='barometric' and
67+
# temperature_model='gradient'
68+
test_mc = mc.ModelChain(wt.WindTurbine(**self.test_turbine),
69+
rho_model='barometric',
70+
temperature_model='gradient')
71+
# Test modelchain with rho_model='ideal_gas' and
72+
# temperature_model='interpolation'
73+
test_mc_2 = mc.ModelChain(wt.WindTurbine(**self.test_turbine),
74+
rho_model='ideal_gas',
75+
temperature_model='interpolation')
6576
weather = {'temp_air': pd.Series(data=[267, 268]),
6677
'temp_air_2': pd.Series(data=[267, 266]),
6778
'pressure': pd.Series(data=[101125, 101000])}

0 commit comments

Comments
 (0)