Numerical simulation model grid intelligent conversion method based on hybrid neural network

By constructing a GNN-MLP hybrid model, the problems of mesh mapping methods in handling mesh scale differences and topological heterogeneity are solved. High-precision mapping between finite difference meshes and finite element meshes is achieved, which improves the stability and accuracy of engineering simulations and is suitable for multi-physics coupling environments.

CN122616236BActive Publication Date: 2026-11-06CHINA UNIV OF PETROLEUM (EAST CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611056766.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-16
Publication Date
2026-11-06
Estimated Expiration
2046-07-16

AI Technical Summary

Technical Problem

Existing mesh mapping methods suffer from several drawbacks when dealing with practical engineering problems such as differences in mesh scale, topological heterogeneity, and complex boundaries. These problems include easy distortion of data features, poor cross-scale adaptability, and difficulty in balancing fidelity and conservation, which seriously affect the consistency and accuracy of the engineering simulation process.

Method used

A hybrid neural network-based approach is adopted, combining graph neural networks and multilayer perceptrons to construct a GNN-MLP hybrid model. By using graph neural networks to process irregular topologies and introducing cross-scale correlation, cycle consistency, and physical residual constraints, a high-precision mapping between finite difference meshes and finite element meshes is achieved.

Benefits of technology

It achieves high-precision cross-scale mapping between different types of discrete meshes, improving the stability and accuracy of engineering simulations. It is suitable for multi-physics coupling environments and for simulating different types of physical fields such as temperature, displacement, stress, pressure, velocity, and concentration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122616236B_ABST
    Figure CN122616236B_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent grid conversion method for numerical simulation models based on hybrid neural networks, relating to the field of oil and gas field development technology. The invention first acquires source domain data from a finite difference grid and target domain data from a finite element grid. The source and target domains are preprocessed to obtain source and target domain graphs. A source domain graph neural network is then used to obtain high-order topological features of the source domain graph, establishing multi-scale cross-domain neighborhoods and calculating cross-scale association weights. These high-order topological features are aggregated into the target domain for multi-scale cross-domain aggregation. A target domain graph neural network is then used to perform graph propagation to obtain high-order latent features of the target domain. This is combined with multilayer perceptron mapping and decoding to obtain the target domain mapping result. Finally, the source and target domains are swapped for inverse mapping, constructing a GNN-MLP hybrid model. After training, this model is used to obtain intelligent cross-scale mapping results between different discretized grids, achieving intelligent conversion between different discretized grids in engineering simulations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of reservoir numerical simulation technology, specifically to a method for intelligent grid conversion of numerical simulation models based on hybrid neural networks. Background Technology

[0002] Mesh discretization is a core foundation of modern engineering simulation and numerical computation. The finite difference method (FDM) and the finite element method (FEM) have been widely used in mesh discretization. The finite difference method is suitable for regular regions, is efficient and low-cost, and is often used for basic simulations and data storage such as fluid mechanics. The finite element method is suitable for complex geometry and non-uniform materials, can be locally refined, and is the core carrier for high-precision scenarios such as digital twins. As engineering simulations gradually develop towards refinement, multi-scale, and multi-physics coupling, there is a need for heterogeneous mesh connection between the regular meshes used in the finite difference method and the unstructured meshes used in the finite element method. High-precision cross-scale mapping between the two has become a key bottleneck in improving the efficiency and accuracy of engineering simulations at this stage. However, commonly used mesh mapping methods such as nearest neighbor interpolation and radial basis function interpolation have obvious limitations when dealing with practical engineering problems such as mesh scale differences, topological heterogeneity, and complex boundaries. These limitations mainly manifest as ignoring mesh topological relationships, easy distortion of data features, poor cross-scale adaptability, difficulty in balancing fidelity and conservation, and poor generalization ability in complex scenarios, which seriously restrict the coherence and accuracy of the engineering simulation process. Summary of the Invention

[0003] This invention aims to solve the above-mentioned problems and proposes an intelligent grid conversion method for numerical simulation models based on hybrid neural networks. It combines graph neural networks and multilayer perceptrons to construct a GNN-MLP hybrid model. Graph neural networks are introduced to handle irregular topologies, while multilayer perceptrons excel at nonlinear projection and regression of local fusion features. Cross-scale correlation, cycle consistency, conservation constraints, and physical residual constraints are introduced to balance topology perception, local nonlinearity expression, and physical consistency. This achieves mapping between finite difference grids and finite element grids, providing technical support for high-precision cross-scale mapping between different types of discrete grids in engineering simulations.

[0004] The present invention adopts the following technical solution: A method for intelligent mesh conversion of numerical simulation models based on hybrid neural networks is applicable to mesh conversion between different reservoir numerical simulation models during reservoir numerical simulation. The method includes the following steps: Step 1: Obtain source domain data based on finite difference mesh and target domain data based on finite element mesh. Preprocess the coordinates, scale, and attributes of the source and target domains to construct the input features of each discrete entity in the source and target domains. Step 2: Convert the finite difference mesh into a source domain graph and the finite element mesh into a target domain graph. Determine the graph nodes, graph edge features, and node feature matrices respectively. Then, use the source domain graph neural network to perform topological encoding on the source domain graph to obtain the high-order topological features of the source domain. Step 3: Based on the normalized coordinate distance, scale difference and material compatibility between discrete entities in the source domain and discrete entities in the target domain, establish a multi-scale cross-domain neighborhood and calculate the cross-scale association weights. Aggregate the high-order topological features of the source domain into the target domain to obtain multi-scale cross-domain aggregated features. Step 4: The aggregated multi-scale cross-domain features are fused with the input features of the target domain to serve as the initial latent features of the target domain graph neural network. The target domain graph neural network is then used to perform graph propagation to obtain the high-order latent features of the target domain. This is combined with multilayer perceptron mapping and decoding to obtain the target domain mapping result. Step 5: Exchange the source domain and the target domain, construct the reverse mapping from the finite element mesh to the finite difference mesh, and establish cyclic consistency constraints; Step 6: Construct a GNN-MLP hybrid model based on the source domain graph neural network, the target domain graph neural network, and the multilayer perceptron. Set the total loss function of the GNN-MLP hybrid model, train the GNN-MLP hybrid model, and use the trained GNN-MLP hybrid model to obtain the cross-scale intelligent mapping results between the finite difference grid and the finite element grid.

[0005] Preferably, step 1 includes the following sub-steps: Step 1.1: Obtain source domain data and target domain data, and determine if the source domain contains... A discrete entity, the target domain contains Let there be discrete entities, and denote the index of the discrete entities in the source domain as... The discrete entity index in the target domain is denoted as ; The coordinates of discrete entities in the source and target domains are normalized to obtain the normalized coordinate vectors of the discrete entities. The calculation formula is as follows: ; in, ; In the formula, For the first Normalized coordinate vectors of discrete entities; For the first The discrete entity in the first... Normalized coordinate components in each spatial direction; It is the transpose matrix; For the first The discrete entity in the first... The original coordinates in each spatial direction; For the current computational domain in the th The minimum coordinate value in each spatial direction; For the current computational domain in the th The maximum coordinate value in each spatial direction; This refers to the spatial direction number; The total dimension of the space; Step 1.2: Calculate the local feature scales of the source and target domains; The formula for calculating the local feature scale of the source domain is: ; In the formula, For the first in the source domain Local feature scale of a discrete entity; For multiplication; For the first The discrete entity in the first... Local grid spacing in each spatial direction; The formula for calculating the local feature scale of the target domain is: ; In the formula, For the first in the target domain Local feature scale of a discrete entity; For the first in the target domain Volume, area, or node-controlled volume corresponding to a discrete entity; Step 1.3: Perform cross-scale coding on the source and target domains to obtain the scale codes for the source and target domains. The calculation formula is as follows: ; In the formula, For the first in the source domain Scale encoding of discrete entities; For the first in the target domain Scale encoding of discrete entities; It is the natural logarithm function; For reference scale; Step 1.4: Determine the structural feature vectors of the source and target domains; The formula for calculating the structural feature vector of the source domain is: ; In the formula, For the first in the source domain Structural feature vectors of discrete entities; For the first in the source domain Normalized coordinate vectors of discrete entities; For the first in the source domain Attribute vectors of discrete entities; For the first in the source domain Boundary attribute vectors or region attribute vectors of discrete entities; This involves concatenating vectors. The formula for calculating the structural feature vector of the target domain is: ; In the formula, For the first in the target domain Structural feature vectors of discrete entities; For the first in the target domain Normalized coordinate vectors of discrete entities; For the first in the target domain Local geometric feature vectors of discrete entities; For the first in the target domain Attribute vectors of discrete entities; For the first in the target domain Boundary attribute vectors or region attribute vectors of discrete entities; Then, based on the structural feature vectors of the source and target domains, the input features of the source and target domains are determined, and the calculation formula is as follows: ; In the formula, For the first in the source domain Input features of a discrete entity; For the first in the source domain The physical field value vector of a discrete entity. , for 3D real space; For the first in the target domain Input features of a discrete entity.

[0006] Preferably, step 2 includes the following sub-steps: Step 2.1: Obtain the graph structures corresponding to the source and target domains. Convert the finite difference mesh into the source domain graph and the finite element mesh into the target domain graph, resulting in: ; ; In the formula, For the source domain graph; , , These are the set of nodes, the set of edges, and the node feature matrix of the source domain graph, respectively. For the target domain diagram; , , These are the node set, edge set, and node feature matrix of the target domain graph, respectively. The edges of the source domain graph are established according to the adjacency of the rule template. In the rule template, 4 or 8 neighbors are used for two-dimensional graphs, and 6, 18 or 26 neighbors are used for three-dimensional graphs. The edges of the target domain graph are established according to the cell connection relationship. The graph edges are established by sharing cell edges, faces or cell nodes. Step 2.2, denote the discrete entity index in the source domain graph as... The discrete entity index in the target domain graph is denoted as Determine the graph edge features of the source and target domain graphs; The formula for calculating the graph edge features is: ; In the formula, For the field number, , For the source domain, For the target domain; For domain From discrete entities Pointing to discrete entities Graph edge features; , Domains The Middle The discrete entity, the first Normalized coordinate vectors of discrete entities; , Domains The Middle The discrete entity, the first Scale encoding of discrete entities; , Domains The Middle The discrete entity, the first Boundary attribute vectors or region attribute vectors of discrete entities; This involves concatenating vectors. Step 2.3: Use the source domain graph neural network to perform topological encoding on the source domain graph to obtain the high-order topological features of the source domain.

[0007] Preferably, the source domain graph neural network internally comprises a total of The initial hidden features of the source domain graph neural network are set to: (Number of structural layers) ; In the formula, For the first in the source domain Hidden features of discrete entities in the first layer of a source domain graph neural network; For the first in the source domain Input features of a discrete entity; The hidden feature update process of each structural layer in the source domain graph neural network is as follows: ; in, ; ; In the formula, The layer number; For the first in the source domain The discrete entities in the source domain graph neural network are in the th... The hidden features of the layer; It is a non-linear activation function; For the source domain graph neural network, the first The weight matrix is ​​transformed based on the node's own characteristics in the layer. For the first in the source domain The discrete entities in the source domain graph neural network are in the th... The hidden features of the layer; For the source domain graph, the first The set of neighbors of a discrete entity; In source domain graph neural networks The first layer The discrete entity to the first Normalized attention weights for discrete entities; It is the transpose matrix; In source domain graph neural networks Neighbor feature transformation weight matrix of the layer; For the first The discrete entities in the source domain graph neural network are in the th... The hidden features of the layer; is the bias vector of the source domain graph neural network; It is an exponential function; For the source domain graph neural network, the first From the first layer The discrete entity to the first Unnormalized attention weights when discrete entities transmit information; For the source domain graph neural network, the first From the first layer The discrete entity to the first Unnormalized attention weights when discrete entities transmit information; For the source domain graph neural network, the first The trainable attention vector of the layer; For the source domain graph neural network, the first The trainable weight matrix used for attention calculation in the layer; The graph edge features of the source domain graph.

[0008] Preferably, step 3 includes the following sub-steps: Step 3.1: Obtain the compatibility coefficient between the source domain and the target domain; The formula for calculating the compatibility coefficient is: ; In the formula, For the first in the source domain The discrete entity and the target domain in the nth discrete entity Compatibility coefficients between discrete entities; It is an exponential function; For the first in the source domain Attribute vectors of discrete entities; For the first in the target domain Attribute vectors of discrete entities; It is a Euclidean second norm; For similarity temperature parameters; Step 3.2: Based on the cross-domain neighborhoods of each discrete entity in the target domain at a preset scale radius, construct a multi-scale neighborhood, resulting in: ; In the formula, The scale radius number; In the first At the radius of the nth scale, and in the target domain, the nth... A set of source domain neighbors associated with a discrete entity; Indexes discrete entities in the source domain; Indexing discrete entities in the target domain; For the first in the source domain Normalized coordinate vectors of discrete entities; For the first in the target domain Normalized coordinate vectors of discrete entities; For the first One scale radius; It is an L2 norm; Step 3.3: Determine the cross-scale correlation score between the corresponding discrete entities in the source domain and the target domain based on the normalized coordinate distance, structural feature vector, and material compatibility coefficient, and determine the cross-scale correlation weight of each discrete entity in the multi-scale neighborhood. The formula for calculating the cross-scale association weight is as follows: ; in, ; In the formula, For the first In the source domain with a radius of ... The discrete entity pair in the target domain is the th discrete entity. Cross-scale association weights between discrete entities; It is an exponential function; For the first In the source domain with a radius of ... The discrete entity pair in the target domain is the th discrete entity. Cross-scale correlation score between discrete entities; For discrete entities in a multi-scale neighborhood; For the first In the multi-scale neighborhood of the i-th scale radius, the i-th The discrete entity pair in the target domain is the th discrete entity. Cross-scale correlation score between discrete entities; For the first Distance temperature parameters of a radius on a scale; For the first in the source domain Structural feature vectors of discrete entities; For the first in the target domain Structural feature vectors of discrete entities; For the first Temperature parameters differing across radii; For the first Gain coefficient for each scale radius; The material compatibility coefficient; It is the absolute value; Step 3.4: Aggregate the high-order topological features of the source domain into the target domain according to the cross-scale association weights to obtain multi-scale cross-domain aggregated features; The formula for calculating the multi-scale cross-domain aggregation feature is as follows: ; In the formula, For the first in the target domain Multi-scale cross-domain aggregation features of discrete entities; For the total number of multiple scales; for The aggregation results at each scale radius are sequentially spliced ​​together; For the first Cross-domain mapping weight matrix over a scale radius; For the first in the source domain The source domain high-order topological features of a discrete entity.

[0009] Preferably, step 4 includes the following sub-steps: Step 4.1: Fuse the input features of the target domain with the multi-scale cross-domain aggregated features to determine the initial latent features of the target domain; The initial hidden features of the target domain are: ; In the formula, For the first in the target domain Initial latent features of discrete entities; This is the initial fusion mapping function; For the first in the target domain Multi-scale cross-domain aggregation features of discrete entities; This involves concatenating vectors. For the first in the target domain Input features of a discrete entity; This is the initial fusion weight matrix; This is the initial fusion bias vector; Step 4.2: Construct a target domain graph neural network and use it to obtain high-order latent features of the target domain; Step 4.3: Use a multilayer perceptron to decode the high-order latent features of the target domain and output the target domain mapping result; The multilayer perceptron is configured as follows: ; In the formula, This is the output vector of the multilayer perceptron; This is the input vector of the multilayer perceptron; This is the weight matrix of each hidden layer in the multilayer perceptron; represents the bias vector of each hidden layer in a multilayer perceptron; This is the weight matrix of the output layer in a multilayer perceptron; This is the bias vector of the output layer in a multilayer perceptron; The input vector of the multilayer perceptron is: ; In the formula, For the first in the target domain The fusion features of discrete entity inputs to a multilayer perceptron; For the first in the target domain High-order latent features of the target domain for discrete entities; The output vector of the multilayer perceptron is: ; In the formula, The first prediction obtained by the reservoir numerical simulation model Physical field values ​​of discrete entity targets.

[0010] Preferably, the target domain graph neural network internally comprises: The hidden feature update process for each structural layer in the target domain graph neural network is as follows: ; in, ; ; In the formula, The layer number; For the first in the target domain The discrete entities in the target domain graph neural network are in the nth discrete entity. The hidden features of the layer; It is a non-linear activation function; For the target domain graph neural network, the first The weight matrix is ​​transformed based on the node's own characteristics in the layer. For the first in the target domain The discrete entities in the source domain graph neural network are in the th... The hidden features of the layer; For the target domain graph, the first The set of neighbors of a discrete entity; For the discrete entity index in the target domain graph; For target domain graph neural networks The first layer The discrete entity to the first Normalized attention weights for discrete entities; For target domain graph neural networks Neighbor feature transformation weight matrix of the layer; For the first The discrete entities in the target domain graph neural network are in the nth discrete entity. The hidden features of the layer; The bias vector for the target domain graph neural network; It is the transpose matrix; It is an exponential function; For the target domain graph neural network, the first From the first layer The discrete entity to the first Unnormalized attention weights when discrete entities transmit information; For the target domain graph neural network, the first From the first layer The discrete entity to the first Unnormalized attention weights when discrete entities transmit information; For the target domain graph neural network, the first The trainable attention vector of the layer; For the target domain graph neural network, the first The trainable weight matrix used for attention calculation in the layer; The edge features of the target domain graph.

[0011] Preferably, step 5 includes the following sub-steps: Step 5.1: Perform a reverse mapping from the finite element mesh to the finite difference mesh to obtain the target domain prediction field set and the source domain prediction field set mapped back to the source domain, resulting in: ; In the formula, For the target domain prediction field set; It is a forward mapping network; This is the set of trainable parameters for a forward mapping network. The source domain is the input feature set; For the source domain graph; For the target domain diagram; For the source domain prediction field set; It is a reverse mapping network; This is the set of trainable parameters for the inverse mapping network; Input the feature set to the target domain; Step 5.2: Based on the target domain prediction field set, the source domain prediction field set, the target domain structural feature vector, and the source domain structural feature vector, construct cycle consistency using the forward prediction results to obtain the complete input feature set of the target domain. and the complete input feature set of the source domain The complete input feature set of the target domain is formed by concatenating the target domain prediction field set and the target domain structural feature vector set, and the complete input feature set of the source domain is formed by concatenating the source domain prediction field set and the source domain structural feature vector set. The complete target domain input features of each discrete entity in the complete target domain input feature set, and the complete target domain input features of each discrete entity in the complete source domain input feature set, are calculated using the following formulas: ; In the formula, For the first in the target domain Complete input features of the target domain for each discrete entity; For the first in the target domain The target domain structural feature vector of a discrete entity; For the first in the target domain Structural feature vectors of discrete entities; For the first in the source domain Complete source domain input features of a discrete entity; For the first in the source domain The source domain structural feature vector of a discrete entity; For the first in the source domain Structural feature vectors of discrete entities; This involves concatenating vectors. Step 5.3: Determine the complete input features of the target domain and the complete input features of the source domain, and perform source domain cyclic reconstruction and target domain cyclic reconstruction to obtain: ; In the formula, This is the result of source domain cyclic reconstruction; Provide the complete set of input features for the target domain; The result of cyclic reconstruction of the target domain; It is the complete set of input features from the source domain.

[0012] Preferably, step 6 includes the following sub-steps: Step 6.1: Construct a GNN-MLP hybrid model based on the source domain graph neural network, the target domain graph neural network, and the multilayer perceptron. Set the total loss function of the GNN-MLP hybrid model as follows: ; In the formula, This represents the total loss function value. These are the weighting coefficients for the forward mapping loss term; This represents the forward mapping loss value; These are the weighting coefficients for the reverse mapping loss; This represents the inverse mapping loss value; The weighting coefficients for the source domain cycle consistency loss; This represents the source domain circular consistency loss value. The weighting coefficients for the target domain's cycle consistency loss; This represents the target domain's cycle consistency loss value. The weighting coefficient for the conservation loss; The value of conservation loss; This is the weighting coefficient for the physical residual loss; This represents the physical residual loss value. These are the weighting coefficients for the regularization loss; This is the regularization loss value; Step 6.2: Train the GNN-MLP hybrid model. When the total loss function value of the GNN-MLP hybrid model does not reach the preset accuracy value, adjust the weight coefficients of each loss term in the GNN-MLP hybrid model and continue training the GNN-MLP hybrid model. When the total loss function value of the GNN-MLP hybrid model reaches the preset accuracy value, stop training the GNN-MLP hybrid model and use the trained GNN-MLP hybrid model to obtain the cross-scale intelligent mapping results between the finite difference mesh and the finite element mesh.

[0013] Preferably, the formula for calculating the forward mapping loss value is: ; in, ; ; In the formula, This represents the forward mapping loss value; Indexing discrete entities in the target domain; For the first in the target domain Normalized supervisory weights for discrete entities; For the first in the target domain The target domain structural feature vector of a discrete entity; For the first in the target domain The true value of a discrete entity; It is a Euclidean second norm; , All are summation indices; This represents the total number of discrete entities in the source domain. The total number of discrete entities in the target domain; For the first in the source domain Normalized supervisory weights for discrete entities; For the first in the source domain The supporting volume or area of ​​a discrete entity; For the first in the source domain The supporting volume or area of ​​a discrete entity; For the first in the target domain Normalized supervisory weights for discrete entities; For the first in the target domain The supporting volume or area of ​​a discrete entity; For the first in the target domain The supporting volume or area of ​​a discrete entity; This refers to the spatial direction number; The total dimension of the space; For the first The discrete entity in the first... Local grid spacing in each spatial direction; For the first in the target domain Volume, area, or node-controlled volume corresponding to a discrete entity; The formula for calculating the reverse mapping loss value is as follows: ; In the formula, This represents the inverse mapping loss value; Indexes discrete entities in the source domain; For the first in the source domain The source domain structural feature vector of a discrete entity; For the first in the source domain The true value of a discrete entity; The formula for calculating the source domain cycle consistency loss is as follows: ; In the formula, For the first in the source domain The cyclic reconstruction values ​​of discrete entities; The formula for calculating the target domain cycle consistency loss is as follows: ; In the formula, For the first in the target domain The cyclic reconstruction values ​​of discrete entities; The formula for calculating the conservation loss value is as follows: ; In the formula, The integral of the target domain prediction field set under geometric weights; This is the integral of the real physical field in the source domain under geometric weights; The formula for calculating the physical residual loss value is as follows: ; In the formula, For discrete control equation operators; For the first in the target domain A vector of constitutive or material parameters corresponding to a discrete entity; For the first in the target domain The vector of boundary conditions, constraints, or source terms corresponding to a discrete entity; For the first in the target domain Known driving terms for a discrete entity; The formula for calculating the regularization loss value is as follows: ; In the formula, For trainable layer index; For the first Layer trainable weight matrix; For the first Layer-trainable bias vectors; It is the Frobenius norm.

[0014] The present invention has the following beneficial effects: (1) This invention proposes a method for intelligent conversion of numerical simulation model grids based on hybrid neural networks. By unifying the representation of finite difference regular grids and finite element unstructured grids as graphs, the topological relationship between discrete entities in the source and target domains is explicitly modeled, avoiding the problem of insufficient utilization of topological information by traditional pure geometric interpolation methods. At the same time, scale encoding, multi-scale cross-domain neighborhood and cross-scale association weights are introduced, which are suitable for cross-scale mapping scenarios with obvious differences in coarseness and fineness.

[0015] (2) This invention proposes an intelligent conversion method for numerical simulation model meshes based on hybrid neural networks. It combines source domain graph neural network encoding, target domain graph neural network propagation, and multilayer perceptron decoding to construct a GNN-MLP hybrid model, which can extract long-range topological information and enhance local nonlinear reconstruction capabilities. At the same time, by introducing conservation loss, cycle consistency loss, and physical residual loss, it effectively reduces the loss of mapping information and improves the stability, consistency, and interpretability of mapping results. It is applicable not only to different types of physical fields such as temperature, displacement, stress, pressure, velocity, and concentration, but also to two-dimensional, three-dimensional, and multi-material, multi-subdomain, and multi-physics coupling environments. It realizes the conversion between different numerical simulation model meshes and provides technical support for engineering simulation. Attached Figure Description

[0016] Figure 1 This is a flowchart of the intelligent grid conversion method for numerical simulation models based on hybrid neural networks, as described in this invention.

[0017] Figure 2 This is the curve showing the change of the total loss function during the training process of the GNN-MLP hybrid model.

[0018] Figure 3 This is a schematic diagram of the source domain temperature field in a regular finite difference grid.

[0019] Figure 4 This is a schematic diagram of the temperature field of the target domain in a random unstructured finite element mesh.

[0020] Figure 5 This is a schematic diagram of the forward field mapping result.

[0021] Figure 6 This is a schematic diagram of the inverse field mapping result. Detailed Implementation

[0022] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0023] Example 1 This invention proposes a method for intelligent grid conversion of numerical simulation models based on hybrid neural networks, such as... Figure 1As shown, the mesh conversion method applicable to different reservoir numerical simulation models in reservoir numerical simulation includes the following steps: Step 1: Obtain source domain data based on finite difference mesh and target domain data based on finite element mesh. Preprocess the coordinates, scale, and attributes of the source and target domains to construct the input features of each discrete entity in the source and target domains. This includes the following sub-steps: Step 1.1: Obtain source domain data and target domain data, and determine if the source domain contains... A discrete entity, the target domain contains Let there be discrete entities, and denote the index of the discrete entities in the source domain as... The discrete entity index in the target domain is denoted as .

