A method and device for measuring density and viscosity of high-temperature and high-pressure gas based on crystal oscillator
Through the tuning fork crystal oscillator and frequency synthesizer, the sweep frequency curve of the gas is measured in a high-temperature and high-pressure environment, the resonance frequency and quality factors are calculated, and the viscosity density model is constructed, which solves the low accuracy and high-cost measurement of high-temperature and high-pressure gases in the existing technology. The problem of this method is to achieve high-precision and low-cost gas density measurement.
Patent Information
- Application Number
- CN202410450385.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-15
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-04-15
AI Technical Summary
The prior art when measuring gas density and viscosity in high temperature and high pressure environments, the accuracy is poor and the cost is high, and the device is large in size, making it difficult to be suitable for measuring gas density.
The tuning fork crystal oscillator is used to obtain the swept frequency curve of the gas, calculate its resonance frequency and quality factor, and build a gas viscosity calculation model, and then measure the density and viscosity of high-temperature and high-pressure gas to reduce the device volume and cost.
It improves the measurement accuracy of high-temperature and high-pressure gas density and viscosity, reduces the device volume and cost, is suitable for gas density measurement, and the device is simple and suitable for large-scale installation.
Smart Images

Figure CN118347895B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of measuring the density and viscosity of high-temperature and high-pressure gases, and in particular to a method and a device for measuring the density and viscosity of high-temperature and high-pressure gases based on a crystal oscillator. Background Art
[0002] The density characteristics of high-temperature and high-pressure mixed gases are an important thermodynamic property and the focus of thermophysical property research. Previously, a large number of scholars have conducted experiments and research on the density measurement of high-temperature and high-pressure mixed gases, mainly including experimental measurements of temperature, pressure, and compressibility coefficient. This aspect is mainly divided into two categories: compression factor measurement method and density indirect measurement method. The compression factor measurement method is represented by the constant volume method, PVT direct measurement method, and Burnett method. The indirect density measurement method mainly uses a vibrating tube densitometer and a magnetic suspension balance to achieve density measurement.
[0003] So far, a large number of theoretical calculations and experimental measurements have been conducted on gas viscosity measurement at home and abroad. In terms of theoretical calculations, the thermal properties of helium and argon are mainly calculated based on the "ab initio" theory of quantum mechanics. In terms of experimental measurements, single capillary gas viscometers and double capillary gas viscometers have very high measurement accuracy and extremely small measurement uncertainty. However, compared with single capillary gas viscometers, double capillary gas viscometers eliminate the interference of many factors when measuring gas viscosity, such as the uncertainty introduced by the capillary size (such as inner diameter and length, etc.) with temperature changes, etc. The uncertainty of the measurement results is much lower than that of single capillary gas viscometers.
[0004] Based on the above theoretical calculations and experimental measurements, the prior art uses a tuning fork resonant density meter to measure parameters such as liquid level, density, viscosity and temperature. The tuning fork resonant density meter is mainly composed of a tuning fork, an excitation unit, and a vibration pickup unit. It uses a resonant frequency generated by a piezoelectric crystal, and then measures its resonant frequency through another piezoelectric crystal on the tuning fork head. When the liquid flows through the tuning fork, affected by the density of the liquid, the damping size of the measured liquid on the tuning fork is different, and the density of the liquid is reflected by the change in the resonant frequency of the tuning fork sensor. The main reason for the change in the resonant frequency of the tuning fork sensor is that the effective mass of different liquids attached to the tuning fork is different. The effective mass of the liquid attached to the tuning fork is not only related to the shape and size of the tuning fork, but also to the viscosity and density of the liquid. Since the shape and size of the tuning fork are fixed, it can be used to determine the viscosity and density of the liquid to be measured through a certain known calibration. However, since the tuning fork resonant density meter has a large volume and a low resonant frequency, the frequency change caused by a small density change is small, and it is mainly suitable for measuring the density of mixed liquids, so its measurement accuracy and measurement stability are relatively poor, and it is not suitable for measuring gas density.
[0005] Prior art 2 uses the mass effect of the sensitive element in the mass-type gas-sensitive test system as the basis for the reaction, and outputs the change signal of the surface mass of the sensitive element into the change signal of the oscillator parameters such as frequency, amplitude, and wave velocity to reflect the subtle changes in the monitoring environment. The basic principle of the mass-type gas-sensitive test system is to convert the mass change signal caused by the gas concentration into an electrical signal, including two parts: the circuit system and the gas circuit system. The circuit system consists of the sensitive element of the sensor, the oscillation circuit, the frequency counter, and the data acquisition and display module. The gas circuit system includes a dry air source, a detection chamber, and an exhaust gas absorption device. When the mass-type gas-sensitive sensor with a metal electrode on the surface is working, the surface of the metal electrode will cause the mass of the surface of the sensitive device to increase due to the adsorption of gas. The adsorption amount per unit area of the adsorbed gas can be calculated by the change in the output frequency of the mass-type gas-sensitive sensor, and then the density of the gas can be measured. However, when the mass-type gas-sensitive test system measures the gas density, it is necessary to coat the surface of the quartz crystal with a gas-sensitive material, so it is necessary to study the gas-sensitive materials for different gases, so the use cost is high, and the gas-sensitive materials used are extremely sensitive to temperature and pressure, and it is difficult to apply to the measurement of gas density under high temperature and high pressure environments. Summary of the invention
[0006] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method and device for measuring the density and viscosity of high-temperature and high-pressure gases based on a crystal oscillator. The method and device detect the content of high-temperature and high-pressure gases by combining a tuning fork crystal oscillator with a frequency synthesizer, and then measure the density and viscosity of the high-temperature and high-pressure gases. This can reduce the volume and cost of the measuring device and improve the measurement accuracy of the density and viscosity of the high-temperature and high-pressure gases.
[0007] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:
[0008] A method for measuring the density and viscosity of high-temperature and high-pressure gas based on a crystal oscillator comprises the following steps:
[0009] S1. Determine the test frequency and the detection temperature, obtain the feedback voltage of the gas at the test frequency based on the crystal oscillator, and obtain the frequency sweep curve of the gas according to the test frequency and the feedback voltage;
[0010] S2. Obtain the resonant frequency and quality factor of the crystal oscillator according to the frequency sweep curve of the gas in step S1;
[0011] S3, constructing a gas viscosity density calculation model, and calculating the density and viscosity of the gas according to the gas viscosity density calculation model, the detected temperature in step S1, and the resonant frequency and quality factor of the crystal oscillator in step S2.
[0012] Further, in step S1, a frequency sweep curve of the gas is obtained according to the test frequency and the feedback voltage, specifically: the frequency sweep curve is obtained with the test frequency as the horizontal coordinate and the feedback voltage as the vertical coordinate.
[0013] Further, in step S2, the resonant frequency of the crystal oscillator is obtained according to the frequency sweep curve of the gas in step S1, specifically: the highest point in the feedback voltage corresponding to the test frequency in the frequency sweep curve of the gas is determined as the resonant frequency of the gas.
[0014] Further, in step S2, according to the frequency sweep curve of the gas in step S1, the quality factor of the crystal oscillator is obtained, specifically: a first threshold frequency corresponding to 0.707 times the maximum amplitude in the frequency sweep curve of the gas is obtained, a second threshold frequency corresponding to 0.5 times the maximum amplitude in the frequency sweep curve of the gas is obtained, the second threshold frequency is subtracted from the first threshold frequency to obtain the bandwidth, and the resonant frequency of the crystal oscillator is divided by the bandwidth to obtain the quality factor of the crystal oscillator.
[0015] Furthermore, in step S3, constructing a gas viscosity density calculation model includes the following steps:
[0016] A1. Construct the first sub-model of gas viscosity density, expressed as:
[0017]
[0018] Wherein: A is the first constant, μ is the viscosity of the gas, ρ is the density of the gas, ω1 is the real-time resonant frequency of the tuning fork crystal oscillator, B is the second constant, Q1 is the quality factor of the tuning fork crystal oscillator, and ω0 is the initial resonant frequency of the tuning fork crystal oscillator;
[0019] A2. Construct the second sub-model of gas viscosity density, expressed as:
[0020]
[0021] Wherein: A is the first constant, μ is the viscosity of the gas, ρ is the density of the gas, ω1 is the real-time resonant frequency of the tuning fork crystal oscillator, C is the third constant, and ω0 is the initial resonant frequency of the tuning fork crystal oscillator;
[0022] A3. Combine the first sub-model of gas viscosity density in step A1 and the second sub-model of gas viscosity density in step A2 to construct a gas viscosity density calculation model.
[0023] Further, in step S3, the density and viscosity of the gas are calculated according to the viscosity density calculation model of the gas, the detected temperature in step S1, and the resonant frequency and quality factor of the crystal oscillator in step S2, including the following steps:
[0024] B1, determining a first constant, a second constant and a third constant according to the detected temperature in step S1;
[0025] B2. Substitute the first constant, the second constant and the third constant in step B1, and the resonant frequency and the quality factor of the crystal oscillator in step S2 into the gas viscosity density calculation model to calculate the density and viscosity of the gas.
[0026] A device for measuring the density and viscosity of high-temperature and high-pressure gas based on a crystal oscillator using the above method comprises:
[0027] A tuning fork crystal oscillator unit is used to determine the test frequency and the detection temperature, obtain the feedback voltage of the gas at the test frequency based on the crystal oscillator, and obtain the frequency sweep curve of the gas according to the test frequency and the feedback voltage;
[0028] A resonant frequency and quality factor extraction unit, used to obtain the resonant frequency and quality factor of the crystal oscillator according to the frequency sweep curve of the gas;
[0029] The viscosity density calculation unit is used to construct a viscosity density calculation model for the gas, and calculate the density and viscosity of the gas according to the viscosity density calculation model for the gas, the detection temperature, and the resonant frequency and quality factor of the crystal oscillator.
[0030] Furthermore, the tuning fork crystal oscillator unit comprises:
[0031] The tuning fork crystal sensor module is used to determine the detection temperature, input the measurement gas, and generate a feedback voltage of the gas at the test frequency according to the test frequency signal;
[0032] The data processing module is used to determine the test frequency, generate a test frequency signal according to the test frequency, and obtain a frequency sweep curve of the gas according to the test frequency and a feedback voltage of the gas at the test frequency.
[0033] The beneficial effects of the present invention are:
[0034] (1) The method for measuring the density and viscosity of high-temperature and high-pressure gas provided by the present invention obtains the feedback voltage of the gas at the test frequency based on the crystal oscillator, obtains the frequency sweep curve of the gas according to the test frequency and the feedback voltage, and then obtains the resonant frequency and quality factor of the crystal oscillator, constructs a gas viscosity density calculation model, and calculates the density and viscosity of the gas according to the gas viscosity density calculation model, the detection temperature, and the resonant frequency and quality factor of the crystal oscillator, which can not only improve the measurement accuracy of the density and viscosity of the high-temperature and high-pressure gas, but also reduce the volume and cost of the measuring device;
[0035] (2) The device for measuring the density and viscosity of high-temperature and high-pressure gas provided by the present invention comprises a tuning fork crystal oscillator unit, a resonant frequency and quality factor extraction unit and a viscosity density calculation unit. The gas density is detected by means of a tuning fork crystal oscillator in cooperation with a frequency sweeping circuit. The tuning fork crystal oscillator is used as a viscosity density sensor. Compared with a tuning fork density meter and a mass-type gas sensitive sensor, the volume and cost of the tuning fork crystal oscillator are relatively low, and the device can be installed on a large scale to measure the gas density distribution. Moreover, the entire device only comprises a tuning fork crystal oscillator, a frequency synthesizer, a voltage divider resistor, a temperature sensor and an AD converter, so the device is extremely concise. In addition, since the tuning fork crystal oscillator is sensitive to changes in gas density and the circuit is very accurate in frequency measurement, the device has high measurement accuracy and can meet the requirements of real-time measurement of the equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 A schematic flow chart of a method for measuring the density and viscosity of high-temperature and high-pressure gas based on a crystal oscillator;
[0037] Figure 2 The schematic diagram of the structure of a device for measuring the density and viscosity of high-temperature and high-pressure gas based on a crystal oscillator;
[0038] Figure 3 It is a schematic diagram of the structure of a tuning fork crystal oscillator unit;
[0039] Figure 4 It is a structural diagram of the data processing module;
[0040] Among them: 1. Sealing thread; 2. Air inlet; 3. Filter device; 4. Tuning fork crystal oscillator; 5. Sensor base; 6. Temperature sensor; 7. High-voltage wire passer; 8. Data processing module; 9. Wire sealing waterproof connector; 10. Data wire; 11. Sensor housing. DETAILED DESCRIPTION
[0041] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0042] like Figure 1 As shown, a method for measuring the density and viscosity of high-temperature and high-pressure gas based on a crystal oscillator includes steps S1-S3, which are as follows:
[0043] S1. Determine the test frequency and the detection temperature, obtain the feedback voltage of the gas at the test frequency based on the crystal oscillator, and obtain the frequency sweep curve of the gas according to the test frequency and the feedback voltage.
[0044] In an optional embodiment of the present invention, the present invention determines the test frequency and the detection temperature by a tuning fork crystal oscillator unit. The tuning fork crystal oscillator unit obtains the feedback voltage of the gas at the test frequency based on the crystal oscillator, and obtains the frequency sweep curve of the gas according to the test frequency and the feedback voltage.
[0045] The present invention obtains a frequency sweep curve of the gas according to the test frequency and the feedback voltage, specifically: the frequency sweep curve is obtained by taking the test frequency as the abscissa and the feedback voltage as the ordinate.
[0046] The present invention controls the frequency synthesizer to send a test frequency through the main control chip, and then uses the AD converter to collect the feedback voltage on the voltage divider resistor. After stabilization, the main control chip controls the frequency synthesizer to send the next test frequency, and the AD converter continues to collect the feedback voltage on the voltage divider resistor. The present invention sequentially scans the test frequencies in the test frequency segment according to the above method, and obtains the feedback voltage of the gas in the test frequency segment. Then the present invention uses the test frequency as the horizontal coordinate and the feedback voltage as the vertical coordinate to obtain the frequency sweep curve.
[0047] S2. Obtain the resonant frequency and quality factor of the crystal oscillator according to the frequency sweep curve of the gas in step S1.
[0048] In an optional embodiment of the present invention, the present invention is provided with a resonant frequency and quality factor extraction unit. The resonant frequency and quality factor extraction unit can obtain the resonant frequency and quality factor of the crystal oscillator according to the frequency sweep curve of the gas.
[0049] The present invention obtains the resonant frequency of the crystal oscillator according to the frequency sweep curve of the gas in step S1, specifically: the highest point in the feedback voltage corresponding to the test frequency in the frequency sweep curve of the gas is determined as the resonant frequency of the gas.
[0050] The present invention obtains the quality factor of the crystal oscillator according to the sweep frequency curve of the gas in step S1, specifically: obtaining a first threshold frequency corresponding to 0.707 times the maximum amplitude in the sweep frequency curve of the gas, obtaining a second threshold frequency corresponding to 0.5 times the maximum amplitude in the sweep frequency curve of the gas, subtracting the second threshold frequency from the first threshold frequency to obtain the bandwidth, and dividing the resonant frequency of the crystal oscillator by the bandwidth to obtain the quality factor of the crystal oscillator.
[0051] S3, constructing a gas viscosity density calculation model, and calculating the density and viscosity of the gas according to the gas viscosity density calculation model, the detected temperature in step S1, and the resonant frequency and quality factor of the crystal oscillator in step S2.
[0052] In an optional embodiment of the present invention, the present invention constructs a viscosity density calculation model of the gas through a viscosity density calculation unit. The viscosity density calculation unit calculates the density and viscosity of the gas according to the viscosity density calculation model of the gas, the detected temperature, and the resonant frequency and quality factor of the crystal oscillator.
[0053] The present invention constructs a gas viscosity density calculation model comprising the following steps:
[0054] A1. Construct the first sub-model of gas viscosity density, expressed as:
[0055]
[0056] Wherein: A is the first constant, μ is the viscosity of the gas, ρ is the density of the gas, ω1 is the real-time resonant frequency of the tuning fork crystal oscillator, B is the second constant, Q1 is the quality factor of the tuning fork crystal oscillator, and ω0 is the initial resonant frequency of the tuning fork crystal oscillator.
[0057] A2. Construct the second sub-model of gas viscosity density, expressed as:
[0058]
[0059] Wherein: A is the first constant, μ is the viscosity of the gas, ρ is the density of the gas, ω1 is the real-time resonant frequency of the tuning fork crystal oscillator, C is the third constant, and ω0 is the initial resonant frequency of the tuning fork crystal oscillator.
[0060] A3. Combine the first sub-model of gas viscosity density in step A1 and the second sub-model of gas viscosity density in step A2 to construct a gas viscosity density calculation model.
[0061] The present invention calculates the density and viscosity of the gas according to the viscosity density calculation model of the gas, the detected temperature in step S1, and the resonant frequency and quality factor of the crystal oscillator in step S2, comprising the following steps:
[0062] B1. Determine a first constant, a second constant and a third constant according to the detected temperature in step S1.
[0063] In the present invention, temperature affects the mechanical strength of the tuning fork in the tuning fork crystal oscillator unit, and further affects the first constant, the second constant and the third constant in the gas viscosity density calculation model. The present invention can determine the first constant, the second constant and the third constant corresponding to the detection temperature by determining the detection temperature.
[0064] B2. Substitute the first constant, the second constant and the third constant in step B1, and the resonant frequency and the quality factor of the crystal oscillator in step S2 into the gas viscosity density calculation model to calculate the density and viscosity of the gas.
[0065] like Figure 2 As shown, a device for measuring the density and viscosity of high-temperature and high-pressure gas based on a crystal oscillator using the above method includes a tuning fork crystal oscillator unit, a resonant frequency and quality factor extraction unit, and a viscosity density calculation unit, as follows:
[0066] The tuning fork crystal oscillator unit is used to determine the test frequency and detection temperature, obtain the feedback voltage of the gas at the test frequency based on the crystal oscillator, and obtain the frequency sweep curve of the gas based on the test frequency and feedback voltage. Figure 3 As shown, the present invention provides a structural schematic diagram of a tuning fork crystal oscillator unit.
[0067] The tuning fork crystal oscillator unit includes a tuning fork crystal oscillator sensor module and a data processing module.
[0068] The tuning fork crystal sensor module is used to determine the detection temperature, input the measuring gas, and generate a feedback voltage of the gas at the test frequency according to the test frequency signal.
[0069] The tuning fork crystal oscillator sensor module includes a sealing thread 1, an air inlet 2, a filtering device 3, a tuning fork crystal oscillator 4, a sensor base 5, a temperature sensor 6, a high-temperature and high-pressure lead 7, a wire sealing waterproof connector 9, a data wire 10 and a sensor housing 11.
[0070] The sealing thread 1 is a thread on the tuning fork crystal oscillator sensor module body, which has a sealing pressure effect when tightened, and is used to fix the tuning fork crystal oscillator sensor module.
[0071] The air inlet 2 is used to input the measuring gas (various gases with high temperature and high pressure). The measuring gas passes through the small hole in the middle of the tuning fork crystal sensor module body, passes through the filter device 3, reaches the inside of the tuning fork crystal sensor module, and contacts the tuning fork crystal oscillator 4 and the temperature sensor 6.
[0072] The filter device 3 is a metal diaphragm with micropores, which is arranged behind the air inlet 2 of the tuning fork crystal oscillator sensor module body and is used to filter tiny particle impurities in the high-pressure gas.
[0073] The tuning fork crystal oscillator 4 is a crystal oscillator in the shape of a tuning fork and is arranged inside the main body of the tuning fork crystal oscillator sensor module. The resonant frequency of the tuning fork crystal oscillator 4 will change with the gas it contacts, and the quality factor will change with the viscosity of the gas it contacts, so it is used as a density and viscosity sensitive element. The signal line of the tuning fork crystal oscillator 4 is led to normal pressure through a high-voltage wire passer 7 and connected to a data processing module 8.
[0074] The sensor base 5 is used to fix the high-strength metal parts inside the tuning fork crystal sensor module, and a gas channel is arranged at the center. The gas channel is provided with an air inlet 2 and a filter device 3. The gas channel is used to connect the measurement gas and the measurement cavity. The tuning fork crystal oscillator 4 and the temperature sensor 6 are arranged in the measurement cavity.
[0075] The temperature sensor 6 is arranged inside the tuning fork crystal sensor module body, and its signal line is led to normal pressure through the high-voltage wire passer 7 and connected to the data processing module 8. The temperature sensor 6 is used to determine the detection temperature. The present invention adopts a contact temperature sensor.
[0076] The high temperature and high pressure lead wire 7 is circular, with a wire in the middle and its substrate insulation, resistant to high temperature and high pressure, and is arranged on the side of the tuning fork crystal sensor module body. The high temperature and high pressure lead wire 7 is used to transmit the signal of the high temperature and high pressure sensitive element to the normal temperature and pressure environment. One end of the high temperature and high pressure lead wire 7 is connected to the sensitive element of the high temperature and high pressure environment, and the other end of the high temperature and high pressure lead wire 7 is connected to the data processing module 8.
[0077] The data processing module 8 is used to determine the test frequency, generate a test frequency signal according to the test frequency, and obtain a frequency sweep curve of the gas according to the test frequency and the feedback voltage of the gas at the test frequency.
[0078] like Figure 4 As shown, the data processing module includes a frequency synthesizer, a voltage divider resistor, an AD converter and a main control chip.
[0079] The frequency synthesizer uses a high-precision crystal oscillator as a reference. By receiving the test frequency signal from the main control chip, it uses synthesis technology to generate a series of test frequencies with a certain frequency interval.
[0080] The voltage-dividing resistor is used to share the voltage. Since the 100K resistor is close to the effective impedance of the tuning fork crystal during measurement, the present invention uses a 100K resistor as the voltage-dividing resistor.
[0081] The AD converter is used to collect the feedback voltage on the voltage divider resistor. When the effective impedance of the tuning fork crystal oscillator changes, the voltage change of the voltage divider resistor is more obvious. The present invention uses an AD converter to accurately collect the feedback voltage on the voltage divider resistor and ensure the stable operation of the data processing circuit.
[0082] The main control chip is used to determine the test frequency, generate a test frequency signal according to the test frequency, and use the test frequency signal to control the frequency synthesizer to send out the test frequency, drive the tuning fork crystal oscillator to vibrate, and then obtain the feedback voltage on the voltage divider resistor collected by the AD converter, and obtain the gas sweep curve according to the test frequency and the feedback voltage of the gas at the test frequency.
[0083] The present invention obtains the frequency sweep curve of the gas through the cooperation of a frequency synthesizer, a voltage divider resistor, an AD converter and a main control chip, thereby realizing the measurement of the crystal oscillator resonant frequency and the quality factor. Each component used in the present invention in this process can be miniaturized, thereby realizing the miniaturization of the entire device, thereby increasing the practicality of the present invention.
[0084] The resonant frequency and quality factor extraction unit is used to obtain the resonant frequency and quality factor of the crystal oscillator according to the frequency sweep curve of the gas.
[0085] The viscosity density calculation unit is used to construct a gas viscosity density calculation model, and calculate the gas density and gas viscosity according to the gas viscosity density calculation model and the resonant frequency and quality factor of the crystal oscillator.
[0086] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A method for measuring the density and viscosity of high-temperature and high-pressure gas based on a crystal oscillator, characterized in that: The following steps are involved: S1. Determine the test frequency and the detection temperature, obtain the feedback voltage of the gas at the test frequency based on the crystal oscillator, and obtain the frequency sweep curve of the gas according to the test frequency and the feedback voltage; S2. Obtain the resonant frequency and quality factor of the crystal oscillator according to the frequency sweep curve of the gas in step S1; S3, constructing a gas viscosity density calculation model, and calculating the density and viscosity of the gas according to the gas viscosity density calculation model, the detected temperature in step S1, and the resonant frequency and quality factor of the crystal oscillator in step S2; The construction of the gas viscosity density calculation model includes the following steps: A1. Construct the first sub-model of gas viscosity density, expressed as: Wherein: A is the first constant, μ is the viscosity of the gas, ρ is the density of the gas, ω1 is the real-time resonant frequency of the tuning fork crystal oscillator, B is the second constant, Q1 is the quality factor of the tuning fork crystal oscillator, and ω0 is the initial resonant frequency of the tuning fork crystal oscillator; A2. Construct the second sub-model of gas viscosity density, expressed as: Wherein: A is the first constant, μ is the viscosity of the gas, ρ is the density of the gas, ω1 is the real-time resonant frequency of the tuning fork crystal oscillator, C is the third constant, and ω0 is the initial resonant frequency of the tuning fork crystal oscillator; A3. Combine the first sub-model of gas viscosity density in step A1 and the second sub-model of gas viscosity density in step A2 to construct a gas viscosity density calculation model.
2. The method for measuring the density and viscosity of high-temperature and high-pressure gas based on crystal oscillator according to claim 1, characterized in that: In step S1 , a frequency sweep curve of the gas is obtained according to the test frequency and the feedback voltage. Specifically, the frequency sweep curve is obtained with the test frequency as the horizontal coordinate and the feedback voltage as the vertical coordinate.
3. The method for measuring the density and viscosity of high-temperature and high-pressure gas based on crystal oscillator according to claim 1, characterized in that: In step S2, the resonant frequency of the crystal oscillator is obtained according to the frequency sweep curve of the gas in step S1, specifically: the highest point in the feedback voltage corresponding to the test frequency in the frequency sweep curve of the gas is determined as the resonant frequency of the gas.
4. The method for measuring the density and viscosity of high-temperature and high-pressure gas based on crystal oscillator according to claim 1, characterized in that: In step S2, according to the frequency sweep curve of the gas in step S1, the quality factor of the crystal oscillator is obtained, specifically: a first threshold frequency corresponding to 0.707 times the maximum amplitude in the frequency sweep curve of the gas is obtained, a second threshold frequency corresponding to 0.5 times the maximum amplitude in the frequency sweep curve of the gas is obtained, the second threshold frequency is subtracted from the first threshold frequency to obtain the bandwidth, and the resonant frequency of the crystal oscillator is divided by the bandwidth to obtain the quality factor of the crystal oscillator.
5. The method for measuring the density and viscosity of high-temperature and high-pressure gas based on crystal oscillator according to claim 1, characterized in that: In step S3, the density and viscosity of the gas are calculated according to the viscosity density calculation model of the gas, the detected temperature in step S1, and the resonant frequency and quality factor of the crystal oscillator in step S2, including the following steps: B1, determining a first constant, a second constant and a third constant according to the detected temperature in step S1; B2. Substitute the first constant, the second constant and the third constant in step B1, and the resonant frequency and the quality factor of the crystal oscillator in step S2 into the gas viscosity density calculation model to calculate the density and viscosity of the gas.
6. A device for measuring density and viscosity of high-temperature and high-pressure gas based on a crystal oscillator using the method described in any one of claims 1 to 5, characterized in that: include: A tuning fork crystal oscillator unit is used to determine the test frequency and the detection temperature, obtain the feedback voltage of the gas at the test frequency based on the crystal oscillator, and obtain the frequency sweep curve of the gas according to the test frequency and the feedback voltage; A resonant frequency and quality factor extraction unit, used to obtain the resonant frequency and quality factor of the crystal oscillator according to the frequency sweep curve of the gas; The viscosity density calculation unit is used to construct a viscosity density calculation model for the gas, and calculate the density and viscosity of the gas according to the viscosity density calculation model for the gas, the detection temperature, and the resonant frequency and quality factor of the crystal oscillator.
7. The device for measuring density and viscosity of high-temperature and high-pressure gas based on crystal oscillator according to claim 6, characterized in that: The tuning fork crystal oscillator unit includes: The tuning fork crystal sensor module is used to determine the detection temperature, input the measurement gas, and generate a feedback voltage of the gas at the test frequency according to the test frequency signal; The data processing module is used to determine the test frequency, generate a test frequency signal according to the test frequency, and obtain a frequency sweep curve of the gas according to the test frequency and a feedback voltage of the gas at the test frequency.
