# Dranchuk-Purvis-Robinson: Dranchuk-Purvis-Robinson correlation In zFactor: Calculate the Compressibility Factor 'z' for Hydrocarbon Gases

## Description

Dranchuk-Purvis-Robinson correlation

## Usage

 ```1 2``` ```z.DranchukPurvisRobinson(pres.pr, temp.pr, tolerance = 1e-13, verbose = FALSE) ```

## Arguments

 `pres.pr` pseudo-reduced pressure `temp.pr` pseudo-reduced temperature `tolerance` controls the iteration accuracy `verbose` print internal

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```## calculate for one Tpr curve at a Ppr z.DranchukPurvisRobinson(pres.pr = 1.5, temp.pr = 2.0) ## For vectors of Ppr and Tpr: 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.DranchukPurvisRobinson(pres.pr = ppr, temp.pr = tpr) ## create a matrix of z values tpr2 <- c(1.05, 1.1, 1.2, 1.3) ppr2 <- c(0.5, 1.0, 1.5, 2, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5) sk_corr_2 <- createTidyFromMatrix(ppr2, tpr2, correlation = "DPR") tibble::as_tibble(sk_corr_2) ```

### Example output

```[1] 0.9546382
0.5       1.5       2.5       3.5       4.5       5.5       6.5
1.3 0.9197157 0.7525940 0.6366665 0.6337883 0.6891997 0.7650171 0.8480804
1.5 0.9504834 0.8583491 0.7926325 0.7720713 0.7914322 0.8348883 0.8915239
1.7 0.9677844 0.9121791 0.8752677 0.8630002 0.8743271 0.9033216 0.9440582
2   0.9822021 0.9546382 0.9399310 0.9391490 0.9512966 0.9740256 1.0047347
# A tibble: 52 x 5
Tpr     Ppr z.chart z.calc       dif
<chr> <dbl>   <dbl>  <dbl>     <dbl>
1 1.05    0.5   0.829  0.830 -0.000976
2 1.1     0.5   0.854  0.857 -0.00264
3 1.2     0.5   0.893  0.894 -0.00146
4 1.3     0.5   0.916  0.920 -0.00372
5 1.05    1     0.589  0.586  0.00333
6 1.1     1     0.669  0.676 -0.00689
7 1.2     1     0.779  0.777  0.00205
8 1.3     1     0.835  0.836 -0.000989
9 1.05    1.5   0.253  0.285 -0.0320
10 1.1     1.5   0.426  0.443 -0.0169
# ... with 42 more rows
```

zFactor documentation built on Aug. 1, 2019, 5:04 p.m.