[0024] The coordinates of discrete entities in the source and target domains are normalized to obtain the normalized coordinate vectors of the discrete entities. The calculation formula is as follows: ; in, ; In the formula, For the first Normalized coordinate vectors of discrete entities; For the first The discrete entity in the first... Normalized coordinate components in each spatial direction; It is the transpose matrix; For the first The discrete entity in the first... The original coordinates in each spatial direction; For the current computational domain in the th The minimum coordinate value in each spatial direction; For the current computational domain in the th The maximum coordinate value in each spatial direction; This refers to the spatial direction number; Let be the total dimension of the space.

[0025] Step 1.2: Calculate the local feature scales of the source and target domains.

[0026] Furthermore, the formula for calculating the local feature scale of the source domain is: ; In the formula, For the first in the source domain Local feature scale of a discrete entity; For multiplication; For the first The discrete entity in the first... Local grid spacing in a spatial direction.

[0027] The formula for calculating the local feature scale of the target domain is: ; In the formula, For the first in the target domain Local feature scale of a discrete entity; For the first in the target domain The volume, area, or node-controlled volume corresponding to a discrete entity.

[0028] Step 1.3: Perform cross-scale coding on the source and target domains to obtain the scale codes for the source and target domains. The calculation formula is as follows: ; In the formula, For the first in the source domain Scale encoding of discrete entities; For the first in the target domain Scale encoding of discrete entities; It is the natural logarithm function; Use the reference scale, set according to the global average grid scale, median scale, or a specified scale.

