A flow field online simulation and visualization method and system

By constructing an online flow field simulation model of RFNO, integrating Fourier layers as residual modules and adding direct connection channels, the problem of limited accuracy of the FNO model was solved, and higher accuracy flow field simulation and dynamic interactive visualization were achieved.

CN117195769BActive Publication Date: 2026-07-31ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2023-09-07
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

The FNO model suffers from limited accuracy in online flow field simulation, especially when the number of data samples is limited. Increasing the number of layers may decrease the accuracy or even cause gradient vanishing, making training difficult.

Method used

A data sample set was constructed and an online simulation model of the RFNO flow field was trained. Several Fourier layers were integrated into a Fourier residual module, and direct connection channels were added within the module to increase the number of model layers and improve accuracy.

Benefits of technology

It achieves higher accuracy in online flow field simulation and, through integration with Unreal Engine 5, provides dynamic interactive visualization effects, enhancing the visualization and interactivity of the flow field in the scene.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117195769B_ABST
    Figure CN117195769B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for online flow field simulation and visualization, belonging to the field of flow field simulation technology. The method includes: constructing a data sample set; training an RFNO (Radio Frequency Identification) online flow field simulation model based on the data sample set to obtain a trained RFNO online flow field simulation model; inputting online physical parameters of the flow field into the trained RFNO online flow field simulation model to obtain flow field data; and performing dynamic flow field simulation and / or special effects flow field simulation based on the flow field data. This invention integrates several Fourier layers into a Fourier residual module, and adds direct-connection channels within the Fourier residual module. Therefore, increasing the number of layers can still improve accuracy, thereby achieving a more accurate online flow field simulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flow field simulation technology, and in particular to a method and system for online flow field simulation and visualization. Background Technology

[0002] The Fourier Neural Operator (FNO) is a deep learning framework based on spectral methods for solving problems involving partial differential equations and flow field calculations. FNO combines the advantages of spectral methods, preserving spatial information by performing calculations in Fourier space, while utilizing deep learning models for end-to-end training and prediction. Its network architecture is as follows: Figure 1 As shown.

[0003] Depend on Figure 1 As can be seen in part (a), the input of FNO is the initial conditions of the flow field and the position information a(x). After being encoded by P, it passes through several Fourier layers and is then decoded by Q to output the flow field.

[0004] Depend on Figure 1 As can be seen from part (b) in the diagram, in FNO, the iterative update process from Fourier layer i to Fourier layer i+1 can be represented as follows:

[0005]

[0006] The input to the Fourier layer is v(x). Positional information imparts local sensing bias, which helps the model converge faster and generalize more easily to new data. This is achieved through Fourier transform. Global convolution in Fourier space effectively extracts flow field information. Linear transform R filters out high-frequency modes, and inverse Fourier transform is used to further extract these modes. The output is transformed back to the source space, fed into a linear transformation W, and finally nonlinearly mapped by an activation function σ to help recover lost high-frequency modes and acyclic boundaries.

[0007] In online flow field simulations, datasets are extremely scarce. To obtain more accurate flow field approximations, increasing the number of layers in the FNO model can improve accuracy when the number of data samples is difficult to increase. However, in practice, while the accuracy of the FNO model increases with the number of layers, it may decrease after a certain point, or even experience gradient vanishing, as shown in the example. Figure 2 As shown, the error gradually decreases from layer 4 to layer 7, but the gradient disappears in layer 8. Therefore, the FNO model is difficult to train and has limited accuracy. Summary of the Invention

[0008] The purpose of this invention is to provide a method and system for online flow field simulation and visualization, so as to overcome the problem of limited accuracy of the FNO model and further improve the accuracy of online flow field simulation and visualization.

[0009] To achieve the above objectives, the present invention provides the following solution:

[0010] This invention provides a method for online simulation and visualization of flow fields, the method comprising the following steps:

[0011] Construct a data sample set;

