- class foxes.models.turbine_types.TBLFile(foxes.models.turbine_types.PCtFile)[source]
Reads turbine data from a TBL file.
Examples¶
A TBL file is a csv file with space as separator and two header lines. The followind lines denote wind speed, ct, P.
first row will be ignored
second row: H D ct-stand-still rated-power-in-MW
further rows: ws ct P-in-kW
For example:
45 175.0 290.0 0.03 22.0 3.0 0.820 102.9 3.5 0.800 444.0 4.0 0.810 874.7 4.5 0.820 1418.7 5.0 0.820 2100.9 5.5 0.830 3021.2 6.0 0.830 3904.7 6.5 0.830 5061.7 7.0 0.810 6379.0
Public members¶
-
TBLFile(tbl_file, rho=
1.225
, **parameters)[source] Constructor.
- needs_rews2()[source]
Returns flag for requiring REWS2 variable
- needs_rews3()[source]
Returns flag for requiring REWS3 variable
- output_farm_vars(algo)[source]
The variables which are being modified by the model.
-
modify_cutin(modify_ct, modify_P, steps=
20
, iterations=100
, ...)[source] Modify the data such that a discontinuity at cutin wind speed is avoided
- classmethod new(ttype_type, *args, **kwargs)[source]
Run-time turbine type factory.
- output_coords()[source]
Gets the coordinates of all output arrays
- ensure_variables(algo, mdata, fdata)[source]
Add variables to fdata, initialized with NaN
- run_calculation(algo, *data, out_vars, **calc_pars)[source]
Starts the model calculation in parallel, via xarray’s apply_ufunc.
- property model_id
Unique id based on the model type.
- property initialized
Initialization flag.
- sub_models()[source]
List of all sub-models
-
initialize(algo, verbosity=
0
, force=False
)[source] Initializes the model.
- property running
Flag for currently running models
-
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
-
get_data(variable, target, lookup=
'smfp'
, mdata=None
, ...)[source] Getter for a data entry in the model object or provided data sources