Introduction

The consumption of natural gas has risen so fast (Al-Fattah and Startzman 1999).

However, when oil production has passed its peak, concludes that natural gas sources will be the essential source of energy for supporting world’s power in the next decades. In these conditions, a numerical simulation can be helpful in gas reservoir source estimation. A program is a tool which, when properly applied, can provide an estimation (Staggs and Herbeck 1971; Aziz and Settari 1999). The existence of a specific simulator to apply in the fractured dry gas reservoir can be helpful in properties calculation, resource and history estimation, better recognition of these reservoirs as a major energy source and so on. This simulator is developed in order to the accurate investigation of dry gas reservoir fluid flow with fractures by focusing on dry gas fluids parameters and fractures parameters too. In past years, some works had been carried out on dry gas reservoir modeling and simulation, but no specific simulator had been developed that can be covered all problems of these reservoirs and expressed all parameters of dry gas fluid flow and fractures and led to a high accuracy.

Previous works which had been carried out on fractured gas reservoirs are listed below.

The radius of accumulated condensates region around the well in a gas condensate reservoir as a function of time, gas velocity, rock and fluid properties was determined (Muskat 1949). Flow equations in fracture were developed for the first time (Barrenblatt et al. 1960). Primary theory for single-phase flow in fracture was developed (Warren and Root 1963). Then, these equations for fluid flow numerical simulation by Kazemi et al. were applied. The first model for gas condensate pressure and saturation prediction around production well was developed (Kniazeff and Naville 1965; Eilerts et al. 1965). Gas condensate recovery by computer programming and finite difference method was modeled (Eilerts et al. 1965). Pseudo-pressure for gas phase was developed for the first time to investigate of gas condensate accumulation in steady-state regime (O’Dell and Miller 1967). A simulator for reservoir simulation with compositional method was developed (Roebuck and Henderson 1969). Kazemi considered block matrix as a cylindrical thick layer and fracture as a thin layer between them. Then, by consideration no connection between block matrix and boundary conditions, solved flow equations and determined pressure as a function of time and location (Kazemi 1969). Gas condensate phase behavior on porous media was investigated (Saeidi and Handy 1974). A model was developed which fracture network in Warren–Root model was replaced with a vertical fracture (Cinco-Ley et al. 1985). Triple porosity model with two various porosity block matrix was developed (Abdassah and Ershaghi 1986). An equation for determination fracture network permeability was developed (Jones et al. 1988). Effect of surface tension on gas and condensate relative permeability was investigated (Asar and Handy 1988). A gas condensate reservoir including a mixture of three hydrocarbons with compositional and fully implicit method was modeled (Jones and Raghavan 1988). Gas injection into gas condensate reservoir in 2-D was simulated, and simulation results with finite difference method were compared (Chang et al. 1991). Effect of gas condensate accumulation on production reduction was investigated (Afidick et al. 1994). By gridding around well, a reservoir was simulated (Malachowski et al. 1995). A method for determination of gas relative permeability in oil reservoir with associate gas was developed (Hatzignatiou and Reynolds 1996). A model was developed which block matrix size is not same in it, but in the Warren–Root model is same (Rice 1997). Dual porosity–dual permeability model for single-phase flow was developed (Cather et al. 1998). Phase behavior around well according to non-Darcy flow was modeled (Coats et al. 1998). A method for modeling gas and condensate relative permeability was determined (Fevang and Whitson 1999). Relative permeability in gas condensate reservoir as a function of the capillary number was determined (Henderson et al. 2000). An experimental method was developed which relative permeability around well in steady-state, high-pressure and high-velocity conditions was determined (Mott 2000). Effect of the capillary number and the non-Darcy flow on phase’s relative permeability in gas condensate reservoir were investigated (Penuela et al. 2002). Equations of gas injection into gas condensate reservoir were solved, and MMP was determined (Seto et al. 2003). A method for determining gas condensate ratio was developed (Mott 2003). Miscibility variation in gas injection into gas condensate reservoir with numerical method was investigated (Hoier et al. 2004). Four porosity model including fracture network with three various properties fractures was developed (Dreier et al. 2004). MMP in gas condensate reservoir by injecting NGL and CO2 with the help of Peng–Robinson, Patel–Teja, Patel–Teja–Valderrama and Esmaielzadeh–Roshanfekr EOS was determined (Esmaeilzadeh and Roshanfekr 2006). Simulation of gas condensate well with pseudo-pressure method was developed (Bonyadi 2006). A 2-D and single-phase model of fracture gas reservoir was developed (Shane and Hattingh 2009). Another technique for applying mathematical modeling in petroleum reservoirs is the model based on the adaptive neuro-fuzzy inference system (ANFIS) that was applied to determine the oil-CO2 molecular diffusion coefficient in the secondary and tertiary production mechanisms such as CO2 miscible injection as well as applying the particle swarm optimization algorithm to optimize the ANFIS model parameters, that can be applied in the numerical simulation of petroleum reservoirs (Ejraei Bakyani et al. 2016a). Finally, based on the linear regression technique, several empirical relationships of two-phase (gas–water) relative permeabilities through fracture were obtained for the various conditions both the smooth and the rough parallel fractures during the imbibition and the drainage mechanisms that can be applied in the numerical simulation of two-phase flow through fractured reservoirs (Ejraei Bakyani et al. 2016b). 

In next parts, equations are derived for dual porosity–dual permeability fractured reservoirs with the gas and water two-phase flow and the effect of capillary pressure is considered and the results are discussed.

Numerical simulation

Governing equations

Conservation laws in reservoir simulation consist of mass, energy and momentum conservation. By writing mass balance in each grid block, mass input and output difference, this purpose is achieved. After this discretization starts by applying a finite difference equation for the gas and water flow in the grid system. This finite difference equation shows the mass difference in each grid, so these equations called the mass conservation (Wattenbarger 2002; Putra and Schechter 2003):

$$\dot{m}_{\text{im}} - \dot{m}_{\text{om}} - \dot{m}_{\text{mf}} = \dot{m}_{\text{am}}$$
(1)
$$\dot{m}_{\text{if}} - \dot{m}_{\text{of}} \pm \dot{m}_{\text{s}} + \dot{m}_{\text{mf}} = \dot{m}_{\text{af}}$$
(2)

where im and if are input matrix and fractures mass flow rate, respectively. om and of are output matrix and fractures mass flow rate, respectively. mf, which is the mass flow rate per volume unit of matrix, shows flow transfer between matrix and fracture. s is the production or injection mass flow rate in a fracture.

