Beispiel #1
0
def test_fuga_downwind_vs_notebook():

    powerCtFunction = PowerCtTabular([0, 100], [0, 0], 'w',
                                     [0.850877, 0.850877])
    wt = WindTurbine(name='',
                     diameter=80,
                     hub_height=70,
                     powerCtFunction=powerCtFunction)

    path = tfp + 'fuga/2MW/Z0=0.00001000Zi=00400Zeta0=0.00E+00'
    site = UniformSite([1, 0, 0, 0], ti=0.075)
    wfm_ULT = PropagateDownwind(site, wt, FugaYawDeficit(path))
    WS = 10
    p = Path(tfp) / "fuga/v80_wake_4d_y_no_deflection.csv"
    y, notebook_deficit_4d = np.array(
        [v.split(",") for v in p.read_text().strip().split("\n")],
        dtype=float).T
    sim_res = wfm_ULT([0], [0], wd=270, ws=WS, yaw=[[[17.4493]]])
    fm = sim_res.flow_map(XYGrid(4 * wt.diameter(), y=y))
    npt.assert_allclose(fm.WS_eff.squeeze() - WS,
                        notebook_deficit_4d,
                        atol=1e-6)

    if 0:
        plt.plot(y, notebook_deficit_4d, label='Notebook deficit 4d')
        plt.plot(y, fm.WS_eff.squeeze() - WS)
        plt.show()
    plt.close('all')
Beispiel #2
0
def test_fuga_deflection_time_series_gradient_evaluation():

    p = Path(tfp) / "fuga/v80_wake_center_x.csv"
    x, notebook_wake_center = np.array([v.split(",") for v in p.read_text().strip().split("\n")], dtype=float).T

    powerCtFunction = PowerCtTabular([0, 100], [0, 0], 'w', [0.850877, 0.850877])
    wt = WindTurbine(name='', diameter=80, hub_height=70, powerCtFunction=powerCtFunction)

    path = tfp + 'fuga/2MW/Z0=0.00001000Zi=00400Zeta0=0.00E+00'
    site = UniformSite([1, 0, 0, 0], ti=0.075)

    wfm = PropagateDownwind(
        site,
        wt,
        wake_deficitModel=FugaYawDeficit(path),
        deflectionModel=FugaDeflection(path, 'input_par')
    )

    WS = 10

    yaw_ref = np.full((10, 1), 17)
    yaw_step = np.eye(10, 10) * 1e-6 + yaw_ref
    yaw = np.concatenate([yaw_step, yaw_ref], axis=1)
    sim_res = wfm(np.arange(10) * wt.diameter() * 4, [0] * 10, yaw=yaw, wd=[270] * 11, ws=[WS] * 11, time=True)
    print(sim_res)