# Software for Estimation of Stochastic Model Parameters for a Compacting Reservoir
## 2 Compaction and Subsidence Model
### Principles of a Model Based on the Influence Function  
The calculation model presented in the paper is based on the division of a geological structure containing fluid (oil, gas or water) into elementary cuboids, i.e., reservoir elements [13; 14]. This aspect is discussed in more detail in Section 2.2. The suggested solution allows reservoir elements to be used in the form of cuboids with arbitrary shaped bases which increase the computational potential of the method [13]. In models based on the influence function, vertical displacements \(S\) are the result of the compaction of porous reservoir rocks and may be calculated with Equation (1):  
\[S=C_{m}[p_{0}-p(t)]M_{0}\iint\limits_{A}\frac{1}{r^{2}}exp\left(-\pi\frac{R^{ 2}}{r^{2}}\right)dxdy \tag{1}\]where \(\Delta p=p_{0}-p(t)\)--pore pressure decrease, \(M_{0}\)--primary thickness of layer, \(A\)--geometry of reservoir element, \(R^{2}=(x-s)^{2}+(y-t)^{2}\)--distance in the horizontal plane between a reservoir element (x,y) and a calculation point on the surface (s,t) and \(r\)--radius of influence, which takes the form of:  
\[r=\frac{H}{tg\beta}\]  
and \(C_{m}\)--compaction coefficient, defined by the expression:  
\[C_{m}=\frac{1}{dp}\frac{dz}{z} \tag{2}\]  
where \(dp\)--change in pore pressure, \(z\)--initial height of the rock sample, \(dz\)--change in the height of the rock sample.  
The compaction coefficient (2) is defined as a change in the height of a rock sample \(z\) with a corresponding drop in pore pressure \(dp\)[27]. In turn, the impact radius \(r\) in Equation (1) is associated with reservoir depth \(H\) and is directly associated with the mechanical properties of the rocks, which are expressed by parameter \(tg\beta\) (Figure 1) [37]. Both \(tg\beta\) and compaction coefficient \(C_{m}\) make up the set of basic parameters of the theoretical model. Their values should correspond with the local conditions in the rock mass. For this reason, determination of these parameters is a basic requirement for credible modeling of surface deformations.  
Figure 1: The idea of a computational model based on the influence function and graphical interpretation of the \(tg\beta\) parameter. The dark orange arrow visualizations the influence function, which represents the deformation process in rock mass.  
One of the ways of determining parameters (\(C_{m},tg\beta\)) for local conditions is the Gauss-Newton method for nonlinear equation systems. A Taylor series expansion is used to express the original nonlinear equation in linear form, which is the key concept of this technique. An algorithm minimizes the sum of the squares of the residuals between the data and the model. This method has been commonly used to evaluate determined parameters when a sufficient amount of data is available whose values have a relatively low degree of uncertainty [10; 38; 39; 40; 41]. By comparing a single empirical observation with a value determined on the basis of the assumed model, the value of error \(\delta\) for the \(i\)th observation is obtained. The least square method assumes the minimization of the function of error \(E\) for \(n\) observations (3):  
\[E=\sum_{i=1}^{n}\delta_{i}\delta_{i}\to minimum \tag{3}\]  
The Gauss-Newton algorithm for the model for Equation (1) was implemented. Owing to the nonlinear equation of the theoretical function, the system of observation equations needs to be linearized, as shown in the Appendix A. The solution requires the assumption of initial values and approximate parameters (\(C_{m0},tg\beta_{0}\)) for which the increment of (\(\Delta C_{m},\Delta tg\beta\)) is determined. The correct choice of initial parameter values determines the convergence of the solution and the calculation process. The correct application of the least square approach assumes that the testing of outliers in subsidence results has already been performed.