Hydromechanics partial differential equation solving device based on autoregressive neural network

Through the fluid mechanics partial differential equation solving device based on the autoregressive neural network, the problem of multi-physics coupling problem in the existing technology is solved, the meshless and efficient partial differential equation solution is realized, and the solution accuracy and generalization ability are improved. , reducing the computational cost.

CN118586311APending Publication Date: 2024-09-03BEIHANG UNIV +1
View PDF 0 Cites 9 Cited by

Patent Information

Application Number
CN202410698096.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Existing methods for solving partial differential equations based on neural networks are difficult to handle complex multi-physics coupling problems, and have poor generalization capabilities and are difficult to migrate between different types of partial differential equations, resulting in limited effectiveness in practical applications.

Method used

A device for solving partial differential equations in fluid mechanics based on autoregressive neural networks is used. Through pre-training strategies and fine-tuning strategies, it includes flow field original data acquisition and preprocessing, discrete labeled flow field evolution process representation, flow field evolution state autoregressive prediction and The physical information scorer realizes the solution of gridless partial differential equations, captures the inherent coupling relationship between multiple physical fields, and improves the solution accuracy through the physical information scorer.

Benefits of technology

It achieves efficient meshless partial differential equation solving, improves solution accuracy and generalization capabilities, can achieve excellent performance under different initial conditions, boundary conditions and parameter settings, and reduces the time and computational cost of repeated training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118586311A
    Figure CN118586311A
Patent Text Reader

Abstract

The invention provides a hydromechanics partial differential equation solving device based on an autoregressive neural network. Comprising a pre-training strategy unit and a fine tuning strategy unit, and the pre-training strategy unit is composed of a flow field original data acquisition and preprocessing module, a discrete marking type flow field evolution process representation module, a flow field evolution state autoregression prediction module and a flow field state information decoding and intelligent inference module; the fine tuning strategy unit is composed of a physical information scoring device. By means of the scheme, fluid mechanics multi-physical field cross-dimension modeling can be achieved, and the internal coupling relation between different physical fields is captured; autoregression solution of various partial differential equations under the same framework can be realized, the solution efficiency is improved, and the time and economic cost of repeated training are reduced; and the generalization ability and the solving precision of the model can be improved in a small data scene in combination with physical rule information of a partial differential equation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of numerical simulation, and more specifically, to a fluid mechanics partial differential equation solving device based on an autoregressive neural network. Background Art

[0002] Partial differential equations (PDEs) are mathematical equations that describe the relationship between unknown functions of multiple variables and their partial derivatives. They are extremely important for describing various phenomena in nature and human society. In the field of fluid mechanics, PDEs are an indispensable tool used to describe the movement and changes of fluids, and play a core role in scientific research and technological development. In the real world, many physical processes can be modeled using PDEs. For example, in aerospace technology, the airflow around an aircraft can be characterized by the Navier-Stokes equations; the flow of hot air in a radiator or the liquid involved in heating in an industrial process is captured by the heat conduction equation; the propagation of tidal waves in the ocean and sound waves in the air can be described by the wave equation. However, the task of solving PDEs is challenging, especially when faced with equations with complex structures or in multidimensional space. Therefore, exploring accurate and efficient solutions has not only aroused widespread interest in the field of fluid mechanics research, but is also of vital importance in promoting the development of practical application technologies.

[0003] For most PDEs, their analytical solutions are often difficult to find or express directly. Therefore, using numerical methods to obtain approximate solutions to PDEs has become the mainstream approach to solving PDEs. In the past few decades, numerical solutions to PDEs have been successfully applied in many fields such as fluid mechanics. Among them, some of the more well-known numerical solution methods include the Finite Difference Method (FDM), the Finite Volume Method (FVM), the Finite Element Method (FEM), and the Spectral Method. These solution methods first perform complex meshing on the specified domain, and then apply simple functions to the small areas obtained by these meshing for approximation, and finally obtain approximate solutions to the equations. Although these methods have achieved certain results in theory and practice, the quality of their solutions depends greatly on the quality of the meshing, and an accurate meshing is often accompanied by huge computational and storage costs. In addition, even for the same numerical method, different difference formats may be required between different types of partial differential equations. The variability of this method increases the complexity of its application and, to a certain extent, restricts the widespread application of numerical methods.