[0012] The RFNO flow field online simulation model is trained based on the data sample set to obtain a trained RFNO flow field online simulation model. The RFNO flow field online simulation model includes at least multiple cascaded Fourier residual modules. Each Fourier residual module includes multiple sequentially connected Fourier layers and direct connection channels. One end of the direct connection channel is connected to the input of the first Fourier layer in the sequentially connected Fourier layers, and the other end of the direct connection channel is connected to the output of the last Fourier layer in the sequentially connected Fourier layers through a selector.

[0013] The online physical parameters of the flow field are input into the trained RFNO online flow field simulation model to obtain flow field data;

[0014] Dynamic flow field simulation and / or special effects flow field simulation are performed based on the flow field data.

[0015] Optionally, constructing the data sample set specifically includes:

[0016] The first data sample is generated based on the 2D Navier-Stokes equations; the first data sample is the calculated data of a viscous incompressible fluid in the form of unit ring vorticity;

[0017] The second data sample was generated using FEATool Multiphysics software; the second data sample is simulation data of flow around a cylinder.

[0018] The third data sample was generated using FEATool Multiphysics software; the third data sample is simulation data of the kitchen cooking flow field.

[0019] The PIV velocity measurement method was used to measure the flow field in the kitchen cooking process, and a fourth data sample was obtained; the fourth data sample is the experimental data of the flow field in the kitchen cooking process.

[0020] Add the first, second, third, and fourth data samples to the data sample set.

[0021] Optionally, the RFNO flow field online simulation model includes: an encoding layer, multiple Fourier residual modules cascaded together, and a decoding layer.

[0022] Optionally, the dynamic flow field simulation based on the flow field data specifically includes:

[0023] Spline points are set based on flow field data;

[0024] Generate spline lines from spline points;

[0025] Set reference points on the spline;

[0026] The reference point is moved along the spline in a simulation, and the velocity of the reference point at each sampling position on the spline is obtained; during the movement, the velocity of the reference point at the spline point position is consistent with the velocity of the spline point generated in the flow field data;

[0027] Using R, G, and B colors to represent the x-axis, y-axis, and z-axis components of the velocity at the sampling position of the reference point on the spline, respectively, a visualized dynamic flow field is generated.

[0028] Optionally, special effects flow field simulation is performed based on the flow field data, specifically including:

[0029] The flow field data is stored as texture data;

[0030] The texture data is read using the Niagara particle system, and particle rendering is performed to generate a visual special effects flow field.

[0031] An online flow field simulation and visualization system, the system applying the above-described method, the system comprising:

[0032] The data sample set construction module is used to construct data sample sets;

[0033] The RFNO flow field online simulation model training module is used to train the RFNO flow field online simulation model based on a data sample set to obtain a trained RFNO flow field online simulation model. The RFNO flow field online simulation model includes at least multiple cascaded Fourier residual modules. Each Fourier residual module includes multiple sequentially connected Fourier layers and direct connection channels. One end of the direct connection channel is connected to the input of the first Fourier layer in the sequentially connected Fourier layers, and the other end of the direct connection channel is connected to the output of the last Fourier layer in the sequentially connected Fourier layers through a selector.

[0034] The flow field data acquisition module is used to input the online physical parameters of the flow field into the trained RFNO flow field online simulation model to obtain flow field data;

[0035] The simulation module is used to perform dynamic flow field simulation and / or special effects flow field simulation based on the flow field data.

[0036] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described above.

[0037] A computer-readable storage medium having a computer program stored thereon, which, when executed, implements the above-described method.

[0038] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0039] This invention provides a method and system for online flow field simulation and visualization. The method includes: constructing a data sample set; training an RFNO (Radio Frequency Identification) flow field online simulation model based on the data sample set to obtain a trained RFNO flow field online simulation model; inputting online physical parameters of the flow field into the trained RFNO flow field online simulation model to obtain flow field data; and performing dynamic flow field simulation and / or special effects flow field simulation based on the flow field data. This invention integrates several Fourier layers into a Fourier residual module, and adds direct-connection channels within the Fourier residual module. Therefore, increasing the number of layers can still improve accuracy, thereby achieving a more accurate online flow field simulation. Attached Figure Description

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