However, for input, output, and accumulation term and replacing in Eqs. (1) and (2), we have:

$$\left. {\dot{m}_{\text{im}} } \right)x = \left( {\overline{{\rho_{\alpha } }} u_{\alpha } } \right)_{\text{m}}$$
(3)
$$\left. {\dot{m}_{\text{if}} } \right)x = \left( {\overline{{\rho_{\alpha } }} u_{\alpha } } \right)_{\text{f}}$$
(4)
$$\left. {\dot{m}_{\text{om}} } \right)x + \Delta x = \left( {\overline{{\rho_{\alpha } }} u_{\alpha } } \right)_{\text{m}}$$
(5)
$$\left. {\dot{m}_{\text{of}} } \right)x + \Delta x = \left( {\overline{{\rho_{\alpha } }} u_{\alpha } } \right)_{\text{f}}$$
(6)
$${\text{Accume}} = \frac{\partial }{\partial t}\left( {m_{l} } \right)\Delta t$$
(7)
$$\dot{m}_{\alpha } = \overline{{\rho_{\alpha } }} u_{\alpha }$$
(8)
$$m_{\alpha } = \overline{{\rho_{\alpha } }} \emptyset s_{\alpha }$$
(9)
$$\overline{{\rho_{\alpha } }} = \frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}$$
(10)
$$q_{\alpha } = \frac{{\overline{{q_{\alpha } }} }}{{B_{\alpha } }}$$
(11)
$$- \nabla m_{{\alpha {\text{f}}}} + \dot{m}_{\text{mf}} = \frac{\partial }{\partial t}m_{{\alpha {\text{f}}}} + \overline{{q_{\alpha } }}$$
(12)
$$- \nabla m_{{\alpha {\text{m}}}} - \dot{m}_{\text{mf}} = \frac{\partial }{\partial t}m_{{\alpha {\text{m}}}}$$
(13)
$$- \nabla \left( {\overline{{\rho_{\alpha } }} u_{\alpha } } \right)_{\text{f}} + \overline{{\rho_{\alpha } }} u_{\text{mf}} = \frac{\partial }{\partial t}\left( {\overline{{\rho_{\alpha } }} \emptyset s_{\alpha } } \right)_{\text{f}} + \overline{{q_{\alpha } }}$$
(14)
$$- \nabla \left( {\overline{{\rho_{\alpha } }} u_{\alpha } } \right)_{\text{m}} - \overline{{\rho_{\alpha } }} u_{\text{mf}} = \frac{\partial }{\partial t}\left( {\overline{{\rho_{\alpha } }} \emptyset s_{\alpha } } \right)_{\text{m}}$$
(15)
$$- \nabla \left( {\frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}u_{\alpha } } \right)_{\text{f}} + \frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}u_{\text{mf}} = \frac{\partial }{\partial t}\left( {\frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}\emptyset s_{\alpha } } \right)_{\text{f}} + \rho_{\text{STC}} q_{\alpha }$$
(16)
$$- \nabla \left( {\frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}u_{\alpha } } \right)_{\text{m}} - \frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}u_{\text{mf}} = \frac{\partial }{\partial t}\left( {\frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}\emptyset s_{\alpha } } \right)_{\text{m}}$$
(17)

Pore volume of each grid is:

$$V_{\text{p}} = \Delta x\Delta y\Delta z\emptyset$$
(18)

Gas accumulation rate in fracture and matrix grid or RHS of continuity equation is:

$$= \frac{{\rho_{{g{\text{STC}}}} }}{\Delta t}\left[ {\left( {\frac{{V_{\text{p}} S_{\text{g}} }}{{B_{\text{g}} }}} \right)_{\text{f}}^{n + 1} - \left( {\frac{{V_{\text{p}} S_{\text{g}} }}{{B_{\text{g}} }}} \right)_{\text{f}}^{n} } \right]$$
(19)
$$= \frac{{\rho_{\text{gSTC}} }}{\Delta t}\left[ {\left( {\frac{{V_{\text{p}} S_{\text{g}} }}{{B_{\text{g}} }}} \right)_{\text{m}}^{n + 1} - \left( {\frac{{V_{\text{p}} S_{\text{g}} }}{{B_{\text{g}} }}} \right)_{\text{m}}^{n} } \right]$$
(20)

where qα, uα, ρα, Sα, Bα, Δx, Δy, Δz, Δt, n, and n + 1 are rate, velocity, density, saturation, formation volume factor of phase α, grid dimensions, time step, nth time step, and n + 1th time step, respectively.

LHS of continuity equation is:

$$\begin{aligned} {\text{Netmassin}} & = \rho_{{\alpha {\text{STC}}}} q_{{\left( {i - 1} \right)f \to i}} + \rho_{{\alpha {\text{STC}}}} q_{{\left( {i + 1} \right)f \to i}} + \rho_{{\alpha {\text{STC}}}} q_{\text{well}} + \rho_{{\alpha {\text{STC}}}} q_{\text{mf}} \\ & = \rho_{{\alpha {\text{STC}}}} q_{{\left( {i - 1} \right)m \to i}} + \rho_{{\alpha {\text{STC}}}} q_{{\left( {i + 1} \right)m \to i}} - \rho_{{\alpha {\text{STC}}}} q_{\text{mf}} \\ \end{aligned}$$
(21)

When we have flowing into grid qwell is positive and flowing out of grid qwell is negative.

Finally with mass balance on fracture and matrix, we have:

$$\frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}q_{{\left( {i - 1} \right)f \to i}} + \frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}q_{{\left( {i + 1} \right)f \to i}} + \frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}q_{\text{mf}} = \rho_{\text{STC}} q_{\alpha } + \frac{{\frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}}}{\Delta t}\left[ {\left( {V_{\text{p}} S_{\alpha } } \right)_{\text{f}}^{n + 1} - \left( {V_{\text{p}} S_{\alpha } } \right)_{\text{f}}^{n} } \right]$$
(22)
$$\frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}q_{{\left( {i - 1} \right)m \to i}} + \frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}q_{{\left( {i + 1} \right)m \to i}} - \frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}q_{\text{mf}} = \frac{{\frac{{\rho_{\text{STC}} }}{{B_{\alpha } }}}}{\Delta t}\left[ {\left( {V_{\text{p}} S_{\alpha } } \right)_{\text{m}}^{n + 1} - \left( {V_{\text{p}} S_{\alpha } } \right)_{\text{m}}^{n} } \right]$$
(23)

