wecopttool.pto.PTO

class PTO[source]

A power take-off (PTO) object to be used in conjunction with a wecopttool.WEC object.

__init__(ndof, kinematics, controller=None, impedance=None, loss=None, names=None)[source]

Create a PTO object.

The wecopttool.pto.PTO class describes the kinematics, control logic, impedance and/or non-linear power loss of a power take-off system. The forces/moments applied by a wecopttool.pto.PTO object can be applied to a wecopttool.WEC object through the wecopttool.WEC.f_add property. The power produced by a wecopttool.pto.PTO object can be used for the obj_fun of pseudo-spectral optimization problem when calling wecopttool.WEC.solve().

Parameters:
  • ndof (int) – Number of degrees of freedom.

  • kinematics (StateFunction | ndarray) – Transforms state from WEC to PTO frame. May be a matrix (for linear kinematics) or function (for nonlinear kinematics).

  • controller (StateFunction | None) – Function with signature def fun(pto, wec, x_wec, x_opt, waves, nsubsteps): or matrix with shape (PTO DOFs, WEC DOFs) that converts from the WEC DOFs to the PTO DOFs.

  • impedance (ndarray | None) – Matrix representing the PTO impedance.

  • loss (Callable[[float | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], float | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]], float | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]] | None) – Function that maps flow and effort variables to a non-linear power loss. The output is the dissipated power (loss) in Watts. This should be a positive value.

  • names (list[str] | None) – PTO names.

Return type:

None

Attributes

PTO.force

PTO force in PTO coordinates.

PTO.impedance

Impedance matrix.

PTO.kinematics

Kinematics function.

PTO.loss

Nonlinear power loss function with outputs in Watts.

PTO.names

DOF Names.

PTO.ndof

Number of degrees of freedom.

PTO.transfer_mat

Transfer matrix.

Methods

acceleration

Calculate the PTO acceleration time-series.

average_power

Calculate the average power in each PTO DOF for a given system state.

energy

Calculate the energy in each PTO DOF for a given system state.

force_on_wec

Calculate the PTO force on WEC.

mechanical_average_power

Calculate average mechanical power in each PTO DOF for a given system state.

mechanical_energy

Calculate the mechanical energy in each PTO DOF for a given system state.

mechanical_power

Calculate the mechanical power time-series in each PTO DOF for a given system state.

position

Calculate the PTO position time-series.

post_process

Transform the results from optimization solution to a form that the user can work with directly.

power

Calculate the power time-series in each PTO DOF for a given system state.

power_variables

Calculate the power variables (flow q and effort e) time-series in each PTO DOF for a given system state.

transduced_effort

Calculate the transduced flow variable time-series in each PTO DOF for a given system state.

transduced_flow

Calculate the transduced flow variable time-series in each PTO DOF for a given system state.

velocity

Calculate the PTO velocity time-series.