A fracturing fluid plug combination optimization method and system taking wellbore temperature and pressure simulation as fitness and a storage medium
The fracturing fluid slug combination optimization method based on wellbore temperature and pressure simulation solves the problem of difficulty in quantifying bottom hole pressure and sand blockage risk in hydraulic fracturing operations, and realizes efficient and safe fracturing fluid slug combination design.
Patent Information
- Application Number
- CN202611637523.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-22
- Publication Date
- 2026-11-20
AI Technical Summary
Existing technologies make it difficult to quantify the effective bottom-hole pressure, wellhead pressure, and sand blockage risk in hydraulic fracturing operations. Furthermore, the calculation cost of optimization schemes is high, and it is impossible to provide an executable fracturing fluid slug combination scheme in a short period of time.
An optimal fracturing fluid slug combination optimization method using wellbore temperature and pressure simulation as fitness is proposed. The slug sequence chromosome is encoded by a genetic algorithm. Combined with wellbore temperature and pressure coupling simulation and fitness evaluation, the pressure distribution of each slug is obtained and the ternary weighted fitness is calculated. Risk sub-items and penalty mechanisms are embedded to generate the optimal slug combination.
It provides high-fidelity, executable fracturing fluid slug combination solutions in a short time, reduces bottom hole pressure calculation deviations and sand blockage risks, improves design efficiency and safety, and reduces computational overhead.
Smart Images

Figure CN123139864A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of hydraulic fracturing construction design in oil and gas fields, specifically involving a method, system, and storage medium for optimizing fracturing fluid slug combinations based on wellbore temperature and pressure simulation. Background Technology
[0002] In hydraulic fracturing, fracturing fluid is injected into the wellbore in a specific sequence using multiple slugs. The pre-fracturing slug is used to create fractures and prepare the proppant transport channels. The proppant transport slugs deliver and lay proppant into the fractures. The displacement slug pushes any remaining proppant transport fluid from the wellbore into the formation. The fluid type, volume, proppant concentration, displacement rate, and injection sequence of the slugs directly determine whether the effective bottomhole pressure is sufficient, whether the wellhead pressure exceeds limits, whether the proppant can be effectively transported, and whether sand blockage occurs. Slug combination schemes are typically developed offline before fracturing operations.
[0003] Currently, the formation of conventional fracturing fluid slug combination schemes in the industry mainly relies on field experience and manual segmentation and clustering. Fracturing design engineers manually determine the total volume ratio of pre-flush fluid / spar-carrying fluid / displacement fluid based on historical construction experience and fluid type libraries for the block where the well is located; combining well depth and geological data, they manually list the step sand concentration and fluid type for several sand-carrying fluid slugs; finally, based on the total fluid volume and the expected total construction time, they manually allocate the volume, flow rate, and duration of each slug, generating a pumping procedure table before submitting it for construction. The above-mentioned conventional practices reveal three problems in well sections with high depth, high temperature difference, high pressure difference, and strong heterogeneity: First, the effective pressure at the bottom of the well is insufficient or the pressure at the wellhead is over-pressured. The switching of slug fluid, the abrupt change in sand concentration, and the changes in frictional pressure drop / frictional heat generation at different locations along the well depth significantly affect the effective pressure at the bottom of the well and the pressure at the wellhead. Empirical methods are difficult to quantify these changes, and the proportion of pressure window violations is relatively high during actual construction. Second, the risk of sand blockage is uncontrollable. Empirical methods are difficult to quantify the settlement risk of each sand-carrying fluid slug in the scheme generation stage. If the displacement is insufficient or the fluid viscosity is low while the sand concentration is high, sand shedding and sand blockage are likely to occur at the fracture entrance. Third, the multi-objective trade-off relies heavily on the engineer's experience. At the same time, multiple objectives are required, such as "maximum effective pressure at the bottom of the well, minimum risk of sand blockage, stable wellhead pressure, no excess total fluid volume, and no excess proppant dosage". Manual methods can only provide compromise solutions and are difficult to systematically search for better solutions.
[0004] To address the aforementioned issues, existing publicly available optimization solutions primarily employ two approaches: a data-driven production / capacity prediction surrogate model combined with genetic algorithms or human experience, and a simplified hydrostatic column estimation. The former uses a surrogate model trained on historical data to provide fitness or a score, without verification through the coupled physical processes of wellbore temperature and pressure. Its predictions are not based on actual frictional pressure drop, frictional heat generation, and sand-carrying properties along well depth, resulting in significant discrepancies between predictions and actual physical processes in high-pressure / high-temperature differential sections. The latter typically optimizes only scalar parameters such as fluid volume / displacement rate / sand concentration, lacking encoding for the structured construction object of the slug time sequence. It cannot express the temporal coordination and progressively increasing sand concentration structure of "pre-flush fluid - sand-carrying fluid slug 1 - slug 2 - ... - displacement fluid," leading to poor solution space compression. Furthermore, directly applying high-fidelity physical simulation to the genetic algorithm for individual-by-individual, generation-by-generation fitness evaluation results in computational overhead that increases linearly with population size multiplied by the generation number, making it difficult to deliver executable solutions within the engineering time window within 1-2 hours before construction. Summary of the Invention
[0005] In order to solve the problems existing in the prior art, the present invention provides a method, system and storage medium for optimizing fracturing fluid slug combination based on wellbore temperature and pressure simulation.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for optimizing fracturing fluid slug combinations based on wellbore temperature and pressure simulation, comprising the following steps: S0, Parameter Acquisition: Acquire wellbore parameters, formation parameters, fluid type library, and construction constraints; S1. Slug Sequence Chromosome Encoding: The fracturing slug sequence is chromosomally encoded. The chromosome adopts a "three-slug × five-tuple" encoding structure, where the "three-slug" includes the pre-fluid segment, the proppant-carrying fluid segment, and the displacement fluid segment, and the "five-tuple" is the decision variable contained in each slug, including fluid type, proppant concentration, slug displacement, slug duration, and segment index. S2. Population initialization and constraint verification: An initial population is randomly generated based on the chromosome encoding. Constraint verification is performed on the individuals in the initial population. Individuals that do not meet the construction constraints are removed or are given a penalty value. The generation counter is then initialized. S3. Fitness Evaluation: The fitness of individuals in the current population is evaluated. The fitness evaluation includes: performing hard constraint verification, slug attribute recalculation, construction plan conversion, slug wellbore temperature and pressure coupling iterative solution, convergence judgment and simulation anomaly fallback, ternary fitness normalization and penalty stratification on each individual in sequence to obtain the individual fitness value. The "ternary" refers to the fitness evaluation including pressure evaluation, risk evaluation and stability evaluation. S4. Genetic Evolution: Perform genetic evolution operations on the current population based on fitness values to generate a new generation of population; the genetic evolution operations include at least tournament selection, crossover operation, mutation operation, and elite retention strategy; S5. Termination Judgment and Output: Determine whether the current state meets the preset stopping conditions. The stopping conditions include any one of the following: the target fitness is met, the maximum generation limit is reached, or there is no improvement for several consecutive generations. If the stopping conditions are met, output the best individual in the current population as the optimal block combination and its corresponding construction plan. If the stopping conditions are not met, take the new generation population as the current population, return to step S3, and form an evolutionary cycle.
[0007] Preferably, the wellbore geometric parameters in step S0 include well depth, vertical depth, wellbore inner diameter, and well inclination angle distribution; formation parameters include formation temperature gradient, formation thermal diffusivity, and formation thermal conductivity; the set of available fracturing fluid types includes multiple fracturing fluids; each fracturing fluid includes the following properties: density, viscosity, drag reduction rate, cost, and maximum proppant concentration; construction parameters include total fluid volume, total proppant dosage, and maximum displacement; the target construction time is derived by dividing the total fluid volume by the maximum displacement.
[0008] Construction constraints (constraint set) must include at least: maximum wellhead pressure, minimum bottomhole effective pressure, target bottomhole effective pressure, maximum sand concentration, upper and lower limits for the number of slugs, upper and lower limits for fluid volume, maximum proppant dose per slug, and maximum sand blockage risk. The upper and lower limits for fluid volume in the constraint set refer to the legal range of the sum of all slug volumes (i.e., total fluid volume), used to constrain the total injection scale of the scheme; the "maximum proppant dose per slug" is a single-slug constraint, and the two have different definitions.
[0009] Preferably, the segment index in step S1 is used to mark the temporal position of the segment plug in the chromosome sequence, and remains consistent with the temporal position of the segment plug during genetic operations without being modified by mutation.
[0010] Preferably, the constraint verification in step S2 includes direct constraint verification and derived constraint verification; wherein the direct verification objects include: the number of slugs, the sand concentration of each slug, and the time sequence arrangement rules of the slug liquid types; the derived constraint verification objects are the total liquid volume and the total support dose.
[0011] Preferably, the initial population random generation rule in step S2 is as follows: The total number of slugs is randomly selected from the constrained interval; Pre-fluid volume as a percentage of total liquid volume During the initialization phase, low-density, low-friction liquids with zero sand concentration are preferred. The displacement fluid volume as a percentage of the total fluid volume During the initialization phase, high-density liquids with zero sand concentration are preferred; low-density liquids refer to liquids with a density of less than or equal to 1050 kg·m³.-3 High-density liquids refer to liquids with a density greater than 1050 kg·m³. -3 It automatically determines the friction condition based on the type of liquid. ,frac pad 、frac disp These are the proportions (dimensionless) of the pre-fluid and the displacement fluid volumes to the total liquid volume. tailcoat pad The value range is [0.10, 0.20]. tailcoat disp The value range is [0.05, 0.10]; the total liquid volume is the sum of the volumes of the pre-filled liquid, the sand-carrying liquid, and the displacement liquid.
[0012] The proppant-carrying fluid occupies the remaining liquid volume and is randomly divided into several proppant-carrying fluid slugs; all proppant is carried by the proppant-carrying fluid slugs, and its initial distribution is determined according to the rule of increasing weight (more in the later slugs and less in the earlier slugs); The liquid type of the sand-carrying section is selected according to the location range: linear adhesive is used in the front section and crosslinking liquid is used in the rear section.
[0013] Preferably, in step S3 iterative solution, the average temperature and average pressure of the segment are used as indexes to retrieve the viscosity, density, and specific heat of the liquid from the fracturing fluid type library in real time; for sand-bearing sluices, the density, viscosity, and specific heat of the base fluid are weighted and corrected according to the sand volume fraction; and for each grid segment, the pressure increment and temperature increment are calculated respectively.
[0014] More preferably, the pressure increment in step S3 includes gravitational pressure drop and frictional pressure drop, and the temperature increment includes frictional heating, gravitational work heating, and radial heat loss or radial heat gain.
[0015] Preferably, in step S3, risk sub-items are set during the fitness evaluation process, and penalties are imposed on individuals that exceed the limits, so as to reduce the sand blockage risk index of the optimized scheme to within the constraint limit.
[0016] Further preferred, the sand blockage risk index is calculated as follows: the settling velocity of the proppant in the liquid is determined and clamped to a reasonable range, the liquid flow velocity in the crack corresponding to the blockage is determined, the basic risk factor is constructed by the ratio of the settling velocity to the flow velocity in the crack, and then the sand concentration factor and viscosity factor are introduced. The three factors are multiplied to obtain the risk of the sand-containing blockage, and then the average of all sand-containing blockages is taken and clamped to [0,1].
[0017] Further preferred technical means of punishing individuals who exceed the limits: A two-tiered penalty strategy is adopted: "hard constraints directly eliminate individuals, while soft constraints result in additional point deductions." Hard constraints are judged first, and once triggered, an individual becomes directly infeasible. Individuals that do not trigger hard constraints enter the soft constraint penalty stage, where soft constraint point deductions are only used for ranking among individuals and do not change their feasibility.
[0018] Preferably, in step S3, a cache key is first generated for the slug sequence features. A hit before evaluation allows for direct value reading, avoiding repeated full-wellbore simulation of each slug. The specific steps are as follows: Take the individual slug combination to be evaluated, the preset target time (derived from the maximum displacement), and construction constraint parameters. Generate a cache key based on the individual slug combination and search the preset fitness cache for historical evaluation results matching the cache key. The cache key is concatenated according to the sequence "liquid type:volume:sand concentration|...".
[0019] Preferably, in step S3, the abnormal fallback is: if a certain plug segment is simulated to be abnormal, then the estimated value of the bottom hole pressure of that plug segment is taken according to the hydrostatic column estimation formula and used in subsequent statistics.
[0020] Preferably, in step S4, the mutation operation is categorized into three types of random mutations based on the target: liquid type mutation, sand concentration mutation, and segment duration mutation. The segment duration mutation can be further subdivided into two operations: displacement mutation and volume transfer mutation between two segments. The mutation is triggered by a single total mutation rate. After triggering, one of the four specific operations—liquid type change, sand concentration adjustment, displacement adjustment, and volume transfer—is selected with equal probability for execution.
[0021] On the other hand, the present invention also provides a fracturing fluid slug combination optimization system with wellbore temperature and pressure simulation as fitness, including a parameter acquisition unit, an encoding unit, a fitness evaluation unit, a fitness caching unit, a genetic evolution unit and an output unit; the genetic evolution unit includes a generation counting module, a convergence monitoring module, an early stop judgment module and an evolution scheduling module.
[0022] The parameter acquisition unit is used to acquire wellbore geometric parameters, formation parameters, available fracturing fluid types, and optimization constraint sets.
[0023] The coding unit is used to generate the segment sequence individuals of the initial population according to the five-tuple and three-segment coding rules.
[0024] The fitness evaluation unit embeds a wellbore temperature and pressure coupling simulator and a secondary penalty module, which is used to solve the pressure and temperature distribution step by step and calculate the ternary weighted fitness, apply hard constraints for elimination and soft constraints for deduction.
[0025] The genetic evolution unit contains a tournament selection submodule, a single-point crossover submodule, a mutation submodule, and an early-stop guard submodule, used to perform genetic evolution and determine convergence. Functionally, the genetic evolution unit includes a generation counting module, a convergence monitoring module, an early-stop judgment module, and an evolution scheduling module: the generation counting module is used to count the current evolution generation and maintain the count of consecutive generations without improvement; the convergence monitoring module is used to monitor the improvement of the global optimal fitness value with each generation; the early-stop judgment module is used to trigger early termination when the number of consecutive generations without improvement reaches the early-stop threshold; the evolution scheduling module is used to call the tournament selection, single-point crossover, mutation, and elite retention operators, and to arrange the evolution scheduling of the entire optimization process. The above four functional modules and the aforementioned four submodules are two sets of classification criteria for the same genetic evolution unit, and both are applicable in the device claims and embodiments.
[0026] The fitness caching unit, connected to the fitness evaluation unit, is configured to perform cache key generation, hit determination, and simulation result storage / readback.
[0027] The output unit outputs the optimal slug sequence, construction pumping procedure table, pressure window, storage tank scheduling, and equipment limitation prompts.
[0028] A feedback connection is formed between the fitness evaluation unit and the genetic evolution unit. The offspring chromosomes output by the genetic evolution unit are evaluated by the fitness evaluation unit and then returned to the genetic evolution unit to participate in the next generation of evolution.
[0029] Preferably, it also includes an adaptive parameter correction unit, wherein the correction factor set is configured by an external parameter file and is adjustable online.
[0030] Preferably, it includes at least one of the following: a construction landing mapping element; a pressure control window; a liquid storage tank switching schedule; and an equipment upper limit prompt. Its function is to map simulation results into executable on-site construction actions, implement them, and complete online parameter verification.
[0031] In another aspect, the present invention also provides a storage medium having a program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0032] Beneficial effects of the present invention (1) This invention innovatively uses the slug sequence as the individual genetic algorithm for structured encoding, which completely overcomes the shortcomings of traditional methods that only optimize isolated scalars such as fluid volume and displacement, and cannot characterize the temporal coordination and sand concentration stepwise increasing structural law of "pre-flush fluid-sand-carrying fluid slug 1-slug 2-...-displacement fluid". It significantly compresses the solution space and improves the global optimization efficiency. Using wellbore temperature and pressure coupling simulation as the fitness evaluation kernel, the pressure distribution is obtained for each slug and the ternary weighted fitness and penalty term are calculated. While ensuring the high-fidelity physical feasibility and multi-objective collaborative optimization of the scheme, the convergence judgment and simulation anomaly fallback in the fitness evaluation, as well as the early termination of "no improvement for several consecutive generations" in the termination judgment, reduce the number of invalid wellbore temperature and pressure coupling simulations and suppress the linear amplification of computational overhead with population size and generation. By genetic evolution to the termination condition and outputting the optimal slug sequence, the entire optimization process can quickly deliver an executable scheme within the strict engineering time window of 1-2 hours before construction, which significantly improves the design efficiency, safety and field applicability of complex fracturing construction.
[0033] (2) Fidelity of Bottomhole Pressure Calculation: The fitness evaluation of this invention uses a wellbore temperature-pressure coupling simulator for each segment plug. During iteration, rheological parameters are obtained based on the segment average temperature and segment average pressure, and density and specific heat are corrected according to the sand volume fraction. Frictional pressure drop, frictional heat generation, and gravity work are also taken into account. The calculation of the effective bottomhole pressure of the sand-bearing plug is consistent with the physical process of construction. Existing simplified proxy models based on hydrostatic column pressure ignore temperature-pressure coupling, changes in sand-carrying properties, and frictional heat generation. The bottomhole pressure estimation deviation in high-pressure sections generally exceeds 15%. This invention incorporates the above-mentioned sources of deviation into the analysis, reducing the risk of insufficient or overpressure.
[0034] (3) Sand blockage risk is controllable: This scheme embeds risk sub-items in the fitness, calculates the risk by multiplying the ratio of particle settling velocity to flow velocity in the crack by sand concentration factor and viscosity factor, and imposes penalties on individuals exceeding the limit, reducing the sand blockage risk index of the optimized scheme to within the upper limit of the constraint (Example 0.3), so the sand blockage risk on site is controllable.
[0035] (4) Controlled computational overhead: This invention generates cache keys for slug sequence characteristics, and reads values directly upon hit before evaluation, avoiding repeated full-wellbore simulation of each slug; the early termination mechanism records the number of generations without improvement, and terminates early when a threshold is reached; in case of simulation anomalies, static fluid column estimation is used as a fallback. Direct numerical simulation driven schemes without cache mechanisms require repeated full-wellbore simulations for each individual and generation, and the computational overhead increases linearly with the population size and generation. This invention meets the engineering time window requirement of quickly generating a scheme before construction, under the premise of fitness through physical simulation. Attached Figure Description
[0036] Figure 1 A flowchart of the overall process for optimizing fracturing fluid slug combinations; Figure 2This is a schematic diagram of the chromosome encoding of the segment plug sequence; Figure 3 A flowchart for the fitness evaluation sub-process; Figure 4 This is a flowchart of the genetic evolution process; Figure 5 A schematic diagram of the system structure for optimization. Detailed Implementation
[0037] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings and embodiments.
[0038] Example 1 like Figure 1-Figure 4 As shown, this invention provides a method for optimizing fracturing fluid slug combinations based on wellbore temperature and pressure simulation, comprising the following steps: S0: Obtain wellbore parameters, formation parameters, fluid type library, and construction constraints; Collect and structure-analyze wellbore geometric parameters, formation thermal properties, available fracturing fluid types, and global construction control parameters, and construct an optimization constraint set; The wellbore geometric parameters include well depth, vertical depth, wellbore inner diameter, and well inclination angle distribution; the formation parameters include formation temperature gradient, formation thermal diffusivity, and formation thermal conductivity. The available fracturing fluid types include a variety of fracturing fluids; each fracturing fluid includes the following properties: density, viscosity, drag reduction, cost, and maximum proppant carrying capacity. Construction parameters include total liquid volume, total support dosage, and maximum discharge rate.
[0039] The constraint set includes at least: maximum wellhead pressure, minimum bottomhole effective pressure, target bottomhole effective pressure, maximum sand concentration, upper and lower limits for the number of slugs, upper and lower limits for fluid volume, maximum proppant dose per slug, and maximum sand blockage risk. The upper and lower limits for fluid volume in the constraint set refer to the legal range of the sum of all slug volumes (i.e., total fluid volume), used to constrain the total injection scale of the scheme; the "maximum proppant dose per slug" is a single-slug constraint, and the two have different definitions.
[0040] Wherein, the maximum wellhead pressure refers to the maximum wellhead construction pressure allowed during construction (including the safety factor); the minimum effective bottom hole pressure refers to the minimum net bottom hole pressure required to ensure fracture extension; the total fluid volume refers to the total designed injection volume of this well fracturing operation (including the sum of the pre-flush fluid, proppant-carrying fluid, and displacement fluid); the total proppant dosage refers to the total amount of proppant carried by all proppant-carrying slugs; the maximum displacement refers to the maximum pumping displacement allowed during construction, which is an optimized input parameter and does not change with genetic evolution; the target construction time is derived by dividing the total fluid volume by the maximum displacement; and the fluid volume upper and lower limits refer to the upper and lower limits of the fluid volume of a single slug, i.e., the legal range of the volume of a single slug.
[0041] The completed initial set of operating condition parameters is passed to step S2 to provide a complete basis for operating conditions and constraint boundaries for the generation of the initial population.
[0042] S1: Segmental sequence chromosome encoding The temporally arranged fracturing slug sequence is used as the individual chromosome of the genetic algorithm. The slug sequence corresponding to a complete fracturing operation plan consists of a pre-flush fluid slug, several proppant-carrying fluid slugs, and a displacement fluid slug in sequence. Each slug is structured and encoded using a five-tuple. The encoding parameters of a single slug include fluid type (G1), proppant concentration (G2), slug displacement (G3), slug duration (G4), and slug index (G5). The slug volume is not used as an independent encoding gene, but is used as a model derived quantity, calculated by multiplying the displacement and duration of the corresponding slug.
[0043] S2: Population Initialization and Constraint Verification Based on the optimization constraint set loaded by S0, initial individuals of a preset population size are randomly generated within the constraint boundary. After generating candidate individuals, constraint verification is performed, and the verification objects include: the number of slugs, the sand concentration of each slug, and the temporal arrangement rules of the liquid type of the slugs. The total liquid volume is calculated from the displacement and duration of all slugs, and the total support dose is calculated from the sand concentration, displacement, and duration of each slug. The obtained total liquid volume and total support dose are included in the constraint verification. Illegal individuals that fail the verification are eliminated, and candidate individuals are regenerated. The verification steps are repeated until the number of individuals in the population reaches the preset population size, and the generation counter is initialized to 0. Figure 2 In the quintuple gene diagram, G5 is the segment index; the segment index is used to mark the position of the segment plug in the chromosome sequence. During the genetic operator operation, the segment index and the temporal position of the segment plug are kept consistent and no mutation is made.
[0044] The initial population is generated randomly according to the following rules: The total number of slugs is randomly selected from the constraint interval; the total number of slugs consists of 1 pre-flush slug, n sand-carrying fluid slugs, and 1 displacement fluid slug, that is, the number of sand-carrying fluid slugs n is equal to the total number of slugs minus 2, and n≥1; after the total number of slugs is determined, the relative position of n with each sand-carrying fluid slug is determined. pos j Then it was determined as the only one; Pre-fluid volume as a percentage of total liquid volume During the initialization phase, low-density, low-friction liquids with zero sand concentration are preferred. The displacement fluid volume as a percentage of the total fluid volume During the initialization phase, high-density liquids with zero sand concentration are preferred; low-density liquids refer to liquids with a density of less than or equal to 1050 kg·m³. -3 High-density liquids refer to liquids with a density greater than 1050 kg·m³. -3It automatically determines the friction condition based on the type of liquid. ,frac pad 、frac disp These are the proportions (dimensionless) of the pre-fluid and the displacement fluid volumes to the total liquid volume. tailcoat pad The value range is [0.10, 0.20]. tailcoat disp The value range is [0.05, 0.10]; the total liquid volume is the sum of the volumes of the pre-filled liquid, the sand-carrying liquid, and the displacement liquid.
[0045] The sand-carrying fluid occupies the remaining liquid volume and is randomly divided into several sand-carrying fluid segments; all proppant is carried by the sand-carrying fluid segments, and its initial allocation is determined according to the rule of increasing weight (more in the later segments and less in the earlier segments); the remaining liquid volume is the total liquid volume minus the volume of the preceding liquid and the volume of the replacement liquid. The sand concentration of each sand-carrying fluid segment is determined according to the formula (1) described later, and is used as an independent decision variable (sand concentration gene G2) in the encoding; the total amount of proppant carried by all sand-carrying fluid segments is the derived amount, which is obtained by multiplying the sand concentration, displacement and duration of each segment and then summing them up, and is not used as an independent encoding variable; the weights are only used to determine the initial value of the sand concentration and are not used as a mandatory constraint in the evolutionary process.
[0046] It is preferable to generate the segmentation ratio of each segment using a uniform distribution and then normalize it.
[0047] Preferably, the sand concentration in the sand-carrying liquid section increases linearly with relative position, and is determined by the following formula:
[0048] In the formula: C j For the first j Sand concentration (kg / m³) of each sand-carrying fluid sluice plug 3 ); C max Maximum sand concentration (kg / m³) 3 ); pos j This indicates the relative position of this segment within the sand-carrying fluid sequence. posj =( j- 1) / ( m -1) (0 for the first segment, 1 for the last segment); j The sequence number of the block in the sand-carrying fluid sequence ( j =1,2,…,m); m The number of slugs carrying the sand is obtained by subtracting 2 from the total number of slugs. c 0 represents the ratio of the initial sand concentration to the highest sand concentration. k s Let be the sand concentration increase coefficient, and the two satisfy . c0+ k s =1, that is k s Depend on c 0 uniquely determined ( k s =1 c 0), initialization c 0 = 0.2 k s =0.8, c The value of 0 ranges from [0.05, 0.50], and correspondingly... k s =1- c The value of 0 ranges from [0.50, 0.95]. The sand concentration sequence generated according to formula (1) ranges from 0.2 to 0.2 from the first segment to the last segment. C max and C max The sand concentration increases linearly between them. Equation (1) is used to assign sand concentration values to the initial population; the sand concentration of each sand-carrying block is independently carried by the sand concentration gene G2, and is randomly increased or decreased by ±20% and clamped in the sand concentration variation in step S4.4. Therefore, the peak-shaped sand concentration sequence that increases first and then decreases can be naturally generated by the mutation operator. Equation (1) is not used as a mandatory constraint in the evolutionary process.
[0049] The liquid type of the sand-carrying section is selected according to the location range: linear adhesive in the first section and crosslinking liquid in the second section; preferably, it is divided according to the sand concentration level, with low sand and medium sand sections ( pos j <0.7) use linear adhesive, high sand section ( pos j (≥0.7) Use a crosslinking solution.
[0050] The duration is allocated according to the volume ratio and a slug duration correction factor is added. The displacement is determined by the ratio of volume to duration.
[0051] In the formula: t slug The duration of the slug (s) is given. t target The target total construction time (s) V slug Slug volume (m 3 ), V total Total liquid volume (m 3 ), k t This is the slug duration correction factor (dimensionless, initialized to 1.0). k tIt is not an independent coding variable (not belonging to the pentad genes G1-G5), and its changes are indirectly achieved by the segment duration variation (displacement variation or volume transfer between two segments) in step S4.4.
[0052] Slug displacement is the ratio of volume to slug duration:
[0053] In the formula: q slug Slug displacement (m) 3 / s). When each segment of the block k t When the values are the same, we can obtain the following by combining equations (2) and (3). q slug = V total / (t target ·k t ) That is, the displacement of each sprocket is the same (constant displacement condition); when the displacement of each sprocket is... k t When different values are taken, the displacement of each stage of the pump is different, thus achieving stepped displacement. k t The step displacement is indirectly adjusted by the segment duration variation (displacement variation or volume transfer between two segments) in step S4.4, therefore the step displacement is... k t The differences between segments are generated.
[0054] Figure 2 The paper provides an example chromosome, consisting of 8 segments: one pretreatment segment (P1), six sand-carrying segments (C1-C6), and one displacement segment (D1). The sand concentration of each segment increases linearly from a maximum sand concentration of 20% to a maximum sand concentration of 100% based on its relative position in the sand-carrying sequence, with the maximum sand concentration set at 600 kg / m³. 3 The values were 120, 216, 312, 408, 504, and 600 kg / m³, respectively. 3 Sand concentration is categorized based on the ratio of the current sand concentration to the highest sand concentration: a ratio less than 0.4 indicates low sand, 0.4 to 0.8 indicates medium sand, and a ratio greater than 0.8 indicates high sand. Accordingly, C1 and C2 are low sand (0.2, 0.36), C3 and C4 are medium sand (0.52, 0.68), and C5 and C6 are high sand (0.84, 1.0). The liquid type for the sand-carrying section is selected based on relative position: linear adhesives are used for sections with a relative position less than 0.7, and crosslinking liquids are used for sections with a relative position greater than 0.7; that is, linear adhesives are used for C1-C4, and crosslinking liquids are used for C5 and C6. Figure 2In the example: Pretreatment liquid P1 uses sand-free slick water, C1 uses low-sand linear adhesive, C2 uses low-sand linear adhesive, C3 uses medium-sand linear adhesive, C4 uses medium-sand linear adhesive, C5 uses high-sand crosslinking liquid, C6 uses high-sand crosslinking liquid, and D1 uses sand-free high-density crosslinking liquid.
[0055] Step S3: Fitness Evaluation The initial population output from S2 is fed into S3 one by one for fitness evaluation: for each individual, hard constraint verification, slug attribute recalculation, construction plan conversion, slug-by-slug wellbore temperature and pressure coupling iterative solution, convergence judgment and anomaly fallback, ternary fitness normalization and penalty stratification are performed sequentially; the total fitness F and average bottom hole effective pressure of the individual are obtained. avgBHP Minimum effective pressure at the bottom of the well minBHP Maximum wellhead pressure maxWHP Minimum wellhead pressure minWHP Sand blockage risk index R s Key indicators of the process are used to return fitness values for subsequent genetic evolution operators. For example... Figure 3 As shown: S31. Input the individual slug assembly to be evaluated, the preset target time (derived from the maximum displacement) and construction constraint parameters, generate a cache key based on the individual slug assembly, and search in the preset fitness cache for whether there are historical evaluation results that match the cache key. The steps to generate the cache key are: (1) Input the individual slugs to be evaluated, that is, the slugs sequence arranged in time. Each slug contains fields such as liquid type, volume, and sand concentration; (2) For each slug in the sequence, extract its three fields of liquid type, volume, and sand concentration in turn, and concatenate them in the format of "liquid type: volume: sand concentration|"; concatenate each slug in turn until the traversal is completed, and the cache key of the individual to be evaluated is obtained.
[0056] The generated cache key is used to retrieve data from the preset fitness cache: if a match is found, the cached fitness value is read directly and the complete physical simulation is skipped; if no match is found, the segmented plug wellbore temperature and pressure coupling simulation is performed, and the results are stored with the key for reuse by subsequent individuals with the same parameters.
[0057] S32. Hard Constraint Verification: If the cache misses, verify the number of slugs, total fluid volume, total support dose, maximum support dose per slug, and sand concentration (relative to the highest sand concentration) for each slug sequence individual. If any of these exceed the constraint set, the individual is infeasible, its fitness is directly set to the minimum value, it is not included in subsequent physics simulations, and the individual is eliminated prematurely.
[0058] S33. Slug Attribute Recalculation: For individuals that pass the hard constraint verification, recalculate the attributes of each slug. Duration is allocated according to volume ratio and a slug duration correction factor is added; displacement is determined by the ratio of volume to duration. K t Different values allow for step-like variations in the discharge rate of each slug; the sand concentration of the sand-carrying slug is taken from the value recorded in its sand concentration gene G2 and clamped to the sand concentration constraint range; the sand concentration of the pre-fluid / displacement fluid slug remains zero.
[0059] K t The transient heat transfer time function of the formation is expressed using the Hasan–Kabir (1991) model, and is given by: (4) In the formula: α The thermal diffusivity of the formation (m) 2 / s), t The current construction time (s) r wb The wellbore radius (m); K t The transient heat transfer time function of the formation is dimensionless and occurs in the very early stage ( t extremely small or / r wb ≤1) Take 1.0; when K t When the calculation result exceeds the range of [0.5,5], it is limited to 0.5 (lower limit) or 5 (upper limit); when the construction time is ≥10h, the steady-state calculation model is switched, the transient thermal resistance of the formation is no longer included, and the radial heat transfer is calculated according to the steady-state equivalent thermal resistance.
[0060] S34. Construction plan conversion: Generate a construction plan table for each time step according to the slug sequence (time → liquid type → sand concentration → discharge rate), and mark the slug switching boundary at each slug switching point for mapping the pressure window of the construction side landing to the switching scheduling of the storage tank.
[0061] S35, Segmented plugging wellbore temperature-pressure coupling iteration: Using displacement, initial wellhead pressure, injection temperature, and sand concentration as inputs, the algorithm iterates from the wellhead to the bottom of the well along the wellbore depth in N grid nodes, iterating within each micro-element well depth until the temperature and pressure simultaneously meet the convergence tolerance.
[0062] Micro-element well depth (grid segment length) dz The step size for integrating the pressure / temperature increment along the well depth. dz =L / (N-1), where L is the total well depth (m) and N is the number of grid nodes.
[0063] Convergence tolerance includes temperature tolerance and pressure tolerance, TOL T For a temperature tolerance of 0.1K, TOL P The pressure tolerance is 10 kPa, meaning that convergence is determined when the iteration within each grid segment reaches |ΔT|<0.1K and |ΔP|<10 kPa.
[0064] The pressure increment consists of gravity pressure drop and friction pressure drop. The acceleration pressure drop term is more than two orders of magnitude lower than the friction / gravity term under slug flow conditions and is therefore ignored as a minor term. The temperature increment consists of frictional heating, gravity-induced heating, and radial heat transfer (radial heat transfer is either radial heat loss or radial heat gain). The segment-averaged temperature is used in the iteration. Average pressure of the segment For indexing, the viscosity, density, and specific heat of the liquid are retrieved in real time from the fracturing fluid type library; for sand-bearing slugs, the density, viscosity, and specific heat of the base fluid are then weighted and corrected according to the sand volume fraction. T in , T out , P in , P out These are the inlet temperature, outlet temperature, inlet pressure, and outlet pressure of the current grid segment, respectively.
[0065] coefficient of friction f Select according to liquid type and viscosity, based on operating conditions: Operating Condition 1: Newtonian Fluid Slug: Pre-fluid slickwater, low-concentration linear gel with viscosity ≤5 mPa·s, using Blasius correlation (smooth pipe turbulence): (5) in R e It is the Reynolds number (dimensionless). r The density of the fracturing fluid (the density of the proppant slug after weighted correction using proppant properties), kg / m³ 3 ; v The flow velocity in the wellbore is... v =4 q slug / (π D 2 ), m / s; D The inner diameter of the well shaft is in meters (m). m f For fluid dynamic viscosity, take Pa·s (if the liquid model is given in mPa·s, it must be divided by 1000 to convert to Pa·s before being substituted to ensure accuracy). R e(These are dimensionless numbers). All subsequent parameters involving fracturing fluid properties (density, specific heat, viscosity) are based on the weighted correction values of proppant-carrying properties. The coefficients 0.3164 and 0.25 in equation (5) are the standard values of the Blasius correlation for turbulent flow in smooth tubing, which can be calibrated online by the correction factor set according to the target well and tubing conditions; the coefficients in equation (6) a With index b Similarly.
[0066] Operating Condition 2: Non-Newtonian Fluid Slug: When using cross-linked liquids, high-viscosity linear adhesives, or sand-containing slugs with a viscosity greater than 5 mPa·s, the power-law fluid friction empirical correlation is applied: (6) in, Re PL is the power-law fluid Reynolds number (dimensionless); b This is an empirical index of the friction coefficient; K The consistency coefficient of a power-law fluid is expressed in Pa·s. n Power; n The flow index of a power-law fluid (dimensionless, given by the liquid type at the average temperature of the section; taken as 1 for Newtonian fluids); coefficient a =0.754、 b =0.323 is a commonly used empirical value in engineering and can be rewritten using the correction factor set. The selection of the two operating conditions is automatically determined by the current slug's fluid type and viscosity.
[0067] Radial heat loss dTloss (K) Switching between transient / steady-state calibers based on construction duration: Operating Condition 1 (Short-term construction, default switching threshold 10 hours, configurable): Transient diameter, using Hasan-Kabir type wellbore radial heat transfer empirical correlation: (7) in: K t As shown in equation (4), k formation is the thermal conductivity of the formation, W / (m·K); U t The transient overall heat transfer coefficient is expressed in W / (m²·K). U steady The steady-state overall heat transfer coefficient is W / (m²·K), and its series connection is shown below; r co Let be the outer radius of the oil pipe (m). K t · r co / k formationThe equivalent thermal resistance of the formation under transient aperture is expressed in m²·K / W.
[0068] Operating Condition 2 (Long-term construction, total construction time ≥ 10 hours): Steady-state aperture, transient time function K t Radial heat transfer is no longer included in the calculation; it is now calculated based on the steady-state equivalent thermal resistance. In this case, equation (7) degenerates into... dTloss / dz = 4· U steady · ( T fm T avg ) / ( p·v·D·c p ).
[0069] T avg The average temperature of the segment is K; T fm The original temperature of the formation, K; r The density of the fracturing fluid is kg / m³. 3 ; c p The specific heat of the fracturing fluid is J / (kg·K); v The flow velocity in the wellbore is m / s; D The inner diameter of the well shaft is in meters (m). dz Let m be the depth of the micro-element well.
[0070] U steady The steady-state overall heat transfer coefficient (W / (m²)) 2 ·K), is obtained by connecting the convection thermal resistance inside the pipe, the thermal conductivity thermal resistance of the oil pipe wall, the annular thermal resistance, the cement sheath thermal resistance, and the formation thermal resistance in series, i.e., 1 / U steady =1 / h f +r to ·ln(r co / r ci ) / k tub +R ann +R cem +R fm All components in the formula are converted to equivalent thermal resistance (m) based on the same reference plane (outer surface of the oil pipe). 2 ·K / W), R ann R cem R fm Press R respectively ann =c ann R cem =c cem / k cement Rfm =c fm ×(k ref / k formation ) calculate, where c ann c cem c fm The normalized calibration coefficients for thermal resistance (dimensions m) 2 ·K / W, m, m 2 ·K / W), taken as 0.005, 0.005, and 0.01 respectively; k ref For reference formation thermal conductivity (W / (m·K), 2.5 is used in this example), k cement The value represents the thermal conductivity of the cement sheath (W / (m·K)). The above calibration coefficients were determined by inversion from field measurements and can be calibrated online according to the target well using a set of correction factors.
[0071] For each grid segment, calculate the pressure increment and temperature increment respectively; where the pressure increment includes the pressure drop due to gravity and the pressure drop due to friction, and the temperature increment includes the temperature rise due to friction, the temperature rise due to work done by gravity, and the radial heat loss or radial heat gain.
[0072]
[0073] In the formula: This is the pressure drop due to gravity (Pa). r The density of the fracturing fluid is kg / m³. 3 , g The acceleration due to gravity is m / s². 2 , i dz is the well inclination angle (°) and dz is the micro-element well depth (m).
[0074]
[0075] In the formula: d P fric The frictional pressure drop (Pa) is the pressure drop. f The friction coefficient is dimensionless (based on Blasius / power law correlation for different operating conditions). v The flow velocity in the wellbore is (m / s). D The inner diameter of the well shaft (m). K pd This is a dimensionless correction factor for frictional pressure drop (considering engineering additions such as joints, eccentricity, and tools).
[0076]
[0077] In the formula: d T fric Friction generates heat (K). c p , where J is the specific heat of the fracturing fluid (kg·K).
[0078]
[0079] In the formula: d T grav Temperature change (K) caused by work done by gravity.
[0080]
[0081] In the formula: dT This represents the temperature increment (K) for that grid segment. dT fric , dT grav and dT loss The frictional heat generation, temperature change caused by gravity work, and radial heat loss (K) of the grid segment are calculated according to Equations (10), (11), and (7) for different operating conditions (transient or steady-state). The radial heat transfer term is the radial heat loss or radial heat gain, depending on the original formation temperature T. fm With the average temperature of the section T avg The relative magnitude depends on the pressure. For any grid segment, the pressure is calculated as P(k+1) = P(k) + dP. grav dP fric Recursion, P(k) is the nth k The pressure on segment (current node), P(k+1) is the pressure of the segment (current node). k The pressure of +1 segment (the next deeper node), dP grav For gravitational pressure drop, dP fric For frictional resistance, the voltage drop is given; the temperature is calculated recursively according to T(k+1) = T(k) + dT. k T(k+1) is the grid segment number (increasing from the wellhead to the bottom of the well), where T(k+1) is the number of the grid segments. k The temperature of segment +1, T(k) is the temperature of segment +1. k The temperature of the segment.
[0082] For a sand-containing slug, assume the base fluid density, specific heat, and viscosity are as follows: r f , c pf , m f The volume fraction of sand is (C) slug For slug sand concentration, r p Both are expressed as proppant density in kg / m³. 3 (Calculated), then the density, specific heat, and viscosity after carrying sand are corrected according to the following formula:
[0083] In the formula :r mix 、c p,mix ,m mix Density of the mixture after sand carrying (kg / m³) 3 ), specific heat (J·kg -1 ·K -1 ) and viscosity (Pa·s), r f , m f The density of the base liquid (kg / m³) 3 ) and dynamic viscosity (Pa·s). r p For proppant density, c pp The specific heat of the proppant (nominal 800 J·kg) -1 ·K -1 ), c pf Specific heat of the base liquid (J / (kg·K)) The volume fraction of the sand is obtained by dividing the slug sand concentration by the proppant density and clamped to a value not exceeding [a certain value]. max The viscosity correction for sand concentration was performed using the Krieger-Dougherty method. max [η] is the maximum packing fraction (dimensionless, taken as 0.64), and [η] is the intrinsic viscosity coefficient (dimensionless, taken as 2.5). r f , c pf , m f The values of the average temperature and average pressure of each segment are obtained from the fracturing fluid type database. The above three formulas apply to sand-bearing slugs, not sand-free slugs. s When the ratio is 0), the physical properties of the mixture degrade to those of the base liquid. r f , c pf , m f .
[0084] The pressure and temperature distribution at each node along the well depth is iteratively output, and the pressure at the bottom node is taken as the bottom pressure of the plug section, and the pressure at the wellhead node is taken as the wellhead pressure of the plug section.
[0085] Convergence determination: The wellbore temperature and pressure coupling simulator is solved using an iterative method. After each iteration, a convergence determination is performed: the bottom hole pressure residual between the current iteration step and the previous iteration step is calculated; if the residual is less than the preset convergence tolerance, the simulation is determined to be converged, the iteration is exited and the current pressure data is output; if the residual is not less than the convergence tolerance, the next round of iteration is continued until the preset maximum number of internal iterations is reached.
[0086] Simulation anomaly fallback: If a certain segment of the plug simulation shows an anomaly (such as exceeding the iteration limit or numerical floating-point anomaly), the estimated bottom-hole pressure value of that segment will be used in subsequent statistics according to the hydrostatic column estimation formula.
[0087] In the formula: To estimate the bottom hole pressure during simulated anomalies, P wh,init This represents the initial wellhead pressure (MPa). r seg The fluid density of the current slug (kg / m³) 3 The value is taken from the liquid type reservoir at the average temperature of the sluice, according to the liquid type of the sluice; for sand-containing sluices, the density is taken after weighted correction based on the sand-carrying properties. g is the acceleration due to gravity (m / s²). 2 ); L tv Total vertical depth (m); ΔP fric,est ΔP is a one-time estimate of the frictional resistance (Pa) based on the average frictional coefficient of the segment. fric,est = ·ρ seg · 2 ·L tv / (2·D), where The average friction coefficient of each segment (dimensionless, the friction coefficient of each segment is taken as a weighted average of the segment length, and the friction coefficient of each segment is selected according to the liquid type and viscosity according to the Blasius correlation of equation (5) or the power law correlation of equation (6)). The average flow velocity in the wellbore section is (m / s). =4 / (πD 2 ), Average displacement per segment (m³) 3 / s); D is the wellbore inner diameter (m). The minimum guaranteed value of 10 MPa is an infeasible minimum. The maximum value is taken as max{…} to ensure that the estimated value is not lower than this minimum, so that the evaluation process is uninterrupted.
[0088] S36. Ternary fitness normalization and two-level penalty stratification Based on the bottom hole pressure data and wellhead pressure data output in step S35, the basic ternary fitness value of the individual is calculated. The ternary fitness value includes at least pressure evaluation score, risk evaluation score, and stability evaluation score. Then, an over-limit penalty is applied to the wellhead pressure in the construction plan, and a settlement penalty is applied to the risk of solid particles settling in the slug, to obtain the corrected fitness value.
[0089] Statistical analysis of the average bottom hole effective pressure of all slugs avgBHP Minimum effective pressure at the bottom of the well minBHP Maximum wellhead pressure maxWHP Minimum wellhead pressure minWHP Sand blockage risk index R s Construct the ternary weighted fitness using the following formula:
[0090] In the formula: F For total fitness, P score Score for the stress component. R score Score the risk items. S score To stabilize the scores of each section.
[0091]
[0092] In the formula: W p The average pressure component weight, avgBHP To represent the average effective pressure at the bottom of the well. targetBHP The target bottom hole effective pressure, W m The lowest pressure component weight, minBHP This represents the minimum effective pressure at the bottom of the well.
[0093]
[0094] In the formula: W r As the risk component weight, R s This is the sand blockage risk index.
[0095]
[0096] In the formula: W s To stabilize the weights of the sub-items, maxWHP The highest wellhead pressure, minWHP Sscore represents the minimum wellhead pressure. Sscore ∈ [0, 0.1].
[0097] Weight structure explanation: In equation (15), the pressure component P score The internal sub-item is divided into two sub-items: average bottom-hole effective pressure and minimum bottom-hole effective pressure (normalization coefficients are 0.5 and 0.25 respectively, see equation (16)). The normalization coefficients for the risk sub-item and the stability sub-item are 0.15 and 0.1 respectively. The sum of the four coefficients is 1, therefore P score +R score +S score ∈[0,1]. After multiplying the right-hand side of Equation (15) by 100, the total fitness F ∈[0,100]. Correspondingly, the target fitness F target The percentage value should be used (95 in the example); the weight W of each item p W m W r W s Multiplying this by the normalized coefficients mentioned above constitutes the final weighting of this item. Each normalized coefficient and its weight W... p W m W r W s The specific values can be determined by the set of correction factors according to the target well, and the calibration does not change the above normalization structure.
[0098] Sand blockage risk index ( R s )calculate: First, use Stokes' theorem to calculate the settling velocity of the proppant in the liquid, and then clamp it to a reasonable range:
[0099] In the formula: v settle m / s r p Propionate particle density (kg / m³) 3 ), d p The diameter of the proppant particles is in meters (m). r f Liquid density (kg / m³) 3 ), m f The value is the dynamic viscosity of the liquid (Pa·s; if the liquid type library gives it in mPa·s, you must first divide it by 1000 to convert it and then substitute it in) (look up the value according to the average temperature of the segment). g The acceleration due to gravity is m / s². 2 The value is 9.81.
[0100] Next, calculate the fluid velocity within the crack corresponding to that slug:
[0101] In the formula: qslug Slug displacement (m) 3 / s), w f , h f The crack width (m) and height (m) are given.
[0102] The basic risk factor is constructed from the ratio of settlement velocity to flow velocity within the crack:
[0103] In the formula: R base The risk factor for sand plugging in the sluice gate is 1 when the ratio exceeds 1.
[0104] Then introduce sand concentration factor k c With viscosity factor k μ The sand concentration factor is the ratio of the sand concentration in this segment to the highest sand concentration; the viscosity factor is determined by segmenting the liquid viscosity.
[0105]
[0106] In the formula: C slug The sand concentration in this section (kg / m³) 3 ), C max The highest sand concentration (kg / m³) 3 ); m f Let be the fluid viscosity, in mPa·s. Multiplying the three factors yields the risk of the sand-containing slug. Then, averaging across all sand-containing slugs and clamping the result to [0,1] gives the individual sand plugging risk index.
[0107] In the formula: N seg The number of sand-bearing plugs. For the first j The risk of blockage in a sand-containing section.
[0108] Note: The sand blockage risk in this step is a simplified fitness component used in the optimization phase. It can be approximated by the Stokes formula to meet the relative comparison of the risk levels of each block combination in offline optimization.
[0109] Penalty Processing (Two-Tier Layered): The constraint processing employs a tiered mechanism of direct elimination for hard constraints and cumulative deductions for soft constraints. Hard constraints are imposed when any of the following exceeds the upper limit of the constraint set: number of slugs, total fluid volume, total proppant dosage, or sand concentration in each slug. In such cases, the individual becomes infeasible, its fitness is set to a minimum (-9999), and it is no longer included in the physical simulation and statistics. Soft constraints are imposed after passing the hard constraints, but deductions are applied when the maximum wellhead pressure or sand blockage risk index exceeds the limit. When the minimum effective bottom pressure or the average effective bottom pressure is less than 10 MPa, deduct... The score is deducted on top of the normal fitness score and is only used for ranking among individuals. This is a penalty coefficient, which can be configured and calibrated according to the target well. Furthermore, when the total construction time exceeds the baseline time (the baseline time is the ratio of total fluid volume to maximum discharge), a soft penalty is applied proportionally to the excess construction time; that is, the fitness is reduced by 8.0 × (actual total time / baseline time). 1); This penalty forces the algorithm to weigh "reducing displacement to reduce friction" against "shortening construction time", and is also only used for ranking between individuals.
[0110] Step S4: Genetic Evolution In each generation of evolution, the following sub-steps S4.1 to S4.6 are performed on the current population whose fitness has been evaluated to generate a new generation of population, such as... Figure 4 As shown; S4.1 Elite Preservation: Select the top-fitness individuals from the current population. k Each individual is directly copied into the next generation of the population to ensure that the optimal solution does not degenerate due to random operations; S4.2 Selection: A tournament selection strategy is adopted to randomly select from the current population. s From each individual, the one with the best fitness is selected as the parent, and this process is repeated until a sufficient number of parent individuals are selected to form a parent pool for reproduction; the preferred value range is s,k∈[3,8].
[0111] S4.3 Crossover (Single-point Crossover): Randomly pair individuals from the parent pool into two groups and then crossover them with a preset probability. P c In each pair of parent slug sequences, a crossover point is randomly selected, and the second half of the slugs after the crossover point is swapped. After the crossover, the volume and time of each slug are recalculated to generate offspring individuals; (Optimal selection) P c The value range is 0.7-0.9.
[0112] S4.4 Mutation: Perform mutation operations on the offspring individuals generated by crossover. Mutation is categorized into three types of random mutations based on the target: liquid type mutation, sand concentration mutation, and segment duration mutation; among them, segment duration mutation can be further subdivided into two operations: displacement mutation and volume transfer mutation between two segments. Mutation is expressed as a single total mutation rate P. m =0.2 trigger, after triggering, select one of the four specific operations with equal probability (1 / 4 each) from the following: liquid type change, sand concentration adjustment, displacement adjustment and volume transfer: (1) Liquid type variation: randomly select any slug in the chromosome, and randomly change it from the preset fracturing fluid type set (including but not limited to slickwater, linear gel and crosslinking fluid) to a liquid different from the current type, so as to perform neighborhood search on discrete decision variables; (2) Sand concentration variation: randomly increase or decrease the sand concentration of the target slug by ±20% and clamp it to the sand concentration constraint range to ensure the controllability of linear search; (3) Displacement variation: randomly increase or decrease the displacement of the target slug by ±20% and clamp it to the upper and lower limits of displacement; (4) Volume transfer variation: transfer the volume between the two slugs at a ratio not exceeding 10% of the current volume of the target slug, and recalculate the duration and displacement of each slug.
[0113] S4.5 Offspring Evaluation: Perform S3 fitness evaluation on each offspring in the set of offspring individuals generated by S4.3 crossover and S4.4 mutation to obtain the corresponding fitness value; Query fitness cache: If a match is found, the cached fitness value is obtained directly, and the complete physical simulation is skipped; the cache key is composed of multiple parameter fields concatenated in a preset order, including at least liquid type, volume and sand concentration, concatenated in the sequence "liquid type:volume:sand concentration|..."; on this basis, if the number of consecutive unimproved generations reaches the early stopping threshold, the simulation is terminated in advance to avoid repeated physical simulations and reduce computational overhead.
[0114] If the cache is not hit, perform a full fitness evaluation (including segmented wellbore temperature and pressure coupling simulation) in step S3 on the offspring to obtain a fitness value, and store the fitness value in association with the cache key.
[0115] S4.6 Population Merging: Merge the set of offspring individuals with the elite retained individuals to form a new generation population.
[0116] Step S5: Convergence judgment (comparison of the global optimal fitness value with the preset target value) and solution output Determine whether the new generation population obtained in step S4 meets the preset convergence condition; if yes, output the best individual in the population as the optimization result; if no, take the new generation population as the current population, repeat the execution of step S3, until the preset stopping condition is met, terminate the iteration and output the optimal block combination and its corresponding construction plan and fitness value; the stopping condition includes at least the generation upper limit being met, no improvement for several consecutive generations, or the target fitness being met.
[0117] The specific steps are as follows: Obtain the operating parameters during the current population iteration process; wherein, the operating parameters include at least the current iteration number, the current number of consecutive stalls, and the current global optimal fitness value; The current iteration number is compared with a preset first threshold, the current number of consecutive stagnations is compared with a preset second threshold, and the current global optimal fitness value is compared with a preset third threshold. If the current iteration count is greater than or equal to the first threshold, the current consecutive stagnation count is greater than or equal to the second threshold, or the current global optimal fitness value is greater than or equal to the third threshold, then the iteration termination condition is met, the iteration is stopped, and the current optimal solution is output. Otherwise, if the iteration termination condition is not met, the iterative evolution operation continues.
[0118] In a specific embodiment, the iteration termination condition employs a triple-determination mechanism to determine whether the stopping condition (convergence, generation limit, or early stopping) is met:
[0119] In the formula: G is the current generation (initialized to 0 by S2, and incremented in each round of evolution); The maximum number of generations (Example 30); The count of consecutive generations without improvement is maintained by S4 (incremented by 1 if the optimal fitness increment in each generation is less than the early stopping threshold, otherwise reset to zero); early stopping threshold example. ); The upper limit of the continuous no-improvement algebra (Example 15); The current optimal fitness; F target The target fitness is set at 95 (for this example). If the stopping condition is not met, the generation number is incremented by 1, and the process returns to S3 to evaluate each individual in the new population, entering the next generation evolutionary cycle. If the stopping condition is met, the slug sequence of the individual with the best fitness is output, including the fluid type, sand concentration, displacement, duration, slug index, volume, start and end time, total fluid volume, total support dosage, minimum effective bottom hole pressure, maximum wellhead pressure, sand blockage risk index, and fitness score for each slug. A construction pumping procedure table, pressure effect analysis, and on-site construction suggestions can also be generated. The output slug sequence is further mapped to the construction side for execution: the simulated wellhead pressure and bottom hole pressure values corresponding to each slug switching point are mapped to the on-site pressure control window; a switching schedule list for the storage tank is generated according to the fluid type switching sequence of the slug sequence; the simulated maximum wellhead pressure is compared with the maximum rated working pressure of the on-site fracturing truck, and when it approaches the rated value, parameter adjustment prompts are given to reduce the maximum displacement or increase the proportion of pre-flush fluid.
[0120] Specifically: First, input the wellbore geometry, formation parameters, and fluid type set for a given well; constraints are set as follows: maximum wellhead pressure 80 MPa, minimum effective bottom hole pressure 30 MPa, target effective bottom hole pressure 60 MPa, and maximum sand concentration 600 kg / m³. 3 Number of slugs [3, 10], Liquid volume [50, 500] m 3 Maximum support dose per segment: 100 tons; maximum sand blockage risk: 0.3. Population size: 20; total number of slugs randomly generated; pre-fluid accounts for 10%-20% of the total fluid volume (slickwater, sand concentration 0%), and displacement fluid accounts for 5%-10% (high density 1800 kg / m³). 3 The crosslinking liquid and sand concentration are 0%, and the sand-carrying liquid accounts for the remaining liquid volume and is divided; the sand concentration of the sand-carrying liquid is determined according to formula (1), which is 0.2Cmax (120 kg / m) of the first section. 3 The Cmax increases linearly to the final stage (600 kg / m³). 3 The relative maximum sand concentration was increased from 20% to 100%; the liquid type was selected according to the relative position, with linear adhesive used in the first stage (relative position < 0.7) and crosslinking liquid used in the second stage. Then, fitness evaluation and genetic evolution were performed to output the optimal slug sequence and construction pumping procedure table.
[0121] Figure 2 The example consists of 8 sections (P1+C1-C6+D1). P1: Sand-free, slippery water; C1: Low-sand linear adhesive; C2: Low-sand linear adhesive; C3: Medium-sand linear adhesive; C4: Medium-sand linear adhesive; C5: High-sand crosslinking liquid; C6: High-sand crosslinking liquid; D1: Sand-free, high-density crosslinking liquid. The sand concentration in each sand-carrying liquid section increases linearly according to relative position (from 20% to 100%), successively taking values of 120, 216, 312, 408, 504, and 600 kg / m³. 3 The sand concentration is categorized by the ratio of the current sand concentration to the highest sand concentration: a ratio less than 0.4 indicates low sand, 0.4 to 0.8 indicates medium sand, and a ratio greater than 0.8 indicates high sand. Therefore, C1 and C2 are low sand (0.2, 0.36), C3 and C4 are medium sand (0.52, 0.68), and C5 and C6 are high sand (0.84, 1.0). The liquid type is selected based on relative position: linear adhesives (C1-C4) are used for sections with a relative position less than 0.7, and crosslinking liquids (C5, C6) are used for sections with a relative position greater than 0.7.
[0122] First, perform hard constraint verification on each slug (number of slugs / total fluid volume / total proppant dosage / maximum proppant dosage per slug / sand concentration in each slug). If the limits are exceeded, set the fitness to -9999. Recalculate slug attributes: allocate construction time according to volume ratio (minimum duration 1 minute), displacement = volume / duration. Create a wellbore temperature-pressure coupling simulator (51 grids) using the first slug fluid, setting the formation thermal diffusivity, thermal conductivity, and wellbore radius, and disabling forced transients. Call the wellbore pressure-temperature model for each slug, outputting the pressure-temperature distribution along the well depth, and taking the bottom / wellhead node pressure as the bottom / wellhead pressure for that slug; for simulation anomalies, use static fluid column estimation as a fallback. Statistics. , , , Calculate the risk of sand blockage and substitute it into the fitness formula and penalty rules.
[0123] For each sand-bearing block, the settlement velocity is calculated according to equation (19). v settle ( r p =2650kg / m 3 、d p = 0.00042m ,m f Take the dynamic viscosity (Pa·s, clamped to not less than 0.001 Pa·s) of the fluid in the slug at the average temperature of the slug, and clamp it to [0.001, 0.5] m / s; the crack width is 0.005 m and the height is 30 m, and calculate the flow velocity in the crack according to formula (20). =Slug displacement / (width × height); According to formula (21), the basic risk of the slug is obtained. R base =min( v settle / v fluid ,1); then multiply by the sand concentration factor (slug sand concentration / maximum sand concentration) and viscosity factor (0.5 for viscosity >50 mPa·s, 0.7 for viscosity >20, otherwise 1.0) according to formula (22) (23) to obtain the slug risk; take the average of all sand-bearing slugs according to formula (24) and clamp [0,1] as the individual sand blockage risk index. R s .
[0124] The tournament size is 5, with 5 elites retained. The crossover probability is 0.8 (single-point crossover, recalculating volume and time after crossover), and the mutation probability is 0.2. Record the number of consecutive generations without improvement; early termination occurs at generation 15, otherwise iteration continues to the maximum generation 30. Generate cache keys for individuals using "liquid type: volume: sand concentration |...", and read fitness directly upon a hit.
[0125] For the optimal sluice block sequence output by S5, perform three construction-side landing mappings: Action 1: Pressure window mapping. Map the simulated wellhead and bottomhole pressure values corresponding to each slug switching point to the field pressure control window. The slug switching boundary serves as the benchmark for the field wellhead pressure reading. Action 2: Storage tank switching scheduling. Generate a storage tank switching scheduling list according to the liquid type switching sequence of the slug sequence. Prepare the sand-carrying fluid storage tank 3 minutes before the end of the pre-flush slug and prepare the displacement fluid storage tank 3 minutes before the end of the last sand-carrying fluid stage. The switching time window corresponds to the slug switching boundary. Action 3: Wellhead equipment upper limit mapping. Compare the highest wellhead pressure obtained from S3 simulation with the highest rated working pressure of the field fracturing truck. If it is close to the rated value, provide a parameter adjustment prompt in the construction suggestion to "reduce the maximum discharge rate or increase the proportion of pre-flush fluid".
[0126] Example 2 like Figure 5 As shown, the present invention also provides a system for implementing the above method. When implemented as a modular system, the system includes: an M1 parameter acquisition unit for reading well geometry, formation, fluid properties and constraint sets from the fracturing design database and fluid type database; an M2 encoding unit for generating slug sequence individuals of the initial population according to the five-tuple and three-segment encoding rules of S2; an M3 fitness evaluation unit embedding an M3-1 well temperature PT coupling simulator (corresponding to the solution of the S35 sub-condition) and an M3-2 secondary penalty module (corresponding to the hard constraint elimination and soft constraint deduction of S36); an M4 genetic evolution unit containing four sub-modules: M4-1 tournament selection, M4-2 single-point crossover, M4-3 mutation, and M4-4 early stop protection, and undertaking the functions of evolution scheduling and convergence monitoring; an M5 fitness caching unit responsible for generating cache keys and retrieving hit values according to "liquid type: volume: sand concentration |..."; and an M6 output unit summarizing the best individuals and outputting the slug sequence, pumping program table, pressure window, reservoir scheduling and equipment limitation prompts. Each unit is connected in series via a shared memory data interface, corresponding to Figure 5 The main process is M1→M2→M3→M4→M6, the child loop feedback is M4→M3, and M5 is M6. M3 cache has bidirectional interaction.
[0127] In addition, the system may optionally include an adaptive parameter correction unit and a construction implementation mapping element. The adaptive parameter correction unit is used to configure and adjust a set of correction factors online using an external parameter file, and to perform online verification of the heat transfer and friction correction coefficients in the wellbore temperature-pressure coupling simulation. The construction implementation mapping element is used to map the optimized output pressure control window, storage tank switching scheduling, and equipment upper limit prompts into on-site executable construction actions. These optional auxiliary units are optional implementations and do not change the core optimization process.
Claims
1. A method for optimizing fracturing fluid slug combinations based on wellbore temperature and pressure simulation, characterized in that, Includes the following steps: S0, Parameter Acquisition: Acquire wellbore parameters, formation parameters, fluid type library, and construction constraints; S1. Slug Sequence Chromosome Encoding: The fracturing slug sequence is chromosomally encoded. The chromosome adopts a "three-slug × five-tuple" encoding structure, where the "three-slug" includes the pre-fluid segment, the proppant-carrying fluid segment, and the displacement fluid segment, and the "five-tuple" is the decision variable contained in each slug, including fluid type, proppant concentration, slug displacement, slug duration, and segment index. S2. Population initialization and constraint verification: An initial population is randomly generated based on the chromosome encoding. Constraint verification is performed on the individuals in the initial population. Individuals that do not meet the construction constraints are removed or are given a penalty value. The generation counter is then initialized. S3. Fitness Evaluation: The fitness of individuals in the current population is evaluated. The fitness evaluation includes: performing hard constraint verification, slug attribute recalculation, construction plan conversion, slug wellbore temperature and pressure coupling iterative solution, convergence judgment and simulation anomaly fallback, ternary fitness normalization and penalty stratification on each individual in sequence to obtain the individual fitness value. The "ternary" refers to the fitness evaluation including pressure evaluation, risk evaluation and stability evaluation. S4. Genetic Evolution: Perform genetic evolution operations on the current population based on fitness values to generate a new generation of population; the genetic evolution operations include at least tournament selection, crossover operation, mutation operation, and elite retention strategy; S5. Termination Judgment and Output: Determine whether the current state meets the preset stopping conditions. The stopping conditions include any one of the following: the target fitness is met, the maximum generation limit is reached, or there is no improvement for several consecutive generations. If the stopping conditions are met, output the best individual in the current population as the optimal block combination and its corresponding construction plan. If the stopping conditions are not met, take the new generation population as the current population, return to step S3, and form an evolutionary cycle.
2. The optimization method according to claim 1, characterized in that, The wellbore geometric parameters mentioned in step S0 include well depth, vertical depth, wellbore inner diameter, and well inclination angle distribution; formation parameters include formation temperature gradient, formation thermal diffusivity, and formation thermal conductivity; the set of available fracturing fluid types includes multiple fracturing fluids; each fracturing fluid includes the following properties: density, viscosity, drag reduction rate, cost, and maximum proppant concentration; the construction parameters include total fluid volume, total proppant dosage, and maximum displacement. The target construction time is derived by dividing the total liquid volume by the maximum discharge rate; Construction constraints must include at least: maximum wellhead pressure, minimum bottomhole effective pressure, target bottomhole effective pressure, maximum sand concentration, upper and lower limits of slug quantity, upper and lower limits of fluid volume, maximum proppant dosage per slug, and maximum sand plugging risk.
3. The optimization method according to claim 1, characterized in that, The segment index is used to mark the temporal position of the segment plug in the chromosome sequence, and it remains consistent with the temporal position of the segment plug during genetic operations without being modified by mutation.
4. The optimization method according to claim 1, characterized in that, The constraint verification in step S2 includes direct constraint verification and derived constraint verification; The direct verification objects include: the number of slugs, the sand concentration of each slug, and the timing arrangement rules of the slug liquid types. The exported constraint verification objects are total liquid volume and total support dose.
5. The optimization method according to claim 1, characterized in that, In step S3, the segment average temperature and segment average pressure are used as indices to retrieve the fluid viscosity, density, and specific heat from the fracturing fluid type library in real time. For sand-bearing sluices, the density, viscosity, and specific heat of the base fluid are weighted and corrected according to the sand volume fraction. For each grid segment, the pressure increment and temperature increment are calculated separately. The pressure increment includes gravity pressure drop and friction pressure drop, and the temperature increment includes frictional heating, gravity-induced heating, and radial heat loss or radial heat gain.
6. The optimization method according to claim 1, characterized in that, In step S3, risk sub-items are set during the fitness evaluation process, and penalties are imposed on individuals that exceed the limits, so as to reduce the sand blockage risk index of the optimization scheme to within the constraint limit. The method for calculating the sand blockage risk index is as follows: calculate the settling velocity of the proppant in the liquid and clamp it to a reasonable range, then calculate the liquid flow velocity in the crack corresponding to the blockage, construct the basic risk factor by the ratio of the settling velocity to the flow velocity in the crack, then introduce the sand concentration factor and viscosity factor, multiply the three factors to obtain the risk of the sand-containing blockage, and then take the average of all sand-containing blockages and clamp it to [0,1]. The technical means of penalizing individuals who exceed the limits is as follows: a two-level hierarchical penalty strategy is adopted, which involves direct elimination of individuals with hard constraints and additional deductions for soft constraints. Hard constraints are judged first, and once triggered, the individual becomes directly infeasible. Individuals that do not trigger hard constraints enter the soft constraint penalty stage. The deduction of soft constraint points is only used for ranking among individuals and does not change their feasibility.
7. The optimization method according to claim 1, characterized in that, In step S3, a cache key is first generated for the slug sequence features. If the value is hit before evaluation, it is read directly to avoid repeated slug-by-slug full-wellbore simulation. The cache key is spliced according to the sequence "liquid type: volume: sand concentration |...".
8. The optimization method according to claim 1, characterized in that, In step S4, the mutation operation is categorized into three types of random mutations based on the target: liquid type mutation, sand concentration mutation, and segment duration mutation. Among them, the segment duration mutation is implemented in two ways: displacement mutation and volume transfer mutation between two segments. The mutation is triggered by a single total mutation rate. After triggering, one of the four specific operations, liquid type change, sand concentration adjustment, displacement adjustment, and volume transfer, is selected with equal probability for execution.
9. A system for implementing the optimization method according to any one of claims 1-8, characterized in that, It includes a parameter acquisition unit, an encoding unit, a fitness evaluation unit, a fitness caching unit, a genetic evolution unit, and an output unit; the genetic evolution unit includes a generation counting module, a convergence monitoring module, an early stopping judgment module, and an evolution scheduling module.
10. A storage medium, characterized in that, It stores a program that, when executed by a processor, implements the steps of the method described in claims 1-8.