By simplification of the above equations, we have:

For fractures:

$$\frac{1}{{B_{\alpha } }}q_{{\left( {i - 1} \right)f \to i}} + \frac{1}{{B_{\alpha } }}q_{{\left( {i + 1} \right)f \to i}} + \frac{1}{{B_{\alpha } }}q_{\text{mf}} = q_{\alpha } + \frac{1}{\Delta t}\left[ {\left( {\frac{{V_{\text{p}} S_{\alpha } }}{{B_{\alpha } }}} \right)_{\text{f}}^{n + 1} - \left( {\frac{{V_{\text{p}} S_{\alpha } }}{{B_{\alpha } }}} \right)_{\text{f}}^{n} } \right]$$
(24)

For matrix:

$$\frac{1}{{B_{\alpha } }}q_{{\left( {i - 1} \right)m \to i}} + \frac{1}{{B_{\alpha } }}q_{{\left( {i + 1} \right)m \to i}} - \frac{1}{{B_{\alpha } }}q_{\text{mf}} = q_{\alpha } + \frac{1}{\Delta t}\left[ {\left( {\frac{{V_{\text{p}} S_{\alpha } }}{{B_{\alpha } }}} \right)_{\text{m}}^{n + 1} - \left( {\frac{{V_{\text{p}} S_{\alpha } }}{{B_{\alpha } }}} \right)_{\text{m}}^{n} } \right]$$
(25)

where the flow into the grid block is called the positive flow, the flow out of the grid block is called the negative flow. For flow rate, we need Darcy’s law for flow between the centers of the grid blocks. The flow distance, Δx, is the distance between the centers of the grid blocks. The grid block pressures are considered the center of the grid blocks pressures.

Flow from the right of grid block i + 1 to grid block i is

Darcy’s law for fractured:

$$\begin{aligned} \frac{1}{{B_{\alpha } }}q_{{\alpha \left( {i - 1} \right)f \to i}} \left( {\frac{{{\text{SCF}}\left( {{\text{Standard}}\,{\text{Cubic}}\,{\text{Feet}}} \right)}}{{D\left( {\text{Day}} \right)}}} \right) & = \frac{{0.00633k_{\text{f}} k_{{{\text{r}}\alpha {\text{f}}}} }}{{\mu_{\alpha } B_{\alpha } }}\left( {\frac{{P_{i + 1} - P_{i} }}{\Delta x}} \right)\Delta y\Delta z \\ & = \frac{{0.00633k_{\text{f}} \Delta y\Delta z}}{\Delta x}\left( {\frac{{k_{\text{r}} }}{B\mu }} \right)_{{\alpha {\text{f}}}} \left( {P_{i + 1} - P_{i} } \right) \\ \end{aligned}$$
(26)

The subscript α represents water or gas phase.

Darcy’s law for the matrix:

$$\frac{1}{{B_{\alpha } }}q_{{\alpha \left( {i + 1} \right)m \to i}} \left( {\frac{\text{SCF}}{D}} \right) = \frac{{0.00633k_{\text{m}} k_{{{\text{r}}\alpha {\text{m}}}} }}{{\mu_{\alpha } B_{\alpha } }}\left( {\frac{{P_{i + 1} - P_{i} }}{\Delta x}} \right)\Delta y\Delta z = \frac{{0.00633k_{\text{m}} \Delta y\Delta z}}{\Delta x}\left( {\frac{{k_{\text{r}} }}{B\mu }} \right)_{{\alpha {\text{m}}}} \left( {P_{i + 1} - P_{i} } \right)$$
(27)

where qmf is the rate of fluid transfer between matrix and fracture in a grid block and is given by

$$q_{\text{mf}} = \frac{{0.00633k_{\text{m}} k_{{r\alpha {\text{m}}}} }}{{\mu_{\alpha } }}\sigma \Delta x\Delta y\Delta z\left( {P_{{\alpha {\text{m}}}} - P_{{\alpha {\text{f}}}} } \right)$$
(28)

In above equation, σ is the shape factor and define as below:

$$\sigma = \frac{C}{{L^{2} }}$$
(29)

Warren and Root define the shape factor as below:

$$\sigma = \frac{60}{{L_{x}^{2} + L_{y}^{2} + L_{z}^{2} }}$$
(30)

The first term is called “transmissibility,” now it is defined:

$$\left( {T_{{i + \frac{1}{2}}} } \right)_{\text{f}} = 0.00633\frac{{k_{\text{f}} \Delta y\Delta z}}{\Delta x}$$
(31)
$$\left( {T_{{i + \frac{1}{2}}} } \right)_{\text{m}} = 0.00633\frac{{k_{\text{m}} \Delta y\Delta z}}{\Delta x}$$
(32)

The subscript i + 1/2 indicates that the coefficient is applied between grid blocks i and i + 1, i + 1/2. The next term in Eqs. (31) and (32) is called mobility “λ.” Its value changes with time and is defined as:

$$\lambda_{{gfi + \frac{1}{2} = \left( {\frac{{k_{\text{r}} }}{\mu B}} \right)_{{\alpha {\text{f}}i + 1/2}} }}$$
(33)
$$\lambda_{{gmi + \frac{1}{2} = \left( {\frac{{k_{\text{r}} }}{\mu B}} \right)_{{\alpha {\text{m}}i + 1/2}} }}$$
(34)

Absolute permeability, relative permeability and viscosity of both phases, and porosity in the represented equation need to be averaged according to Table 1 (Aziz and Settari 1999):

Table 1 Method of averaging

The general material balance equation for two-phases in 3-D are as follow:

For fractures:

