Loads Module

The loads module contains a set of functions to calculate quantities of interest for mechanical loads assessments.

General

The loads general submodule contains general loads calculations that can be applied to most MRE devices.

bin_statistics

Bins calculated statistics against data signal (or channel) according to IEC TS 62600-3:2020 ED1.

blade_moments

Transfer function for deriving blade flap and edge moments using blade matrix.

damage_equivalent_load

Calculates the damage equivalent load of a single data signal (or channel) based on IEC TS 62600-3:2020 ED1.

This module provides tools for analyzing and processing data signals related to turbine blade performance and fatigue analysis. It implements methodologies based on standards such as IEC TS 62600-3:2020 ED1, incorporating statistical binning, moment calculations, and fatigue damage estimation using the rainflow counting algorithm. Key functionalities include:

  • bin_statistics: Bins time-series data against a specified signal, such as wind speed, to calculate mean and standard deviation statistics for each bin, following IEC TS 62600-3:2020 ED1 guidelines. It supports output in both pandas DataFrame and xarray Dataset formats.

  • blade_moments: Calculates the flapwise and edgewise moments of turbine blades using derived calibration coefficients and raw strain signals. This function is crucial for understanding the loading and performance characteristics of turbine blades.

  • damage_equivalent_load: Estimates the damage equivalent load (DEL) of a single data signal using a 4-point rainflow counting algorithm. This method is vital for assessing fatigue life and durability of materials under variable amplitude loading.

References: - C. Amzallag et. al., International Journal of Fatigue, 16 (1994) 287-293. - ISO 12110-2, Metallic materials - Fatigue testing - Variable amplitude fatigue testing. - G. Marsh et. al., International Journal of Fatigue, 82 (2016) 757-765.

mhkit.loads.general.bin_statistics(data: DataFrame | Dataset, bin_against: ndarray, bin_edges: ndarray, data_signal: List[str] | None = None, to_pandas: bool = True) Tuple[DataFrame | Dataset, DataFrame | Dataset][source]

Bins calculated statistics against data signal (or channel) according to IEC TS 62600-3:2020 ED1.

Parameters:
  • data (pandas DataFrame or xarray Dataset) – Time-series statistics of data signal(s)

  • bin_against (array) – Data signal to bin data against (e.g. wind speed)

  • bin_edges (array) – Bin edges with consistent step size

  • data_signal (list, optional) – List of data signal(s) to bin, default = all data signals

  • to_pandas (bool (optional)) – Flag to output pandas instead of xarray. Default = True.

Returns:

  • bin_mean (pandas DataFrame or xarray Dataset) – Mean of each bin

  • bin_std (pandas DataFrame or xarray Dataset) – Standard deviation of each bim

mhkit.loads.general.blade_moments(blade_coefficients: ndarray, flap_offset: float, flap_raw: ndarray, edge_offset: float, edge_raw: ndarray) Tuple[ndarray, ndarray][source]

Transfer function for deriving blade flap and edge moments using blade matrix.

Parameters:
  • blade_coefficients (numpy array) – Derived blade calibration coefficients listed in order of D1, D2, D3, D4

  • flap_offset (float) – Derived offset of raw flap signal obtained during calibration process

  • flap_raw (numpy array) – Raw strain signal of blade in the flapwise direction

  • edge_offset (float) – Derived offset of raw edge signal obtained during calibration process

  • edge_raw (numpy array) – Raw strain signal of blade in the edgewise direction

Returns:

  • M_flap (numpy array) – Blade flapwise moment in SI units

  • M_edge (numpy array) – Blade edgewise moment in SI units

mhkit.loads.general.damage_equivalent_load(data_signal: ndarray, m: float | int, bin_num: int = 100, data_length: float | int = 600) float[source]

Calculates the damage equivalent load of a single data signal (or channel) based on IEC TS 62600-3:2020 ED1. 4-point rainflow counting algorithm from fatpack module is based on the following resources:

  • C. Amzallag et. al. Standardization of the rainflow counting method for fatigue analysis. International Journal of Fatigue, 16 (1994) 287-293

  • ISO 12110-2, Metallic materials - Fatigue testing - Variable amplitude fatigue testing.

  • G. Marsh et. al. Review and application of Rainflow residue processing techniques for accurate fatigue damage estimation. International Journal of Fatigue, 82 (2016) 757-765

Parameters:

data_signalarray

Data signal being analyzed

mfloat/int

Fatigue slope factor of material

bin_numint

Number of bins for rainflow counting method (minimum=100)

