Class: wsim.powerTakeOff¶
wsim.powerTakeOff is a base class for the power take-off simulation
classes. It has methods to help with setting up data logging and checking
some standard inputs.
wsim.powerTakeOff Methods:
powerTakeOff - wsim.powerTakeOff constructor
start - start the simulation
advanceStep - advance to the next simulation time step
finish - end the simulation
forceAndMoment - calculate the forceAndMoment from the power take-off
(intended to be reimplemented by child classes).
logData - appends the internal variable data to the log
loggingSetup - sets up data logging for a wsim.linearPowerTakeOff object
Inheiritance Graph¶
Parent Class Properties and Methods¶
handle¶
Inheirited Properties¶
None
Inheirited Methods¶
- addlistener : ADDLISTENER Add listener for event.
- addlistener : ADDLISTENER Add listener for event.
- addlistener : ADDLISTENER Add listener for event.
- addlistener : ADDLISTENER Add listener for event.
- addlistener : ADDLISTENER Add listener for event.
- delete : DELETE Delete a handle object.
- eq : == (EQ) Test handle equality.
- findobj : FINDOBJ Find objects matching specified conditions.
- findprop : FINDPROP Find property of MATLAB handle object.
- ge : >= (GE) Greater than or equal relation for handles.
- gt : > (GT) Greater than relation for handles.
- isvalid : ISVALID Test handle validity.
- le : <= (LE) Less than or equal relation for handles.
- listener : LISTENER Add listener for event without binding the listener to the source object.
- listener : LISTENER Add listener for event without binding the listener to the source object.
- listener : LISTENER Add listener for event without binding the listener to the source object.
- listener : LISTENER Add listener for event without binding the listener to the source object.
- listener : LISTENER Add listener for event without binding the listener to the source object.
- lt : < (LT) Less than relation for handles.
- ne : ~= (NE) Not equal relation for handles.
- notify : NOTIFY Notify listeners of event.
- notify : NOTIFY Notify listeners of event.
Properties¶
- id
- loggingInfo
- loggingOn
- otherNode
- referenceNode
- uniqueLoggingNames
id¶
positive scalar integer for uniquely idenifying the object
loggingInfo¶
structure containing information on the variables which will be logged by the PTO
loggingOn¶
flag indicating whether logging is active for the PTO
otherNode¶
the other (non-reference node)
referenceNode¶
the reference node of the PTO, forces motion is relative to this node
uniqueLoggingNames¶
the logged variable names with a unique prefix for the object
Methods¶
- powerTakeOff
- advanceStep
- finish
- forceAndMoment
- logData
- loggingSetup
- start
powerTakeOff¶
Summary¶
wsim.powerTakeOff constructor
Syntax¶
pto = wsim.powerTakeOff (reference_node, other_node, logginginfo)
pto = wsim.powerTakeOff (..., 'Parameter', value)
Description¶
wsim.powerTakeOff is a base class for the power take-off
simulation classes. It has methods to help with setting up
data logging and checking some standard inputs.
Inputs¶
reference_node¶
mbdyn.pre.structuralNode object
other_node¶
mbdyn.pre.structuralNode object
logginginfo¶
scalar structure containing the following
fields:
AvailableNames : cell array of variable names that can be
logged. To use the logData method of the powerTakeOff
class, each name must correspond to a field of a structure
in the class property, internalVariables. When calling
logData, it is the contents of the this variable which is
appended to the log.
From the AvailableNames, a unique variable name is created
for use in the logger object based on the pto id. Data is
actually logged to this unique name in the logger. This
ensures data for mutiple PTO objects of the same type can
be logged in the same logger object. The unique logging
names are stored in the uniqueLoggingNames property of the
class. The variables which are actually logged can be
restricted by using the LoggedVars option (see below)
IndepVars : cell array the same size as the AvailableNames
field containing the name of the independant variable
associated with the corresponding variable name in
AvailableNames, e.g. 'Time'. If there is no independant
variable, the cell should contain an empty character
vector (or just be empty).
Sizes : cell array containing vector containing the size of
each of the the logged variables.
Descriptions : cell array of character vectors containing
descriptions of the variables. Each cell can be empty, but
the cell array must be of the same length as the
AvailableNames cell array.
AxisLabels : cell array of character vectors, each
containing the label to use when plotting the variable, on
the axis for that variable, e.g. 'Force [N]', or
'Displacement [m]'.
Additional arguments may be supplied as parameter-value pairs:
LoggedVars¶
cell array of character vectors containing
the names of internal variables to be logged. If supplied,
only those variables named in this cell array will
actually have data logged. Alternatively, this can be a
character vector, 'none', in which case no internal
variables will be logged. Default is an empty cell array,
which means all available internal variables will be
logged.
Outputs¶
pto¶
wsim.powerTakeOff object
See Also¶
advanceStep¶
Summary¶
advance to the next simulation time step
Syntax¶
advanceStep (pto)
Description¶
wsim.powerTakeOff.advanceStep is intended to be called when
the simulation is ready to advance to the next time step. It
is always called when the powerTakeOff is used with the
wsim.wecSim class to manage a simulation. The only tasks done
by wsim.powerTakeOff.advanceStep is to log data to the
wsim.logger object (internally it calls
wsim.powerTakeOff.logData). It is intended that subclasses of
wsim.powerTakeOff can extend this method to perform other
tasks.
Inputs¶
pto¶
wsim.powerTakeOff object
See Also¶
finish¶
Summary¶
method called at end of wecSim simulation
Syntax¶
finish (pto)
Description¶
finish will be called by the wsim.wecSim class at the end of
a simulation. It is intended to be reimplemented by child
classes which need to perform tasks (e.g. closing
communications, destroying emeory etc.) after the main
simulation has completed. The implemetation here in
wsim.powerTakeOff does nothing.
Inputs¶
pto¶
wsim.powerTakeOff object
forceAndMoment¶
Summary¶
forceAndMoment should return the force and moment from a PTO
Syntax¶
forceAndMoment (pto)
Description¶
forceAndMoment is intended to be reimplemented by child
classes and should return the forces and moments from the PTO
on the two attached nodes as a (6 x 2) matrix. The
implemetation here in wsim.powerTakeOff does nothing.
Inputs¶
pto¶
wsim.powerTakeOff object
logData¶
Summary¶
appends the internal variable data to the log
Syntax¶
logData (pto)
Description¶
logData appends the last recorded values of the internal
variables to a logger object.
Inputs¶
pto¶
wsim.powerTakeOff object
See Also¶
wsim.powerTakeOff.advanceStep
loggingSetup¶
Summary¶
sets up data logging for a wsim.linearPowerTakeOff object
Syntax¶
info = loggingSetup (lpto)
info = loggingSetup (lpto, logger)
Description¶
loggingSetup initialises
Inputs¶
lpto¶
wsim.powerTakeOff object
logger¶
optional wsim.logger object
Outputs¶
info¶
structure containing information on the data to be
logged by the PTO. Will contain the following fields:
AvailableNames, IndepVars, Sizes, Descriptions, and
NAvailable.
See Also¶
wsim.powerTakeOff.advanceStep
start¶
Summary¶
initialise the pto simulation
Syntax¶
start (pto, siminfo)
Description¶
wsim.powerTakeOff.start is called by wecSim at the beginning
of a simulation to allow any initialisation to take place.
Inputs¶
pto¶
wsim.powerTakeOff object
siminfo¶
structure containing information about the
simulation the PTO is part of. It should contain the
following fields:
TStart : Start time of the simulation
TEnd : End time of the simulation
TStep : Time step size
MBDynSystem : the MBDyn object used in the simulation
HydroSystem : the wsim.hydroSystem object used in the
simulation
See Also¶