Geometry API: Turbine geometry processor

Module containing the processing functions for the geometry data.

class owimetadatabase_preprocessor.geometry.processing.OWT(api: Any, materials: DataFrame | bool | int64 | None, subassemblies: DataFrame | bool | int64 | None, location: DataFrame | bool | int64 | None, tower_base: float64 | None = None, pile_head: float64 | None = None)

Bases: object

Class to process the geometry data of a single OWT.

Parameters:
  • api – API object used to call get_* methods.

  • materials – Pandas dataframe with the materials data.

  • sub_assemblies – Dictionary of the subassemblies.

  • tw_sub_assemblies – Pandas dataframe with the tower subassemblies data for a given turbine.

  • tp_sub_assemblies – Pandas dataframe with the transition piece subassemblies data for a given turbine.

  • mp_sub_assemblies – Pandas dataframe with the monopile subassemblies data for a given turbine.

  • tower_base – Elevation of the OWT tower base in mLAT.

  • pile_head – Elevation of the pile head in mLAT.

  • water_depth – Water depth in mLAT.

  • pile_toe – Elevation of the pile toe in mLAT.

  • rna – Pandas dataframe with the RNA data.

  • tower – Pandas dataframe with the tower data.

  • transition_piece – Pandas dataframe with the transition piece data.

  • monopile – Pandas dataframe with the monopile data.

  • tw_lumped_mass – Pandas dataframe with the lumped masses data for the tower.

  • tp_lumped_mass – Pandas dataframe with the lumped masses data for the transition piece.

  • mp_lumped_mass – Pandas dataframe with the lumped masses data for the monopile.

  • tp_distributed_mass – Pandas dataframe with the distributed masses data for the transition piece.

  • mp_distributed_mass – Pandas dataframe with the distributed masses data for the monopile.

  • grout – Pandas dataframe with the grout data.

  • full_structure – Pandas dataframe with the full structure data.

  • tp_skirt – Pandas dataframe with the transition piece skirt data.

  • substructure – Pandas dataframe with the substructure data.

sub_assemblies: Dict[str, SubAssembly]
pile_toe: float64 | None
rna: DataFrame | None
tower: DataFrame | None
transition_piece: DataFrame | None
monopile: DataFrame | None
tw_lumped_mass: DataFrame | None
tp_lumped_mass: DataFrame | None
mp_lumped_mass: DataFrame | None
tp_distributed_mass: DataFrame | None
mp_distributed_mass: DataFrame | None
grout: DataFrame | None
full_structure: DataFrame | None
tp_skirt: DataFrame | None
substructure: DataFrame | None
__init__(api: Any, materials: DataFrame | bool | int64 | None, subassemblies: DataFrame | bool | int64 | None, location: DataFrame | bool | int64 | None, tower_base: float64 | None = None, pile_head: float64 | None = None) None

Create an instance of the OWT class with the required parameters.

Parameters:
  • api – API object used to call get_* methods.

  • materials – Pandas dataframe with the materials data.

  • subassemblies – Pandas dataframe with the subassemblies data for a given turbine.

  • location – Pandas dataframe with the location data for a given turbine.

  • tower_base – Optional: elevation of the OWT tower base in mLAT.

  • pile_head – Optional: elevation of the pile head in mLAT.

Returns:

None

api: Any
materials: DataFrame
tw_sub_assemblies: DataFrame | None
tp_sub_assemblies: DataFrame | None
mp_sub_assemblies: DataFrame | None
water_depth: float64
tower_base: float64 | None
pile_head: float64 | None
set_df_structure(idx: str) DataFrame

Calculate and/or converts geometrical data of subassemblies from the database.

Parameters:

idx – Possible index to identify corresponding subassembly.

Returns:

Data frame containing geometry data from database wth z in mLAT system.

process_structure_geometry(idx: str) DataFrame

Calculate and/or converts geometrical data of subassemblies from the database to use as input for FE models.

Parameters:

idx – Possible index to identify corresponding subassembly.

Returns:

Dataframe consisting of the required data to build FE models.

process_rna() None

Set dataframe containing the required properties to model the RNA system.

Returns:

None

set_df_appurtenances(idx: str) DataFrame

Set dataframe containing the required properties to model concentrated masses from database subassemblies.

Parameters:

idx – Index to identify corresponding subassembly with possible values: ‘TW’, ‘TP’, ‘MP’.

Returns:

Data frame containing lumped masses data from database with Z coordinates in mLAT system.

process_lumped_masses(idx: str) DataFrame

Create dataframe containing the required properties to model lumped mass appurtenances. Note that if the preprocessor package does not find any appurtenances it’ll return an empty dataframe.

Parameters:

idx – Index to identify corresponding subassembly with possible values: ‘TW’, ‘TP’, ‘MP’.

Returns:

Dataframe.

set_df_distributed_appurtenances(idx: str) DataFrame

Set dataframe containing the required properties to model distributed lumped masses from database.

Parameters:

