A fluid simulation data prediction and denoising method, system and device

By constructing a simulation model with an autoencoder and a denoising model in the potential space, the problems of large computational load, difficulty in noise removal, and insufficient adaptability in existing fluid simulation technologies are solved, and efficient and smooth fluid simulation data prediction and denoising are achieved.

CN119442967BActive Publication Date: 2026-01-23SELENIUM & MOLYBDENUM TECH (BEIJING) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411536162.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2026-01-23
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

Existing fluid simulation technologies suffer from high computational costs and low efficiency when dealing with complex fluid mechanics problems. They also struggle to effectively remove noise and lack adaptability and flexibility to diverse physical fields.

Method used

A simulation model is constructed using an autoencoder, a denoising model, and a decoder. Data processing is performed in the latent space, and asymmetric training is conducted using a variational autoencoder and a diffusion converter. Noise is reduced in the latent space, and simulation results are generated.

Benefits of technology

It improves the efficiency and effectiveness of fluid simulation data prediction and noise reduction, reduces computational requirements, generates smoother and more stable output results, adapts to complex conditions, and enhances the adaptability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119442967B_ABST
    Figure CN119442967B_ABST
Patent Text Reader

Abstract

The application provides a fluid simulation data prediction and noise reduction method, system and device, relates to the technical field of fluid simulation, and mainly comprises the following steps: step 1, constructing a simulation model; the simulation model comprises a self-encoder, a denoising model and a decoder arranged in sequence; the self-encoder is used for encoding conditional input data, mapping to a latent space, and obtaining representation data; the denoising model is used for introducing noise to the representation data and converting the representation data into target data through denoising processing; and the decoder is used for decoding the target data, mapping to a functional space, and obtaining simulation result data; and step 2, inputting initial condition data of fluid dynamics into the simulation model and outputting corresponding prediction result data. The scheme completes space denoising and output generation operation in the latent space, can improve operation efficiency and reduce operation cost, can make the output smoother, and thus improves the quality and stability of the output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fluid simulation technology, and in particular to a method, system and apparatus for fluid simulation data prediction and noise reduction. Background Technology

[0002] Currently, most methods for solving physical field problems employ traditional numerical methods or deep learning models, but they are not optimized for specific structures or characteristics in fluid physics problems, resulting in limited solution effectiveness.

[0003] For example, patent application CN118536415A, entitled "A Method for Reducing the Order of Two-Dimensional Physics Fields Based on Reconstructed Generative Models," discloses the following technical solution: using a generator within fluid simulation software to generate training data required for the model, the data mainly consisting of timestamps, condition variables, boundary condition variables, and corresponding simulation results; normalizing the data; inputting the simulation results of the previous frame in the data as the first part into the network; encoding the timestamps in the data through position encoding; encoding the condition variables and boundary condition variables through a multi-layer MLP; finally, fusing the encoded condition and boundary variables with the feature maps of each layer of the U-Net to complete the data generation and fusion; and then inputting the concatenated timestamps, condition information, real simulation data, and model-generated data into a discriminator to train the discriminator, which then judges the authenticity of the data and feeds the results back to the generator to train the generator.

[0004] While existing solutions can perform fluid simulations, they also have many problems:

[0005] Existing methods typically perform simulations and calculations in physical space, requiring the processing of large amounts of high-dimensional data, resulting in excessive computational burden. Especially in complex fluid dynamics problems, this approach is not only computationally intensive and inefficient, but also difficult to apply in large-scale simulation tasks.

[0006] Existing solutions often process data directly in physical space, which makes it difficult to effectively remove noise, resulting in large fluctuations in simulation results. Therefore, it is difficult to generate smooth and stable results in high-noise data environments.

[0007] Existing solutions often struggle to handle diverse physical field problems under complex conditions, especially when input conditions are varied, and the models often lack sufficient adaptability.

[0008] Existing solutions often lack the ability to flexibly process multi-channel data, making it difficult to meet the simulation requirements of different physical variables. Summary of the Invention

[0009] The purpose of this invention is to provide a method, system, and apparatus for predicting and denoising fluid simulation data, so as to solve at least one of the above-mentioned technical problems existing in the prior art.