[0029] Step 1.4: Determine the structural feature vectors of the source and target domains.

[0030] Furthermore, the formula for calculating the structural feature vector of the source domain is as follows: ; In the formula, For the first in the source domain Structural feature vectors of discrete entities; For the first in the source domain Normalized coordinate vectors of discrete entities; For the first in the source domain The attribute vector of a discrete entity, in this embodiment including reservoir parameters such as density and permeability; For the first in the source domain The boundary attribute vector or region attribute vector of a discrete entity, which includes boundary type encoding in this embodiment; This involves concatenating vectors.

[0031] Furthermore, the formula for calculating the structural feature vector of the target domain is as follows: ; In the formula, For the first in the target domain Structural feature vectors of discrete entities; For the first in the target domain Normalized coordinate vectors of discrete entities; For the first in the target domain The local geometric feature vector of a discrete entity, in this embodiment, includes the unit type encoding, aspect ratio, and boundary normal vector; For the first in the target domain Attribute vectors of discrete entities; For the first in the target domain Boundary attribute vectors or region attribute vectors of discrete entities.

[0032] Then, based on the structural feature vectors of the source and target domains, the input features of the source and target domains are determined, and the calculation formula is as follows: ; In the formula, For the first in the source domain Input features of a discrete entity; For the first in the source domain The physical field value vector of a discrete entity. , for 3D real space; For the first in the target domain Input features of a discrete entity.