[0004] In recent years, with the rapid development of artificial intelligence and deep learning, some researchers have applied machine learning models to solve PDEs, such as physics-informed neural networks (PINNs). This type of method uses physical identities such as the governing equations and boundary conditions of partial differential equations to construct residuals, and then adds these residuals to form a loss function, which is then applied to the solution of nonlinear problems. However, this type of method is limited to specific PDEs scenarios. When faced with complex physical scenarios, there will be problems of difficulty in convergence due to balance terms. Other researchers consider using data-driven operator learning methods to solve physical problems, such as Fourier Neural Operator (FNO) and Deep Operator Network (DeepONet). This type of method solves PDEs problems by learning mappings between function spaces. However, these methods are trained for specific PDEs problems, which hinders the ability to migrate across physical systems and is difficult to use for solving multi-physics partial differential equations.

[0005] In summary, the current PDEs solving methods based on neural networks are difficult to play a role in practical applications. To solve the fundamental problems, there is an urgent need for methods that can solve multi-physics field partial differential equations to solve the above problems.

[0006] Solving partial differential equations is a very challenging task in fields such as fluid mechanics. The quality of the solutions of existing numerical solution methods, such as the finite difference method and the finite volume method, is heavily dependent on the quality of meshing, while high-quality meshing brings huge computational and storage overheads. In addition, different numerical methods require different difference formats for different types of partial differential equations, which increases the complexity of the application.

[0007] In recent years, some neural network-based methods such as physics-guided neural networks (PINNs) and Fourier neural operators (FNO) have been proposed to solve partial differential equations. However, these methods still have some shortcomings. First, they are limited to specific partial differential equation scenarios and have poor generalization capabilities. Second, it is difficult to handle complex multi-physics field coupling problems. Summary of the invention

[0008] The purpose of the embodiments of the present disclosure is to provide a device for solving partial differential equations of fluid mechanics based on an autoregressive neural network.

[0009] In a general aspect, a fluid mechanics partial differential equation solving device based on an autoregressive neural network is provided, comprising a pre-training strategy unit and a fine-tuning strategy unit, wherein the pre-training strategy unit is composed of a flow field raw data acquisition and pre-processing module, a discrete labeled flow field evolution process representation module, a flow field evolution state autoregressive prediction module, and a flow field state information decoding and intelligent inference module; the fine-tuning strategy unit is composed of a physical information scorer;

[0010] The flow field raw data acquisition and preprocessing module uniformly samples from the dynamically changing physical field, records the physical field information at different times, and the information at each time is composed of multiple physical field information at different spatial positions, and then performs normalization preprocessing on the calculated sampled data;

[0011] The discrete labeled flow field evolution process representation module obtains data from the flow field raw data acquisition and preprocessing module, aligns different physical fields of the data at the same time step in the channel dimension, and then converts the continuous physical field into a discrete labeled format suitable for a deep learning model through an axial encoder;

[0012] The flow field evolution state autoregressive prediction module predicts the multi-physics field information of the next time step according to the encoded tag sequence, and captures the spatiotemporal relationship between the multi-physics fields with the help of the group query attention mechanism of LLaMA;

[0013] The flow field state information decoding and intelligent inference module decodes the physical field tag sequence of the spatiotemporal relationship between the multiple physical fields, uses an axial decoder to restore the original physical field information from the tag sequence, obtains a prediction result in the same format as the original data, and then calculates the error between the prediction result and the true value, and updates the solution device according to the error;

[0014] The physical information scorer module consists of two parts: a text encoder and a physical encoder. The prediction results are scored according to the partial differential equation information corresponding to the input sequence, and rewards are obtained by calculating whether the prediction results conform to the corresponding partial differential equation information. The rewards are used to update the parameters of the pre-trained model using reinforcement learning technology. By maximizing the expected rewards, the predictions of the pre-trained model are aligned with the physical laws described by the partial differential equation information.

[0015] The specific implementation method of the flow field raw data acquisition and preprocessing module is: discretize the domain of the partial differential equation defined in continuous space and time, and after the space is discretized, use uniform sampling to establish a grid and a calculation grid in the physical domain, and specify boundary conditions and initial conditions, and then sample all physical fields described by a certain partial differential equation to form multi-physical field time series data with a fixed sampling frequency and fixed sampling position, and finally calculate the mean and standard deviation of the time series and perform normalization processing.

