Exemplo n.º 1
0
 def __init__(self, yaml_filename=iea37_path + 'iea37-335mw.yaml'):
     name, hub_height, diameter, ct_func, power_func = read_iea37_windturbine(
         yaml_filename)
     super().__init__(name,
                      diameter,
                      hub_height,
                      ct_func,
                      power_func,
                      power_unit='W')
Exemplo n.º 2
0
def get_iea37_constraints(n_wt=9):
    """Constraints for IEA Task 37 wind farms

    Parameters
    ----------
    n_wt : int, optional
        Number of wind turbines in farm (must be valid IEA 37 farm)

    Returns
    -------
    constr : list of topfarm constraints
        Spacing constraint and boundary constraint for IEA 37 model
    """
    diam = read_iea37_windturbine(iea37_path + 'iea37-335mw.yaml')[2]
    spac_constr = SpacingConstraint(2 * diam)
    bound_rad = npa([900, 1300, 2000, 3000])[n_wt == npa([9, 16, 36, 64])][0]
    bound_constr = CircleBoundaryConstraint((0, 0), bound_rad)
    return [spac_constr, bound_constr]
Exemplo n.º 3
0
def test_read_iea_windturbine():
    wt_id, hubheight, diameter, ct, power, dct, dpower = read_iea37_windturbine(
        iea37_path + 'iea37-335mw.yaml')
    assert wt_id == "3.35MW"
    assert hubheight == 110
    assert diameter == 130

    u = np.arange(30)
    p_r = 3350000
    npt.assert_array_almost_equal([0, 1 / 5.8**3 * p_r, p_r, p_r, 0],
                                  power([4, 5, 9.8, 25, 25.1]))
    ct_ = 4 * 1 / 3 * (1 - 1 / 3)
    npt.assert_array_almost_equal([0, ct_, ct_, 0], ct([3.9, 4, 25, 25.1]))
    npt.assert_almost_equal(dpower(7), cs(power)(7))
    npt.assert_equal(dct(7), 0)
    if 0:
        import matplotlib.pyplot as plt
        plt.plot(u, power(u) / 1e6)
        plt.plot(u, ct(u))
        plt.show()