[0033] Step 2 involves converting the finite difference mesh into a source domain graph and the finite element mesh into a target domain graph. The graph nodes, edge features, and node feature matrices are determined, and the source domain graph is topologically encoded using a source domain graph neural network to obtain high-order topological features. This includes the following sub-steps: Step 2.1: Obtain the graph structures corresponding to the source and target domains. Convert the finite difference mesh into the source domain graph and the finite element mesh into the target domain graph, resulting in: ; ; In the formula, For the source domain graph; , , These are the set of nodes, the set of edges, and the node feature matrix of the source domain graph, respectively. For the target domain diagram; , , These are the node set, edge set, and node feature matrix of the target domain graph, respectively.

[0034] In this embodiment, the edges of the source domain graph are established according to the adjacency of the rule template. In the rule template, 4 or 8 neighbors are used for two-dimensional graphs, and 6, 18 or 26 neighbors are used for three-dimensional graphs. The edges of the target domain graph are established according to the unit connection relationship. The graph edges are established by sharing unit edges, faces or unit nodes.

[0035] Step 2.2, denote the discrete entity index in the source domain graph as... The discrete entity index in the target domain graph is denoted as Determine the graph edge features of the source and target domain graphs.

[0036] Furthermore, the formula for calculating the graph edge features is as follows: ; In the formula, For the field number, , For the source domain, For the target domain; For domain From discrete entities Pointing to discrete entities Graph edge features; , Domains The Middle The discrete entity, the first Normalized coordinate vectors of discrete entities; , Domains The Middle The discrete entity, the first Scale encoding of discrete entities; , Domains The Middle The discrete entity, the first Boundary attribute vectors or region attribute vectors of discrete entities; This involves concatenating vectors.

[0037] Step 2.3: Use the source domain graph neural network to perform topological encoding on the source domain graph to obtain the high-order topological features of the source domain.

[0038] Furthermore, the source domain graph neural network internally comprises a total of The initial hidden features of the source domain graph neural network are set to: (Number of structural layers) ; In the formula, For the first in the source domain Hidden features of discrete entities in the first layer of a source domain graph neural network; For the first in the source domain Input features of a discrete entity.

[0039] The hidden feature update process of each structural layer in the source domain graph neural network is as follows: ; in, ; ; In the formula, The layer number; For the first in the source domain The discrete entities in the source domain graph neural network are in the th... The hidden features of the layer; It is a non-linear activation function; For the source domain graph neural network, the first The weight matrix is ​​transformed based on the node's own characteristics in the layer. For the first in the source domain The discrete entities in the source domain graph neural network are in the th... The hidden features of the layer; For the source domain graph, the first The set of neighbors of a discrete entity; In source domain graph neural networks The first layer The discrete entity to the first Normalized attention weights for discrete entities; It is the transpose matrix; In source domain graph neural networks Neighbor feature transformation weight matrix of the layer; For the first The discrete entities in the source domain graph neural network are in the th... The hidden features of the layer; is the bias vector of the source domain graph neural network; It is an exponential function; For the source domain graph neural network, the first From the first layer The discrete entity to the first Unnormalized attention weights when discrete entities transmit information; For the source domain graph neural network, the first From the first layer The discrete entity to the first Unnormalized attention weights when discrete entities transmit information; For the source domain graph neural network, the first The trainable attention vector of the layer; For the source domain graph neural network, the first The trainable weight matrix used for attention calculation in the layer; The graph edge features of the source domain graph.

[0040] Step 3: Based on the normalized coordinate distance, scale difference, and material compatibility between discrete entities in the source domain and discrete entities in the target domain, establish a multi-scale cross-domain neighborhood and calculate the cross-scale association weights. Aggregate the high-order topological features of the source domain into the target domain to obtain multi-scale cross-domain aggregated features, including the following sub-steps: Step 3.1: Obtain the compatibility coefficient between the source domain and the target domain.

[0041] Furthermore, the formula for calculating the compatibility coefficient is as follows: ; In the formula, For the first in the source domain The discrete entity and the target domain in the nth discrete entity Compatibility coefficients between discrete entities; It is an exponential function; For the first in the source domain Attribute vectors of discrete entities; For the first in the target domain Attribute vectors of discrete entities; It is a Euclidean second norm; For similarity temperature parameters.

[0042] Step 3.2: Based on the cross-domain neighborhoods of each discrete entity in the target domain at a preset scale radius, construct a multi-scale neighborhood, resulting in: ; In the formula, The scale radius number; In the first At the radius of the nth scale, and in the target domain, the nth... A set of source domain neighbors associated with a discrete entity; Indexes discrete entities in the source domain; Indexing discrete entities in the target domain; For the first in the source domain Normalized coordinate vectors of discrete entities; For the first in the target domain Normalized coordinate vectors of discrete entities; For the first One scale radius; It is an L2 norm.

[0043] Step 3.3: Determine the cross-scale correlation score between the corresponding discrete entities in the source and target domains based on the normalized coordinate distance, structural feature vector, and material compatibility coefficient, and determine the cross-scale association weight of each discrete entity in the multi-scale neighborhood.

