Horizontal gas well two-phase flow production profile optical fiber monitoring intelligent inversion method
By combining distributed optical fiber monitoring with an adaptive genetic algorithm, the accuracy and cost issues of measuring the production profile of gas-water two-phase horizontal wells in traditional methods have been solved. This has enabled accurate inversion of the permeability distribution and production profile of gas-water two-phase horizontal wells, providing technical support for gas reservoir development.
Patent Information
- Application Number
- CN202511772108.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-13
AI Technical Summary
Traditional methods for measuring the production profile of gas-water two-phase horizontal wells are difficult to accurately measure flow distribution. Related testing instruments are expensive and cannot meet actual production needs. Distributed fiber optic temperature measurement technology lacks an effective quantitative interpretation model for interpreting the production profile of gas-water two-phase horizontal wells, and cannot accurately invert permeability distribution and production profile.
Wellbore temperature data monitored by distributed optical fiber is used to generate a temperature forward modeling prediction model in combination with an adaptive genetic algorithm. The formation permeability distribution is then optimized by inversion using the adaptive genetic algorithm. The crossover and mutation probabilities of the adaptive genetic algorithm are dynamically adjusted based on the individual fitness values to output the optimal permeability distribution, and finally the gas-water two-phase production profile of the horizontal well is determined.
It has achieved accurate inversion of permeability distribution and production profile in gas-water two-phase horizontal wells, providing technical support for efficient and economical development of gas reservoirs, reducing capital costs, and establishing a precise quantitative relationship between temperature response and flow distribution in gas-water two-phase flow.
Smart Images