[0010] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a method for fluid simulation data prediction and noise reduction, comprising the following steps:

[0011] Step 1: Construct a simulation model. The simulation model includes an autoencoder, a denoising model, and a decoder, set sequentially. The autoencoder encodes the conditional input data and maps it to a latent space (a low-dimensional space where each image corresponds to a point; in this space, nearby points may represent images with similar content or style) to obtain representational data. The denoising model introduces noise into the representational data and transforms it into target data through noise reduction processing. The decoder decodes the target data and maps it to a functional space (pixel / physical space) to obtain simulation result data. Compared to the traditional pixel / physical space, this scheme completes spatial denoising and output generation operations in the latent space, which can improve computational efficiency, reduce computational costs, and make the output smoother, thereby improving the quality and stability of the output.

[0012] Step 2: Input the initial condition data of fluid dynamics into the simulation model and output the corresponding prediction result data.

[0013] By using the above method, spatial denoising and output generation operations are completed in the latent space. This fully utilizes the characteristics of the latent space when learning data features, which can simplify the data representation and highlight patterns, thereby improving the efficiency and effectiveness of fluid simulation data prediction and denoising, and significantly reducing the demand for computing power and GPU performance.

[0014] In one feasible implementation, both the autoencoder and the decoder are variational autoencoders (VAEs); this can utilize the probability distribution generation capability unique to the dual VAE architecture to improve the prediction and noise reduction effects of fluid simulation data.

[0015] In one feasible implementation, the autoencoder is a first variational autoencoder, also known as a conditional encoder; the decoder is a second variational autoencoder, also known as a spatial decoder; the first variational autoencoder and the second variational autoencoder are trained asymmetrically; this can construct an asymmetric dual variational encoder structure, which is convenient for reflecting different information in the latent space and improves the simulation model's ability to understand and process complex conditions.

[0016] Of course, the autoencoder can also be a variational autoencoder, and the decoder can also be a generative adversarial network (GAN); thus reducing the complexity of the model and making it suitable for scenarios with limited computing resources.

[0017] In one feasible implementation, the asymmetric training includes:

[0018] Based on the variational autoencoder, two complete codecs are constructed: a conditional codec and a spatial codec.

[0019] Both are trained using different input data: the conditional encoder / decoder uses one type of tensor as input data; the spatial encoder / decoder uses another type of tensor as input data.

[0020] After training, only the conditional encoder in the conditional encoder-decoder (i.e., discarding the conditional decoder) is extracted as the first variational autoencoder; only the spatial decoder in the spatial encoder-decoder (i.e., discarding the spatial encoder) is extracted as the second variational autoencoder.

[0021] In one feasible implementation, the denoising model is a diffusion transformor (DiT), which can be used to efficiently capture dependencies in the data and generate high-quality results.

[0022] Of course, the denoising model can also use the denoising diffusion probability model (DDPM) or the inverse diffusion model to achieve similar denoising effects.

[0023] In one feasible implementation, the training method for the simulation model includes:

[0024] Step a1: Create and initialize the simulation model and optimizer;

[0025] Step a2: Load fluid dynamics simulation data samples into the simulation model, including initial condition data and simulation output data;

[0026] The initial condition data includes input tensors, which include initial velocity along the x-axis, initial velocity along the y-axis, and an airfoil mask image; this allows the simulation model to be trained through airfoil dynamics experiments.

[0027] The simulated output data includes an output tensor, which includes pressure, x-axis velocity, and y-axis velocity.

[0028] The initial conditional data is encoded by the first variational autoencoder and mapped to the latent space to obtain the representational data.

[0029] Step a3: The characterization data enters the diffusion converter;

[0030] In the forward process, the training objective is to transform the tensor through a Gaussian diffusion model. Add Secondary noise is used to obtain tensors that conform to a standard normal distribution. This gradually incorporates noise into real data; the specific formula can be:

[0031] ;

[0032] in, This represents the overall constant of the formula and is a hyperparameter. , Indicates adding the first The constant during secondary noise; Represents the identity matrix, used to define the covariance matrix of a multidimensional normal distribution; Indicates from arrive The conditional probability distribution; express Add the Tensor after noise;

[0033] The first The number of times and the number of times The data from this step is input into the Transform network in the diffusion converter to obtain... ;

