Horizontal Pipeline Flow Velocity Calculation Method, Device, Computer Equipment and Storage Medium
Through resistance tomography and pixel point ratio calculation, the problem of inaccurate flow velocity calculation in traditional electrical tomography technology is solved, and more accurate horizontal pipeline flow velocity measurement is achieved.
Patent Information
- Application Number
- CN202110871058.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-30
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2041-07-30
AI Technical Summary
In traditional multiphase flow detection of pipelines, electrical tomography technology is difficult to strictly meet the "freeze" assumption in actual processes, resulting in inaccuracy in flow velocity calculation.
By obtaining the resistance tomography of the cross-section of the horizontal pipe at the first moment, the pixel point ratio is calculated, and the flow rate proportion coefficient is calculated based on the pixel point ratio of the maximum flow rate and the minimum flow rate, and the flow rate of the horizontal pipe is finally obtained.
This method avoids the problem that the "freeze" assumption cannot be strictly met during the flow rate measurement process, and improves the accuracy of horizontal pipeline flow rate calculation.
Smart Images

Figure CN113724349B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electrical tomography detection, and particularly to a method and device for calculating the flow velocity of a horizontal pipeline, a computer device, a horizontal pipe flow velocity detection system, and a storage medium. Background Art
[0002] Electrical Resistance Tomography (ERT) is an advanced non-destructive visualization detection technology. Compared with other existing detection methods, this technology has the advantages of fast response speed, non-invasive, and economically obtaining two-dimensional / three-dimensional distribution parameter information, and has been widely used in many fields.
[0003] In the detection of traditional pipeline multiphase flow, the electrical tomography technology uses two rows of parallel electrode arrays perpendicular to the pipeline axis as the upstream sensor and the downstream sensor to perform high-time-resolution data acquisition and calculate the flow velocity through the relevant velocity measurement principle. That is, the upstream sensor and the downstream sensor with a distance of L are used to obtain the corresponding upstream measurement value sequence and downstream measurement value sequence respectively, and the transit time t of the multiphase flow between the upstream sensor and the downstream sensor is calculated through the correlation between the upstream measurement value sequence and the downstream measurement value sequence, so as to calculate the flow velocity V. The above flow velocity measurement method must satisfy the "frozen" hypothesis of relevant velocity measurement: that is, the phase fraction and particle distribution of the solid-phase target on any cross-section from one row of electrodes to the other row are unchanged. However, in the actual process of flow velocity measurement, the "frozen" hypothesis cannot be strictly satisfied, which leads to the inability to ensure the accuracy of the calculated flow velocity. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a method and device for calculating the flow velocity of a horizontal pipeline, a computer device, a horizontal pipe flow velocity detection system, and a storage medium, which can accurately calculate the flow velocity of the horizontal pipeline.
[0005] In a first aspect, a method for calculating the flow velocity of a horizontal pipeline is provided, and the method includes:
[0006] Obtain the electrical resistance tomography image of the cross-section of the horizontal pipeline at the first moment;
[0007] Calculate the pixel point ratio at the first moment according to the electrical resistance tomography image; the pixel point ratio refers to the ratio of the total number of target pixel points in the first target area to the total number of target pixel points in the second target area; the first target area refers to the area above the target boundary in the electrical resistance tomography image; the second target area refers to the area below the target boundary in the electrical resistance tomography image; the target boundary is any horizontal line in the electrical resistance tomography image; the target pixel point refers to the pixel point in the electrical resistance tomography image whose gray value is greater than the gray threshold;
[0008] Calculate according to the pixel ratio, maximum flow velocity pixel point ratio, and minimum flow velocity pixel point ratio at the first moment to obtain a flow velocity ratio coefficient; the maximum flow velocity pixel point ratio refers to the pixel point ratio at the corresponding moment when the flow velocity of the horizontal pipeline is the maximum flow velocity; the minimum flow velocity pixel point ratio refers to the pixel point ratio at the corresponding moment when the flow velocity of the horizontal pipeline is the minimum flow velocity; the flow velocity ratio coefficient refers to the proportion of the flow velocity of the horizontal pipeline at the first moment in the target difference; the target difference refers to the difference between the maximum flow velocity and the minimum flow velocity;
[0009] Calculate according to the flow velocity ratio coefficient, maximum flow velocity, and minimum flow velocity to obtain the flow velocity of the horizontal pipeline at the first moment.
[0010] In one embodiment, the gray threshold is the median or average of the gray values of all pixel points in electrical resistance tomography.
[0011] In one embodiment, the step of calculating the pixel point ratio at the first moment according to electrical resistance tomography includes:
[0012] Calculate the pixel point ratio at the first moment based on the following expression:
[0013]
[0014] where Index(n,t) is the pixel point ratio at the first moment; |SU(n,t)| is the total number of target pixel points in the first target area; SU(n,t) is the set of target pixel points in the first target area; |SD(n,t)| is the total number of target pixel points in the second target area; SD(n,t) is the set of target pixel points in the second target area; n is the target pixel point; t is the first moment; t min is the corresponding moment when the flow velocity of the horizontal pipeline is the minimum flow velocity; t max is the corresponding moment when the flow velocity of the horizontal pipeline is the maximum flow velocity.
[0015] In one embodiment, the step of calculating the flow velocity ratio coefficient according to the pixel ratio, maximum flow velocity pixel point ratio, and minimum flow velocity pixel point ratio at the first moment includes:
[0016] Calculate the flow velocity ratio coefficient based on the following expression:
[0017]
[0018] where k(n,t) is the flow velocity ratio coefficient; Index(n,t) is the pixel point ratio at the first moment; Index(n,t max ) is the maximum flow velocity pixel point ratio; Index(n,t min ) is the minimum flow velocity pixel point ratio; n is the target pixel point; t is the first moment.
[0019] In one embodiment, the step of calculating the flow velocity of the horizontal pipeline at the first moment according to the flow velocity proportionality coefficient, the maximum flow velocity, and the minimum flow velocity includes:
[0020] Calculating the flow velocity at the first moment based on the following expression:
[0021] v = k(n,t) × (v max - v min ) + v min
[0022] where v is the flow velocity at the first moment; k(n,t) is the flow velocity proportionality coefficient; v max is the maximum flow velocity; v min is the minimum flow velocity.
[0023] In a second aspect, a horizontal pipeline flow velocity calculation device is provided. The device includes an imaging acquisition module, a ratio calculation module, a coefficient calculation module, and a flow velocity calculation module.
[0024] Among them, the imaging acquisition module is used to acquire the electrical resistance tomography of the cross-section of the horizontal pipeline at the first moment. The ratio calculation module is used to calculate the pixel point ratio at the first moment according to the electrical resistance tomography; the pixel point ratio refers to the ratio of the total number of target pixel points in the first target area to the total number of target pixel points in the second target area; the first target area refers to the area above the target boundary in the electrical resistance tomography; the second target area refers to the area below the target boundary in the electrical resistance tomography; the target boundary is any horizontal line in the electrical resistance tomography; the target pixel point refers to the pixel point with a gray value greater than the gray threshold in the electrical resistance tomography. The coefficient calculation module is used to calculate according to the pixel ratio at the first moment, the maximum flow velocity pixel point ratio, and the minimum flow velocity pixel point ratio to obtain the flow velocity proportionality coefficient; the maximum flow velocity pixel point ratio refers to the pixel point ratio at the corresponding moment when the flow velocity of the horizontal pipeline is the maximum flow velocity; the minimum flow velocity pixel point ratio refers to the pixel point ratio at the corresponding moment when the flow velocity of the horizontal pipeline is the minimum flow velocity; the flow velocity proportionality coefficient refers to the proportion of the flow velocity of the horizontal pipeline at the first moment in the target difference; the target difference is the difference between the maximum flow velocity and the minimum flow velocity. The flow velocity calculation module is used to calculate according to the flow velocity proportionality coefficient, the maximum flow velocity, and the minimum flow velocity to obtain the flow velocity of the horizontal pipeline at the first moment.
[0025] In a third aspect, a computer device is provided. The device includes a memory and a processor. Among them, the memory stores a computer program, and when the memory executes the computer program, the steps in the above method embodiments are implemented.
[0026] Fourthly, a horizontal pipe flow velocity detection system is provided. The system includes a single-row electrode array and a processing device. The single-row electrode array is disposed on the cross-section of the horizontal pipe and electrically connected to the processing device, and is used to collect the voltage of the cross-section of the horizontal pipe at the first moment and output a voltage measurement value sequence; the processing device is used to receive the voltage measurement value sequence output by the single-row electrode array, process the voltage measurement value sequence according to the electrical tomography algorithm, and generate a resistance tomography image; the processing device is also used to implement the steps of any one of the above method embodiments.
[0027] In one embodiment, the processing device includes a data acquisition control device and a host computer; the data acquisition control device is connected to the host computer; wherein, the data acquisition control device is connected to the single-row electrode array, and is used to receive the voltage measurement value sequence output by the single-row electrode array, process the voltage measurement value sequence according to the electrical tomography algorithm, and generate a resistance tomography image; the host computer includes a memory and a processor; the memory stores a computer program; when the processor executes the computer program, the steps of any one of the above method embodiments are implemented.
[0028] Fifthly, a computer-readable storage medium is provided. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the above method embodiments are implemented.
[0029] The above horizontal pipe flow velocity calculation method, device, computer device, horizontal pipe flow velocity detection system and storage medium obtain the resistance tomography image of the cross-section of the horizontal pipe at the first moment; then, calculate the pixel point ratio at the first moment according to the resistance tomography image; then, calculate according to the pixel ratio at the first moment, the maximum flow velocity pixel point ratio and the minimum flow velocity pixel point ratio to obtain the flow velocity ratio coefficient; finally, calculate according to the flow velocity ratio coefficient, the maximum flow velocity and the minimum flow velocity to obtain the flow velocity of the horizontal pipe at the first moment, thus avoiding the problem that the "frozen" assumption cannot be strictly satisfied in the actual process of flow velocity measurement, and improving the accuracy of the calculated flow velocity of the horizontal pipe. Description of the Drawings
[0030] Figure 1 It is a schematic flowchart of the horizontal pipe flow velocity calculation method in one embodiment;
[0031] Figure 2 It is a schematic diagram of the resistance tomography image in a specific example;
[0032] Figure 3 It is a structural block diagram of the horizontal pipe flow velocity calculation device in one embodiment;
[0033] Figure 4 It is an internal structure diagram of a computer device in one embodiment;
[0034] Figure 5 is the first structural block diagram of the horizontal pipe flow velocity detection system in an embodiment;
[0035] Figure 6 is the second structural block diagram of the horizontal pipe flow velocity detection system in an embodiment. Specific Embodiments
[0036] In order to make the objectives, technical solutions, and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0037] In one embodiment, as Figure 1 shown, a method for calculating the flow velocity of a horizontal pipe is provided. In this embodiment, the application of this method to a computer device is taken as an example for illustration. In this embodiment, the method includes the following steps 102 to 108.
[0038] Step 102, obtain the electrical resistance tomography of the cross-section of the horizontal pipe at the first moment.
[0039] Among them, the horizontal pipe refers to a pipe whose axis is parallel to the horizontal plane, and the first moment can be any moment.
[0040] Step 104, calculate the pixel point ratio at the first moment according to the electrical resistance tomography.
[0041] Among them, the pixel point ratio refers to the ratio of the total number of target pixel points in the first target area to the total number of target pixel points in the second target area. The first target area refers to the area above the target boundary in the electrical resistance tomography, and the second target area refers to the area below the target boundary in the electrical resistance tomography. The target boundary can be any horizontal line in the electrical resistance tomography. The target pixel points refer to the pixel points in the electrical resistance tomography whose gray value is greater than the gray threshold. In one embodiment, the target boundary can be, but is not limited to, a horizontal line passing through the center of the electrical resistance tomography.
[0042] According to the obtained electrical resistance tomography of the cross-section of the horizontal pipe at the first moment, by counting the total number of target pixel points in the first target area and the total number of target pixel points in the second target area, the ratio of the total number of target pixel points in the first target area to the total number of target pixel points in the second target area, that is, the pixel point ratio at the first moment, can be calculated.
[0043] In a specific example, as Figure 2As shown, electrical resistance tomography can be divided into n pixel points according to the radius of the electrical resistance tomography, and the pixel points with gray values greater than a preset gray threshold in the electrical resistance tomography are determined as target pixel points. That is to say, the pixel points with gray values less than the preset gray threshold in the electrical resistance tomography can be determined as non-target pixel points. Then, the horizontal line passing through the center of the electrical resistance tomography is determined as the target boundary, and the electrical resistance tomography can be divided into two regions. Among them, the region above the target boundary in the electrical resistance tomography can be determined as the first target region, and the region below the target boundary in the electrical resistance tomography can be determined as the second target region; then, by counting the total number of target pixel points in the first target region and the total number of target pixel points in the second target region; finally, calculating the ratio of the total number of target pixel points in the first target region to the total number of target pixel points in the second target region, the pixel point ratio can be obtained. The above is only a specific example, and it can be flexibly set according to requirements in actual applications, and no restrictions are imposed here.
[0044] In one embodiment, the steps of calculating the pixel point ratio at the first moment according to the electrical resistance tomography include:
[0045] Calculating the pixel point ratio at the first moment based on the following expression:
[0046]
[0047] where Index(n,t) is the pixel point ratio at the first moment; |SU(n,t)| is the total number of target pixel points in the first target region; SU(n,t) is the set of target pixel points in the first target region; |SD(n,t)| is the total number of target pixel points in the second target region; SD(n,t) is the set of target pixel points in the second target region; n is the target pixel point; t is the first moment.
[0048] In a specific example, assume that the two-phase flow in the horizontal pipeline is gas-liquid flow, and the maximum liquid content in the gas-liquid flow does not exceed 0.5. Also, the horizontal line passing through the center of the electrical resistance tomography is determined as the target boundary. The obtained electrical resistance tomography can be divided into n pixel points according to the radius of the electrical resistance tomography. Thus, it can be found that the gray value of the pixel point where the liquid is located in the electrical resistance tomography is greater than the preset gray threshold. Therefore, the pixel point where the liquid is located in the electrical resistance tomography is the target pixel point; the gray value of the pixel point where the gas is located in the electrical resistance tomography is less than the preset gray threshold. Therefore, the pixel point where the gas is located in the electrical resistance tomography is the non-target pixel point. When the flow rate of the horizontal pipeline is 0, the gas in the horizontal pipeline will float above the liquid. Thus, the total number |SU(n,t)| of target pixel points in the first target area in the electrical resistance tomography at this time is 0. Therefore, Index(n,t) at this time is 0. When the flow rate of the horizontal pipeline is the maximum flow rate, the gas and liquid in the horizontal pipeline will be fully mixed, so that the gas and liquid are evenly distributed in the cross-section of the horizontal pipeline. Therefore, the pixel point ratio Index(n,t) at this time is 1. Therefore, through the above example, it can be concluded that when the two-phase flow in the horizontal pipeline is gas-liquid flow, the flow rate of the horizontal pipeline and the pixel point ratio Index(n,t) are positively correlated. The above is only a specific example, and it can be flexibly set according to requirements in actual applications, which is not limited here.
[0049] In a specific example, assume that the two-phase flow in the horizontal pipeline is a solid-liquid flow. At the same time, the maximum solid content rate in the solid-liquid flow does not exceed 0.5, and the horizontal line passing through the center of the electrical resistance tomography is determined as the target boundary. The obtained electrical resistance tomography can be divided into n pixel points according to the radius of the electrical resistance tomography. Thus, it can be found that the gray value of the pixel point where the solid is located in the electrical resistance tomography is greater than the preset gray threshold. Therefore, the pixel point where the solid is located in the electrical resistance tomography is the target pixel point; the gray value of the pixel point where the liquid is located in the electrical resistance tomography is less than the preset gray threshold. Therefore, the pixel point where the liquid is located in the electrical resistance tomography is the non-target pixel point. When the flow rate in the horizontal pipeline is 0, due to the action of gravity and viscous force in the horizontal pipeline, the solid in the horizontal pipeline will be below the liquid and will not cross the target boundary. Thus, the total number |SU(n,t)| of target pixel points in the first target area in the electrical resistance tomography at this time is 0, so Index(n,t) at this time is 0. When the flow rate in the horizontal pipeline is the maximum flow rate, the solid in the horizontal pipeline will be in a floating state and fully mixed with the liquid, so that the solid and the liquid are evenly distributed in the cross-section of the horizontal pipeline. Therefore, the pixel point ratio Index(n,t) at this time is 1. Therefore, through the above example, it can be concluded that when the two-phase flow in the horizontal pipeline is a solid-liquid flow, the flow rate of the horizontal pipeline and the pixel point ratio Index(n,t) are positively correlated. The above is only a specific example, and it can be flexibly set according to requirements in actual applications, which will not be limited here.
[0050] Step 106, calculate according to the pixel ratio at the first moment, the pixel point ratio at the maximum flow rate, and the pixel point ratio at the minimum flow rate to obtain the flow rate ratio coefficient.
[0051] Among them, the pixel point ratio at the maximum flow rate refers to the pixel point ratio at the corresponding moment when the flow rate of the horizontal pipeline is the maximum flow rate; the pixel point ratio at the minimum flow rate refers to the pixel point ratio at the corresponding moment when the flow rate of the horizontal pipeline is the minimum flow rate; the flow rate ratio coefficient refers to the proportion of the flow rate of the horizontal pipeline at the first moment in the target difference; the target difference refers to the difference between the maximum flow rate and the minimum flow rate.
[0052] In a specific example, the pixel point ratio at the maximum flow rate, the pixel point ratio at the minimum flow rate, the maximum flow rate, and the minimum flow rate can be but not limited to being set accordingly according to engineering practice experience; the above is only a specific example, and it can be flexibly set according to requirements in actual applications, which will not be limited here.
[0053] Calculate according to the pixel point ratio at the first moment calculated from the electrical resistance tomography, the preset pixel point ratio at the maximum flow rate, and the preset pixel point ratio at the minimum flow rate, and the flow rate ratio coefficient can be obtained.
[0054] In one embodiment, the step of calculating the flow velocity proportionality coefficient according to the pixel ratio, the maximum flow velocity pixel point ratio, and the minimum flow velocity pixel point ratio at the first moment includes:
[0055] Calculating the flow velocity proportionality coefficient based on the following expression:
[0056]
[0057] where k(n,t) is the flow velocity proportionality coefficient; Index(n,t) is the pixel point ratio at the first moment; Index(n,t max ) is the maximum flow velocity pixel point ratio; Index(n,t min ) is the minimum flow velocity pixel point ratio; n is the target pixel point; t is the first moment; t min is the corresponding moment when the flow velocity of the horizontal pipeline is the minimum flow velocity; t max is the corresponding moment when the flow velocity of the horizontal pipeline is the maximum flow velocity.
[0058] Considering the different design requirements in different application scenarios, in one embodiment, a monotonically increasing function f(·) is introduced, and the monotonically increasing function f(·) is a function of the pixel point ratio Index(n,t) at the first moment;
[0059] Calculating the flow velocity proportionality coefficient based on the following expression:
[0060]
[0061] where k(n,t) is the flow velocity proportionality coefficient; Index(n,t) is the pixel point ratio at the first moment; Index(n,t max ) is the maximum flow velocity pixel point ratio; Index(n,t min ) is the minimum flow velocity pixel point ratio; n is the target pixel point; t is the first moment; t min is the corresponding moment when the flow velocity of the horizontal pipeline is the minimum flow velocity; t max is the corresponding moment when the flow velocity of the horizontal pipeline is the maximum flow velocity.
[0062] Those skilled in the art can select a reasonable monotonic function f(·) according to the design requirements in the actual application scenario, and use the monotonic function f(·) to correct the pixel point ratio at the first moment for the calculation of the flow velocity proportionality coefficient k(n,t), so as to improve the calculation accuracy of the flow velocity proportionality coefficient k(n,t) in the specific application scenario.
[0063] Step 108, calculating the flow velocity of the horizontal pipeline at the first moment according to the flow velocity proportionality coefficient, the maximum flow velocity, and the minimum flow velocity.
[0064] By calculating according to the pixel ratio, maximum flow velocity pixel point ratio, and minimum flow velocity pixel point ratio at the first moment, a flow velocity ratio coefficient is obtained; then, based on the flow velocity ratio coefficient, the preset maximum flow velocity, and the preset minimum flow velocity, the flow velocity of the horizontal pipe at the first moment can be obtained.
[0065] In one embodiment, the step of calculating the flow velocity of the horizontal pipe at the first moment according to the flow velocity ratio coefficient, maximum flow velocity, and minimum flow velocity includes:
[0066] Calculating the flow velocity at the first moment based on the following expression:
[0067] v = k(n,t) × (v max - v min ) + v min
[0068] where v is the flow velocity at the first moment; k(n,t) is the flow velocity ratio coefficient; v max is the maximum flow velocity; v min is the minimum flow velocity.
[0069] Based on this, obtaining the electrical resistance tomography of the cross-section of the horizontal pipe at the first moment; then, calculating the pixel point ratio at the first moment according to the electrical resistance tomography; next, calculating according to the pixel ratio, maximum flow velocity pixel point ratio, and minimum flow velocity pixel point ratio at the first moment to obtain the flow velocity ratio coefficient; finally, calculating according to the flow velocity ratio coefficient, maximum flow velocity, and minimum flow velocity to obtain the flow velocity of the horizontal pipe at the first moment, thus avoiding the problem that the "frozen" assumption cannot be strictly satisfied in the actual process of flow velocity measurement and improving the accuracy of the calculated flow velocity of the horizontal pipe.
[0070] In one embodiment, the gray scale threshold is the median or average value of the gray scale values of all pixel points in the electrical resistance tomography.
[0071] By sorting the gray scale values of all pixel points in the electrical resistance tomography of the cross-section of the horizontal pipe at the first moment, the median of the gray scale values of all pixel points in this electrical resistance tomography can be obtained; by calculating the gray scale values of all pixel points in the electrical resistance tomography of the cross-section of the horizontal pipe at the first moment, the average value of the gray scale values of all pixel points in the electrical resistance tomography can be obtained; then the gray scale threshold can be obtained as the median or average value of the gray scale values of all pixel points in the electrical resistance tomography. Therefore, by using the median or average value of the gray scale values of all pixel points in the electrical resistance tomography as the gray scale threshold compared with the preset gray scale threshold, the accuracy of selecting target pixel points in specific application scenarios is improved, and thus the accuracy of the pixel point ratio, flow velocity ratio coefficient, and flow velocity at the first moment is also improved.
[0072] It should be understood that although Figure 1 each step in the flowchart is shown in sequence according to the indication of the arrow, these steps are not necessarily executed in sequence according to the order indicated by the arrow. Unless there is a clear indication in this article, there is no strict order limit for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 at least a part of the steps in
[0073] In one embodiment, as Figure 3 shown, a horizontal pipeline flow velocity calculation device is provided, and the device includes an imaging acquisition module 410, a ratio calculation module 420, a coefficient calculation module 430, and a flow velocity calculation module 440.
[0074] Among them, the imaging acquisition module 410 is used to acquire the electrical resistance tomography of the cross-section of the horizontal pipeline at the first moment. The ratio calculation module 420 is used to calculate the pixel ratio at the first moment according to the electrical resistance tomography; the pixel ratio refers to the ratio of the total number of target pixels in the first target area to the total number of target pixels in the second target area; the first target area refers to the area above the target boundary in the electrical resistance tomography; the second target area refers to the area below the target boundary in the electrical resistance tomography; the target boundary is any horizontal line in the electrical resistance tomography; the target pixel is a pixel with a gray value greater than the gray threshold in the electrical resistance tomography. The coefficient calculation module 430 is used to calculate based on the pixel ratio, the maximum flow velocity pixel ratio, and the minimum flow velocity pixel ratio at the first moment to obtain a flow velocity ratio coefficient; the maximum flow velocity pixel ratio refers to the pixel ratio at the corresponding moment when the flow velocity of the horizontal pipeline is the maximum flow velocity; the minimum flow velocity pixel ratio refers to the pixel ratio at the corresponding moment when the flow velocity of the horizontal pipeline is the minimum flow velocity; the flow velocity ratio coefficient refers to the proportion of the flow velocity of the horizontal pipeline at the first moment in the target difference; the target difference refers to the difference between the maximum flow velocity and the minimum flow velocity. The flow velocity calculation module 440 is used to calculate based on the flow velocity ratio coefficient, the maximum flow velocity, and the minimum flow velocity to obtain the flow velocity of the horizontal pipeline at the first moment.
[0075] In one of the embodiments, the ratio calculation module 420 includes a ratio calculation unit. Among them, the ratio calculation unit is used to calculate the pixel ratio at the first moment based on the following expression:
[0076]
[0077] Among them, Index(n,t) is the pixel point ratio at the first moment; |SU(n,t)| is the total number of target pixel points in the first target area; SU(n,t) is the set of target pixel points in the first target area; |SD(n,t)| is the total number of target pixel points in the second target area; SD(n,t) is the set of target pixel points in the second target area; n is the target pixel point; t is the first moment.
[0078] In one embodiment, the coefficient calculation module 430 further includes a coefficient calculation unit. Among them, the coefficient calculation unit is used to calculate the flow velocity ratio coefficient based on the following expression:
[0079]
[0080] Among them, k(n,t) is the flow velocity ratio coefficient; Index(n,t) is the pixel point ratio at the first moment; Index(n,t max ) is the maximum flow velocity pixel point ratio; Index(n,t min ) is the minimum flow velocity pixel point ratio; n is the target pixel point; t is the first moment; t min is the corresponding moment when the flow velocity of the horizontal pipeline is the minimum flow velocity; t max is the corresponding moment when the flow velocity of the horizontal pipeline is the maximum flow velocity.
[0081] In one embodiment, the flow velocity calculation module 440 includes a flow velocity calculation unit. Among them, the flow velocity calculation unit is used to calculate the flow velocity at the first moment based on the following expression:
[0082] v = k(n,t) × (v max - v min ) + v min
[0083] Among them, v is the flow velocity at the first moment; k(n,t) is the flow velocity ratio coefficient; v max is the maximum flow velocity; v min is the minimum flow velocity.
[0084] For the specific limitations of the horizontal pipeline flow velocity calculation device, reference can be made to the limitations of the horizontal pipeline flow velocity calculation method in the above text, which will not be elaborated here. Each module in the above horizontal pipeline flow velocity calculation device can be implemented in whole or in part by software, hardware and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0085] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 4As shown in the figure. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner, and the wireless manner can be implemented through WIFI, carrier network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a method for calculating the flow velocity of a horizontal pipeline. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0086] Those skilled in the art can understand that Figure 4 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0087] In one embodiment, a computer device is provided, which includes a memory and a processor. Among them, the memory stores a computer program, and when the memory executes the computer program, the steps in the above method embodiments are implemented.
[0088] In one embodiment, as Figure 5 shown in the figure, the system includes a single-row electrode array 710 and a processing device 720.
[0089] Among them, the single-row electrode array 710 is arranged on the cross-section of the horizontal pipeline, electrically connected to the processing device 720, and is used to collect the voltage of the cross-section of the horizontal pipeline at the first moment and output a voltage measurement value sequence.
[0090] The processing device 720 is used to receive the voltage measurement value sequence output by the single-row electrode array 710, process the voltage measurement value sequence according to the electrical tomography algorithm, and generate an electrical resistance tomography; the processing device 720 is also used to implement the steps of any of the above method embodiments.
[0091] In one of the embodiments, as Figure 6 shown in the figure, the processing device 720 includes a data acquisition control device 721 and a host computer 722. The data acquisition control device 721 is connected to the host computer 722.
[0092] Among them, the data acquisition control device 721 is connected to the single-row electrode array 710, and is used to receive the voltage measurement value sequence output by the single-row electrode array 710, process the voltage measurement value sequence according to the electrical tomography algorithm, and generate a resistance tomography image; the host computer 722 includes a memory and a processor; the memory stores a computer program; when the processor executes the computer program, the steps of any of the above method embodiments are implemented.
[0093] In this embodiment, the single-row electrode array 710 is used to collect the voltage of the cross-section of the horizontal pipeline at the first moment and output the voltage measurement value sequence to the processing device 720. Then, the processing device 720 processes the above voltage measurement value sequence according to the electrical tomography algorithm to generate a resistance tomography image of the cross-section of the pipeline at the first moment; moreover, according to the horizontal pipeline flow velocity calculation method in the above method embodiments, the flow velocity at the first moment can be accurately calculated. Therefore, this horizontal pipe flow velocity detection system not only avoids the problem that the "frozen" assumption cannot be strictly satisfied in the actual process of flow velocity measurement, improves the accuracy of the calculated flow velocity of the horizontal pipeline; moreover, there is no need to set two rows of parallel electrode arrays perpendicular to the pipeline axis on the cross-section of the horizontal pipeline as the upstream sensor and the downstream sensor, reducing the overall cost of the horizontal pipe flow velocity detection system.
[0094] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above method embodiments are implemented.
[0095] Those of ordinary skill in the art can understand that all or part of the processes of implementing the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, storage, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0096] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0097] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A method for calculating the flow velocity of a horizontal pipeline, characterized in that, the method includes: obtaining the electrical resistance tomography of the cross-section of the horizontal pipeline at the first moment; calculating the pixel point ratio at the first moment according to the electrical resistance tomography; the pixel point ratio refers to the ratio of the total number of target pixel points in the first target area to the total number of the target pixel points in the second target area; the first target area refers to the area above the target boundary in the electrical resistance tomography; the second target area refers to the area below the target boundary in the electrical resistance tomography; the target boundary is any horizontal line in the electrical resistance tomography; the target pixel point refers to the pixel point in the electrical resistance tomography with a gray value greater than the gray threshold; the step of calculating the pixel point ratio at the first moment according to the electrical resistance tomography includes: calculating the pixel point ratio at the first moment based on the following expression: where Index(n,t) is the pixel point ratio at the first moment; |SU(n,t)| is the total number of target pixel points in the first target area; SU(n,t) is the set of target pixel points in the first target area; |SD(n,t)| is the total number of the target pixel points in the second target area; SD(n,t) is the set of target pixel points in the second target area; n is the target pixel point; t is the first moment; calculating according to the pixel ratio at the first moment, the maximum flow velocity pixel point ratio and the minimum flow velocity pixel point ratio to obtain a flow velocity ratio coefficient; the maximum flow velocity pixel point ratio refers to the pixel point ratio at the corresponding moment when the flow velocity of the horizontal pipeline is the maximum flow velocity; the minimum flow velocity pixel point ratio refers to the pixel point ratio at the corresponding moment when the flow velocity of the horizontal pipeline is the minimum flow velocity; the flow velocity ratio coefficient refers to the proportion of the flow velocity of the horizontal pipeline at the first moment in the target difference; the target difference refers to the difference between the maximum flow velocity and the minimum flow velocity; the step of calculating according to the pixel ratio at the first moment, the maximum flow velocity pixel point ratio and the minimum flow velocity pixel point ratio to obtain a flow velocity ratio coefficient includes: calculating the flow velocity ratio coefficient based on the following expression: where k(n,t) is the flow velocity proportionality coefficient; Index(n,t) is the pixel point ratio at the first moment; Index(n,t max ) is the maximum flow velocity pixel point ratio; Index(n,t min ) is the minimum flow velocity pixel point ratio; n is the target pixel point; t is the first moment; t min is the corresponding moment when the flow velocity of the horizontal pipeline is the minimum flow velocity; t max is the corresponding moment when the flow velocity of the horizontal pipeline is the maximum flow velocity; calculating according to the flow velocity ratio coefficient, the maximum flow velocity and the minimum flow velocity to obtain the flow velocity of the horizontal pipeline at the first moment; the step of calculating according to the flow velocity ratio coefficient, the maximum flow velocity and the minimum flow velocity to obtain the flow velocity of the horizontal pipeline at the first moment includes: calculating the flow velocity at the first moment based on the following expression: v = k(n,t)×(v max - v min ) + v min wherein, v is the flow velocity at the first moment; k(n,t) is the flow velocity proportionality coefficient; v max is the maximum flow velocity; v min is the minimum flow velocity.
2. The method according to claim 1, characterized in that, the gray threshold is the median or average value of the gray values of all pixel points in the electrical resistance tomography.
3. A device for calculating the flow velocity of a horizontal pipeline, characterized in that, the device includes: an imaging acquisition module for obtaining the electrical resistance tomography of the cross-section of the horizontal pipeline at the first moment; A ratio calculation module is used to calculate the pixel point ratio at the first moment according to the electrical resistance tomography imaging; the pixel point ratio refers to the ratio of the total number of target pixel points in the first target area to the total number of the target pixel points in the second target area; the first target area refers to the area above the target boundary in the electrical resistance tomography imaging; the second target area refers to the area below the target boundary in the electrical resistance tomography imaging; the target boundary is any horizontal line in the electrical resistance tomography imaging; the target pixel points refer to the pixel points in the electrical resistance tomography imaging whose gray values are greater than the gray threshold; the step of calculating the pixel point ratio at the first moment according to the electrical resistance tomography imaging includes: calculating the pixel point ratio at the first moment based on the following expression: where Index(n,t) is the pixel point ratio at the first moment; |SU(n,t)| is the total number of target pixel points in the first target area; SU(n,t) is the set of target pixel points in the first target area; |SD(n,t)| is the total number of the target pixel points in the second target area; SD(n,t) is the set of target pixel points in the second target area; n is the target pixel point; t is the first moment; A coefficient calculation module is used to calculate, according to the pixel ratio at the first moment, the maximum flow velocity pixel point ratio and the minimum flow velocity pixel point ratio, to obtain a flow velocity ratio coefficient; the maximum flow velocity pixel point ratio refers to the pixel point ratio at the corresponding moment when the flow velocity of the horizontal pipeline is the maximum flow velocity; the minimum flow velocity pixel point ratio refers to the pixel point ratio at the corresponding moment when the flow velocity of the horizontal pipeline is the minimum flow velocity; the flow velocity ratio coefficient refers to the proportion of the flow velocity of the horizontal pipeline at the first moment in the target difference; the target difference refers to the difference between the maximum flow velocity and the minimum flow velocity; the step of calculating, according to the pixel ratio at the first moment, the maximum flow velocity pixel point ratio and the minimum flow velocity pixel point ratio, to obtain the flow velocity ratio coefficient includes: calculating the flow velocity ratio coefficient based on the following expression: where k(n,t) is the flow velocity proportionality coefficient; Index(n,t) is the pixel point ratio at the first moment; Index(n,t max ) is the maximum flow velocity pixel point ratio; Index(n,t min ) is the minimum flow velocity pixel point ratio; n is the target pixel point; t is the first moment; t min is the corresponding moment when the flow velocity of the horizontal pipeline is the minimum flow velocity; t max is the corresponding moment when the flow velocity of the horizontal pipeline is the maximum flow velocity; A flow velocity calculation module is used to calculate, according to the flow velocity ratio coefficient, the maximum flow velocity and the minimum flow velocity, to obtain the flow velocity of the horizontal pipeline at the first moment; the step of calculating, according to the flow velocity ratio coefficient, the maximum flow velocity and the minimum flow velocity, to obtain the flow velocity of the horizontal pipeline at the first moment includes: calculating the flow velocity at the first moment based on the following expression: v = k(n,t)×(v max - v min ) + v min wherein, v is the flow velocity at the first moment; k(n,t) is the flow velocity proportionality coefficient; v max is the maximum flow velocity; v min is the minimum flow velocity.
4. A computer device, including a memory and a processor, where the memory stores a computer program, characterized in that, when the processor executes the computer program, the steps of the method according to claim 1 or 2 are implemented.
5. A horizontal pipe flow velocity detection system, characterized in that, the system includes a single-row electrode array and a processing device; the single-row electrode array is arranged on the cross-section of the horizontal pipeline, is electrically connected to the processing device, and is used to collect the voltage of the cross-section of the horizontal pipeline at the first moment and output a voltage measurement value sequence; The processing device is used to receive the sequence of voltage measurement values output by the single-row electrode array, process the sequence of voltage measurement values according to the electrical tomography algorithm, and generate an electrical resistance tomography; the processing device is also used to implement the steps of the method according to claim 1 or 2.
6. The horizontal pipe flow velocity detection system according to claim 5, wherein, the processing device includes a data acquisition control device and a host computer; the data acquisition control device is connected to the host computer; the data acquisition control device is connected to the single-row electrode array, and is used to receive the sequence of voltage measurement values output by the single-row electrode array, process the sequence of voltage measurement values according to the electrical tomography algorithm, and generate an electrical resistance tomography; the host computer includes a memory and a processor; the memory stores a computer program; when the processor executes the computer program, the steps of the method according to claim 1 or 2 are implemented.
7. A computer-readable storage medium, on which a computer program is stored, wherein, when the computer program is executed by a processor, the steps of the method according to claim 1 or 2 are implemented.
Citation Information
Patent Citations
Gas-liquid two-phase measurement method and device based on electrical resistance tomography technology
CN106323365A
Method and system for testing flow of homogeneous gas-liquid mixed two-phase flow based on ERT
CN110108331A