{'fraction_non_alphanumeric': 0.03343506273312988, 'fraction_numerical': 0.017361817565276366, 'mean_word_length': 4.62824427480916, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Bayesian Estimation for the Fractional Order of the Differential Equation that Models Transport in Unconventional Hydrocarbon Reservoirs

The extraction of natural gas from the earth has been shown to be governed by differential equations concerning flow through a porous material. Recently, models such as fractional differential equations have been developed to model this phenomenon. One key issue with these models is estimating the fraction of the differential equation. Traditional methods such as maximum likelihood, least squares and even method of moments are not available to estimate this parameter as traditional calculus methods do not apply. We develop a Bayesian approach to estimate the fraction of the order of the differential equation that models transport in unconventional hydrocarbon reservoirs. In this paper, we use this approach to adequately quantify the uncertainties associated with the error and predictions. A simulation study is presented as well to assess the utility of the modeling approach.


Introduction
Fractional calculus and its application to different disciplines of science has grown. Recently, varied works have been published about fractional differential equations for a range of topics, from the case of Lévy motion discussed by Benson et al. (2000), to the modeling of an Ebola epidemic in Area et al. (2015). Fractional calculus has also been discussed to great length in Meerschaert and Tadjeran (2004). Wyss (1986) discussed fractional derivative concepts, including various ways to solve them. Liu et al. (2009) considered a finite domain space-time fractional advection dispersion equation. Malik et al. (2015) discuss the lack of knowledge of transport in porus material. The use of fractional differential equations is becoming more popular in the field of hydrocarbon reservoirs, as it utilizes all the parameters previously stated. de Andrade et al. (2005) discuss anomalous flow necessitating the use for fractional calculus, specificaly fractional diffusion equation. In this paper, the goal is to estimate the fractional order α of equation (1.1) which is difficult to isolate. Fan et al. (2016) discuss parameter estimation of a fractional fractal diffusion model, specifically across porous media. Malik et al. (2014) considered the problem of modeling transport in unconventional hydrocarbon reservoirs using a fractional partial differential equation. Awotunde et al. (2016) show there is deviation between real data obtained and the model using Darcy s law from Darcy (1856), which is why new models must be implemented. Ariza-Hernandez et al. (2017) utilize a Bayesian approach to solve the inverse problem of a fractional population growth model. They employ the Plummer (2012) JAGS (Just Another Gibbs Sampler) software to generate Markov Chain Monte Carlo (MCMC) samples, which for more information on MCMC, see Gilks et al. (1996). While JAGS is effective, it cannot reliably be guaranteed to produce quality samples. This work utilizes a Sampling Importance Resampling approach to obtain the posterior samples giving the user more control over the quality of the sample as well as ensuring the differential equation model is solved correctly. Furthermore, this work is applied to hydrocarbon reservoirs. Other publications, such as Razmina et al. (2014), discuss fractional calculus use in fractured reservoirs.
The time-fractional advection-diffusion equation is given by Malik et al. (2014): where p(x, t) is the pressure distribution in unconventional reservoirs, K = K(p) is the diffusivity (which is related to the rock permeability), and U = U (p, p x ) is a convection velocity; both K and U are highly non-linear. Observed data rarely follows the solution exactly, as realizations are often contaminated by some source of error. The question becomes: where are the sources of error? There are two sources of error, internal error (also known as noise or process error) and external error (also known as measurement or experimental error). Strong and Oakley (2014) state that internal error is minor misspecification of the model across the process space, specifically in the homogeneity of the substrate. With external error, measuring instruments often fail to yield the same measurement twice.
Internal error: Here, internal error means the error in the differential equation model. In this case, the internal error will accumulate over the integral associated with the solution. Hence, may be something like a Brownian motion or Ornstein-Uhlenbeck process.
External error: is the i th observed value of the process p(x, t) at time t and x. In this case, i will follow some appropriate probability distribution. The external error problem is an easy problem in contrast to the internal error problem. For the proof of concept, the model will only focus on external error. Ultimately, both types of error structures in the model would be ideal.

Model
The fractional differential equation of interest is taken from Malik et al. (2014) to model the pressure as a function of time t and location x under exponential uploading, given by p(x, 0) = e −cx , (c > 0). In this case, p(x, t) has a closed form solution under some mild conditions.
The main parameter in this model is α, the fraction of the derivative, and it is bound between 0 and 1.

Statistical Model and Parameter Estimation
A Bayesian approach is used to estimate the parameters in the model which requires that both a likelihood be specified as well as prior distributions on the model parameters: Here, the logNormal likelihood is chosen to ensure that pressure is always a positive value. In this specification, the likelihood has two parameters, α and σ 2 . The prior distributions are specified as α ∼ Beta (α * , β * ) to reflect the prior knowledge that α is bound between 0 and 1. For σ 2 the prior distribution is specified as σ 2 ∼ χ 2 (df ) to reflect the prior knowledge that σ 2 must be a positive value. For more on prior distribution and selection, see Berger (1985).
The posterior distribution π α, σ 2 |x, t, p i (x, t) can be found using Bayes' Theorem: In the case considered here, there is no analytic solution to π α, σ 2 |x, t, p i (x, t) . Thus, a sampling method must be employed to draw samples from the posterior distribution, from which all inferences will be made. There are many choices for the algorithm to sample from the posterior distribution such as Acceptance Sampling, Metropolis-Hastings Sampling, Sampling Importance Resampling, etc, found in Gelman et al. (2013) and Gilks et al. (1996). Due to the low number of model parameters, the Sampling Importance Resampling approach is employed in this work. For generality of notation, let θ = (α, σ 2 ). Algorithm is a distribution similar to the posterior distribution from which it is easy to draw candidate values. 4. Resample n s samples with replacement from θ 1 , θ 2 , ..., θ nc using their corresponding posterior probability weights w * i .

Calculate the posterior probability weights w
5. The set of posterior samples of size n s is obtained by taking n s samples, with replacement, from θ 1 , θ 2 , ..., θ nc using their corresponding posterior probability weights w * i .

Simulated Example
Suppose the system of interest is given by (1.2) where α = 0.82. Further, suppose that data for p(x, t) has been observed, with noise, at all combinations of 31 equally spaced levels of x from 0.01 to 10 and 11 equally spaced times t from 0.5 to 1.5 and the noise is multiplicative following a LogNormal distribution with mean 1 and σ = 0.1. Figure 1 shows the unperturbed data surface on the left and the perturbed data surface on the right. Notice that this set parameter specification produces a quite noisy surface. The prior distributions for α and σ were specified as follows: Using the LogNormal likelihood, the prior above, and Bayes Formula, the posterior distribution is given as: where p i (x, t) is the realized value and µ i (x, t) is the theoretical without noise. For clarity, µ i (x, t) is the solution to the system for x, t for the i th sampling point. The Sampling Importance Resampling algorithm was employed with 10,000 candidate samples with 1,000 posterior samples drawn. The sample generated a posterior sample of 89.8% unique samples indicating a high quality sample from the posterior distribution. Histograms of the posterior distributions of α and σ can be found in Figure 2, which shows the true values α = 0.82 and σ = 0.1 in the middle of the distribution. For reference, the 95% posterior credible intervals were generated by taking the 2.5% and 97.5% quantiles from the marginal posterior distributions and gave: for α, (0.8169, 0.8226), which contains the true value 0.82, and for σ, (0.0907, 0.1050), which also contains the true value of 0.1. This shows that the procedure proposed can be employed to use data to estimate the fraction of the differential equation.
Not only can the method proposed be used to estimate the fraction of the differential equation, it can also be used to quantify the prediction uncertainty associated with the model and parameter estimates. To do this, the posterior predictive distribution can be employed to generate a distribution for a new observation p(x new , t new ) at the value of x new and t new . Recall that the posterior predictive distribution is given by: π(p(x new , t new |p i (x, t), x, t) = π(α, σ 2 |p i (x, t), x, t, α, σ 2 )L(p(x new , t new )|p i (x, t), x, t, α, σ 2 )dαdσ 2 .
(3.2) In the case considered here, the posterior predictive distribution is difficult to visualize in three dimensions. Instead, profile plots of the median surface are created, the surfaces generated by the 2.5% and 97.5% quantiles for given values of t and given values of x along with the data. Figures 3  and 4 give these profile plots for x and t, respectively. Notice that the posterior predictive intervals capture most of the observed data. This gives evidence that the modeling approach is properly quantifying the uncertainties associated with both estimation as well as inherent noise in the data.

Robustness
In order to determine if the approach proposed for estimating α is robust to the value of α in the underlying process, a robustness analysis was conducted for varying values of α and σ. For this study, a new dataset was simulated using each combination of α = 0.1 to 0.9 by increments of 0.1 and σ = 0.01, 0.1 and 0.25. With these simulated datasets the estimation algorithm was used to estimate the 95% credible intervals for each parameter using the 2.5% and 97.5% quantiles from the 1,000 samples from the posterior distribution of α and σ. Table 3 shows the results of this study. Notice that all of the 95% credible intervals contain the correct parameter value, which indicates that the estimation algorithm is robust to the underlying values of α and σ.    Additionally, as this paper is not particularly concerned about the extremes to the values of α, the Beta distribution was used, and to further check robustness, α* and β* were increased each to 5, 10, 20, 50, etc, to make sure the 95% credible interval would still capture both α* and β*. As seen in Table 2 when this test was run, α* and β* were both at 100 before the interval failed to capture the true value, in this case α. To show robustness, both α and β are changed, starting at α = 1 and β = 1, also known as a uniform distribution, and increased at an equal rate until the 95% credible interval no longer captured the parameters of the equation successfully. As is evident in the table above, the properties of the method derived capture the parameters in the case of a uniform distribution and continued to capture the parameters until the beta distribution was at α and β both equal to 100. Even under a very strict beta distribution, the properties of the method capture the parameters.
To further expound upon the robustness of the algorithm, the algorithm used 200 unique data sets to ensure that the algorithm successfully captured both α and β at least 95% of the iterations tested.P where α 0 is an indicator variable, indicating whether or not the α was inside the 95% credible interval, and the total amount of α's in the interval divided by the total number of samples yielded a percentage, indicating coverage probability.

Conclusion
Proof of concept for accurate estimation of the fractional parameter α with varying external error was concluded. This work demonstrates a method for researchers to employ fractional advectiondiffusion equations on real world problems where the fraction can be estimated using observed data. This approach, while computationally intensive, not only can estimate the fraction but can also adequately quantify the uncertainty associated with the parameters and predictions. The method is shown to be robust with respect to the underlying value of the fraction. By testing the robustness of changing the true value of α and σ, the approach created 95% credible intervals capturing the true value of α and σ. Furthermore, by changing the prior distribution to a Uniform distribution or Beta distribution with varying α and σ, the method is robust to capture the true values. By running the 200 MCMC simulations, the 95% coverage probabilities successfully captures both parameters at least 95% of the time. Utilizing the Sample Importance Resampling Regime and then tuning the importance sampler, the control of the quality of the sample ensured the differential equation model was solved correctly.

Future Research
This work has demonstrated that the Bayesian framework will allow for accurate estimation of α under the scenario of external error; a similar study should be performed under internal error. Due to the stochastic nature of this scenario, the techniques for estimation may differ greatly such as using Metropolis-Hasting sampling possibly combined with Slice sampling. This work has been omitted this paper as it is drastically different and the work performed loses focus. The study should be a simulation study and verify that the methods can be combined to produce accurate results. Ultimately, future research should focus on developing a Bayesian estimation approach when both the internal and external error exist in a fractional differential equation system. In addition to error, future research on scenarios with more parameters such as rock porosity, hy-drocarbon density, hydrocarbon viscosity, and rock permeability to better model the transport of unconventional hydrocarbon reservoirs. Lastly, applying varying numerical and hybrid methods to test for parameter redundancy by adding constraints to result in better modeling in the future will impact the effectiveness of models.