Figure CN121659565A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oil and gas reservoir development technology, specifically including an intelligent inversion method for fiber optic monitoring of two-phase flow production profiles in horizontal gas wells. Background Technology
[0002] Traditional methods for measuring the production profile of gas-water two-phase horizontal wells rely on downhole flow meters or testing instruments. However, these methods have several problems: First, gas-water two-phase flows are complex, with variable flow patterns and are affected by wellbore structure and reservoir properties, making it difficult for conventional equipment to accurately measure the flow distribution throughout the well. Second, the related testing instruments are expensive, requiring significant investment in purchase, installation, and maintenance, increasing oil and gas extraction costs and failing to meet actual production needs.
[0003] In recent years, distributed fiber optic temperature sensing (DTS) technology has been gradually applied to oil and gas reservoir development, providing continuous wellbore temperature profile data. However, it has limitations in interpreting production profiles in gas-water two-phase horizontal wells. Although temperature data can reflect the fluid flow state within the wellbore, the lack of an effective quantitative interpretation model makes it impossible to establish a precise quantitative relationship between the temperature response and flow rate distribution of gas-water two-phase flow. This makes it difficult to accurately invert permeability distribution and production profiles, thus limiting the effectiveness of this technology in actual production. Summary of the Invention
[0004] To address the aforementioned issues, this invention provides an intelligent inversion method for fiber optic monitoring of two-phase flow production profiles in horizontal gas wells. This method accurately inverts the permeability distribution and production profile of gas-water two-phase horizontal wells, providing strong technical support for the efficient and economical development of gas reservoirs.
[0005] The technical solution of this invention:
[0006] A smart inversion method for fiber optic monitoring of two-phase flow production profiles in horizontal gas wells includes the following steps:
[0007] Acquire measured temperature data of the wellbore based on distributed optical fiber monitoring;
[0008] Generate a forward temperature prediction model;
[0009] Based on measured temperature data and a temperature forward model, an adaptive genetic algorithm is used to invert and optimize the formation permeability distribution; wherein, the crossover probability and mutation probability of the adaptive genetic algorithm can be dynamically adjusted according to the individual fitness value;
[0010] When the iterative process of the adaptive genetic algorithm meets the preset termination condition, it outputs the current optimal penetration rate distribution.
[0011] Based on the optimal permeability distribution, the gas-water two-phase production profile of the horizontal well is determined.
[0012] Furthermore, the specific steps for inverting and optimizing the formation permeability distribution using an adaptive genetic algorithm include:
[0013] An initial population is generated using real-number encoding, where each individual in the population represents a set of penetration distributions.
[0014] Each individual in the population is substituted into the temperature forward model to calculate the simulated temperature profile, and compared with the measured temperature data. The fitness function value is then calculated using the error equation.
[0015] Based on the fitness function value, individuals are selected using a roulette wheel selection method, and elite individuals are retained;
[0016] The selected population is subjected to crossover and mutation operations to generate a new population, where the crossover probability and mutation probability are adaptively calculated based on the individual fitness value.
[0017] Furthermore, the temperature forward modeling prediction model includes:
[0018] Reservoir flow model:
[0019] ,
[0020] Aqueous phase model:
[0021] ,
[0022] Reservoir thermal model:
[0023] ,
[0024] Wellbore flow model:
[0025] ,
[0026] Wellbore thermal model:
[0027] ,
[0028] In the formula: Cg is the gas compressibility coefficient, MPa⁻¹; Cp is the heat capacity, J / (kg·K); g is the gravitational acceleration, m / s²; f is the wellbore friction coefficient, decimal; KJT is the Joule-Thomson coefficient, K / MPa; KT is the rock thermal conductivity, J / (m·s·K); k is the permeability, mD; p is the reservoir pressure, MPa; qwb is the rate at which heat is transferred per unit volume of rock from the cementing section to the wellbore, J / (m²·K). 3·s); Rinw is the wellbore inner diameter, m; S is the degree of saturation, decimal; t represents the production time, days; T represents the temperature, K; TI is the fluid inflow temperature, K; UT represents the overall heat transfer coefficient of the wellbore, J / (m2·s·K); v is the fluid velocity, m / s; ø is the porosity, decimal; μg is the gas viscosity, mPa·s; σ is the non-Darcy factor, decimal; The pressure is MPa² / mP·s; β is the coefficient of thermal expansion, 1 / K; ρ is the fluid density, kg / m³; θ is the horizontal wellbore inclination angle, °; subscript a represents gas and water phases, subscript x indicates the x-direction, subscript y indicates the y-direction, and subscript z indicates the z-direction.
[0029] Furthermore, the initialization core parameters of the adaptive genetic algorithm include: setting the population size N to 50, the maximum number of iterations to 150, the upper limit of the crossover probability to 0.9 and the lower limit to 0.6, the upper limit of the mutation probability to 0.1 and the lower limit to 0.01, and setting the elite retention ratio to 0.1, that is, the top 10% of individuals with the best fitness in each generation are retained and directly enter the next generation.
[0030] Furthermore, the selection operation employs a roulette wheel selection method, where the probability of individual i being selected is:
[0031] ,
[0032] In the formula, Let be the fitness value of individual i, and N be the population size.
[0033] Furthermore, the method for determining whether the iterative process of the adaptive genetic algorithm satisfies the preset termination condition is as follows:
[0034] The maximum fitness fluctuation over 5 consecutive days is less than 10⁻⁵.
[0035] The objective function is less than the preset temperature error accuracy;
[0036] The maximum number of iterations has been reached.
[0037] If any of the above conditions are met, stop the iteration and output the optimal penetration rate in the current population (i.e., the penetration rate distribution corresponding to the individual with the highest fitness); if not met, continue the iteration.
[0038] Furthermore, the real-number encoding method represents a set of penetration rate distributions for each individual, and the penetration rate values are randomly generated within a feasible range according to the following formula:
[0039]
[0040]
[0041] In the formula, n is the number of horizontal well section partitions. Let be the penetration rate of the i-th partition. The result is a random number within the interval [0,1]. and Let be the upper and lower limits of the feasible range of penetration rate for the i-th partition.
[0042] Furthermore, the error equation and fitness function in step S4 are as follows:
[0043]
[0044]
[0045] In the formula, E is the objective function for fitting evaluation; This is the measured temperature profile; This represents the temperature profile used in the simulation; F is the fitness function value.
[0046] Furthermore, the adaptive crossover probability calculation in step S6 is as follows:
[0047]
[0048] In the formula, For individual fitness; The average fitness of the population; For the maximum fitness of the population; This is the upper limit of the crossover probability, typically set to 0.9; This is the lower bound for the crossover probability, typically set to 0.6.
[0049] Furthermore, the adaptive mutation probability in step S7 is calculated as follows:
[0050]
[0051] In the formula, For adaptive mutation probability, It is 0.1. It is 0.01.
[0052] The beneficial effects of this invention are:
[0053] 1. It can directly utilize these temperature data to accurately invert the permeability distribution and production profile of gas-water two-phase horizontal wells, thereby accurately assessing and predicting the development dynamics of gas reservoirs.
[0054] 2. Provide an inversion interpretation model and method for quantitatively interpreting the production profile of gas-water two-phase horizontal wells. This model can establish an accurate quantitative relationship between the temperature response and flow distribution of gas-water two-phase flow, which can help those skilled in the art obtain the production profile of gas-water two-phase horizontal wells and provide technical support for promoting the efficient and economical development of gas reservoirs in my country.
[0055] 3. Using distributed fiber optic temperature measurement technology (DTS) to replace the investment in testing instruments greatly reduces capital costs. Attached Figure Description
[0056] Figure 1 Flowchart for solving the temperature profile prediction model for a gas-water two-phase horizontal well;
[0057] Figure 2 Interpretation of temperature fitting plots for horizontal well inversion in gas reservoirs;
[0058] Figure 3 A comparison chart of penetration rate inversion results;
[0059] Figure 4 This is a comparison chart of the yield inversion results. Detailed Implementation
[0060] The following will be combined with the appendix Figures 1-4 The technical solutions in the embodiments of the present invention will be clearly and completely described herein. The described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments in this application without creative effort are within the scope of protection of this application.
[0061] like Figure 1 As shown, the present invention provides an intelligent inversion method for two-phase flow production profile in horizontal gas wells using fiber optic monitoring. Taking a gas reservoir horizontal well as the target horizontal well and permeability as the inversion target parameter as an example, the method is used to interpret the inversion of the production profile of a gas-water two-phase horizontal well.
[0062] Before performing the inversion calculation, the location of the producing layer is first identified and diagnosed based on the measured wellbore temperature profile, and the temperature change (ΔT) at each producing layer location is calculated. Then, based on the relative magnitude of ΔT for each producing layer, the permeability of each producing layer is initially assigned. Starting from this initial value, the wellbore temperature profile is inverted to interpret the final permeability and wellbore flow profile.
[0063] First, the original distributed fiber optic temperature measurement (DTS) monitoring data was filtered and noise-reduced. Then, the established gas-water two-phase production profile inversion interpretation model was used to invert the DTS data of this well to obtain the production profile, such as... Figure 2 The figure shows the data inversion fitting results of Distributed Fiber Monitoring (DTS). As can be seen from the figure, the overall inversion fitting is good, and the temperature error at the output layer location meets the convergence accuracy.
[0064] Figure 3 and 4The comparisons are between the permeability inversion interpretation results and the stratified production inversion results. Therefore, this inversion interpretation model can accurately interpret the production profile of horizontal wells in gas reservoirs.
[0065] Example
[0066] This embodiment uses a horizontal production well in a shale gas reservoir as an example to interpret the gas-water two-phase flow production profile using the method of this invention. The well has been equipped with a distributed fiber optic temperature sensing system (DTS), which has obtained continuous production wellbore temperature data.
[0067] Acquire measured temperature data of the wellbore based on distributed optical fiber monitoring;
[0068] Specifically, based on continuous wellbore temperature data acquired by a distributed fiber optic temperature sensing system (DTS), the distribution pattern and gradient of temperature along the horizontal well section are analyzed. According to the inflection points of the temperature curves, abnormally high or low temperature zones, and combined with geological engineering data, the horizontal wellbore is divided into several interpretation units (regions) with independent flow characteristics. Each region is assigned an initial permeability value, which can be set based on the relative magnitude of the temperature drop, well logging interpretation results, or regional geological experience, providing a starting point for subsequent inversion optimization, as shown in Table 1.
[0069] Table 1. Measured temperature data of the wellbore based on the distributed fiber optic temperature measurement system (DTS)
[0070] Measurement point location (m) Measured temperature (°C) illustrate 0 20 Wellhead location 500 35.2 1000 50.1 1300 57.8 horizontal segment start point 1400 58.5 1500 56.8 Temperature decreases in the gas production section 1600 59.3 1700 57 The temperature in the gas-water co-production section decreased slightly. 1800 59.2 1900 56.8 Temperature decreases in the gas production section 2000 58.5 2100 58 2200 57.5 shaft end
[0071] Furthermore, a forward temperature prediction model is generated:
[0072] Reservoir flow model:
[0073] Gas phase model:
[0074] ,
[0075] Aqueous phase model:
[0076] ,
[0077] Reservoir thermal model:
[0078] ,
[0079] Wellbore flow model:
[0080] ,
[0081] Wellbore thermal model:
[0082] ,
[0083] In the formula: Cg is the gas compressibility coefficient, MPa -1 Cp is the heat capacity, J / (kg·K); g is the acceleration due to gravity, m / s². 2 f is the wellbore friction coefficient, a decimal; KJT is the Joule-Thomson coefficient, K / MPa; KT is the rock thermal conductivity, J / (m·s·K); k is the permeability, mD; p is the reservoir pressure, MPa; qwb is the rate at which heat is transferred per unit volume of rock from the cementing section to the wellbore, J / (m³). 3 ·s); Rinw is the wellbore inner diameter, m; S is the degree of saturation, decimal; t represents the production time, days; T represents the temperature, K; TI is the fluid inflow temperature, K; UT represents the overall heat transfer coefficient of the wellbore, J / (m²). 2· s·K); v is the fluid velocity, m / s; ø is the porosity, decimal; μg is the gas viscosity, mPa·s; σ is the non-Darcy factor, decimal; For simulated pressure, MPa 2 / mP·s; β is the coefficient of thermal expansion, 1 / K; ρ is the fluid density, kg / m³ 3 θ is the horizontal wellbore inclination angle, °; subscript a represents the gas and water phases, subscript x indicates the x-direction, subscript y indicates the y-direction, and subscript z indicates the z-direction.
[0084] Furthermore, based on measured temperature data and a temperature forward model, an adaptive genetic algorithm is used to invert and optimize the formation permeability distribution; wherein, the crossover probability and mutation probability of the adaptive genetic algorithm can be dynamically adjusted according to the individual fitness value:
[0085] Initialize the parameters of the adaptive genetic algorithm:
[0086] Specifically, the core operating parameters of the adaptive genetic algorithm are configured. The population size is set to 50, meaning that 50 possible penetration rate distribution schemes are processed simultaneously in each iteration. This ensures sufficient population diversity for global exploration while controlling computational costs and preventing a surge in forward simulation time due to excessive size. The maximum number of iterations is set to 150, aiming to provide ample convergence opportunities and serve as a safety upper limit to prevent resource waste in non-convergence scenarios, balancing computational efficiency and convergence requirements. The crossover probability is set to a dynamic range of [0.6, 0.9], allowing the algorithm to dynamically adjust the crossover tendency based on individual fitness—encouraging poor-performing individuals to explore through crossover, while reducing the crossover probability for high-performing individuals to protect their superior gene structure. The mutation probability is set to a dynamic range of [0.01, 0.1], which can help the population escape local optima by appropriately increasing mutation, while protecting already found excellent solutions from being destroyed by a very low probability. Simultaneously, the elite retention ratio is set to 0.1, ensuring that the top 10% of fittest individuals in each generation directly enter the next generation without genetic manipulation, preventing the loss of excellent genes.
[0087] The initial population is generated using real-number encoding, and each individual in the population represents a set of penetration distributions:
[0088] Specifically, a real-number encoding strategy is used to represent the penetration rate distribution. Each individual consists of a set of real numbers, directly representing a complete penetration rate distribution covering all partitions. An initial population of 50 such individuals is created through random generation within a pre-defined feasible range of penetration rates for each partition.
[0089] In this method, the real-number encoding represents a set of penetration rate distributions for each individual, and the penetration rate values are randomly generated within a feasible range according to the following formula:
[0090]
[0091]
[0092] In the formula, X represents a random number uniformly distributed within the interval [0,1]; n is the number of horizontal well sections. Let be the penetration rate of the i-th partition; The result is a random number within the interval [0,1]. and Let be the upper and lower limits of the feasible range of penetration rate for the i-th partition.
[0093] In this embodiment, the horizontal well section is divided into 6 zones (n=6), and the feasible range of permeability for each zone is set as follows: Zone 1 is [0.005, 0.015] mD, Zone 2 is [0.020, 0.050] mD, Zone 3 is [0.010, 0.025] mD, Zone 4 is [0.008, 0.020] mD, Zone 5 is [0.002, 0.008] mD, and Zone 6 is [0.015, 0.035] mD. Using real-number encoding, the generation process is illustrated with an example individual: Assume the random number sequence is [0.35, 0.55, 0.70, 0.60, 0.50, 0.65]. Then, the penetration rates for partition 1 are k1 = 0.0085 mD; for partition 2, k2 = 0.0365 mD; for partition 3, k3 = 0.0205 mD; for partition 4, k4 = 0.0152 mD; for partition 5, k5 = 0.0050 mD; and for partition 6, k6 = 0.0280 mD. Therefore, the individual is encoded as: [0.0085, 0.0365, 0.0205, 0.0152, 0.0050, 0.0280] (unit: mD).
[0094] Each individual in the population is substituted into the temperature forward prediction model to calculate the simulated temperature profile, which is then compared with the measured temperature data. The fitness function value is calculated using the error equation.
[0095] Specifically, the permeability distribution represented by each individual in the current population is substituted into a temperature forward model that couples reservoir seepage and wellbore thermodynamics to perform numerical simulation of gas-water two-phase flow and heat transfer, and the corresponding simulated wellbore temperature profile is calculated. The temperature forward modeling prediction process is as follows: First, acquire the basic data of the target well, including rock thermal conductivity KT=2.5J / (m·s·K), porosity ø=0.08, gas saturation Sg=0.70, etc.; Next, set the boundary conditions: input the production time t=30 days, reservoir temperature TI=90.2°C, reservoir pressure and other boundary values p=28.5MPa, and clarify the phase parameters differences between the gas and water phases (e.g., gas viscosity μg=0.022mPas, water viscosity μw=0.12mPas, fluid thermal expansion coefficient β=0.00121 / K); Finally, perform numerical solution: substitute the above data into the model formula, discretize using the finite difference method (e.g., spatial step Δx=1m, time step Δt=0.1 days), solve simultaneously to obtain the temperature T, pressure p and other parameters of each grid node, and finally output the simulated temperature profile T of the entire well section. cal In each simulation, the only variable input is the formation permeability distribution. For each individual in the population, i.e., each permeability distribution, for example, individual A: partition 1: 0.010 mD; partition 2: 0.025 mD; partition 3: 0.018 mD; partition 4: 0.012 mD (parameters within the same partition are considered uniformly distributed), we input this as the key parameter into the established forward model and execute a complete numerical simulation. The final output is the simulated temperature profile T for the entire well section. cal As shown in Table 2.
[0096] Table 2. Output data of some nodes based on the temperature forward model.
[0097] Measurement point location (m) Simulated pressure p (MPa) <![CDATA[Simulated temperature T cal > illustrate 0 5 20 Wellhead location, lowest pressure, known wellhead parameters 1300 7 57.75 horizontal segment start point 1500 7.05 56.7 In the main gas-producing section, the Joule-Thomson effect causes a significant drop in temperature. 1700 7.1 57.1 In the gas-water co-production section, the water phase has a large heat capacity, which carries heat and inhibits the rate of temperature drop in the gas phase production. 1900 7.15 56.7 In the main gas-producing section, the Joule-Thomson effect causes a significant drop in temperature. 2200 7.2 57.5 At the end of the wellbore, near the original formation pressure and temperature
[0098] It should be noted that the coupling mechanism of the temperature forward model is achieved through four physical processes: reservoir seepage, reservoir thermals, wellbore flow, and wellbore thermals. Specifically, the reservoir seepage model describes the flow of the gas-water two phases in the reservoir, based on Darcy's law and mass conservation, considering factors such as relative fluid permeability, reservoir permeability, fluid viscosity, porosity, and saturation. The model calculates the flow distribution of the gas-water two phases, which serves as the input to the wellbore flow model. The reservoir thermal model, using initially set reservoir temperature and fluid properties (such as specific heat capacity and thermal conductivity), calculates the initial temperature of the fluid flowing into the wellbore based on heat conduction and convection equations, obtaining the initial temperature of the fluid flowing into the wellbore, which serves as the boundary condition for the wellbore thermal model. The wellbore flow model uses the flow distribution output from the reservoir seepage model and initially set wellbore geometric parameters (such as wellbore diameter and friction coefficient). Based on the momentum conservation equation, it calculates the pressure and velocity distribution within the wellbore, which is then used for convective heat transfer calculations in the wellbore thermal model. The wellbore thermal model uses the initial temperature output from the reservoir thermal model and the pressure and velocity output from the wellbore flow model. It applies the Joule-Thomson effect, frictional heat generation, and wellbore-formation heat transfer to calculate the temperature distribution within the wellbore. These temperatures are fed back to the reservoir thermal model to update the fluid's thermophysical parameters.
[0099] It should also be noted that Darcy's law, the mass conservation equation, the heat conduction and convection equations, and the momentum conservation equation used in the coupling process are all existing technologies and will not be further explained here.
[0100] The simulated temperature profile was compared point-by-point with the measured DTS data. The fitting difference was calculated using the error equation and converted into a fitness function value. The fitness function value directly quantifies how closely the permeability distribution approximates the actual situation. The specific steps are as follows: First, obtain the basic data: Extract the measured temperature profile T from the distributed fiber optic temperature measurement system (DTS) according to the grid nodes of the horizontal well section. obs (Table 1); then, based on the above model substitution process, the simulated temperature profile T is calculated. cal (Table 2); The measured temperature value T at each grid node j obs j and the simulated temperature value T cal, The squared difference of j is calculated, and then the squared differences of all m nodes are summed. The result is substituted into formula E, and the squared difference of each node is calculated and summed. The calculation is performed according to the error equation (formula E), that is, the squared difference between the measured value and the simulated value is calculated for each node, and then the results of all nodes are summed to obtain the value of the fitting evaluation objective function E. Subsequently, the value of E is substituted into the fitness function to calculate the fitness value F corresponding to the current permeability distribution.
[0101] The error equation and fitness function formula are as follows:
[0102]
[0103]
[0104] In the formula, E is the objective function for fitting evaluation; This is the measured temperature profile; is the temperature profile for simulation calculation; F is the fitness function value; m is the number of temperature measurement points; j is the j-th temperature measurement point.
[0105] This embodiment takes three representative nodes as examples to demonstrate the specific calculation process of the fit difference and fitness value, as detailed in Table 3.
[0106] Table 3. Detailed numerical calculation process for fit difference and fitness value
[0107] Node location (m) Measured temperature (Tobs, °C) Simulated temperature Tcal (°C) <![CDATA[(Tobs - Tcal) squared difference 2 > 1500 56.8 56.7 <![CDATA[(56.8-56.7) 2 =0.01]]> 1700 57 57.1 <![CDATA[(57.0-57.1) 2 =0.01]]> 1900 56.8 56.7 <![CDATA[(56.8-56.7) 2 =0.01]]>
[0108] Assuming there are m=120 nodes in total, and excluding the nodes listed in the table above, the sum of the squared differences of the remaining nodes is 1.07, then the fitting evaluation objective function E is calculated as follows:
[0109] =0.01+0.01+0.01+1.07=1.10
[0110] Substitute E into the fitness function formula to calculate the fitness value F corresponding to the current permeability distribution:
[0111]
[0112] The fitness value F=0.476 reflects the overall fit between the simulated temperature and the measured temperature under the current permeability distribution. The larger the value, the better the fit and the closer the current permeability distribution is to the real situation.
[0113] Furthermore, based on the fitness function value, individuals are selected using a roulette wheel selection method, and elite individuals are retained:
[0114] Specifically, the selection probability of each individual is calculated based on the fitness function values of all individuals in the population. Let the fitness value of individual i be f. i If the population size is N, then the probability P of being selected is... i .
[0115] In the roulette wheel selection method, the probability of individual i being selected is:
[0116] ,
[0117] In the formula, Let be the fitness value of individual i, and N be the population size.
[0118] Let's take a population of 5 individuals (N=5) as an example to illustrate the roulette wheel selection result. Assume that in one iteration, the fitness values F of the 5 individuals in the population are 0.85, 0.60, 0.45, 0.75, and 0.95, respectively. The calculated probabilities of each individual being selected are 0.236, 0.167, 0.125, 0.208, and 0.264, respectively. Through roulette wheel selection (for example, generating a random number sequence: 0.301, 0.512, 0.815, 0.142, 0.650), the ultimately selected individuals are: individual 2, individual 3, individual 5, individual 1, and individual 4, forming a new candidate population.
[0119] This probability calculation method ensures that individuals with higher fitness values occupy a larger area in the roulette wheel, thus increasing their chances of being selected. Next, a roulette wheel selection method is used for screening: the [0,1] interval is divided into N sector regions, with the arc length of each region proportional to the selection probability of the corresponding individual. A uniformly distributed random number is generated within the [0,1] interval, and the selected individual is determined based on the sector region where the random number falls. This process is repeated until a suitable set of individuals is selected. Simultaneously, an elite retention strategy is implemented: the top 10% of individuals with the highest fitness in the current population are directly retained without participating in the roulette wheel selection. These elite individuals are fully replicated into the next generation population, ensuring that the algorithm does not lose the currently discovered optimal solution during evolution. Finally, the individuals selected by the roulette wheel are merged with the elite individuals to form a new population for subsequent crossover and mutation operations. This selection mechanism ensures the continuation of superior genes while maintaining population diversity through probabilistic selection, providing strong support for the algorithm's global search capability and convergence efficiency.
[0120] Furthermore, crossover and mutation operations are performed on the selected population to generate a new population, where the crossover and mutation probabilities are adaptively calculated based on the individual fitness values:
[0121] Specifically, individuals in the pre-crossover population are first randomly paired to form several parent pairs. Then, for each parent pair, the crossover probability is adaptively calculated based on their fitness value. This probability calculation follows these core principles: for pairs with high fitness values (i.e., whose simulated temperature profile fits well with measured DTS data), the system assigns a relatively low crossover probability (approaching a preset lower limit of 0.6) to protect the excellent permeability distribution pattern inherent in their structure, allowing it to be largely preserved for offspring and guiding the population to further develop its current dominant areas; conversely, for pairs with low fitness values, a higher crossover probability (approaching a preset upper limit of 0.9) is assigned.
[0122] The specific formula for calculating the crossover probability is as follows:
[0123]
[0124] In the formula, For individual fitness; The average fitness of the population; For the maximum fitness of the population; This is the upper limit of the crossover probability, typically set to 0.9; This is the lower bound for the crossover probability, typically set to 0.6.
[0125] Let's take a pair of parent individuals as an example. Assume that in the current population, individual A has a fitness of f = 0.85, individual B has a fitness of f = 0.60, and the average fitness of the population is f... avg =0.72, maximum fitness f max =0.95. Therefore, the crossover probability of individual A is calculated as follows:
[0126] P c (A)=0.6+(0.9-0.6)×(0.95-0.85) / (0.95-0.72)≈0.6+0.3×0.1 / 0.23≈0.731,
[0127] Similarly, the crossover probability of individual B is calculated as follows:
[0128] P c (B)=0.6+(0.9-0.6)×(0.95-0.60) / (0.95-0.72)≈0.6+0.3×0.35 / 0.23≈1.057,
[0129] Since the calculation result exceeds the upper limit, Pc(B) = 0.9 is taken.
[0130] After determining the probability, the system will use this probability to decide whether to perform a crossover operation on the pair of individuals. If performed, the system will generate two completely new offspring individuals that incorporate the characteristics of their parents by swapping the penetration rate values of one or more randomly specified corresponding partitions in the two parent individuals, thus completing the crossover process.
[0131] Based on the new population obtained after the crossover operation, a portion of individuals are randomly selected as candidates for mutation operations.
[0132] For each selected individual, the mutation probability is adaptively calculated based on its fitness value. This probability calculation follows the core principles below: For high-fitness individuals, the system will use an extremely low mutation probability (approaching a preset lower limit of 0.01) to maintain its penetration distribution, which is close to the optimal solution, and introduce changes with only a small probability to avoid getting trapped in local extrema; while for individuals with low fitness values, a relatively high mutation probability (approaching a preset upper limit of 0.1) will be used to change their penetration values through random perturbation, thereby increasing the diversity of population parameters and providing the algorithm with the possibility of escaping local search regions.
[0133] The specific formula for calculating the mutation probability is as follows:
[0134]
[0135] In the formula, For adaptive mutation probability, It is 0.1. It is 0.01.
[0136] The calculation results are presented using two individuals as an example. Assume the average fitness of the current population is f. avg The fitness value is 0.70, and the maximum fitness value is f. max The value is 0.90. For individuals with higher fitness, C(f) C =0.88), and its adaptive mutation probability P was calculated. m (C) = 0.019. For individuals with lower fitness, D(f D =0.45), and its adaptive mutation probability P was calculated. m (D)=0.1.
[0137] After determining the probability, the system will perform a mutation operation on the selected individual based on this probability. The operation is manifested as a small random increase or decrease in the permeability value of one or more randomly selected partitions in the permeability distribution vector represented by the individual within its feasible region, thereby generating a mutated individual.
[0138] Furthermore, when the iterative process of the adaptive genetic algorithm meets the preset termination condition, it outputs the current optimal penetration distribution:
[0139] Specifically, the new population generated after selection, crossover, and mutation is taken as the next generation population. The process then returns to the step of substituting the permeability of each individual in the population into the temperature forward prediction model, starting a new cycle of "forward simulation - fitness evaluation - genetic operation". After each iteration, the algorithm is checked to see if it meets any of the following termination conditions: ① The fluctuation of the maximum fitness value of the population is less than 10 in 5 consecutive iterations. -5② The objective function (fitting error) value is less than the preset temperature error accuracy threshold; ③ The number of iterations has reached the preset upper limit of 150. Once any of the conditions are met, the iteration is stopped immediately, and the permeability distribution corresponding to the individual with the highest fitness in the current population is output as the optimal solution obtained by inversion.
[0140] Furthermore, based on the aforementioned optimal permeability distribution, the gas-water two-phase production profile of the horizontal well is determined:
[0141] Specifically, the optimal permeability distribution output from the iteration is re-substituted into the temperature forward model for a final forward calculation to obtain a high-precision simulated temperature profile. This profile is then comprehensively compared and verified with measured DTS data. If the global fitting error meets the accuracy requirements for engineering applications, the inversion result is confirmed to be reliable. Finally, based on this optimal permeability distribution, the gas and water phase flow rates of each zone in the horizontal well are calculated using the reservoir flow model, thereby generating a quantitative gas-water two-phase production profile, providing direct evidence for gas reservoir development decisions, as shown in Table 4.
[0142] Table 4. Inversion results of gas-water two-phase production profiles in horizontal wells
[0143] Partition Number Permeability (mD) <![CDATA[Gas flow rate (10 4 m³ / d)]]> Aqueous phase flow rate (m³ / d) Gas production contribution rate (%) Water production contribution rate (%) 1 0.008 1.2 3.5 9.84 11.78 2 0.032 3.8 8.2 31.15 27.61 3 0.019 2.1 5.6 17.21 18.86 4 0.011 1.5 4.1 12.30 13.80 5 0.005 0.4 1.2 3.28 4.04 6 0.026 3.2 7.1 26.22 23.91 total 12.2 29.7 100 100
[0144] Contribution rate refers to the percentage of production from a given zone relative to the total well production. Due to inter-layer interference, the contribution rates vary considerably among zones. This production profile shows that zones 2 (permeability 0.032 mD) and 6 (permeability 0.026 mD) are the main gas-producing zones, contributing approximately 57.37% of the total gas production and 51.52% of the total water production. Zones 1, 3, and 4 are medium-production zones; zone 5 has the lowest production. The water phase production and gas phase distribution trends are generally consistent, but the water-to-gas ratio varies across zones, reflecting the heterogeneity of gas-water distribution within the reservoir. These production profile results provide a direct basis for formulating development measures such as profile control, water shut-off, or production system optimization.
[0145] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for intelligent inversion of two-phase flow production profiles in horizontal gas wells using fiber optic monitoring, characterized in that, Includes the following steps: Acquire measured temperature data of the wellbore based on a distributed fiber optic temperature measurement system; Generate a forward temperature prediction model; Based on measured temperature data and a temperature forward model, an adaptive genetic algorithm is used to invert and optimize the formation permeability distribution; wherein, the crossover probability and mutation probability of the adaptive genetic algorithm can be dynamically adjusted according to the individual fitness value; When the iterative process of the adaptive genetic algorithm meets the preset termination condition, it outputs the current optimal penetration rate distribution. Based on the optimal permeability distribution, the gas-water two-phase production profile of the horizontal well is determined.
2. The method according to claim 1, characterized in that, The method of using an adaptive genetic algorithm to invert and optimize the formation permeability distribution includes the following steps: An initial population is generated using real-number encoding, where each individual in the population represents a set of penetration distributions. Each individual in the population is substituted into the temperature forward model to calculate the simulated temperature profile, and compared with the measured temperature data. The fitness function value is then calculated using the error equation. Based on the fitness function value, individuals are selected using a roulette wheel selection method, and elite individuals are retained; The selected population is subjected to crossover and mutation operations to generate a new population, where the crossover probability and mutation probability are adaptively calculated based on the individual fitness value.
3. The method according to claim 1, characterized in that, The temperature forward modeling prediction model includes: Reservoir flow model: Gas phase model: , Aqueous phase model: Reservoir thermal model: , Wellbore flow model: , Wellbore thermal model: , In the formula: C g The gas compressibility coefficient is expressed in MPa. -1 C p Heat capacity, J / (kg·K); g is the acceleration due to gravity, m / s² 2 f is the wellbore friction coefficient, a decimal; K JT K is the Joule-Thompson coefficient, K / MPa; T ρ is the thermal conductivity of the rock, J / (m·s·K); k is the permeability, mD; p is the reservoir pressure, MPa; q wb The rate at which heat is transferred per unit volume of rock from the cementing section to the wellbore, in J / (m³). 3 ·s); R inw S is the wellbore inner diameter, in meters; S is the degree of saturation, a decimal; t represents the production time, in days; T represents the temperature, in kilometer. I U represents the fluid inflow temperature, in K; T Represents the overall heat transfer coefficient of the wellbore, J / (m²). 2 ·s·K); v is the fluid velocity, m / s; ø is the porosity, decimal; μ g σ is the gas viscosity, mPa·s; σ is the non-Darcy factor, a decimal. For simulated pressure, MPa 2 / mP·s; β is the coefficient of thermal expansion, 1 / K; ρ is the fluid density, kg / m³ 3 ; θ is the horizontal wellbore inclination angle, °; kr is the relative permeability of the fluid considering the slippage effect, mD; D is the diameter, m; μ is the viscosity, mPa·s; λ is absent; subscript g indicates gas; subscript w indicates water phase; Δy is the grid size in the y direction; subscript α indicates gas or water phase; subscript x indicates in the x direction, subscript y indicates in the y direction, and subscript z indicates in the z direction.
4. The method according to claim 1, characterized in that, The initialization core parameters of the adaptive genetic algorithm include: setting the population size N to 50, the maximum number of iterations to 150, the upper limit of the crossover probability to 0.9 and the lower limit to 0.6, the upper limit of the mutation probability to 0.1 and the lower limit to 0.01, and setting the elite retention ratio to 0.1, that is, the top 10% of individuals with the best fitness in each generation are retained and directly enter the next generation.
5. The method according to claim 2, characterized in that, The selection operation uses a roulette wheel selection method, and the probability of individual i being selected is: , In the formula, P i The probability of an individual being selected is dimensionless; denoted as fitness value of individual i, dimensionless; N is the population size, dimensionless.
6. The method according to claim 1, characterized in that, The method for determining whether the iterative process of the adaptive genetic algorithm satisfies the preset termination condition is as follows: Maximum fitness fluctuation is less than 10 for 5 consecutive times -5 ; The objective function is less than the preset temperature error accuracy; The maximum number of iterations has been reached. If any of the above conditions are met, the iteration stops and the optimal permeability in the current population is output; if not, the adaptive genetic algorithm continues to iterate on the formation permeability.
7. The method according to claim 2, characterized in that, The real-number encoding method represents a set of penetration rate distributions for each individual, and the penetration rate values are randomly generated within a feasible range according to the following formula: In the formula, n is the number of horizontal well sections, which is dimensionless; Let mD be the penetration rate of the i-th partition; is a dimensionless random number within the interval [0,1]. and Let mD be the upper and lower limits of the feasible range of penetration rate for the i-th partition.
8. The method according to claim 2, characterized in that, The error equation and fitness function formula are as follows: In the formula, E is the error equation for fitting the objective function, which is dimensionless; F is the fitness function value, which is dimensionless. The measured temperature profile is in K. The temperature profile, K, is for simulation calculation.
9. The method according to claim 1, characterized in that, The adaptive crossover probability calculation in step S6 is as follows: In the formula, P c The crossover probability is dimensionless. Individual fitness, dimensionless; The average fitness of the population is dimensionless. The maximum fitness of the population is dimensionless. This is the upper limit of the crossover probability, dimensionless, and is set to 0.9; The lower bound for the crossover probability is dimensionless and is set to 0.
6.
10. The intelligent inversion method for fiber optic monitoring of two-phase flow production profiles in horizontal gas wells according to claim 1, characterized in that, The adaptive mutation probability calculation in step S7 is as follows: In the formula, The adaptive mutation probability is dimensionless. This is the upper limit of the mutation probability, dimensionless, and is set to 0.1; The value is the lower bound of the mutation probability, which is dimensionless and is set to 0.01.
Citation Information
Cited By
Residual oil saturation distribution high-precision real-time monitoring method based on distributed optical fibers
CN122061779A