data_lengthfloat/int

Length of measured data (seconds)

returns:

DEL (float) – Damage equivalent load (DEL) of single data signal

Graphics

The graphics submodule contains functions to plot loads metrics.

plot_statistics

Plot showing standard raw statistics of variable

plot_bin_statistics

Plot showing standard binned statistics of single variable

This module provides functionalities for plotting statistical data related to a given variable or dataset.

  • plot_statistics is designed to plot raw statistical measures (mean, maximum, minimum, and optional standard deviation) of a variable across a series of x-axis values. It allows for customization of plot labels, title, and saving the plot to a file.

  • plot_bin_statistics extends these capabilities to binned data, offering a way to visualize binned statistics (mean, maximum, minimum) along with their respective standard deviations. This function also supports label and title customization, as well as saving the plot to a specified path.

mhkit.loads.graphics.plot_statistics(x: ndarray, y_mean: ndarray, y_max: ndarray, y_min: ndarray, y_stdev: ndarray | None = None, **kwargs: Dict[str, Any]) Axes[source]

Plot showing standard raw statistics of variable

Parameters:
  • x (numpy array) – Array of x-axis values

  • y_mean (numpy array) – Array of mean statistical values of variable

  • y_max (numpy array) – Array of max statistical values of variable

  • y_min (numpy array) – Array of min statistical values of variable

  • y_stdev (numpy array, optional) – Array of standard deviation statistical values of variable

  • **kwargs (optional) –

    x_labelstring

    x axis label for plot

    y_labelstring

    y axis label for plot

    titlestring, optional

    Title for plot

    save_pathstring

    Path and filename to save figure.

Returns:

ax (matplotlib pyplot axes)

mhkit.loads.graphics.plot_bin_statistics(bin_centers: ndarray, bin_mean: ndarray, bin_max: ndarray, bin_min: ndarray, bin_mean_std: ndarray, bin_max_std: ndarray, bin_min_std: ndarray, **kwargs: Dict[str, Any]) Axes[source]

Plot showing standard binned statistics of single variable

Parameters:
  • bin_centers (numpy array) – x-axis bin center values

  • bin_mean (numpy array) – Binned mean statistical values of variable

  • bin_max (numpy array) – Binned max statistical values of variable

  • bin_min (numpy array) – Binned min statistical values of variable

  • bin_mean_std (numpy array) – Standard deviations of mean binned statistics

  • bin_max_std (numpy array) – Standard deviations of max binned statistics

  • bin_min_std (numpy array) – Standard deviations of min binned statistics

  • **kwargs (optional) –

    x_labelstring

    x axis label for plot

    y_labelstring

    y axis label for plot

    titlestring, optional

    Title for plot

    save_pathstring

    Path and filename to save figure.

Returns:

ax (matplotlib pyplot axes)

Extreme

The extreme submodule contains functions to calculate peak distribution.

global_peaks

Find the global peaks of a zero-centered response time-series.

number_of_short_term_peaks

Estimate the number of peaks in a specified period.

peaks_distribution_weibull

Estimate the peaks distribution by fitting a Weibull distribution to the peaks of the response.

peaks_distribution_weibull_tail_fit

Estimate the peaks distribution using the Weibull tail fit method.

peaks_distribution_peaks_over_threshold

Estimate the peaks distribution using the peaks over threshold method.

ste_peaks

Estimate the short-term extreme distribution from the peaks distribution.

block_maxima

Find the block maxima of a time-series.

ste_block_maxima_gev

Approximate the short-term extreme distribution using the block maxima method and the Generalized Extreme Value distribution.

ste_block_maxima_gumbel

Approximate the short-term extreme distribution using the block maxima method and the Gumbel (right) distribution.

short_term_extreme

Approximate the short-term extreme distribution from a timeseries of the response using chosen method.

full_seastate_long_term_extreme

Return the long-term extreme distribution of a response of interest using the full sea state approach.

mler_coefficients

Calculate MLER (most likely extreme response) coefficients from a sea state spectrum and a response RAO.

mler_simulation

Define the simulation parameters that are used in various MLER functionalities.

mler_wave_amp_normalize

Function that renormalizes the incoming amplitude of the MLER wave to the desired peak height (peak to MSL).

mler_export_time_series

Generate the wave amplitude time series at X0 from the calculated MLER coefficients

This package provides tools and functions for extreme value analysis and wave data statistics.

It includes methods for calculating peaks over threshold, estimating short-term extreme distributions,and performing wave amplitude normalization for most likely extreme response analysis.