NREL Plugin¶
Defines the NREL Wind Plugin for spawn
-
class
spawnwind.nrel.
AerodynInput
(lines, root_folder, wind_gen_spawner)[source]¶ Handles contents of Aerodyn (FAST aerodynamics) input file, which defines wind input for versions < 8.12
-
get_wind_gen_tasks
(prereq_dir, metadata)[source]¶ Create wind generation tasks to create new wind find if necessary :param prereq_dir: Output directory for prerequisite simulations :param metadata: Metadata for wind generation task :return: list of wind generation tasks (size 0 or 1)
-
property
wind_type
¶ - Returns
Type of wind as a lowercase string (.e.g. ‘bladed’, ‘turbsim’, ‘steady’)
-
-
spawnwind.nrel.
ETM
(Iref, Vmean, wind_speed)[source]¶ Additional evaluator - evaluates turbulence intensity according to IEC edition 3 extreme turbulence model
- Parameters
Iref – Reference turbulence intensity in percent according to turbine class
Vmean – Annual mean wind speed according to turbine class
wind_speed – 10-minute mean wind speed in m/s
- Returns
Turbulence intensity in percent
-
class
spawnwind.nrel.
Fast7Input
(input_lines, root_folder)[source]¶ Manager for main FAST input file v7
-
get_aero_input
(wind_input)[source]¶ - Parameters
wind_input –
WindInput
instance, which will be used also for aerodynamic input if they are in the same file such as in FAST 7- Returns
AeroInput
instance for managing the aerodynamic setting inputs
-
-
class
spawnwind.nrel.
Fast8Input
(input_lines, root_folder)[source]¶ Manager for main FAST input file v8
-
get_aero_input
(_wind_input)[source]¶ - Parameters
wind_input –
WindInput
instance, which will be used also for aerodynamic input if they are in the same file such as in FAST 7- Returns
AeroInput
instance for managing the aerodynamic setting inputs
-
-
class
spawnwind.nrel.
FastSimulationSpawner
(fast_input, wind_spawner, prereq_outdir)[source]¶ Spawns FAST simulation tasks with wind generation dependency if necessary
-
class
spawnwind.nrel.
FastSimulationTask
(*args, **kwargs)[source]¶ Implementation of
SimulationTask
for FAST
-
class
spawnwind.nrel.
NRELSimulationInput
(input_lines, root_folder)[source]¶ Handles contents of input files for NREL’s aeroelastic modules such as FAST, AeroDyn and TurbSim. These tend to be of a whitespace separated {value|key} format with newlines separating key:value pairs
-
classmethod
from_file
(file_path, **kwargs)[source]¶ Creates a
NRELSimulationInput
by loading a file- Parameters
file_path (path-like) – The file path to load
- Returns
The simulation input object
- Return type
An instance of
NRELSimulationInput
-
get_on_blade
(base_key, blade_number)[source]¶ Get property for a particular blade :param base_key: Key excluding the blade number identifier :param blade_number: Blade number as an integer :return: Value of property
-
classmethod
-
spawnwind.nrel.
NTM
(Iref, wind_speed)[source]¶ Additional evaluator - evaluates turbulence intensity according to IEC edition 3 normal turbulence model
- Parameters
Iref – Reference turbulence intensity in percent according to turbine class
wind_speed – 10-minute mean wind speed in m/s
- Returns
Turbulence intensity in percent
-
class
spawnwind.nrel.
TurbsimInput
(input_lines, root_folder)[source]¶ Handles contents of TurbSim (FAST wind generation) input file
-
class
spawnwind.nrel.
TurbsimSpawner
(turbsim_input)[source]¶ Spawns TurbSim wind generation tasks
-
branch
()[source]¶ Deep copy task input and dependencies so that they can be edited without affecting trunk object
-
property
wind_type
¶ - Returns
Wind type generated by spawner (‘bladed’ for .wnd, ‘turbsim’ for .bts),
-
-
class
spawnwind.nrel.
WindGenerationTask
(*args, **kwargs)[source]¶ Implementation of
SimulationTask
for TurbSim-
output
()[source]¶ The output of this task
- Returns
Target to the .wnd path
- Return type
luigi.LocalTarget
-
property
wind_file_path
¶ The path to the wind file
-
-
class
spawnwind.nrel.
WindInput
(lines, root_folder, wind_gen_spawner)[source]¶ - Base class for NREL input file determining the wind conditions for a FAST simulation. In FAST v7, this is an Aerodyn
input file and in v8 it is the InflowWind input file
-
classmethod
from_file
(file_path, wind_gen_spawner)[source]¶ Creates a
NRELSimulationInput
by loading a file- Parameters
file_path (path-like) – The file path to load
- Returns
The simulation input object
- Return type
An instance of
NRELSimulationInput
-
get_wind_gen_tasks
(prereq_dir, metadata)[source]¶ Create wind generation tasks to create new wind find if necessary :param prereq_dir: Output directory for prerequisite simulations :param metadata: Metadata for wind generation task :return: list of wind generation tasks (size 0 or 1)
-
property
turbulence_intensity
¶ - Returns
Turbulence intensity as a percentage
-
property
turbulence_seed
¶ - Returns
Integer turbulence seed for wind file generation
-
property
upflow
¶ - Returns
Mean wind flow inclination in degrees upwards from the horizontal
-
property
wind_file
¶ - Returns
Path of wind file if set
-
property
wind_gen_spawner
¶ - Returns
underlying spawner for wind generation tasks
-
property
wind_shear
¶ - Returns
Wind shear exponent
-
property
wind_speed
¶ - Returns
Reference wind speed in m/s
-
property
wind_type
¶ - Returns
Type of wind as a lowercase string (.e.g. ‘bladed’, ‘turbsim’, ‘steady’)
-
spawnwind.nrel.
create_spawner
(turbsim_exe, fast_exe, turbsim_base_file, fast_base_file, fast_version, runner_type, turbsim_working_dir, fast_working_dir, outdir, prereq_outdir)[source]¶ - Parameters
turbsim_exe – Location of TurbSim executable
fast_exe – Location of FAST executable
turbsim_base_file – Baseline TurbSim input file (typically TurbSim.inp) from which wind file generation tasks are spawned
fast_base_file – FAST input file (typically .fst) to which all parameter editions are made and from which simulations are spawned
fast_version – Major version of FAST {‘v7’, ‘v8’}
runner_type – default is process
turbsim_working_dir – Directory in which TurbSim wind generation tasks are executed
fast_working_dir – Directory in which FAST simulations are executed. Note that the discon.dll must be in this directory
outdir – Root output directory for spawning and thus where simulation outputs are located
prereq_outdir – Root output directory for prerequisite tasks (i.e. wind file generation)
- Returns
FastSimulationSpawner object