[0044] Furthermore, the formula for calculating the cross-scale association weight is as follows: ; in, ; In the formula, For the first In the source domain with a radius of ... The discrete entity pair in the target domain is the th discrete entity. Cross-scale association weights between discrete entities; It is an exponential function; For the first In the source domain with a radius of ... The discrete entity pair in the target domain is the th discrete entity. Cross-scale correlation score between discrete entities; For discrete entities in a multi-scale neighborhood; For the first In the multi-scale neighborhood of the i-th scale radius, the i-th The discrete entity pair in the target domain is the th discrete entity. Cross-scale correlation score between discrete entities; For the first Distance temperature parameters of a radius on a scale; For the first in the source domain Structural feature vectors of discrete entities; For the first in the target domain Structural feature vectors of discrete entities; For the first Temperature parameters differing across radii; For the first Gain coefficient for each scale radius; The material compatibility coefficient; It is an absolute value.

[0045] Step 3.4: Aggregate the high-order topological features of the source domain into the target domain according to the cross-scale association weights to obtain multi-scale cross-domain aggregated features.

[0046] Furthermore, the formula for calculating the multi-scale cross-domain aggregation feature is as follows: ; In the formula, For the first in the target domain Multi-scale cross-domain aggregation features of discrete entities; For the total number of multiple scales; for The aggregation results at each scale radius are sequentially spliced ​​together; For the first Cross-domain mapping weight matrix over a scale radius; For the first in the source domain The source domain high-order topological features of a discrete entity.

[0047] Step 4: Fuse the aggregated multi-scale cross-domain features with the input features of the target domain as the initial latent features of the target domain graph neural network. Use the target domain graph neural network to perform graph propagation to obtain the high-order latent features of the target domain. Combine this with multilayer perceptron mapping and decoding to obtain the target domain mapping result. This includes the following sub-steps: Step 4.1: Fuse the input features of the target domain with the multi-scale cross-domain aggregated features to determine the initial latent features of the target domain.

[0048] Furthermore, the initial latent features of the target domain are: ; In the formula, For the first in the target domain Initial latent features of discrete entities; This is the initial fusion mapping function; For the first in the target domain Multi-scale cross-domain aggregation features of discrete entities; This involves concatenating vectors. For the first in the target domain Input features of a discrete entity; This is the initial fusion weight matrix; This is the initial fusion bias vector.

[0049] Step 4.2: Construct a target domain graph neural network and use it to obtain high-order latent features of the target domain.

[0050] Furthermore, the target domain graph neural network internally comprises a total of The hidden feature update process for each structural layer in the target domain graph neural network is as follows: ; in, ; ; In the formula, The layer number; For the first in the target domain The discrete entities in the target domain graph neural network are in the nth discrete entity. The hidden features of the layer; It is a non-linear activation function; For the target domain graph neural network, the first The weight matrix is ​​transformed based on the node's own characteristics in the layer. For the first in the target domain The discrete entities in the source domain graph neural network are in the th... The hidden features of the layer; For the target domain graph, the first The set of neighbors of a discrete entity; For the discrete entity index in the target domain graph; For target domain graph neural networks The first layer The discrete entity to the first Normalized attention weights for discrete entities; For target domain graph neural networks Neighbor feature transformation weight matrix of the layer; For the first The discrete entities in the target domain graph neural network are in the nth discrete entity. The hidden features of the layer; The bias vector for the target domain graph neural network; It is the transpose matrix; It is an exponential function; For the target domain graph neural network, the first From the first layer The discrete entity to the first Unnormalized attention weights when discrete entities transmit information; For the target domain graph neural network, the first From the first layer The discrete entity to the first Unnormalized attention weights when discrete entities transmit information; For the target domain graph neural network, the first The trainable attention vector of the layer; For the target domain graph neural network, the first The trainable weight matrix used for attention calculation in the layer; The edge features of the target domain graph.

[0051] Step 4.3: Use a multilayer perceptron to decode the high-order latent features of the target domain and output the target domain mapping result.

[0052] Furthermore, the multilayer perceptron is configured as follows: ; In the formula, This is the output vector of the multilayer perceptron; This is the input vector of the multilayer perceptron; This is the weight matrix of each hidden layer in the multilayer perceptron; represents the bias vector of each hidden layer in a multilayer perceptron; This is the weight matrix of the output layer in a multilayer perceptron; This is the bias vector of the output layer in a multilayer perceptron.

[0053] The input vector of the multilayer perceptron is: ; In the formula, For the first in the target domain The fusion features of discrete entity inputs to a multilayer perceptron; For the first in the target domain High-order latent features of the target domain of discrete entities.

[0054] The output vector of the multilayer perceptron is: ; In the formula, The first prediction obtained by the reservoir numerical simulation model Physical field values ​​of discrete entity targets.

[0055] Step 5: Exchange the source and target domains, construct the reverse mapping from the finite element mesh to the finite difference mesh, and establish cyclic consistency constraints, including the following sub-steps: Step 5.1: Perform a reverse mapping from the finite element mesh to the finite difference mesh to obtain the target domain prediction field set and the source domain prediction field set mapped back to the source domain, resulting in: ; In the formula, For the target domain prediction field set; It is a forward mapping network; This is the set of trainable parameters for a forward mapping network. The source domain is the input feature set; For the source domain graph; For the target domain diagram; For the source domain prediction field set; It is a reverse mapping network; This is the set of trainable parameters for the inverse mapping network; Input the feature set for the target domain.

[0056] Step 5.2: Based on the target domain prediction field set, the source domain prediction field set, the target domain structural feature vector, and the source domain structural feature vector, construct cycle consistency using the forward prediction results to obtain the complete input feature set of the target domain. and the complete input feature set of the source domain The complete input feature set of the target domain is formed by concatenating the target domain prediction field set and the target domain structural feature vector set, and the complete input feature set of the source domain is formed by concatenating the source domain prediction field set and the source domain structural feature vector set.

[0057] The complete target domain input features of each discrete entity in the complete target domain input feature set, and the complete target domain input features of each discrete entity in the complete source domain input feature set, are calculated using the following formulas: ; In the formula, For the first in the target domain Complete input features of the target domain for each discrete entity; For the first in the target domain The target domain structural feature vector of a discrete entity; For the first in the target domain Structural feature vectors of discrete entities; For the first in the source domain Complete source domain input features of a discrete entity; For the first in the source domain The source domain structural feature vector of a discrete entity; For the first in the source domain Structural feature vectors of discrete entities; This involves concatenating vectors.

[0058] Step 5.3: Determine the complete input features of the target domain and the complete input features of the source domain, and perform source domain cyclic reconstruction and target domain cyclic reconstruction to obtain: ; In the formula, This is the result of source domain cyclic reconstruction; Provide the complete set of input features for the target domain; The result of cyclic reconstruction of the target domain; It is the complete set of input features from the source domain.

[0059] Step 6: Construct a GNN-MLP hybrid model based on the source domain graph neural network, the target domain graph neural network, and the multilayer perceptron. Set the total loss function of the GNN-MLP hybrid model, train the source domain graph neural network and the target domain graph neural network in the GNN-MLP hybrid model, and use the trained GNN-MLP hybrid model to obtain the cross-scale intelligent mapping results between the finite difference grid and the finite element grid. This includes the following sub-steps: Step 6.1: Construct a GNN-MLP hybrid model based on the source domain graph neural network, the target domain graph neural network, and the multilayer perceptron, and set the total loss function of the GNN-MLP hybrid model.

[0060] The total loss function of the GNN-MLP hybrid model is: ; In the formula, This represents the total loss function value. These are the weighting coefficients for the forward mapping loss term; This represents the forward mapping loss value; These are the weighting coefficients for the reverse mapping loss; This represents the inverse mapping loss value; The weighting coefficients for the source domain cycle consistency loss; This represents the source domain circular consistency loss value. The weighting coefficients for the target domain's cycle consistency loss; This represents the target domain's cycle consistency loss value. The weighting coefficient for the conservation loss; The value of conservation loss; This is the weighting coefficient for the physical residual loss; This represents the physical residual loss value. These are the weighting coefficients for the regularization loss; This represents the regularization loss value.