[0034] By rewriting the random variables as noise variables, the non-random variables are optimized, resulting in the simplified formula:

[0035] ;

[0036] in, This represents a sampled noise that follows a multidimensional Gaussian distribution with zero mean and unit covariance.

[0037] The above is from produce The forward process, that is, the process of transforming an input tensor into an output tensor;

[0038] Pre-trained diffusion converters can also learn the reverse process, thus gaining the ability to reason backward (i.e., from...). Reasoning to (ability)

[0039] In the reverse process, the training objective is to... Predicting the first No next time Tensor of secondary noise That is equivalent to according to and The timestamp is used to predict the added noise, and the specific formula can be:

[0040] ;

[0041] in, This represents the conditional probability density function, given... Under the conditions, for The predicted probability distribution; Indicates that in the known The conditional mean under the given conditions; Indicates known Conditional covariance under given conditions; These represent the model parameters of the Gaussian diffusion model;

[0042] pass The log-likelihood variational lower bound is used for training, and the optimization objective is calculated using the following formula:

[0043] ;

[0044] in, Indicates the target value to be optimized; This represents the calculation of KL divergence, i.e. Compared to Information loss It is the posterior probability distribution of the forward noise-adding process; and because and Both of these conditional probability distributions are Gaussian, therefore It can be used to measure the difference between two conditional probability distributions;

[0045] The calculation formula used for training is:

[0046] ;

[0047] in, Describes a function approximator used to approximate a function from... predict ; Represents the noise tensor, and Gradient descent is used for training.

[0048] Decoding is performed using a second variational autoencoder, which maps the data to the velocity and pressure fields.

[0049] Step a4: Iteratively execute step a2 to train the simulation model until the iteration termination condition is met; in each iteration, set the sampling batch N; for each batch, input the tensor into the simulation model and output the predicted data; based on the predicted data and the simulated output data, calculate the loss value using loss functions such as mean squared error to measure the difference between the output results of the simulation model and the real data; calculate the gradient of each model parameter relative to the loss value; the optimizer updates the model parameters according to the gradient.

[0050] Step a5: After training is complete, disable random operations on the diffusion converter to ensure consistency of the diffusion converter during the subsequent inference phase.

[0051] In one feasible implementation, the evaluation method for the simulation model includes:

[0052] Step b1: Load the test data for airfoil dynamics simulation; load and initialize the pre-trained simulation model;

[0053] Step b2: For each batch of test data, the initial condition data and the real label are transferred to the computing device; the initial condition data is encoded by the first variational autoencoder and mapped to the latent space to obtain the characterization data;

[0054] Step b3: Characterize the data by generating a random noise tensor using a Gaussian diffusion model for backsampling; based on the number of backsampling steps, process the noise tensor... Perform random backsampling; each time backsampling occurs, the timestamp data and... Input to Gaussian diffusion model, output The specific formula can be:

[0055] ;

[0056] in, Describes a function approximator used to approximate a function from... predict ; Represents the noise tensor, and ;

[0057] The number of sampling steps is set by parameters; the more sampling steps, the more refined the output data of the Gaussian diffusion model.

[0058] Step b4: The output data of the Gaussian diffusion model is decoded by the second variational autoencoder to obtain the predicted results of the pressure field and velocity field.

[0059] Step b5: Compare the predicted results with the true labels one by one, and calculate the relative errors of pressure, x-axis velocity, and y-axis velocity respectively; the relative error includes L2 distance (Euclidean distance, which refers to the distance between two points in a metric space, often used to calculate the difference between vectors), and the specific calculation formula can be:

[0060] ;

[0061] in, Indicates the first One prediction result; Indicates the first One real label; This represents the total number of dimensions in the prediction result;

[0062] Step b6: Based on the relative error, calculate the average error of pressure, x-axis velocity and y-axis velocity respectively, in order to evaluate the inference performance of the simulation model.

[0063] In one feasible implementation, the simulation model further includes multiple physical channels for outputting prediction result data; the data format of the output channels is controlled by channel parameters, thereby improving the adaptability and user-friendliness of this solution.

[0064] Secondly, based on the same inventive concept, this application also provides a fluid simulation data prediction and noise reduction system, including a data receiving module, a data processing module and a result generation module;

