Architecture and Design

Architecture and Design#

wcomp entirely consists of an interface definition to wake modeling software, a module of data structures to hold wind farm wake simulation results, and plotting functions. The ultimate objective is to provide infrastructure to obtain consistence results from similar wake modeling software with common inputs. Each wake modeling software that implements the interface can be automatically included in the dataset of solutions to characteristic problems.

The package diagram below shows the modules within wcomp and how each relates to the others as dependencies (which modules import which other modules).

classDiagram class FLORIS class FOXES class PyWake namespace wcomp { class base_interface class floris_interface class foxes_interface class pywake_interface class plotting class output_struct } FLORIS --> floris_interface FOXES --> foxes_interface PyWake --> pywake_interface floris_interface --> base_interface floris_interface --> output_struct floris_interface --> plotting foxes_interface --> base_interface foxes_interface --> output_struct foxes_interface --> plotting plotting --> output_struct pywake_interface --> base_interface pywake_interface --> output_struct pywake_interface --> plotting

The interface to implement by participating wake modeling software is defined in an abstract base class, wcomp.base_interface, and the class diagram is given below.

WCompBase Class Diagram
classDiagram class WCompBase { LEGEND : str LINE_PLOT_COLOR : str LINE_PLOT_LINESTYLE : str LINE_PLOT_LINEWIDTH : int LINE_PLOT_MARKER : str N_POINTS_1D : int RESOLUTION_2D : int hub_height rotor_diameter AEP()* float horizontal_contour(wind_direction: float)* WakePlane streamwise_profile_plot(wind_direction: float, y_coordinate: float, xmin: float, xmax: float)* WakeProfile vertical_profile_plot(wind_direction: float, x_coordinate: float, y_coordinate: float, zmax: float)* WakeProfile xsection_contour(wind_direction: float, x_coordinate: float)* WakePlane xsection_profile_plot(wind_direction: float, x_coordinate: float, ymin: float, ymax: float)* WakeProfile }

The following table maps the wake modeling software currently integrated to wcomp to the API documentation for their respective interface files, for reference.

Wake Model

Interface File

FLORIS

wcomp.floris_interface

FOXES

wcomp.foxes_interface

PyWake

wcomp.pywake_interface