Create an object of class 'decline_fit'

decline_fit_param(
  input_unit = "Field",
  output_unit = "Field",
  fluid = "oil",
  model = "exponential",
  fit_data = "rate",
  prod_data,
  initial_param,
  lower = NULL,
  upper = NULL,
  control = NULL
)

Arguments

input_unit

a unit system for parameters, a character string either 'SI' or 'Field'

output_unit

a unit system for properties, a character string either 'SI' or 'Field'

fluid

fluid type, a character string either 'oil' or 'gas'

model

decline model, a character string. 'exponential', 'harmonic', 'hyperbolic', and 'modified_hyperbolic' models are currently available

fit_data

a character string, either 'rate', or 'cum'

prod_data

a numeric vector of rates or cumulative according to 'fit_data'

initial_param

a numeric vector of initial estimates for the Arps decline model

lower

an optional numeric vector of lower bounds for the Arps decline model parameters. See 'minpack.lm' package for details

upper

an optional numeric vector of upper bounds for the Arps decline model parameters. See 'minpack.lm' package for details

control

an optional list of control settings. See 'minpack.lm' package for details

Value

a list of class 'decline_fit' with all the required parameters for the decline_fit() S3 methods

Examples

prod_data <- 3000 * exp(-0.00234 * c(1:300)) dcl_fit_param_exp <- decline_fit_param(input_unit = "Field", output_unit = "Field", fluid = "oil", model = "exponential", fit_data = "rate", prod_data = prod_data, initial_param = c(1000, 0.1, 0), lower = NULL, upper = NULL, control = NULL) dcl_fit_param_exp
#> $input_unit #> [1] "Field" #> #> $output_unit #> [1] "Field" #> #> $fluid #> [1] "oil" #> #> $model #> [1] "exponential" #> #> $fit_data #> [1] "rate" #> #> $prod_data #> [1] 2992.988 2985.993 2979.014 2972.051 2965.105 2958.174 2951.260 2944.362 #> [9] 2937.481 2930.615 2923.765 2916.932 2910.114 2903.312 2896.527 2889.757 #> [17] 2883.003 2876.264 2869.542 2862.835 2856.144 2849.468 2842.808 2836.164 #> [25] 2829.535 2822.921 2816.323 2809.741 2803.174 2796.622 2790.086 2783.564 #> [33] 2777.059 2770.568 2764.092 2757.632 2751.187 2744.756 2738.341 2731.941 #> [41] 2725.556 2719.185 2712.830 2706.489 2700.163 2693.852 2687.556 2681.275 #> [49] 2675.008 2668.756 2662.518 2656.295 2650.087 2643.893 2637.713 2631.548 #> [57] 2625.397 2619.261 2613.139 2607.032 2600.938 2594.859 2588.794 2582.744 #> [65] 2576.707 2570.685 2564.676 2558.682 2552.702 2546.735 2540.783 2534.844 #> [73] 2528.920 2523.009 2517.112 2511.229 2505.360 2499.504 2493.662 2487.834 #> [81] 2482.019 2476.218 2470.430 2464.656 2458.896 2453.148 2447.415 2441.695 #> [89] 2435.988 2430.294 2424.614 2418.947 2413.293 2407.653 2402.025 2396.411 #> [97] 2390.810 2385.222 2379.647 2374.085 2368.537 2363.001 2357.478 2351.968 #> [105] 2346.471 2340.986 2335.515 2330.056 2324.610 2319.177 2313.756 2308.348 #> [113] 2302.953 2297.571 2292.201 2286.843 2281.498 2276.166 2270.846 2265.538 #> [121] 2260.243 2254.960 2249.690 2244.432 2239.186 2233.952 2228.731 2223.522 #> [129] 2218.325 2213.140 2207.967 2202.807 2197.658 2192.522 2187.397 2182.285 #> [137] 2177.184 2172.095 2167.019 2161.954 2156.901 2151.859 2146.830 2141.812 #> [145] 2136.806 2131.812 2126.829 2121.858 2116.899 2111.951 2107.015 2102.090 #> [153] 2097.177 2092.276 2087.385 2082.507 2077.639 2072.783 2067.939 2063.105 #> [161] 2058.283 2053.473 2048.673 2043.885 2039.108 2034.342 2029.587 2024.843 #> [169] 2020.111 2015.389 2010.679 2005.979 2001.291 1996.613 1991.946 1987.291 #> [177] 1982.646 1978.012 1973.389 1968.777 1964.175 1959.584 1955.004 1950.435 #> [185] 1945.876 1941.328 1936.791 1932.264 1927.748 1923.242 1918.747 1914.262 #> [193] 1909.788 1905.324 1900.871 1896.428 1891.996 1887.574 1883.162 1878.761 #> [201] 1874.369 1869.989 1865.618 1861.257 1856.907 1852.567 1848.237 1843.917 #> [209] 1839.608 1835.308 1831.018 1826.739 1822.469 1818.210 1813.960 1809.720 #> [217] 1805.490 1801.271 1797.061 1792.860 1788.670 1784.489 1780.319 1776.157 #> [225] 1772.006 1767.864 1763.732 1759.610 1755.497 1751.394 1747.301 1743.217 #> [233] 1739.143 1735.078 1731.023 1726.977 1722.940 1718.913 1714.896 1710.888 #> [241] 1706.889 1702.899 1698.919 1694.948 1690.987 1687.035 1683.092 1679.158 #> [249] 1675.233 1671.318 1667.411 1663.514 1659.626 1655.747 1651.877 1648.016 #> [257] 1644.164 1640.322 1636.488 1632.663 1628.847 1625.040 1621.242 1617.452 #> [265] 1613.672 1609.900 1606.138 1602.384 1598.638 1594.902 1591.174 1587.455 #> [273] 1583.745 1580.043 1576.350 1572.666 1568.990 1565.323 1561.665 1558.015 #> [281] 1554.373 1550.740 1547.116 1543.500 1539.892 1536.293 1532.702 1529.120 #> [289] 1525.546 1521.980 1518.423 1514.874 1511.333 1507.801 1504.277 1500.761 #> [297] 1497.253 1493.754 1490.263 1486.779 #> #> $initial_parameters #> [1] 1e+03 1e-01 0e+00 #> #> $lower #> NULL #> #> $upper #> NULL #> #> $control #> NULL #> #> attr(,"class") #> [1] "exponential_fit" "decline_fit"
prod_data <- 4500 / (1 + 0.002 * 0.834 * c(1:400)) ^ (1 / 0.834) dcl_fit_param_mod_hyp <- decline_fit_param(input_unit = "Field", output_unit = "Field", fluid = "oil", model = "modified_hyperbolic", fit_data = "rate", prod_data = prod_data, initial_param = c(10000, 0.1, 0.8, 0.01), lower = NULL,upper = NULL, control = list(maxiter = 100)) dcl_fit_param_mod_hyp
#> $input_unit #> [1] "Field" #> #> $output_unit #> [1] "Field" #> #> $fluid #> [1] "oil" #> #> $model #> [1] "modified_hyperbolic" #> #> $fit_data #> [1] "rate" #> #> $prod_data #> [1] 4491.016 4482.066 4473.148 4464.262 4455.409 4446.588 4437.799 4429.042 #> [9] 4420.316 4411.622 4402.959 4394.327 4385.726 4377.157 4368.617 4360.109 #> [17] 4351.630 4343.182 4334.764 4326.375 4318.017 4309.688 4301.388 4293.118 #> [25] 4284.877 4276.665 4268.481 4260.326 4252.200 4244.102 4236.033 4227.991 #> [33] 4219.978 4211.992 4204.034 4196.103 4188.200 4180.324 4172.475 4164.654 #> [41] 4156.859 4149.091 4141.349 4133.634 4125.945 4118.282 4110.646 4103.035 #> [49] 4095.450 4087.891 4080.357 4072.849 4065.366 4057.908 4050.476 4043.068 #> [57] 4035.685 4028.327 4020.993 4013.684 4006.399 3999.138 3991.901 3984.689 #> [65] 3977.500 3970.335 3963.193 3956.076 3948.981 3941.910 3934.862 3927.837 #> [73] 3920.835 3913.856 3906.900 3899.966 3893.055 3886.166 3879.300 3872.456 #> [81] 3865.634 3858.834 3852.055 3845.299 3838.564 3831.851 3825.160 3818.490 #> [89] 3811.841 3805.213 3798.607 3792.021 3785.457 3778.913 3772.390 3765.887 #> [97] 3759.405 3752.944 3746.503 3740.082 3733.681 3727.300 3720.939 3714.598 #> [105] 3708.277 3701.976 3695.694 3689.432 3683.189 3676.966 3670.762 3664.577 #> [113] 3658.411 3652.264 3646.136 3640.026 3633.936 3627.864 3621.811 3615.776 #> [121] 3609.760 3603.762 3597.782 3591.821 3585.877 3579.952 3574.044 3568.155 #> [129] 3562.283 3556.429 3550.592 3544.773 3538.972 3533.187 3527.421 3521.671 #> [137] 3515.939 3510.223 3504.525 3498.843 3493.179 3487.531 3481.900 3476.286 #> [145] 3470.688 3465.107 3459.542 3453.994 3448.461 3442.945 3437.446 3431.962 #> [153] 3426.494 3421.043 3415.607 3410.187 3404.783 3399.394 3394.021 3388.664 #> [161] 3383.322 3377.995 3372.684 3367.389 3362.108 3356.843 3351.592 3346.357 #> [169] 3341.137 3335.931 3330.741 3325.565 3320.404 3315.258 3310.126 3305.009 #> [177] 3299.906 3294.818 3289.744 3284.685 3279.639 3274.608 3269.591 3264.588 #> [185] 3259.599 3254.624 3249.663 3244.716 3239.783 3234.863 3229.957 3225.065 #> [193] 3220.186 3215.321 3210.469 3205.631 3200.806 3195.994 3191.196 3186.411 #> [201] 3181.639 3176.879 3172.134 3167.401 3162.681 3157.973 3153.279 3148.597 #> [209] 3143.929 3139.273 3134.629 3129.998 3125.380 3120.774 3116.180 3111.599 #> [217] 3107.030 3102.474 3097.930 3093.398 3088.878 3084.370 3079.874 3075.391 #> [225] 3070.919 3066.459 3062.011 3057.575 3053.150 3048.738 3044.337 3039.947 #> [233] 3035.570 3031.203 3026.849 3022.505 3018.173 3013.853 3009.544 3005.246 #> [241] 3000.959 2996.684 2992.420 2988.167 2983.925 2979.693 2975.473 2971.264 #> [249] 2967.066 2962.879 2958.702 2954.537 2950.382 2946.237 2942.104 2937.981 #> [257] 2933.868 2929.767 2925.675 2921.594 2917.524 2913.464 2909.414 2905.375 #> [265] 2901.346 2897.327 2893.318 2889.319 2885.331 2881.353 2877.384 2873.426 #> [273] 2869.478 2865.540 2861.611 2857.693 2853.784 2849.885 2845.996 2842.116 #> [281] 2838.246 2834.386 2830.536 2826.695 2822.863 2819.042 2815.229 2811.426 #> [289] 2807.633 2803.848 2800.074 2796.308 2792.552 2788.805 2785.067 2781.339 #> [297] 2777.619 2773.909 2770.207 2766.515 2762.832 2759.158 2755.493 2751.836 #> [305] 2748.189 2744.550 2740.920 2737.299 2733.687 2730.084 2726.489 2722.903 #> [313] 2719.325 2715.756 2712.196 2708.644 2705.101 2701.567 2698.040 2694.522 #> [321] 2691.013 2687.512 2684.019 2680.535 2677.059 2673.591 2670.131 2666.680 #> [329] 2663.237 2659.802 2656.375 2652.956 2649.545 2646.142 2642.747 2639.361 #> [337] 2635.982 2632.611 2629.248 2625.893 2622.545 2619.206 2615.874 2612.550 #> [345] 2609.234 2605.925 2602.625 2599.331 2596.046 2592.768 2589.498 2586.235 #> [353] 2582.980 2579.732 2576.492 2573.259 2570.034 2566.816 2563.605 2560.402 #> [361] 2557.206 2554.017 2550.836 2547.662 2544.495 2541.336 2538.183 2535.038 #> [369] 2531.900 2528.769 2525.645 2522.528 2519.419 2516.316 2513.220 2510.131 #> [377] 2507.050 2503.975 2500.907 2497.846 2494.791 2491.744 2488.704 2485.670 #> [385] 2482.643 2479.623 2476.609 2473.602 2470.602 2467.609 2464.622 2461.642 #> [393] 2458.668 2455.701 2452.741 2449.787 2446.840 2443.899 2440.964 2438.037 #> #> $initial_parameters #> [1] 1e+04 1e-01 8e-01 1e-02 #> #> $lower #> NULL #> #> $upper #> NULL #> #> $control #> $control$maxiter #> [1] 100 #> #> #> attr(,"class") #> [1] "modified_hyperbolic_fit" "decline_fit"