# Analytical Solution for 2D Inter-Well Porous Flow in a Rectangular Reservoir
## 2 Analytical Solution  
The inter-well fluid flow in a horizontal layer of porous media saturated with incompressible fluid is governed by the conservation laws of mass and momentum. The Darcy velocity satisfies the continuity equation  
\[\
abla\cdot\mathbf{u}=\mathbf{0}, \tag{1}\]  
and the [PERSON]'s law [17]  
\[\mathbf{u}=-\frac{k}{\mu}\
abla p, \tag{2}\]  
where \(p\), \(k\), and \(\mu\) are pore pressure, permeability and fluid viscosity, respectively. In a rectangular domain with impermeable boundaries at \(x=\pm a\) and \(y=\pm b\), the normal gradient of pore pressure on the boundaries vanishes following [PERSON]'s law, resulting in the following no-penetration boundary conditions:  
\[u=-\frac{k}{\mu}\frac{\partial p}{\partial x}=0,\text{ at }x=\pm a, \tag{3}\]  
\[v=-\frac{k}{\mu}\frac{\partial p}{\partial y}=0,\text{ at }y=\pm b. \tag{4}\]  
As the injection and production wells have a size much smaller than the inter-well distance, an injection well may be well represented by a point source, while a production well may be represented by a point sink. Therefore, the steady fluxes associated with the wells may be simulated by a number of isolated point sources or sinks with constant volumetric flow rates  
\[Q_{j}=Q(x_{j},y_{j})=\oint\mathbf{u}\cdot d\mathbf{s}=-\frac{k}{\mu}\oint \
abla p\cdot d\mathbf{s},\ j=1,2,\dots,J, \tag{5}\]  
constrained by an overall mass conservation for steady porous flow  
\[\sum_{j=1}^{J}Q_{j}=0. \tag{6}\]  
The integration in Equation (5) is evaluated along a closed path surrounding a well, with \(d\mathbf{s}\) being the arc differential along the integration path. A schematic of the above defined problem is shown in Figure 1a, in terms of an example case with one source and one sink. Defining a scalar potential function \(\varphi\) that relates to Darcy velocity by  
\[\mathbf{u}=\
abla\varphi, \tag{7}\]  
i.e.,  
\[u=\frac{\partial\varphi}{\partial x},\ v=\frac{\partial\varphi}{\partial y}. \tag{8}\]  
Comparing Equations (2) and (7) yields  
\[p=-\frac{\mu}{k}\varphi. \tag{9}\]  
Substituting Equation (8) into Equations (1)-(4) reveals that the potential function satisfies 2D Laplace equation with a homogeneous Neumann boundary condition, i.e.,  
\[\
abla^{2}\varphi=\frac{\partial^{2}\varphi}{\partial x^{2}}+\frac{\partial^{ 2}\varphi}{\partial y^{2}}=0,\ \frac{\partial\varphi}{\partial x}\Big{|}_{x=\pm a}=0,\ \frac{\partial\varphi}{\partial y}\Big{|}_{y=\pm b}=0. \tag{10}\]  
Furthermore, a scalar stream function \(\psi\) can be defined to relate to Darcy velocity by  
\[\mathbf{u}=-\frac{k}{\mu}\
abla p, \tag{2}\]0  
Such defined stream function provides a convenient tool for visualizing the velocity field, since the contours of the stream function form the streamlines. Substituting Equation (11) into Equations (1)-(4) reveals that the stream function satisfies the 2D Laplace equation and takes a uniform value along the boundary, i.e., subject to an assigned uniform Dirichlet boundary condition,  
\[\mathbf{u}=-\frac{k}{\mu}\
abla p, \tag{2}\]1  
As the combination of Equations (8) and (11) forms the Cauchy-Riemann Equations [2], the potential function and the stream function can be defined as the real and imaginary parts of an analytical complex function [2], i.e.,  
\[\mathbf{u}=-\frac{k}{\mu}\
abla p, \tag{2}\]2  
\[\mathbf{u}=-\frac{k}{\mu}\
abla p, \tag{2}\]3 Schematics of defined problem and mirror image distribution. (**a**) The defined problem domain with boundary conditions; (**b**) Mirror image distribution for satisfying the specified boundary conditions. Circles with positive sign represent injection wells (point sources for porous flow), while those with negative sign represent production wells (point sinks for porous flow), with solid circles being corresponding to real source/sink and dotted circles being corresponding to mirror images. Since the complex logarithm function  
\[\mathbf{u}=-\frac{k}{\mu}\
abla p, \tag{2}\]4  
is an analytical function [2], the superposition of multiple complex logarithm functions results in an analytical function.