#' @title cavitation index (Reference upstream pressure P1):
#' @description The value for the operating service conditions of a valve.
#'
#' @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_0 <- function(p1, p2, masl = 0, temp = 20){
pv <- vapour_pressure(temp)
p1 = p1 + atm_pressure(masl)
p2 = p2 + atm_pressure(masl)
return((p1-pv)/(p1-p2))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.