Create a anchor object, either by looking up a known object from
the database, or by defining a new type. This must be the first
element of a mooring constructed with mooring()
.
anchor(model = "1 Railway Wheel", buoyancy = NULL, height = NULL, CD = NULL)
character value indicating the type of anchor.
There are three possibilities for model
.
(1) If this is "?"
, then the function returns a vector of permitted
character values. (2) If this is "?X"
, where X is a set of
characters, then findElement()
is called to do a fuzzy search,
with the search
argument set to "anchor"
.
(3) If it is recognized, i.e. if that type is
stored in data(mooringElements)
, then the that stored value
is used, and all other arguments to this function are ignored.
(4) Otherwise, a new anchor object is created, using
values specified in the other arguments (all of which must
be supplied).
numeric value indicating buoyancy. For
wire elements, this is buoyancy per length, expressed in kg/m.
For other elements, it is buoyancy, expressed in kg.
Note that buoyancy
is ignored if model
is recognized.
numeric value for the height (in m) of the element.
This value is used in the computation of the mooring geometry.
In some cases, as e.g. in Dewey-derived data that have "diameter" tabulated
as zero, it is also used in the computation of the area
of the element, as height*width.
Note that height
is ignored if model
is recognized.
numeric value (unitless) for the drag coefficient.
Note that CD
is ignored if model
is recognized.
anchor
returns a "mooringElement"
object with "anchor"
subclass.
library(mooring)
# List known anchor types
anchor("?")
#> [1] "1 Concrete Block" "1 Large St/C Tire" "1 Railway Wheel"
#> [4] "1 Tire-St+Con" "1 rotor" "10 rotor"
#> [7] "2 Concrete Blocks" "2 Railway Wheels" "2 rotor"
#> [10] "3 Concrete Blocks" "3 Railway Wheels" "3 rotor"
#> [13] "3 trainwheels" "4 Railway Wheels" "4 rotor"
#> [16] "5 rotor" "6 rotor" "7 rotor"
#> [19] "8 rotor" "8x8x16 cinder block" "8x8x16 concrete block"
#> [22] "9 rotor"