[0061] Specifically, the formula for calculating the forward mapping loss value is as follows: ; in, ; ; In the formula, This represents the forward mapping loss value; Indexing discrete entities in the target domain; For the first in the target domain Normalized supervisory weights for discrete entities; For the first in the target domain The target domain structural feature vector of a discrete entity; For the first in the target domain The true value of a discrete entity; It is a Euclidean second norm; , All are summation indices; This represents the total number of discrete entities in the source domain. The total number of discrete entities in the target domain; For the first in the source domain Normalized supervisory weights for discrete entities; For the first in the source domain The supporting volume or area of ​​a discrete entity; For the first in the source domain The supporting volume or area of ​​a discrete entity; For the first in the target domain Normalized supervisory weights for discrete entities; For the first in the target domain The supporting volume or area of ​​a discrete entity; For the first in the target domain The supporting volume or area of ​​a discrete entity; This refers to the spatial direction number; The total dimension of the space; For the first The discrete entity in the first... Local grid spacing in each spatial direction; For the first in the target domain The volume, area, or node-controlled volume corresponding to a discrete entity.

[0062] The formula for calculating the reverse mapping loss value is as follows: ; In the formula, This represents the inverse mapping loss value; Indexes discrete entities in the source domain; For the first in the source domain The source domain structural feature vector of a discrete entity; For the first in the source domain The true value of a discrete entity.

[0063] The formula for calculating the source domain cycle consistency loss is as follows: ; In the formula, For the first in the source domain The cyclic reconstruction values ​​of a discrete entity.

[0064] The formula for calculating the target domain cycle consistency loss is as follows: ; In the formula, For the first in the target domain The cyclic reconstruction values ​​of a discrete entity.

[0065] The formula for calculating the conservation loss value is as follows: ; In the formula, The integral of the target domain prediction field set under geometric weights; It represents the integral of the real physical field in the source domain under geometric weights.

[0066] The formula for calculating the physical residual loss value is as follows: ; In the formula, For discrete control equation operators; For the first in the target domain A vector of constitutive or material parameters corresponding to a discrete entity; For the first in the target domain The vector of boundary conditions, constraints, or source terms corresponding to a discrete entity; For the first in the target domain Known driving terms for a discrete entity.

[0067] The formula for calculating the regularization loss value is as follows: ; In the formula, For trainable layer index; For the first Layer trainable weight matrix; For the first Layer-trainable bias vectors; It is the Frobenius norm.

[0068] Step 6.2: Train the GNN-MLP hybrid model. When the total loss function value of the GNN-MLP hybrid model does not reach the preset accuracy value, adjust the weight coefficients of each loss term in the GNN-MLP hybrid model and continue training the GNN-MLP hybrid model. When the total loss function value of the GNN-MLP hybrid model reaches the preset accuracy value, stop training the GNN-MLP hybrid model and use the trained GNN-MLP hybrid model to obtain the cross-scale intelligent mapping results between the finite difference mesh and the finite element mesh.

[0069] Example 2 The intelligent transformation method of numerical simulation model grid based on hybrid neural network proposed in Example 1 is applied to the transformation process between regular finite difference grid and random unstructured finite element grid in reservoir numerical simulation model to obtain cross-scale intelligent mapping results between regular finite difference grid and random unstructured finite element grid.

[0070] In this embodiment, at a size of Within the computational domain, regular finite difference meshes and random unstructured finite element meshes are generated, wherein the size of the finite difference mesh is... The random unstructured finite element mesh contains 5000 nodes.

[0071] First, the source domain data based on regular finite difference grids and the target domain data based on random unstructured finite element grids are preprocessed. By using structural features such as attributes, boundary types, and local scales, and setting the regular finite difference grid to use four-neighbor connection and the random unstructured finite element grid to use K-nearest neighbor strategy to construct the graph topology, the regular finite difference grid is converted into a source domain graph and the random unstructured finite element grid is converted into a target domain graph. At the same time, KD trees are used to realize multi-scale neighborhood search and Gaussian weighted cross-domain feature aggregation, and establish multi-scale information transmission paths between heterogeneous grids.

[0072] In this embodiment, a source domain graph neural network is used to perform topological encoding on the source domain graph. The source domain graph neural network has three structural layers, each with a hidden dimension of 128. A target domain graph neural network is used to perform graph propagation. The target domain graph neural network also has three structural layers, each with a hidden dimension of 128. The multilayer perceptron is configured as a three-layer fully connected structure, with the hidden layer dimensions of each fully connected layer set to 256, 128, and 1 respectively. The output dimension of the multilayer perceptron is 1. Simultaneously, this embodiment uses a multi-scale total number of... Set to 3, meaning the scale radii are respectively , , .

[0073] A GNN-MLP hybrid model was constructed based on a source domain graph neural network, a target domain graph neural network, and a multilayer perceptron. The overall loss function of the GNN-MLP hybrid model was set, and the model was trained with Adam as the optimizer and a learning rate of 10. -3 The training of the GNN-MLP hybrid model is completed once it reaches the preset learning rate. In this embodiment, the total loss function curve during the training process is shown below. Figure 2 As shown.

[0074] Will as Figure 3 The finite-difference source domain temperature field shown is input into the trained GNN-MLP hybrid model. The GNN-MLP hybrid model outputs a target temperature field consistent with the complex random unstructured finite element mesh, as shown below. Figure 4 As shown. Simultaneously, the roles of the source and target domains are swapped to perform a reverse mapping. Combined with cycle consistency for further constraints, this yields the forward field mapping result from the source domain to the target domain and the reverse field mapping result from the target domain to the source domain, as shown. Figure 5 and Figure 6 As shown. Comparison Figure 5 and Figure 6As can be seen, the method of the present invention maintains an average accuracy of over 0.9 in bidirectional mapping between regular finite difference meshes and random unstructured finite element meshes, effectively reducing the loss of mapping information and improving the stability, consistency and interpretability of the mapping results. It is suitable for cross-scale mapping scenarios with significant differences in coarseness in engineering simulations.

[0075] Of course, the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.

Claims

1. A method for intelligent conversion of a numerical simulation model grid based on a hybrid neural network, characterized in that, Mesh conversion between different reservoir numerical simulation models is applicable to reservoir numerical simulation processes, including the following steps: Step 1: Obtain source domain data based on finite difference mesh and target domain data based on finite element mesh. Preprocess the coordinates, scale, and attributes of the source and target domains to construct the input features of each discrete entity in the source and target domains. Step 2: Convert the finite difference mesh into a source domain graph and the finite element mesh into a target domain graph. Determine the graph nodes, graph edge features, and node feature matrices respectively. Then, use the source domain graph neural network to perform topological encoding on the source domain graph to obtain the high-order topological features of the source domain. Step 3: Based on the normalized coordinate distance, scale difference and material compatibility between discrete entities in the source domain and discrete entities in the target domain, establish a multi-scale cross-domain neighborhood and calculate the cross-scale association weights. Aggregate the high-order topological features of the source domain into the target domain to obtain multi-scale cross-domain aggregated features. Step 4: The aggregated multi-scale cross-domain features are fused with the input features of the target domain to serve as the initial latent features of the target domain graph neural network. The target domain graph neural network is then used to perform graph propagation to obtain the high-order latent features of the target domain. This is combined with multilayer perceptron mapping and decoding to obtain the target domain mapping result. Step 5: Exchange the source domain and the target domain, construct the reverse mapping from the finite element mesh to the finite difference mesh, and establish cyclic consistency constraints; Step 6: Construct a GNN-MLP hybrid model based on the source domain graph neural network, the target domain graph neural network, and the multilayer perceptron. Set the total loss function of the GNN-MLP hybrid model, train the GNN-MLP hybrid model, and use the trained GNN-MLP hybrid model to obtain the cross-scale intelligent mapping results between the finite difference grid and the finite element grid.