[0065] The data receiving module is used to receive initial condition data of fluid dynamics;

[0066] The data processing module stores a pre-trained simulation model, including an autoencoder, a denoising model, and a decoder arranged sequentially. The autoencoder encodes the conditional input data and maps it to the latent space to obtain representation data. The denoising model introduces noise into the representation data and transforms it into target data through noise reduction processing. The decoder decodes the target data and maps it to the functional space to obtain prediction result data.

[0067] The result generation module is used to send the prediction result data out.

[0068] Thirdly, based on the same inventive concept, this application also provides a fluid simulation data prediction and noise reduction device, including a processor, a memory, and a bus. The memory stores instructions and data read by the processor, and the processor is used to call the instructions and data in the memory to execute the fluid simulation data prediction and noise reduction method as described above. The bus connects the functional components for transmitting information.

[0069] By adopting the above technical solution, the present invention has the following beneficial effects:

[0070] This invention provides a method, system, and apparatus for predicting and denoising fluid simulation data. It can perform denoising in the latent space, gradually generating the target output from the noise. Compared to denoising directly in the physical space, operations in the latent space make computation more efficient and produce smoother output results. This scheme uses an asymmetric encoder design, which can optimize processing according to different characteristics of the input data, improving the model's adaptability and expressiveness to input conditions. This scheme has low computational requirements, high computational efficiency, and is suitable for complex fluid mechanics problems. Attached Figure Description

[0071] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0072] Figure 1 A flowchart of a fluid simulation data prediction and noise reduction method provided in an embodiment of the present invention;

[0073] Figure 2 This is a schematic diagram of the simulation model structure provided in an embodiment of the present invention;

[0074] Figure 3 A flowchart illustrating the training method for the simulation model provided in this embodiment of the invention;

[0075] Figure 4 A flowchart of the simulation model evaluation method provided in this embodiment of the invention;

[0076] Figure 5 The following are schematic diagrams illustrating the simulation effects provided for embodiments of the present invention: Figure a shows a schematic diagram of the pressure field P of the predicted result; Figure b shows a schematic diagram of the velocity field Ux of the predicted result; Figure c shows a schematic diagram of the velocity field Uy of the predicted result; Figure d shows a schematic diagram of the pressure field P of the real label; Figure e shows a schematic diagram of the velocity field Ux of the real label; Figure f shows a schematic diagram of the velocity field Uy of the real label.

[0077] Figure 6 A diagram of a fluid simulation data prediction and noise reduction system provided in an embodiment of the present invention. Detailed Implementation

[0078] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0079] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0080] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0081] The present invention will be further explained below with reference to specific embodiments.

[0082] It should also be noted that the specific embodiments or implementation methods described below are a series of optimized settings listed by the present invention to further explain the specific content of the invention, and these settings can be combined or used in conjunction with each other.

[0083] Example 1:

[0084] like Figure 1 As shown in the figure, this embodiment provides a method for predicting and denoising fluid simulation data, which includes the following steps:

[0085] Step 1: Construct a simulation model, such as Figure 2As shown, the simulation model includes an autoencoder, a denoising model, and a decoder arranged sequentially. The autoencoder encodes the conditional input (vae_cond) data and maps it to a latent space (a low-dimensional space where each image corresponds to a point; in this space, nearby points may represent images with similar content or style) to obtain representation data. The denoising model introduces noise into the representation data and transforms it into target data (vae_res) through noise reduction processing. The decoder decodes the target data and maps it to a functional space (pixel / physical space) to obtain simulation result data. Compared to the traditional pixel / physical space, this scheme completes spatial denoising and output generation operations in the latent space, which can improve computational efficiency, reduce computational costs, and make the output smoother, thereby improving the quality and stability of the output.

[0086] Step 2: Input the initial condition data of fluid dynamics into the simulation model and output the corresponding prediction result data.

[0087] By using the above method, spatial denoising and output generation operations are completed in the latent space. This fully utilizes the characteristics of the latent space when learning data features, which can simplify the data representation and highlight patterns, thereby improving the efficiency and effectiveness of fluid simulation data prediction and denoising, and significantly reducing the demand for computing power and GPU performance.