idx – Index to identify corresponding subassembly with possible values: ‘TW’, ‘TP’, ‘MP’.

Returns:

Dataframe containing distributed lumped masses data from database. Z coordinates in mLAT system.

process_distributed_lumped_masses(idx: str) DataFrame

Create dataframe containing the required properties to model uniformly distributed appurtenances. Note that if the preprocessor package does not find any appurtenances it’ll return an empty dataframe.

Parameters:

idx – Index to identify corresponding subassembly with possible values: ‘TP’, ‘MP’.

Returns:

Dataframe.

process_structure(option='full') None

Set dataframe containing the required properties to model the tower geometry, including the RNA system.

Parameters:

option

Option to process the data for a specific subassembly. Possible values:

  • ”full”: To process all the data for all subassemblies.

  • ”tower”: To process only the data for the tower subassembly.

  • ”TP”: To process only the data for the transition piece subassembly.

  • ”monopile”: To process only the data for the monopile foundation subassembly.

Returns:

None

static can_adjust_properties(row: Series) Series

Recalculation of can properties based on section properties and can elevations: height [m], volume [m3], mass [t], rho [t/m].

Parameters:

row – Original can properties.

Returns:

Pandas series of recalculated can properties.

can_modification(df: DataFrame, altitude: float64 | None, position: str = 'bottom') DataFrame

Change can properties based on the altitude.

Parameters:
  • df – Dataframe containing the can properties.

  • altitude – Altitude in mLAT.

  • position – Position of the can with respect to the altitude with possible values: “bottom” or “top”.

Returns:

Dataframe with the modified can properties.

assembly_tp_mp() None

Process TP structural item to assembly with MP foundation ensuring continuity. TP skirt is processed as well.

Returns:

None

assembly_full_structure() None

Process the full structure of the OWT: tower + tp combiantion with monopile.

Returns:

None

extend_dfs() None

Extend the dataframes with the subassembly columns.

Returns:

None

transform_monopile_geometry(cutoff_point: floating = nan) DataFrame

Returns a dataframe with the monopile geometry with the mudline as reference

Parameters:

cutoff_point – Depth from the mudline to cut the monopile geometry.

Returns:

Dataframe with the monopile geometry.

class owimetadatabase_preprocessor.geometry.processing.OWTs(turbines: List[str], owts: List[OWT])

Bases: object

Class to process the geometry data of multiple OWTs.

Parameters:
  • owts – List of OWT objects.

  • api – API object used to call get_* methods.

  • materials – Pandas dataframe with the materials data.

  • sub_assemblies – Dictionary of dictionaries of the subassemblies for each turbine.

  • tower_base – Dictionary of the elevation of the OWT tower base in mLAT for each turbine.

  • pile_head – Dictionary of the elevation of the pile head in mLAT for each turbine.

  • water_depth – Dictionary of the water depth in mLAT for each turbine.

  • tw_sub_assemblies – Dataframe of the tower subassemblies data from each turbine.

  • tp_sub_assemblies – Dataframe of the transition piece subassemblies data from each turbine.

  • mp_sub_assemblies – Dataframe of the monopile subassemblies data from each turbine.

  • pile_toe – Dataframe of the elevation of the pile toe in mLAT from each turbine.

  • rna – Dataframe of the RNA data from each turbine.

  • tower – Dataframe of the tower data from each turbine.

  • transition_piece – Dataframe of the transition piece data from each turbine.

  • monopile – Dataframe of the monopile data from each turbine.

  • tw_lumped_mass – Dataframe of the lumped masses data of the tower from each turbine.

  • tp_lumped_mass – Dataframe of the lumped masses data of the transition piece from each turbine.

  • mp_lumped_mass – Dataframe of the lumped masses data of the monopile from each turbine.

  • tp_distributed_mass – Dataframe of the distributed masses data of the transition piece from each turbine.

  • mp_distributed_mass – Dataframe of the distributed masses data of the monopile from each turbine.

  • grout – Dataframe of the grout data from each turbine.

  • full_structure – Dataframe of the full structure data from each turbine.

  • tp_skirt – Dataframe of the transition piece skirt data from each turbine.

  • substructure – Dataframe of the substructure data from each turbine.

  • all_turbines – Dataframe of the general geometry data from each turbine.

  • all_tubular_structures – Dataframe of the tubular structures data from each turbine.

  • all_distributed_mass – Dataframe of the distributed masses data from each turbine.

  • all_lumped_mass – Dataframe of the lumped masses data from each turbine.

__init__(turbines: List[str], owts: List[OWT]) None

Create an instance of the OWTs class with the required parameters.

Parameters:
  • turbines – List of turbine titles.

  • owts – List of OWT objects.

Returns:

process_structures() None

Set dataframes containing the required properties to model the tower geometry, including the RNA system.

Returns:

None

select_owt(turbine: str | int) OWT

Select OWT object from the OWTs object.

Parameters:

turbine – Title of the turbine or itss index in the original list of turbine titles (from get method).

Returns:

OWT object.