Soil temperature calculation method and system

By acquiring pipeline operation data and adjusting the simulated soil temperature using a petroleum hydrothermal transient model, the problem of inaccurate soil temperature measurement along the pipeline in existing technologies has been solved, enabling accurate soil temperature calculation under complex terrain conditions.

CN117610213BActive Publication Date: 2026-11-27CHINA AVIATION OIL PETROCHEMICAL PIPELINE CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311801488.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2026-11-27
Estimated Expiration
2043-12-25

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately measure soil temperature along pipelines, especially in complex terrain where soil temperature measuring instruments cannot effectively cover the entire pipeline route.

Method used

By acquiring pipeline operation data, a simulated soil temperature is randomly generated, and the simulated soil temperature is adjusted using an oil-water thermodynamic transient model until the error between the simulated soil temperature and the oil temperature at the terminal station meets the preset requirements, thus accurately calculating the soil temperature along the pipeline.

Benefits of technology

It enables precise calculation of soil temperature along the pipeline, improves the accuracy and reliability of soil temperature measurement, and adapts to the needs of oil transportation under complex terrain conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117610213B_ABST
    Figure CN117610213B_ABST
Patent Text Reader

Abstract

The present specification provides a soil temperature calculation method and system, the method comprising: obtaining pipeline operation data; the pipeline operation data comprising first station outbound oil temperature, first station outbound pressure, terminal station inbound pressure and pipeline flow during operation; randomly generating simulated soil temperature; inputting the pipeline operation data and the simulated soil temperature into a petroleum water thermal transient model; the petroleum water thermal transient model obtaining simulated terminal station inbound oil temperature according to the change of water thermal state of petroleum in the pipeline with time; adjusting the simulated soil temperature based on the error between the simulated terminal station inbound oil temperature and the terminal station inbound oil temperature according to the pipeline operation state until the error between the simulated terminal station inbound oil temperature and the terminal station inbound oil temperature meets a preset error, and obtaining pipeline along-line soil temperature.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This manual relates to the field of oil and gas transmission technology, and in particular to soil temperature calculation methods and systems. Background Technology

[0002] Pipeline transportation of oil is a common method, especially for large-scale oil transport and long-distance pipelines. Soil temperature is a significant influencing factor during pipeline oil transport, as it affects the flowability and viscosity of oil within the pipeline. Therefore, accurate measurement and calculation of soil temperature are essential.

[0003] Currently, the soil temperature used for some pipelines is measured by soil temperature measuring instruments at the station. This method can simply and intuitively display the soil temperature value. However, some pipelines have complex terrain along their routes, making it difficult to measure the soil temperature along the route. Summary of the Invention

[0004] To overcome the problems existing in related technologies, this specification provides a soil temperature calculation method and device that can accurately calculate the soil temperature along the pipeline.

[0005] This application provides a method for calculating soil temperature, including:

[0006] Acquire pipeline operation data; the pipeline operation data includes the first station outlet oil temperature, the first station outlet pressure, the last station inlet pressure, and the pipeline flow rate during operation;

[0007] Randomly generate simulated soil temperature;

[0008] The pipeline operation data and simulated soil temperature are input into the petroleum hydrothermal transient model to obtain the simulated terminal station inlet oil temperature; the petroleum hydrothermal transient model includes the relationship between the simulated terminal station inlet oil temperature and the change of the hydrothermal state of oil in the pipeline over time.

[0009] Based on the pipeline operating status, the simulated inlet oil temperature is adjusted according to the error between the simulated terminal inlet oil temperature and the actual terminal inlet oil temperature, until the error between the simulated terminal inlet oil temperature and the actual terminal inlet oil temperature meets the preset error, thereby obtaining the soil temperature along the pipeline.

[0010] Furthermore, the step of adjusting the simulated soil temperature based on the relationship between the simulated terminal station inlet oil temperature and the simulated terminal station inlet oil temperature according to the pipeline operating status, to obtain the soil temperature along the pipeline, includes:

[0011] If the change in the operating data of the terminal station inlet oil temperature pipeline over time is within a preset range, calculate the first error between the simulated terminal station inlet oil temperature and the actual terminal station inlet oil temperature;

[0012] If the first error is less than the first preset error, the simulated soil temperature will be taken as the soil temperature along the pipeline.

[0013] If the first error is greater than the first preset error, the simulated soil temperature is adjusted, and the simulated terminal station inlet oil temperature is regenerated using the petroleum hydrothermal transient model. The first error is calculated based on the regenerated simulated terminal station inlet oil temperature until the first error is less than the first preset error, thus obtaining the soil temperature along the pipeline.

[0014] Furthermore, the step of adjusting the simulated soil temperature based on the relationship between the simulated terminal station inlet oil temperature and the terminal station inlet oil temperature according to the pipeline operating status to obtain the soil temperature along the pipeline also includes:

[0015] If the change in the operating data of the terminal station inlet oil temperature pipeline over time is not within the preset change range, a first change trend of the terminal station inlet oil temperature within a preset time period is generated, and a second error between the simulated terminal station inlet oil temperature and the actual terminal station inlet oil temperature, as well as a second change trend of the simulated terminal station inlet oil temperature, are calculated.

