Admiralty.Formula.Example.Rmd
This example demonstrates how to use the ShipPowerModel
package to calculate the propulsive power in kW for a given set of ships traveling within a specified speed range using the admiralty formula. The needed inputs are: ship actual speed (m/s) and draft (m), ship service speed (m/s) and draft (m), and the engine’s Maximum Continuous Rating (kW).
ships <- read.csv(system.file("extdata", "Sample.Ships.csv", package = "ShipPowerModel"))
ships$ID <- c(1:6)
ships <- ships[, c("ID", "ship.type", "actualDraft", "maxDraft", "service.speed", "MCR")]
ID | ship.type | actualDraft | maxDraft | service.speed | MCR |
---|---|---|---|---|---|
1 | bulk.carrier | 12.480000 | 13.570000 | 14.58 | 9363 |
2 | container.ship | 14.149603 | 15.600000 | 23.00 | 69029 |
3 | tanker | 14.310000 | 15.520000 | 15.00 | 13384 |
4 | container.ship | 11.090044 | 11.490000 | 20.50 | 23472 |
5 | tanker | 9.046500 | 9.728098 | 14.70 | 6300 |
6 | bulk.carrier | 6.826964 | 7.336176 | 13.43 | 3535 |
In this example, the “ship actual speed” will be a defined set of discrete speeds between 1 and 15 kn, over which we will estimate propulsion power. Typically, speed is reported in knots and needs to be converted to meters per second (m/s) for our calculations. After this step the dataframe ships gets long, so we will not show summary tables for the remaining calculations.
Note that these defined speeds are used to illustrate how to use this function; in practice, the actual speeds could be derived from various data sources, such as Automatic Identification System (AIS) data.
The discrete speeds are defined using c(1:15)
, merged with the ships
dataframe, and converted to m/s using calcSpeedUnitConversion
.
ships <- merge(ships, data.frame(ship.speed = c(1:15)))
ships$ship.speed <- calcSpeedUnitConversion(ships$ship.speed)
After this, we calculate power using the admiralty formula function, calcAdmPwr
, which estimates the ship’s actual main engine power as a function of the ratio of a ship’s actual to maximum speed, scaled by the maximum continuous engine power. The admiralty formula also uses the draft relationship to roughly model the hull wetted surface area.
ships$Power <- calcAdmPwr(ships$MCR,
ships$ship.speed,
ships$service.speed,
ships$actualDraft,
ships$maxDraft,
serviceMargin = 15)
The plot below shows the power curves calculated for each of the example ships:
Note: calcAdmPwr
has two additional parameters that may be used if needed:
n
allows the user to specify a different exponential relationship applied to the speed ratio. By default, this value is 3.refSpeedType
allows the user to specify that the reference speed parameter is the vessel’s maximum speed, instead of the service speed.The example below shows how maximum speed can be estimated from the service speed, and then how to use calcAdmPwr
with this parameter instead.
ships$max.speed <- ships$service.speed / 0.94
ships$ref.speed.type <- "maxSpeed"
ships$Power <- calcAdmPwr(ships$MCR,
ships$ship.speed,
ships$max.speed,
ships$actualDraft,
ships$maxDraft,
serviceMargin = 15,
refSpeedType = ships$ref.speed.type)