[0016] The specific implementation method of the discrete label flow field evolution process representation module is as follows: First, for a partial differential equation calculation system with multiple channels, the state at a given time step t is represented as a set of label sequences T t , where p i,t It represents the numerical distribution of the physical field represented by the i-th channel at time t. There are C channels in total. The relationship between channels and within channels and the dependence on the previous time step are expressed as:

[0017] T t =[p 1,t ;p 2,t ;...;p c,t ]

[0018] Design an axial encoder E to transform the inter-channel and intra-channel relations and the dependencies on previous time steps into a unified token sequence, E: Where M is the dimension of the physical field, H is a fixed hidden dimension size, and the encoder converts the spatial dimension into a hidden representation: in represents a physical field, which is a function of space x and time t, Where C represents the number of channels, represents a physical field consisting of t state representations;

[0019] Hidden vector h x,t It is then flattened to form the final tokenized sequence, which contains a total of t time steps of the physical field latent space state representation, denoted as S 0:t-1 .

[0020] The specific implementation method of the flow field evolution state autoregressive prediction module is: use the right shift technology to train the autoregressive model, for the state sequence S 0:t-1 , predict the next state label based on the previous state The method to generate the predicted value of the next state mark is Following the basic model architecture in the field of natural language processing, the LLaMA model is used as the autoregressive generator G.

[0021] The specific implementation method of the flow field state information decoding and intelligent inference module is: in the decoding stage, the inverse process E of the axial encoding function is used -1 : to reconstruct the physical field from the hidden representation; the decoder outputs the physical field corresponding to the predicted token sequence in Represents the last time state S of the prediction sequence t :

[0022] Using batch normalized root mean square error as the loss function, for the predicted physical field Indicates that its loss function nRMSE(B) is:

[0023]

[0024] in is the standard deviation of the true physical field values ​​in the batch, and the training process consists of iteratively minimizing the loss function in each batch.

[0025] The specific implementation method of the physical information scorer module is as follows: the text encoder adopts the ALBERT-MATH model trained on the LaTeX data set; the physical encoder is based on the ViT model, designed for one-dimensional and two-dimensional partial differential equations, and introduces the CLIP contrastive learning strategy for pre-training; during the training process, the standard partial differential equations and the enhanced partial differential equations are sampled with a 50% probability balance to improve the generalization ability of the model; in the scoring stage, the consistency between the standard partial differential equations and the simulated physical field is evaluated and averaged in the time dimension to provide a reward signal for the entire solution process.

[0026] The technical effects to be achieved by the present invention are as follows:

[0027] 1. The present invention proposes a new gridless method for solving PDEs. By mapping the continuous physical field in time and space into a discrete marker sequence, the problem of a sharp increase in the amount of calculation in traditional grid-based solution methods in high-dimensional situations is avoided.

[0028] 2. The present invention designs a novel unified multi-physical field characterization and solution framework based on an autoregressive model, which can efficiently capture the intrinsic coupling relationship between different physical fields and achieve accurate description and solution of complex fluid dynamics systems.

[0029] 3. The present invention introduces a physical information scorer module, which combines the neural network prediction results with the physical laws of the control equations, further improving the solution accuracy, so that the present invention can achieve excellent performance on various PDEs systems.

[0030] 4. The present invention has good versatility and generalization ability. Once the model is trained, it can simultaneously cope with different initial conditions, boundary conditions, parameter settings and various PDEs forms, greatly reducing the time and computational cost of repeated training.

[0031] 5. The present invention adopts an autoregressive model, which can efficiently model time series data and capture long-term dependencies, thereby achieving more accurate multi-step predictions and laying the foundation for refined simulation of complex fluid systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The above and other objects and features of the present disclosure will become more apparent from the following description in conjunction with the accompanying drawings.

[0033] Figure 1 is a flowchart schematic diagram showing a fluid mechanics partial differential equation solving device based on an autoregressive neural network according to an embodiment of the present disclosure;

[0034] Figure 2 is a schematic diagram showing an example of a tokenized sequence according to an embodiment of the present disclosure;

