Convert compartment to human-readable string. Convert asset using options. Output format is specified as Return default policy. Policy can be either Export asset to file using options. File path is specified as Export polyhedron to the file specified by path using options. Output format is specified as Generate ship compartments for hull. rooms specify how many rooms in each dimension is generated. Fits the grid of rooms in the bounding box of the hull. Get the current instance of virtual testbed. This can only be done when the GUI is stopped (see testbed-gui-stop!). Convert grid to human-readable string. Get upper bound. Get lower bound. Construct a new grid by selecting dimensions from the existing grid. dimensions is a list of integers. Import an asset from file using options specified. File path is specified as Import ship compartments from the file specified by path using options. See supported-asset-options for the full list of options. Import ship hull from the file specified by path using options. Input format is specified as Import polyhedron from the file specified by path using options. File path is specified as Make wind velocity field generator and solver. The generator produces wind field with constant velocity taking into account obstacles. leeward-ratio controls the ratio of the velocity vector that is reflected from the leeward part of the obstacle. Make calm sea wavy surface generator. This generator produces perfectly flat ocean surface. Make ship compartment from polyhedron with optional name. Make Gerstner solver. This solver replaces both the wave generator and the wave pressure solver. waves is a list of Make multidimensional rectangular grid. Specify either the number of points or the number of segments: the other parameter is calculated as num-segments = num-points - 1. Make OpenCL context. You need this context only if you plan to use GPU acceleration. To do so, pass the context as an argument to make-testbed. The following options help to choose a particular plaform. Use opencl-platforms to find out particular values on your machine. platform-suffix is the suffix of the platform. You can use any substring, uppercase or lowecase, as long as it uniquely identifies the platform. device-name is the name of the device. You can use any substring, uppercase or lowecase, as long as it uniquely identifies the device. device-type is the type of the device. Possible values are Make plane wave generator. This generator produces ocean surface made by the specified wave. wave is created by make-wave. policy controls parallel computations. See supported-policies for the explanation and possible values. Make quaterinon from w, x, y, z components. "If unit is true, then the resulting quaternion is normalised (the default). Construct ship from hull, compartments and optionally specify any of the following: mass, displacement, draught, quaternion. Make virtual testbed. All arguments are optional, when omitted, sane defaults are used. grid is four-dimensional or three-dimensional simulation grid. wave-generator is a ocean wave generator (see make-plane-wave-generator). wind-solver is wind velocity field generator and solver (see make-anlt-wind-solver). ship is ship made by make-ship. policy controls parallel computations. See supported-policies for the explanation and possible values. opencl-context OpenCL context. Make wave with specified type, amplitude, length and direction angle or normal. Angular frequency is calculated using dispersion relation for the specified type of the wave. Type can be one of the following. Get the list of all OpenCL platforms. Compute bounding box of the polyhedron. Return minimum and maximum value for each dimension as a pair of two lists. Compute the extent of the polyhedron in specified dimension. Compute centroid of the polyhedron. Return true if polyhedron contains no vertices, faces and normals. Flip the polyhedron relative to the origin in a specified dimension. Return new polyhedron. Flip the polyhedron relative to the origin in a specified dimension. Change existing polyhedron. Mirror the polyhedron relative to the origin in a specified dimension. Return new polyhedron. Mirror the polyhedron relative to the origin in a specified dimension. Change existing polyhedron. Move the polyhedron to a specified delta in three dimensions. Return new polyhedron. Move the polyhedron to a specified delta in three dimensions. Change existing polyhedron. Compute vertex and face normals. Return new polyhedron. Use polyhedron-reorder to make sure that face indices winding order is correct. Compute vertex and face normals. Change polyhedron. Use polyhedron-reorder! to make sure that face indices winding order is correct. Fix face vertices winding order. Return new polyhedron. This procedure makes winding order of all face indices compatible with neighbouring faces. The method finds reference face and computes surface normal using simple heuristic (the value of angle between normal and vector from the centre of the geometry to face centre). If the guess is correct, all faces would have the correct surface normal, otherwise they would have normals with the opposite directions. Reference face is a face that is closest to the geometry centre. Use polyhedron-unique to make sure that there are no faces with duplicate indices and there are no duplicate vertices. Fix face vertices winding order. Change polyhedron. This procedure makes winding order of all face indices compatible with neighbouring faces. The method finds reference face and computes surface normal using simple heuristic (the value of angle between normal and vector from the centre of the geometry to face centre). If the guess is correct, all faces would have the correct surface normal, otherwise they would have normals with the opposite directions. Reference face is a face that is closest to the geometry centre. Use polyhedron-unique! to make sure that there are no faces with duplicate indices and there are no duplicate vertices. Rotate the polyhedron relative to the origin in a specified dimension by the angle that is multiple of 90 degrees. Return new polyhedron. Rotate the polyhedron relative to the origin in a specified dimension by the angle that is multiple of 90 degrees. Change existing polyhedron. Scale the polyhedron by a specified factor in three dimensions. Return new polyhedron. Scale the polyhedron by a specified factor in three dimensions. Change existing polyhedron. Compute signed volume of the polyhedron. Compute signed volume of the polyhedron below certain level in dimension. For example, use Remove duplicate vertices and faces. Return new polyhedron. Removes faces with duplicate indices as a side effect. Remove duplicate vertices and faces. Change polyhedron. Removes faces with duplicate indices as a side effect. Compute absolute volume of the polyhedron. Replace the current instance of virtual testbed with other. This can only be done when the GUI is stopped (see testbed-gui-stop!). Flood ship compartment named name with volume of water. Use ship-compartments to find compartments names. Get ship compartments including their names. Get ship mass. Get ship quaternion. Set ship quaternion. Get all column names as symbols. Get the current row of the table as associative list. Return a list of options supported by asset import, export and conversion procedures. Basic options for all converters are: Common options: VSL options: BSP options: Options for import-hull Return a list of policies supported by virtual testbed. Policy can be either Get simulation grid. Pause real-time simulation and screen recording. Start real-time simulation. Start screen recording. Can be done before or after GUI has been started. The screen is recorded os OGV file in the current working directory. When GUI is stopped or paused, screen recording is stopped. Stop real-time simulation and screen recording. Stop screen recording. This procedure properly closes screen recording output file. Set testbed policy. Setting the policy replaces all testbed solvers with default ones for the specified policy. policy controls parallel computations. See supported-policies for the explanation and possible values. Reset testbed state. Get statistics that contains time series of recorded ship motion and fluid motion parameters. Simulate one time step. delta-t is the size of the step in seconds. Get the current simulation time instant. Run garbage collection and all object destructors. Use this procedure to make sure that all memory allocated in C++ part of the programme is freed.compartment->string compartment
convert-asset asset [#:options]
output-format
option. See supported-asset-options for the full list of options.default-policy
openmp
or opencl
. It controls whether processor cores or GPU is used to accelerate computations.export-asset asset [#:options]
output-path
option. See supported-asset-options for the full list of options.export-polyhedron polyhedron path [#:options]
output-format
option. See supported-asset-options for the full list of options.generate-compartments hull rooms
get-testbed
grid->string grid
grid-max grid
grid-min grid
grid-select grid dimensions
import-asset [#:options]
input-path
option. See supported-asset-options for the full list of options.import-compartments path [#:options]
import-hull path [#:options]
input-format
option. This function is the same as import-polyhedron but also computes ship mass. See supported-asset-options for the full list of options.import-polyhedron path [#:options]
input-path
option. Input format is specified as input-format
option. See supported-asset-options for the full list of options.make-anlt-wind-solver [#:velocity] [#:leeward-ratio] [#:policy]
make-calm-sea-generator
make-compartment polyhedron [#:name]
make-gerstner-solver [#:waves] [#:policy] [#:diffraction] [#:radiation] [#:waterline-only] [#:diffraction-ratio] [#:depth]
<linear-wave>
objects created by make-wave. diffraction and radiation are boolean options that enable or disable simulation of the corresponding phenomena. waterline-only option, when enabled, makes the solver neglect the ship hull panels that are underwater and compute radiation and diffraction forces only for the panels that are directly on the waterline. This reduces accuracy, but improves performance greatly. diffraction-ratio controls wave reflection. If you set it to 0, no reflection occurres. If you set it to 1, wave are fully reflected and their amplitudes are doubled. depth is water depth. Set it to positive infinity to neglect shallow water terms. policy controls parallel computations. See supported-policies for the explanation and possible values.make-grid [#:min] [#:max] [#:num-points] [#:num-segments]
make-opencl-context [#:platform-suffix] [#:device-name] [#:device-type] [#:flags]
accelerator
, all
, CPU
, GPU
, custom
, default
. flags is compiler flags. Refer to OpenCL manual for a list of possible values.make-plane-wave-generator [#:wave] [#:policy]
make-quaternion w x y z [#:unit]
make-ship [#:hull] [#:compartments] [#:mass] [#:displacement] [#:draught] [#:quaternion]
make-testbed [#:grid] [#:wave-generator] [#:wind-solver] [#:ship] [#:policy] [#:opencl-context]
make-wave type [#:amplitude] [#:length] [#:direction] [#:normal]
<propagating-cosine-wave>
Linear wave theory. <standing-cosine-wave>
Linear wave theory. <linear-wave>
Linear wave theory. <propagating-stokes-wave>
Stokes wave. opencl-platforms
polyhedron-bounding-box polyhedron
polyhedron-bounds polyhedron dimension
polyhedron-centroid polyhedron
polyhedron-empty? polyhedron
polyhedron-flip polyhedron dimension
polyhedron-flip! polyhedron dimension
polyhedron-mirror polyhedron dimension
polyhedron-mirror! polyhedron dimension
polyhedron-move polyhedron delta
polyhedron-move! polyhedron delta
polyhedron-normalise polyhedron
polyhedron-normalise! polyhedron
polyhedron-reorder polyhedron
polyhedron-reorder! polyhedron
polyhedron-rotate polyhedron dimension angle
polyhedron-rotate! polyhedron dimension angle
polyhedron-scale polyhedron factor
polyhedron-scale! polyhedron factor
polyhedron-signed-volume polyhedron
polyhedron-signed-volume-below polyhedron dimension level
(polyhedron-signed-volume-below poly 2 0)
to compute signed volume of poly
below 0 in dimension.polyhedron-unique polyhedron
polyhedron-unique! polyhedron
polyhedron-volume polyhedron
set-testbed! other
ship-compartment-flood! ship name volume
ship-compartments ship
ship-mass ship
ship-quaternion ship
ship-quaternion! ship quaternion
statistics-columns statistics
time
Simulation time instant, s. surge
Ship translation along axis, m. sway
Ship translation along axis, m. heave
Ship translation along axis, m. roll
Ship rotation angle around axis, m. pitch
Ship rotation angle around axis, m. yaw
Ship rotation angle around axis, m. velocity-x
Ship linear velocity along axis, m/s. velocity-y
Ship linear velocity along axis, m/s. velocity-z
Ship linear velocity along axis, m/s. angular-velocity-x
Ship angular velocity around axis, m/s. angular-velocity-y
Ship angular velocity around axis, m/s. angular-velocity-z
Ship angular velocity around axis, m/s. acceleration-x
Ship linear acceleration along axis, m/s. acceleration-y
Ship linear acceleration along axis, m/s. acceleration-z
Ship linear acceleration along axis, m/s. angular-acceleration-x
Ship angular acceleration around axis, m/s. angular-acceleration-y
Ship angular acceleration around axis, m/s. angular-acceleration-z
Ship angular acceleration around axis, m/s. underwater-volume
The volume of submerged part of the ship, . wave-length-t
Surface wave period, s. wave-length-x
Surface wave length along axis, m. wave-length-y
Surface wave length along axis, m. wave-number-t
Surface wave frequency, . wave-number-x
Surface wave number along axis, . wave-number-y
Surface wave number along axis, . wave-height-t
Surface wave height along time axis measured at one point of space, m. wave-height-x
Surface wave height along axis measured at one point of time, m. wave-height-y
Surface wave height along axis measured at one point of time, m. elevation
Surface elevation measured at one point of time and space (at ship position for regular grid and at the starting point of the grid for irregular grid). angular-momentum-x
Ship angular momentum around axis, . angular-momentum-y
Ship angular momentum around axis, . angular-momentum-z
Ship angular momentum around axis, . statistics-current-row statistics
supported-asset-options
input-path
, output-path
, input-format
, output-format
. Options are specified as a list of pairs where the first element of the pair is symbol denoting the name of the option, and the second element is a string containing option value. If input format is not present in options, it is determined automatically from the file extension. The list of all options is below.gnuplot
Output as Gnuplot script. This option works for any asset internal representation of which is polyhedron. Default value is #f
.input-format
Input format. Can be one of the following: obj
, stl
, vsl
, bsp
, igs
, rms
.output-format
Output format. Can be one of the following: obj
, stl
, vsl
, bsp
, igs
, rms
.input-path
Input file path. output-path
Output file path. close-top
Do not remove the main deck. Default value is #t
.close-bottom
Do not remove the bottom. Default value is #t
.step-z
Vertical distance between points in metres. Default value is computed automatically as the average vertical distance between spline points. resolution-u
The number of points for segment in dimension. Default value is 2. resolution-v
The number of points for segment in dimension. Default value is 2. centre-of-mass
How to determine centre of mass? Possible values: "centroid"
, "auto"
. Default value is "auto"
.centre-of-mass-delta
Three-dimensional offset of the centre of mass from the centroid. Default value is '(0 0 0)
.draught
Hull draught. Default value is determined automatically from the file format. If the format does not contain draught value, minimal coordinate is used. If minimal coordinate is nought, then the distance from the bottom of the hull to the centre of mass is used instead. supported-policies
openmp
or opencl
. It controls whether processor cores or GPU is used to accelerate computations.testbed-grid testbed
testbed-gui-pause!
testbed-gui-start!
testbed-gui-start-recording!
testbed-gui-stop!
testbed-gui-stop-recording!
testbed-policy! testbed policy
testbed-reset! testbed
testbed-statistics testbed
testbed-step! testbed delta-t
testbed-time-instant testbed
vtestbed-gc