[0016] If the second error is less than the second preset error and the second change trend is consistent with the first change trend, the simulated soil temperature is taken as the soil temperature along the pipeline.

[0017] If the second error is greater than the second preset error or the second trend of change is inconsistent with the first trend of change, the simulated soil temperature is adjusted, and the simulated terminal station inlet oil temperature is regenerated through the petroleum hydrothermal transient model. The second error and the second trend of change are calculated based on the regenerated simulated terminal station inlet oil temperature until the second error is less than the second preset error and the second trend of change is consistent with the first trend of change, thus obtaining the soil temperature along the pipeline.

[0018] Furthermore, the oil-water thermodynamic transient model is constructed based on the movement state of the oil within the pipeline; the construction process of the oil-water thermodynamic transient model includes:

[0019] Based on the momentum change and mass change of the oil moving in the pipeline, the hydraulic transient relationship of the oil moving in the pipeline is constructed.

[0020] Thermodynamic transient relationship is obtained by solving the heat flux density through the internal energy change relationship of the oil, and the oil-water thermodynamic transient model is obtained based on the hydraulic transient relationship and the thermodynamic transient relationship.

[0021] Furthermore, the hydraulic transient relationship includes a first oil motion relationship; the first oil motion relationship is constructed based on the momentum change of the oil moving within the pipeline; the process of constructing the first oil motion relationship includes:

[0022] Based on the changes in the oil as it moves within the pipeline, an initial motion relationship is constructed;

[0023] Calculate the frictional resistance based on the hydraulic friction coefficient of the oil flowing in the pipeline and the flow rate at the pipeline cross-section.

[0024] The first oil motion relationship is obtained by relating the frictional resistance to the flow direction of the oil within the pipeline; the frictional resistance is opposite to the flow direction of the oil within the pipeline.

[0025] Furthermore, the hydraulic transient relationship includes a second oil motion relationship; the second oil motion relationship is constructed based on the mass change of the oil as it moves within the pipeline; the process of constructing the second oil motion relationship includes:

[0026] The initial change relationship is obtained based on the direction of movement of the oil within the pipeline;

[0027] Based on the incompressibility of petroleum, the density-time relationship in the initial change relationship is simplified to obtain the second petroleum motion relationship.

[0028] Furthermore, the expression for the petroleum-hydrothermal transient model is as follows:

[0029]

[0030] Where ρ is the oil density, f is the hydraulic friction coefficient; g is the gravitational acceleration, m is the flow coefficient, Q is the pipeline flow rate, p is the pipeline pressure; v is the kinematic viscosity of the oil, A is the cross-sectional area of ​​the pipeline, t is time, x is distance, a is the pressure wave velocity, q is the heat flux density, and c is the hydraulic friction coefficient. p α is the specific heat capacity at constant pressure of the oil, T is the oil flow temperature, and D is the outer diameter of the pipe; p H is the coefficient of thermal expansion of the oil; H is the pressure head.

[0031] This application provides a soil temperature calculation system, including one or more processors, for implementing any of the soil temperature calculation methods described above.

[0032] This application provides a computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the method described in any of the preceding claims.

[0033] This application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the preceding claims.

[0034] In the above embodiments, since the oil hydrothermal model generates the simulated terminal station inlet oil temperature corresponding to the simulated soil temperature based on the change of hydrothermal state over time, and then verifies the simulated terminal station inlet oil temperature against the simulated soil temperature based on the actual terminal station inlet oil temperature, and adjusts the simulated soil temperature, the accuracy of the soil temperature along the pipeline is ensured. Attached Figure Description

[0035] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.

[0036] Figure 1 This is a flowchart of a soil temperature calculation method in one embodiment of this application;

[0037] Figure 2 This is a schematic diagram of the process for constructing a petroleum hydrothermal transient model in another embodiment;

[0038] Figure 3 This is a graph showing the trend of soil temperature change in one embodiment;

[0039] Figure 4 The diagram shown is a schematic representation of the soil temperature calculation structure according to an embodiment of this application.

[0040] Figure 5 The diagram shown is a block diagram of the soil temperature calculation module in an embodiment of this application. Detailed Implementation

[0041] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.

[0042] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0043] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0044] The embodiments described in this specification will now be described in detail.

[0045] like Figure 1 As shown, Figure 1 This is a flowchart illustrating a soil temperature calculation method according to an exemplary embodiment, comprising the following steps:

[0046] Step S102: Obtain pipeline operation data; pipeline operation data includes the first station outlet oil temperature, the first station outlet pressure, the last station inlet pressure, and the pipeline flow rate during operation.

[0047] Pipeline operation data refers to various data obtained through monitoring, detection, and recording methods when oil moves through pipelines. Pipeline operation data includes, but is not limited to, the following: oil temperature at the first station exit, pressure at the first station exit, pressure at the last station inlet, and pipeline flow rate during operation.

[0048] The first station exit oil temperature refers to the oil temperature when oil is transported at the starting station or the starting station of each station in the pipeline transportation system; the last station inlet oil temperature refers to the oil temperature when oil is received at the terminal station or the terminal station of each station in the pipeline transportation system.

