Class: wsim.hydroSystem

wsim.hydroSystem is a class used to simulate a one or more bodies
interaction with fluid waves and also, optionally, body-to-body
interaction.

Methods:

 hydroSystem - wsim.hydroSystem constructor
 addHydroBodies - add hydroBodies to the system
 initialiseHydrobodies -

Inheiritance Graph


digraph graph_for_hydroSystem {
   "handle" -> "wsim.hydroSystem";
}

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


  • bodyMBDynNodes
  • caseDirectory
  • hydroBodiesInitialised
  • nHydroBodies
  • odeSimInitialised
  • simu
  • waves

bodyMBDynNodes

caseDirectory

hydroBodiesInitialised

nHydroBodies

odeSimInitialised

simu

simulation setings (wsim.simSettings object)

waves

wave settings (wsim.waveSettings object)

Methods


  • hydroSystem
  • addHydroBodies
  • advanceStep
  • correctAddedMassForce
  • dynamicRealAddedMassForce
  • getBodyMass
  • getBodyProperty
  • hydroForces
  • initialiseHydrobodies
  • makeMBDynComponents
  • timeDomainSimReset
  • timeDomainSimSetup

hydroSystem


Summary

wsim.hydroSystem class constructor

Syntax

hsys = hydroSystem (waves, simu)
hsys = hydroSystem (..., hydrobodyfiles)

Description

wsim.hydroSystem is a class used to simulate a one or more
bodies interaction with fluid waves and also, optionally,
body-to-body interaction.

Inputs

waves

WEC-Sim waves class

simu

WEC-Sim simu class

hydrobodies

optional array of hydrobody objects.
Additional bodies can be added later with the
'addHydroBodies' method.

Outputs

hsys

hydroSystem object

addHydroBodies


Summary

add one or more hydrodynamic bodies to the system

Syntax

addHydroBodies (hsys, hydrobodyfiles)

Inputs

hsys

wsim.hydroSystem object

hydrobodies

array of one or more hydrobody objects to be
added to the system

advanceStep


Summary

advance to the next time step, store data as required

Syntax

advanceStep (hsys, t, vel, accel)

Description

advanceStep advances the solution to the next time step,
accepting the current time step solution and data into stored
solution histories.

Inputs

hsys

wsim.hydroSystem object

vel

(6 x nbodies) matrix of body velocities and angular
velocities at time t.

accel

(6 x nbodies) matrix of body accelerations and
angular accelerations at time t.

Outputs

correctAddedMassForce


Summary

recalculate the added mass and total forces on bodies

Syntax

[F_Total, F_AddedMass] = correctAddedMassForce (hsys, forceTotal, forceAddedMass, accel)

Description


Inputs

hsys

hydroSystem object

forceTotal

the total force calculated in a transient
simulation before added mass force correction (as output
by hydroSystem.hydroForces)

forceAddedMass

the added mass force calculated in a
transient simulation before added mass force correction
(as output by hydroSystem.hydroForces)

accel

(6 x n x nBodies) matrix of accelerations calculated
during a transient simulation

Outputs

F_Total

