Ejemplo n.º 1
0
    def test_modelchain_example_flh(self):
        # tests full load hours
        weather = mc_e.get_weather_data('weather.csv')
        my_turbine, e126, dummy_turbine = mc_e.initialize_wind_turbines()
        mc_e.calculate_power_output(weather, my_turbine, e126, dummy_turbine)

        assert_allclose(2764.194772, (e126.power_output.sum() /
                                      e126.nominal_power), 0.01)
        assert_allclose(1882.7567, (my_turbine.power_output.sum() /
                                    my_turbine.nominal_power), 0.01)
Ejemplo n.º 2
0
def run_example():
    r"""
    Runs the example.

    """
    weather = mc_e.get_weather_data("weather.csv")
    my_turbine, e126, dummy_turbine = mc_e.initialize_wind_turbines()
    example_farm, example_farm_2 = initialize_wind_farms(my_turbine, e126)
    example_cluster = initialize_wind_turbine_cluster(example_farm,
                                                      example_farm_2)
    calculate_power_output(weather, example_farm, example_cluster)
    plot_or_print(example_farm, example_cluster)
Ejemplo n.º 3
0
 def test_turbine_cluster_modelchain_example_flh(self):
     # tests full load hours
     weather = mc_e.get_weather_data('weather.csv')
     my_turbine, e126, dummy_turbine = mc_e.initialize_wind_turbines()
     example_farm, example_farm_2 = tc_mc_e.initialize_wind_farms(
         my_turbine, e126)
     example_cluster = tc_mc_e.initialize_wind_turbine_cluster(
         example_farm, example_farm_2)
     tc_mc_e.calculate_power_output(weather, example_farm, example_cluster)
     assert_allclose(1956.164053, (example_farm.power_output.sum() /
                                   example_farm.nominal_power), 0.01)
     assert_allclose(2156.794154, (example_cluster.power_output.sum() /
                                   example_cluster.nominal_power), 0.01)