R/fp.R

Defines functions fp

Documented in fp

#' @title Fp Piping geometry factor
#' @description The piping geometry factor Fp accounts for fittings attached to
#' either the valve inlet or the outlet that disturb the flow to the extent that
#' valve capacity is affected. Fp is actually the ratio of the flow coefficient
#' of a valve with attached fittings to the flow coefficient (kv) of a valve
#' installed in a straight pipe of the same size as the valve.
#' @param kv Flow coefficient in m3/h
#' @param dn diameter in millimeter (mm).
#' @param d1 Inlet diameter reducer only in millimeter (mm).
#' @param d2 Outlet diameter increase only in millimeter (mm).
#' @return Fp Piping geometry factor, dimensionless
#' @export
#' @examples
#' fp(kv = 7247.229, dn =0.5, d1 = 0.6, d2 = 0.6)
#'
fp <- function(kv, dn, d1, d2){
  rc <- resistance_coefficient(dn, d1, d2)
  return(1 / sqrt(1+(rc*(kv/dn^2)^2)/0.0016))
}
ratral/hyd4gpv documentation built on Feb. 5, 2022, 10:30 p.m.