Power Module¶
The power module computes power curves — the electrical power output of an AWE system as a function of wind speed — for each wind profile cluster produced by the wind module. The resulting power curve file (in awesIO YAML format) is the direct input for the AEP pipeline and a good reference for performance analysis.
Architecture¶
The module is built around an Abstract Base Class that defines the interface every power model must implement. Concrete implementations are thin wrappers around external physics-based packages.
PowerEstimationModel (abstract base class)
├── LuchsingerPowerModel (wraps power-luchsinger)
└── InertiaFreeQSMPowerModel (wraps inertiafree-qsm)
Swapping models requires only changing the class that is instantiated — the rest of the pipeline (configuration loading, output format, AEP calculation) remains identical.
Base Class — PowerEstimationModel¶
- class awespa.power.base.PowerEstimationModel[source]¶
Bases:
ABCAbstract base class for power estimation models.
All power estimation models must inherit from this class and implement the required methods for loading configuration, computing power curves, and exporting power data.
- abstract load_configuration(system_path: Path, simulation_settings_path: Path | None = None, operational_constraints_path: Path | None = None, validate: bool = True) None[source]¶
Load power model configuration from YAML files.
- Parameters:
system_path – Path to system configuration YAML file.
simulation_settings_path – Path to simulation settings YAML file. May be None if model does not require simulation settings.
operational_constraints_path – Path to operational constraints YAML file. May be None if model does not require operational constraints.
validate (bool) – If True, validate configuration files using the awesIO validator. Defaults to True.
- abstract compute_power_curves(output_path: Path, verbose: bool = False, showplot: bool = False, saveplot: bool = False, validate: bool = True) None[source]¶
Compute power curves and optionally export/plot.
This method calculates the power curve, exports to YAML if output_path is provided, and generates plots if showplot or saveplot is True.
- Parameters:
output_path – Path where power curve YAML will be written. If None, no export is performed.
verbose – Whether to print verbose output.
showplot – Whether to display plots.
saveplot – Whether to save plots to file.
validate (bool) – If True, validate the output YAML file using the awesIO validator. Defaults to True.
- Returns:
None
- abstract calculate_power_at_wind_speed(wind_speed: float, selected_profile: int = 1, output_path: Path | None = None, verbose: bool = False, showplot: bool = False, saveplot: bool = False, validate: bool = True) float[source]¶
Calculate power output at a single wind speed.
- Parameters:
wind_speed – Wind speed in m/s.
selected_profile – Profile index (1-indexed) for wind shear selection. Defaults to 1.
output_path – Path where results will be written. If None, no export is performed.
verbose – Whether to print verbose output.
showplot – Whether to display plots for this wind speed.
saveplot – Whether to save plots for this wind speed to file.
validate (bool) – If True, validate the output YAML file using the awesIO validator. Defaults to True.
- Returns:
Average cycle power output [W].
Every implementation must provide three methods:
load_configuration(system_path, simulation_settings_path, ..., validate=True)Load all model settings from awesIO-format YAML files. Validates that required files exist and creates the underlying model object. When
validateis True, input configuration files are checked against their awesIO schema.compute_power_curves(output_path, verbose, showplot, saveplot, plot_path, validate=True)Calculate the full power curve for every wind profile cluster, optionally export the result to YAML, and optionally show / save plots. When
validateis True, the output YAML is validated against the awesIO power curves schema.calculate_power_at_wind_speed(wind_speed, output_path, verbose, showplot, saveplot, validate=True)Simulate a single operating point (one wind speed) and return the average cycle power in watts. When
validateis True, the output YAML is validated against the awesIO schema.
Output format¶
Both models write a YAML file in awesIO format with the following top-level keys:
metadata— system configuration and model settings (wing area, mass, generator efficiency, nominal power, cut-in/cut-out wind speeds, etc.)altitudes— altitude grid [m] at which wind profiles are definedreference_wind_speeds— wind speed vector [m/s] used for evaluationpower_curves— list of per-cluster power curve dictionaries, each containing the profile ID, probability weight, wind profile shape, and power output [W], tether forces [N], timings etc at each reference wind speedtime_history— metadata describing time-series channel outputs (including tether forces, power, reel speed, altitude, wind speeds at kite, aerodynamic forces, lift-to-drag ratio, and control angles) saved in the accompanying.npzbinary file
This file is directly consumed by awespa.pipeline.aep.calculate_aep().
Implementations¶
Output¶
The output of the power module is a YAML file in awesIO format. More info of the power_curves.yml can be found in the awesIO documentation:https://awegroup.github.io/awesIO/source/power_curves_schema.html. This file contains the representative wind profile shapes, their associated wind speed probability distributions, and cluster occurrence frequencies. This file is the shared input for all power-module models and the AEP pipeline.