$$\begin{aligned} & \left( {\frac{{k_{\text{r}} }}{\mu B}} \right)_{{\alpha {\text{f}}i - \frac{1}{2}}} T_{{{\text{f}}i - \frac{1}{2}}} \left( {P_{{\alpha {\text{f}}i - 1,j,k}} - P_{{\alpha {\text{f}}i,j,k}} } \right) + \left( {\frac{{k_{\text{r}} }}{\mu B}} \right)_{{\alpha {\text{f}}i + \frac{1}{2}}} T_{{{\text{f}}i + \frac{1}{2}}} \left( {P_{{\alpha {\text{f}}i + 1,j,k}} - P_{{\alpha {\text{f}}i,j,k}} } \right) \\ & \quad \quad + \left( {\frac{{k_{\text{r}} }}{\mu B}} \right)_{{\alpha {\text{f}}j - \frac{1}{2}}} T_{{{\text{f}}j - \frac{1}{2}}} \left( {P_{{\alpha {\text{f}}i,j - 1,k}} - P_{{\alpha {\text{f}}i,j,k}} } \right) \\ & \quad \quad + \left( {\frac{{k_{\text{r}} }}{\mu B}} \right)_{{\alpha {\text{f}}j + \frac{1}{2}}} T_{{{\text{f}}j + \frac{1}{2}}} \left( {P_{{\alpha {\text{f}}i,j + 1,k}} - P_{{\alpha {\text{f}}i,j,k}} } \right) \\ & \quad \quad + \left( {\frac{{k_{\text{r}} }}{\mu B}} \right)_{{\alpha {\text{f}}k - \frac{1}{2}}} T_{{{\text{f}}k - \frac{1}{2}}} \left( {P_{{\alpha {\text{f}}i,j,k - 1}} - P_{{\alpha {\text{f}}i,j,k}} } \right) \\ & \quad \quad + \left( {\frac{{k_{\text{r}} }}{\mu B}} \right)_{{\alpha fk + \frac{1}{2}}} T_{{fk + \frac{1}{2}}} \left( {P_{\alpha fi,j,k + 1} - P_{\alpha fi,j,k} } \right) + \lambda_{{\alpha {\text{mf}}}} \left( {P_{{\alpha {\text{m}}i,j,k}} - P_{{\alpha {\text{f}}i,j,k}} } \right) \\ & \quad = q_{\alpha } + \frac{1}{\Delta t}\left[ {\left( {\frac{{V_{\text{p}} S_{\alpha } }}{{B_{\alpha } }}} \right)_{\text{f}}^{n + 1} - \left( {\frac{{V_{\text{p}} S_{\alpha } }}{{B_{\alpha } }}} \right)_{\text{f}}^{n} } \right] \\ \end{aligned}$$
(35)

For matrix:

$$\begin{aligned} & \left( {\frac{{k_{\text{r}} }}{\mu B}} \right)_{{\alpha {\text{m}}i - \frac{1}{2}}} T_{{{\text{m}}i - \frac{1}{2}}} \left( {P_{{\alpha {\text{m}}i - 1,j,k}} - P_{{\alpha {\text{m}}i,j,k}} } \right) + \left( {\frac{{k_{r} }}{\mu B}} \right)_{{\alpha {\text{m}}i + \frac{1}{2}}} T_{{{\text{m}}i + \frac{1}{2}}} \left( {P_{{\alpha {\text{m}}i + 1,j,k}} - P_{{\alpha {\text{m}}i,j,k}} } \right) \\ & \quad \quad + \left( {\frac{{k_{\text{r}} }}{\mu B}} \right)_{{\alpha {\text{m}}j - \frac{1}{2}}} T_{{mj - \frac{1}{2}}} \left( {P_{\alpha mi,j - 1,k} - P_{\alpha mi,j,k} } \right) \\ & \quad \quad + \left( {\frac{{k_{\text{r}} }}{\mu B}} \right)_{{\alpha {\text{m}}j + \frac{1}{2}}} T_{{mj + \frac{1}{2}}} \left( {P_{\alpha mi,j + 1,k} - P_{{\alpha {\text{m}}i,j,k}} } \right) + \left( {\frac{{k_{r} }}{\mu B}} \right)_{{\alpha {\text{m}}k - \frac{1}{2}}} T_{{{\text{m}}k - \frac{1}{2}}} \left( {P_{{\alpha {\text{m}}i,j,k - 1}} - P_{{\alpha {\text{m}}i,j,k}} } \right) \\ & \quad \quad + \left( {\frac{{k_{\text{r}} }}{\mu B}} \right)_{{\alpha {\text{m}}k + \frac{1}{2}}} T_{{mk + \frac{1}{2}}} \left( {P_{\alpha mi,j,k + 1} - P_{{\alpha {\text{m}}i,j,k}} } \right) - \lambda_{{\alpha {\text{m}}f}} \left( {P_{{\alpha {\text{m}}i,j,k}} - P_{{\alpha {\text{f}}i,j,k}} } \right) \\ & \quad = \frac{1}{\Delta t}\left[ {\left( {\frac{{V_{\text{p}} S_{\alpha } }}{{B_{\alpha } }}} \right)_{m}^{n + 1} - \left( {\frac{{V_{\text{p}} S_{\alpha } }}{{B_{\alpha } }}} \right)_{m}^{n} } \right] \\ \end{aligned}$$
(36)

For water phase, the same equations can be written.

IMPES method

IMPES refers to “Implicit Pressure Explicit Saturation.” But the fully implicit method calculates the main variables at the same time (all primary variables at the new time level are determined simultaneously), the IMPES method solves pressure equations at the new time level by using saturation equations at the old time level, then the pressure equations at the new time level are solved to calculate the saturations at the new time level explicitly. The type of method that equations are solved effects on the level of ease, accuracy, and cost of the simulation.

Different studies have been applied on implicit pressure, explicit saturation “the IMPES” method (Calvin and Dalton 1990; Hallam and Kin 2003; Ansah 1996).

The gas symmetrical flow coefficients are defined as follow: (for the east direction for instance):

$$a_{{\alpha {\text{f}}i + \frac{1}{2}}} = \left( {\frac{{k_{\text{r}} }}{\mu B}} \right)_{{\alpha {\text{f}}i + \frac{1}{2}}} T_{{{\text{f}}i + \frac{1}{2}}}$$
(37)
$$a_{{\alpha {\text{m}}i + \frac{1}{2}}} = \left( {\frac{{k_{\text{r}} }}{\mu B}} \right)_{{\alpha {\text{m}}i + \frac{1}{2}}} T_{{{\text{m}}i + \frac{1}{2}}}$$
(38)

The 3-D finite difference equation of gas material balance equation is:

For fractures:

$$\begin{aligned} \Delta a_{{\alpha {\text{f}}}} \Delta P_{{\alpha {\text{f}}}} & = a_{{\alpha {\text{f}}i - \frac{1}{2}}} \left( {P_{{\alpha {\text{f}}i - 1,j,k}} - P_{{\alpha {\text{f}}i,j,k}} } \right) + a_{{\alpha {\text{f}}i + \frac{1}{2}}} \left( {P_{{\alpha {\text{f}}i + 1,j,k}} - P_{{\alpha {\text{f}}i,j,k}} } \right) \\ & \quad + a_{{\alpha {\text{f}}j - \frac{1}{2}}} \left( {P_{{\alpha {\text{f}}i,j - 1,k}} - P_{{\alpha {\text{f}}i,j,k}} } \right) + a_{{\alpha {\text{f}}j + \frac{1}{2}}} \left( {P_{{\alpha {\text{f}}i,j + 1,k}} - P_{{\alpha {\text{f}}i,j,k}} } \right) \\ & \quad + a_{{\alpha {\text{f}}k - \frac{1}{2}}} \left( {P_{{\alpha {\text{f}}i,j,k - 1}} - P_{{\alpha {\text{f}}i,j,k}} } \right) + a_{{\alpha {\text{f}}k + \frac{1}{2}}} \left( {P_{{\alpha {\text{f}}i,j,k + 1}} - P_{{\alpha {\text{f}}i,j,k}} } \right) \\ \end{aligned}$$
(39)

For matrix:

$$\begin{aligned} & \Delta a_{{\alpha {\text{m}}}} \Delta P_{{\alpha {\text{m}}}} = a_{{\alpha {\text{m}}i - \frac{1}{2}}} \left( {P_{{\alpha {\text{m}}i - 1,j,k}} - P_{{\alpha {\text{m}}i,j,k}} } \right) + a_{{\alpha {\text{m}}i + \frac{1}{2}}} \left( {P_{{\alpha {\text{m}}i + 1,j,k}} - P_{{\alpha {\text{m}}i,j,k}} } \right) \\ & \quad + \,a_{{\alpha {\text{m}}j - \frac{1}{2}}} \left( {P_{{\alpha {\text{m}}i,j - 1,k}} - P_{{\alpha {\text{m}}i,j,k}} } \right) + a_{{\alpha {\text{m}}j + \frac{1}{2}}} \left( {P_{{\alpha {\text{m}}i,j + 1,k}} - P_{{\alpha {\text{m}}i,j,k}} } \right) \\ & \quad +\, a_{{\alpha {\text{m}}k - \frac{1}{2}}} \left( {P_{{\alpha {\text{m}}i,j,k - 1}} - P_{{\alpha {\text{m}}i,j,k}} } \right) +\, a_{{\alpha {\text{m}}k + \frac{1}{2}}} \left( {P_{{\alpha {\text{m}}i,j,k + 1}} - P_{{\alpha {\text{m}}i,j,k}} } \right) \\ \end{aligned}$$
(40)

The general material balance equation can be derived as:

For fractures:

$$\Delta a_{{\alpha {\text{f}}}} \Delta P_{{\alpha {\text{f}}}} + \lambda_{{\alpha {\text{mf}}}} \left( {P_{{\alpha {\text{m}}}} - P_{{\alpha {\text{f}}}} } \right) = q_{\alpha } + \frac{1}{\Delta t}\left[ {\left( {\frac{{V_{\text{p}} S_{\alpha } }}{{B_{\alpha } }}} \right)_{\text{f}}^{n + 1} - \left( {\frac{{V_{\text{p}} S_{\alpha } }}{{B_{\alpha } }}} \right)_{\text{f}}^{n} } \right]$$
(41)

For matrix:

$$\Delta a_{{\alpha {\text{m}}}} \Delta P_{{\alpha {\text{m}}}} - \lambda_{{\alpha {\text{mf}}}} \left( {P_{{\alpha {\text{m}}}} - P_{{\alpha {\text{f}}}} } \right) = \frac{1}{\Delta t}\left[ {\left( {\frac{{V_{\text{p}} S_{\alpha } }}{{B_{\alpha } }}} \right)_{\text{m}}^{n + 1} - \left( {\frac{{V_{\text{p}} S_{\alpha } }}{{B_{\alpha } }}} \right)_{\text{m}}^{n} } \right]$$
(42)

For the 3-D system, rearranging the (41) and (42) equations will give the following saturation equations:

$$S_{{\alpha {\text{f}}}}^{n + 1} = \frac{{B_{{a{\text{f}}}}^{n + 1} }}{{V_{\text{pf}}^{n + 1} }}\left[ {\left( {\frac{{V_{\text{p}} S_{\alpha } }}{{B_{\alpha } }}} \right)_{\text{f}}^{n} + \Delta t\left( {\Delta a_{{\alpha {\text{f}}}} \Delta P_{{\alpha {\text{f}}}}^{n + 1} + \lambda_{{\alpha {\text{mf}}}} \left( {P_{{\alpha {\text{m}}}} - P_{{\alpha {\text{f}}}} } \right) - q_{\alpha } } \right)} \right]$$
(43)
$$S_{{\alpha {\text{m}}}}^{n + 1} = \frac{{B_{{a{\text{m}}}}^{n + 1} }}{{V_{\text{pm}}^{n + 1} }}\left[ {\left( {\frac{{V_{\text{p}} S_{\alpha } }}{{B_{\alpha } }}} \right)_{\text{m}}^{n} + \Delta t\left( {\Delta a_{{\alpha {\text{m}}}} \Delta P_{{\alpha {\text{m}}}}^{n + 1} - \lambda_{{\alpha {\text{mf}}}} \left( {P_{{\alpha {\text{m}}}} - P_{{\alpha {\text{f}}}} } \right)} \right)} \right]$$
(44)

Also, we need to auxiliary equations to solve the system of equations as follows:

$$S_{\text{gf}} + S_{\text{wf}} = 1$$
(45)
$$S_{\text{gm}} + S_{\text{wm}} = 1$$
(46)

All equations are defined for gas pressure. So, by applying capillary pressure “difference of gas and water pressure” at any matrix grid block, we can substitute Eq. (47) instead of water pressure in above equations.

$$P_{\text{wm}} = P_{\text{gm}} - P_{\text{cgwm}}$$
(47)

Capillary pressure in fracture is neglected, so we have:

$$P_{\text{cgwf}} = 0$$
(48)
$$P_{\text{wf}} = P_{\text{gf}}$$
(49)

Now, we have equations with an unknown pressure “pn+1,” as pore volume equations.

By substituting the compressibility equations such as gas and water compressibility and formation compressibility into the pore volume equation and simplifying right side of this equation and substituting total compressibility, total rate is defined as:

