Dranchuk-AbouKassem: Dranchuk-AbouKassem correlation

Description Usage Arguments Examples

Description

Dranchuk-AbouKassem correlation

Usage

1
2
z.DranchukAbuKassem(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 calclulations

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## calculate z for one Tpr curve at a single Ppr
z.DranchukAbuKassem(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.DranchukAbuKassem(pres.pr = ppr, temp.pr = tpr)
## create and print comparison tables with the z matrices
ppr <- c(0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5)
tpr <- c(1.05, 1.1, 1.7, 2)
z.calc <- z.DranchukAbuKassem(ppr, tpr)
z.chart <- getStandingKatzMatrix(ppr_vector = ppr, tpr_vector = tpr)
ape <- abs((z.calc - z.chart) / z.chart) * 100
cat("z.correlation \n"); print(z.calc)
cat("\n z.chart \n"); print(z.chart)
cat("\n APE \n"); print(ape)

Example output

[1] 0.9551087
          0.5       1.5       2.5       3.5       4.5       5.5       6.5
1.3 0.9203019 0.7543694 0.6377871 0.6339357 0.6898314 0.7663247 0.8499523
1.5 0.9509373 0.8593144 0.7929993 0.7710525 0.7896224 0.8331893 0.8904317
1.7 0.9681353 0.9128087 0.8753784 0.8619509 0.8721085 0.9003962 0.9409634
2   0.9824731 0.9551087 0.9400752 0.9385273 0.9497137 0.9715388 1.0015560
z.correlation 
           0.5       1.5       2.5       3.5       4.5       5.5       6.5
1.05 0.8300683 0.2837318 0.3868282 0.5063005 0.6239783 0.7392097 0.8521762
1.1  0.8570452 0.4463987 0.4125200 0.5178068 0.6281858 0.7378206 0.8458725
1.7  0.9681353 0.9128087 0.8753784 0.8619509 0.8721085 0.9003962 0.9409634
2    0.9824731 0.9551087 0.9400752 0.9385273 0.9497137 0.9715388 1.0015560

 z.chart 
       0.5   1.5   2.5   3.5   4.5   5.5   6.5
1.05 0.829 0.253 0.343 0.471 0.598 0.727 0.846
1.10 0.854 0.426 0.393 0.500 0.615 0.729 0.841
1.70 0.968 0.914 0.876 0.857 0.864 0.897 0.942
2.00 0.982 0.956 0.941 0.937 0.945 0.969 1.003

 APE 
            0.5         1.5         2.5       3.5       4.5       5.5       6.5
1.05 0.12887088 12.14694898 12.77790878 7.4947969 4.3441895 1.6794701 0.7300441
1.1  0.35658638  4.78841969  4.96692005 3.5613696 2.1440308 1.2099607 0.5793746
1.7  0.01397555  0.13033558  0.07096218 0.5776995 0.9384799 0.3786176 0.1100436
2    0.04818209  0.09322868  0.09827500 0.1629967 0.4988064 0.2620070 0.1439679

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