[0049] The first-station outgoing pressure refers to the pressure used when transporting oil at the starting station or the initial station of each station in the pipeline transportation system. The last-station incoming pressure refers to the pressure at the receiving station of oil at the terminal station or the terminal station of each station in the pipeline transportation system. These pressures depend on multiple factors, including the design of the pipeline, the pipeline diameter, the type of oil being transported, the transportation distance, and the location of pumping stations, etc.

[0050] Step S104: Randomly generate simulated soil temperature.

[0051] Optionally, a simulated soil temperature can be generated based on the soil temperature measured by soil temperature measuring instruments within the site, combined with climatic factors. For example, to calculate the soil temperature along the pipeline between site A and site B, a simulated soil temperature can be generated based on the measured soil temperatures at both sites, along with climatic factors. For instance, if the soil temperature at site A is 10℃ and at site B is 11℃, and the current climate is precipitation, the simulated soil temperature would be set to 10.3℃; if the current climate is sunshine, the simulated soil temperature would be set to 10.5℃. This reduces the difference between the simulated and actual soil temperatures, thus minimizing subsequent adjustments to the simulated soil temperature.

[0052] Step S106: Input pipeline operation data and simulated soil temperature into the petroleum hydrothermal transient model to obtain the simulated terminal station inlet oil temperature; the petroleum hydrothermal transient model includes the relationship between the simulated terminal station inlet oil temperature and the change of hydrothermal state of oil in the pipeline over time.

[0053] The hydrothermal state refers to the sum of the hydraulic state and the thermal state. The hydraulic state mainly describes the flow of fluid in the pipe, and the main parameters are the flow rate of the pipe section, the hydraulic friction coefficient, the pressure, and the inner diameter of the pipe. The more important fluid physical properties are the density and viscosity of the fluid. The thermal state mainly describes the temperature change of the fluid in the pipe, and the main parameters are the fluid temperature, the overall heat transfer coefficient, and the outer diameter of the pipe. The more important fluid physical properties are the density and specific heat capacity of the fluid.

[0054] Among them, the hydrothermal model is a pre-constructed mathematical model used to describe the changes in the hydrothermal state of oil over time as it flows in a pipeline.

[0055] After inputting pipeline operation data and simulated soil temperature into the oil-water thermodynamic transient model, the model will calculate the simulated terminal station inlet oil temperature corresponding to the pipeline operation data and simulated soil temperature based on the relationship between the hydrothermal state and time.

[0056] It should be noted that the pipeline operation data will carry the actual oil temperature at the terminal station inlet, but when solving the problem, all data other than the oil temperature at the terminal station inlet should be input to obtain the simulated oil temperature at the terminal station inlet.

[0057] Step S108: Based on the pipeline operating status, simulate the soil temperature according to the error between the simulated terminal inlet oil temperature and the terminal inlet oil temperature, until the error between the simulated terminal inlet oil temperature and the terminal inlet oil temperature meets the preset error, and obtain the soil temperature along the pipeline.

[0058] Because the oil temperature at the terminal station inlet differs during the pipeline's stable phase and the restart phase after shutdown, different verification methods are used to verify the accuracy of the simulated inlet oil temperature based on the pipeline's operating status. This involves calculating the difference between the simulated terminal station inlet oil temperature and the actual terminal station inlet oil temperature, and then determining whether to adjust the simulated soil temperature based on this difference. For example, if the accuracy verification of the terminal station inlet oil temperature against the simulated terminal station inlet oil temperature passes, meaning the error between the simulated and actual terminal station inlet oil temperatures meets the preset requirements, then the simulated soil temperature is used as the soil temperature along the pipeline route. It is important to emphasize that this simulated soil temperature refers to the soil temperature along the pipeline route from the first station to the last station in this section of the pipeline. In the example above, this is the soil temperature along the pipeline route between station A and station B, not the soil temperature along the entire pipeline route. Otherwise, adjust the simulated soil temperature, recalculate the simulated terminal station inlet oil temperature based on the adjusted simulated soil temperature, and recalculate the error between the simulated terminal station inlet oil temperature and the terminal station inlet oil temperature. If the error is still not satisfied, repeat the above steps until the error between the simulated terminal station inlet oil temperature and the terminal station inlet oil temperature meets the preset requirements, and obtain the soil temperature along the pipeline.

[0059] In the above embodiments, since the oil hydrothermal model generates the simulated terminal station inlet oil temperature corresponding to the simulated soil temperature based on the change of hydrothermal state over time, and then verifies the simulated terminal station inlet oil temperature against the simulated soil temperature based on the actual terminal station inlet oil temperature, and adjusts the simulated soil temperature, the accuracy of the soil temperature along the pipeline is ensured.