$$q_{\text{t}} = B_{\text{w}}^{n + 1} q_{\text{w}} + B_{\text{g}}^{n + 1} q_{\text{g}}$$
(50)
$$C_{\text{t}} = C_{\text{f}} + C_{\text{w}} S_{\text{w}}^{n + 1} + C_{\text{g}} S_{\text{g}}^{n + 1}$$
(51)

For fractures:

$$\begin{aligned} & B_{\text{wf}}^{n + 1} \left[ {\Delta a_{\text{wf}} \Delta P_{\text{gf}}^{n + 1} + \lambda_{\text{wmf}} \left( {P_{\text{gm}}^{n} - P_{\text{cwgm}}^{n} - P_{\text{gf}}^{n} } \right)} \right] + B_{\text{gf}}^{n + 1} \left[ {\Delta a_{\text{gf}} \Delta P_{\text{gf}}^{n + 1} + \lambda_{\text{gmf}} \left( {P_{\text{gm}}^{n} - P_{\text{gf}}^{n} } \right)} \right] \\ & \quad = \frac{{V_{\text{pf}}^{n} C_{\text{t}} }}{\Delta t}\left( {P_{\text{gf}}^{n + 1} - P_{\text{gf}}^{n} } \right) \pm B_{\text{wf}}^{n + 1} q_{\text{w}} \pm B_{\text{gf}}^{n + 1} q_{\text{g}} \\ \end{aligned}$$
(52)

To simplify, Eq. (52) is separated:

$$T_{1} = B_{\text{wf}}^{n + 1} \lambda_{\text{wmf}} + B_{\text{gf}}^{n + 1} \lambda_{\text{gmf}}$$
(53)
$$T_{2} = B_{\text{wf}}^{n + 1} \lambda_{\text{wmf}}$$
(54)

The pore volume equation can be rearranged to reach the final form which is as follow:

$$B_{\text{wf}}^{n + 1} \Delta a_{\text{wf}} \Delta P_{\text{gf}}^{n + 1} + B_{\text{gf}}^{n + 1} \Delta a_{\text{gf}} \Delta P_{\text{gf}}^{n + 1} + T_{1} P_{\text{gm}}^{n} - T_{2} P_{\text{cgwm}}^{n} - T_{1} P_{\text{gf}}^{n} = \frac{{V_{\text{pf}}^{n} C_{\text{t}} }}{\Delta t}\left( {P_{\text{gf}}^{n + 1} - P_{\text{gf}}^{n} } \right) + q_{\text{t}}$$
(55)

For matrix:

$$\begin{aligned} & B_{\text{wm}}^{n + 1} \left[ {\Delta a_{\text{wm}} \Delta P_{\text{gm}}^{n + 1} - \lambda_{\text{wmf}} \left( {P_{\text{gm}}^{n} - P_{\text{cwgm}}^{n} - P_{\text{gf}}^{n} } \right)} \right] \\ & \quad + B_{\text{gm}}^{n + 1} \left[ {\Delta a_{\text{gm}} \Delta P_{\text{gm}}^{n + 1} - \lambda_{\text{gmf}} \left( {P_{\text{gm}}^{n} - P_{\text{gf}}^{n} } \right)} \right] = \frac{{V_{\text{pf}}^{n} C_{\text{t}} }}{\Delta t}\left( {P_{\text{gm}}^{n + 1} - P_{\text{gm}}^{n} } \right) \\ \end{aligned}$$
(56)

To simplify, Eq. (56) is separated:

$$T_{3} = B_{\text{wm}}^{n + 1} \lambda_{\text{wmf}} + B_{\text{gm}}^{n + 1} \lambda_{\text{wmf}}$$
(57)
$$T_{4} = B_{\text{wm}}^{n + 1} \lambda_{\text{wmf}}$$
(58)
$$T_{5} = B_{\text{wm}}^{n + 1} \Delta a_{\text{wm}}$$
(59)

The pore volume equation can be rearranged to reach the final form which is as follow:

$$(B_{\text{wm}}^{n + 1} \Delta a_{\text{wm}} + B_{\text{gm}}^{n + 1} \Delta a_{\text{gm}} )\Delta P_{\text{gm}}^{n + 1} - T_{5} \Delta P_{\text{cgwm}}^{n} - T_{3} P_{\text{gm}}^{n} + \,T_{4} P_{\text{cgwm}}^{n} + T_{3} P_{\text{gf}}^{n} = \frac{{V_{\text{pm}}^{n} C_{\text{t}} }}{\Delta t}\left( {P_{\text{gm}}^{n + 1} - P_{\text{gm}}^{n} } \right)$$
(60)

The last equation makes up a system of simultaneous linear equations with respect to the unknown pressures. The number of unknowns and equations defined by the user is the number of grid blocks in a given model.

The first and last equations in this set are the governing equations for boundary conditions.

This set of equations can be represented by a matrix equation.

$$A\vec{P} = \vec{B}$$
(61)

where A is the coefficient matrix and P and B are column vectors.

The structure of the coefficient matrix depends on the dimensions of the problem and the ordering of grid blocks. The purpose of applying different grid block-ordering schemes is to reduce the computational work involved in solving a system of finite difference equations.

Modeling of production and/or injection well

By these modeling, we able to calculate rates of liquid and gas phases and utilize in the previous parts.

The flow that injected into or produced from a well within a grid block is simulated using an analytical equation. However, the grid block pressure and the flowing well pressure is different because of difference in grid block dimension and well radius.

By assuming that fluid production from or injection into well is same as fluid flow between two grid blocks and by applying the Darcy’s law in radial coordinate with the help of the Peaceman’s model (Peaceman 1982) we can model the production or injection well. Also, the flow rate terms in the previous parts can be replaced with two constraints, constant flow rate of each phase or constant bottomhole pressure.

PVT calculation

In this study, the black oil simulation has been developed and calculations of fluid properties are given in the PVT tables as inputs to the simulator.

Also, a PVT box has been added to the simulator as an additional option in the second phase of simulator development that calculates the fluid properties with the help of EOSs and various correlations and given as input to the simulator. It is worth noting that, the PVT box is also capable of flash calculations in compositional simulation and fluid properties calculations in both compositional and black oil simulations.

Flash calculation

Phase equilibria calculations are taken place in this part for the simulation of the fractured dry gas reservoir with the help of listed equation of states:

  • Peng–Robinson EOS (PR)

  • Soave–Redlich–Kwong EOS (SRK)

  • Esmaeilzadeh–Roshanfekr EOS (ER)