2. The hybrid neural network-based numerical simulation model grid intelligent conversion method according to claim 1, characterized in that, Step 1 includes the following sub-steps: Step 1.1, obtain source domain data and target domain data, determine that the source domain contains discrete entities, the target domain contains discrete entities, index the discrete entities in the source domain as , and index the discrete entities in the target domain as ; The coordinates of discrete entities in the source and target domains are normalized to obtain the normalized coordinate vectors of the discrete entities. The calculation formula is as follows: ; in, ; In the formula, For the first Normalized coordinate vectors of discrete entities; For the first The discrete entity in the first... Normalized coordinate components in each spatial direction; It is the transpose matrix; For the first The discrete entity in the first... The original coordinates in each spatial direction; For the current computational domain in the th The minimum coordinate value in each spatial direction; For the current computational domain in the th The maximum coordinate value in each spatial direction; This refers to the spatial direction number; The total dimension of the space; Step 1.2: Calculate the local feature scales of the source and target domains; The formula for calculating the local feature scale of the source domain is: ; In the formula, For the first in the source domain Local feature scale of a discrete entity; For multiplication; For the first The discrete entity in the first... Local grid spacing in each spatial direction; The formula for calculating the local feature scale of the target domain is: ; In the formula, For the first in the target domain Local feature scale of a discrete entity; For the first in the target domain Volume, area, or node-controlled volume corresponding to a discrete entity; Step 1.3: Perform cross-scale coding on the source and target domains to obtain the scale codes for the source and target domains. The calculation formula is as follows: ; In the formula, For the first in the source domain Scale encoding of discrete entities; For the first in the target domain Scale encoding of discrete entities; It is the natural logarithm function; For reference scale; Step 1.4: Determine the structural feature vectors of the source and target domains; The formula for calculating the structural feature vector of the source domain is: ; In the formula, For the first in the source domain Structural feature vectors of discrete entities; For the first in the source domain Normalized coordinate vectors of discrete entities; For the first in the source domain Attribute vectors of discrete entities; For the first in the source domain Boundary attribute vectors or region attribute vectors of discrete entities; This involves concatenating vectors. The formula for calculating the structural feature vector of the target domain is: ; In the formula, For the first in the target domain Structural feature vectors of discrete entities; For the first in the target domain Normalized coordinate vectors of discrete entities; For the first in the target domain Local geometric feature vectors of discrete entities; For the first in the target domain Attribute vectors of discrete entities; For the first in the target domain Boundary attribute vectors or region attribute vectors of discrete entities; Then, based on the structural feature vectors of the source and target domains, the input features of the source and target domains are determined, and the calculation formula is as follows: ; In the formula, For the first in the source domain Input features of a discrete entity; For the first in the source domain The physical field value vector of a discrete entity. , for 3D real space; For the first in the target domain Input features of a discrete entity.

3. The intelligent grid conversion method for numerical simulation models based on hybrid neural networks according to claim 1, characterized in that, Step 2 includes the following sub-steps: Step 2.1: Obtain the graph structures corresponding to the source and target domains. Convert the finite difference mesh into the source domain graph and the finite element mesh into the target domain graph, resulting in: ; ; In the formula, For the source domain graph; , , These are the set of nodes, the set of edges, and the node feature matrix of the source domain graph, respectively. For the target domain diagram; , , These are the node set, edge set, and node feature matrix of the target domain graph, respectively. The edges of the source domain graph are established according to the adjacency of the rule template. In the rule template, 4 or 8 neighbors are used for two-dimensional graphs, and 6, 18 or 26 neighbors are used for three-dimensional graphs. The edges of the target domain graph are established according to the cell connection relationship. The graph edges are established by sharing cell edges, faces or cell nodes. Step 2.2, denote the discrete entity index in the source domain graph as... The discrete entity index in the target domain graph is denoted as Determine the graph edge features of the source and target domain graphs; The formula for calculating the graph edge features is: ; In the formula, For the field number, , For the source domain, For the target domain; For domain From discrete entities Pointing to discrete entities Graph edge features; , Domains The Middle The discrete entity, the first Normalized coordinate vectors of discrete entities; , Domains The Middle The discrete entity, the first Scale encoding of discrete entities; , Domains The Middle The discrete entity, the first Boundary attribute vectors or region attribute vectors of discrete entities; This involves concatenating vectors. Step 2.3: Use the source domain graph neural network to perform topological encoding on the source domain graph to obtain the high-order topological features of the source domain.

4. The intelligent grid conversion method for numerical simulation models based on hybrid neural networks according to claim 3, characterized in that, The source domain graph neural network has a total of [number] internal [structures]. The initial hidden features of the source domain graph neural network are set to: (Number of structural layers) ; In the formula, For the first in the source domain Hidden features of discrete entities in the first layer of a source domain graph neural network; For the first in the source domain Input features of a discrete entity; The hidden feature update process of each structural layer in the source domain graph neural network is as follows: ; in, ; ; In the formula, The layer number; For the first in the source domain The discrete entities in the source domain graph neural network are in the th... The hidden features of the layer; It is a non-linear activation function; For the source domain graph neural network, the first The weight matrix is ​​transformed based on the node's own characteristics in the layer. For the first in the source domain The discrete entities in the source domain graph neural network are in the th... The hidden features of the layer; For the source domain graph, the first The set of neighbors of a discrete entity; In source domain graph neural networks The first layer The discrete entity to the first Normalized attention weights for discrete entities; It is the transpose matrix; In source domain graph neural networks Neighbor feature transformation weight matrix of the layer; For the first The discrete entities in the source domain graph neural network are in the th... The hidden features of the layer; is the bias vector of the source domain graph neural network; It is an exponential function; For the source domain graph neural network, the first From the first layer The discrete entity to the first Unnormalized attention weights when discrete entities transmit information; For the source domain graph neural network, the first From the first layer The discrete entity to the first Unnormalized attention weights when discrete entities transmit information; For the source domain graph neural network, the first The trainable attention vector of the layer; For the source domain graph neural network, the first The trainable weight matrix used for attention calculation in the layer; The graph edge features of the source domain graph.

5. The intelligent grid conversion method for numerical simulation models based on hybrid neural networks according to claim 1, characterized in that, Step 3 includes the following sub-steps: Step 3.1: Obtain the compatibility coefficient between the source domain and the target domain; The formula for calculating the compatibility coefficient is: ; In the formula, For the first in the source domain The discrete entity and the target domain in the nth discrete entity Compatibility coefficient between discrete entities; It is an exponential function; For the first in the source domain Attribute vectors of discrete entities; For the first in the target domain Attribute vectors of discrete entities; It is a Euclidean second norm; For similarity temperature parameters; Step 3.2: Based on the cross-domain neighborhoods of each discrete entity in the target domain at a preset scale radius, construct a multi-scale neighborhood, resulting in: ; In the formula, The scale radius number; In the first At the radius of the nth scale, and in the target domain, the nth... A set of source domain neighbors associated with a discrete entity; Indexes discrete entities in the source domain; Indexing discrete entities in the target domain; For the first in the source domain Normalized coordinate vectors of discrete entities; For the first in the target domain Normalized coordinate vectors of discrete entities; For the first One scale radius; It is an L2 norm; Step 3.3: Determine the cross-scale correlation score between the corresponding discrete entities in the source domain and the target domain based on the normalized coordinate distance, structural feature vector, and material compatibility coefficient, and determine the cross-scale correlation weight of each discrete entity in the multi-scale neighborhood. The formula for calculating the cross-scale association weight is as follows: ; in, ; In the formula, For the first In the source domain with a radius of ... The discrete entity pair in the target domain is the th discrete entity. Cross-scale association weights between discrete entities; It is an exponential function; For the first In the source domain with a radius of ... The discrete entity pair in the target domain is the th discrete entity. Cross-scale correlation score between discrete entities; For discrete entities in a multi-scale neighborhood; For the first In the multi-scale neighborhood of the i-th scale radius, the i-th The discrete entity pair in the target domain is the th discrete entity. Cross-scale correlation score between discrete entities; For the first Distance temperature parameters of a radius on a scale; For the first in the source domain Structural feature vectors of discrete entities; For the first in the target domain Structural feature vectors of discrete entities; For the first Temperature parameters differing across radii; For the first Gain coefficient for each scale radius; The material compatibility coefficient; It is the absolute value; Step 3.4: Aggregate the high-order topological features of the source domain into the target domain according to the cross-scale association weights to obtain multi-scale cross-domain aggregated features; The formula for calculating the multi-scale cross-domain aggregation feature is as follows: ; In the formula, For the first in the target domain Multi-scale cross-domain aggregation features of discrete entities; For the total number of multiple scales; for The aggregation results at each scale radius are sequentially spliced ​​together; For the first Cross-domain mapping weight matrix over a scale radius; For the first in the source domain The source domain high-order topological features of a discrete entity.