[0060] Furthermore, in some embodiments, step S108 includes: if the change in the oil temperature at the terminal station inlet over time is within a preset range, calculating a first error between the simulated oil temperature at the terminal station inlet and the actual oil temperature at the terminal station inlet; if the first error is less than a first preset error, using the simulated soil temperature as the soil temperature along the pipeline; if the error is greater than the first preset error, adjusting the simulated soil temperature, regenerating the simulated oil temperature at the terminal station inlet using the petroleum-hydrothermal transient model, and calculating the first error based on the regenerated simulated oil temperature at the terminal station inlet, until the first error is less than the first preset error, thus obtaining the soil temperature along the pipeline.

[0061] The pipeline is considered stable when the change in oil temperature at the terminal station inlet over time falls within a preset range. This preset range is a pre-defined condition for determining pipeline stability. For example, if the change in oil temperature at the terminal station inlet is less than the preset range, the pipeline is considered stable. Conversely, if the change exceeds the preset range, the pipeline is considered unstable because during the restart phase after a shutdown, the thermal inertia of the existing oil causes a slower temperature change within the pipeline, resulting in a change in the oil temperature at the terminal station inlet.

[0062] If the change in the oil temperature at the final station inlet over time is within a preset range, indicating that the pipeline is in a stable state, the error between the simulated oil temperature at the final station inlet and the actual oil temperature at the final station inlet is calculated to obtain the first error. The first error represents the error between the simulated oil temperature at the final station inlet and the actual oil temperature at the final station inlet when the pipeline is in a stable operating state. If the first error is less than the first preset error, the simulated soil temperature is used as the soil temperature along the pipeline, because the simulated soil temperature at this time conforms to the relationship between the hydrothermal state of the oil along the pipeline and the change over time.

[0063] If the first error is greater than the first preset error, it indicates that the terminal station exit oil temperature generated by the simulated soil temperature does not conform to the time-varying relationship of the hydrothermal state along the pipeline. Therefore, it is necessary to adjust the simulated soil temperature and input the simulated soil temperature and pipeline operation data into the oil hydrothermal transient model to regenerate the simulated terminal station inlet oil temperature. Then, calculate the first error between the regenerated simulated terminal station inlet oil temperature and the actual terminal station inlet oil temperature. If the first error is satisfied, the regenerated simulated soil temperature is taken as the soil temperature along the pipeline. Otherwise, continue to adjust the simulated soil temperature and solve for the simulated terminal station inlet oil temperature, calculating the first error, until the first error satisfies the first preset error, thus obtaining the soil temperature along the pipeline.

[0064] Optionally, the simulated soil temperature can be adjusted with a preset step size, for example, using 0.25℃ as the preset step size to adjust the simulated soil temperature.

[0065] Furthermore, in some embodiments, step S108 further includes: if the change in the pipeline operating data of the terminal station inlet oil temperature over time is not within a preset range, generating a first trend of change of the terminal station inlet oil temperature within a preset time period, and calculating a second error between the simulated terminal station inlet oil temperature and the second trend of change of the simulated terminal station inlet oil temperature; if the second error is less than a second preset error and the second trend of change is consistent with the first trend of change, using the simulated soil temperature as the soil temperature along the pipeline; if the second error is greater than a second preset error or the second trend of change is inconsistent with the first trend of change, adjusting the simulated soil temperature, and regenerating the simulated terminal station inlet oil temperature using the petroleum hydrothermal transient model, and calculating the second error and the second trend of change based on the regenerated simulated terminal station inlet oil temperature, until the second error is less than the second preset error and the second trend of change is consistent with the first trend of change, thus obtaining the soil temperature along the pipeline.

[0066] Because the oil temperature at the terminal station inlet changes over time during the restart process after a shutdown, simply comparing the simulated terminal station inlet oil temperature with the actual terminal station inlet oil temperature does not allow for a judgment on the accuracy of the generated simulated terminal station inlet oil temperature. Therefore, it is necessary to consider the changing trend of the simulated terminal station inlet oil temperature when determining its accuracy.

[0067] If the change in the terminal station inlet oil temperature over time is within a preset range (i.e., the pipeline is in the restart phase after a shutdown), the terminal station inlet oil temperature is acquired within a preset time period, and a first trend is calculated based on this temperature. Simultaneously, the simulated terminal station inlet oil temperature and a second trend over time are calculated within the preset time period. The first trend represents the overall trend of the terminal station inlet oil temperature within the preset time period, and the second trend represents the overall trend of the simulated terminal station inlet oil temperature within the preset time period.

[0068] Simultaneously, the error between the simulated final station inlet oil temperature and the actual final station inlet oil temperature at the corresponding time point is calculated to obtain the second error. The second error represents the difference between the simulated final station inlet oil temperature and the actual final station inlet oil temperature during the startup phase after shutdown.

[0069] If the second error satisfies the second preset error and the second change trend is consistent with the first change trend, then the simulated soil temperature will be used as the soil temperature along the pipeline.

[0070] If the second error does not meet the second preset error and the second trend is inconsistent with the first trend, the simulated soil temperature is adjusted, and the adjusted simulated soil temperature and pipeline operation data are input into the petroleum hydrothermal transient model to regenerate the simulated terminal station inlet oil temperature. Then, the second error between the regenerated simulated terminal station inlet oil temperature and the simulated terminal station inlet oil temperature, as well as the second trend of the simulated inlet oil temperature, are calculated. If the second error and the second trend are consistent with the first trend, the regenerated simulated soil temperature is taken as the soil temperature along the pipeline. Otherwise, the simulated soil temperature is adjusted, and the simulated terminal station inlet oil temperature is solved, and the second error and the second trend are calculated, until the second error is less than the second preset error and the second trend is consistent with the first trend, thus obtaining the soil temperature along the pipeline.