[0035] Figure 3 is a schematic diagram showing an axial encoding method according to an embodiment of the present disclosure;

[0036] Figure 4 Schematic diagram of an axial autoregression generation process according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0037] The following specific embodiments are provided to help the reader obtain a comprehensive understanding of the methods, devices and / or systems described herein. However, after understanding the disclosure of the present application, various changes, modifications and equivalents of the methods, devices and / or systems described herein will be clear. For example, the order of operations described herein is only an example and is not limited to those orders set forth herein, but can be changed as will be clear after understanding the disclosure of the present application, except for operations that must occur in a specific order. In addition, for greater clarity and simplicity, the description of features known in the art may be omitted.

[0038] The features described herein can be implemented in different forms and should not be construed as being limited to the examples described herein. Rather, the examples described herein have been provided to illustrate only some of the many possible ways to implement the methods, devices, and / or systems described herein, which will be clear after understanding the disclosure of the present application.

[0039] As used herein, the term "and / or" includes any one of the associated listed items and any combination of any two or more.

[0040] Although terms such as "first", "second", and "third" may be used herein to describe various members, components, regions, layers, or portions, these members, components, regions, layers, or portions should not be limited by these terms. Instead, these terms are only used to distinguish one member, component, region, layer, or portion from another member, component, region, layer, or portion. Therefore, without departing from the teachings of the examples described herein, the first member, first component, first region, first layer, or first portion referred to in the examples may also be referred to as the second member, second component, second region, second layer, or second portion.

[0041] In the specification, when an element (such as a layer, a region or a substrate) is described as being “on”, “connected to” or “coupled to” another element, the element may be directly “on”, “connected to” or “coupled to” another element, or one or more other elements may be present therebetween. Conversely, when an element is described as being “directly on”, “directly connected to” or “directly coupled to” another element, there may be no other elements present therebetween.

[0042] The terms used herein are only used to describe various examples and are not intended to limit the disclosure. Unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. The terms "comprise", "include" and "have" indicate the presence of the described features, quantities, operations, components, elements and / or combinations thereof, but do not exclude the presence or addition of one or more other features, quantities, operations, components, elements and / or combinations thereof.

[0043] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by a person of ordinary skill in the art to which the present disclosure belongs after understanding the present disclosure. Unless explicitly defined as such herein, terms (such as those defined in a general dictionary) should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and should not be interpreted in an idealized or overly formal manner.

[0044] Furthermore, in the description of examples, when it is considered that a detailed description of a well-known related structure or function would cause vague interpretation of the present disclosure, such a detailed description will be omitted.

[0045] Figure 1 The invention shows a fluid mechanics partial differential equation solving device based on an autoregressive neural network according to an embodiment of the present disclosure.

[0046] In view of the above-mentioned invention purpose, the present invention proposes a fluid dynamics partial differential equation solving device based on autoregressive neural network, which includes a pre-training strategy and a fine-tuning strategy. The pre-training strategy is mainly composed of a flow field raw data acquisition and pre-processing module, a discrete labeled flow field evolution process representation module, a flow field evolution state autoregressive prediction module, and a flow field state information decoding and intelligent inference module; the fine-tuning strategy is mainly composed of a physical information scorer module. Its overall architecture is as follows Figure 1 shown.

[0047] Module 1: Flow field raw data acquisition and preprocessing module: This module is implemented using specially designed data acquisition and computing equipment, including sensors, data acquisition cards, CPUs, solid-state drives and other hardware devices. First, use speed, density, and pressure sensors to uniformly sample from the dynamically changing original physical field, and use high-speed and high-precision data acquisition cards to digitize sensor signals and record physical field information at different times. The information at each moment is composed of multiple physical field information at different spatial positions. Subsequently, a multi-core CPU is used to calculate the mean and standard deviation of the sampled data and perform normalization. After data acquisition for different PDEs, the data is stored in a high-capacity solid-state drive for subsequent calculations.

[0048] Module 2: Discrete labeled flow field evolution process representation module: This module runs on the GPU server, collects the raw data of the flow field and the data obtained in the preprocessing module, and unifies them into the state representation designed by the present invention, aligning different physical fields at the same time step in the channel dimension. Subsequently, the continuous physical field is converted into a discrete labeled format suitable for deep learning models through an axial encoder. This module effectively compresses the physical field information and inputs the encoded physical field into the next module.