the corrected total forces for each node (taking
account the corected

F_AddedMass

the corected added mass forces

dynamicRealAddedMassForce


Summary

calculates the real added mass force for all bodies

Syntax

dynamicRealAddedMassForce (hsys, accels)

Inputs

hsys

hydroSystem object

getBodyMass


Summary

wsim.hydroSystem/getBodyMass is a function. propval = getBodyMass(self, bodyind)

getBodyProperty


Summary

wsim.hydroSystem/getBodyProperty is a function. propval = getBodyProperty(self, bodyind, property_name)

hydroForces


Summary

calculates forces acting on all bodies in a hydrodynamic system

[forces, breakdown] = hydroForces (hsys, t, x, vel, accel)

Description

hydroForces calculates the hydrodynamic forces acting on all
bodies in a hydrodynamic system.

Inputs

hsys

hydroSystem object

pos

(6 x nBodies) cartesian and angular positions of the
bodies in the system. Each column of pos is the positions
of one body, with the first three elements being the x, y,
and z positions and the second the three the angular
orientations in radians using the extrinsic Euler 123
(xyz) convention.

vel

(6 x nBodies) cartesian and angular velocities of the
bodies in the system. The velocites correspond to the
equvalent values in 'pos'.

accel

(6 x nBodies) cartesian and angular accelerations of
the bodies in the system. The accelerations correspond to
the equvalent values in 'pos'.

Outputs

forces

(6 x nBodies) matrix of translational and angular
forces acting on the body.

breakdown

structure containing a more detailed breakdown
of the forces and additional information. The fields which
will be present depend on the details of the simulation
chosen, but can include the following:

F_ExcitLin : (6 x nBodies) matrix of linear wave
  excitation forces. See also F_Excit and F_ExcitRamp
  below.

F_ExcitNonLin : (6 x nBodies) matrix of non-linear wave
  excitation forces (if calculated). Will be all zeros if
  non-linear excitation forces have not been activated for
  the simulation. See also F_Excit and F_ExcitRamp below.

F_Excit : (6 x nBodies) matrix of total wave
  excitation forces. This is the sum of F_ExcitLin and
  F_ExcitNonLin. If a ramp function is applied, the actual
  forces applied to the bodies are in F_ExcitRamp

F_ExcitRamp : (6 x nBodies) matrix of wave excitation
  forces (i.e. as in F_Excit), but with a ramp function
  applied. These are the actual excitation forces applied
  to the bodies during the simulation.

F_ViscousDamping : (6 x nBodies) matrix of viscous damping
  forces.

F_AddedMass : (6 x nBodies) matrix of added mass forces.
  Note that after simulation these should be modified
  using the correctAddedMassForce method, to get the
  'real' added mass forces.

F_RadiationDamping : (6 x nBodies) matrix of wave
  radiation damping forces.

F_Restoring : (6 x nBodies) matrix of restoring (buoyancy)
  forces.

F_MorrisonElement : (6 x nBodies) matrix of morrison
  element forces.

BodyHSPressure :

WaveNonLinearPressure : The Froude–Krylov pressure

WaveLinearPressure :

initialiseHydrobodies


Summary

performs some organisation tasks for the system

Syntax

initialiseHydrobodies (hsys)
initialiseHydrobodies (..., 'Parameter', Value)

Description

initialiseHydrobodies performs some preprocessing task to
organise the system which are necessary before proceeding to
set up a tme domain system. It should be called before
calling the timeDomainSimSetup method.

Inputs

hsys

wsim.hydroSystem object

Additional arguments may be supplied as parameter-value pairs:

MultiConditionRun


MultiConditionRunIndex


Outputs

See Also


makeMBDynComponents


Summary

generates mbdyn preprocessor objects for the system

Syntax

[mbnodes, mbbodies, mbelements] = makeMBDynComponents (hsys)

Description

Generates mbdyn preprocessor objects for the system

Inputs

hsys

wsim.hydroSystem object

Outputs

mbnodes

cell array of mbdyn.pre.structuralNode6dof
objects, one for each body in the system

mbbodies

cell array of mbdyn.pre.body objects, one for
each body in the system

mbelements

cell array of other mbdyn preprocessor objects
required for the system. The exact contents of this depends
on the simulation settings

timeDomainSimReset


Summary

reset the hydrodynamic system for transient simulation

Syntax

timeDomainSimReset (hsys)

Inputs

hsys

hydroSystem object

timeDomainSimSetup


Summary

prepare wsim.hydroSystem for a time domain simulation

Syntax

timeDomainSimSetup (hsys)

Description

timeDomainSimSetup prepares the hydrodynamic system to
perform a time domain simulation of the system.

Inputs

hsys

wsim.hydroSystem object