[0071] In the above embodiments, different error judgment methods are adopted according to the changes in oil temperature at the terminal station during the pipeline's stable phase and the restart phase after shutdown, so as to ensure accurate generation of soil temperature along the pipeline.

[0072] Furthermore, in some embodiments, combined with Figure 2 , Figure 2 This is a schematic diagram of the process for constructing a petroleum-water thermodynamic transient model in one embodiment.

[0073] Step S202: Based on the momentum change and mass change of the oil moving in the pipeline, construct the hydraulic transient switch of the oil moving in the pipeline.

[0074] The hydraulic transient relationship includes the first oil motion relationship; the first oil motion relationship is constructed based on the momentum change of oil moving in the pipeline; the construction process of the first oil motion relationship includes: constructing an initial motion relationship based on the changes in oil moving in the pipeline; calculating the frictional resistance based on the hydraulic friction coefficient of oil flowing in the pipeline and the flow rate of the pipeline section; obtaining the first oil motion relationship through the relationship between the frictional resistance and the flow direction of oil in the pipeline; the frictional resistance is opposite to the flow direction of oil in the pipeline.

[0075] Based on the changes in the movement of oil within the pipeline, the initial motion relationship can be described as follows:

[0076]

[0077] Where V is the flow velocity of the oil, ρ is the density of the oil, p is the pipeline pressure, z and x represent different directions, and t is time.

[0078] The last term in formula (1) is the viscous force term. The viscous force term can be regarded as the effect of pipe friction. Since the direction of friction is always opposite to the flow direction of fluid in the pipe, the friction resistance can be calculated based on the hydraulic friction coefficient of oil flowing in the pipe and the flow rate of the pipe section. The friction resistance term is then used to replace the viscous force term to obtain the first oil motion relationship.

[0079] The viscous force term can be expressed as formula (2).

[0080]

[0081] Where f is the hydraulic friction coefficient, Q is the pipe flow rate, m is the flow regime coefficient, and g is the acceleration due to gravity. Since the flow rate is equal to the product of the velocity and the pipe cross-sectional area, the derivative of the velocity with respect to time is converted into the flow rate form, that is, the velocity V is equal to the flow rate Q divided by the pipe cross-sectional area A.

[0082] Based on equations (1) and (2), the first oil motion relationship can be obtained as follows:

[0083]

[0084] Among them, the hydraulic transient relationship includes the second oil motion relationship; the second oil motion relationship is constructed based on the mass change of oil moving in the pipeline; the construction process of the second oil motion relationship includes: obtaining the initial change relationship based on the direction of oil movement in the pipeline; and simplifying the density-time change relationship in the initial change relationship based on the incompressibility of oil to obtain the second oil motion relationship.

[0085] According to the law of conservation of mass, the continuity equation in the Cartesian coordinate system is expressed as formula (4).

[0086]

[0087] Where x, y, z represent different directions, u, v, w are the velocity components in the x, y, and z directions respectively, ρ is the density, and t is the time.

[0088] Since the oil flows only in the x-direction within the pipeline, with u = V(x,t), and the velocity in the y and z directions is 0, with v = w = 0, the initial velocity relationship can be expressed as:

[0089]

[0090] Rewriting the first term in formula (5) in total derivative form, since the total derivative of density with respect to time is equal to the sum of the partial derivatives of density with respect to time and the x-direction, see formula (6).

[0091]

[0092] Therefore, by simplifying formula (5) using formula (6), the initial change relationship can be simplified to formula (7).

[0093]

[0094] To eliminate the partial derivative of density ρ with respect to time t in the above equation, for incompressible fluids, according to the definition of the bulk elastic coefficient of liquids, see formula (8):

[0095]

[0096] Where K represents the overall heat transfer coefficient between the oil flow and the environment.

[0097] Since oil is an incompressible fluid, a wave velocity formula is introduced, see formula (9).

[0098]

[0099] Where a represents the water hammer wave velocity, ΔA represents the change in the cross-sectional area of ​​the pipe, and ΔP represents the pressure change.

[0100] By introducing the wave velocity formula, the relationship between the velocity and density of oil can be expressed. This not only allows for a better understanding of the movement of oil, but also enables the deriving of a second oil motion relationship by removing the partial derivative of density with respect to time in formula (8), as shown in formula (10).

[0101]

[0102] Based on formulas (10) and (3), the hydraulic transient model can be obtained, as shown in formula (11). The hydraulic transient model is a mathematical model used to describe the transient oil flow behavior in a pipeline system.

[0103]