[0049] Module 3: Flow field evolution state autoregressive prediction module: This module uses the large language model LLaMA as an autoregressive generator to predict the multi-physics field information of the next time step based on the encoded tag sequence on the GPU server. With the help of LLaMA's group query attention mechanism, the spatiotemporal relationship between multi-physics fields can be captured, which can achieve more accurate and efficient PDEs solutions.

[0050] Module 4: Flow field state information decoding and intelligent inference module: This module decodes the predicted physical field tag sequence and uses an axial decoder on a consumer-grade GPU computer to restore the original velocity, density, and pressure physical field information from the predicted tag sequence to obtain the same prediction results as the original data format. In addition, the error between the predicted results of velocity, density, and pressure and the actual values ​​collected by the sensor can be calculated to continuously update the solver so that it can learn from and adapt to various PDEs systems.

[0051] Module 5: Physical Information Scorer Module: This module is used in the fine-tuning phase. It uses the pre-training phase model to make predictions. The prediction results are scored based on the PDEs information corresponding to the input sequence on a consumer-grade GPU computer. The reward is calculated based on whether the prediction result conforms to the corresponding PDEs information. The reward signal is used to update the parameters of the pre-training model using reinforcement learning technology. By maximizing the expected reward, the predictions of the pre-training model can be aligned with the physical laws described by the PDEs information.

[0052] Module 1: Specific implementation of flow field raw data acquisition and preprocessing module:

[0053] The process raw data acquisition and preprocessing module of the present invention is used to sample and obtain physical field information in the changing original physical field. First, it is necessary to clarify the physical problems and corresponding PDEs to be solved, such as the Navier-Stokes equations in fluid dynamics, the stress-strain equations in solid mechanics, or the heat conduction equations in heat transfer. Secondly, PDEs are usually defined in continuous space and time, and these continuous domains need to be discretized. Usually, it is necessary to select appropriate Δt and Δx. The smaller these two values ​​are, the closer they are to the information of any space-time point. After the space is discretized, it is necessary to establish a computational grid, and a uniform sampling method is usually adopted to establish a grid in the physical domain. In addition, the present invention also needs to specify boundary conditions and initial conditions. The boundary conditions describe the behavior of the physical field on the boundary, and the initial conditions provide the state of the field at the starting point of time. All physical fields described by a certain PDEs are sampled to form multi-physical field time series data with fixed sampling frequency and fixed sampling position. Finally, the mean and standard deviation of the time series are calculated, and normalization is performed to avoid the influence of excessively large or small values ​​on the subsequent calculation process.

[0054] Module 2: Specific implementation of the discrete label flow field evolution process representation module:

[0055] The discrete labeled process evolution representation module of the present invention is used to convert the processed data into a labeled format suitable for deep learning model calculation. First, for a PDEs system with multiple channels, the present invention represents the state at a given time step t as a set of labeled sequences T t , where p i,t represents the numerical distribution of the physical field represented by the i-th channel at time t, with a total of C channels. This allows the expression of inter-channel and intra-channel relationships as well as dependencies on previous time steps:

[0056] T t =[p 1,t ;p 2,t ;...;p c,t ]

[0057] This state representation promotes the attention mechanism within and between channels, and enhances the model's ability to capture complex dynamics. For example, in the physical system described by the 1D Navier Stokes equation, there are three observed physical quantities - velocity field (Vx), density field (density) and pressure field (pressure). Assuming that there are four time steps of observation data, the time series can be expressed as follows: Figure 2 The tokenized sequence shown.

[0058] After obtaining the state representation for a period of time, the present invention needs to convert it into a unified tag sequence for subsequent calculation. represents a physical field, which is a function of space x and time t, such that Where C represents the number of channels. The present invention designs an axial encoder E: Where M is the dimension of the physical field and H is a fixed hidden dimension size. The encoder transforms the spatial dimension into a hidden representation where Represents a physical field consisting of t state representations:

[0059]

[0060] For example, assuming that in a two-dimensional space, the present invention first uses an X-axis encoder to encode the state representation, and then uses a Y-axis encoder to further compress the information, such as Figure 3 shown.