[0088] Furthermore, both the autoencoder and the decoder are variational autoencoders (VAEs); this allows for the utilization of the probability distribution generation capability unique to the dual VAE architecture, thereby improving the prediction and noise reduction effects of fluid simulation data.

[0089] Furthermore, the autoencoder adopts a first variational autoencoder, and the decoder adopts a second variational autoencoder; the first variational autoencoder and the second variational autoencoder are trained asymmetrically; this can construct an asymmetric dual variational encoder structure, which is convenient for reflecting different information in the latent space and improves the simulation model's ability to understand and process complex conditions.

[0090] Furthermore, such as Figure 2 The asymmetric training portion shown specifically includes:

[0091] Based on the variational autoencoder, two complete codecs are constructed: a conditional codec and a spatial codec.

[0092] Both were trained using different input data: the conditional codec used a tensor of shape (3, 128, 128) as input data (the first channel is the initial velocity along the x-axis, the second channel is the initial velocity along the y-axis, and the third is the airfoil mask); the spatial codec used a tensor of shape (3, 128, 128) as input data (the three channels are pressure, x-axis velocity, and y-axis velocity, respectively).

[0093] After training, only the conditional encoder in the conditional encoder-decoder is extracted (the conditional decoder is discarded) as the first variational autoencoder; only the spatial decoder in the spatial encoder-decoder is extracted (the spatial encoder is discarded) as the second variational autoencoder.

[0094] Furthermore, the denoising model is a diffusion transformor (DiT), which can be used to efficiently capture dependencies in the data and generate high-quality results.

[0095] Furthermore, such as Figure 3 As shown, the training method for the simulation model includes:

[0096] Step a1: Create multiple training processes based on multiple devices (GPU or CPU) to perform training in a distributed manner; assign a unique identifier to each training process and set the corresponding device; create and initialize the simulation model and optimizer (e.g., AdamW optimizer).

[0097] Step a2: Load fluid dynamics simulation data samples into the simulation model, including initial condition data and simulation output data;

[0098] The initial condition data includes a three-dimensional input tensor, i.e. (3, 128, 128), specifically representing 3-dimensional input data, with each dimension being 128*128 dimensions; the input tensor includes the initial velocity along the x-axis, the initial velocity along the y-axis, and the airfoil mask image; thus, the simulation model can be trained through airfoil dynamics experiments;

[0099] The simulated output data includes a three-dimensional output tensor, namely (3, 128, 128); the output tensor includes pressure, x-axis velocity, and y-axis velocity.

[0100] The initial conditional data is encoded by the first variational autoencoder and mapped to the latent space to obtain the representational data.

[0101] Step a3: The characterization data enters the diffusion converter;

[0102] In the forward process, the training objective is to transform the tensor through a Gaussian diffusion model. Add Secondary noise is used to obtain tensors that conform to a standard normal distribution. This gradually incorporates noise into real data; the specific formula can be:

[0103] ;

[0104] in, This represents the overall constant of the formula and is a hyperparameter. , Indicates adding the first The constant during secondary noise; Represents the identity matrix, used to define the covariance matrix of a multidimensional normal distribution; Indicates from arrive The conditional probability distribution; express Add the Tensor after noise;

[0105] The first The number of times and the number of times The data from this step is input into the Transform network in the diffusion converter to obtain... ;

[0106] By rewriting the random variables as noise variables, the non-random variables are optimized, resulting in the simplified formula:

[0107] ;

[0108] in, This represents a sampled noise that follows a multidimensional Gaussian distribution with zero mean and unit covariance.

[0109] The above explains how to proceed from a positive direction. produce The positive process;

[0110] Pre-trained diffusion converters can also learn the reverse process, thus gaining the ability to reason backward (i.e., from...). Reasoning to (ability)

[0111] In the reverse process, the training objective is to... Predicting the first No next time Tensor of secondary noise That is equivalent to according to and The timestamp is used to predict the added noise, and the specific formula can be:

[0112] ;

[0113] in, This represents the conditional probability density function, given... Under the conditions, for The predicted probability distribution; Indicates that in the known The conditional mean under the given conditions; Indicates known Conditional covariance under given conditions; These represent the model parameters of the Gaussian diffusion model;