[0104] According to Bernoulli's equation for incompressible ideal fluids, see formula (12). Since the velocity term is of a small order of magnitude, it can be ignored. The partial derivative of pressure P with respect to the x-direction in the above hydraulic transient model can be converted into the partial derivative of head H with respect to the x-direction. This allows the pressure unit to be converted to meters for easier calculation. Bernoulli's equation is shown in formula (13):

[0105]

[0106]

[0107] Because when transient changes occur inside the pipe, the time derivatives of flow rate Q and head H are much greater than the x-direction derivatives of flow rate Q and head H. Therefore, the hydraulic transient model can be further simplified to formula (14):

[0108]

[0109] Where H represents pressure head.

[0110] Step S204: Solve the heat flux density through the internal energy change relationship of oil to obtain the thermodynamic transient relationship, and obtain the oil-water thermodynamic transient model based on the hydraulic transient relationship and the thermodynamic transient relationship.

[0111] Among them, the energy change relationship inside the oil refers to the law of conservation of energy inside the oil. Taking the fluid element inside the pipe as the thermal balance control body, according to the energy conservation condition, we can obtain: the energy increment inside the control body per unit time is equal to the sum of the work done on the control body by the outside world per unit time, the energy increment inside the control body, the heat generated by friction, and the heat exchange between the outside environment and the control body. In one-dimensional flow, the energy conservation equation is shown in formula (15).

[0112]

[0113] One-dimensional flow refers to the linear flow of oil along the entire surface. Substituting the energy conservation equation into the hydraulic transient relation, the thermodynamic density is solved to obtain the thermodynamic transient model, as shown in formula (16).

[0114]

[0115] Where q is the heat flux density, c p Let D be the specific heat capacity of the oil at constant pressure, D be the outer diameter of the pipe, τ be time, and α be the value of α. p The coefficient of thermal expansion of the oil is... T represents the oil flow temperature.

[0116] Finally, based on the hydraulic transient relationship and the thermodynamic transient relationship, the oil-water thermodynamic transient model is obtained, which can be expressed as formula (17).

[0117]

[0118] In the above embodiments, based on the changes in various physical quantities of oil during its flow within the pipeline, a hydrothermal transient model can be established that accurately describes the relationship between the hydrothermal state of oil and time during pipeline flow. It should be noted that changes in soil temperature can be described using any time unit; the smaller the time unit, the more accurate the description. Here, t and τ both represent time variables. This is because temperature is less frequently involved in fluid mechanics, so time is often represented by the lowercase letter t; while in heat transfer, temperature is often represented by the letter t, so time is represented by the Roman letter τ, but the meaning remains the same.

[0119] For example, for the JY refined oil pipeline, the outlet temperature at the terminal station is lower than the measured soil temperature within the station site during some months of operation. Since the Shukhov formula is used for thermodynamic calculations when the outlet temperature at the terminal station is higher than the measured soil temperature, it cannot be used in the above situation. The Shukhov formula is shown in formula (18).

[0120] T L =(T0+b)+[T R -(T0+b)]e -aL

[0121]

[0122]

[0123] Among them, T L To calculate the temperature, for example, the oil temperature at the final station inlet, T R The first station's oil temperature is given by: K is the overall heat transfer coefficient of the pipeline, D is the outer diameter of the pipeline, c is the specific heat capacity of the oil, T0 is the ambient temperature (i.e., soil temperature), and L is the distance from the first station's temperature or starting point.

[0124] Therefore, a petroleum hydrothermal transient model was used to solve for the soil temperature. The relative error was minimized by comparing the measured oil temperature at the terminal station with the simulated soil temperature, as detailed in Table 1. The various errors caused by the simulated soil temperature were calculated, as shown in Table 2. The relative error was calculated as follows: Relative Error = (Calculated Parameters - Measured Parameters) / (Measured Parameters).

[0125] Table 1. Measured soil temperature and outlet temperature values ​​for the J-Y refined oil pipeline.

[0126]

[0127]

[0128] Table 2. Simulation Calculation Results of J-Y Refined Oil Pipeline

[0129]

[0130]

[0131] In addition, this embodiment also summarizes the measured soil temperature values ​​and simulated soil temperature values ​​(i.e., simulated soil temperature values) at the first and last stations in Table 1, and their trends over time. See Table 1 for details. Figure 3 . Figure 3 This is a graph showing the trend of soil temperature change in one embodiment. From... Figure 3 As can be seen, the three factors show the same trend over time, but the magnitude of change differs. The same trend indicates that the temperature rises and falls in the same direction throughout the year, while the different magnitudes indicate different maximum and minimum values. In this embodiment, the simulated soil temperature generated for the JY refined oil pipeline is compared to further verify the accuracy of the simulated soil temperature.

[0132] Figure 4 The diagram shown is a structural schematic of the soil temperature calculation device according to an embodiment of this application.

[0133] like Figure 4 As shown in the embodiment of this application, the soil temperature calculation device includes the following modules:

[0134] The data acquisition module 410 is used to acquire pipeline operation data, including the first station outlet oil temperature, the first station outlet pressure, the last station inlet pressure, and the pipeline flow rate during operation.

[0135] Temperature generation module 420 is used to randomly generate simulated soil temperatures.