[0041] Figure 1 This is a schematic diagram of the FNO architecture in the background art of this invention;

[0042] Figure 2 This is a comparison chart of the FNO error reduction for different numbers of layers in the background technology of this invention;

[0043] Figure 3 A schematic diagram illustrating an online flow field simulation and visualization method provided in an embodiment of the present invention;

[0044] Figure 4 A schematic diagram illustrating the boundary condition setting process during the generation of the second data sample provided in an embodiment of the present invention;

[0045] Figure 5 This is a schematic diagram of the viscosity eddy field during the generation of the second data sample provided in an embodiment of the present invention;

[0046] Figure 6 A schematic diagram illustrating the two-dimensional model construction and mesh generation process during the generation of the third data sample provided in an embodiment of the present invention;

[0047] Figure 7 A schematic diagram of the viscosity eddy field during the generation of the third data sample provided in this embodiment of the invention;

[0048] Figure 8 This is a schematic diagram of the structure of the Fourier residual module provided in an embodiment of the present invention;

[0049] Figure 9 This is a schematic diagram of the RFNO architecture provided in an embodiment of the present invention;

[0050] Figure 10 A flowchart illustrating the process of generating visual effects provided in this embodiment of the invention;

[0051] Figure 11 This is a schematic diagram of the special effects implementation order interface in the Niagara particle system provided in an embodiment of the present invention;

[0052] Figure 12 This is a schematic diagram of the Count range definition interface provided in an embodiment of the present invention;

[0053] Figure 13 This is a schematic diagram illustrating the transmission method of the texture and Niagara particle system provided in an embodiment of the present invention;

[0054] Figure 14 This is a schematic diagram illustrating the process of converting texture position information into particle positions, as provided in an embodiment of the present invention. Detailed Implementation

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

[0056] The purpose of this invention is to provide a method and system for online flow field simulation and visualization, so as to overcome the problem of limited accuracy of the FNO model and further improve the accuracy of online flow field simulation and visualization.

[0057] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0058] Example 1

[0059] Embodiment 1 of the present invention provides a method for online simulation and visualization of flow fields, such as... Figure 3 As shown, the method includes the following steps:

[0060] Construct a data sample set.

[0061] The RFNO flow field online simulation model is trained based on the data sample set to obtain the trained RFNO flow field online simulation model. The RFNO flow field online simulation model includes at least multiple cascaded Fourier residual modules. Each Fourier residual module includes multiple sequentially connected Fourier layers and direct connection channels. One end of the direct connection channel is connected to the input of the first Fourier layer in the sequentially connected Fourier layers, and the other end of the direct connection channel is connected to the output of the last Fourier layer in the sequentially connected Fourier layers through a selector.

[0062] The online physical parameters of the flow field are input into the trained RFNO online flow field simulation model to obtain flow field data.

[0063] Dynamic flow field simulation and / or special effects flow field simulation are performed based on the flow field data.

[0064] As a preferred embodiment, but not limited to this embodiment, the construction of the data sample set specifically includes:

[0065] Step 1-1: Generate the first data sample based on the 2D Navier-Stokes equations; the first data sample is the calculated data of a viscous incompressible fluid in the form of vorticity on a unit ring.

[0066] The embodiments of the present invention use the 2D Navier-Stokes equations for viscous incompressible fluids in the form of unit ring vorticity to generate the first data sample:

[0067]

[0068] Where u(x,t) is the velocity field. Here, w(x,0) is the initial vorticity, f(x) is the external force, and ν is the viscosity coefficient. The vorticity at [0,T] is used to predict the vorticity after T. 1000 sets of samples with ν=1e-5,T=20 and 1000 sets of samples with ν=1e-3,T=50 were prepared for training. x represents the position and t represents the time.

[0069] Steps 1-2: Use FEATool Multiphysics software to generate a second data sample; the second data sample is simulation data of flow around a cylinder.

