#' @title cavitation index (Reference downstream pressure P2):
#' @description The value for the operating service conditions of a valve.
#' Reference downstream pressure
#'
#' @param p1 Gauge Inlet pressure (bar).
#' @param p2 Gauge outlet pressure (bar).
#' @param masl meters above sea level (m).
#' @param temp The temperature is in Celsius.
#'
#' @return Sigma
#' @export
#'
sigma_1 <- function(p1, p2, masl = 0, temp = 20){
pv <- vapour_pressure(temp)
p1 = p1 + atm_pressure(masl)
p2 = p2 + atm_pressure(masl)
return((p2-pv)/(p1-p2))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.