[0061] Specifically, this module usually uses a fully connected layer neural network as an axial encoder, including two neural networks: weight term and bias term. Generally, the weight size selection depends on the input dimension size. The default is 128, and the default output dimension is 32. For special and complex physical fields, a Fourier transform layer can also be added to enhance the representation ability of the neural network. Use Fourier transform to map the physical field to the frequency domain, filter out high-frequency information, multiply the low-frequency information by a learnable weight matrix, and then perform inverse Fourier transform on the low-frequency information to obtain the physical field information enhanced by Fourier transform. For 1D tasks, since the spatial information is relatively simple, only an X-axis encoder is needed to map the spatial dimension to the hidden dimension. The calculation formula is as follows:

[0062] h x,t =W*F(x, t)+b

[0063] Among them, W represents the weight term of the fully connected neural network, and b represents the bias term. For the 2D physical field with a shape of [N, N], the X-axis is first axially encoded to obtain a tensor of the shape of [N, 32], where N refers to the longest dimension of the X-axis input vector. Then the tensor is axially encoded and mapped along the Y-axis, and finally a tensor of the shape of [32, 32] is obtained. Furthermore, for 3D physical field tasks with a shape of [N, N, N], an axial encoding similar to that of 1D and 2D physical fields is adopted to encode the X, Y, and Z axes respectively to obtain a tensor of the shape of [32, 32, 32]. In order to obtain better high-frequency mode capture capabilities, the convolutional encoder can be combined with the axial encoder. Specifically, a convolutional encoder based on a convolutional neural network can be used to capture the local information of the physical field before axial encoding, and then the fully connected layer can be used to extract information on different axes to obtain the hidden vector of the physical field. The hidden vector hx,t It is then flattened to form the final tokenized sequence, which contains a total of t time steps of the physical field latent space state representation, denoted as S 0:t-1 .

[0064] Module 3: Specific implementation of the flow field evolution state autoregressive prediction module:

[0065] The flow field evolution state autoregressive prediction module of the present invention is used to extract the complex spatiotemporal relationship information in the tokenized sequence and make predictions for the next time step. The autoregressive model of the present invention is trained using the right-shift technique, which ensures the causal relationship inferred in the prediction sequence. 0:t-1 , the model predicts the next state label based on the previous state Formally, the predictions generated by this model are Taking the physical system described by the 1D NavierStokes equations in 5.3 as an example, the input of the autoregressive and prediction modules is the physical field S of the observation data in the first four time steps. 0:3 , the output is the physical field prediction value Examples include Figure 4 As shown. The present invention follows the basic model architecture in the field of natural language processing and adopts the LLaMA model as the autoregressive generator G. In the LLaMA model, the faster RMSNorm is used to replace LayerNorm, and Rotary Position Embedding (RoPE) is used to obtain position information. Most importantly, the LLaMA model uses the Grouped-query attention (GQA) mechanism, which can accelerate reasoning without losing too much performance.

[0066] Module 4: Specific implementation of flow field state information decoding and intelligent inference module:

[0067] The flow field state information decoding and intelligent inference module of the present invention is used to remap the autoregressive predicted tag sequence to the original spatiotemporal multi-physical field, obtain the velocity field, density field, and pressure field prediction results, calculate the error between the prediction results and the real value collected by the sensor, and update the model. In the decoding stage, the present invention uses the inverse process E of the axial encoding function -1 : to reconstruct the physical field from the hidden representation. The decoder outputs the physical field corresponding to the predicted token sequence in Represents the last time state S of the prediction sequence t :

[0068]

[0069] Such a decoding design ensures that the output of the model is mapped back to the original physical field dimension, which is convenient for direct comparison with real data. Considering the variance of numerical distribution between different PDEs systems, the present invention uses batch normalization root mean square error (Normalization Root Mean Square Error, nRMSE) as the loss function. Denotes the predicted physical field, the nRMSE of batch B is given by:

[0070]

[0071] in is the standard deviation of the true physical field values ​​in the batch. The training process consists of iteratively minimizing this metric across batches.

[0072] Module 5: Specific implementation of the physical information scorer module:

[0073] The physical information scoring module of the present invention is used to evaluate the consistency between the prediction results of the pre-trained model and the physical laws, ensuring that the output of the solution device conforms to specific physical laws. The module includes the following technical contents:

[0074] Rewrite partial differential equations using mathematical identities to ensure that the physical essence remains unchanged;

[0075] Convert differential equations into integral form or other equivalent forms to enrich the expression of equations;

[0076] For the system of equations, new equation variants are generated through linear combination to expand the data set;

[0077] Systematically replace equation symbols to maintain consistency and avoid ambiguity;

[0078] A GPT-4-based expert system is used to detect whether equations conform to physical principles and filter out unreasonable equations.

[0079] This module consists of two parts: a text encoder and a physical encoder. The text encoder uses the AlBERT-MATH model trained on the LaTeX dataset to efficiently encode the text information of partial differential equations. The physical encoder is based on the ViT model, designed for one-dimensional and two-dimensional PDEs, and introduces the CLIP contrastive learning strategy for pre-training. During the training process, the standard PDEs and the enhanced PDEs are sampled with a 50% probability balance to improve the generalization ability of the model. In the scoring stage, the module will evaluate the consistency between the standard PDEs and the simulated physical field, and average them in the time dimension to provide a reward signal for the entire solution process. Specifically, the simulated physical field and the standard physical field at the previous moment are converted into RGB image format with the help of the Python visualization tool Matplotlib, and input into the pre-trained Vision Transformer model. The vector representations of the two physical field images are merged as the physical field vector representation. For the text information of PDEs describing different physical fields, for example Etc., input it into the pre-trained AlBERT-MATH model to obtain vector representations of various PDEs text information. Finally, the semantic distance between the physical field vector representation and the various PDEs text information vector representations is calculated, and the semantic distance between the physical field vector representation and the corresponding PDEs text information is used as the reward r. According to the reward r, the model parameters are fine-tuned and updated using the learning mechanism in reinforcement learning that maximizes the reward obtained by the model. The design of this module can effectively improve the conformity of the output results of the pre-trained model with the physical laws, ensuring the high accuracy and interpretability of the solution device.

[0080] The ultimate main purpose of the device is to:

[0081] 1. Realize cross-dimensional modeling of multi-physics fields in fluid mechanics and capture the intrinsic coupling relationship between different physical fields.

[0082] 2. Realize autoregressive solutions for multiple partial differential equations in the same framework, improve solution efficiency, and reduce the time and economic cost of repeated training.

[0083] 3. Combine the physical law information of partial differential equations to improve the generalization ability and solution accuracy of the model in small data scenarios.

[0084] Although some embodiments of the present disclosure have been shown and described, it will be appreciated by those skilled in the art that modifications may be made to the embodiments without departing from the principles and spirit of the present disclosure, the scope of which is defined by the claims and their equivalents.

Claims

1. A fluid mechanics partial differential equation solving device based on autoregressive neural network, characterized in that: It includes a pre-training strategy unit and a fine-tuning strategy unit. The pre-training strategy unit is composed of a flow field raw data acquisition and preprocessing module, a discrete labeled flow field evolution process representation module, a flow field evolution state autoregressive prediction module, and a flow field state information decoding and intelligent inference module; the fine-tuning strategy unit is composed of a physical information scorer; The flow field raw data acquisition and preprocessing module uses velocity, density, and pressure sensors to uniformly sample from the dynamically changing raw physical field, records the physical field information at different times, and the information at each time is composed of multiple physical field information at different spatial positions, and then performs normalization preprocessing on the calculated sampled data; The discrete labeled flow field evolution process representation module obtains data from the flow field raw data acquisition and preprocessing module, aligns different physical fields of the data at the same time step in the channel dimension, and then converts the continuous physical field into a discrete labeled format suitable for a deep learning model through an axial encoder; The flow field evolution state autoregressive prediction module predicts the multi-physics field information of the next time step according to the encoded tag sequence, and captures the spatiotemporal relationship between the multi-physics fields with the help of the group query attention mechanism of LLaMA; The flow field state information decoding and intelligent inference module decodes the physical field tag sequence of the spatiotemporal relationship between the multiple physical fields, uses an axial decoder to restore the original physical field information from the tag sequence, obtains a prediction result in the same format as the original data, and then calculates the error between the prediction result and the true value, and updates the solution device according to the error; The physical information scorer module consists of two parts: a text encoder and a physical encoder. The prediction results are scored according to the partial differential equation information corresponding to the input sequence, and rewards are obtained by calculating whether the prediction results conform to the corresponding partial differential equation information. The rewards are used to update the parameters of the pre-trained model using reinforcement learning technology. By maximizing the expected rewards, the predictions of the pre-trained model are aligned with the physical laws described by the partial differential equation information.