Note that, ER EOS gives very accurate results for gas reservoir simulation that does not exist in the available simulators such as Eclipse and CMG (Esmaeilzadeh and Roshanfekr 2006).

However, for the flash calculation of two-phase flow through the dry gas reservoir, we apply an algorithm as Fig. 1:

Fig. 1
figure 1

Iteration method of flash calculation of two-phase flow in equilibrium

Viscosity calculation

Viscosity calculation is taken place in this part for the simulation of the fractured dry gas reservoir with the help of listed methods:

  • Dean–Stiel (1965) for gas viscosity calculation

  • Lohrenz–Bray–Clark (1964) for liquid viscosity calculation

Gridding

In this simulator, gridding is taken place in a separated box as a gridding simulator and its output results feed to the main simulator as input. This box is able to gridding in a different way as below:

  • Cartesian

  • Cylindrical

  • Cylindrical–Cartesian

Note that, in this simulator, we can apply cylindrical gridding around the well and Cartesian gridding in other regions as Fig. 2 to achieve accurate results in comparison with whole Cartesian gridding. This is useful to the simulation of hydraulically fractured well reservoirs; in this way that it applies cylindrical gridding to a radius equal to fracture’s length and Cartesian gridding out of this radius to achieve the best results in simulation of hydraulically fractured well reservoirs.

Fig. 2
figure 2

Cylindrical gridding around the well

Hydraulic fractured well simulation

Hydraulically created fractures gather fluids from reservoir matrix and provide channels for the fluid to flow into wellbores. Apparently, the productivity of fractured wells depends on two steps: (1) receiving fluids from the formation and (2) transporting the received fluid to the wellbore.

Usually, one of the steps is a limiting step that controls the well-production rate. The efficiency of the first step depends on fracture dimension length “xf” and height “hf,” and the efficiency of the second step depends on fracture permeability “kf.” The importance of each of the steps can be analyzed using the concept of parameter fracture conductivity “FCD” defined as (Agarwal et al. 1979; Cinco-Ley 1981): (wf is fracture width)

$$F_{CD} = \frac{{k_{f} w_{f} }}{{kx_{f} }}$$
(62)

In the situations in which the fracture dimension is much less than the drainage area of the well, the long-term productivity of the fractured well can be estimated assuming pseudo-radial flow in the reservoir. Then, the inflow equation can be written as:

$$q = \frac{{kh\left( {\bar{P} - P_{\text{wf}} } \right)}}{{141.2\mu B\left( {{ \ln }\left( {\frac{{r_{\text{e}} }}{{r_{\text{w}} }} + S_{\text{f}} } \right)} \right)}}$$
(63)

where Sf is the equivalent skin factor related to the hydraulically fractured well model.

Cinco-Ley et al. (1985) reported a data relationship between fracture conductivity and equivalent skin factor “Sf.” Valko et al. (1997) converted their data into the following correlation:

$$S_{\text{f}} = \frac{{1.65 - 0.328\ln \left( {F_{\text{CD}} } \right) + 0.116\left( {\ln \left( {F_{\text{CD}} } \right)} \right)^{2} }}{{1 + 0.180\ln \left( {F_{\text{CD}} } \right) + 0.064\left( {\ln \left( {F_{\text{CD}} } \right)} \right)^{2} + 0.05\left( {\ln \left( {F_{\text{CD}} } \right)} \right)^{3} }} - \ln \left( {\frac{{x_{\text{f}} }}{{r_{\text{w}} }}} \right)$$
(64)

The shape of the fracture varies as predicted by different fracture geometry models:

  1. a.

    Radial Fracture Model: horizontal fracture, Geertsma and De Klerk (1969).

    $$\bar{w} = 0.85\left[ {\frac{{\mu q_{i} \left( {1 - \upsilon } \right)R)}}{E}} \right]^{{\frac{1}{4}}}$$
    (65)
  2. b.

    The KGD Model: vertical fracture, fracture width varies horizontally and remains constant vertically along the pay zone, Khristianovich and Zheltov (1955); Geertsma and De Klerk (1969).

    $$\bar{w} = 0.34\left[ {\frac{{\mu q_{i} \left( {1 - \upsilon^{2} } \right)x_{\text{f}}^{2} )}}{{Eh_{\text{f}} }}} \right]^{{\frac{1}{4}}} \left( {\frac{\pi }{4}} \right)$$
    (66)
  3. c.

    The PKN model: vertical fracture, vertical fracture, fracture width varies horizontally and vertically (Perkins and Kern 1961; Nordgren 1972).

    $$\bar{w} = 0.40\left[ {\frac{{\mu q_{i} \left( {1 - \upsilon^{2} } \right)x_{\text{f}} )}}{E}} \right]^{{\frac{1}{4}}} \left( {\frac{\pi }{4} \times 0.75} \right)$$
    (67)

Non-Darcy flow simulation

At higher flow rates, in addition to the viscous force term represented by Darcy’s equation, there is also an inertial force term due to convective accelerations of the fluid particles. Under these circumstances, the appropriate flow equation is the Forchheimer equation (1901). The first term depends on fluid viscosity “µ” and permeability “k”, and the second term depends on fluid density “ρ” and coefficient of inertial resistance “β”. The importance of the second term can be analyzed using the concept of parameter non-Darcy function “FND” defined as:

$$F_{\text{ND}} = 3.161 \times 10^{ - 12} \frac{{\beta T\gamma_{\text{g}} }}{{\mu_{\text{g}} h_{\text{p}}^{2} r_{\text{w}} }}$$
(68)

Therefore, the non-Darcy flow is conventionally included in the inflow equation as an additional skin factor “Sd” as:

$$S_{\text{d}} = \frac{{F_{\text{ND}} kh}}{1422T}q_{\text{g}}$$
(69)

Solving algorithm

The algorithm of data processing is as Fig. 3:

Fig. 3
figure 3

Simulation flowchart

The solution of the matrix by IMPES method is as Fig. 4:

Fig. 4
figure 4

IMPES method solution flowchart

In the constant bottomhole pressure constraint, phase’s rate and saturations are updated with the help of new pressure. For the calculation of these rates, it is desired to calculate of productivity index, mobility, compressibility factor, and pore volume in the new time step.

