-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
99 lines (78 loc) · 3.71 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
output: github_document
bibliography: vignettes/mooring.bib
---
<!-- README.md is generated from README.Rmd, so please edit the latter. -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# mooring
<!-- badges: start -->
[![R-CMD-check](https://github.com/dankelley/mooring/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/dankelley/mooring/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
The goal of the `mooring` package is to facilitate computations in the
R language of the deformation of oceanographic moorings by ocean
currents. It builds on Fortran code discussed by
@moller_computer_1976, which evolved into a new form as discussed by
@hamilton_mooring_1997 and @hamilton_validation_1989, and then a
Matlab form discussed by @dewey_mooring_1999. It is more limited than
these earlier works, e.g. in considering only unidirectional currents,
in ignoring the stretching of mooring components, and in ignoring the
stresses involved during mooring descent.
In addition to a fairly broad suite of functions, the package also provides
crude interactive tools for exploring simple moorings.
Conventional R help is provided, in addition to several vignettes, and a
[youtube playlist](https://www.youtube.com/playlist?list=PLgOXS4jiqJftEEw-jS_V4edXWpaojcw-J&si=xkM2cH3u_e1gdsWU).
At the moment, `mooring` only handles bottom-anchored moorings in which the top
buoyancy element is below the sub-surface.
## Installation
You can install the development version of `mooring` from
[GitHub](https://github.com/) by typing the following in an R console.
(Uncomment the first line, if the `devtools` package is not already installed
on your computer.)
``` r
# install.packages("devtools")
devtools::install_github("dankelley/mooring")
```
## Example
The following shows how to assess the knockdown of a mooring
consisting of a bottom anchor, 100 m of wire, and a 16-inch Viny
float, in a region of water depth 120 m with a constant current of 0.5
m/s (roughly 1 knot). To learn more, (a) alter the current and
observe changes in the mooring shape, (b) set the `which` argument of
`plot.mooring()` to focus more directly on the knockdown, and (c)
explore the effects of specifying depth-dependent currents in the
`knockdown()` call. After a few steps like this, you ought to examine
the vignettes and the documentation of the package's functions, so you
can tackle a practical case of your own.
```{r example}
library(mooring)
# Design a mooring with a 16-inch Viny float attached to a bottom
# anchor with 100m of wire cable.
m <- mooring(anchor(), wire(length = 100), float("16in Viny"), waterDepth = 120)
# Segmentize wire portion (to 1m spacing).
ms <- segmentize(m)
# Apply a depth-invariant 0.5 m/s current.
msk <- knockdown(ms, u = 0.5)
plot(msk, fancy = TRUE)
```
# Acknowledgments
The mooring-element properties that are stored in the
`mooringElements` database stem from three main sources. The first was
Richard Dewey's Matlab code (see @dewey_mooring_2023 for an updated
version). The second was in spreadsheets and other documents provided
by Jay Barthelotte and Matthew Lawson of the Bedford Institute of
Oceanography ([BIO](https://www.bio.gc.ca/index-en.php)). And the
third was in spreadsheets and other documents provided by Danielle
Dempsey and Nicole Torrie of the Centre for Marine Research
([CMAR](https://cmar.ca)). These sources are designated `"Dewey"`,
`"BIO"` and `"CMAR"`, respectively, in `mooringElements`.
Conversations with Clark Richards and Chantelle Layton (both of
[BIO](https://www.bio.gc.ca/index-en.php)) were helpful in identifying data
sources and in clarifying the nature of mooring systems.
# References