[0136] The calculation module 430 is used to input pipeline operation data and simulated soil temperature into the petroleum hydrothermal transient model to obtain the simulated terminal station inlet oil temperature; the petroleum hydrothermal transient model includes the relationship between the simulated terminal station inlet oil temperature and the change of hydrothermal state of oil in the pipeline over time.

[0137] The adjustment module 440 is used to adjust the simulated soil temperature based on the error between the simulated terminal station inlet oil temperature and the terminal station inlet oil temperature according to the pipeline operating status, until the error between the simulated terminal station inlet oil temperature and the terminal station inlet oil temperature meets the preset error, thereby obtaining the soil temperature along the pipeline.

[0138] In one embodiment, the adjustment module 440 is further configured to: if the change in the pipeline operating data of the terminal station inlet oil temperature over time is within a preset range, calculate the first error between the simulated terminal station inlet oil temperature and the terminal station inlet oil temperature; if the first error is less than the first preset error, use the simulated soil temperature as the soil temperature along the pipeline; if the error is greater than the first preset error, adjust the simulated soil temperature, regenerate the simulated terminal station inlet oil temperature using the petroleum hydrothermal transient model, and calculate the first error based on the regenerated simulated terminal station inlet oil temperature, until the first error is less than the first preset error, and obtain the soil temperature along the pipeline.

[0139] In one embodiment, the adjustment module 440 is further configured to: generate a first trend of change of the oil temperature at the terminal station within a preset time period if the change in the pipeline operating data of the terminal station inlet oil temperature over time is not within a preset range; calculate a second error between the simulated terminal station inlet oil temperature and the simulated terminal station inlet oil temperature, and a second trend of change of the simulated terminal station inlet oil temperature; if the second error is less than a second preset error and the second trend of change is consistent with the first trend of change, use the simulated soil temperature as the soil temperature along the pipeline; if the second error is greater than a second preset error or the second trend of change is inconsistent with the first trend of change, adjust the simulated soil temperature, regenerate the simulated terminal station inlet oil temperature using the petroleum hydrothermal transient model, and calculate the second error and the second trend of change based on the regenerated simulated terminal station inlet oil temperature, until the second error is less than the second preset error and the second trend of change is consistent with the first trend of change, thereby obtaining the soil temperature along the pipeline.

[0140] In one embodiment, the calculation module 430 is further used to construct a petroleum-water thermodynamic transient model, wherein the process of constructing the petroleum-water thermodynamic transient model includes: constructing a hydraulic transient relationship of petroleum moving in the pipeline based on the momentum change and mass change of petroleum during its movement; solving the heat flux density from the hydraulic transient relationship to obtain the thermodynamic transient relationship through the energy change relationship inside the petroleum; and obtaining the petroleum-water thermodynamic transient model based on the hydraulic transient relationship and the thermodynamic transient relationship.

[0141] In one embodiment, the calculation module 430 is further configured to construct a first oil motion relationship, wherein the process of constructing the first oil motion relationship includes: constructing an initial motion relationship based on the changes in oil movement within the pipeline; calculating the frictional resistance based on the hydraulic friction coefficient and the flow rate of the pipeline section when the oil flows within the pipeline; obtaining the first oil motion relationship through the relationship between the frictional resistance and the flow direction of the oil within the pipeline; the frictional resistance is opposite to the flow direction of the oil within the pipeline.

[0142] In one embodiment, the calculation module 430 is further configured to construct a second petroleum motion relationship, wherein the construction process of the second petroleum motion relationship includes: obtaining an initial change relationship based on the direction of movement of petroleum within the pipeline; and simplifying the density-time change relationship in the initial change relationship based on the incompressibility of petroleum to obtain the second petroleum motion relationship.

[0143] This application also provides an electronic device for implementing the soil temperature calculation method in any of the above embodiments. For example... Figure 5 As shown, the electronic device 500 may include a computer-readable storage medium 590, which may store a program that can be called by the processor 510, and may include a non-volatile storage medium.

[0144] In some embodiments, electronic device 500 may include memory 580 and interface 570.

[0145] In some embodiments, the electronic device 500 may also include other hardware depending on the actual application.

[0146] The computer-readable storage medium 590 of this application embodiment stores a program that, when executed by the processor 510, is used to implement the soil temperature calculation method described above.

[0147] This application may take the form of a computer program product implemented on one or more readable storage media 590 (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing program code. The readable storage media 590 includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information may be computer-readable instructions, data structures, program modules, or other data. Examples of readable storage media 590 include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0148] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