In order to ensure the convergence of the IMPES method for each user’s input data, it is necessary to have a cut or time step cut process. When new amounts of pressure were calculated and flow rates (or wellbore pressures) and saturations were updated subsequently, the main time loop passes from an inner loop of the time step cut to evaluate the decrease or increase in the time step. In this case, the time step is not just an input which can change the convergence. There is also another parameter in the input file called ncuts that the user can control the possible fastest convergence by changing it; ncuts provide the necessary amount of time step reduction to get the possible fastest convergence. The conditions for the time step cut procedure are shown in Fig. 5. In this algorithm, the counter is a variable initially set to zero.

Fig. 5
figure 5

Time step cut flowchart

After the time step is set, the simulator calculates cumulative production of gas and water.

Subsequently, for the constant flow rate constraint, if the calculated bottomhole pressure is less than the minimum bottomhole pressure “BHP” value in the input file, the constraint of the well will vary from the constant flow rate to the constant bottomhole pressure.

Results and discussion

In order to verify the ability of the developed code, two case studies from dual porosity–dual permeability fractured dry gas reservoirs have been chosen. Both of these examples have been solved by the developed code and commercial software using Darcy’s law equations.

In the first case study, the reservoir has been gridded by Cartesian coordinate and using the well’s data from Tables 2, 3, 4, 5, 6, 7 and 8. This reservoir has two production wells (multiple well model).

Table 2 Input data for gridding of case#1
Table 3 Reservoir properties of case #1
Table 4 Initial conditions of case #1
Table 5 Relative permeability and capillary pressure data according to saturation of case #1
Table 6 Well input data of case #1
Table 7 Well input data of case #1
Table 8 PVT data

Figure 6 shows the comparison of the developed code results with the Eclipse software results for average reservoir pressure versus time for case #1.

Fig. 6
figure 6

Average reservoir pressure versus time of case #1

Figures 7, 8, 9 and 10 demonstrate the comparison of the developed code results with the software eclipse results for water flow rate and Pwf for well number 1 and gas flow rate and water flow rate for well number 2 of case #1.

Fig. 7
figure 7

Water flow rate versus time for well No. 1 of case #1

Fig. 8
figure 8

Pwf versus time for well No. 1 of case #1

Fig. 9
figure 9

Gas flow rate versus time for well No. 2 of case #1

Fig. 10
figure 10

Water flow rate versus time for well No. 2 of case #1

As it is shown in Figs. 6, 7, 8, 9 and 10, there is a good agreement between the developed code results and Eclipse simulation results.

In case #2, the reservoir has been gridded by Cartesian coordinate using the data from Tables 9, 10, 11 and 12. This reservoir has two production and injection wells (multiple well model). The wells’ properties are shown in the following tables.

Table 9 Reservoir properties of case #2
Table 10 Initial conditions of case#2
Table 11 Well input data of case #2
Table 12 Well input data of case #2

The relative permeability and capillary pressure data are the same as case #1.

Figure 11 shows the comparison of the developed code results with the Eclipse software results for average reservoir pressure versus time for case #2.

Fig. 11
figure 11

Average reservoir pressure versus time of case #2

Figure 12 shows the comparison of the developed code results with the Eclipse software results for gas flow rate versus time for case #2.

Fig. 12
figure 12

Gas flow rate versus time of case #2

The reservoir average pressure has a descending trend until 200 days. Since the reservoirs are gas type, the reservoir pressure has a slow descending trend.

In the first case study, the well #1 has been modeled as non-Darcy flow model (FND = 0.046) and hydraulically fractured well (HFW) model (FCD = 0.192).

Figure 13 shows the comparison of the Darcy with the non-Darcy flow model using the developed code for case #1 (well #1).

Fig. 13
figure 13

Comparison of the Darcy with the non-Darcy flow model

Figure 14 shows the comparison of the HFW with the non-HFW model using the developed code for case #1 (well #1).

Fig. 14
figure 14

Comparison of the HFW with the non-HFW model

As it is shown in Figs. 13 and 14, the pressure drop in the wellbore increases in the non-Darcy flow model and decreases in the HFW model in comparison of the Darcy flow model and non-HFW model, respectively.

Finally, Tables 13 and 14 show the error percent “Err%” of each calculated parameter by FDGRS simulator based on the same calculated parameter by Eclipse simulator with the help of the following equation.

Table 13 Error percent of calculated parameters of case#1 by FDGRS simulator
Table 14 Error percent of calculated parameters of case#2 by FDGRS simulator
$${\text{Err}}\%_{\text{pa}} = \frac{{\left| {\overline{pa}_{\text{Eclipse}} - \overline{pa}_{\text{FDGRS}} } \right|}}{{\overline{pa}_{\text{Eclipse}} }}$$
(70)

Conclusions

In this study, a simulation code has been developed to predict the fractured dry gas reservoir’s behavior that contains the PVT and gridding boxes separately with the high flexibility due to the new correlations and EOS. Moreover, this code is able to grid the reservoir applying three coordinate (Cartesian, cylindrical, and cylindrical–Cartesian). Based on the simulation results, it is shown that by applying the cylindrical gridding around the well and Cartesian gridding in other regions of formation, the error of simulation decreases. However, this simulator is able to simulate the hydraulically fractured well reservoirs too. Also, the developed code applies three models for simulation: single porosity–single permeability, dual porosity–single permeability, and dual permeability–dual porosity. The simulation results show that the single porosity model can describe the reservoir as a non-fractured reservoir unlike that, if the simulation applies the more complex models such as the dual permeability–dual porosity, the error of simulation increases. However, the governing equations of fracture and matrix also consider both Darcy and non-Darcy effect (skin). The simulation results show that considering the non-Darcy effect around the well because of high gas velocity around the well, give more acceptable results. It is noted that the pressure drop in the wellbore increases in the non-Darcy flow model and decreases in the HFW model in comparison of the Darcy flow model and non-HFW model, respectively.

For the dry gas flow in the reservoir (in absence of condensates or oil), the fluid flow has been controlled by fluid compressibility and the viscous force. So, the gravity force is negligible.

This developed software is compatible with other commercial software such as Eclipse and CMG that is able to make outputs (such as pressure) at any given specific radius and in each time interval as numerical and/or graphical output in so little run time, so we can see pressure changes at any radius from wellbore radius to reservoir radius that has very low error with the other simulator results.

figure a

Choose a desired specific radius (rw to re) → Choose a desired specific output → Run → See output in each time interval (t0 to tend).

Finally, its results are very same to the real condition, because of its flexibility which makes us consider effects and parameters of fracture and matrix at any direction (X, Y, and Z direction).

Additionally, in comparison with others simulators, it is very low costly.