A method, system, device and medium for measuring fluid viscosity based on capillary drop method
By using capillary decreasing method and image processing technology in the method of measuring liquid viscosity in the capillary method, the problems of low efficiency and poor accuracy of the existing methods are solved, and high-precision and real-time monitoring of fluid viscosity measurement is achieved.
Patent Information
- Application Number
- CN202210326449.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-03-30
AI Technical Summary
The existing capillary method for measuring liquid viscosity is inefficient and has poor accuracy, and is inconvenient for long-term readings, so it cannot be monitored in real time.
Using a capillary descent method, the liquid surface and tiles are accurately identified, the flow time is calculated and the fluid viscosity is calculated through image acquisition and processing, including weighted pixelation processing, discrete Fourier transform frequency domain identification method, Kalman filtering and histogram adaptive processing.
It improves the accuracy and efficiency of fluid viscosity calculation, breaks away from human eye measurement errors, and realizes the convenience of real-time monitoring and long-term reading.
Smart Images

Figure CN114742775B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a capillary fluid viscosity testing method, and specifically to a method, system, device and medium for measuring fluid viscosity based on a capillary drop method. Background Art
[0002] Viscosity is one of the important physical properties and technical indicators of liquids. The accurate measurement of viscosity is of great significance in industrial applications and scientific research fields such as aviation, petrochemicals, and medicine. Liquid viscosity usually refers to the viscosity inside a single-phase liquid, that is, the internal friction exhibited when the liquid flows. Due to the effect of viscosity, objects will be subject to friction resistance and pressure difference resistance when moving in the fluid, resulting in loss of mechanical energy.
[0003] At present, the capillary method for measuring liquid viscosity generally adopts a method of placing the capillary horizontally, measuring the pressure difference at both ends of the capillary cross section, and calculating by reading the numerical value transformation by naked eye. The calculated viscosity result is inefficient and has poor accuracy. It is also not convenient for long-term reading and cannot perform real-time monitoring and reading of data. Summary of the invention
[0004] In view of the problems existing in the prior art, the present invention provides a method, system, device and medium for measuring fluid viscosity based on the capillary drop method. By optimizing measurement image acquisition and processing and time calculation processing, the system is free from human eye measurement errors and can identify the viscosity of the flow fluid more accurately.
[0005] The present invention is achieved through the following technical solutions:
[0006] A method for measuring fluid viscosity based on capillary drop method, characterized in that it comprises the following steps:
[0007] The image is pixelated based on the weighted method to obtain a grayscale image, and the grayscale image is processed to obtain a binary matrix containing the liquid surface and the engraved line features;
[0008] The binary matrix is coherently accumulated in two dimensions, and the accumulated matrix is divided into a liquid surface characteristic matrix and a scale line characteristic matrix by discrete Fourier transform frequency domain identification method, and the corresponding coordinates of the liquid surface and scale line are obtained;
[0009] The scale line coordinates are subjected to differential algorithm, and Kalman filtering is used to obtain the scale line width and scale line spacing. The histogram adaptive processing is used to achieve accurate scale line identification, and the actual position of the liquid surface is obtained by matching the liquid surface coordinates with the scale coefficient according to the scale coefficient between pixels and distance.
[0010] The flow time is calculated based on the actual position of the liquid surface to be measured in the capillary tube, and the image of the liquid flowing from the top of the capillary section to the bottom is used. The viscosity of the fluid is calculated based on the flow time and flow velocity formula.
[0011] Furthermore, the liquid level and engraved line feature binary matrix is obtained by processing the grayscale image based on the gradient filtering principle and Kirchhoff transformation.
[0012] Furthermore, the proportionality coefficient between the pixel and the distance is calculated by confirming the position of the scribed line according to the scribed line spacing and the scribed line width.
[0013] Furthermore, when calculating the viscosity of the fluid, it is necessary to calculate the gravity acting on the fluid in the capillary:
[0014]
[0015] Wherein, V represents the volume of the capillary filled with the liquid to be tested, L represents the length in the capillary, which is also the length of the liquid to be tested in the capillary, r is the radial distance from the center of the capillary cross section, ρ represents the density of the liquid to be tested, and g is the acceleration due to gravity.
[0016] Furthermore, when calculating the viscosity of the fluid, it is necessary to calculate the resistance of the fluid in the capillary:
[0017]
[0018] Where η is the viscosity coefficient, S is the capillary cross-sectional area, is the shear deformation rate, r is the radial distance from the center of the capillary cross section, R ≥ r, R is the capillary radius, dr is the differential of the capillary radius, and dt is the differential of the flow time of the liquid in the capillary.
[0019] Furthermore, if the fluid gravity and viscous resistance are equal in magnitude and opposite in direction, then,
[0020]
[0021] The fluid velocity is obtained as:
[0022]
[0023] The flow rate of the fluid to be measured is:
[0024]
[0025]
[0026] The viscosity coefficient is obtained as:
[0027]
[0028] Where ds is the thickness of the capillary cross-section ring, expressed as 2πrdr, R is the capillary radius, and t is the time the liquid flows in the capillary.
[0029] Furthermore, if the fluid moves in a uniformly accelerated straight line, the gravity is greater than the viscous resistance, then:
[0030] Gf = ma;
[0031]
[0032] The fluid velocity is obtained as:
[0033]
[0034] The obtained fluid viscosity coefficient is:
[0035]
[0036] Where, V represents the volume of the capillary filled with the liquid to be tested, L represents the length in the capillary, which is also the length of the liquid to be tested in the capillary, r is the radial distance from the center of the capillary cross section, ρ represents the density of the liquid to be tested, g is the gravitational acceleration, η is the viscosity coefficient, S is the cross-sectional area of the capillary, is the shear deformation rate, ds is the thickness of the capillary cross-section ring, expressed as 2πrdr, R is the capillary radius, and t is the time the liquid flows in the capillary.
[0037] A system for measuring fluid viscosity based on a capillary drop method, comprising:
[0038] An image processing module is used for performing pixelation processing of the image based on a weighted method to obtain a grayscale image, and processing the grayscale image to obtain a binary matrix containing liquid surface and engraved line features;
[0039] The binary matrix processing module is used to coherently accumulate the binary matrix in two dimensions, and divide the accumulated matrix into a liquid surface characteristic matrix and a scale line characteristic matrix by using a discrete Fourier transform frequency domain identification method, and obtain the corresponding coordinates of the liquid surface and the scale line;
[0040] The actual liquid level calculation module is used to perform a differential algorithm on the scale line coordinates, use Kalman filtering to obtain the scale line width and scale line spacing, use histogram adaptive processing to achieve accurate scale line identification, and according to the proportional coefficient between pixels and distance, correspond the liquid level coordinates to the proportional coefficient to obtain the actual position of the liquid level;
[0041] The viscosity calculation module is used to calculate the flow time according to the image of the actual position of the liquid surface to be measured in the capillary flowing from the top of the capillary section to the bottom end, and calculate the fluid viscosity according to the flow time and flow rate formula.
[0042] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for measuring fluid viscosity based on the capillary drop method are implemented.
[0043] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of a method for measuring fluid viscosity based on a capillary drop method.
[0044] Compared with the prior art, the present invention has the following beneficial technical effects:
[0045] The present invention provides a method, system, device and medium for measuring fluid viscosity based on a capillary drop method, wherein the collected image is processed to obtain a binary matrix containing liquid surface and scribed line features, the image is digitized to perform calculations more accurately, the binary matrix is coherently accumulated in two dimensions respectively, the accumulated matrix is divided into a liquid surface feature matrix and a scribed line feature matrix by a discrete Fourier transform frequency domain identification method, and the corresponding coordinates of the liquid surface and the scribed line are obtained, the liquid surface coordinates and the proportional coefficient are used to obtain the actual position of the liquid surface, the calculation error caused by the concave and convex shape of the fluid page is eliminated, and the flow time can be accurately calculated according to the image of the actual position of the liquid surface to be measured in the capillary flowing from the top end of the capillary cross section to the bottom end, and the fluid viscosity is obtained by calculation. The present application is free from the measurement error of the human eye by optimizing the acquisition and processing of the measurement image and the time calculation processing, and the calculation accuracy and efficiency of the fluid viscosity are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a flow chart of a method for measuring fluid viscosity based on the capillary decline method in a specific embodiment of the present invention;
[0047] Figure 2 It is a schematic diagram of a capillary containing fluid in a specific embodiment of the present invention. DETAILED DESCRIPTION
[0048] The present invention is further described in detail below in conjunction with specific embodiments, which are intended to explain the present invention rather than to limit it.
[0049] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0050] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0051] The present invention provides a method for measuring fluid viscosity based on capillary drop method, such as Figure 1 As shown, the following steps are included:
[0052] The image is pixelated based on the weighted method to obtain a grayscale image, and the grayscale image is processed to obtain a binary matrix containing the liquid surface and the engraved line features;
[0053] The binary matrix is coherently accumulated in two dimensions, and the accumulated matrix is divided into a liquid surface characteristic matrix and a scale line characteristic matrix by discrete Fourier transform frequency domain identification method, and the corresponding coordinates of the liquid surface and scale line are obtained;
[0054] The scale line coordinates are subjected to differential algorithm, and Kalman filtering is used to obtain the scale line width and scale line spacing. The histogram adaptive processing is used to achieve accurate scale line identification, and the actual position of the liquid surface is obtained by matching the liquid surface coordinates with the scale coefficient according to the scale coefficient between pixels and distance.
[0055] The flow time is calculated based on the actual position of the liquid surface to be measured in the capillary tube, and the image of the liquid flowing from the top of the capillary section to the bottom is used. The viscosity of the fluid is calculated based on the flow time and flow velocity formula.
[0056] Furthermore, the binary matrix of the liquid level and engraved line features is obtained by processing the grayscale image based on the gradient filtering principle and Kirchhoff transformation.
[0057] Furthermore, the proportionality coefficient between the pixel and the distance is calculated based on the line spacing and the line width to confirm the line position.
[0058] The present invention provides a preferred embodiment in which, when calculating the viscosity of a fluid, the gravity exerted on the fluid in the capillary tube needs to be calculated as:
[0059]
[0060] Wherein, V represents the volume of the capillary filled with the liquid to be tested, L represents the length in the capillary, which is also the length of the liquid to be tested in the capillary, r is the radial distance from the center of the capillary cross section, ρ represents the density of the liquid to be tested, and g is the acceleration due to gravity.
[0061] Furthermore, when calculating the viscosity of the fluid, it is also necessary to calculate the resistance of the fluid in the capillary:
[0062]
[0063] Where η is the viscosity coefficient, S is the capillary cross-sectional area, is the shear deformation rate, r is the radial distance from the center of the capillary cross section, R ≥ r, R is the capillary radius, dr is the differential of the capillary radius, see Appendix Figure 2 , dt is the differential of the flow time of the liquid in the capillary.
[0064] Furthermore, if the fluid gravity and viscous resistance are equal in magnitude and opposite in direction, then,
[0065]
[0066] The fluid velocity is obtained as:
[0067]
[0068] The volume of the fluid to be measured flowing per unit time, that is, the liquid flow rate to be measured is:
[0069] dQ = vds;
[0070] ds is the thickness of the capillary cross-section ring, expressed as 2πrdr, then the flow rate of the fluid to be measured is:
[0071]
[0072]
[0073] The viscosity coefficient is:
[0074]
[0075] According to the capillary length radius, the flow rate can be rewritten as:
[0076]
[0077] The viscosity coefficient is further obtained as:
[0078]
[0079] Where ds is the thickness of the capillary cross-section ring, expressed as 2πrdr, R is the capillary radius, and t is the time the liquid flows in the capillary.
[0080] If the fluid moves in a uniformly accelerated straight line, the gravity is greater than the viscous resistance, then:
[0081] Gf = ma;
[0082]
[0083] The fluid velocity is obtained as:
[0084]
[0085] The obtained fluid viscosity coefficient is:
[0086]
[0087] Where, V represents the volume of the capillary filled with the liquid to be tested, L represents the length in the capillary, which is also the length of the liquid to be tested in the capillary, r is the radial distance from the center of the capillary cross section, ρ represents the density of the liquid to be tested, g is the gravitational acceleration, η is the viscosity coefficient, S is the cross-sectional area of the capillary, is the shear deformation rate, ds is the thickness of the capillary cross-section ring, expressed as 2πrdr, R is the capillary radius, and t is the time the liquid flows in the capillary.
[0088] The present invention provides a system for measuring fluid viscosity based on a capillary drop method, comprising:
[0089] An image processing module is used for performing pixelation processing of the image based on a weighted method to obtain a grayscale image, and processing the grayscale image to obtain a binary matrix containing liquid surface and engraved line features;
[0090] The binary matrix processing module is used to coherently accumulate the binary matrix in two dimensions, and divide the accumulated matrix into a liquid surface characteristic matrix and a scale line characteristic matrix by using a discrete Fourier transform frequency domain identification method, and obtain the corresponding coordinates of the liquid surface and the scale line;
[0091] The actual liquid level calculation module is used to perform a differential algorithm on the scale line coordinates, use Kalman filtering to obtain the scale line width and scale line spacing, use histogram adaptive processing to achieve accurate scale line identification, and according to the proportional coefficient between pixels and distance, correspond the liquid level coordinates to the proportional coefficient to obtain the actual position of the liquid level;
[0092] The viscosity calculation module is used to calculate the flow time according to the image of the actual position of the liquid surface to be measured in the capillary flowing from the top of the capillary section to the bottom end, and calculate the fluid viscosity according to the flow time and flow rate formula.
[0093] In another embodiment of the present invention, a computer device is provided, the computer device comprising a processor and a memory, the memory being used to store a computer program, the computer program comprising program instructions, and the processor being used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, and are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions in a computer storage medium to implement a corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of a method for measuring fluid viscosity based on a capillary drop method.
[0094] In another embodiment of the present invention, the present invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include a built-in storage medium in a computer device, and of course can also include an extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of a method for measuring fluid viscosity based on a capillary drop method in the above-mentioned embodiment.
[0095] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0096] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0097] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0098] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for measuring fluid viscosity based on capillary drop method, characterized in that: The following steps are involved: The image is pixelated based on the weighted method to obtain a grayscale image, and the grayscale image is processed to obtain a binary matrix containing the liquid surface and the engraved line features; The binary matrix is coherently accumulated in two dimensions, and the accumulated matrix is divided into a liquid surface characteristic matrix and a scale line characteristic matrix by discrete Fourier transform frequency domain identification method, and the corresponding coordinates of the liquid surface and scale line are obtained; The scale line coordinates are subjected to differential algorithm, and Kalman filtering is used to obtain the scale line width and scale line spacing. The histogram adaptive processing is used to achieve accurate scale line identification, and the actual position of the liquid surface is obtained by matching the liquid surface coordinates with the scale coefficient according to the scale coefficient between pixels and distance. The flow time is calculated based on the image of the actual position of the liquid surface to be measured in the capillary tube flowing from the top end to the bottom end of the capillary section, and the viscosity of the fluid is calculated based on the flow time and flow rate formula; The liquid level and engraved line feature binary matrix is obtained by processing the grayscale image based on the gradient filtering principle and Kirchhoff transformation; When calculating the viscosity of a fluid, it is necessary to calculate the gravity acting on the fluid in the capillary: ; in, It indicates the volume of the capillary filled with the liquid to be tested. It indicates the length in the capillary tube, and also the length of the liquid to be measured in the capillary tube. is the radial distance from the center of the capillary cross section, Indicates the density of the liquid to be measured, is the acceleration due to gravity; When calculating the viscosity of the fluid, it is also necessary to calculate the resistance of the fluid in the capillary: ; in, is the viscosity coefficient, is the capillary cross-sectional area, is the shear deformation rate, r is the radial distance from the center of the capillary cross section, , is the capillary radius, is the differential of the capillary radius, It is the differential of the flow time of the liquid in the capillary.
2. The method for measuring fluid viscosity based on capillary drop method according to claim 1, characterized in that: The proportionality coefficient between the pixel and the distance is calculated by confirming the position of the scribed lines according to the scribed line spacing and the scribed line width.
3. The method for measuring fluid viscosity based on capillary drop method according to claim 1, characterized in that: If the fluid gravity and viscous resistance are equal in magnitude and opposite in direction, then, ; The fluid velocity is obtained as: ; The flow rate of the fluid to be measured is: ; ; The viscosity coefficient is obtained as: ; in, is the thickness of the capillary cross-section ring, expressed as , R is the capillary radius, and t is the time the liquid flows in the capillary.
4. The method for measuring fluid viscosity based on capillary drop method according to claim 1, characterized in that: If the fluid moves in a uniformly accelerated straight line, the gravity is greater than the viscous resistance, then: ; ; The fluid velocity is obtained as: ; The obtained fluid viscosity coefficient is: ; in, It indicates the volume of the capillary filled with the liquid to be tested. It indicates the length in the capillary tube, and also the length of the liquid to be measured in the capillary tube. is the radial distance from the center of the capillary cross section, Indicates the density of the liquid to be measured, is the acceleration due to gravity, is the viscosity coefficient, is the capillary cross-sectional area, is the shear deformation rate, is the thickness of the capillary cross-section ring, expressed as , R is the capillary radius, and t is the time the liquid flows in the capillary.
5. A system for measuring fluid viscosity based on capillary drop method, characterized in that: A method for measuring fluid viscosity based on any one of claims 1 to 4 based on a capillary drop method, comprising: An image processing module is used for performing pixelation processing of the image based on a weighted method to obtain a grayscale image, and processing the grayscale image to obtain a binary matrix containing liquid surface and engraved line features; The binary matrix processing module is used to coherently accumulate the binary matrix in two dimensions, and divide the accumulated matrix into a liquid surface characteristic matrix and a scale line characteristic matrix by using a discrete Fourier transform frequency domain identification method, and obtain the corresponding coordinates of the liquid surface and the scale line; The actual liquid level calculation module is used to perform a differential algorithm on the scale line coordinates, use Kalman filtering to obtain the scale line width and scale line spacing, use histogram adaptive processing to achieve accurate scale line identification, and according to the proportional coefficient between pixels and distance, correspond the liquid level coordinates to the proportional coefficient to obtain the actual position of the liquid level; The viscosity calculation module is used to calculate the flow time according to the image of the actual position of the liquid surface to be measured in the capillary flowing from the top of the capillary section to the bottom end, and calculate the fluid viscosity according to the flow time and flow rate formula.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for measuring fluid viscosity based on the capillary drop method as claimed in any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for measuring fluid viscosity based on the capillary drop method as claimed in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Method for measuring liquid viscosity in capillary tube based on micro volume sample measurement
CN109342271A
Capillary phenomenon-based surface tension optical measurement system and method
CN113740211A