Skip to content

PyWake API: default TI from Hornsrev1Site never overwritten when using timeseries input #71

Description

@MarcImberger

Description:

I am not sure if I just oversee something here, but this is what I observe: When using timeseries for single turbine type without the 'wind_turbine' dimension, pywake_api.py uses Hornsrev1Site() to create an instance of the site class (https://github.com/EUFLOW/WIFA/blob/main/wifa/pywake_api.py#L468). Hornsrev1Site() by default uses ti=0.1 (https://gitlab.windenergy.dtu.dk/TOPFARM/PyWake/-/blob/master/py_wake/examples/data/hornsrev1.py?ref_type=heads#L102). Further down TI gets processed from the turbulence_intensity variable (if present in the input data), but it's never added to 'site' (neither within _construct_timeseries_site() or within construct_site()) to overwrite Hornsrev1Site's default. Thus when running run_simulation with 'site' as input (https://github.com/EUFLOW/WIFA/blob/main/wifa/pywake_api.py#L1106), it still uses the default TI of 0.1 independently from what's specified in the time series of the 'turbulence_intensity' variable

Suggested fix:

After the Handle TI section (https://github.com/EUFLOW/WIFA/blob/main/wifa/pywake_api.py#L474) one could maybe add site.ds["TI"] = (("time",), TI)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions