Underground acoustic attenuation model construction method based on random forest machine learning algorithm
By combining finite element simulation and random forest machine learning algorithm, a downhole acoustic attenuation model was established, which solved the nonlinear problem of the description of acoustic transmission characteristics by downhole tubing parameters, and realized efficient and fast prediction and optimization design.
Patent Information
- Application Number
- CN202511652079.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-02-10
AI Technical Summary
Existing technologies cannot accurately and quickly describe the complex nonlinear relationship between downhole tubing parameters and acoustic transmission characteristics, and they consume huge computational resources, making it difficult to support rapid iterative design and real-time optimization.
By combining finite element simulation with random forest machine learning algorithm, a downhole acoustic attenuation model is established. Hyperparameters are optimized using Latin hypercube sampling and grid search, and a prediction model is constructed to accurately describe the nonlinear relationship between tubing structure parameters and acoustic transmission characteristics, thereby reducing computational resource consumption.
It achieves high-precision prediction of downhole acoustic transmission characteristics, shortens the analysis cycle, provides lightweight tools to support rapid iterative design and real-time optimization, and reduces computational resource consumption.
Smart Images

Figure CN121503133A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of model building technology, and in particular to a method for building a downhole acoustic attenuation model based on the random forest machine learning algorithm. Background Technology
[0002] In oilfield development, accurate knowledge of downhole operating parameters (including temperature and pressure) is crucial for drilling operations. The drilling process requires real-time transmission of downhole information to the surface, allowing surface personnel to assess the downhole conditions and guide subsequent drilling work. Therefore, measurement-while-drilling (MWD) technology and information transmission have become key technologies in drilling operations, and downhole information transmission methods have consistently been a research hotspot in the petroleum engineering field. Acoustic transmission, as an important downhole information transmission method, is of great significance for system design and optimization due to its accurate prediction of transmission characteristics.
[0003] Currently, the finite element method (FEM) simulation-based analysis of bottom hole acoustic transmission characteristics is the mainstream technical solution in this field. This method studies the transmission characteristics of sound waves in wellbore structures through computer simulation. Its implementation steps include: establishing a downhole tubing system model using 3D modeling software; importing the 3D model into finite element analysis software and setting relevant parameters; performing a series of independent simulation calculations by changing a structural parameter one by one within a set range with a fixed step size; extracting the sound pressure level-frequency curve at the receiving point; and determining the optimal transmission frequency and sound pressure level by manually observing the peak value of the curve, thereby analyzing the influence of a single parameter on the acoustic transmission characteristics of the downhole tubing system. However, existing technologies have the following drawbacks: First, existing methods can only provide simulation results at discrete parameter points. Due to the strong nonlinearity and complex coupling relationship between the influence of tubing parameters on acoustic transmission characteristics, methods based on single-variable analysis and linear interpolation cannot accurately and continuously describe the transmission characteristics throughout the entire parameter space, resulting in significant deviations between the predicted results and actual complex working conditions. Second, existing methods use single-variable parameter scanning for simulation, changing only one parameter while keeping others fixed each time. Systematically studying the comprehensive influence of multiple parameters on transmission characteristics requires a large number of independent simulation calculations, consuming huge computational resources and having a long analysis cycle, making it difficult to apply quickly and economically to the design and real-time optimization of different wellbore structures in engineering practice. Third, existing technologies are essentially simulation-analysis processes rather than model-prediction systems. For new combinations of structural parameters, simulation calculations must be performed again, making it impossible to use as a lightweight tool to quickly respond to the performance prediction needs of different design schemes, thus limiting its application potential in rapid iterative design and field applications.
[0004] Therefore, there is an urgent need for a method to construct a downhole acoustic attenuation model based on the random forest machine learning algorithm. Summary of the Invention
[0005] This invention provides a method for constructing a downhole acoustic attenuation model based on a random forest machine learning algorithm to solve the aforementioned problems in the prior art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: A method for constructing a downhole acoustic attenuation model based on a random forest machine learning algorithm includes: S1: Establish a three-dimensional model of the downhole tubing system and convert it into a two-dimensional axisymmetric simulation geometric model. The three-dimensional model includes tubing, base pipe, casing, packer, reducer coupling, and acoustic generator. S2: Based on the simulation geometric model, set the physical field parameters, material properties, mesh parameters, boundary conditions and sound source excitation of acoustic-structure coupling, perform parametric scanning simulation for multiple structural parameters, and generate a simulation dataset containing sound pressure level and frequency data; S3: Based on the simulation dataset, sample points are extracted using Latin hypercube sampling and standardized, and then divided into training dataset and test dataset. S4: Based on the training dataset, a model is built using the random forest algorithm and hyperparameters are optimized through grid search to generate a downhole acoustic attenuation prediction model.
[0007] Furthermore, step S1 includes: S11: Use 3D modeling software to create a 3D model of the downhole tubing system, including tubing, base pipe, casing, packer, reducer coupling, and acoustic generator. Simplify the 3D model into a straight pipe structure to generate a simplified 3D model. S12: Based on a simplified three-dimensional model, a two-dimensional axisymmetric spatial dimension is used to construct a simulation geometric model for geometric modeling of the packer, variable diameter coupling, and acoustic wave generator.
[0008] Furthermore, step S2 includes: S21: Based on the simulation geometric model, the acoustic-structure coupling module is set up, using pressure acoustic physics field in the liquid domain and solid mechanical physics field in the solid domain to generate physics field configuration; S22: Define the material properties of each domain based on the physical field configuration, divide the mesh according to the acoustic wavelength constraint, set axisymmetric boundaries, plane wave radiation boundaries, free boundaries and fixed constraint boundaries, configure acoustic source excitation, and generate an executable simulation model; S23: Based on the executable simulation model, select the distance between the variable diameter coupling and the acoustic generator, the wall thickness of the base pipe, and the distance between the packer and the acoustic generator as variable parameters. Perform scanning simulation within the range of each parameter value, extract the sound pressure level-frequency curve corresponding to each parameter combination, and generate a simulation dataset.
[0009] Furthermore, step S3 includes: S31: Based on the simulation dataset, determine the input and output variables, and use the Latin hypercube sampling method to extract multiple sample points from the range of input variable values as a sample set; S32: Based on the sample set, use the standardization method to preprocess the feature values, convert the feature values into a standard normal distribution with a mean of zero and a standard deviation of one, and generate a standardized sample set; S33: Based on the standardized sample set, divide it into training dataset and test dataset according to the training-test ratio.
[0010] Furthermore, in step S11: The 3D model is simplified to a straight pipe structure, ignoring pipe curvature. The simplified 3D model selects a special downhole structural section that includes packers, variable diameter couplings, and acoustic generators, as well as their corresponding spatial relationships.
[0011] Furthermore, in step S22: The material property definition includes setting the material of the tubing interior to a gas-water compound and defining the sound velocity and density parameters; setting the medium of the gap between the tubing, base pipe, casing, coupling, packer and sound generator to water; and setting the metal structure of the tubing string to structural steel.
[0012] Furthermore, in step S22: The grid is divided according to the acoustic wavelength constraint, with the grid size not exceeding one-tenth of the wavelength corresponding to the highest frequency in the study frequency range; The sound source excitation is the axial acceleration excitation of the sound wave generator.
[0013] Furthermore, in step S23: The scanning simulation performs multiple independent simulations for each variable parameter within its value range at a fixed step size. Each simulation extracts the corresponding sound pressure level-frequency curve and determines the optimal transmission frequency and the corresponding sound pressure level value.
[0014] Furthermore, in step S31: Input variables include the distance between the variable diameter coupling and the sound wave generator, the distance between the packer and the sound wave generator, and the sound source frequency; output variables include the total sound pressure level at the location of the sound wave generator and the total sound pressure level at the top of the base pipe. The distance between the variable diameter coupling and the sound wave generator ranges from 3 to 16 meters, the distance between the packer and the sound wave generator ranges from 3 to 18 meters, and the sound source frequency ranges from 20 to 2000 Hz.
[0015] Furthermore, in step S4: Hyperparameters include the number of decision trees in the random forest, the maximum depth of a single decision tree, the minimum number of samples required for node splitting, and the minimum number of samples required for leaf nodes; Grid search traverses multiple hyperparameter combinations within the hyperparameter value space and evaluates prediction performance, selecting the hyperparameter combination with the best prediction performance; In the optimal combination of hyperparameters, the number of decision trees is 100, the maximum depth is 5, the minimum number of samples for node splits is 3, and the minimum number of samples for leaf nodes is 2.
[0016] Compared with the prior art, the present invention has the following advantages: This invention combines finite element simulation with random forest machine learning algorithms. By intelligently learning from simulation data, a predictive model is established, accurately describing the complex nonlinear relationship between tubing structure parameters and acoustic transmission characteristics. This solves the problem of large prediction errors caused by traditional methods based on discrete parameter points and linear interpolation. The Latin hypercube sampling method is used to extract sample points for model training, eliminating the need for re-simulation calculations for each new parameter combination. This transforms the traditional "simulation-analysis" process into a "model-prediction" system, significantly reducing computational resource consumption, shortening the analysis cycle, and improving application efficiency in engineering practice. By optimizing the hyperparameters of the random forest model using a grid search method, the established predictive model can quickly respond to the performance prediction needs of different wellbore structure design schemes, providing a lightweight tool for rapid iterative design and real-time optimization of downhole acoustic transmission systems.
[0017] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention.
[0018] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0019] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a method for constructing a downhole acoustic attenuation model based on a random forest machine learning algorithm, as described in an embodiment of the present invention. Figure 1 ; Figure 2 This is an implementation flow of a downhole acoustic attenuation model construction method based on the random forest machine learning algorithm in an embodiment of the present invention. Figure 2 ; Figure 3 This is a simplified three-dimensional model of bottom hole acoustic transmission in this embodiment of the invention; Figure 4 This is the simulation geometric model in the embodiments of the present invention; Figure 5 This is a sound pressure level comparison curve when the distance between the variable diameter coupling and the sound wave generator is 4m in an embodiment of the present invention; Figure 6 This illustrates the effect of the distance between the variable-diameter coupling and the acoustic wave generator on the acoustic transmission characteristics in this embodiment of the invention. Figure 7 This illustrates the effect of the base tube wall thickness on acoustic transmission characteristics in an embodiment of the present invention. Figure 8 This illustrates the effect of the distance between the packer and the acoustic wave generator on the acoustic transmission characteristics in this embodiment of the invention. Figure 9 The prediction performance and error curve of Model 1 in this embodiment of the invention are shown. Figure 10 The image shows the prediction performance and error curve of Model 2 in this embodiment of the invention. Detailed Implementation
[0020] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0021] The embodiments of the present invention provide, as follows Figure 1 The method for constructing a downhole acoustic attenuation model based on the random forest machine learning algorithm, as shown, includes: S1: Establish a three-dimensional model of the downhole tubing system and convert it into a two-dimensional axisymmetric simulation geometric model. The three-dimensional model includes tubing, base pipe 4, casing 2, packer 6, reducer coupling 5, and acoustic generator 7. S2: Based on the simulation geometric model, set the physical field parameters, material properties, mesh parameters, boundary conditions and sound source excitation of acoustic-structure coupling, perform parametric scanning simulation for multiple structural parameters, and generate a simulation dataset containing sound pressure level and frequency data; S3: Based on the simulation dataset, sample points are extracted using Latin hypercube sampling and standardized, and then divided into training dataset and test dataset. S4: Based on the training dataset, a model is built using the random forest algorithm and hyperparameters are optimized through grid search to generate a downhole acoustic attenuation prediction model.
[0022] The following is a detailed description with reference to specific embodiments.
[0023] The implementation flowchart of this technical solution is as follows: Figure 2As shown, a 3D model is created using 3D CAD design software (SolidWorks) → the 3D model is imported into multiphysics simulation software (COMSOL) → the material, mesh generation, boundary conditions, and sound source are set using multiphysics simulation software (COMSOL) → parametric scanning analysis is performed to analyze the influence of the distance between the variable diameter coupling 5 and the acoustic generator 7 on the optimal transmission frequency, the influence of the wall thickness of the base pipe 4 on the optimal transmission frequency, and the influence of the distance between the packer 6 and the acoustic generator 7 on the optimal transmission frequency → the relationship between the bottom hole acoustic transmission characteristics and the tubing structure parameters is obtained → a downhole acoustic attenuation model is established using the random forest method → the model is identified.
[0024] Specifically, the following steps are included: S1: Establish a three-dimensional model of the downhole tubing system and convert it into a two-dimensional axisymmetric simulation geometric model; S11: Use 3D modeling software to create a 3D model of the downhole tubing system, including tubing, base pipe 4, casing 2, packer 6, reducer coupling 5, and sonic generator 7. Simplify the 3D model into a straight pipe structure to generate a simplified 3D model.
[0025] Specifically, a 3D model of the pipeline is created based on SolidWorks, such as... Figure 3 As shown. Tubing 1 has a specification of 3-1 / 2 inch (outer diameter 88.9mm, inner diameter 76mm), and tubing 2 has a specification of 2-3 / 8 inch (outer diameter 60.3mm, inner diameter 50.7mm). Tubing 1 and tubing 2 are connected by a reducing coupling 5. The outer ring of the tubing is the base pipe 4, which has a specification of 5-1 / 2 inch (outer diameter 139.7mm, inner diameter 121mm). The outer ring of the base pipe 4 is the sleeve 2, which has a specification of 9-5 / 8 inch (outer diameter 244.5mm, inner diameter 220.5mm). The packer 6 has an outer diameter of 177.8mm, an inner diameter of 121mm, and a length of 2.1m. The packer is mounted on the 9-5 / 8 inch sleeve 2. The acoustic generator 7 is installed on the outer diameter of the base pipe 4, with an outer diameter of 150mm, an inner diameter of 139.7mm, and a length of 1m. The installation position of the acoustic generator 7 is 15m below the packer 6. Water fills the space between the casing 2 and the base pipe 4, and between the base pipe 4 and the tubing; the tubing is filled with a uniform gas-water compound. The 3D model is simplified to a straight pipe structure, ignoring pipe curvature. Since the overall length of the pipe is much greater than its radial dimension, the pipe is treated as a straight pipe during modeling, ignoring its curvature. Normal tubing lengths are over 1000m; direct modeling would involve large computational loads and reduced accuracy. Therefore, during modeling, only the downhole sections with special structures are analyzed. The simplified 3D model selects a downhole special structure section containing the packer 6, the variable diameter coupling 5, and the acoustic generator 7, along with their corresponding spatial relationships. This section, with a total length of 19m, includes all necessary structures and can accurately obtain the transmission characteristics of acoustic waves in the downhole sections with special structures.
[0026] S12: Based on the simplified three-dimensional model, a simulation geometric model is constructed using a two-dimensional axisymmetric spatial dimension to perform geometric modeling of packer 6, variable diameter coupling 5 and acoustic wave generator 7.
[0027] Specifically, since the tubing system under study is a typical axisymmetric model, the geometric model space selected for COMSOL modeling is two-dimensional axisymmetric. Based on the dimensions of the acoustic wave transmission test device in short-distance tubing, a 1:1 two-dimensional axisymmetric model was constructed. Physical modeling was performed on the packer 6, the reducing coupling 5, and the acoustic wave generator 7, resulting in the simulation geometric model as follows: Figure 4 As shown, Figure (a) is the upper part of the model (packer 6, variable diameter coupling 5), and Figure (b) is the lower part of the model (sound wave generator 7).
[0028] S2: Based on the simulation geometric model, set the acoustic-structure interaction physical field parameters, material properties, mesh parameters, boundary conditions, and sound source excitation. Perform parametric scanning simulation for multiple structural parameters to generate a simulation dataset containing sound pressure level and frequency data. S21: Based on the simulation geometric model, the acoustic-structure coupling module is set up, using pressure acoustic physics field in the liquid domain and solid mechanical physics field in the solid domain to generate the physics field configuration.
[0029] Specifically, when setting up the physical field, pressure acoustics is used in liquids and solid mechanics is used in structural steel. The acoustic-structure coupling module in COMSOL Multiphysics is used to study the entire content.
[0030] S22: Define the material properties of each domain based on the physical field configuration, divide the mesh according to the acoustic wavelength constraint, set axisymmetric boundaries, plane wave radiation boundaries, free boundaries and fixed constraint boundaries, configure the acoustic source excitation, and generate an executable simulation model.
[0031] (1) Definition of material properties In the geometric model constructed using software, material properties need to be defined for all domains. The material property definitions include setting the material of the tubing domain to a gas-water compound and defining the sound velocity and density parameters, specifically a sound velocity of 1400 m / s and a density of 950 kg / m³; setting the medium of the gap domain between the tubing, base pipe 4, casing 2, coupling, packer, and sound generator 7 to water; and setting the metal structure domain of the tubing string to structural steel.
[0032] (2) Grid division The mesh was created based on the acoustic wavelength constraint, with the mesh size not exceeding one-tenth of the wavelength corresponding to the highest frequency within the study frequency range. During mesh generation, the mesh size should be less than or equal to one-tenth of the acoustic wavelength to ensure the capture of acoustic details. The frequency range of this study is 20Hz-2000Hz; the maximum value was selected for calculation, resulting in a maximum mesh size of 0.075m. Mesh mapping was used to adapt to the requirements of the overall model. The model contains 118,800 solid elements and 121,227 vertices.
[0033] (3) Boundary condition settings Set axisymmetric boundaries, plane wave radiation boundaries, free boundaries, and fixed constraint boundaries. Specifically, set the left boundary of the gas-water compound inside the tubing as an axisymmetric boundary condition; set the upper and lower boundaries of the fluid in the pipeline as plane wave radiation; set the upper and lower boundaries of the tubing, base pipe 4, and casing 2 as free boundary conditions; and set the outside of casing 2 as a fixed constraint.
[0034] (4) Sound source excitation configuration The sound source excitation is the axial acceleration excitation of the sound wave generator 7. In the finite element software, the sound wave generator 7 is set to have an acceleration of 1 m / s² in the Z direction.
[0035] S23: Based on the executable simulation model, select the distance between the variable diameter coupling 5 and the acoustic generator 7, the wall thickness of the base pipe 4, and the distance between the packer 6 and the acoustic generator 7 as variable parameters. Perform scanning simulation within the range of each parameter value, extract the sound pressure level-frequency curve corresponding to each parameter combination, and generate a simulation dataset.
[0036] Consider the influence of the following structural parameters on the optimal transmission frequency: the distance between the variable diameter coupling 5 and the acoustic generator 7, the wall thickness of the base pipe 4, and the distance between the packer 6 and the acoustic generator 7.
[0037] The scanning simulation performs multiple independent simulations for each variable parameter within its value range at a fixed step size. Each simulation extracts the corresponding sound pressure level-frequency curve and determines the optimal transmission frequency and the corresponding sound pressure level value.
[0038] Through parametric scanning analysis, the influence of various structural parameters on the sound pressure level and optimal transmission frequency was obtained. For example, Figure 5 The typical sound pressure level-frequency curves are shown when the distance between the variable diameter coupling 5 and the sound wave generator 7 is 4m. Using the same method, the corresponding sound pressure level-frequency curves for distances of 6m, 8m, 10m, 12m, 14m, and 16m are obtained. The optimal transmission frequency and the corresponding maximum sound pressure level at each distance are identified. Based on this, the influence of the distance between the variable diameter coupling 5 and the sound wave generator 7 on the acoustic transmission characteristics is obtained. Figure 6As shown. Using the same method, the effects of the wall thickness of the base tube 4 on the acoustic transmission characteristics and the effects of the distance between the packer 6 and the sound wave generator 7 on the acoustic transmission characteristics were obtained, as follows: Figure 7 and Figure 8 As shown.
[0039] Comprehensive analysis of all simulation results shows that the distance between the variable diameter coupling 5 and the acoustic generator 7, as well as the distance between the packer 6 and the acoustic generator 7, have a significant impact on the downhole acoustic transmission characteristics, and the pattern exhibits strong nonlinearity; while the influence of the wall thickness of the base pipe 4 is relatively small.
[0040] S3: Based on the simulation dataset, sample points are extracted using Latin hypercube sampling and standardized, then divided into training and testing datasets. S31: Based on the simulation dataset, determine the input and output variables, and use the Latin hypercube sampling method to extract multiple sample points from the range of input variable values as a sample set.
[0041] The input variables include the distance between the variable diameter coupling 5 and the sound wave generator 7, the distance between the packer 6 and the sound wave generator 7, and the sound source frequency; the output variables include the total sound pressure level at the location of the sound wave generator 7 and the total sound pressure level at the top of the base pipe 4.
[0042] The range of parameter values is shown in Table 1.
[0043] Table 1. Range of Model Parameter Values
[0044] Batch processing scanning was used for parametric simulation, and the parameter variation intervals were set as shown in Table 1. The Latin hypercube sampling method was used to extract 2000 sample points from the distances between the variable diameter coupling 5 and the acoustic generator 7, the distances between the packer 6 and the acoustic generator 7, and the range of sound source frequencies.
[0045] S32: Based on the sample set, use the standardization method to preprocess the feature values, convert the feature values into a standard normal distribution with a mean of zero and a standard deviation of one, and generate a standardized sample set.
[0046] The standardization method is used to transform the eigenvalues into a standard normal distribution with a mean of 0 and a standard deviation of 1.
[0047] S33: Based on the standardized sample set, divide it into training dataset and test dataset according to the training-test ratio.
[0048] After standardization, the dataset is divided into a training set and a test set, with a ratio of 80% and 20%.
[0049] S4: Based on the training dataset, a model is built using the random forest algorithm, and hyperparameters are optimized through grid search to generate a downhole acoustic attenuation prediction model. Hyperparameters include the number of decision trees in the random forest, the maximum depth of a single decision tree, the minimum number of samples required for node splitting, and the minimum number of samples required for leaf nodes.
[0050] Build an initial model and use a grid search method to tune the hyperparameters. The hyperparameters include n_estimators (the number of trees in the forest), max_depth (the maximum depth of a tree), min_samples_split (the minimum number of samples required to split an internal node), and min_samples_leaf (the minimum number of samples required to split a leaf node).
[0051] Grid search traverses multiple hyperparameter combinations within the hyperparameter value space and evaluates their prediction performance, selecting the combination with the best prediction performance. In the optimal hyperparameter combination, the number of decision trees is 100, the maximum depth is 5, the minimum number of samples required for node splits is 3, and the minimum number of samples required for leaf nodes is 2. That is: n_estimators=100; max_depth=5; min_samples_split=3; min_samples_leaf=2.
[0052] Model evaluation: 1) Model 1 (Predicting the total sound pressure level at the location of sound generator 7) The comparison graph and error curve between the predicted and actual values of Model 1 are shown below. Figure 9 As shown.
[0053] in Figure 9 Figure (a) in the figure is a comparison between the predicted and actual values. As can be seen from Figure (a), the predicted value of the total sound pressure level at position 7 of the sound wave generator is very close to the actual value, with a prediction accuracy of 94.148%.
[0054] in Figure 9 Figure (b) in the figure shows the error curve. As can be seen from Figure (b), the prediction error of the total sound pressure level at position 7 of the sound wave generator is within 15, and the prediction error of the model is relatively low.
[0055] 2) Model 2 (predicting the total sound pressure level at the top of the base tube 4) The comparison graph and error curve between the predicted and actual values of Model 2 are shown below. Figure 10 As shown.
[0056] in Figure 10Figure (a) in the figure is a comparison between the predicted value and the actual value. As can be seen from Figure (a), the predicted value of the total sound pressure level at the top of the base tube 4 is very close to the actual value, with a prediction accuracy of 95.307%.
[0057] in Figure 10 Figure (b) in the figure shows the error curve. It can be seen from Figure (b) that the prediction error of the total sound pressure level at the top of the base tube 4 is mostly within 10 except for a very few points, and the prediction effect of the model is good.
[0058] In summary, the downhole acoustic attenuation model based on the random forest machine learning algorithm constructed in this invention can accurately reveal the complex nonlinear relationship between downhole tubing parameters and acoustic transmission characteristics, and has high prediction accuracy.
[0059] Through the above embodiments, the present invention has the following technical advantages: First, it can accurately capture the complex nonlinear relationships between downhole tubing parameters and acoustic transmission characteristics, exhibiting high prediction accuracy and strong generalization ability. Since random forest, as a powerful ensemble learning algorithm, excels at handling nonlinear relationships and interaction effects between high-dimensional features, and this invention utilizes Latin hypercube sampling to obtain a sufficient number of sample points covering the entire parameter space for training, the established model can deeply learn the complex coupling mechanisms between multiple structural parameters and acoustic characteristics. This results in relatively high prediction accuracy, and its predictive ability is continuous and universal, reliably applicable to new parameter combinations not directly covered by the training data, solving the problem of insufficient predictive ability in traditional methods.
[0060] Secondly, it significantly improves analysis efficiency and substantially reduces computational resource consumption and time costs. Because the random forest model constructed in this invention becomes a highly efficient prediction tool after a single training iteration, when predicting the acoustic characteristics of new pipe column structure parameters, there is no need for repeated finite element simulations; simply inputting the parameters into the model yields rapid prediction results. This replaces the "simulation-analysis" loop in engineering design with a "model-prediction" loop, thus greatly improving analysis efficiency, significantly accelerating the design optimization process, and substantially reducing computational resource consumption and time costs.
[0061] Third, it provides a lightweight, reusable, and general-purpose prediction tool, facilitating rapid decision-making. Given that the final output of this invention is a lightweight, deployable prediction model, rather than a repetitive and cumbersome simulation process, users can quickly evaluate the acoustic transmission performance of different design schemes anytime, anywhere. This fundamentally changes the previous working mode that heavily relied on simulation experts and computing resources, making the optimization design of acoustic wave transmission systems faster and simpler, and providing technical support for the promotion and application of this technology.
[0062] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from the spirit and scope of this invention.
Claims
1. A method for constructing a downhole acoustic attenuation model based on a random forest machine learning algorithm, characterized in that, include: S1: Establish a three-dimensional model of the downhole tubing system and convert it into a two-dimensional axisymmetric simulation geometric model. The three-dimensional model includes tubing, base pipe, casing, packer, reducer coupling, and acoustic generator. S2: Based on the simulation geometric model, set the physical field parameters, material properties, mesh parameters, boundary conditions and sound source excitation of acoustic-structure coupling, perform parametric scanning simulation for multiple structural parameters, and generate a simulation dataset containing sound pressure level and frequency data; S3: Based on the simulation dataset, sample points are extracted using Latin hypercube sampling and standardized, and then divided into training dataset and test dataset. S4: Based on the training dataset, a model is built using the random forest algorithm and hyperparameters are optimized through grid search to generate a downhole acoustic attenuation prediction model.
2. The method for constructing a downhole acoustic attenuation model based on a random forest machine learning algorithm according to claim 1, characterized in that, Step S1 includes: S11: Use 3D modeling software to create a 3D model of the downhole tubing system, including tubing, base pipe, casing, packer, reducer coupling, and acoustic generator. Simplify the 3D model into a straight pipe structure to generate a simplified 3D model. S12: Based on a simplified three-dimensional model, a two-dimensional axisymmetric spatial dimension is used to construct a simulation geometric model for geometric modeling of the packer, variable diameter coupling, and acoustic wave generator.
3. The method for constructing a downhole acoustic attenuation model based on a random forest machine learning algorithm according to claim 1, characterized in that, Step S2 includes: S21: Based on the simulation geometric model, the acoustic-structure coupling module is set up, using pressure acoustic physics field in the liquid domain and solid mechanical physics field in the solid domain to generate physics field configuration; S22: Define the material properties of each domain based on the physical field configuration, divide the mesh according to the acoustic wavelength constraint, set axisymmetric boundaries, plane wave radiation boundaries, free boundaries and fixed constraint boundaries, configure acoustic source excitation, and generate an executable simulation model; S23: Based on the executable simulation model, select the distance between the variable diameter coupling and the acoustic generator, the wall thickness of the base pipe, and the distance between the packer and the acoustic generator as variable parameters. Perform scanning simulation within the range of each parameter value, extract the sound pressure level-frequency curve corresponding to each parameter combination, and generate a simulation dataset.
4. The method for constructing a downhole acoustic attenuation model based on the random forest machine learning algorithm according to claim 1, characterized in that, Step S3 includes: S31: Based on the simulation dataset, determine the input and output variables, and use the Latin hypercube sampling method to extract multiple sample points from the range of input variable values as a sample set; S32: Based on the sample set, use the standardization method to preprocess the feature values, convert the feature values into a standard normal distribution with a mean of zero and a standard deviation of one, and generate a standardized sample set; S33: Based on the standardized sample set, divide it into training dataset and test dataset according to the training-test ratio.
5. The method for constructing a downhole acoustic attenuation model based on the random forest machine learning algorithm according to claim 2, characterized in that, In step S11: The 3D model is simplified to a straight pipe structure, ignoring pipe curvature. The simplified 3D model selects a special downhole structural section that includes packers, variable diameter couplings, and acoustic generators, as well as their corresponding spatial relationships.
6. The method for constructing a downhole acoustic attenuation model based on the random forest machine learning algorithm according to claim 3, characterized in that, In step S22: The material property definition includes setting the material of the tubing interior to a gas-water compound and defining the sound velocity and density parameters; setting the medium of the gap between the tubing, base pipe, casing, coupling, packer and sound generator to water; and setting the metal structure of the tubing string to structural steel.
7. The method for constructing a downhole acoustic attenuation model based on a random forest machine learning algorithm according to claim 3, characterized in that, In step S22: The grid is divided according to the acoustic wavelength constraint, with the grid size not exceeding one-tenth of the wavelength corresponding to the highest frequency in the study frequency range; The sound source excitation is the axial acceleration excitation of the sound wave generator.
8. The method for constructing a downhole acoustic attenuation model based on the random forest machine learning algorithm according to claim 3, characterized in that, In step S23: The scanning simulation performs multiple independent simulations for each variable parameter within its value range at a fixed step size. Each simulation extracts the corresponding sound pressure level-frequency curve and determines the optimal transmission frequency and the corresponding sound pressure level value.
9. The method for constructing a downhole acoustic attenuation model based on the random forest machine learning algorithm according to claim 4, characterized in that, In step S31: Input variables include the distance between the variable diameter coupling and the sound wave generator, the distance between the packer and the sound wave generator, and the sound source frequency; output variables include the total sound pressure level at the location of the sound wave generator and the total sound pressure level at the top of the base pipe. The distance between the variable diameter coupling and the sound wave generator ranges from 3 to 16 meters, the distance between the packer and the sound wave generator ranges from 3 to 18 meters, and the sound source frequency ranges from 20 to 2000 Hz.
10. The method for constructing a downhole acoustic attenuation model based on a random forest machine learning algorithm according to claim 1, characterized in that, In step S4: Hyperparameters include the number of decision trees in the random forest, the maximum depth of a single decision tree, the minimum number of samples required for node splitting, and the minimum number of samples required for leaf nodes; Grid search traverses multiple hyperparameter combinations within the hyperparameter value space and evaluates prediction performance, selecting the hyperparameter combination with the best prediction performance; In the optimal combination of hyperparameters, the number of decision trees is 100, the maximum depth is 5, the minimum number of samples for node splits is 3, and the minimum number of samples for leaf nodes is 2.