Turbine

class onwards.Turbine(farm: Farm, i_wt: int, snrs_args: dict, est_args: list)

Bases: object

Inits Turbine

Turbine objects gather the wind turbines measurements, m_wt, and translate them into the estimated wind turbine states, s_wt.

\[\mathbf{m}_{wt} \rightarrow \mathbf{\hat{s}}_{wt}\]
Parameters
  • farm (Farm) – Parent farm object.

  • i_wt (int) – Index of the wind turbine (in the parent Farm object).

  • snrs_args (dict) – Dictionary containing the parameters used for the turbines Sensors initialization (refer to Sensors).

  • est_args (dict) – Dictionary containing the parameters used for the turbines Estimators initialization (refer to Estimator).

__init_sensors__(snrs_args: dict)

Inits the Turbine’s Sensors

Sensors provide easy interfacing between OnWaRDS and the data source. The Sensors.get_buffer_data('m_wt') method allows to access some measurement, m_wt, at the current time, t.

Parameters

snrs_args (dict) – Dictionary containing the parameters used for the turbines Sensors initialization (refer to Sensors).

Note

The user can implement his own Sensors objects following the Sensors prototype class. These Sensors subclass should be named Sensors_myname and saved to a file named onwards_sensors_myname.py available in the python path.

See also

Sensors

__init_states__(est_args: dict)

Inits the Turbine’s Estimators

Estimator translate the wind measurements, m_wt, into the estimated wind turbine states, s_wt.

\[\mathbf{m}_{wt} \rightarrow \mathbf{\hat{s}}_{wt}\]
Parameters

est_args (dict) –

Dictionary containing the parameters used for the turbines Estimators initialization.

Available fields:

estimatiori

(dict) - Dictionary containing the Estimator’s parameters where i is the estimator index. Estimator type retrieved from dict['type']. At least one estimator is required.

n_substeps

(int, optional) - Number of (Sensors) time steps between two successive states update, by default 1.

export_args

(str, optional) - Dictionary containing the Estimators’s export parameters (refer to StateExportBuffer).

Raises

Exception – If some of the state defined by MINIMAL_STATES are not computed.

Note

The user can implement his own Estimator objects following the Estimator prototype class. These Estimator subclass should be named Estimator_myname and saved to a file named onwards_estimator_myname.py available in the python path.

Estimators are applied recursively starting from the estimator0 to estimatorn. The states are updated accordingly as some Estimator might rely on previous state estimations to compute its output state. eg: ct estimations are likely to depend on the estimation of the Rotor Effective Wind Speed.

get_bounds() List[float]

Return the position (x, z) of the tip of the turbines blades.

Returns

The position (x, z) of the tip of the turbines blades given the current rotor orientation.

Return type

List[float]

init_LagSolver()

Inits the LagSolver communicator that allows ctypes to access s_wt.

is_freestream() bool

Check if the wind turbine is waked or not

Returns

False if an impinging wake is detected else True.

Return type

bool

reset(ini_states: dict[str, float] = {}, ini_time: Optional[float] = None)

Reset the wind turbines.

Parameters

ini_states (dict[str, float], optional) – {'s_wt': v} maps the wind turbine state, s_wt, to its initial value, v.

update_LagSolver()

Updates the LagSolver communicator.

update_sensors()

Updates the Turbine’s sensors

update_states()

Updates the Turbine’s state, s_wt.