Calculate the Z factor with the Papp correlation
z.Papp(pres.pr, temp.pr, tolerance = 1e-13, verbose = FALSE)
pres.pr | pseudo-reduced pressure |
---|---|
temp.pr | pseudo-reduced temperature |
tolerance | rounding tolerance to avoid rounding readings that are in the middle of the grid. "tolerance" adds flexibility in deciding point closeness. |
verbose | print internal |
# Example 1 ## one single z calculation z.Papp(pres.pr = 1.5, temp.pr = 2.0)#> [1] 0.962332# Example 2 ## calculate z for multiple values of Tpr and Ppr ppr <- c(0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5) tpr <- c(1.3, 1.5, 1.7, 2) z.Papp(pres.pr = ppr, temp.pr = tpr)#> 0.5 1.5 2.5 3.5 4.5 5.5 6.5 #> 1.3 0.9208943 0.7357072 0.6290383 0.6271826 0.6858996 0.7656800 0.8501931 #> 1.5 0.9552137 0.8499334 0.7728520 0.7501411 0.7749505 0.8279008 0.8930795 #> 1.7 0.9736623 0.9138939 0.8665932 0.8471834 0.8578133 0.8919610 0.9406180 #> 2 0.9877275 0.9623320 0.9432543 0.9366532 0.9450048 0.9675653 1.0015334