[0070] This invention uses FEATool Multiphysics to generate 100 sets of data samples for a typical fluid dynamics case of flow around a cylinder with viscosities between 1e-3 and 1e-1, i.e., the second data sample. The boundary conditions for the flow around the cylinder are set as follows: Figure 4 As shown, the viscosity (1e-3) vortex field results are as follows: Figure 5 As shown.

[0071] Steps 1-3: Use FEATool Multiphysics software to generate a third data sample; the third data sample is simulation data of the kitchen cooking flow field.

[0072] Kitchen cooking flow field data (application scenario). The kitchen geometry is regular and simple, focusing primarily on the two-dimensional portion that generates smoke and dust. See [link to 2D model] for the shape and mesh generation. Figure 6 The kitchen is 3.9m x 2.6m in shape, with recesses on each side of the kitchen counter. The left counter measures 0.7m x 0.8m, while the right counter measures 0.55m x 0.8m. The mesh size is set to 0.04m, with a total of 12755 elements. Zero initial conditions are used. Boundary conditions are set as follows: the left counter serves as the cooking area, with an inlet velocity of 0.2 m / s and a vertical upward direction; other locations are set as walls with no slippage. The viscosity (1e-3) vortex field results are as follows. Figure 7 As shown, for the aforementioned scenario, this embodiment of the invention used FEATool Multiphysics software to create 500 sets of data samples with viscosities between 1e-4 and 1e-1, namely the third data samples.

[0073] Steps 1-4: Use the PIV velocity measurement method to measure the kitchen cooking flow field and obtain the fourth data sample; the fourth data sample is the experimental data of the kitchen cooking flow field.

[0074] Experimental data from PIV (Particle Image Velocity) measurements of the flow field during kitchen cooking. Existing online simulation methods rarely have their effectiveness validated using experimental data. Considering the complex composition of fumes released at high temperatures during kitchen cooking, simulations may not be entirely accurate. Therefore, experimental data are needed for verification.

[0075] PIV is a non-invasive, high spatial resolution velocity measurement method, well-suited for determining the flow field of cooking fumes. In this embodiment of the invention, a high-power two-dimensional PIV was used to obtain the cooking fume flow field, and an RFNO was used to predict the flue gas flow field.

[0076] The distance between the wall-mounted range hood and the cooking pot was set to 0.6 meters, the range hood was set to high speed, and the smoke source was stable. 400 sets of smoke data were collected. The eddy field resolution was 100*100, and predictions of [10,20] were made using a time step of [0,10]. An adaptive cross-correlation algorithm combined with a high-precision pixel interpolation algorithm was used to obtain the velocity field; this method has been verified to effectively control the system error within 2%.

[0077] Steps 1-5: Add the first data sample, the second data sample, the third data sample, and the fourth data sample to the data sample set.

[0078] As a preferred implementation method, but not limited to this implementation method, the RFNO flow field online simulation model is trained based on the data sample set to obtain a trained RFNO flow field online simulation model, specifically including:

[0079] Using the aforementioned data sample set, an online simulation model of the RFNO flow field was trained. The training process was as follows: the data samples were shuffled and normalized, with 70% used for training and 30% for testing. The optimizer was Adam, the learning rate was set to 0.001, and the training step size was set to 800 steps (in practice, convergence occurred before 800 steps). The learning rate was reduced by 50% every 100 steps.

[0080] In this embodiment of the invention, the online flow field simulation is faster than traditional simulation, but it also sacrifices some accuracy.

[0081] In this embodiment of the invention, to improve the accuracy of online simulation results, residual learning is introduced based on FNO. This is achieved by integrating several Fourier layers into a Fourier residual module, and adding direct-connection channels within the Fourier residual module, such as... Figure 8 As shown, the input of the Fourier residual module passes through several Fourier layers Fou(R) i The output can also be via a direct connection to the NR channel. i Direct output enables higher accuracy in flow field calculations by increasing the number of layers.