[0114] pass The variational lower bound of the log-likelihood is used for training, and the formula for calculating the optimization objective is:

[0115] ;

[0116] in, Indicates the target value to be optimized; This represents the calculation of KL divergence, i.e. Compared to Information loss It is the posterior probability distribution of the forward noise-adding process; and because and Both of these conditional probability distributions are Gaussian, therefore It can be used to measure the difference between two conditional probability distributions;

[0117] The calculation formula used for training is:

[0118] ;

[0119] in, Describes a function approximator used to approximate a function from... predict ; Represents the noise tensor, and Gradient descent is used for training.

[0120] Decoding is performed using a second variational autoencoder, which maps the data to the velocity and pressure fields.

[0121] Step a4: Iteratively execute step a2 to train the simulation model until the iteration termination condition is met; in each iteration, set the sampling batch N; for each batch, input the tensor into the simulation model and output the predicted data; based on the predicted data and the simulated output data, calculate the loss value using loss functions such as mean squared error to measure the difference between the output results of the simulation model and the real data; calculate the gradient of each model parameter relative to the loss value; the optimizer updates the model parameters according to the gradient.

[0122] Step a5: After training is complete, disable random operations (such as Dropout) on the diffusion converter to ensure consistency of the diffusion converter during the subsequent inference phase.

[0123] Furthermore, such as Figure 4 As shown, the evaluation method for the simulation model includes:

[0124] Step b1: Load the test data for airfoil dynamics simulation; load and initialize the pre-trained simulation model. Specifically, the diffusion converter can be DiT-B / 2, DiT-L / 2, or DiT-XL / 2, the variational autoencoder can be AutoencoderKL, and the checkpoint file (for handling different conditions and results); and migrate the simulation model to the computing device (GPU or CPU).

[0125] Step b2: For each batch of test data, the initial condition data and the real label are transferred to the computing device; the initial condition data is encoded by the first variational autoencoder and mapped to the latent space to obtain the characterization data;

[0126] Step b3: Characterize the data by generating a four-dimensional random noise tensor using a Gaussian diffusion model for backsampling; based on the number of backsampling steps (e.g., 250), adjust the noise tensor... Perform random backsampling; each time backsampling occurs, the timestamp data and... Input to Gaussian diffusion model, output The specific formula can be:

[0127] ;

[0128] in, Describes a function approximator used to approximate a function from... predict ; Represents the noise tensor, and ;

[0129] The number of sampling steps is set by parameters; the more sampling steps, the more refined the output data of the Gaussian diffusion model.

[0130] Step b4: The output data of the Gaussian diffusion model is decoded by the second variational autoencoder to obtain the predicted results of the pressure field and velocity field.

[0131] Step b5: Compare the predicted results with the true labels one by one, and calculate the relative errors of pressure, x-axis velocity, and y-axis velocity respectively; the relative error includes L2 distance (Euclidean distance, which refers to the distance between two points in a metric space, often used to calculate the difference between vectors), and the specific calculation formula can be:

[0132] ;

[0133] in, Indicates the first One prediction result; Indicates the first One real label; This represents the total number of dimensions in the prediction result;

[0134] Step b6: Based on the relative error, calculate the average error of pressure, x-axis velocity, and y-axis velocity respectively, in order to evaluate the inference performance of the simulation model, such as... Figure 5 As shown in the figure, figure a represents the predicted pressure field P; figure b represents the predicted velocity field Ux; figure c represents the predicted velocity field Uy; figure d represents the actual pressure field P; figure e represents the actual velocity field Ux; and figure f represents the actual velocity field Uy. A direct comparison clearly shows that the simulation results of this scheme are very close to the actual data.

[0135] Specifically, the L2 distances for both x-axis and y-axis velocities are less than 5%, and the L2 distance for pressure is approximately 8%; this is sufficient to ensure the accuracy of the simulation results.

[0136] Furthermore, the simulation model also includes multiple physical channels for outputting prediction result data; the data format of the output channels is controlled by the channel parameter (channel_idx), thereby improving the adaptability and user-friendliness of this solution.

[0137] Example 2:

[0138] like Figure 6 As shown, this embodiment provides a fluid simulation data prediction and noise reduction system, including a data receiving module, a data processing module, and a result generation module;

