def test_changing_rotor_diam(): wind_site = site model = WindPlant(wind_site, 20000) assert model.system_capacity_kw == 20000 ratings = range(50, 70, 5) for d in ratings: model.rotor_diameter = d assert model.rotor_diameter == d, "rotor diameter should be " + str(d) assert model.turb_rating == 1000, "new rating different when rotor diamter is " + str( d)
def test_changing_rotor_diam_recalc(): model = WindPlant(SiteInfo(flatirons_site), { 'num_turbines': 10, "turbine_rating_kw": 2000 }) assert model.system_capacity_kw == 20000 diams = range(50, 70, 140) for d in diams: model.rotor_diameter = d assert model.rotor_diameter == d, "rotor diameter should be " + str(d) assert model.turb_rating == 2000, "new rating different when rotor diameter is " + str( d)