[0149] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A method for calculating soil temperature, characterized in that, The method includes: Acquire pipeline operation data; the pipeline operation data includes the first station outlet oil temperature, the first station outlet pressure, the last station inlet pressure, and the pipeline flow rate during operation; Randomly generate simulated soil temperature; The pipeline operation data and the simulated soil temperature are input into the petroleum hydrothermal transient model to obtain the simulated terminal station inlet oil temperature; the petroleum hydrothermal transient model includes the relationship between the simulated terminal station inlet oil temperature and the change of the hydrothermal state of oil during the flow of oil in the pipeline over time. Based on the pipeline operating status, the simulated soil temperature is adjusted according to the error between the simulated terminal station inlet oil temperature and the terminal station inlet oil temperature until the error between the simulated terminal station inlet oil temperature and the terminal station inlet oil temperature meets the preset error, thereby obtaining the soil temperature along the pipeline. The step of adjusting the simulated soil temperature based on the error between the simulated terminal station inlet oil temperature and the actual terminal station inlet oil temperature, according to the pipeline operating status, until the error between the simulated terminal station inlet oil temperature and the actual terminal station inlet oil temperature meets a preset error, to obtain the soil temperature along the pipeline, includes: If the change in the oil temperature at the final station inlet over time is within a preset range, calculate the first error between the simulated oil temperature at the final station inlet and the actual oil temperature at the final station inlet. If the first error is less than the first preset error, the simulated soil temperature will be taken as the soil temperature along the pipeline. If the first error is greater than the first preset error, the simulated soil temperature is adjusted, and the simulated terminal station inlet oil temperature is regenerated using the petroleum hydrothermal transient model. The first error is calculated based on the regenerated simulated terminal station inlet oil temperature until the first error is less than the first preset error, thus obtaining the soil temperature along the pipeline.

2. The soil temperature calculation method according to claim 1, characterized in that, The step of adjusting the simulated soil temperature based on the error between the simulated terminal station inlet oil temperature and the actual terminal station inlet oil temperature, according to the pipeline operating status, until the error between the simulated terminal station inlet oil temperature and the actual terminal station inlet oil temperature meets a preset error, to obtain the soil temperature along the pipeline, further includes: If the change in the oil temperature at the terminal station is not within the preset range, a first trend of change in the oil temperature at the terminal station within a preset time period is generated, and a second error between the simulated oil temperature at the terminal station and the actual oil temperature at the terminal station, as well as a second trend of change in the simulated oil temperature at the terminal station, are calculated. If the second error is less than the second preset error and the second change trend is consistent with the first change trend, the simulated soil temperature is taken as the soil temperature along the pipeline. If the second error is greater than the second preset error or the second trend of change is inconsistent with the first trend of change, the simulated soil temperature is adjusted, and the simulated terminal station inlet oil temperature is regenerated through the petroleum hydrothermal transient model. The second error and the second trend of change are calculated based on the regenerated simulated terminal station inlet oil temperature until the second error is less than the second preset error and the second trend of change is consistent with the first trend of change, thus obtaining the soil temperature along the pipeline.

3. The soil temperature calculation method according to claim 1, characterized in that, The oil-water thermodynamic transient model is constructed based on the motion state of the oil within the pipeline; the construction process of the oil-water thermodynamic transient model includes: Based on the momentum change and mass change of the oil moving in the pipeline, the hydraulic transient relationship of the oil moving in the pipeline is constructed. Thermodynamic transient relationship is obtained by solving the heat flux density through the energy change relationship inside oil and the hydraulic transient relationship. Based on the hydraulic transient relationship and the thermodynamic transient relationship, the oil-water thermodynamic transient model is obtained.

4. The soil temperature calculation method according to claim 3, characterized in that, The hydraulic transient relationship includes a first oil motion relationship; the first oil motion relationship is constructed based on the momentum change of the oil moving within the pipeline; the process of constructing the first oil motion relationship includes: Based on the changes in the oil as it moves within the pipeline, an initial motion relationship is constructed; Calculate the frictional resistance based on the hydraulic friction coefficient of the oil flowing in the pipeline and the flow rate at the pipeline cross-section; The first oil motion relationship is obtained by relating the frictional resistance to the flow direction of the oil within the pipeline; the frictional resistance is opposite to the flow direction of the oil within the pipeline.

5. The soil temperature calculation method according to claim 3, characterized in that, The hydraulic transient relationship includes a second oil motion relationship; the second oil motion relationship is constructed based on the mass change of the oil as it moves within the pipeline; the process of constructing the second oil motion relationship includes: The initial change relationship is obtained based on the direction of movement of the oil within the pipeline; Based on the incompressibility of petroleum, the density-time relationship in the initial change relationship is simplified to obtain the second petroleum motion relationship.

6. The soil temperature calculation method according to claim 1, characterized in that, The expression for the petroleum hydrothermal transient model is as follows: Where ρ is the density of the oil. f ρ is the hydraulic friction coefficient; g is the gravitational acceleration; m is the flow coefficient; Q is the pipe flow rate; p is the pipe pressure; v is the kinematic viscosity of the oil; A is the cross-sectional area of ​​the pipe; t and τ are time; x is distance; a is the pressure wave velocity; q is the heat flux density; c p α is the specific heat capacity at constant pressure of the oil, T is the oil flow temperature, and D is the outer diameter of the pipe; p is the coefficient of thermal expansion of the oil; H is the pressure head.

7. A soil temperature calculation system, 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, it implements the soil temperature calculation method according to any one of claims 1 to 6.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the soil temperature calculation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Flow failure mode judgment method of underground heat oil pipe in high-water-content soil

    CN104199804A

  • An on-line simulation method of a large-scale complex natural gas pipeline network system

    CN109344436A