[0082] After adding the Fourier residual module, the architecture of RFNO is as follows: Figure 9 As shown, the RFNO flow field online simulation model includes: an encoding layer, multiple Fourier residual modules cascaded together, and a decoding layer.

[0083] Figure 9 In the RFNO, the input [a,X,Y] is encoded (subtracted from the mean, divided by the standard deviation, and mapped to a higher dimension through a linear layer) to become R1, which then enters several Fourier residual modules ( Figure 8The flow field is output after decoding (multiplying by the standard deviation, adding the mean, and mapping to one dimension through a linear layer). The Fourier layer output is: H is the input to the Fourier layer, which is processed by Fourier transform. Flow field information was extracted, high-frequency modes were filtered out using linear transformation L, and inverse Fourier transform was applied. The input of the Fourier layer is then transformed back to the source space, added to the linear transformation W, and finally nonlinearly mapped by the activation function σ.

[0084] To more effectively demonstrate the effectiveness of the RFNO flow field online simulation model provided in the embodiments of the present invention, the following verification was performed:

[0085] For FNO, there is no NR. i .

[0086] R i+1 =Fou(R) i (3)

[0087] Among them, R i Represents the input of the i-th Fourier residual module, Fou() is the superposition of several Fourier layers, and R i+1 This represents the output of the Fourier residual module.

[0088] Fou(R i (relative to R) i The rate of change is:

[0089]

[0090] For RFNO, Fou(R) i (relative to R) i The rate of change is:

[0091]

[0092] Where N is an integer.

[0093] When Fou(R) i Relative to R i As the rate of change increases, the gradient becomes larger, making the neural network easier to train; therefore, a is needed. RFNO ≥a FNO .

[0094]

[0095] We can obtain:

[0096]

[0097] If R i+1 and R iIf the values ​​are close, then N=1; otherwise, N=2. Regardless of whether N=1 or N=2, RFNO is easier to train than FNO and can achieve higher accuracy, resulting in higher precision in real-time mapping of flow fields.

[0098] As a preferred implementation method, but not limited to this implementation method, the online physical parameters of the flow field are input into a trained RFNO online flow field simulation model to obtain flow field data, specifically including:

[0099] In this invention, the trained RFNO online flow field simulation model takes physical parameters, such as viscosity, as input. Physical parameter data is collected by sensor devices and transmitted to a local computer via an industrial-grade serial port. The data is saved as matrix data with a .mat extension. Taking a 2D flow field as an example, the format is [a,X,Y], where 'a' represents the physical parameter, and X and Y represent the flow field location information. a, X, and Y are all n*n matrices, where n is the resolution of the flow field. RFNO uses Python to read the .mat data; theoretically, it only requires the time it takes for the neural network to transmit data to obtain the flow field and output it for visualization.

[0100] Flow field visualization methods include: CFD-POST software, primarily used for CFD post-processing and visualization. It offers rich functionality to help engineers and researchers effectively understand and present simulation results, including:

[0101] 1. Streamline visualization: CFD-POST can generate two-dimensional or three-dimensional streamlines, as well as streamline animations based on parameters such as flow velocity and pressure.

[0102] 2. Contours and Isosurfaces: CFD-POST can draw contours and isosurfaces based on user-selected parameters (such as velocity, pressure, temperature, etc.), visually displaying the spatial distribution of these parameters.

[0103] 3. Vector graphics: CFD-POST can generate two-dimensional or three-dimensional vector graphics, as well as vector animations based on parameters such as speed and pressure.

[0104] 4. Cross-section Analysis: CFD-POST allows users to create multiple cross-sections in the model to view detailed information about the flow field at different locations. On the cross-sections, users can draw contour lines, vector diagrams, etc., to gain a deeper understanding of the local characteristics of the flow field.

[0105] 5. Scatter plots and bar charts: Scatter plots and bar charts can be used to represent parameter values ​​at various points in a flow field, such as velocity, pressure, and temperature.

[0106] In flow field visualization, firstly, existing CFD-POST methods have limitations in creating flow field animations. The conventional method is to manually add keyframes to create animations, resulting in poor dynamic visualization effects and a lack of interactivity. Secondly, visualization software such as CFD-POST is often geared towards professionals, overemphasizing the presentation of physical quantities such as pressure and volume fraction, while lacking a demonstration of the flow field's effects in specific scenarios.

[0107] Therefore, this invention proposes a dynamic interactive visualization method based on Unreal Engine 5 (UE5). It utilizes RFNO to achieve online flow field simulation, establishes a data bridge between the online simulation results (flow field data) and UE5, and enables UE5 rendering to be driven by real flow field data. It uses 2D textures to efficiently store large-scale flow field data, dynamic materials to visualize flow field velocity, pressure and other data in real time, and the Niagara particle system to render various special effects flow fields. It also supports first-person interactive roaming of the flow field scene, achieving good visualization effect, interactivity, and good presentation of the flow field in the scene, integrating online flow field simulation, interaction and visualization.

[0108] As a preferred embodiment, but not limited to this embodiment, dynamic flow field simulation based on the flow field data specifically includes:

[0109] First, the flow field data obtained through online simulation is stored in a data text file, with each line representing a point, including its position and velocity. Then, this data is stored in an array in UE5 using C++. The steps for implementing the dynamic flow field based on the array information are as follows:

[0110] Algorithm: Implement dynamic flow field based on flow field data.

[0111] Input: Position and velocity arrays.

[0112] Output: None.

[0113] 1. Set the data in the position array as spline points;

[0114] 2. Generate spline lines based on spline points;

[0115] 3. Generate an "actor" (actor serving as a reference point) at the starting point of the spline in the scene;

[0116] 4. The mesh of the "actor" can be set to the form of an arrow (the direction of the arrow can indicate the velocity direction), and the material can be set to a dynamic material;

[0117] 5. Initialize the floating-point type process = 0.0, which represents the starting point of the streamline (process is a position variable, which can be initialized to 0-1 or other values. Multiple actors can be superimposed on the same streamline to enhance the visual effect).

[0118] 6. Set the tick time interval to 0.1 seconds;

[0119] 7. Event Tick;

[0120] 8. Set the actor position to be at the process distance along the spline;

[0121] 9. Set the RGB values ​​of the dynamic material bound to the actor to the values ​​in the velocity array process, using color to represent the velocity magnitude, with R, G, and B corresponding to the x, y, and z components of the velocity, respectively;

[0122] 10. process+=2.0 / spline length;

[0123] 11. if process >= 1.0;

[0124] 12. process = 0.0.

[0125] As a preferred embodiment, but not limited to this embodiment, such as Figure 10 As shown, the simulation of special effects flow fields based on the aforementioned flow field data specifically includes:

[0126] In this embodiment of the invention, the flow field data is read and stored in a texture using the following algorithm to facilitate GPU processing. Using textures for data transmission also has the advantage of storing a large amount of information. For example, a 1080*1080 texture can store 1,166,400 sets of data, each set containing information from four channels: "RGBA", which can meet the information storage and transmission requirements of most flow fields.

[0127] The specific steps for storing the flow field data as texture data are as follows:

[0128] Algorithm: Flow field text data is stored in texture;

[0129] Input: Location or speed text;

[0130] Output: Texture;

[0131] 1. FFileHelper::LoadFileToStringArray stores the flow field data in a row-separated array;

[0132] 2. Each line represents the information of one point, `std::getline`, which is then converted to an `FVector` and normalized.

[0133] 3. 2D texture size Where TArray<FVector> is the length of an information FVector, TArray is the length calculation function, and num() is the number of information;

[0134] 4. UTexture2D::CreateTransient(size, size, PF_A32B32G32R32F) creates a transient texture;

[0135] 5. Obtain the texture address and copy the data into the texture using FMemory::Memcpy;

[0136] 6. Update resources using UpdateResource.

[0137] The specific steps for reading the texture data using the Niagara particle system and performing particle rendering to generate a visual special effects flow field are as follows:

[0138] In the Niagara particle system, the order of implementation of the special effects flow field is as follows: Figure 11 As shown, first call Spawn Particles in Grid, Figure 11 In the Sprite renderer, the emitter state is calculated by the system for all lifecycles. SpawnParticles in Grid generates particles in the grid. GridLocation defines the grid location. TextureToPos samples the position texture. TextureToVelocity samples the velocity texture. TextureToPress samples the pressure texture. Add Velocity assigns linear velocity to the particles. Sub UVAnimation contains multiple animation frames in a single texture image, provided to the Sprite renderer. Particle State defines the particle state. SolveForcesandVelocity solves for force and velocity. Sprite renderer: Sprite refers to a 2D graphics object.

[0139] Generates standard mesh particles within the defined Count range (Count is the square root of the array length), such as... Figure 12 As shown, Figure 12 In this context, XCount represents the number of grid cells in the X direction, YCount represents the number of grid cells in the Y direction, and Count is a user-defined value.

[0140] Use texture sampling to read texture data, such as Figure 13 As shown, "textpost" is the user interface, which is the transient texture storing the data in the above algorithm. Texture sampling is achieved through UV coordinates to ensure that the texture data is transmitted to the Niagara particle system. Figure 13 In this code, Bias is the position offset, m2cm is the position scaling, TexturePos is the texture that stores the position, MakeVector 2D creates a Vector2D from the input XY, and Make Float from Vector takes the floating-point values ​​of the corresponding channels (X, Y, Z) of the normalized Vector output from the mesh.

[0141] After texture data enters the Niagara particle system, the position information is set to the particle's position, while the velocity information in the texture is set to the particle's velocity, such as... Figure 14 As shown, Figure 14 In this module, Sample Texture2D samples a 2D texture along the UV coordinates, and the output Position is the particle position. After solving for force and velocity based on position and velocity information, a Sprite Renderer is added under the Rendering module, which allows specifying rendering materials and supports various flow styles, such as smoke and water flow. Furthermore, velocity can be visualized using arrows in the Mesh Renderer, with the arrow direction corresponding to the velocity.

[0142] Example 2

[0143] Embodiment 2 of the present invention provides an online flow field simulation and visualization system, wherein the system applies the above-described method and includes:

[0144] The data sample set construction module is used to build data sample sets.

[0145] The RFNO flow field online simulation model training module is used to train the RFNO flow field online simulation model based on the data sample set, and obtain the trained RFNO flow field online simulation model.

[0146] The flow field data acquisition module is used to input the online physical parameters of the flow field into the trained RFNO flow field online simulation model to obtain flow field data. The RFNO flow field online simulation model includes at least multiple cascaded Fourier residual modules. Each Fourier residual module includes multiple sequentially connected Fourier layers and direct-connection channels. One end of the direct-connection channel is connected to the input end of the first Fourier layer in the sequentially connected Fourier layers, and the other end of the direct-connection channel is connected to the output end of the last Fourier layer in the sequentially connected Fourier layers through a selector.

[0147] The simulation module is used to perform dynamic flow field simulation and / or special effects flow field simulation based on the flow field data.

[0148] Example 3

[0149] Embodiment 3 of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described method.

[0150] Example 4

[0151] Embodiment 4 of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements the above-described method.

[0152] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0153] 1. It has higher accuracy, and the accuracy is not limited. The RFNO online simulation method proposed in this invention integrates several Fourier layers of FNO into a Fourier residual module. Therefore, increasing the number of layers can still improve accuracy, thereby achieving more accurate online flow field simulation.

[0154] 2. Excellent dynamic interactive visualization. Therefore, this embodiment of the invention establishes a data bridge between simulation results and UE5, enabling UE5 rendering to be driven by realistic flow field data. It utilizes 2D textures to efficiently store large-scale flow field data, uses dynamic materials to visualize flow field velocity, pressure, and other data in real time, and uses the Niagara particle system to render various special effects flow fields. It also supports first-person interactive roaming of the flow field scene, which is more three-dimensional than the CFD-POST sectional method, achieving excellent visualization effects, interactivity, and good presentation of the flow field in the scene. It integrates online flow field simulation, interaction, and visualization.

[0155] 3. Existing methods often focus on simulation or visualization. The embodiments of this invention realize the integration of online simulation and interactive visualization.

[0156] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0157] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for online simulation and visualization of flow fields, characterized in that, The method includes the following steps: Construct a data sample set; The RFNO flow field online simulation model is trained based on the data sample set to obtain a trained RFNO flow field online simulation model. The RFNO flow field online simulation model includes at least multiple cascaded Fourier residual modules. Each Fourier residual module includes multiple sequentially connected Fourier layers and direct connection channels. One end of the direct connection channel is connected to the input of the first Fourier layer in the sequentially connected Fourier layers, and the other end of the direct connection channel is connected to the output of the last Fourier layer in the sequentially connected Fourier layers through a selector. The online physical parameters of the flow field are input into the trained RFNO online flow field simulation model to obtain flow field data; Dynamic flow field simulation and / or special effects flow field simulation are performed based on the flow field data.