[0139] The data receiving module is used to receive initial condition data of fluid dynamics;

[0140] The data processing module stores a pre-trained simulation model, including an autoencoder, a denoising model, and a decoder arranged sequentially. The autoencoder encodes the conditional input data and maps it to the latent space to obtain representation data. The denoising model introduces noise into the representation data and transforms it into target data through noise reduction processing. The decoder decodes the target data and maps it to the functional space to obtain prediction result data.

[0141] The result generation module is used to send the prediction result data out.

[0142] Example 3:

[0143] This embodiment provides a fluid simulation data prediction and noise reduction device, including a processor, a memory, and a bus. The memory stores instructions and data read by the processor, and the processor is used to call the instructions and data in the memory to execute the fluid simulation data prediction and noise reduction method described above. The bus connects the various functional components for information transmission.

[0144] In another implementation, this solution can be achieved through an integrated device, which may include corresponding modules that perform one or more steps in the various embodiments described above. A module may be one or more hardware modules specifically configured to perform the corresponding step, or implemented by a processor configured to perform the corresponding step, or stored in a computer-readable medium for implementation by a processor, or implemented through some combination thereof.

[0145] The processor executes the various methods and processes described above. For example, the method implementations in this scheme can be implemented as software programs tangibly contained in a machine-readable medium, such as memory. In some implementations, part or all of the software program can be loaded and / or installed via memory and / or a communication interface. When the software program is loaded into memory and executed by the processor, one or more steps of the methods described above can be performed. Alternatively, in other implementations, the processor can be configured to execute one of the methods described above by any other suitable means (e.g., by means of firmware).

[0146] This device can be implemented using a bus architecture. A bus architecture can include any number of interconnect buses and bridges, depending on the specific application of the hardware and overall design constraints. The bus connects various circuits, including one or more processors, memory, and / or hardware modules. The bus can also connect various other circuits such as peripherals, voltage regulators, power management circuitry, external antennas, etc.

[0147] Buses can be Industry Standard Architecture (ISA) buses, Peripheral Component Interconnect (PCI) buses, or Extended Industry Standard Component (EISA) buses, etc. Buses can be divided into address buses, data buses, control buses, etc.

