{'fraction_non_alphanumeric': 0.020429159318048208, 'fraction_numerical': 0.008891828336272781, 'mean_word_length': 5.043072824156305, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Application of Computer Energy Optimization Method in Oil and Gas Gathering and Transportation System

With the continuous development of society and economy, human demand for petrochemical-related products and derivatives is becoming more and more vigorous. However, the increase in oilfield development time and the expansion of scale easily make it difficult to control energy consumption. In response to this bottleneck problem, this paper relies on computer technology to explore the development of energy optimization software for oil and gas gathering and transportation systems, which provides convenience for grassroots technical managers by realizing control of the operating parameters of the oil gathering system, realizing process management and fine management., Changed the traditional oilfield management model. At the same time, taking the water-mixing oil collection process as an example, explore the application process and effect of the software in the oil field.


Introduction
With the continuous advancement of the construction of digital oilfields, the level of self-control and intelligence of the oilfield production system continues to increase [1][2] . In recent years, other major international oil companies have implemented process simulation, advanced control and process optimization projects to achieve the purpose of reducing consumption and increasing efficiency by optimizing production and operating parameters [3][4] . The oil and gas gathering and transportation system itself consumes a lot of energy, especially as the development difficulty of many old oil fields increases, the energy consumption is increasing year by year [5][6] . Energy saving and consumption reduction is an important way for petroleum companies to reduce costs and improve economic benefits. To carry out energy-saving work, we must first conduct energy analysis. Through energy analysis, we can understand the current energy use, energy level, energy-saving potential and energy-saving effect of the oil and gas gathering and transportation system, and provide a reliable scientific basis for the technical transformation centered on energy saving and consumption reduction . Based on this background, energy optimization software for oil and gas gathering and transportation systems has been developed to provide production management technicians with technologies and tools to optimize the operating parameters of the oil gathering system and reduce the production energy consumption of the oil gathering system.

Energy balance method
The energy balance method is a thermodynamic analysis method based on the first law of thermodynamics. It analyzes the energy conversion, utilization and loss of devices, processes and departments, balances the revenue and expenditure of the energy quantity, determines the quantity distribution of energy loss, and calculates the energy utilization efficiency.
An oil and gas gathering and transportation system is the most common gathering and transportation process used in oil fields. The main task is to separate oil, gas and water from the well discharged fluid, and then heat and pressurize the crude oil for external transportation, the natural gas is sent to the gas network, and the sewage is sent to the water injection station. The production process of oil and gas gathering and transportation system is shown in Figure 1.
The inlet of the oil and gas gathering and transportation system is the inlet of well drainage, and the outlet is the outlet of the pipeline network, the natural gas outlet of the three-phase separator and the sewage outlet of the primary sedimentation tank. The boundary of the system is the outer surface of each equipment and pipeline, and the external environment is the atmosphere. The energy balance equation for the system is now established as shown in equation (1): In the formula, Q1-the energy brought into the system by the discharged liquid from a well, kW; Qr--The energy brought into the system by fuel, kW; Qe--Equivalent heat brought into the system by electric energy, kW; Qo--The energy taken out of the system by the oil, kw; Qg--The energy taken out of the system by air, kW; Qw--The energy taken out of the system by water, kW; Qjrl--The energy lost by the heating furnace, kW; Qb-the energy lost by the pump, kw; Qyg--heat loss of oil tank, kw; Qqt--Other heat dissipation losses of the system, kW.

Evaluation of the best utilization of oil and gas gathering and transportation system
There are many indicators for evaluating the energy consumption of oil and gas gathering and transportation systems. It is generally believed that the three indexes of energy transfer efficiency ηt, system energy utilization rate ηs and energy effective utilization rate ηe have clear physical meaning and can represent the energy consumption level of the gathering and transportation system.

Energy transfer efficiency (station efficiency) ηt
The energy transfer efficiency is the ratio of the effective energy output of the system to the total energy input to the system, that is, the heat of the oil, gas and water taken out of the system is compared to the sum of the heat of the incoming liquid into the system, fuel heat and electric energy. The system energy utilization rate is the ratio of the energy effectively used by the system to the total energy supplied by the external system, that is, the energy obtained from the station by oil, gas and water is more than the sum of fuel heat and electric energy.

Energy efficient utilization rate ηe
The effective utilization of energy is the ratio of the energy effectively used by crude oil and natural hot gas to the total energy of the external supply system, that is, the energy obtained from the oil and gas from the station is more than the sum of fuel heat and electric energy.
Where φe is the conversion coefficient of electric energy and heat energy; Qlo-the heat of the oil-carrying system, kW; The heat that Qlg brings into the system one by one, kW.

Construction and operation of oil transfer stations
The No. 3 oil transfer station of an oil production plant was built in 1986. As of the end of 2019, a total of 215 oil wells and 8 metering rooms were built. Except for 53 wells using the hook-up oil collection process, the remaining oil wells all use the double-pipe water mixing oil collection process. The transfer station adopts the "three-in-one" process of separation, sedimentation, and buffering. The main energy-consuming equipment in the station includes water mixing furnace, hot washing furnace, water mixing pump, export pump and hot washing pump. The automatic control instrument system in the station is relatively complete. The power consumption of various pumps, self-consumption gas, external moisture, and return dry gas can be separately measured. For a production system that has built a water-blended oil-gathering process, the main factors affecting energy consumption are not only single well fluid production and comprehensive water cut, but also ambient temperature. Therefore, as the ambient temperature changes, it is necessary to continuously optimize the water mixing temperature and water volume and other operating parameters to ensure high-efficiency and low-consumption operation of the system.

Energy optimization software functions and applications
The energy optimization software of the oil and gas gathering and transportation system is a multiphase flow simulation calculation and optimization software, which has the functions of constructing process models, hydraulic and thermal calculations, hydraulic and thermal checks, energy use evaluation, and energy use optimization.
Taking the No. 3 oil transfer station system as an example, the oil and gas gathering and transportation system uses this software to optimize the operation and needs to follow the following operating procedures, that is, constructing a process model, checking hydraulic and thermal power, and optimizing operating parameters.

Build process model
Complete the establishment of the data source file according to the data template, that is, complete the input of construction information and operation information related to oil wells, metering rooms, oil transfer stations and all pipelines in the background Excel (electronic form) file, and then import the data source file through the software. In this way, the oil collection process model of 215 oil wells in 8 metering rooms of the No. 3 oil transfer station system was constructed.
After the model is completed, the simulation calculation of the operation of the double-pipe water mixing process in winter and the operation of the single-pipe oil output process in summer can be realized according to the actual operation situation on the spot. The calculation results can be selectively output, and the pressure drop and temperature drop of each pipeline and the operation status of each node can be obtained. Figure 1 shows a screenshot of the calculation results of the pipeline parameters of the oil transfer station system. By analyzing the operating parameters of pipelines and nodes, it is possible to find the thermal weakness of the oil gathering system outside the station and the pipe section with excessive pressure drop.

Hydraulic and thermal check 1) Hydraulic check
Based on the actual pressure drop of the operating pipeline, the inner diameter of the pipeline that has been in operation for many years and has been severely scaled and waxed is checked.
2) Thermal check Taking the actual water and oil return temperature at the transfer station, the water mixing and oil return temperature between each measurement, and the oil output temperature of each oil well as the base, the total heat transfer coefficient of each pipeline in the system is inversely calculated.

