R/kv.R

Defines functions kv

Documented in kv

#' @title Valve flow coefficient
#' @description  The valve flow coefficient Kv is defined as the number
#' of cubic meters per hour of water that will flow through
#' a control valve at a specified position of the control valve (travel) h
#' with a differential pressure Delta P (p1-p2) across it.
#' @param p1 Inlet pressure [bar]
#' @param p2 Outlet pressure [bar]
#' @param flow flow in m³/h
#' @param temp temperature is in Celsius.
#' @return kv Flow coefficient in m³/h
#' @export
#' @examples
#' kv(2, 1, 200)

kv <- function(p1, p2, flow, temp = 20){
  r_density <-  water_density(temp)/water_density(20)
  kv <- flow*sqrt(r_density/(p1-p2))
  return(kv)
}
ratral/hyd4gpv documentation built on Feb. 5, 2022, 10:30 p.m.