[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting and reducing noise in fluid simulation data, characterized in that, include: Step 1: Construct a simulation model; the simulation model includes an autoencoder, a denoising model, and a decoder set up sequentially; The autoencoder is used to encode the conditional input data and map it to the latent space to obtain representation data; the denoising model is used to introduce noise into the representation data and transform it into target data through noise reduction processing; the decoder is used to decode the target data and map it to the functional space to obtain simulation result data. Both the autoencoder and the decoder are variational autoencoders; The autoencoder uses a first variational autoencoder, and the decoder uses a second variational autoencoder. The first variational autoencoder and the second variational autoencoder are trained asymmetrically. The denoising model is a diffusion converter; The input tensors of the simulation model include the initial velocity along the x-axis, the initial velocity along the y-axis, and the airfoil mask image; the output tensors include pressure, the velocity along the x-axis, and the velocity along the y-axis. Step 2: Input the initial condition data of fluid dynamics into the simulation model and output the corresponding prediction result data.

2. The method according to claim 1, characterized in that, The training method for the simulation model includes: Step a1: Create and initialize the simulation model and optimizer; Step a2: Load fluid dynamics simulation data samples into the simulation model, including initial condition data and simulation output data; The initial condition data includes an input tensor, which includes the initial velocity along the x-axis, the initial velocity along the y-axis, and the airfoil mask image. The simulated output data includes an output tensor, which includes pressure, x-axis velocity, and y-axis velocity. The initial conditional data is encoded by the first variational autoencoder and mapped to the latent space to obtain the representational data. Step a3: The characterization data enters the diffusion converter; In the forward process, the training objective is to transform the tensor through a Gaussian diffusion model. Add Secondary noise is used to obtain tensors that conform to a standard normal distribution. The specific formula is as follows: ; in, This represents the overall constant of the formula and is a hyperparameter. , Indicates adding the first The constant during secondary noise; Represents the identity matrix, used to define the covariance matrix of a multidimensional normal distribution; Indicates from arrive The conditional probability distribution; express Add the Tensor after noise; The first The number of times and the number of times The data from this step is input into the Transform network in the diffusion converter to obtain... ; By rewriting the random variables as noise variables, the non-random variables are optimized, resulting in the simplified formula: ; in, This represents a sampled noise that follows a multidimensional Gaussian distribution with zero mean and unit covariance. In the reverse process, the training objective is to... Predicting the first No next time Tensor of secondary noise The specific formula is as follows: ; in, This represents the conditional probability density function, given... Under the conditions, for The predicted probability distribution; Indicates that in the known The conditional mean under the given conditions; Indicates known Conditional covariance under given conditions; These represent the model parameters of the Gaussian diffusion model; pass The variational lower bound of the log-likelihood is used for training, and the formula for calculating the optimization objective is: ; in, Indicates the target value to be optimized; This represents the calculation of KL divergence, i.e. Compared to Information loss It is the posterior probability distribution of the forward noise-adding process; The calculation formula used for training is: ; in, Describes a function approximator used to approximate a function from... predict ; Represents the noise tensor, and Gradient descent is used for training. Decoding is performed using a second variational autoencoder, which maps the data to the velocity and pressure fields. Step a4: Iteratively execute step a2 to train the simulation model until the iteration termination condition is met; in each iteration, set the sampling batch N; for each batch, input the tensor into the simulation model and output the predicted data; based on the predicted data and the simulated output data, calculate the loss value through the mean square error; calculate the gradient of each model parameter relative to the loss value; the optimizer updates the model parameters according to the gradient. Step a5: After training is complete, disable random operations of the diffusion converter.

3. The method according to claim 2, characterized in that, The evaluation method for the simulation model includes: Step b1: Load the test data for airfoil dynamics simulation; load and initialize the pre-trained simulation model; Step b2: For each batch of test data, the initial condition data and the real label are transferred to the computing device; the initial condition data is encoded by the first variational autoencoder and mapped to the latent space to obtain the characterization data; Step b3: Characterize the data by generating a random noise tensor using a Gaussian diffusion model; based on the number of backsampling steps, process the noise tensor... Perform random backsampling; each time backsampling occurs, the timestamp data and... Input to Gaussian diffusion model, output The specific formula is as follows: ; in, Describes a function approximator used to approximate a function from... predict ; Represents the noise tensor, and ; Step b4: The output data of the Gaussian diffusion model is decoded by the second variational autoencoder to obtain the predicted results of the pressure field and velocity field. Step b5: Compare the predicted results with the actual labels one by one, and calculate the relative errors of pressure, x-axis velocity, and y-axis velocity respectively; the relative error includes the L2 distance, and the specific calculation formula is as follows: ; in, Indicates the first One prediction result; Indicates the first One real label; This represents the total number of dimensions in the prediction result; Step b6: Based on the relative error, calculate the average error of pressure, x-axis velocity and y-axis velocity respectively.

4. The method according to claim 3, characterized in that, The number of reverse sampling steps is 250.

5. The method according to claim 1, characterized in that, The simulation model also includes multiple physical channels for outputting prediction result data; the data format of the output channels is controlled by channel parameters.

6. A fluid simulation data prediction and noise reduction system employing the method described in any one of claims 1-5, characterized in that, It includes a data receiving module, a data processing module, and a result generation module; The data receiving module is used to receive initial condition data of fluid dynamics; The data processing module stores a pre-trained simulation model, including an autoencoder, a denoising model, and a decoder arranged sequentially. The autoencoder encodes the conditional input data and maps it to the latent space to obtain representation data. The denoising model introduces noise into the representation data and transforms it into target data through noise reduction processing. The decoder decodes the target data and maps it to the functional space to obtain prediction result data. The result generation module is used to send the prediction result data out.

7. A fluid simulation data prediction and noise reduction device, characterized in that, It includes a processor, a memory, and a bus. The memory stores instructions and data read by the processor. The processor is used to call the instructions and data in the memory to execute the method as described in any one of claims 1-5. The bus connects the functional components for transmitting information.

Citation Information

Patent Citations

  • Two-dimensional physical field order reduction method based on reconstruction generative model

    CN118536415A