2. The device for solving partial differential equations of fluid mechanics based on autoregressive neural network as claimed in claim 1, characterized in that: The specific implementation method of the flow field raw data acquisition and preprocessing module is: discretize the domain of the partial differential equation defined in continuous space and time, and after the space is discretized, use uniform sampling to establish a grid and a calculation grid in the physical domain, and specify boundary conditions and initial conditions, and then sample all physical fields described by a certain partial differential equation to form multi-physical field time series data with a fixed sampling frequency and fixed sampling position, and finally calculate the mean and standard deviation of the time series and perform normalization processing.

3. The device for solving partial differential equations of fluid mechanics based on autoregressive neural network as claimed in claim 2, characterized in that: The specific implementation method of the discrete label flow field evolution process representation module is as follows: First, for a partial differential equation calculation system with multiple channels, the state at a given time step t is represented as a set of label sequences T t , where p i,t It represents the numerical distribution of the physical field represented by the i-th channel at time t. There are C channels in total. The relationship between channels and within channels and the dependence on the previous time step are expressed as: T t =[p 1,t ;p 2,t ;...; p C,t ] Design an axial encoder E to transform inter-channel and intra-channel relations and dependencies on previous time steps into a unified sequence of tokens, Where M is the dimension of the physical field, H is a fixed hidden dimension size, and the encoder converts the spatial dimension into a hidden representation: in represents a physical field, which is a function of space x and time t, Where C represents the number of channels, represents a physical field consisting of t state representations; Hidden vector h x,t It is then flattened to form the final tokenized sequence, which contains a total of t time steps of the physical field latent space state representation, denoted as S 0:t-1 .

4. The apparatus for solving partial differential equations of fluid mechanics based on an autoregressive neural network as claimed in claim 3, characterized in that: The specific implementation method of the flow field evolution state autoregressive prediction module is: use the right shift technology to train the autoregressive model, for the state sequence S 0:t-1 , predict the next state label based on the previous state The method to generate the predicted value of the next state mark is Following the basic model architecture in the field of natural language processing, the LLaMA model is used as the autoregressive generator G.

5. The apparatus for solving partial differential equations of fluid mechanics based on an autoregressive neural network as claimed in claim 4, characterized in that: The specific implementation method of the flow field state information decoding and intelligent inference module is: in the decoding stage, the inverse process of the axial encoding function is used to reconstruct the physical field from the hidden representation; the decoder outputs the physical field corresponding to the predicted token sequence in Represents the last time state S of the prediction sequence t : Using batch normalized root mean square error as the loss function, for the predicted physical field Indicates that its loss function nRMSE(B) is: in is the standard deviation of the true physical field values ​​in the batch, and the training process consists of iteratively minimizing the loss function in each batch.

6. The device for solving partial differential equations of fluid mechanics based on autoregressive neural network as claimed in claim 1, characterized in that: The physical information scorer module is specifically implemented as follows: the text encoder uses the AlBERT-MATH model trained on the LaTeX dataset; the physical encoder is based on the ViT model, designed for one-dimensional and two-dimensional partial differential equations, and introduces the CLIP contrastive learning strategy for pre-training; During the training process, the standard partial differential equations and enhanced partial differential equations are sampled with a 50% probability balance to improve the generalization ability of the model; in the scoring stage, the consistency between the standard partial differential equations and the simulated physical field is evaluated and averaged over the time dimension to provide a reward signal for the entire solution process.

Citation Information

Cited By

  • System and method for cyclically solving velocity potential field based on physical information gating and application

    CN119203795A

  • Self-adaptive conductivity measurement method and system

    CN119574643A

  • Physical field solving method and device based on equipotential graph generation, equipment and medium

    CN119848399A

  • Dynamic fluid surface reconstruction method and system based on SwinLSTM network

    CN120068739A

  • A Dynamic Fluid Surface Reconstruction Method and System Based on the SwinLSTM Network

    CN120068739B