2. The online flow field simulation and visualization method according to claim 1, characterized in that, The construction of the data sample set specifically includes: The first data sample is generated based on the 2D Navier-Stokes equations; the first data sample is the calculated data of a viscous incompressible fluid in the form of unit ring vorticity; The second data sample was generated using FEATool Multiphysics software; the second data sample is simulation data of flow around a cylinder. The third data sample was generated using FEATool Multiphysics software; the third data sample is simulation data of the kitchen cooking flow field. The PIV velocity measurement method was used to measure the flow field in the kitchen cooking process, and a fourth data sample was obtained; the fourth data sample is the experimental data of the flow field in the kitchen cooking process. Add the first, second, third, and fourth data samples to the data sample set.

3. The online flow field simulation and visualization method according to claim 1, characterized in that, The RFNO flow field online simulation model includes: an encoding layer, multiple Fourier residual modules cascaded together, and a decoding layer.

4. The online flow field simulation and visualization method according to claim 1, characterized in that, The dynamic flow field simulation based on the flow field data specifically includes: Spline points are set based on flow field data; Generate spline lines from spline points; Set reference points on the spline; The reference point is moved along the spline in a simulation, and the velocity of the reference point at each sampling position on the spline is obtained; during the movement, the velocity of the reference point at the spline point position is consistent with the velocity of the spline point generated in the flow field data; Using R, G, and B colors to represent the x-axis, y-axis, and z-axis components of the velocity at the sampling position of the reference point on the spline, respectively, a visualized dynamic flow field is generated.

