# Quantum-Based Analytical Techniques on the Tackling of Well Placement Optimization
## 2 Governing Equations  
An oil reservoir's dynamic behavior can be described by coupled spatiotemporal differential equations. In the case of a two-phase oil reservoir, these are [38]:  
\[\frac{\partial}{\partial t}\Big{[}\varepsilon\frac{S_{f}}{B_{f}}\Big{]}+q_{f} -\
abla[\frac{kr_{f}}{\mu_{f}B_{f}}\mathrm{K}(\
abla P_{f}-\rho_{f}\frac{g}{ g\varepsilon}\
abla Z)]\ =0 \tag{1}\]  
where, \(\mu_{f}\) is the viscosity of phase \(f\) (\(f=0\) for oil and \(f=w\) for water), \(\varepsilon\) is the porosity, \(\rho_{f}\) is the density, \(B_{f}\) is the formation volume factor, \(\mathrm{K}\) is the absolute permeability tensor, \(S_{f}\) is the saturation, \(kr_{f}\) is the relative permeability, \(P_{f}\) is the pressure, and \(q_{f}\) is the flow from (\(+\)ve for out, \(-\)ve for in) the reservoir. In mathematical analysis and modeling, the relative permeability of each phase is generally described using:  
\[kr_{o}=kr_{o}^{0}\frac{S_{o}-S_{or}}{1-S_{ur}-S_{or}}^{a}, \tag{2}\]  
\[kr_{w}=kr_{w}^{0}\frac{S_{w}-S_{ur}}{1-S_{ur}-S_{or}}^{b}, \tag{3}\]  
where \(a\) and \(b\) present the exponents in Corey's correlation, \(S_{ur}\) and \(S_{or}\) are the residual water and oil saturations, respectively, \(kr_{w}^{0}\) and \(kr_{o}^{0}\) are the end-point relative permeabilities for water and oil, respectively. The pressure and saturation of the oil and water phases are interrelated by the equation:  
\[P_{c}=P_{o}-P_{w}=f(S_{o}S_{w}), \tag{4}\]  
\[S_{0}+S_{w}=1; \tag{5}\]  
where \(P_{c}\) is capillary pressure, \(P_{o}\) and \(P_{w}\) are oil and water pressure, and \(S_{0}\) and \(S_{w}\) presents oil and water saturation. Then, the flow rate at the wellbore can be defined using the following well production equation (IPR or Inflow Performance Relation):  
\[q=\Psi(kr/\upmu B(P-BHP). \tag{6}\]  
where \(\Psi\) is the connection transmissibility factor for wells and the Bottom Hole Pressure (BHP) is determined by the Vertical Flow Performance (VFP) curve:  
\[BHP=THP+\rho gL+\Delta P+\Delta p. \tag{7}\]  
Among them, \(\Delta P\) presents the frictional pressure drop through well tubing, \(\Delta p\) is the pressure drop due to the acceleration, \(L\) represents the depth of the well, and \(\rho\) is the density of the well production, and \(THP\) is tubing head pressure. For a given well chain and termination type, the total flow, the water/oil ratio (gas/oil ratio), and the inlet/outlet pressure determine the pressure drop in Equation (7). The prime motivation behind well placement optimization is to make sure that the expenditure remains minimum while maximizing the net present reaches the maximum value. Well placement optimization, in general, can be formulated as:  
\[Max\ R(u^{n}) \tag{8}\]  
\[R(u^{n})=NPV(u^{n}) \tag{9}\]  
Subjected to:  
\[LB\leq u^{n}\leq UBV\ ne\ (0,1,2,3\ldots\ldots N-1), \tag{10}\]  
where \(u^{n}\) represents well coordinates, \(NPV\) presents net present value, \(LB\) and \(UB\) are lower bound and upper bound of the reservoir, respectively. Net present value (NPV) changes randomly with the change of coordinates of the well location. Eclipse simulation was used to calculate the cumulative oil production, cumulative gas production, cumulative water production's value based on the coordinates of the well location. The variables used in Equation (11) are depicted from Reference [1]. Hence, \(NPV\) for a reservoir model can be formulated as:  
\[kr_{o}=kr_{o}^{0}\frac{S_{o}-S_{or}}{1-S_{ur}-S_{or}}^{a}, \tag{2}\]0  
where \(P_{g}\) denotes gas price, \(Q_{w}\) presents cumulative water production, D is the discount rate, \(Q_{g}\) is cumulative gas production, T is the number of years passed since the production has started, CAPEX is the capital expenditure, \(P_{O}\) presents oil price, \(C_{w}\) denotes cost per unit volume of produced water, OPEX is the operational expenditure, and \(Q_{O}\) is cumulative oil production. Equation (1) constitutes an exact conventional as well as shale gas reservoir model, which cannot be solved analytically.