Class: wsim.rotaryPowerTakeOff¶
wsim.rotaryPowerTakeOff is a class representing a rotary power-take-off
mechanism in a wave energy converter. It facilitates sending the correct
forces to an MBDyn multibody simulation. wsim.rotaryPowerTakeOff applies
opposite moments to two MBDyn nodes based attahed to a
mbdyn.pre.revoluteHinge object from the MBDYn simulation toolbox. Moments
are applied based on the relative angular displacement and velocity of
the two nodes about the revolute hinge rotation axis.
wsim.rotaryPowerTakeOff Methods:
rotaryPowerTakeOff - wsim.rotaryPowerTakeOff constructor
forceAndMoment - returns the forces and moments applied by the PTO in 3D
Inheirited Methods
advanceStep - advance to the next simulation time step
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.
wsim.powerTakeOff¶
Inheirited Properties¶
- id
- loggingInfo
- loggingOn
- otherNode
- referenceNode
- uniqueLoggingNames
Inheirited Methods¶
- powerTakeOff : wsim.powerTakeOff constructor
- advanceStep : advance to the next simulation time step
- finish : method called at end of wecSim simulation
- forceAndMoment : forceAndMoment should return the force and moment from a PTO
- logData : appends the internal variable data to the log
- loggingSetup : sets up data logging for a wsim.linearPowerTakeOff object
- start : initialise the pto simulation
Methods¶
- rotaryPowerTakeOff
- advanceStep
- forceAndMoment
- start
rotaryPowerTakeOff¶
Summary¶
wsim.rotaryPowerTakeOff constructor
Syntax¶
rot = wsim.rotaryPowerTakeOff (revolute_hinge)
rot = wsim.rotaryPowerTakeOff (..., 'Parameter', Value)
Description¶
wsim.rotaryPowerTakeOff is a class representing a rotary
power-take-off mechanism in a wave energy converter. It
facilitates sending the correct forces to an MBDyn multibody
simulation. wsim.rotaryPowerTakeOff applies opposite moments
to two MBDyn nodes based attahed to a mbdyn.pre.revoluteHinge
object from the MBDYn simulation toolbox. Moments are applied
based on the relative displacement and velocity of the two
nodes about the revolute hinge rotation axis.
Inputs¶
revolute_hinge¶
mbdyn.pre.revoluteHinge object
torque_fcn¶
function handle or string to be used to
calculate the torque to be applied between the two nodes
making up the PTO. torque_fcn is a function which takes two
arguments with the following signature:
torque_value = myfcn (time, reltheta, relomega)
where reltheta is the relative angular displacement of the
two nodes about the revolute hinge axis, and relomega is
the relative angular velocity of the two nodes abot that
axis. torque_value is expected to be a scalar value, the
value of the torqe acting on the reference node. The
opposite torque is applied to the other node. By default
the reference node is the first node connected to the
revolute hinge. See the 'ReferenceNode' options below to
change this.
Additional arguments may be supplied as parameter-value pairs:
InitialThetaZero¶
optional true/false flag
indicating whether the intial relative rotation angle
(about the revolute hinge axis) should be taken as the
reference point for relative rotation during the
simulation, i.e. the PTO starts with an initial relative
theta of zero for the purposes of torque calulation, and
future displacement is measured relative to this initial
position. If false, the raw relative angular displacement
is used instead. Default is true if not supplied.
ReferenceNode¶
optional integer, 1 or 2. By default the
torque returned by torque_fcn (see above) is applied to
the first node attached to the revolute hinge. This can be
changed with this option. The number supplied in
ReferenceNode sets which node is the reference node.
Default is 1 if not supplied.
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. The available variables are:
InternalMoment¶
the scalar moment (torque) applied
about the revolute hinge axis
RelativeAngularDisplacement¶
the relative angular
displacement of the nodes attached to the revolute hinge
RelativeAngularVelocity¶
the relative angular
velocity of the nodes attached to the revolute hinge
Outputs¶
rot¶
wsim.rotaryPowerTakeOff 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¶
Help for wsim.rotaryPowerTakeOff/advanceStep is inherited from superclass WSIM.POWERTAKEOFF
forceAndMoment¶
Summary¶
returns the forces and moments applied by the PTO in 3D
Syntax¶
[FM, ptotorque, reltheta, relomega] = forceAndMoment (rot)
Description¶
wsim.rotaryPowerTakeOff.forceAndMoment calculates the forces
and moments applied in the global frame by the PTO to the two
nodes attached to the revolute hinge associated with the PTO.
Inputs¶
rot¶
wsim.rotaryPowerTakeOff object
Outputs¶
FM¶
(6 x 2) vector of forces and moments in the global
frame which the PTO is applying to the two nodes. The first
column is the forces applied to the reference node, the
second column is the forces and moments applied to the
second node.
ptotorque¶
scalar torque value applied to the nodes about
the revolute hinge axis
reltheta¶
relative angular displacement of the nodes about
the revolute hinge axis
relomega¶
relative angular velocity of the nodes about
the revolute hinge axis
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¶
Help for wsim.rotaryPowerTakeOff/start is inherited from superclass WSIM.POWERTAKEOFF