Fluid simulation data prediction and noise reduction method, system and device
By constructing a simulation model of the autoencoder and denoising model in fluid simulation, denoising processing in the latent space, the problems of high computational burden and difficult noise removal in the prior art are solved, and more efficient and stable fluid simulation data are achieved Predict and noise reduction effects.
Patent Information
- Application Number
- CN202411536162.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-10-31
AI Technical Summary
Existing fluid simulation technologies are overloaded in dealing with complex fluid mechanics problems, making them difficult to remove noise, and lack the flexible processing capabilities of multi-channel data.
The simulation model is constructed using autoencoder, denoising model and decoder, denoising processing and output generation in the latent space, and the processing efficiency and effect are improved by using technologies such as variational autoencoder and diffusion converter.
It significantly reduces the computational burden, improves the smoothness and stability of the output, and enhances the model's adaptability and processing capabilities to complex conditions.
Smart Images

Figure CN119442967A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fluid simulation technology, and in particular to a method, system and device for fluid simulation data prediction and noise reduction. Background Art
[0002] At present, most methods for solving physical field problems use traditional numerical methods or deep learning models, but they are not optimized for the specific structures or characteristics in fluid physics field problems, resulting in limited solution effects.
[0003] For example, a patent application with publication number CN118536415A and titled A Two-Dimensional Physical Field Order Reduction Method Based on Reconstruction Generative Model discloses: using a generator in a fluid simulation software to generate training data required for the model, the data mainly consisting of a timestamp, conditional variables, boundary conditional 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 timestamp in the data through position encoding, encoding the conditional variables and boundary conditional variables through multi-layer MLP, and finally fusing the encoded conditional and boundary variables with the feature maps of each layer of U-Net to complete data generation and fusion; splicing the timestamp, conditional information, real simulation data and model generated data and inputting them into the discriminator to train the discriminator, and then using the discriminator to determine whether the data is true or false, and then feeding back to the generator, thereby training the generator.
[0004] Although the existing solutions can perform fluid simulation, there are still many problems: Existing solutions usually simulate and calculate in physical space, which requires processing a large amount of high-dimensional data, resulting in excessive computational burden. Especially in complex fluid mechanics problems, this method is not only computationally intensive and inefficient, but also difficult to apply in large-scale simulation tasks; Existing solutions often process data directly in physical space, which makes it difficult to effectively remove noise, resulting in large fluctuations in simulation results, making it difficult to generate smooth and stable results in a high-noise data environment; Existing solutions are usually difficult to handle diverse physical field problems under complex conditions, especially when the input conditions are diverse, and the models often lack sufficient adaptability; Existing solutions often lack the ability to flexibly process multi-channel data and are unable to meet the simulation requirements of different physical variables. Summary of the invention
[0005] The object of the present invention is to provide a method, system and device for fluid simulation data prediction and noise reduction to solve at least one of the above-mentioned technical problems existing in the prior art.
[0006] In the first aspect, in order to solve the above technical problems, the present invention provides a fluid simulation data prediction and noise reduction method, comprising the following steps: Step 1, construct a simulation model; the simulation model includes an autoencoder, a denoising model and a decoder which are arranged in sequence; the autoencoder is used to encode the conditional input data and map it to a latent space (Latent Space refers to a low-dimensional space in which each picture corresponds to a point; in this space, similar points may represent pictures with similar content or style) to obtain representation data; the denoising model is used to introduce noise into the representation data and convert it into target data through noise reduction processing; the decoder is used to decode the target data and map it to a functional space (pixel / physical space) to obtain simulation result data; compared with the traditional pixel / physical space, this solution completes the spatial denoising and output generation operations in the latent space, which can not only improve the computing efficiency and reduce the computing cost, but also make the output smoother, thereby improving the output quality and stability; Step 2: Input the initial condition data of fluid dynamics into the simulation model and output the corresponding prediction result data.
[0007] Through the above method, spatial denoising and output generation operations are completed in the latent space. In this way, the latent space can be fully utilized to simplify data representation, highlight patterns and other characteristics when learning data features, improve the processing efficiency and effect of fluid simulation data prediction and denoising, and thus significantly reduce the demand for computing power and GPU performance.
[0008] In a feasible implementation, the autoencoder and the decoder are both variational autoencoders (VAE); this can utilize the probability distribution generation capability unique to the dual VAE architecture to improve fluid simulation data prediction and noise reduction effects.
[0009] In a feasible implementation, the autoencoder adopts a first variational autoencoder, which can also be called a conditional encoder; the decoder adopts a second variational autoencoder, which can also be called a spatial decoder; the first variational autoencoder and the second variational autoencoder are trained asymmetricly; in this way, an asymmetric dual variational encoder structure can be constructed, which is convenient for reflecting different information in the latent space and improves the simulation model's understanding and processing capabilities of complex conditions. Of course, the autoencoder may also adopt a variational autoencoder, and the decoder may also adopt a generative adversarial network (GAN); thereby reducing the complexity of the model and being suitable for scenarios with limited computing resources.
[0010] In a feasible implementation manner, the asymmetric training includes: Based on the variational autoencoder, two complete codecs are constructed, namely the conditional codec and the spatial codec; Both are trained with different input data: the conditional encoder-decoder with one type of tensor as input data and the spatial encoder-decoder with another type of tensor as input data; After training, only the conditional encoder in the conditional codec is intercepted (i.e., the conditional decoder is discarded) as the first variational autoencoder; only the spatial decoder in the spatial codec is intercepted (i.e., the spatial encoder is discarded) as the second variational autoencoder.
[0011] In a feasible implementation, the denoising model is a diffusion transformer (DiT), so that the diffusion transformer can be used to efficiently capture dependencies in the data and generate high-quality results.
[0012] Of course, the denoising model may also use a denoising diffusion probability model (DDPM) or an inverse diffusion model to achieve a similar denoising effect.
[0013] In a feasible implementation manner, the training method of the simulation model includes: Step a1, creating and initializing a simulation model and an optimizer; Step a2, loading 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, and the input tensor includes an x-axis initial velocity, a y-axis initial velocity, and an airfoil mask image; thus, the simulation model can be trained through an airfoil dynamics test; The simulation output data includes an output tensor, wherein the output tensor includes pressure, x-axis velocity, and y-axis velocity; The initial condition data is encoded by the first variational autoencoder and mapped to the latent space to obtain representation data; Step a3, the characterization data enters a diffusion converter; In the forward process, the training goal is to pass the Gaussian diffusion model to the tensor Add Subnoise, get a tensor that conforms to the standard normal distribution , thereby gradually applying noise to real data. The specific formula can be: ; in, Represents the total constant of the formula, which is a hyperparameter. , Indicates adding The constant of the sub-noise time; represents the identity matrix, which is used to define the covariance matrix of the multidimensional normal distribution; Indicates from arrive The conditional probability distribution of ; express Add The tensor after the noise; The first The number of times and the The data is input into the Transform network in the diffusion converter to obtain ; By rewriting random variables into noise variables, the non-random variables are optimized and the simplified formula is obtained: ; in, represents the noise sampled from a multidimensional Gaussian distribution with zero mean and unit covariance matrix; The above is from produce The forward process, that is, the process of transforming the input tensor into the output tensor; The pre-trained diffusion converter can also learn the reverse process, thus having the ability of reverse reasoning (i.e. , inferring ability); In the reverse process, the training goal is to , predict No addition was made The tensor of subnoise , which is equivalent to according to and The timestamp of the prediction is used to add noise. The specific formula can be: ; in, Represents the conditional probability density function, given that Under the conditions of The probability distribution of the prediction; Indicates that in the known The conditional mean under the condition of ; Indicates known The conditional covariance under the condition of ; represents the model parameters of the Gaussian diffusion model; pass The variational lower bound of the log-likelihood is used for training, and the calculation formula of the optimization objective is: ; in, represents the optimization target value; Represents the KL divergence calculation, that is Relative to information loss, is the posterior probability distribution of the forward noise addition process; and since and Both conditional probability distributions are Gaussian, so Can be used to measure the difference between two conditional probability distributions; The calculation formula used for training is: ; in, represents a function approximator for predict ; represents the noise tensor, and ; Use gradient descent for training; Decode through the second variational autoencoder and map to the velocity field and pressure field; Step a4, iteratively execute step a2 to train the simulation model until the iteration end condition is reached; 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 loss function such as the mean square error to measure the difference between the output result 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; Step a5: After the training is completed, the random operation of the diffusion converter is disabled to ensure that the diffusion converter remains consistent in the post-order reasoning stage.
[0014] In a feasible implementation manner, the evaluation method of the simulation model includes: Step b1, loading the test data of airfoil dynamics simulation; loading the pre-trained simulation model and initializing it; Step b2: for each batch of test data, the initial condition data and the true label are transferred to the computing device; the initial condition data is encoded by the first variational autoencoder, mapped to the latent space, and the representation data is obtained; Step b3: Characterize the data and generate a random noise tensor through the Gaussian diffusion model for reverse sampling; based on the reverse sampling steps, the noise tensor Perform random reverse sampling; each time reverse sampling, the timestamp data and Input to Gaussian diffusion model, output , the specific formula can be: ; in, represents a function approximator for predict ; represents the noise tensor, and ; The number of sampling steps is set by a parameter; the more sampling steps there are, the more refined the output data of the Gaussian diffusion model will be; Step b4: After the output data of the Gaussian diffusion model is decoded by the second variational autoencoder, the prediction results of the pressure field and the velocity field are obtained; Step b5: Compare the predicted results with the real 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 the metric space, often used for calculating the difference between vectors), and the specific calculation formula can be: ; in, Indicates prediction results; Indicates True labels; Represents the total number of dimensions of the prediction results; Step b6: Based on the relative error, the average errors of pressure, x-axis velocity and y-axis velocity are calculated respectively to evaluate the reasoning performance of the simulation model.
[0015] In a feasible implementation, the simulation model further includes a plurality of 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 the solution.
[0016] In the second aspect, based on the same inventive concept, the present application also provides a fluid simulation data prediction and noise reduction system, including a data receiving module, a data processing module and a result generating 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 in sequence; the autoencoder is used to encode the conditional input data, map it to the latent space, and obtain the representation data; the denoising model is used to introduce noise into the representation data, and convert it into target data through noise reduction processing; the decoder is used to decode the target data, map it to the function space, and obtain the prediction result data; The result generation module is used to send the prediction result data externally.
[0017] On the third aspect, based on the same inventive concept, the present application also provides a fluid simulation data prediction and noise reduction device, including a processor, a memory and a bus, wherein 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, and the bus connects the functional components for transmitting information.
[0018] By adopting the above technical solution, the present invention has the following beneficial effects: The present invention provides a method, system and device for fluid simulation data prediction and denoising, which can perform denoising in latent space and gradually generate target output from noise. Compared with denoising directly in physical space, operations in latent space make calculations more efficient and produce smoother output results. The present invention uses an asymmetric encoder design, which can optimize processing according to different characteristics of input data, thereby improving the adaptability and expressiveness of the model to input conditions. The present invention has low computing power requirements and high computing efficiency, and is suitable for complex fluid mechanics problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A flow chart of a fluid simulation data prediction and noise reduction method provided by an embodiment of the present invention; Figure 2 A schematic diagram of the simulation model structure provided by an embodiment of the present invention; Figure 3 A flow chart of a training method for a simulation model provided by an embodiment of the present invention; Figure 4 A flow chart of an evaluation method for a simulation model provided by an embodiment of the present invention; Figure 5 Schematic diagram of simulation effect provided for an embodiment of the present invention: Figure a is a schematic diagram of the pressure field P of the prediction result; Figure b is a schematic diagram of the velocity field Ux of the prediction result; Figure c is a schematic diagram of the velocity field Uy of the prediction result; Figure d is a schematic diagram of the pressure field P of the real label; Figure e is a schematic diagram of the velocity field Ux of the real label; Figure f is a schematic diagram of the velocity field Uy of the real label; Figure 6 A diagram of a fluid simulation data prediction and noise reduction system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0021] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0022] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0023] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0024] The present invention is further explained below in conjunction with specific implementation modes.
[0025] It should also be noted that the following specific embodiments or specific implementations are a series of optimized settings listed in the present invention to further explain the specific content of the invention, and these settings can be used in combination or in association with each other.
[0026] Embodiment 1: like Figure 1 As shown, a fluid simulation data prediction and noise reduction method provided in this embodiment includes the following steps: Step 1: Build a simulation model, such as Figure 2As shown; the simulation model includes an autoencoder, a denoising model and a decoder which are arranged in sequence; the autoencoder is used to encode the conditional input (vae_cond) data and map it to a latent space (Latent Space refers to a low-dimensional space in which each picture corresponds to a point; in this space, similar points may represent pictures with similar content or style) to obtain representation data; the denoising model is used to introduce noise into the representation data and convert it into target data (vae_res) through denoising processing; the decoder is used to decode the target data and map it to a functional space (pixel / physical space) to obtain simulation result data; compared with the traditional pixel / physical space, this solution completes the spatial denoising and output generation operations in the latent space, which can not only improve the computing efficiency and reduce the computing cost, but also make the output smoother, thereby improving the output quality and stability; Step 2: Input the initial condition data of fluid dynamics into the simulation model, and output the corresponding prediction result data.
[0027] Through the above method, spatial denoising and output generation operations are completed in the latent space. In this way, the latent space can be fully utilized to simplify data representation, highlight patterns and other characteristics when learning data features, improve the processing efficiency and effect of fluid simulation data prediction and denoising, and thus significantly reduce the demand for computing power and GPU performance.
[0028] Furthermore, both the autoencoder and the decoder are variational autoencoders (VAE); this can utilize the probability distribution generation capability unique to the dual VAE architecture to improve fluid simulation data prediction and noise reduction effects.
[0029] 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 asymmetricly; in this way, an asymmetric dual variational encoder structure can be constructed, which is convenient for reflecting different information in the latent space and improves the simulation model's understanding and processing capabilities of complex conditions. Furthermore, if Figure 2 The asymmetric training part shown in the figure specifically includes: Based on the variational autoencoder, two complete codecs are constructed, namely the conditional codec and the spatial codec; Both are trained with different input data: the conditional codec, with a tensor of shape (3, 128, 128) (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 mask of the airfoil) as input data; the spatial codec, with a tensor of shape (3, 128, 128) (the three channels are pressure, x-axis velocity, and y-axis velocity respectively) as input data; After training, only the conditional encoder in the conditional codec is intercepted (the conditional decoder is discarded) as the first variational autoencoder; only the spatial decoder in the spatial codec is intercepted (the spatial encoder is discarded) as the second variational autoencoder.
[0030] Furthermore, the denoising model is a diffusion transformer (DiT), which can be used to efficiently capture dependencies in the data and generate high-quality results.
[0031] Furthermore, if Figure 3 As shown, the training method of the simulation model includes: Step a1: Create multiple training processes based on multiple devices (GPU or CPU), so that training can be performed in a distributed training manner; assign a unique identifier to each training process and set the corresponding device; create and initialize the simulation model and optimizer (such as AdamW optimizer); Step a2, loading 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 of a three-dimensional shape, namely (3, 128, 128), specifically representing 3D input data, each dimension of which is 128*128; the input tensor includes an initial velocity on the x-axis, an initial velocity on the y-axis, and an airfoil mask image; thus, the simulation model can be trained through an airfoil dynamics test; The simulation output data includes an output tensor of a three-dimensional shape, namely (3, 128, 128); the output tensor includes pressure, x-axis velocity and y-axis velocity; The initial condition data is encoded by the first variational autoencoder and mapped to the latent space to obtain representation data; Step a3, the characterization data enters a diffusion converter; In the forward process, the training goal is to pass the Gaussian diffusion model to the tensor Add Subnoise, get a tensor that conforms to the standard normal distribution , thereby gradually applying noise to real data. The specific formula can be: ; in, Represents the total constant of the formula, which is a hyperparameter. , Indicates adding The constant of the sub-noise time; represents the identity matrix, which is used to define the covariance matrix of the multidimensional normal distribution; Indicates from arrive The conditional probability distribution of ; express Add The tensor after the noise; The first The number of times and the The data is input into the Transform network in the diffusion converter to obtain ; By rewriting random variables into noise variables, the non-random variables are optimized and the simplified formula is obtained: ; in, represents the noise sampled from a multidimensional Gaussian distribution with zero mean and unit covariance matrix; The above is how to go from produce The forward process of The pre-trained diffusion converter can also learn the reverse process, thus having the ability of reverse reasoning (i.e. , inferring ability); In the reverse process, the training goal is to , predict No addition was made The tensor of subnoise , which is equivalent to according to and The timestamp of the prediction is used to add noise. The specific formula can be: ; in, Represents the conditional probability density function, given that Under the conditions of The probability distribution of the prediction; Indicates that in the known The conditional mean under the condition of ; Indicates known The conditional covariance under the condition of ; represents the model parameters of the Gaussian diffusion model; pass The variational lower bound of the log-likelihood is used for training, and the calculation formula for the optimization objective is: ; in, represents the optimization target value; Represents the KL divergence calculation, that is Relative to information loss, is the posterior probability distribution of the forward noise addition process; and since and Both conditional probability distributions are Gaussian, so Can be used to measure the difference between two conditional probability distributions; The calculation formula used for training is: ; in, represents a function approximator for predict ; represents the noise tensor, and ; Use gradient descent for training; Decode through the second variational autoencoder and map to the velocity field and pressure field; Step a4, iteratively execute step a2 to train the simulation model until the iteration end condition is reached; 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 loss function such as the mean square error to measure the difference between the output result 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; Step a5: After training is completed, disable the random operation of the diffusion converter (such as the Dropout function) to ensure that the diffusion converter remains consistent in the post-order reasoning stage.
[0032] Furthermore, if Figure 4 As shown, the evaluation method of the simulation model includes: Step b1, loading the test data of airfoil dynamics simulation; loading the pre-trained simulation model and initializing it, specifically, the diffusion converter can be DiT-B / 2, DiT-L / 2 and DiT-XL / 2, the variational autoencoder can be AutoencoderKL and the checkpoint file (for processing different conditions and results); and migrating the simulation model to the computing device (GPU or CPU); Step b2: for each batch of test data, the initial condition data and the true label are transferred to the computing device; the initial condition data is encoded by the first variational autoencoder, mapped to the latent space, and the representation data is obtained; Step b3: Characterize the data and generate a four-dimensional random noise tensor through the Gaussian diffusion model for reverse sampling; based on the reverse sampling step number (e.g., 250), the noise tensor Perform random reverse sampling; each time reverse sampling, the timestamp data and Input to Gaussian diffusion model, output , the specific formula can be: ; in, represents a function approximator for predict ; represents the noise tensor, and ; The number of sampling steps is set by a parameter; the more sampling steps there are, the more refined the output data of the Gaussian diffusion model will be; Step b4: After the output data of the Gaussian diffusion model is decoded by the second variational autoencoder, the prediction results of the pressure field and the velocity field are obtained; Step b5: Compare the predicted results with the real 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 the metric space, often used for calculating the difference between vectors), and the specific calculation formula can be: ; in, Indicates prediction results; Indicates True labels; Represents the total number of dimensions of the prediction results; Step b6: Based on the relative error, the average error of pressure, x-axis velocity and y-axis velocity is calculated respectively to evaluate the inference performance of the simulation model, such as Figure 5 As shown, Figure a shows the schematic diagram of the pressure field P of the prediction result; Figure b shows the schematic diagram of the velocity field Ux of the prediction result; Figure c shows the schematic diagram of the velocity field Uy of the prediction result; Figure d shows the schematic diagram of the pressure field P of the real label; Figure e shows the schematic diagram of the velocity field Ux of the real label; Figure f shows the schematic diagram of the velocity field Uy of the real label; It can be seen intuitively from the comparison that the simulation effect of this scheme is very close to the real data; Specifically, the L2 distances for x-axis velocity and y-axis velocity are both less than 5%, and the L2 distance for pressure is approximately 8%; this is sufficient to ensure the accuracy of the simulation results.
[0033] Furthermore, the simulation model also includes a plurality of physical channels for outputting prediction result data; the data format of the output channel is controlled by a channel parameter (channel_idx), thereby improving the adaptability and user-friendliness of the solution.
[0034] Embodiment 2: 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 generating 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 in sequence; the autoencoder is used to encode the conditional input data, map it to the latent space, and obtain the representation data; the denoising model is used to introduce noise into the representation data, and convert it into target data through noise reduction processing; the decoder is used to decode the target data, map it to the function space, and obtain the prediction result data; The result generation module is used to send the prediction result data externally.
[0035] Embodiment three: This embodiment provides a fluid simulation data prediction and noise reduction device, including a processor, a memory and a bus, wherein 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 fluid simulation data prediction and noise reduction method as described above, and the bus connects the functional components for transmitting information.
[0036] In another embodiment, the present solution can be implemented by an integrated device, which may include corresponding modules for performing each or several steps in the above-mentioned embodiments. The module may be one or more hardware modules specially configured to perform the corresponding steps, or implemented by a processor configured to perform the corresponding steps, or stored in a computer-readable medium for implementation by a processor, or implemented by some combination.
[0037] The processor performs the various methods and processes described above. For example, the method implementation in the present solution can be implemented as a software program, which is tangibly contained in a machine-readable medium, such as a memory. In some embodiments, part or all of the software program can be loaded and / or installed via a memory and / or a communication interface. When the software program is loaded into the memory and executed by the processor, one or more steps in the method described above can be executed. Alternatively, in other embodiments, the processor can be configured to perform one of the above methods by any other appropriate means (for example, by means of firmware).
[0038] The device can be implemented using a bus architecture. The bus architecture can include any number of interconnecting buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus connects various circuits including one or more processors, memories, and / or hardware modules together. The bus can also connect various other circuits such as peripherals, voltage regulators, power management circuits, external antennas, etc.
[0039] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0040] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements 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 denoising 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 arranged in sequence; The autoencoder is used to encode the conditional input data and map it to the latent space to obtain the representation data; the denoising model is used to introduce noise into the representation data and convert it into the target data through the denoising process; the decoder is used to decode the target data and map it to the function space to obtain the simulation result data; 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 autoencoder and the decoder are both variational autoencoders.
3. The method according to claim 2, characterized in that 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 asymmetric.
4. The method according to claim 3, characterized in that The denoising model is a diffusion converter.
5. The method according to claim 4, characterized in that The training method of the simulation model includes: Step a1, creating and initializing a simulation model and an optimizer; Step a2, loading 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, wherein the input tensor includes an x-axis initial velocity, a y-axis initial velocity, and an airfoil mask image; The simulation output data includes an output tensor, wherein the output tensor includes pressure, x-axis velocity, and y-axis velocity; The initial condition data is encoded by the first variational autoencoder and mapped to the latent space to obtain representation data; Step a3, the characterization data enters a diffusion converter; In the forward process, the training goal is to pass the Gaussian diffusion model to the tensor Add Subnoise, get a tensor that conforms to the standard normal distribution , the specific formula is: ; in, Represents the total constant of the formula, which is a hyperparameter. , Indicates adding The constant of the sub-noise time; represents the identity matrix, which is used to define the covariance matrix of the multidimensional normal distribution; Indicates from arrive The conditional probability distribution of ; express Add The tensor after the noise; The first The number of times and the The data is input into the Transform network in the diffusion converter to obtain ; By rewriting random variables into noise variables, the non-random variables are optimized and the simplified formula is obtained: ; in, represents the noise sampled from a multidimensional Gaussian distribution with zero mean and unit covariance matrix; In the reverse process, the training goal is to , predict No addition was made The tensor of subnoise , the specific formula is: ; in, Represents the conditional probability density function, given that Under the conditions of Probability distribution of predictions; Indicates that in the known The conditional mean under the condition of ; Indicates known The conditional covariance under the condition of ; represents the model parameters of the Gaussian diffusion model; pass The variational lower bound of the log-likelihood is used for training, and the calculation formula for the optimization objective is: ; in, represents the optimization target value; Represents the KL divergence calculation, that is Relative to information loss, is the posterior probability distribution of the forward noise addition process; The calculation formula used for training is: ; in, represents a function approximator for predict ; represents the noise tensor, and ; Use gradient descent for training; Decode through the second variational autoencoder and map to the velocity field and pressure field; Step a4, iteratively execute step a2 to train the simulation model until the iteration end condition is reached; 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 by 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 the training is completed, the random operation of the diffusion converter is disabled.
6. The method according to claim 5, characterized in that The evaluation method of the simulation model includes: Step b1, loading the test data of airfoil dynamics simulation; loading the pre-trained simulation model and initializing it; Step b2: for each batch of test data, the initial condition data and the true label are transferred to the computing device; the initial condition data is encoded by the first variational autoencoder, mapped to the latent space, and the representation data is obtained; Step b3: Characterize the data and generate a random noise tensor through the Gaussian diffusion model; based on the reverse sampling steps, the noise tensor Perform random reverse sampling; each time reverse sampling, the timestamp data and Input to Gaussian diffusion model, output , the specific formula is: ; in, represents a function approximator for predict ; represents the noise tensor, and ; Step b4: After the output data of the Gaussian diffusion model is decoded by the second variational autoencoder, the prediction results of the pressure field and the velocity field are obtained; Step b5: Compare the predicted results with the real labels one by one, and calculate the relative errors of pressure, x-axis speed and y-axis speed respectively; the relative error includes the L2 distance, and the specific calculation formula is: ; in, Indicates prediction results; Indicates True labels; Represents the total number of dimensions of the prediction results; Step b6: Based on the relative error, calculate the average error of pressure, x-axis velocity and y-axis velocity respectively.
7. The method according to claim 6, characterized in that The reverse sampling step number is 250.
8. The method according to claim 1, characterized in that The simulation model also includes a plurality of physical channels for outputting prediction result data; the data format of the output channels is controlled by channel parameters.
9. A fluid simulation data prediction and noise reduction system, characterized in that: It includes a data receiving module, a data processing module and a result generating 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 in sequence; the autoencoder is used to encode the conditional input data, map it to the latent space, and obtain the representation data; the denoising model is used to introduce noise into the representation data, and convert it into target data through noise reduction processing; the decoder is used to decode the target data, map it to the function space, and obtain the prediction result data; The result generation module is used to send the prediction result data externally.
10. A fluid simulation data prediction and noise reduction device, characterized in that: It includes a processor, a memory and a bus, wherein 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 any method as claimed in claim 1-8, and 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
Subset conditioning using variational autoencoder with a learnable tensor train induced prior
CN113039559A
Organic gas leakage diffusion real-time intelligent early warning method considering uncertainty reasoning
CN113962164A
Variational auto-encoder for mixed data types
CN115516460A
Fluid experiment measurement parameter field data noise reduction method based on auto-encoder
CN117591801A
Cited By
Flow field noise reduction method, system and equipment based on Koltzburg-Landao theory
CN120012624A
Three-dimensional model generation method and device based on industrial part genes and medium
CN120147560A
Three-dimensional model generation method, equipment and medium based on industrial parts genes
CN120147560B
Irrigation prediction method, device, equipment and medium
CN120202905A
Groundwater seepage flow prediction method and system based on stochastic maximum posterior variational inference
JP7829966B1