6. The intelligent grid conversion method for numerical simulation models based on hybrid neural networks according to claim 1, characterized in that, Step 4 includes the following sub-steps: Step 4.1: Fuse the input features of the target domain with the multi-scale cross-domain aggregated features to determine the initial latent features of the target domain; The initial hidden features of the target domain are: ; In the formula, For the first in the target domain Initial latent features of discrete entities; This is the initial fusion mapping function; For the first in the target domain Multi-scale cross-domain aggregation features of discrete entities; This involves concatenating vectors. For the first in the target domain Input features of a discrete entity; This is the initial fusion weight matrix; This is the initial fusion bias vector; Step 4.2: Construct a target domain graph neural network and use it to obtain high-order latent features of the target domain; Step 4.3: Use a multilayer perceptron to decode the high-order latent features of the target domain and output the target domain mapping result; The multilayer perceptron is configured as follows: ; In the formula, This is the output vector of the multilayer perceptron; This is the input vector of the multilayer perceptron; This is the weight matrix of each hidden layer in the multilayer perceptron; represents the bias vector of each hidden layer in a multilayer perceptron; This is the weight matrix of the output layer in a multilayer perceptron; This is the bias vector of the output layer in a multilayer perceptron; The input vector of the multilayer perceptron is: ; In the formula, For the first in the target domain The fusion features of discrete entity inputs to a multilayer perceptron; For the first in the target domain High-order latent features of the target domain for discrete entities; The output vector of the multilayer perceptron is: ; In the formula, The first prediction obtained by the reservoir numerical simulation model Physical field values ​​of discrete entity targets.

7. The intelligent grid conversion method for numerical simulation models based on hybrid neural networks according to claim 6, characterized in that, The target domain graph neural network has a total of [number] internal [structures]. The hidden feature update process for each structural layer in the target domain graph neural network is as follows: ; in, ; ; In the formula, The layer number; For the first in the target domain The discrete entities in the target domain graph neural network are in the _th ... The hidden features of the layer; It is a non-linear activation function; For the target domain graph neural network, the first The weight matrix is ​​transformed based on the node's own characteristics in the layer. For the first in the target domain The discrete entities in the source domain graph neural network are in the th... The hidden features of the layer; For the target domain graph, the first The set of neighbors of a discrete entity; For the discrete entity index in the target domain graph; For target domain graph neural networks The first layer The discrete entity to the first Normalized attention weights for discrete entities; For target domain graph neural networks Neighbor feature transformation weight matrix of the layer; For the first The discrete entities in the target domain graph neural network are in the _th ... The hidden features of the layer; This is the bias vector for the target domain graph neural network; It is the transpose matrix; It is an exponential function; For the target domain graph neural network, the first From the first layer The discrete entity to the first Unnormalized attention weights when discrete entities transmit information; For the target domain graph neural network, the first From the first layer The discrete entity to the first Unnormalized attention weights when discrete entities transmit information; For the target domain graph neural network, the first The trainable attention vector of the layer; For the target domain graph neural network, the first The trainable weight matrix used for attention calculation in the layer; The edge features of the target domain graph.

8. The intelligent grid conversion method for numerical simulation models based on hybrid neural networks according to claim 1, characterized in that, Step 5 includes the following sub-steps: Step 5.1: Perform a reverse mapping from the finite element mesh to the finite difference mesh to obtain the target domain prediction field set and the source domain prediction field set mapped back to the source domain, resulting in: ; In the formula, For the target domain prediction field set; It is a forward mapping network; This is the set of trainable parameters for a forward mapping network. The source domain is the input feature set; For the source domain graph; For the target domain diagram; For the source domain prediction field set; It is a reverse mapping network; This is the set of trainable parameters for the inverse mapping network; Input the feature set to the target domain; Step 5.2: Based on the target domain prediction field set, the source domain prediction field set, the target domain structural feature vector, and the source domain structural feature vector, construct cycle consistency using the forward prediction results to obtain the complete input feature set of the target domain. and the complete input feature set of the source domain The complete input feature set of the target domain is formed by concatenating the target domain prediction field set and the target domain structural feature vector set, and the complete input feature set of the source domain is formed by concatenating the source domain prediction field set and the source domain structural feature vector set. The complete target domain input features of each discrete entity in the complete target domain input feature set, and the complete target domain input features of each discrete entity in the complete source domain input feature set, are calculated using the following formulas: ; In the formula, For the first in the target domain Complete input features of the target domain for each discrete entity; For the first in the target domain The target domain structural feature vector of a discrete entity; For the first in the target domain Structural feature vectors of discrete entities; For the first in the source domain Complete source domain input features of a discrete entity; For the first in the source domain The source domain structural feature vector of a discrete entity; For the first in the source domain Structural feature vectors of discrete entities; This involves concatenating vectors. Step 5.3: Determine the complete input features of the target domain and the complete input features of the source domain, and perform source domain cyclic reconstruction and target domain cyclic reconstruction to obtain: ; In the formula, This is the result of source domain cyclic reconstruction; Provide the complete set of input features for the target domain; The result of the cyclic reconstruction of the target domain; It is the complete set of input features from the source domain.

9. The intelligent grid conversion method for numerical simulation models based on hybrid neural networks according to claim 1, characterized in that, Step 6 includes the following sub-steps: Step 6.1: Construct a GNN-MLP hybrid model based on the source domain graph neural network, the target domain graph neural network, and the multilayer perceptron. Set the total loss function of the GNN-MLP hybrid model as follows: ; In the formula, This represents the total loss function value. These are the weighting coefficients for the forward mapping loss term; This represents the forward mapping loss value; These are the weighting coefficients for the reverse mapping loss; This represents the inverse mapping loss value; The weighting coefficients for the source domain cycle consistency loss; This represents the source domain circular consistency loss value. The weighting coefficients for the target domain's cycle consistency loss; This represents the target domain's cycle consistency loss value. The weighting coefficient for the conservation loss; The value of conservation loss; This is the weighting coefficient for the physical residual loss; This represents the physical residual loss value. These are the weighting coefficients for the regularization loss; This is the regularization loss value; Step 6.2: Train the GNN-MLP hybrid model. When the total loss function value of the GNN-MLP hybrid model does not reach the preset accuracy value, adjust the weight coefficients of each loss term in the GNN-MLP hybrid model and continue training the GNN-MLP hybrid model. When the total loss function value of the GNN-MLP hybrid model reaches the preset accuracy value, stop training the GNN-MLP hybrid model and use the trained GNN-MLP hybrid model to obtain the cross-scale intelligent mapping results between the finite difference mesh and the finite element mesh.

10. The intelligent grid conversion method for numerical simulation models based on hybrid neural networks according to claim 9, characterized in that, The formula for calculating the forward mapping loss is as follows: ; in, ; ; In the formula, This represents the forward mapping loss value; Indexing discrete entities in the target domain; For the first in the target domain Normalized supervisory weights for discrete entities; For the first in the target domain The target domain structural feature vector of a discrete entity; For the first in the target domain The true value of a discrete entity; It is a Euclidean second norm; , All are summation indices; This represents the total number of discrete entities in the source domain. The total number of discrete entities in the target domain; For the first in the source domain Normalized supervisory weights for discrete entities; For the first in the source domain The supporting volume or area of ​​a discrete entity; For the first in the source domain The supporting volume or area of ​​a discrete entity; For the first in the target domain Normalized supervisory weights for discrete entities; For the first in the target domain The supporting volume or area of ​​a discrete entity; For the first in the target domain The supporting volume or area of ​​a discrete entity; This refers to the spatial direction number; The total dimension of the space; For the first The discrete entity in the first... Local grid spacing in each spatial direction; For the first in the target domain Volume, area, or node-controlled volume corresponding to a discrete entity; The formula for calculating the reverse mapping loss is as follows: ; In the formula, This represents the inverse mapping loss value; Indexes discrete entities in the source domain; For the first in the source domain The source domain structural feature vector of a discrete entity; For the first in the source domain The true value of a discrete entity; The formula for calculating the source domain cycle consistency loss is as follows: ; In the formula, For the first in the source domain The cyclic reconstruction values ​​of discrete entities; The formula for calculating the target domain cycle consistency loss is as follows: ; In the formula, For the first in the target domain The cyclic reconstruction values ​​of discrete entities; The formula for calculating the conservation loss value is as follows: ; In the formula, The integral of the target domain prediction field set under geometric weights; This is the integral of the real physical field in the source domain under geometric weights; The formula for calculating the physical residual loss value is as follows: ; In the formula, For discrete control equation operators; For the first in the target domain A vector of constitutive or material parameters corresponding to a discrete entity; For the first in the target domain The vector of boundary conditions, constraints, or source terms corresponding to a discrete entity; For the first in the target domain Known driving terms for a discrete entity; The formula for calculating the regularization loss value is as follows: ; In the formula, For trainable layer index; For the first Layer trainable weight matrix; For the first Layer-trainable bias vectors; It is the Frobenius norm.

Citation Information

Patent Citations

  • Multi-scale time sequence prediction method and device, terminal and medium

    CN120387140A

  • Intelligent prediction method for pressure channeling of deep coal-bed gas well

    CN121212569A