5. The online flow field simulation and visualization method according to claim 1, characterized in that, Based on the aforementioned flow field data, special effects flow field simulation is performed, specifically including: The flow field data is stored as texture data; The texture data is read using the Niagara particle system, and particle rendering is performed to generate a visual special effects flow field.

6. A flow field online simulation and visualization system, characterized in that, The system employs the method according to any one of claims 1-5, the system comprising: The data sample set construction module is used to construct data sample sets; The RFNO flow field online simulation model training module is used to train the RFNO flow field online simulation model based on a data sample set to obtain a trained RFNO flow field online simulation model. The RFNO flow field online simulation model includes at least multiple cascaded Fourier residual modules. Each Fourier residual module includes multiple sequentially connected Fourier layers and direct connection channels. One end of the direct connection channel is connected to the input of the first Fourier layer in the sequentially connected Fourier layers, and the other end of the direct connection channel is connected to the output of the last Fourier layer in the sequentially connected Fourier layers through a selector. The flow field data acquisition module is used to input the online physical parameters of the flow field into the trained RFNO flow field online simulation model to obtain flow field data; the simulation module is used to perform dynamic flow field simulation and / or special effect flow field simulation based on the flow field data.

7. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, It stores a computer program thereon, which, when executed, implements the method as described in any one of claims 1 to 5.