A method for constructing a digital twin of a natural gas plant process system and a model
By building a digital twin of the natural gas station, the problems of data circulation and limited metadata reading were solved, enabling full-process tracking and safety monitoring, improving efficiency and reducing costs, and supporting real-time optimization and visualization.
Patent Information
- Application Number
- CN202210833862.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-14
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2042-07-14
AI Technical Summary
The existing technology for constructing digital twins of natural gas stations does not reflect data circulation, cannot effectively compare twin data with real data, and lacks online calculation or reading methods for limited metadata, resulting in the inability to achieve full-process tracking and safety monitoring of natural gas stations.
Numerical simulation generates 3D modeling and simulation data, establishes a database and imports online data to achieve data visualization, and compares online data and twin data in the platform's interactive interface, adjusts the data in the database, and uses CGNS, dat, case, or stp format files for data reading and processing.
It enables full-process tracking and safety monitoring of the natural gas station process system, improving efficiency and reducing costs, providing internal flow visualization and parameterized adjustment capabilities, and supporting real-time optimization of structure and process.
Smart Images

Figure CN117436228B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent natural gas gathering and transmission systems, and specifically relates to a method and model for constructing a digital twin of a natural gas station process system. Background Technology
[0002] The Industry 4.0 era has spawned a variety of digital technologies, leading to the widespread development of the digital twin concept. Digital twins are involved in aerospace, automobile manufacturing, oil and gas pipelines, wastewater treatment, and are beginning to be applied to grassroots oil and gas field stations. Building digital twin systems can improve the intelligence level of key production facilities at oil and gas stations, promoting the construction of smart oil and gas fields.
[0003] Corrosion and erosion in natural gas pipelines are caused by a variety of factors, including operating flow velocity, flow state, particle size, liquid content, and liquid pH. To expand the application of erosion assessment technology, it is necessary to integrate and obtain these parameters and establish an assessment method through the coordination of these parameters. Furthermore, erosion and corrosion are time-dependent; in addition to considering the changes in each parameter over time, it is also necessary to obtain dynamic wall thickness reduction through the accumulation of a certain period.
[0004] Although the pressure rating, maximum flow rate, and pressure regulation range of each process equipment and fitting are considered from the initial design stage, the internal flow velocity and its distribution under operating conditions are not clearly defined. Flow velocity is a crucial factor affecting erosion rate, but the complex on-site conditions make it difficult to measure and obtain the flow velocity inside the equipment. Therefore, a combination of calculation and experimentation is needed to monitor the flow velocity and its distribution in real time.
[0005] To this end, various parameters were integrated and extracted from the existing production system, and a background algorithm was established. Combining CFD (Computational Fluid Dynamics) analysis and experimental results comparison, a data platform with extraction, display, and background calculation functions was developed through a C++ modeling platform.
[0006] In the existing technology, regarding the construction of digital twin systems for natural gas stations, CN113837451A proposes a method for constructing digital twins of oil and gas pipelines. Its main idea is as follows:
[0007] ① Obtain static data of oil and gas pipelines from the oil and gas pipeline design platform; construct a three-dimensional pipeline network environment based on the static data and map data;
[0008] ② Obtain the first production data of the oil and gas pipeline from the oil and gas pipeline production system. The first production data is the production data generated by the actual operation of the oil and gas pipeline.
[0009] ③ Based on the first production data, the second production data for the oil and gas pipeline is predicted;
[0010] ③ Add the first production data and the second production data to the three-dimensional pipeline network environment to obtain the digital twin of the oil and gas pipeline.
[0011] This solution enables the construction of digital twins for oil and gas pipelines, allowing users to obtain simulated production data at various locations along the pipeline through the digital twin. This enables a comprehensive description and analysis of all elements of the oil and gas pipeline, ultimately providing full support for decision-making.
[0012] Its main technical approach is: information acquisition → numerical modeling → data processing → 3D data rendering → display.
[0013] However, the patent does not demonstrate the data loop, that is, how the twin data is compared with real data, nor does it show the online calculation or reading method of limited metadata.
[0014] CN113673134A proposes a method for constructing a digital twin of a cantilever beam structure, including the following steps:
[0015] ① Select the accelerometer and its installation location and method;
[0016] ②Based on the dimensions of the cantilever beam and the sensor design parameters, a digital model of it is constructed using CAD software;
[0017] ③ A microcontroller is used to design a data transmission interface to acquire the acceleration signal collected by the sensor;
[0018] ④ After filtering out noise and gravitational acceleration, the triaxial acceleration data of the cantilever beam structure are obtained;
[0019] ⑤ Obtain and save the displacement data of the cantilever beam structure using the double integral method;
[0020] ⑥ Use finite element analysis software to perform cyclic static mechanical simulation of the cantilever beam structure and obtain the simulation analysis results.
[0021] Its main technical approach is numerical modeling → information acquisition → data governance → numerical simulation → 3D information rendering → display. However, this twin does not demonstrate the data loop, that is, how the twin data is compared with real data, nor is there a method for online calculation or retrieval of limited metadata.
[0022] CN111523274A proposes a method for constructing a digital twin and a monitoring system for high-temperature pressure-bearing components of a steam turbine, including the following steps:
[0023] ① Using digital twin technology, a digital twin that is consistent with the physical characteristics of the high-temperature pressure-bearing components of the steam turbine is established;
[0024] ② A method for constructing a digital twin and a monitoring system for high-temperature pressure-bearing components of a steam turbine are presented;
[0025] ③ By employing artificial intelligence and cloud map reconstruction technology, the construction of a three-dimensional digital twin of the high-temperature pressure-bearing components of the steam turbine and the online display and monitoring of the temperature field, stress field and displacement field were realized;
[0026] ④ It enables the monitoring of the status of high-temperature pressure-bearing components of the steam turbine.
[0027] Its main technical approach is: numerical modeling → 3D information rendering → display.
[0028] CN112836404A proposes a method for constructing a digital twin of the structural performance of an intelligent excavator. By performing finite element analysis on key components during the excavation process, the relevant structural mechanical properties are obtained, which mainly include:
[0029] ① Collect key operating status data of critical components of intelligent excavators during the excavation process, and obtain key operating data through data processing and calculation;
[0030] ②Integrate sensor data with artificial intelligence algorithms and use predictive models to predict the structural performance of intelligent excavator parts under various unknown working conditions;
[0031] ③ Finally, computer graphics technology is used to model and render the performance data information to obtain a digital twin of the intelligent excavator's structural performance display, realizing the digital twin mapping of the performance information of key components of the intelligent excavator during the excavation process.
[0032] This invention utilizes sensors and artificial intelligence algorithms to calculate the structural mechanical properties of key components of intelligent excavators in real time under various operating conditions, enabling practical functions such as real-time display and monitoring of performance information, excavation trajectory display, feedback control, and fault early warning.
[0033] Its main technical approach is: sensor data → artificial intelligence → 3D information rendering → display.
[0034] In summary, most existing technologies that use numerical modeling → information acquisition → data governance → numerical simulation → 3D information rendering → display do not demonstrate the data cycle, how the twin data is compared with real data, or how the limited metadata is calculated or retrieved online. Summary of the Invention
[0035] To address the aforementioned issues, this invention provides a twin construction method and model for a natural gas station process system, which solves the problems in existing technologies that do not demonstrate data circulation, how twin data is compared with real data, or online calculation or retrieval methods for limited metadata.
[0036] A method for constructing a digital twin of a natural gas station process system.
[0037] Three-dimensional modeling data and simulation data are obtained from numerical simulation.
[0038] A database is established based on 3D modeling data and simulation data, and online data is imported into the database;
[0039] The digital twin is generated from online data and saved to a database. Data visualization is then achieved based on the database to obtain a digital twin.
[0040] Furthermore, the numerical simulation involves completing the full-site 3D modeling and numerical simulation of the target station to obtain 3D modeling data and simulation data;
[0041] The database is established based on the 3D modeling data and simulation data.
[0042] The process of importing online data involves extracting the required point alignment online data from the production system and importing the online data into the database.
[0043] The data visualization refers to importing and displaying 3D modeling data, simulation data, online data, and twin data in the platform's user interface;
[0044] After data visualization, the online data and the twin data are compared in the platform's user interface, and the data in the database is adjusted based on the comparison results.
[0045] Furthermore, the process for importing and reading 3D modeling data into the database specifically includes:
[0046] Determine if the input flow field is a CGNS, dat, case, or stp format file, and then open the flow field file cg_open;
[0047] Read the number of bases in the flow field: cg_nbases;
[0048] The precision of reading the flow field is cg_precision;
[0049] Read the number of zones in the flow field: cg_nzones; read the specific information of the zones: cg_base_read.
[0050] Read the number of units in the flow field, cg_nunits; read the unit type of each physical quantity, cg_units_read.
[0051] Read the zone type of the flow field: cg_zone_type;
[0052] The type and precision of the mesh determine whether the mesh being read is a structured mesh or an unstructured mesh.
[0053] Based on the grid dimension, read the grid information cg_coord_info and cg_coord_read;
[0054] The `cg_nbocos` function reads the number of boundary conditions, while the `cg_boco_info` function reads the specific information for each boundary condition.
[0055] Close the flow field file cg_close.
[0056] Furthermore, the data visualization specifically includes:
[0057] Vertex data input: Input the vertex data used to construct the triangular faces of the primitive;
[0058] The primitive coordinate information is transformed by matrix transformation, view volume clipping and coordinate normalization to output the coordinates of the vertices of the primitive triangle face in view space.
[0059] Rasterization converts the vertex information of primitive triangles into discrete element pieces in screen coordinates, thus determining the pixel points of the model on the screen.
[0060] Pixel coloring involves calculating the color material and depth information of the discrete element;
[0061] Test the discrete element fragment, and test its clipping information, alpha information, and depth information;
[0062] Hybrid fragments are used to combine the discrete fragments into a data visualization model.
[0063] Furthermore, the 3D modeling data is one or more of the following formats: CGNS, dat, case, or stp.
[0064] A digital twin model of a natural gas station process system.
[0065] The digital twin includes: a numerical simulation unit, a database storage unit, and a data visualization unit;
[0066] Numerical simulation unit, used to obtain 3D modeling data and simulation data;
[0067] The database storage unit is used to store 3D modeling data and simulation data obtained from numerical simulation, online data from the production system, and twin data generated based on the online data;
[0068] The data visualization unit is used for database-based visual data presentation.
[0069] Furthermore, the digital twin also includes:
[0070] The data comparison unit is used to compare online data and twin data. It compares online data and twin data in the user interface of the platform and adjusts the data in the database based on the comparison results.
[0071] Furthermore, the 3D modeling data import and retrieval process of the database storage unit specifically includes:
[0072] Determine if the input flow field is a CGNS, dat, case, or stp format file, and then open the flow field file cg_open;
[0073] Read the number of bases in the flow field: cg_nbases;
[0074] The precision of reading the flow field is cg_precision;
[0075] Read the number of zones in the flow field: cg_nzones; read the specific information of the zones: cg_base_read.
[0076] Read the number of units in the flow field, cg_nunits; read the unit type of each physical quantity, cg_units_read.
[0077] Read the zone type of the flow field: cg_zone_type;
[0078] The type and precision of the mesh determine whether the mesh being read is a structured mesh or an unstructured mesh.
[0079] Based on the grid dimension, read the grid information cg_coord_info and cg_coord_read;
[0080] The `cg_nbocos` function reads the number of boundary conditions, while the `cg_boco_info` function reads the specific information for each boundary condition.
[0081] Close the flow field file cg_close.
[0082] Furthermore, the data visualization unit specifically includes:
[0083] Vertex data input: Input the vertex data used to construct the triangular faces of the primitive;
[0084] The primitive coordinate information is transformed by matrix transformation, view volume clipping and coordinate normalization to output the coordinates of the vertices of the primitive triangle face in view space.
[0085] Rasterization converts the vertex information of primitive triangles into discrete element pieces in screen coordinates, thus determining the pixel points of the model on the screen.
[0086] Pixel coloring involves calculating the color material and depth information of the discrete element;
[0087] Test the discrete element fragment, and test its clipping information, alpha information, and depth information;
[0088] Hybrid fragments are used to combine the discrete fragments into a data visualization model.
[0089] Furthermore, the 3D modeling data is one or more of the following formats: CGNS, dat, case, or stp.
[0090] The digital twin of this invention is an information model that exists in computer virtual space and is completely equivalent to the physical entity of a natural gas station. Based on the digital twin, the physical entity of the natural gas station is simulated, analyzed and optimized.
[0091] The digital twin in this invention can realize the full-process tracking of the natural gas station process system, the tracking, simulation and prediction of various pipelines, and provide assistance for the safety monitoring and cost reduction and efficiency improvement of the natural gas station process system.
[0092] The digital twin in this invention brings obvious efficiency improvements and cost reductions to the natural gas station process system.
[0093] This invention, through its rational design, embodies the data loop from online data to twin data and from twin data back to online data. By comparing real-world online data with twin data in the model, it provides guidance for both online data and twin data respectively.
[0094] The digital twin proposed in this invention for the collection and transportation station is mainly used for operation monitoring. It can visualize and parameterize the internal flow, and adjust the structure, process, and products as needed.
[0095] The digital twin system proposed in this invention has strong data storage capabilities, allowing users to view past and online data, as well as trends.
[0096] The digital twin platform proposed in this invention can monitor flow and wall thickness reduction in real time; the deformation of key equipment can be viewed in real time in the database.
[0097] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description
[0098] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0099] Figure 1 A flowchart illustrating the method of the present invention is shown.
[0100] Figure 2 A schematic diagram of online data from the production system is shown.
[0101] Figure 3 A schematic diagram of the coordinate transformation process is shown.
[0102] Figure 4 A schematic diagram of rasterization generating pixels is shown.
[0103] Figure 5 A schematic diagram of the depth test-painter algorithm is shown.
[0104] Figure 6 A schematic diagram of the data in the PI production system is shown.
[0105] Figure 7 A contour map of the erosion area in the collection and transportation station of the embodiment is shown.
[0106] Figure 8 The pressure cloud map of the twin system in the station is shown in the embodiment.
[0107] Figure 9 A flow velocity contour map of the twin system in the collection and transportation station of an embodiment is shown.
[0108] Figure 10 A schematic diagram showing the model zoomed in and out is provided.
[0109] Figure 11 The model is shown in three views along the X-axis and three views along the Y-axis.
[0110] Figure 12 The model is shown in three views along the Z-axis.
[0111] Figure 13 A schematic diagram of vector field parameter settings is shown.
[0112] Figure 14 A schematic diagram of the comparative two-dimensional curve plotting is shown.
[0113] Figure 15 This diagram shows a user interface (UI) panel after the data has been imported.
[0114] Figure 16 The image shows a cloud map of erosion and wear monitoring in an embodiment of the Changning H11B platform.
[0115] Figure 17 The diagram shows a cloud map of internal gas flow velocity monitoring in an embodiment of the Changning H11B platform.
[0116] Figure 18 The diagram shows the internal pressure distribution monitoring cloud map of an embodiment of the Changning H11B platform.
[0117] Figure 19 The diagram shows a cloud map of erosion and wear monitoring in an embodiment of the Changning H7B platform.
[0118] Figure 20 The diagram shows a cloud map of internal gas flow velocity monitoring in an embodiment of the Changning H7B platform.
[0119] Figure 21 The diagram shows the internal pressure distribution monitoring cloud map of an embodiment of the Changning H7B platform.
[0120] Figure 22 The diagram shows the test results of the Changning H19B platform from April 2020 to July 2021.
[0121] Figure 23 The diagram shows the twin results (solid line) and online monitoring results (dashed line) of the desander-separator elbow 1 of the Changning H19B platform from April 2020 to July 2021.
[0122] Figure 24 The diagram shows the twin results (solid line) and online monitoring results (dashed line) of the desander-separator elbow 2 of the Changning H19B platform from April 2020 to July 2021.
[0123] Figure 25 A schematic diagram showing the pressure calculation results (running time 2021.6) of the Changning H19B platform is shown.
[0124] Figure 26 A schematic diagram showing the flow rate calculation results (running time 2021.6) of the Changning H19B platform is shown.
[0125] Figure 27 The diagram shows the first half of the sewage discharge process of the No. 1 separator on the Changning H19B platform.
[0126] Figure 28 The diagram shows the second half of the sewage discharge process of the No. 1 separator on the Changning H19B platform.
[0127] Figure 29 The diagram shows the online monitoring results of process wall thickness loss at No. 1 on the Changning H19B platform from April 2020 to July 2021. Detailed Implementation
[0128] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0129] In natural gas pipelines, flow velocity is a crucial factor affecting erosion rates. However, the flow velocity inside the equipment is immeasurable and difficult to obtain. In natural gas stations, erosion and corrosion are the most critical safety issues for station management and are prevalent, but the flow velocity inside the equipment remains immeasurable and difficult to obtain.
[0130] Online analysis to obtain a digital twin with a certain level of accuracy is a primary method for solving flow analysis and monitoring processes in stations, especially for parameters and states that cannot be monitored by IoT sensors, which can be accurately obtained online. Considering the large amount of data extraction and computation involved in building a digital twin, and the need for accuracy correction, a more precise design is required to create a high-performance, high-precision digital twin.
[0131] Existing technologies do not demonstrate data circulation, how twin data is compared with real-world data, or how limited metadata can be computed or retrieved online.
[0132] To address this, the present invention provides a method and model for constructing a twin of a natural gas station process system, including a method for constructing a twin of a natural gas station process system and a twin construction model of a natural gas station process system. Through a rational design, the present invention embodies the data loop from online data to twin data and from twin data back to online data. By comparing real-world online data with twin data in the model, it provides guidance for both online data and twin data. The present invention also determines the method for reading finite metadata for 3D modeling.
[0133] In a first aspect, the present invention provides a method for constructing a digital twin of a natural gas station process system, the method comprising: numerical simulation, database establishment, and data visualization;
[0134] Three-dimensional modeling data and simulation data are obtained from numerical simulation.
[0135] A database is established based on 3D modeling data and simulation data, and online data is imported into the database;
[0136] The digital twin is generated from online data and saved to a database. Data visualization is then achieved based on the database to obtain a digital twin.
[0137] In specific embodiments, such as Figure 1 As shown, the digital twin construction method includes: numerical simulation, database establishment, and data visualization, thus obtaining the digital twin. This digital twin is an information model existing in computer virtual space that is completely equivalent to the physical entity of the natural gas station. Simulation analysis and optimization of the physical entity of the natural gas station are then performed based on the digital twin.
[0138] The digital twin in this invention can realize the full-process tracking of the natural gas station process system, the tracking, simulation and prediction of various pipelines, and provide assistance for the safety monitoring and cost reduction and efficiency improvement of the natural gas station process system.
[0139] The digital twin in this invention brings obvious efficiency improvements and cost reductions to the natural gas station process system.
[0140] In this embodiment, the construction method specifically includes:
[0141] Numerical simulation: Complete the full-site 3D modeling and numerical simulation of the target station, and obtain 3D modeling data and simulation data;
[0142] Establish a database based on the 3D modeling data and simulation data;
[0143] Import online data: Extract the required online data for point alignment from the production system and import the online data into the database;
[0144] Data visualization involves importing and displaying 3D modeling data, simulation data, online data, and twin data generated from online data within the platform's user interface.
[0145] The comparison between online data and twin data is conducted through the platform's user interface, and the data in the database is adjusted based on the comparison results.
[0146] In this embodiment, the process of importing and reading 3D modeling data into the database specifically includes:
[0147] Determine if the input flow field is a CGNS, dat, case, or stp format file, and then open the flow field file cg_open;
[0148] Read the number of bases in the flow field: cg_nbases;
[0149] The precision of reading the flow field is cg_precision;
[0150] Read the number of zones in the flow field: cg_nzones; read the specific information of the zones: cg_base_read.
[0151] Read the number of units in the flow field, cg_nunits; read the unit type of each physical quantity, cg_units_read.
[0152] Read the zone type of the flow field: cg_zone_type;
[0153] The type and precision of the mesh determine whether the mesh being read is a structured mesh or an unstructured mesh.
[0154] Based on the grid dimension, read the grid information cg_coord_info and cg_coord_read;
[0155] The `cg_nbocos` function reads the number of boundary conditions, while the `cg_boco_info` function reads the specific information for each boundary condition.
[0156] Close the flow field file cg_close.
[0157] In this embodiment, the data visualization specifically includes:
[0158] Vertex data input: Input the vertex data used to construct the triangular faces of the primitive;
[0159] The primitive coordinate information is transformed by matrix transformation, view volume clipping and coordinate normalization to output the coordinates of the vertices of the primitive triangle face in view space.
[0160] Rasterization converts the vertex information of primitive triangles into discrete element pieces in screen coordinates, thus determining the pixel points of the model on the screen.
[0161] Pixel coloring involves calculating the color material and depth information of the discrete element;
[0162] Test the discrete element fragment, and test its clipping information, alpha information, and depth information;
[0163] Hybrid fragments are used to combine the discrete fragments into a data visualization model.
[0164] In this embodiment, the 3D modeling data is one or more of the following formats: CGNS, dat, case, or stp.
[0165] Secondly, this invention provides a digital twin model of a natural gas station process system.
[0166] The digital twin includes: a numerical simulation unit, a database storage unit, and a data visualization unit;
[0167] Numerical simulation unit, used to obtain 3D modeling data and simulation data;
[0168] The database storage unit is used to store 3D modeling data and simulation data obtained from numerical simulation, online data from the production system, and twin data generated based on the production data.
[0169] The data visualization unit is used for database-based visual data presentation.
[0170] In this embodiment, the digital twin further includes:
[0171] The data comparison unit is used to compare online data and twin data. It compares online data and twin data in the user interface of the platform and adjusts the data in the database based on the comparison results.
[0172] In practice, online data refers to the flow rate, flow velocity, and pressure after the pressure regulating valve in the PI system.
[0173] Meanwhile, after the metering data such as inlet pressure, flow rate, and temperature are input into the twin system, the calculation can obtain data such as the flow rate after the pressure regulating valve, the flow velocity after the pressure regulating valve, and the pressure after the pressure regulating valve. These data are twin data.
[0174] In this embodiment, the 3D modeling data import and read process of the database storage unit specifically includes:
[0175] Determine if the input flow field is a CGNS, dat, case, or stp format file, and then open the flow field file cg_open;
[0176] Read the number of bases in the flow field: cg_nbases;
[0177] The precision of reading the flow field is cg_precision;
[0178] Read the number of zones in the flow field: cg_nzones; read the specific information of the zones: cg_base_read.
[0179] Read the number of units in the flow field, cg_nunits; read the unit type of each physical quantity, cg_units_read.
[0180] Read the zone type of the flow field: cg_zone_type;
[0181] The type and precision of the mesh determine whether the mesh being read is a structured mesh or an unstructured mesh.
[0182] Based on the grid dimension, read the grid information cg_coord_info and cg_coord_read;
[0183] The `cg_nbocos` function reads the number of boundary conditions, while the `cg_boco_info` function reads the specific information for each boundary condition.
[0184] Close the flow field file cg_close.
[0185] In this embodiment, the data visualization unit specifically includes:
[0186] Vertex data input: Input the vertex data used to construct the triangular faces of the primitive;
[0187] The primitive coordinate information is transformed by matrix transformation, view volume clipping and coordinate normalization to output the coordinates of the vertices of the primitive triangle face in view space.
[0188] Rasterization converts the vertex information of primitive triangles into discrete element pieces in screen coordinates, thus determining the pixel points of the model on the screen.
[0189] Pixel coloring involves calculating the color material and depth information of the discrete element;
[0190] Test the discrete element fragment, and test its clipping information, alpha information, and depth information;
[0191] Hybrid fragments are used to combine the discrete fragments into a data visualization model.
[0192] In this embodiment, the 3D modeling data is one or more of the following formats: CGNS, dat, case, or stp.
[0193] To enable those skilled in the art to better understand the present invention, the principles of the present invention are explained below in conjunction with the accompanying drawings:
[0194] (1) Numerical simulation calculation
[0195] Based on the decision-making needs of natural gas stations, C, VB, C++, MATLAB, or other professional fluid dynamics simulation software are used to perform calculations on internal flow, noise propagation, erosion and corrosion of process components in natural gas stations, forming a specific calculation task flow. The calculation results can be output in CGNS, dat, case, and stp formats.
[0196] (2) Database establishment
[0197] To read computational data in real time, a 3D runtime database was first established. The data in the database is primarily in CGNS, dat, case, and stp formats. The detailed import process is as follows:
[0198] 1) Determine if the file is in CGNS, dat, case, or stp format, and then open the flow field file cg_open;
[0199] 2) Read the number of bases in the flow field, cg_nbases;
[0200] 3) The precision of reading the flow field: cg_precision;
[0201] 4) Read the number of zones in the flow field (cg_nzones) and read the specific information of the zones (cg_base_read);
[0202] 5) Read the number of units in the flow field, cg_nunits, and read the unit type of each physical quantity, cg_units_read;
[0203] 6) Read the zone type of the flow field: cg_zone_type;
[0204] 7) The type and precision of the mesh determine whether the mesh being read is a structured mesh or an unstructured mesh;
[0205] 8) Read grid information cg_coord_info cg_coord_read according to grid dimensions;
[0206] 9) Read the number of boundary conditions: cg_nbocos reads the specific information for each boundary condition: cg_boco_info;
[0207] 10) Close the flow field file cg_close.
[0208] (3) Importing online data
[0209] like Figure 2 As shown, Figure 2 The diagram showcases online data from the PI production system. It illustrates how to retrieve relevant online data using server IP address, marker type, marker mask, marker class, marker source, engineering unit, descriptor, and corresponding values. This online data is imported into designated panel points via the PI production system. Panel points are points on the operating panel, essentially representing the data from the production system as icons on the system's UI.
[0210] The online data generated by the PI production system includes: flow metering data such as inlet pressure, flow rate, and temperature at the gathering and distribution stations, as well as data on the opening degree, flow rate, pressure, and temperature of pressure regulating valves. This data serves as the boundary and initial conditions for the twin system. All data is updated synchronously every minute, and each update resets the boundary conditions. The backend will then search for and update the corresponding calculation results within the new boundary conditions.
[0211] (4) Data visualization
[0212] After obtaining the vertex and face information and other visualization data of the model to be rendered through calculation, the model will be rendered sequentially through the graphics pipeline and drawn onto the screen. The main process of the twin model can be divided into the following steps:
[0213] 1) Vertex data input: The triangular face formed by the vertices is called a primitive;
[0214] Vertex data is used to provide processing data for subsequent stages such as the vertex shader. It is the primary source of data for the rendering pipeline. The data fed into the rendering pipeline includes vertex coordinates, texture coordinates, vertex normals, and vertex colors, among other vertex attributes. To allow OpenGL to understand what primitives the vertex data constitutes, we need to pass the corresponding primitive information in the drawing instructions. Common primitives include: points (GL_POINTS), lines (GL_LINES), lines (GL_LINE_STRIP), and triangles (GL_TRIANGLES).
[0215] 2) Transformation of primitive coordinate information, matrix transformation, view volume clipping, and output of vertex coordinates in view space;
[0216] The primitive coordinate information only stores the positions and connections between vertices within the primitive. To create and display the relative position coordinates of the primitive in view space, the transformation process is as follows: Figure 3 As shown, Figure 3 It demonstrates the transformation process from model coordinates, through world coordinates, view space coordinates, clip space coordinates, coordinate normalization, and finally screen space coordinates.
[0217] 3) Rasterization: Vertex information is converted into discrete elements in screen coordinates to determine the pixel points of the model on the screen;
[0218] like Figure 4 As shown, Figure 4 This demonstrates how rasterization generates pixels. A triangle is formed using three vertices, and the pixels covered by this triangle are rasterized. After primitive assembly and screen mapping, the object coordinates are transformed to window coordinates. Rasterization is a discretization process, converting a continuous 3D object into discrete screen pixels. It includes two stages: triangle assembly and triangle traversal. Rasterization determines the fragments covered by primitives, uses vertex attribute interpolation to obtain the fragment's attribute information, and then sends it to the fragment shader for color calculation. It's important to note that fragments are candidate pixels; only those that pass subsequent tests will become the final displayed pixels.
[0219] 4) Pixel coloring: Calculate the color, material, and depth information of each pixel;
[0220] All pixel-by-pixel shading calculations take place here, ultimately passing one or more colors to the next stage. However, unlike the triangle setup and traversal stages, this stage is executed by the programmable GPU kernel. For this, the programmer needs to provide a program for the pixel shader (called a fragment shader in OpenGL), which can contain any necessary calculations. A multitude of techniques are available at this stage, one of the most common and important being texture mapping. Simply put, texture mapping is the process of "pasting" a specified image onto a specified object. The specified image can be one-dimensional, two-dimensional, or three-dimensional, with two-dimensional images being the most common.
[0221] 5) Testing and mixing: Testing the cropping information, alpha information, depth information, etc. of each fragment, and mixing fragments.
[0222] The final stage of the pipeline is the testing phase. Testing includes trimming tests, alpha tests, template tests, and depth tests. For example... Figure 5 As shown, Figure 5 This diagram illustrates the depth test-painter algorithm. Untested segments are discarded and do not require a blending phase; tested segments enter the blending phase. Alpha blending is performed based on the alpha value of the segments to create a semi-transparent effect. Alpha represents the opacity of an object; therefore, Alpha = 1 indicates complete opacity, and Alpha = 0 indicates complete transparency. Although the test blending phase is not programmable, it can be configured and customized using interfaces provided by OpenGL or DirectX to tailor the blending and testing methods.
[0223] 5) Comparison of calculation results and online calculation results
[0224] The display panel features a comparison between online data and twin data. This comparison helps to clarify the accuracy of the twin data and allows for timely adjustments to the data in the database.
[0225] Online data refers to the flow rate, flow velocity, and pressure after the pressure regulating valve in the PI system.
[0226] Meanwhile, after the metering data such as inlet pressure, flow rate, and temperature are input into the twin system, the calculation can obtain data such as the flow rate after the pressure regulating valve, the flow velocity after the pressure regulating valve, and the pressure after the pressure regulating valve. These data are twin data.
[0227] Overall technical approach of this solution
[0228] Its main technical approach is: numerical modeling and calculation → database establishment → import of online data → matching of online data and database data → 3D information rendering → display → numerical simulation calculation.
[0229] 1) Numerical simulation: Complete the full-site modeling and numerical simulation of the target station.
[0230] 2) Database creation: Create a database based on the data usage process.
[0231] 3) Importing online data: Extract the required data from the production system and align the points before extraction.
[0232] 4) Data visualization: Import and display CGNS format models in the platform's UI.
[0233] 5) Comparison of online data and twin data: Compare online data and twin data in the UI computing interface.
[0234] The model and embodiments of the present invention are described below with reference to the accompanying drawings:
[0235] (1) Model and cloud map display
[0236] like Figure 6 As shown, Figure 6 The data displayed in the PI production system shows that it consists of flow, pressure, and temperature measurement data from a specific station. Figure 7 The image shows a cloud map of erosion areas in a gathering and transportation station, with a comparison of online and twin data in the lower left corner. Using OSISoftPISystem database software as an example, the PI production system, based on known station names and location numbers, successfully acquired over 500 sets of online data, all of which are displayed on the system. Figure 8 The pressure cloud map of the twin system in the displayed station area is shown. Figure 9 The flow velocity cloud map of the twin system in the gathering and transportation station is shown, and the calculated cloud maps of pressure and flow rate are displayed on the user interface by combining the 3D model and online data.
[0237] (2) Model rotation and scaling
[0238] Hold down the left or right mouse button and drag the mouse to change the viewing angle; hold down the W / S key to zoom in / out on the model; hold down the A / D key to move the model right / left; click the "X", "Y", and "Z" buttons on the right side of the software interface to view the model's three views. Figure 8 As shown, Figure 10 The left side displays the model zoom-in options and zoom-in effects, while the right side displays the model zoom-out options and zoom-out effects. For example... Figure 11 As shown, Figure 11 The left side shows the model's three views. Figure X The right side shows the model's three views viewed along the Y-axis. (See attached image.) Figure 12 As shown, Figure 12 The model is shown in three views along the Z-axis.
[0239] (3) Computational cloud map display
[0240] By selecting pressure, flow rate, or temperature in the "Internet of Things" parameters of the software interface, and the corresponding values of the obtained online data, the system can find the data file with the best matching value in the background database, import it, and display it in the software. Flow rate is the processing volume of the station under standard conditions. The flow rate is 10,000,000 cubic meters / day. When the system obtains the flow rate data of the remote station, it will automatically find the matching target file in the file name according to the flow rate data.
[0241] (4) Parameter display
[0242] The left side of the software interface allows users to select different stations and monitoring points based on the station name and monitoring point name. The right side allows filtering of key boundary conditions and setting their display / hide and display mode. The software's post-processing functions include vector field, streamline, contour map, and isosurface data visualization. The vector field has 25 main parameters (including velocity, pressure, temperature, and magnetic fields), the streamline has 15 main parameters (including particle flow lines, velocity streamlines, and vector streamlines), the contour map has 10 main parameters (including pressure contour maps, velocity contour maps, erosion contour maps of pipe walls and valves, and corrosion contour maps), and the isosurface has 8 main parameters (including tangents in the x, y, and z directions). Figure 13 As shown, Figure 13 The platform demonstrates that it includes at least 15 selection functions, such as station name, key boundary condition selection, and main parameter selection.
[0243] (5) Comparison curves
[0244] By selecting the monitoring sites, monitoring locations, and comparison attributes for online data, as well as the monitoring locations and comparison physical quantities for local physical quantities, online and offline data are acquired at a frequency of once per minute, and a two-dimensional curve comparing the data is plotted using this data. Figure 14 As shown, Figure 14 Taking the time-pressure graph as an example, the local pressure data (green curve in the figure) and the pressure after the needle valve (red curve in the figure) are used to demonstrate the comparison of two-dimensional curve plotting.
[0245] The UI panel after importing data is as follows Figure 15 As shown. Figure 15 The interface displays a station selection panel, an automatic data import panel, a station data extraction panel, parameter selection panels for flow velocity, pressure, erosion, etc., and a process display panel. Figure 15The display panel can intuitively show the flow of the entire station in all time domains, and can directly extract and compare data from the station.
[0246] Taking the Changning H11B platform as an example,
[0247] Initial and boundary conditions of Changning H11B platform: Basic parameters include operating pressure 4.0MPa, gas density 21.3kg / m3, pH value 7.5, particle size 0.00005 (m), and liquid volume fraction 0.005787%.
[0248] The calculation results for the Changning H11B platform with an inlet flow rate of 183,000 cubic meters per day are as follows: When the cumulative daily flow is 183,000 cubic meters per day, the mass flow rate is 44.48 kg / s. At this point, the outlet pressure is set to 4.0 MPa. A database file named flow18.5_fluidtest.cgns is created and imported into the monitoring platform. The results are as follows... Figure 16 , Figure 17 and Figure 18 Figure 16 shows the erosion and wear monitoring cloud map of the Changning H11B platform. Figure 17 The image shows a cloud map of the internal gas flow velocity monitoring of the Changning H11B platform. Figure 18 The image shows a cloud map of the internal pressure distribution monitoring of the Changning H11B platform.
[0249] Taking the Changning H7B platform as an example,
[0250] Initial and boundary conditions of Changning H7B platform: Basic parameters include operating pressure 1.6MPa, gas density 13.8kg / m3, pH value 7.5, particle size 0.00005 (m), and liquid volume fraction 0.006%.
[0251] The calculation results for the Changning H7B platform with an inlet flow rate of 26,000 cubic meters per day are as follows: When the cumulative daily flow is 26,000 cubic meters per day, the mass flow rate is 0.2659 kg / s. At this point, the outlet pressure is set to 1.6 MPa. A database file named flow2.6_fluidtest.cgns is created and imported into the monitoring platform. The results are as follows... Figure 19 , Figure 20 and Figure 21 Figure 19 shows the erosion and wear monitoring cloud map of the Changning H7B platform. Figure 20 The image shows a cloud map of the internal gas flow velocity monitoring of the Changning H7B platform. Figure 21 The internal pressure distribution monitoring cloud map of the Changning H7 platform is displayed.
[0252] Taking the Changning H19B platform as an example, the monitoring results are as follows:
[0253] Depend on Figure 22The test results for the Changning H19B platform from April 2020 to July 2021 are shown (data comparison points are within the red box in the lower left corner). The key control parameter, the calculated value of the pressure after the needle valve, has an evaluation error of 8.4% compared to the field value, indicating high accuracy in the calculation. The figure also shows the locations of wall thinning on the platform, primarily at the inlet elbow, the elbow between the two desanders and the separator, and the separator outlet elbow. The highest erosion rate is 8.33e-6 kg / (m²·s), which translates to 13 mm / year.
[0254] Two wells in the Changning H19B well are in operation. Well #1 has a gas processing capacity of 55,700 cubic meters per day, an inlet pressure of 4.44 MPa, an outlet pressure of 2.3 MPa, a liquid flow rate of 0.001 m³ / h at the separator outlet, and a calculated gas inlet velocity of approximately 9.85 m / s with a gas density of 4.47 kg / m³. The wall thickness reduction process is dynamic and changes over time, with the erosion rate varying from 1 mm / year to 9 mm / year. One year after the well was put into operation, the wall thickness reduction rate reached 5.4 mm / year, and the alarm threshold set in the platform's backend was 3.6 mm / year, at which point an alarm was triggered.
[0255] Well #2 has a gas processing capacity of 50,000 cubic meters per day, an inlet pressure of 4.83 MPa, an outlet pressure of 2.3 MPa, a liquid flow rate of 0.001 m³ / h at the separator outlet, and a calculated gas velocity of approximately 7.84 m / s. The wall thickness reduction process is dynamic over time, with the erosion rate varying from 1 mm / year to 13 mm / year. One year after the well was put into production, the wall thickness reduction rate reached 6.5 mm / year, and the alarm threshold set in the platform's backend was 3.6 mm / year, at which point an alarm was triggered.
[0256] A monitoring platform, supplemented by an erosion + corrosion model, can dynamically describe wall thickness loss. The relationship between wall thickness reduction at points 1 and 2 of the desander-separator bend and time is shown. Figure 23 The results (solid line) and online monitoring results (dashed line) of the desander-separator elbow 1 on the Changning H19B platform from April 2020 to July 2021 are shown. Figure 24 The results of twinning (solid line) and online monitoring (dashed line) of the desander-separator elbow 2 of the Changning H19B platform from April 2020 to July 2021 are shown.
[0257] like Figure 25The pressure calculation results displayed on the Changning H19B platform (operation time: June 2021) show that the platform can also display the pressure distribution. It is evident that after the throttle valve, the pressure in well #1 drops significantly, decreasing by approximately 0.5 MPa at an 80% opening, while the pressure in well #2 decreases by 0.67 MPa. Under these pressure drops, the flow velocity at the throttle valve outlet can reach a maximum of 50 m / s, and the average flow velocity in the pipeline can reach 12 m / s. The velocity distribution is non-uniform during flow because the presence of a second liquid phase is considered. Figure 26 The figure shows the flow rate calculation results for the Changning H19B platform (running time: June 2021).
[0258] Figure 27 and Figure 28 The diagram shows the sewage discharge process of separator #1 on the Changning H19B platform. The sewage discharge process starts from... Figure 27 The first half shown to Figure 28 As shown in the latter half, it can be seen that during the sewage discharge process, the water phase gradually occupies the space in the pipe, and the erosion area and erosion rate of the sewage valve during the entire sewage discharge process can also be clearly shown.
[0259] The erosion monitoring results of the H19 sewage system are as follows: Figure 29 Online monitoring results of wall thickness loss in process line #1 of the Changning H19B platform from April 2020 to July 2021 revealed that the wall thickness reduction was erosion-induced corrosion, affecting the entire sewage pipeline. The reduction rate was 0.66 mm / cycle, reaching up to 3 mm / cycle at the valve core and body of the sewage valve. During monitoring, the wall thickness reduction rate was observed to be 4.3 mm / cycle at point 1, 3.9 mm / cycle at point 2, 7.8 mm / cycle at point 3, and 9.0 mm / cycle at point 4. It was determined that points 3 and 4 exhibited the highest wall thickness reduction rates.
[0260] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing a digital twin of a natural gas station process system, characterized in that, include: Three-dimensional modeling data and simulation data are obtained from numerical simulation. A database is established based on 3D modeling data and simulation data, and online data is imported into the database; The twin data is generated from online data and saved to a database. Data visualization is then achieved based on the database to obtain a digital twin. The numerical simulation involves completing the full-site 3D modeling and numerical simulation of the target station to obtain 3D modeling data and simulation data. The database is established based on the 3D modeling data and simulation data. The online data import process involves extracting the required point alignment online data from the production system and importing the online data into the database. The data visualization refers to importing and displaying 3D modeling data, simulation data, online data, and twin data in the platform's user interface; After data visualization, the online data and the twin data are compared in the platform's user interface, and the data in the database is adjusted based on the comparison results; The specific steps of importing and reading 3D modeling data into the database include: Determine if the input flow field is a CGNS, dat, case, or stp format file, and then open the flow field file cg_open; Read the number of bases in the flow field, cg_nbases; The precision of reading the flow field is cg_precision; Read the number of zones in the flow field: cg_nzones; read the specific information of the zones: cg_base_read. Read the number of units in the flow field, cg_nunits; read the unit type of each physical quantity, cg_units_read. Read the zone type of the flow field: cg_zone_type; The type and precision of the mesh determine whether the mesh being read is a structured mesh or an unstructured mesh. Based on the grid dimension, read the grid information cg_coord_info and cg_coord_read; Read the number of boundary conditions cg_nbocos, and read the specific information of each boundary condition cg_boco_info; Close the flow field file cg_close; Specifically, the data visualization includes: Vertex data input: Input the vertex data used to construct the triangular faces of the primitive; The primitive coordinate information is transformed by matrix transformation, view volume clipping and coordinate normalization to output the coordinates of the vertices of the primitive triangle face in view space. Rasterization converts the vertex information of primitive triangles into discrete element pieces in screen coordinates, thus determining the pixel points of the model on the screen. Pixel coloring involves calculating the color material and depth information of the discrete element; Test the discrete element fragment, and test its clipping information, alpha information, and depth information; Hybrid fragments are used to combine the discrete fragments into a data visualization model.
2. The method for constructing a digital twin of a natural gas station process system according to claim 1, characterized in that, The 3D modeling data is in one or more of the following formats: CGNS, dat, case, or stp.
3. A digital twin construction device for a natural gas station process system, characterized in that, The construct includes: a numerical simulation unit, a database storage unit, and a data visualization unit; Numerical simulation unit, used to obtain 3D modeling data and simulation data; The database storage unit is used to store 3D modeling data and simulation data obtained from numerical simulation, online data from the production system, and twin data generated based on the online data; The data visualization unit is used for database-based visual data presentation. The construct further includes: a data comparison unit, used for comparing online data and twin data, comparing online data and twin data in the user interface of the platform, and adjusting the data in the database according to the comparison results; The specific steps of importing and reading 3D modeling data from the database storage unit include: Determine if the input flow field is a CGNS, dat, case, or stp format file, and then open the flow field file cg_open; Read the number of bases in the flow field, cg_nbases; The precision of reading the flow field is cg_precision; Read the number of zones in the flow field: cg_nzones; read the specific information of the zones: cg_base_read. Read the number of units in the flow field, cg_nunits; read the unit type of each physical quantity, cg_units_read. Read the zone type of the flow field: cg_zone_type; The type and precision of the mesh determine whether the mesh being read is a structured mesh or an unstructured mesh. Based on the grid dimension, read the grid information cg_coord_info and cg_coord_read; Read the number of boundary conditions cg_nbocos, and read the specific information of each boundary condition cg_boco_info; Close the flow field file cg_close; The data visualization unit specifically includes: Vertex data input: Input the vertex data used to construct the triangular faces of the primitive; The primitive coordinate information is transformed by matrix transformation, view volume clipping and coordinate normalization to output the coordinates of the vertices of the primitive triangle face in view space. Rasterization converts the vertex information of primitive triangles into discrete element pieces in screen coordinates, thus determining the pixel points of the model on the screen. Pixel coloring involves calculating the color material and depth information of the discrete element; Test the discrete element fragment, and test its clipping information, alpha information, and depth information; Hybrid fragments are used to combine the discrete fragments into a data visualization model.
4. The digital twin construction device for a natural gas station process system according to claim 3, characterized in that, The 3D modeling data is in one or more of the following formats: CGNS, dat, case, or stp.
Citation Information
Patent Citations
Steam turbine high-temperature pressure-bearing part digital twin construction method and monitoring system
CN111523274A
Structural performance digital twinborn body construction method of intelligent excavator
CN112836404A
Digital twin construction method of cantilever beam structure
CN113673134A
Method and system for correcting digital twinborn model data of evaporation area of thermal power plant
CN112818595A
Mine stress field twinborn modeling assimilation system and method in full space-time mining process
CN114708393A