Optimize operating parameters
The total heat transfer coefficient of each pipe after checking is used to replace the preset total heat transfer coefficient in the model. The process model after the hydraulic and thermal check is consistent with the actual operating conditions on site, and the simulation calculation accuracy is guaranteed. On this basis, the operating parameters of the water mixing system are optimized, that is, the software is used to calculate the water mixing volume of a single well corresponding to different water mixing temperatures.
When the ambient temperature is greater than 0℃, the software can determine that some high-yield wells do not need water mixing according to the wellhead oil temperature; when the ambient temperature is less than 0 ℃ , in order to prevent pipeline freezing and blockage, the software will calculate the corresponding water mixing volume for all oil wells.
Through calculation to obtain the total mixing amount, comprehensive energy consumption and energy consumption cost corresponding to different mixing temperature, the manager can choose the optimal operation plan with the lowest energy consumption or the lowest energy consumption cost.

Optimize the implementation effect of the operation plan
Using this software, the monthly optimized operation plan of the oil transfer station system can be compiled according to the changes in ambient temperature. Under normal circumstances, at the end of the month, complete the hydraulic and thermal check according to the actual production situation, and then update the single well fluid production, comprehensive water cut and wellhead oil temperature and other parameters, and use the checked model to compile the optimized operation plan for the next month.
In 2019, the software was used to prepare and implement monthly optimized operation plans for the No. 3 oil transfer station. Compared with 2018, in 2019, when the liquid production volume increases by 8×104t, the air saving is 20×104m3, the electricity saving is 13×104kW·h, and the energy saving is 288tce. See Table 1 for the optimized operation and energy saving of the energy system of No. 3 transfer station.  /tce  2018  120  413  115  5620  2019  128  393  102  5332  Increment  8  -20  -13 -288 In 2019, the software was promoted and applied in 25 oil transfer stations in 3 oil production mines of a certain oil production plant, with an annual energy saving of 9,038 tce and achieved good energy saving effects.
The oil and gas gathering and transportation system has high energy efficiency, but it also has weak links such as heating furnace loss, sewage loss and oil tank heat dissipation. Regarding the potential of energy-saving transformation, attention should be paid to improving the efficiency of the heating furnace, reducing the temperature of sewage heating, and strengthening the insulation of the oil tank.
The energy analysis model of the oil and gas gathering and transportation system has clear physical meaning, can truly reflect the energy distribution of the gathering and transportation system, can find the weak links in energy use, and has a guiding effect on actual production.

Conclusion
Relying on computer technology, this paper develops energy optimization software for oil and gas gathering and transportation system, which provides technical support and practical tools for oilfield management technicians to regulate and control the operating parameters of oil gathering system and realize energy process management and refined management of oil and gas gathering and transportation system. In order to achieve the high efficiency and low energy consumption production of the oil field, the goal of reducing costs and increasing efficiency has been achieved.