- class foxes.algorithms.Downwind(foxes.core.Algorithm)[source]
The downwind algorithm.
The turbines are evaluated once, in the order that is calculated by the provided TurbineOrder object.
Attributes¶
- states: foxes.core.States
The ambient states
- wake_models: dict
The wake models. Key: wake model name, value: foxes.core.WakeModel
- rotor_model: foxes.core.RotorModel
The rotor model, for all turbines
- wake_frame: foxes.core.WakeFrame
The wake frame
- partial_wakes: dict
The partial wakes mapping. Key: wake model name, value: foxes.core.PartialWakesModel
- ground_models: dict
The ground models mapping. Key: wake model name, value: foxes.core.GroundModel
- farm_controller: foxes.core.FarmController
The farm controller
- n_states: int
The number of states
Public members¶
-
DEFAULT_FARM_OUTPUTS =
['X', 'Y', 'H', 'D', 'AMB_WD', 'AMB_REWS', 'AMB_TI', 'AMB_RHO', 'AMB_CT', 'AMB_P', 'WD', 'REWS', 'YAW', 'TI', 'CT', 'P', 'order', 'weight']
-
Downwind(farm, states, wake_models, rotor_model=
'centre'
, ...)[source] Constructor.
- property states
The states
- property rotor_model
The rotor model
- property wake_models
The wake models
- property wake_frame
The wake frame
- property partial_wakes
The partial wakes models
- property ground_models
The ground models
- property farm_controller
The farm controller
-
print_deco(func_name=
None
, n_points=None
)[source] Helper function for printing model names
- init_states()[source]
Initialize states, if needed.
- sub_models()[source]
List of all sub-models
- initialize()[source]
Initializes the algorithm.
-
calc_farm(outputs=
None
, calc_parameters={}
, finalize=True
, ...)[source] Calculate farm data.
-
calc_points(farm_results, points, point_models=
None
, ...)[source] Calculate data at a given set of points.
- property farm
The wind farm
- property mbook
The model book
- property dbook
The data book
- property idata_mem
The current idata memory
- property chunk_store
The current chunk store
-
store_model_data(model, idata, force=
False
)[source] Store model data
- get_model_data(model)[source]
Gets model data from memory
- del_model_data(model)[source]
Remove stored model data
- update_n_turbines()[source]
Reset the number of turbines, according to self.farm
- get_models_idata()[source]
Returns idata object of models
-
get_models_data(idata=
None
, sel=None
, isel=None
)[source] Creates xarray from model input data.
-
new_point_data(points, states_indices=
None
, n_states=None
)[source] Creates a point data xarray object, containing only points.
-
find_chunk_in_store(mdata, tdata=
None
, prev_s=0
, prev_t=0
, ...)[source] Finds indices in chunk store
-
reset_chunk_store(new_chunk_store=
None
)[source] Resets the chunk store
- block_convergence(**kwargs)[source]
Switch on convergence block during iterative run
- eval_conv_block()[source]
Evaluate convergence block, removing blocks on the fly
-
set_running(algo, data_stash, sel=
None
, isel=None
, verbosity=0
)[source] Sets this model status to running, and moves all large data to stash.
-
unset_running(algo, data_stash, sel=
None
, isel=None
, verbosity=0
)[source] Sets this model status to not running, recovering large data from stash
- property model_id
Unique id based on the model type.
- property initialized
Initialization flag.
- property running
Flag for currently running models
-
get_data(variable, target, lookup=
'smfp'
, mdata=None
, ...)[source] Getter for a data entry in the model object or provided data sources