Flow field super-resolution reconstruction method, computer equipment and readable storage medium
By mapping the simulation results of multiphase flow in traditional CFD simulations to an image and reconstructing the model using super-resolution flow field, the problem of high computational overhead at high resolution is solved, achieving efficient flow field data computation and improving computational efficiency and accuracy.
Patent Information
- Application Number
- CN202511606407.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-04
- Publication Date
- 2026-02-10
AI Technical Summary
The huge computational overhead and time consumption caused by high resolution in traditional computational fluid dynamics (CFD) simulations lead to a significant increase in computational load, making it difficult to efficiently acquire high-resolution flow field data in engineering design.
By acquiring the simulation results of the multiphase flow to be reconstructed and performing image mapping processing, the super-resolution prediction is performed using the trained flow field super-resolution reconstruction model to generate image data with a higher resolution than the flow field image data to be reconstructed. By using deep learning technology to learn the complex mapping relationship between high and low resolution flow fields, a rapid resolution improvement is achieved.
While ensuring the accuracy of high-resolution flow field data calculation, it effectively improves computational efficiency and avoids the high cost and time consumption problems in the traditional high-resolution mesh iterative solution process.
Smart Images

Figure CN121504730A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computational fluid dynamics simulation, in particular to a flow field super-resolution reconstruction method, a computer device and a readable storage medium. BACKGROUND
[0002] Nowadays, computational fluid dynamics (CFD) has become a core tool for engineering design, which can predict complex flow and support optimization in aerospace, energy, automobile and other fields. In the traditional technology, CFD simulation divides the entire calculation domain into discrete points on the space grid, and creates a system of differential equations to simulate fluid flow, which is solved or approximated using numerical calculation methods. In order to adjust the simulation granularity, the density of discrete units in the grid can be changed, that is, the more dense the grid units and the more discrete points they contain, the more detailed the fluid flow can be captured during simulation, such as small-scale vortexes and local flow rate changes. But there is a clear cost behind it: the increase in the number of discrete points will directly lead to a significant increase in computing load, which in turn makes the entire simulation process consume more time, and the computing load is generally proportional to the total number of grids.
[0003] At present, there is no effective solution to the problem of high resolution bringing huge computing overhead in traditional CFD simulation. SUMMARY
[0004] Therefore, it is necessary to provide a flow field super-resolution reconstruction method, a computer device and a readable storage medium to solve the above technical problems.
[0005] In a first aspect, the present application provides a flow field super-resolution reconstruction method, which comprises:
[0006] Obtaining a to-be-reconstructed multiphase flow simulation result corresponding to a to-be-simulated multiphase flow case;
[0007] Performing image mapping processing on the to-be-reconstructed multiphase flow simulation result to obtain to-be-reconstructed flow field image data that is spatiotemporally aligned with the to-be-reconstructed multiphase flow simulation result;
[0008] Obtaining a trained flow field super-resolution reconstruction model;
[0009] Performing super-resolution prediction on the to-be-reconstructed flow field image data by using the trained flow field super-resolution reconstruction model to obtain target reconstructed flow field image data with a higher image resolution than the to-be-reconstructed flow field image data.
[0010] In one embodiment, the obtaining of the to-be-reconstructed multiphase flow simulation result corresponding to the to-be-simulated multiphase flow case comprises:
[0011] obtaining an initial multiphase flow case, simulation initial conditions, and a first target solver;
[0012] According to the simulation initial conditions, the initial multiphase flow case is initialized and configured to obtain a to-be-simulated multiphase flow case;
[0013] Based on the first target solver, the to-be-simulated multiphase flow case is simulated and calculated to generate a to-be-reconstructed multiphase flow simulation result corresponding to the to-be-simulated multiphase flow case.
[0014] In one of the embodiments, the to-be-reconstructed multiphase flow simulation result includes multiphase flow simulation results at different time steps; each of the multiphase flow simulation results includes grid point simulation data corresponding to each of a plurality of simulation grid points; and the image mapping processing of the to-be-reconstructed multiphase flow simulation result to obtain to-be-reconstructed flow field image data that is spatiotemporally aligned with the to-be-reconstructed multiphase flow simulation result includes:
[0015] Obtaining grid definition information corresponding to the to-be-simulated multiphase flow case;
[0016] For the multiphase flow simulation result at each time step, based on the grid definition information and a target physical quantity in the grid point simulation data, spatial mapping processing and data mapping processing are performed on the multiphase flow simulation result to generate target flow field image data that is spatiotemporally aligned with the multiphase flow simulation result;
[0017] Each of the target flow field image data at the time steps that is spatiotemporally aligned with the multiphase flow simulation result is determined as to-be-reconstructed flow field image data that is spatiotemporally aligned with the to-be-reconstructed multiphase flow simulation result.
[0018] In one of the embodiments, the grid definition information includes grid spatial resolution and grid point vertex coordinates; and the spatial mapping processing and data mapping processing of the multiphase flow simulation result based on the grid definition information and the target physical quantity in the grid point simulation data to generate target flow field image data that is spatiotemporally aligned with the multiphase flow simulation result includes:
[0019] Based on the grid spatial resolution, an initial image array with a shape consistent with the grid spatial resolution is constructed;
[0020] Based on the target physical quantity in the grid point simulation data and the grid point vertex coordinates, point-by-point data filling is performed on the initial image array according to a preset data filling rule to generate target flow field image data that is spatiotemporally aligned with the multiphase flow simulation result.
[0021] In one of the embodiments, the obtaining of the trained flow field super-resolution reconstruction model includes:
[0022] obtain a flow field image dataset and an initial flow field super-resolution reconstruction model; wherein the flow field image dataset comprises a plurality of groups of flow field image data pairs; the flow field image data pair comprises two groups of flow field image data with different image resolutions;
[0023] Based on the flow field image dataset, the initial flow field super-resolution reconstruction model is trained in an adversarial manner until the target loss function corresponding to the initial flow field super-resolution reconstruction model meets the preset convergence condition, and a trained flow field super-resolution reconstruction model is obtained.
[0024] In one of the embodiments, the flow field image dataset is obtained, comprising:
[0025] Obtain a plurality of multiphase flow simulation case pairs; the multiphase flow simulation case pair comprises a first simulation case and a second simulation case with different grid resolutions and the same simulation conditions;
[0026] For each group of the multiphase flow simulation case pair, the multiphase flow simulation case pair is simulated to generate a simulation result pair corresponding to the multiphase flow simulation case pair;
[0027] The simulation result pair is mapped to an image to obtain a flow field image data pair that is spatiotemporally aligned with the simulation result pair;
[0028] Based on a plurality of flow field image data pairs, a flow field image dataset is constructed.
[0029] In one of the embodiments, the plurality of multiphase flow simulation case pairs is obtained, comprising:
[0030] Based on a preset simulation case pair, a plurality of intermediate simulation case pairs is generated;
[0031] Based on a plurality of randomly generated preset simulation initial conditions, the plurality of intermediate simulation case pairs is simulated to generate a corresponding plurality of multiphase flow simulation case pairs.
[0032] In one of the embodiments, the multiphase flow simulation case pair is simulated to generate a corresponding simulation result pair, comprising:
[0033] Obtain a preset unfinished task list and a second target solver; the preset unfinished task list comprises a plurality of multiphase flow simulation case pairs to be simulated;
[0034] Based on the second target solver, the plurality of multiphase flow simulation case pairs to be simulated is simulated to obtain a simulation result pair corresponding to each of the plurality of multiphase flow simulation case pairs.
[0035] In one of the embodiments, the initial flow field super-resolution reconstruction model is adversarially trained based on the flow field image dataset until a target loss function corresponding to the initial flow field super-resolution reconstruction model satisfies a preset convergence condition, and a trained flow field super-resolution reconstruction model is obtained, including:
[0036] According to a preset data ratio, the flow field image dataset is divided into a training set;
[0037] The discriminator and the generator in the initial flow field super-resolution reconstruction model are alternately adversarially trained based on the training set until a first loss function corresponding to the discriminator satisfies a first preset convergence condition and a second loss function corresponding to the generator satisfies a second preset convergence condition, and a trained flow field super-resolution reconstruction model is obtained.
[0038] In a second aspect, the present application further provides a flow field super-resolution reconstruction device, the device comprising:
[0039] A result obtaining module is configured to obtain a to-be-reconstructed multiphase flow simulation result corresponding to a to-be-simulated multiphase flow case;
[0040] A mapping module is configured to perform image mapping processing on the to-be-reconstructed multiphase flow simulation result, and obtain to-be-reconstructed flow field image data that is spatiotemporally aligned with the to-be-reconstructed multiphase flow simulation result;
[0041] A model obtaining module is configured to obtain a trained flow field super-resolution reconstruction model;
[0042] A prediction module is configured to perform super-resolution prediction on the to-be-reconstructed flow field image data by using the trained flow field super-resolution reconstruction model, and obtain target reconstructed flow field image data with a higher image resolution than the to-be-reconstructed flow field image data.
[0043] In a third aspect, the present application provides a computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the method described above when executing the computer program.
[0044] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the steps of the method described above.
[0045] In a fifth aspect, the present application provides a computer program product comprising a computer program, and the computer program is executed by a processor to implement the steps of the method described above.
[0046] The aforementioned flow field super-resolution reconstruction method, computer equipment, and readable storage medium acquire the simulation results of the multiphase flow to be reconstructed corresponding to the multiphase flow case to be simulated, and perform image mapping processing on the simulation results to obtain flow field image data that is spatiotemporally aligned with the simulation results. Then, using a trained flow field super-resolution reconstruction model, super-resolution prediction is performed on the flow field image data to be reconstructed to generate target reconstructed flow field image data with a higher image resolution than the original flow field image data. By converting low-resolution simulation data into image representations adapted to deep learning, and using a trained flow field super-resolution reconstruction model, the complex mapping relationship between high- and low-resolution flow fields is learned to achieve rapid resolution improvement. This effectively avoids the high cost and high time consumption problems in the traditional high-resolution mesh iterative solution process, and effectively improves the computational efficiency of high-resolution flow field data while ensuring the computational accuracy of high-resolution flow field data. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a diagram illustrating the application environment of the flow field super-resolution reconstruction method in one embodiment.
[0049] Figure 2 This is a flowchart illustrating a flow field super-resolution reconstruction method in one embodiment;
[0050] Figure 3 This is a simulation diagram of a two-dimensional dam failure case in one embodiment;
[0051] Figure 4 This is a schematic diagram of the super-resolution prediction results in one embodiment;
[0052] Figure 5 This is a flowchart illustrating the steps for obtaining simulation results of a multiphase flow to be reconstructed in one embodiment.
[0053] Figure 6 This is a flowchart illustrating the image mapping process in one embodiment;
[0054] Figure 7 This is a flowchart illustrating the steps for obtaining a trained flow field super-resolution reconstruction model in one embodiment.
[0055] Figure 8 This is a schematic diagram illustrating the principle of the initial flow field super-resolution reconstruction model in one embodiment;
[0056] Figure 9 This is a schematic diagram of the specific structure of the generator and discriminator in one embodiment;
[0057] Figure 10 This is a schematic diagram of the target loss function in one embodiment;
[0058] Figure 11 This is a comparison chart of the model prediction stage results in one embodiment;
[0059] Figure 12 This is a flowchart illustrating the steps for acquiring a flow field image dataset in one embodiment;
[0060] Figure 13 This is a schematic diagram of multiple sets of multiphase flow simulation case pairs in one embodiment;
[0061] Figure 14 This is a schematic diagram of a flow field image data pair in one embodiment;
[0062] Figure 15 This is a structural block diagram of a flow field super-resolution reconstruction device in one embodiment;
[0063] Figure 16 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0064] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0065] For decades, computational fluid dynamics (CFD) has been a key supporting technology in the engineering design process. CFD can predict the details of complex multiphysics flows without the need for physical samples, providing optimization basis for critical engineering problems such as aerospace aerodynamic optimization, energy and power equipment efficiency improvement, and automotive drag and noise control. This significantly shortens development cycles, reduces testing costs, and reveals flow mechanisms that are difficult to observe experimentally. Today, CFD tools have become invaluable aids for many engineers, but current CFD methods still have considerable limitations.
[0066] Generally, CFD simulations simulate fluid flow by dividing the entire computational domain into a spatially discrete grid and creating a system of differential equations, which are then solved or approximated using numerical methods. To adjust the simulation granularity, the density of the discrete cells in the grid can be changed—the denser the grid and the more discrete points it contains, the richer the details of the fluid flow can be captured during the simulation, such as small-scale eddies and local velocity variations, which can be represented more accurately. However, this comes at a significant cost: increasing the number of discrete points directly leads to a substantial increase in computational cost, thus lengthening the entire simulation process. The computational cost is generally proportional to the total number of grid cells. If the grid size is halved, for two-dimensional and three-dimensional problems, this means the total number of grid cells increases by 4 times and 8 times respectively, and the computational cost also increases by 4 times and 8 times respectively. Therefore, as the number of grid cells increases, users must strike a balance between computational accuracy and computational efficiency.
[0067] To address the issue of high computational overhead caused by high resolution in traditional technologies, this application provides a flow field super-resolution reconstruction method. This method aims to transform low-resolution simulation data into image representations adapted for deep learning, and then use a trained flow field super-resolution reconstruction model to learn the complex mapping relationship between high and low resolution flow fields to achieve rapid resolution improvement. This method improves the computational efficiency of high-resolution flow field data while ensuring the computational accuracy of high-resolution flow field data.
[0068] The flow field super-resolution reconstruction method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located on a cloud or other network server. Terminal 102 can be, but is not limited to, various personal computers, laptops, and tablets. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0069] In one embodiment, such as Figure 2 As shown, Figure 2 This is a flowchart illustrating a flow field super-resolution reconstruction method in one embodiment. This embodiment uses the method applied to a terminal as an example; it is understood that the method can also be applied to a server, and further to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0070] Step S201: Obtain the simulation results of the multiphase flow to be reconstructed corresponding to the multiphase flow case to be simulated.
[0071] The multiphase flow case to be simulated refers to a defined computational fluid dynamics (CFD) simulation project. The multiphase flow case to be simulated includes at least a configuration file and a results file. The configuration file stores the simulation configuration information of the multiphase flow system; the simulation configuration information may include, but is not limited to, geometric configuration, mesh system, physical model, initial and boundary conditions, etc. The results file stores the specific multiphase flow simulation results obtained after multiphase flow simulation calculations.
[0072] Among them, the simulation results of the multiphase flow to be reconstructed are discretized flow field data obtained by multiphase flow simulation calculation of the multiphase flow case to be simulated; the flow field data includes physical quantities such as velocity, pressure, and volume fraction, reflecting the evolution characteristics of the flow field in space and time.
[0073] Among them, the simulation results of the multiphase flow to be reconstructed include the simulation results of the multiphase flow at different time steps; each multiphase flow simulation result includes the simulation data of the grid points corresponding to multiple simulation grid points.
[0074] Here, a time step refers to a unit of time interval formed after the time domain is discretized. Each time step corresponds to a specific simulation moment, used to progressively advance the solution of the flow field's evolution over time. Simulation grid points refer to the grid cells formed after spatial discretization within the computational domain; they are the basic spatial units for numerically solving partial differential equations. The density of simulation grid points determines the grid resolution; higher density results in higher resolution.
[0075] It should be noted that a specific computational grid is defined in the multiphase flow case to be simulated. This computational grid includes multiple discretized simulation grid points. This embodiment adopts a data storage strategy based on simulation grid points, that is, the data is organized by time step in the result file, and the simulation grid points are used as the storage unit to record the simulation data (including physical quantities such as velocity, pressure, and volume fraction) of each simulation grid point at each time step, so as to completely save the spatiotemporal distribution of the flow field information.
[0076] Step S202: Perform image mapping processing on the simulation results of the multiphase flow to be reconstructed to obtain the flow field image data to be reconstructed that is spatiotemporally aligned with the simulation results of the multiphase flow to be reconstructed.
[0077] In essence, "image mapping" maps the target physical quantities (e.g., velocity, pressure, or volume fraction) in the simulation data of each grid point at the same time step to image pixels, forming tensor data with an image-like structure. This gives the flow field data the structural characteristics of an image, making it easier for the trained flow field super-resolution reconstruction model to perform super-resolution prediction.
[0078] "Spatiotemporal alignment" refers to maintaining a precise correspondence between the flow field image data to be reconstructed and the simulation results of the multiphase flow to be reconstructed in both time and spatial dimensions. For example, temporal alignment means that each frame of the flow field image data to be reconstructed corresponds to a specific simulation time step, and the generation order of the flow field images is consistent with the simulation time series, ensuring the continuity and accuracy of the dynamic evolution of the flow field. Spatial alignment means that, based on temporal alignment, each pixel (or voxel) in the flow field image strictly corresponds to a specific simulation grid point, and the spatial positions of the two remain consistent.
[0079] The reconstructed flow field image data includes multiple frames of target flow field image data. These multiple frames of target flow field image data are strictly aligned spatially and temporally with the multiphase flow simulation results at multiple time steps. Based on temporal alignment, each pixel in the target flow field image data corresponds to a simulation grid point, and its pixel value encodes the target physical quantity at the corresponding location. The target physical quantity can be any flow field physical quantity in the grid point simulation data. The target physical quantity can be any of velocity, pressure, or volume fraction, and needs to be set according to actual simulation requirements; no specific limitations are made here. For example, the target physical quantity can be volume fraction.
[0080] It should be noted that during the image mapping process, unified mapping processing should be performed based on the same type of target physical quantities to ensure that the generated image data has a consistent physical meaning in the channel dimension, thus meeting the requirements of subsequent models for consistency of input data structure.
[0081] Step S203: Obtain the trained flow field super-resolution reconstruction model.
[0082] The trained flow field super-resolution reconstruction model can, but is not limited to, adopt a Super-Resolution Generative Adversarial Network (SRGAN) structure. A Super-Resolution Generative Adversarial Network is a model optimized for "super-resolution tasks" based on Generative Adversarial Networks (GANs). Its generator focuses on transforming low-resolution data into high-resolution data, while the discriminator focuses on determining whether the generated high-resolution data is consistent with the real high-resolution data. Compared to traditional super-resolution models, SRGAN can more efficiently generate high-resolution outputs with rich details and accurate structure.
[0083] Super-resolution neural networks (SNNs) are a type of artificial intelligence model based on deep learning architecture. Their core function is to transform low-resolution input data (such as flow field image data) into high-resolution output data through data-driven feature learning and mapping capabilities. These networks learn the inherent correlations between a large number of "low-resolution-high-resolution" paired data during the training phase, establishing a precise mapping model from low-dimensional feature space to high-dimensional feature space. During the inference phase, only low-resolution data needs to be input to quickly generate corresponding high-resolution results, effectively solving the technical pain points of "high cost and high time consumption" in traditional high-resolution data acquisition. Generative Adversarial Networks (GANs) are a type of deep learning model consisting of a generator and a discriminator. These two components are optimized through "adversarial training": the generator learns the distribution of real data to generate realistic simulated data, while the discriminator distinguishes between real samples and fake samples generated by the generator, ultimately enabling the generator to output results highly similar to real data.
[0084] It's important to note that the core essence of computational fluid dynamics (CFD) is to discretize the fundamental partial differential equations (Navier-Stokes equations, continuity equations, energy equations, etc.) describing fluid motion using numerical methods, transforming them into a system of linear equations for solution. However, in real-world simulation scenarios, due to multiple constraints, it's often necessary to use relatively low grid resolutions for computation: firstly, there are hardware limitations—high-resolution grids mean an exponential increase in the number of discrete elements, placing extremely high demands on the computer's computing power, memory capacity, and data storage space; secondly, there are time constraints—the significantly increased computational load of high-resolution simulations leads to a substantial extension of the simulation cycle, while engineering design, emergency simulations, and other scenarios often have specific requirements for the timeliness of result output.
[0085] It is worth noting that in two-dimensional multiphase flow problems, the flow field data output by CFD simulations exhibits a high degree of similarity in structural characteristics and distribution patterns across spatial and temporal dimensions to the pixel information in image data. For example... Figure 3 As shown, in a two-dimensional dam-break case, the distribution of volume fraction at a certain moment across the grid points illustrates the following: Spatially, the physical quantities (such as velocity vectors and pressure values) corresponding to each grid cell in the flow field data, much like the color information (such as RGB values) corresponding to each pixel in an image, reflect the detailed distribution of the overall field. Temporally, the sequence data of the dynamic flow field evolving with the time step (such as the flow field distribution at different moments) is similar to a frame sequence in a video image, where the data at each time point is a continuation and change of the previous moment. This provides a theoretical basis for optimizing flow field data using techniques from the field of image processing (such as super-resolution neural networks).
[0086] Step S204: Using the trained flow field super-resolution reconstruction model, perform super-resolution prediction on the flow field image data to be reconstructed to obtain target reconstructed flow field image data with a higher image resolution than the flow field image data to be reconstructed.
[0087] Among them, "super-resolution prediction" refers to the process of performing nonlinear mapping inference on low-resolution flow field image data to be reconstructed, and generating target reconstructed flow field image data with higher spatial resolution.
[0088] In one exemplary embodiment, such as Figure 4 As shown, SRGAN is a trained flow field super-resolution reconstruction model, LR (Low-Resolution) is the flow field image data to be reconstructed, and SR (Super-Resolution) is the target flow field image data to be reconstructed. Through SRGAN, super-resolution prediction is performed on the LR image to obtain the SR image with a higher resolution than the LR image.
[0089] In this embodiment, the simulation results of the multiphase flow to be reconstructed corresponding to the multiphase flow case to be simulated are obtained, and the simulation results are processed by image mapping to obtain the flow field image data to be reconstructed that is spatiotemporally aligned with the simulation results. Then, a trained flow field super-resolution reconstruction model is used to perform super-resolution prediction on the flow field image data to be reconstructed, generating target reconstructed flow field image data with a higher image resolution than the flow field image data to be reconstructed. By converting low-resolution simulation data into image representations adapted to deep learning, and with the help of a trained flow field super-resolution reconstruction model, the complex mapping relationship between high and low resolution flow fields is learned to achieve rapid resolution improvement. This effectively avoids the high cost and high time consumption problems in the traditional high-resolution mesh iterative solution process, and effectively improves the computational efficiency of high-resolution flow field data while ensuring the computational accuracy of high-resolution flow field data.
[0090] In one embodiment, such as Figure 5 As shown, Figure 5 This is a flowchart illustrating the steps for obtaining the simulation results of a multiphase flow to be reconstructed in one embodiment. Obtaining the simulation results of the multiphase flow to be reconstructed corresponding to the simulated multiphase flow case includes the following steps:
[0091] Step S501: Obtain the initial multiphase flow case, initial simulation conditions, and the first objective solver.
[0092] The initial multiphase flow case refers to a prototype multiphase flow system whose simulation parameters have not yet been fully configured. It includes a basic geometric model and phase distribution information, but lacks complete physical models, boundary conditions, initial fields, solver parameters, and mesh systems—key simulation configurations. In an exemplary embodiment, the initial multiphase flow case could be a CFD project folder without parameters, containing only the basic structure and not yet ready for operation. Furthermore, the initial multiphase flow case can be, but is not limited to, a two-dimensional dam-break case.
[0093] The initial simulation conditions refer to the spatial distribution and state parameters of various physical field variables set at the start time (t=0) of the multiphase flow simulation. These conditions provide initial field input for the numerical solution, ensuring that the simulation process starts from a physically reasonable state. Initial simulation conditions may include, but are not limited to, parameters such as droplet radius, contact angle, angular velocity, kinematic viscosity, density, and surface tension.
[0094] The first objective solver is a specific numerical solution program used to perform multiphase flow simulation calculations. Its type is pre-selected based on the flow characteristics and is used to solve governing equations (such as the Navier-Stokes equations, VOF transport equations, etc.). The first objective solver can be, but is not limited to, the interFoam solver.
[0095] Step S502: Based on the initial simulation conditions, initialize the initial multiphase flow case to obtain the multiphase flow case to be simulated.
[0096] In an exemplary embodiment, the simulation parameters of the configuration file in the initial multiphase flow case are configured based on the obtained initial simulation conditions, and the initial multiphase flow case with the completed configuration of the configuration file simulation parameters is determined as the multiphase flow case to be simulated.
[0097] Step S503: Based on the first objective solver, perform multiphase flow simulation calculations on the multiphase flow case to be simulated, and generate the multiphase flow simulation results to be reconstructed corresponding to the multiphase flow case to be simulated.
[0098] In an exemplary embodiment, based on a first objective solver, a multiphase flow simulation calculation is performed on the multiphase flow case to be simulated to generate a multiphase flow simulation result to be reconstructed corresponding to the multiphase flow case to be simulated. This includes: performing a cleaning operation on the multiphase flow case to be simulated to obtain a cleaned multiphase flow case to be simulated; and performing a multiphase flow simulation calculation on the cleaned multiphase flow case to be simulated based on the first objective solver to generate a multiphase flow simulation result to be reconstructed corresponding to the multiphase flow case to be simulated.
[0099] It should be noted that by performing the cleanup operation, existing historical simulation data in the case catalog can be cleared, ensuring that the multiphase flow simulation starts from scratch and avoiding interference from old data in the current calculation process.
[0100] In this embodiment, by acquiring the initial multiphase flow case, simulation initial conditions, and the first objective solver, and by initializing the initial multiphase flow case based on the initial conditions, a multiphase flow case to be simulated is generated. Then, the first objective solver is called to perform multiphase flow simulation calculations to obtain the corresponding multiphase flow simulation results to be reconstructed. This realizes standardized modeling and automatic initialization of multiphase flow simulation, ensuring that the multiphase flow simulation starts from an accurate physical initial state and generates complete multiphase flow simulation results to be reconstructed, providing reliable input for subsequent image mapping processing.
[0101] In one embodiment, such as Figure 6 As shown, Figure 6 This is a flowchart illustrating the image mapping process in one embodiment. The image mapping process is performed on the simulation results of the multiphase flow to be reconstructed to obtain spatiotemporally aligned flow field image data with the simulation results. This includes the following steps:
[0102] Step S601: Obtain the mesh definition information corresponding to the multiphase flow case to be simulated.
[0103] The simulation results of the multiphase flow to be reconstructed include simulation results of multiphase flow at different time steps; each multiphase flow simulation result includes simulation data of the grid points corresponding to multiple simulation grid points. Here, a time step refers to the time interval unit formed after the time domain is discretized. A simulation grid point refers to the grid cell formed after spatial discretization within the computational domain.
[0104] It should be noted that a specific computational grid is defined in the multiphase flow case to be simulated. This computational grid includes multiple discretized simulation grid points. This embodiment adopts a data storage strategy based on simulation grid points, that is, the data is organized by time step in the result file, and the simulation grid points are used as the storage unit to record the simulation data (including physical quantities such as velocity, pressure, and volume fraction) of each simulation grid point at each time step, so as to completely save the spatiotemporal distribution of the flow field information.
[0105] The mesh definition information refers to the core data used to describe the spatial structure of the computational mesh in the multiphase flow simulation case. This information includes at least the mesh spatial resolution and the vertex coordinates of the mesh points. The mesh spatial resolution refers to the spatial discreteness of the computational mesh, characterizing the density of simulation mesh points per unit length. It is understood that the mesh spatial resolution directly determines the simulation's ability to capture details of the flow field. In an exemplary embodiment, the mesh spatial resolution can be expressed as (nx, ny, nz), where nx represents the number of spatial discrete points in the x-direction (i.e., the number of simulation mesh points); ny represents the number of spatial discrete points in the y-direction (i.e., the number of simulation mesh points); and nz represents the number of spatial discrete points in the z-direction (i.e., the number of simulation mesh points). (nx, ny, nz) together describe the discrete density of the computational mesh in three-dimensional space, reflecting the spatial resolution capability of the flow field data. Higher resolution (i.e., larger nx, ny, nz) results in a finer mesh, enabling the capture of more subtle flow structures.
[0106] Among them, the grid vertex coordinates refer to the geometric position coordinates of each simulated grid point in space, which are used to realize the spatial positioning of flow field data and are one of the key inputs for image mapping processing.
[0107] In an exemplary embodiment, the method for obtaining the mesh definition information corresponding to the multiphase flow case to be simulated may be: parsing and extracting the mesh definition information from the mesh file contained in the multiphase flow case to be simulated. Here, the mesh file refers to a dedicated data file used to store the discretized structure of the computational domain space in computational fluid dynamics (CFD) simulation.
[0108] In an exemplary embodiment, a grid vertex coordinate extraction function (e.g., the `getVertices` function) can be used to extract the grid vertex coordinates, and a grid block information parsing function (e.g., the `getBlocks` function) can be used to parse the grid block information. The grid vertex coordinate extraction function and the grid block information parsing function work together to parse the required grid vertex coordinates and grid spatial resolution from an OpenFOAM grid file (e.g., "BlockMesh"), providing a spatial location reference for subsequently mapping simulation data onto a regular grid.
[0109] Step S602: For the multiphase flow simulation results at each time step, based on the grid definition information and the target physical quantities in the grid point simulation data, perform spatial mapping processing and data mapping processing on the multiphase flow simulation results to generate target flow field image data that is spatiotemporally aligned with the multiphase flow simulation results.
[0110] The grid point simulation data includes multiple flow field physical quantities; for example, it may include flow field physical quantities such as velocity, pressure, and volume fraction. The target physical quantity can be any one of the flow field physical quantities in the grid point simulation data. The target physical quantity can be any one of velocity, pressure, or volume fraction, and needs to be set according to the actual simulation requirements. No specific limitations are made here; for example, the target physical quantity can be volume fraction. It should be noted that during the image mapping process, a unified mapping process must be performed based on the same type of target physical quantity to ensure that the generated image data has a consistent physical meaning in the channel dimension, meeting the requirements of subsequent models for consistency in input data structure.
[0111] In an exemplary embodiment, for the multiphase flow simulation results at each time step, based on the grid definition information and the target physical quantities in the grid point simulation data, spatial mapping processing and data mapping processing are performed on the multiphase flow simulation results to generate target flow field image data that is spatiotemporally aligned with the multiphase flow simulation results, including the following steps:
[0112] Step 1: Based on the grid spatial resolution, construct an initial image array with a shape consistent with the grid spatial resolution.
[0113] For example, a block generation function (such as the buildBlock function) can be used to create a corresponding initial image array based on the grid space resolution; if the grid space resolution is (nx, ny, nz), then an initial image array with shape (nx, ny, nz) is constructed based on the grid space resolution (nx, ny, nz).
[0114] Step 2: Based on the target physical quantities and grid vertex coordinates in the grid point simulation data, fill the initial image array point by point according to the preset data filling rules to generate target flow field image data that is spatiotemporally aligned with the multiphase flow simulation results.
[0115] Among them, the preset data filling rules refer to the processing specifications used to determine how to fill the target physical quantities corresponding to each simulation grid point into the corresponding positions of the initial image array when mapping the multiphase flow simulation results into structured target flow field image data.
[0116] It should be noted that the preset data filling rules are closely related to the data storage format and mesh topology of the CFD software used in the multiphase flow simulation. Their design must ensure the accuracy of spatial mapping and numerical consistency between the multiphase flow simulation results and the target image data. The preset data filling rules should be compatible with the data storage mechanisms of different CFD platforms, such as OpenFOAM's storage mechanism. Due to differences in the output structures of different software, the preset data filling rules can be flexibly configured according to the specific simulation environment to achieve accurate mapping from the target physical quantities corresponding to the simulation mesh points to image pixels.
[0117] In an exemplary embodiment, taking OpenFOAM as an example, the simulation data of each simulation grid point is stored in a three-dimensional nested cyclic order (i,j,k). The specific order is as follows: Innermost loop: k direction (z-axis), that is, with i and j fixed, it increases along k; Middle loop: j direction (y-axis), j increases after each k layer is completed. Therefore, when mapping the OpenFOAM simulation results to a regular structured image array, the same traversal order must be followed, and the grid point vertex coordinates must be combined to ensure the correct correspondence between spatial location and physical quantity value. For this reason, in the design process of the preset data filling rules, it is necessary to strictly match the storage logic of OpenFOAM to ensure the spatial consistency and numerical accuracy of the data mapping.
[0118] Understandably, by constructing an initial image array with a shape consistent with the grid spatial resolution, and by filling the initial image array point by point with data based on the target physical quantity in the grid point simulation data and the grid point vertex coordinates, the target physical quantity is accurately converted into image pixel values, thus ensuring the accuracy of data mapping.
[0119] In an exemplary embodiment, based on the target physical quantities and grid vertex coordinates in the grid point simulation data, the initial image array is filled point by point according to a preset data filling rule to generate initial flow field image data that is spatiotemporally aligned with the multiphase flow simulation results; the initial flow field image data is then normalized to generate target flow field image data. The normalization process, for example, maps the target physical quantities to the [0,1] interval to ensure consistent data distribution.
[0120] Step S603: The target flow field image data that is spatiotemporally aligned with the multiphase flow simulation results at each time step is determined as the flow field image data to be reconstructed that is spatiotemporally aligned with the multiphase flow simulation results to be reconstructed.
[0121] In this embodiment, by acquiring the mesh definition information corresponding to the multiphase flow case to be simulated, the spatial layout and topology of the simulation mesh are clarified, providing a geometric reference for image conversion. For each time step of the multiphase flow simulation results, spatial mapping processing is performed in conjunction with the mesh definition information to achieve geometric alignment from the simulation mesh to a regular image pixel array. Based on the target physical quantity, mesh vertex coordinates, and preset data filling rules, data mapping processing is performed to convert the target physical quantity into a visually identifiable pixel intensity value, generating single-frame target flow field image data. The target flow field image data generated at each time step are then integrated in chronological order... A continuous sequence of images forms complete flow field image data to be reconstructed, realizing the temporal evolution expression of the dynamic flow field. This ensures spatiotemporal consistency between numerical simulation and image representation, allowing detailed information that originally required costly numerical iterations to obtain to be reconstructed to be efficiently super-resolution prediction by processing the image data of the flow field to be reconstructed through image mapping and then feeding it into a trained flow field super-resolution reconstruction model. Since both spatial mapping and data mapping are deterministic preprocessing operations that do not involve solving partial differential equations, the overall conversion process is fast and stable, thus significantly shortening the preparation cycle for high-precision flow field reconstruction and improving overall processing efficiency.
[0122] In one embodiment, such as Figure 7 As shown, Figure 7 This is a flowchart illustrating the steps for obtaining a trained flow field super-resolution reconstruction model in one embodiment; obtaining the trained flow field super-resolution reconstruction model includes the following steps:
[0123] Step S701: Obtain the flow field image dataset and the initial flow field super-resolution reconstruction model.
[0124] The flow field image dataset includes multiple pairs of flow field image data; each pair of flow field image data includes two sets of flow field image data with different image resolutions.
[0125] In an exemplary embodiment, each pair of flow field image data includes low-resolution flow field image data and high-resolution flow field image data; wherein, the low-resolution flow field image data and the high-resolution flow field image data are identical in all aspects except for their resolution.
[0126] The initial flow field super-resolution reconstruction model can be, but is not limited to, an untrained SRGAN model. The core of the initial flow field super-resolution reconstruction model includes a generator and a discriminator, and its principle is as follows: Figure 8As shown, firstly, the LR image (low-resolution image) is input into the generator, which attempts to generate a super-resolution (SR) image. Next, a content loss is applied to ensure that the generated SR image is content-wise similar to the real HR image (high-resolution image). Then, the generated SR image and the real HR image are input together into the discriminator, which distinguishes between the real HR image and the generated SR image. Finally, a generative adversarial network (GAN) loss is used to continuously optimize the generator, making the generated SR image as close as possible to the real HR image, achieving the super-resolution effect.
[0127] In an exemplary embodiment, the network structure of the initial flow field super-resolution reconstruction model is as follows: The generator takes a low-resolution image as input and first extracts initial features through a convolutional layer with a kernel size of 9×9 and 64 output channels. A PReLU activation function is then used to introduce nonlinearity while preserving the input feature map size. Next, 16 residual blocks are introduced to construct the core enhancement module. Each residual block contains a convolutional layer with two kernels of 3×3 and 64 output channels. Each layer is followed by batch normalization and PReLU. Finally, the residual block input and output are fused through a skip connection (Add). After the difference module, a convolutional layer with a 3×3 kernel and 64 output channels and batch normalization are passed through it, and then it is connected again to the output after the initial feature extraction. Then, resolution is improved through two upsampling blocks. Each upsampling block first processes the features with a convolutional layer with a 3×3 kernel and 256 output channels, and then expands the feature map size by 2 times upsampling, combined with LeakyReLU activation. Finally, a convolutional layer with a 9×9 kernel and 1 output channel and a sigmoid activation function are used to output a high-resolution reconstructed image with a pixel value range of 0-1 that matches the size of the high-resolution image.
[0128] The discriminator takes either an HR or SR image as input. First, it extracts shallow features using a 3×3 convolutional layer with 64 output channels, incorporating LeakyReLU activation to introduce non-linearity. Then, it constructs a deep feature extraction module using seven discriminator blocks: initially, a discriminator block with 64 output channels, a 3×3 convolutional kernel, and a stride of 2 performs downsampling; then, it sequentially combines discriminator blocks with 128, 256, and 512 output channels. Each discriminator block contains a convolutional layer, batch normalization, and LeakyReLU, gradually increasing the number of feature channels and reducing the image resolution to 1 / 16 of the original size. Finally, a Flatten layer converts the two-dimensional feature map into a one-dimensional vector, which is then connected to a 1024-dimensional fully connected layer (Dense) and LeakyReLU activation. Finally, a one-dimensional fully connected layer and a Sigmoid activation function output a probability value of 0-1 (1 representing the real image, 0 representing the generated image), completing the real / fake image discrimination. The specific structures of the generator and discriminator are as follows: Figure 9 As shown.
[0129] Step S702: Based on the flow field image dataset, perform adversarial training on the initial flow field super-resolution reconstruction model until the target loss function corresponding to the initial flow field super-resolution reconstruction model satisfies the preset convergence condition, and obtain the trained flow field super-resolution reconstruction model.
[0130] The target loss function includes a first loss function and a second loss function; the preset convergence conditions include a first convergence condition and a second convergence condition. The first loss function, the total loss function of the discriminator, is used to measure the discriminator's ability to distinguish between SR and HR images. The first preset convergence condition is related to actual training requirements and is not specifically limited here. The second loss function, the total loss function of the generator, is used to measure the degree of difference between the SR and HR images generated by the generator. The second preset convergence condition is related to actual training requirements and is not specifically limited here.
[0131] In an exemplary embodiment, step S702 includes the following steps: dividing the flow field image dataset into a training set according to a preset data ratio. Based on the training set, the discriminator and generator in the initial flow field super-resolution reconstruction model are subjected to alternating adversarial training until the first loss function corresponding to the discriminator satisfies the first preset convergence condition and the second loss function corresponding to the generator satisfies the second preset convergence condition, thereby obtaining a trained flow field super-resolution reconstruction model. The preset data ratio needs to be set according to actual training requirements and is not specifically limited here.
[0132] In an exemplary embodiment, the training of the initial flow field super-resolution reconstruction model follows three main stages: data preparation, network initialization, and iterative adversarial training.
[0133] In the data preparation phase, a flow field image dataset was acquired and divided into a training set and a test set according to a preset data ratio (0.8:0.2). The flow field image dataset includes multiple pairs of flow field image data; each pair includes LR images and HR images, where the LR image size is (30, 80, 1) and the HR image size is (120, 320, 1), corresponding to the shape requirements of the generator input and the discriminator input.
[0134] During network initialization, the generator and discriminator are initialized separately: the generator, built based on the Generator class, takes a (30,80,1) LR image as input and outputs a (120,320,1) super-resolution image (SR image) through residual blocks and upsampling blocks; the discriminator, built based on the Discriminator class, takes a (120,320,1) image (HR image or SR image) as input and outputs the authenticity probability of the image. Independent Adam optimizers are configured for both, and a joint GAN network is constructed—after setting the discriminator to be untrainable, it takes the LR image as input and outputs the SR image (used to calculate content loss) and the discriminator's discrimination result on the SR image (used to calculate adversarial loss). The loss function of the GAN network is minimum mean squared error.
[0135] In the iterative adversarial training phase, a total of 2000 epochs were trained, with each epoch iteratively trained in batches (batch size=8): The first step trained the discriminator. A batch of HR and LR images were randomly selected from the training set, and corresponding SR images were generated using a generator. Random perturbations of 0-0.2 were added to the HR image labels (to avoid overly rigid labels), and random values of 0-0.2 were added to the SR image labels. These were then input into the discriminator to calculate the ground truth image loss and the generated image loss, respectively. The average of these two values was taken as the discriminator's total loss, and the discriminator parameters were updated through backpropagation. The second step trained the GAN joint network. Another batch of LR and HR images were randomly selected, and the GAN's output labels were set to random values of 0.8-1.0. At this point, the discriminator parameters were fixed, and the generator parameters were updated only through backpropagation. The generator simultaneously minimized the content differences between the SR and HR images, gradually improving the realism and clarity of the generated SR images. After each epoch, the discriminator loss and GAN loss were recorded to a text file. After training, the final generator and discriminator models were saved, completing the entire SRGAN training process. The target loss function is as follows Figure 10 As shown.
[0136] It should be noted that traditional high-resolution CFD simulations rely on high-performance computing equipment, and a single simulation typically takes several hours to several days; while low-resolution CFD simulations can be shortened to minutes. By using a trained flow field super-resolution reconstruction model, the overall process time can be greatly reduced, and there is no need to rely on high-end hardware.
[0137] In an exemplary embodiment, the model prediction stage takes low-resolution image data as input. First, it reads the low-resolution image data to be predicted, and simultaneously reads the corresponding high-resolution real image data as a reference for the prediction result. Then, it loads the trained flow field super-resolution reconstruction model, uses the generator to perform prediction on the input low-resolution image data, and outputs the corresponding super-resolution reconstructed image result. To intuitively present the prediction effect, the low-resolution original image, high-resolution real image, and super-resolution predicted image are indexed and saved as image files one by one. Finally, the saved prediction image files are sorted by index, and they are synthesized into a dynamic image using an image sequence processing tool (such as moviepy) to further visualize the temporal continuity of the super-resolution reconstruction effect, thus completing the entire prediction and result presentation process.
[0138] For example, using volume fraction as the target physical quantity, a corresponding flow field image dataset is constructed to train an initial flow field super-resolution reconstruction model, resulting in a trained flow field super-resolution reconstruction model for demonstration purposes; such as... Figure 11 As shown, Figure 11 Using only four consecutive sets of data, it can be seen that the super-resolution results (SR images) of the trained flow field super-resolution reconstruction model have higher resolution than the input low-resolution images (LR images), and the liquid interface at the two-phase boundary is also clearer. The CFD simulation results under low grid resolution were successfully reconstructed using super-resolution. Comparing the predicted images (SR images) with the real high-resolution images (HR images), it can be seen that the prediction results of the trained flow field super-resolution reconstruction model are highly similar to the results of CFD calculations under the real high grid resolution. Compared with the input LR images, the prediction results achieve a 4×4-fold increase in resolution, and the key details of the flow field are accurately restored.
[0139] Figure 11The two-dimensional multiphase flow case study uses droplet spin coating. Initially, a droplet is stationary at the center of a disk, and as the substrate rotates, the droplet gradually spreads out on the substrate. In the results, the LR data, due to its low mesh density, exhibits blurred and jagged edges at the two-phase interfaces (such as the droplet-air interface), and microscopic features such as local velocity gradients are almost completely lost. However, the prediction results of the trained flow field super-resolution reconstruction model successfully correct these defects. The interface edges are smooth and continuous, and small-scale droplet details are clearly distinguishable. Its spatial resolution perfectly matches that of the HR data, and the detail accuracy is close to that of the HR data. Furthermore, the average relative error between all the predicted results (SR images) and the actual data (HR images) is less than 0.1%. Moreover, in the prediction of dynamic multiphase flow (where the simulation process evolves with the time step), the model's predicted data maintains excellent temporal continuity. After combining the prediction results from different time steps into a dynamic image, the flow field evolution process (diffusion of droplets on a rotating disk) is smooth and coherent, without any jumps or abrupt changes in details. It is completely synchronized with the temporal variation of HR data and can fully reproduce the physical process of multiphase flow dynamic evolution.
[0140] In one embodiment, such as Figure 12 As shown, Figure 12 This is a flowchart illustrating the steps for acquiring a flow field image dataset in one embodiment; acquiring the flow field image dataset includes:
[0141] Step S1201: Obtain multiple sets of multiphase flow simulation case pairs.
[0142] The multiphase flow simulation case pairs include a first simulation case and a second simulation case with different mesh resolutions but identical simulation conditions. It is understood that the multiphase flow simulation case pairs include low-mesh-resolution simulation cases and high-mesh-resolution simulation cases; wherein, the low-mesh-resolution simulation cases and high-mesh-resolution simulation cases have identical simulation conditions except for mesh resolution. For example, if the first simulation case is a low-mesh-resolution simulation case, then the second simulation case is a high-mesh-resolution simulation case; if the second simulation case is a low-mesh-resolution simulation case, then the first simulation case is a high-mesh-resolution simulation case.
[0143] In an exemplary embodiment, step S1201 obtains multiple sets of multiphase flow simulation case pairs, including the following steps:
[0144] Step 1: Generate multiple sets of intermediate simulation case pairs based on preset simulation case pairs.
[0145] The preset simulation case pairs include two sets of benchmark cases with different mesh resolutions; the benchmark cases may be, but are not limited to, two-dimensional droplet spin coating simulation cases; the selection of benchmark cases is related to the actual simulation requirements and is not specifically limited here.
[0146] In one exemplary embodiment, multiple sets of intermediate simulation case pairs are obtained by replicating preset simulation case pairs.
[0147] Step 2: Based on multiple sets of randomly generated preset simulation initial conditions, configure simulation parameters for multiple sets of intermediate simulation case pairs to generate corresponding sets of multiphase flow simulation case pairs.
[0148] The preset initial simulation conditions may include, but are not limited to, parameters such as droplet radius, contact angle, angular velocity, kinematic viscosity, density, and surface tension.
[0149] In one exemplary embodiment, under a Linux system, the OpenFOAM solver can be invoked via command line, while the simulation configuration is achieved by modifying different configuration files. Therefore, to generate multiphase flow simulation case pairs with different configurations in batches, it is only necessary to modify the configuration files in the folder corresponding to the preset simulation case pairs.
[0150] In an exemplary embodiment, the storage paths for baseline cases and intermediate simulation case pairs are first set. The MakeCases function is used to create cases in a loop (e.g., generating 200 sets of intermediate simulation case pairs): First, the original low- and high-mesh-resolution baseline case files are copied to the target paths (e.g., the storage paths for intermediate simulation case pairs: lowresdst and highresdst), forming new case folders with numbers. The high-mesh-resolution case folder can be named with the specific identifier "_highres" for distinction. Next, values for simulation parameters such as droplet radius, contact angle, angular velocity, kinematic viscosity, density, and surface tension are randomly generated within a specified range. Finally, for the newly generated low- and high-mesh-resolution simulation cases, the corresponding configuration files are located, the parameter values that need to be modified are extracted and replaced with the newly generated random parameters, and the files are saved after modification. This process is repeated to obtain multiple sets of multiphase flow simulation case pairs. Figure 13 As shown, each folder represents a simulation case, with high-resolution cases labeled "_highres".
[0151] Step S1202: For each pair of multiphase flow simulation cases, perform multiphase flow simulation calculations on the pair of multiphase flow simulation cases to generate simulation result pairs corresponding to the pair of multiphase flow simulation cases.
[0152] The simulation results include the first simulation results corresponding to the first simulation case and the second simulation results corresponding to the second simulation case in the multiphase flow simulation case pair. It can be understood that the first simulation results include simulation results at multiple time steps. The second simulation results also include simulation results at multiple time steps.
[0153] In an exemplary embodiment, step S1202 involves performing multiphase flow simulation calculations on the multiphase flow simulation case pairs to generate corresponding simulation result pairs, including the following steps:
[0154] Step 1: Obtain the preset list of unfinished tasks and the second objective solver.
[0155] The pre-set list of unfinished tasks includes multiple sets of multiphase flow simulation case pairs to be simulated.
[0156] The preset list of incomplete tasks is a real-time updated task queue used to record multiphase flow simulation case pairs that have not yet completed multiphase flow simulation calculations. It can be understood that by setting a unique identifier for each multiphase flow simulation case pair and dynamically marking the execution status to obtain the corresponding preset list of incomplete tasks, duplicate calculations can be avoided, ensuring the efficiency and completeness of simulation calculations.
[0157] Step 2: Based on the second objective solver, perform multiphase flow simulation calculations on multiple sets of multiphase flow simulation case pairs to be simulated, and obtain the simulation result pairs corresponding to each multiphase flow simulation case pair.
[0158] The second objective solver may be, but is not limited to, the interFoam solver.
[0159] In an exemplary embodiment, step 2 may further include the following steps: obtaining runtime environment configuration information for multiphase flow simulation; grouping multiple initial simulation case pairs according to the number of parallel computing cores in the runtime environment configuration information to obtain multiple groups of simulation cases to be simulated; and performing parallel simulation on the groups of simulation cases to be simulated based on the second objective solver to obtain multiple simulation result pairs corresponding to each group of simulation cases. Grouping multiple initial simulation case pairs based on the number of parallel computing cores can ensure the load balance of each core and further improve computational efficiency.
[0160] In an exemplary embodiment, performing multiphase flow simulation calculations on multiple sets of multiphase flow simulation case pairs to be simulated includes: performing a cleaning operation on the multiple sets of multiphase flow simulation case pairs to be simulated, obtaining multiple cleaned multiphase flow simulation case pairs; and performing multiphase flow simulation calculations on the cleaned multiphase flow simulation case pairs based on a second objective solver, generating simulation result pairs corresponding to each of the cleaned multiphase flow simulation case pairs. It should be noted that by performing the cleaning operation, existing historical simulation data in the case catalog can be cleared, ensuring that the multiphase flow simulation starts from the beginning and avoiding interference from old data in the current calculation process.
[0161] In one specific embodiment, the number of available CPU cores on the current device is first obtained, the CFD case storage path is set, and three key functions are defined: The Run function is used to sequentially perform an "Allclean" cleanup operation on the specified cases (ensuring the simulation starts from the beginning), and then execute "Allrun" to call the interFoam solver to solve the cases, while recording the cases that failed to run. The ChecktIncomplete function filters out incomplete cases by searching the number of time step folders in the case directory and organizes them into a list. The Distribute function evenly distributes the list of incomplete cases according to the number of available CPU cores to ensure balanced load on each core.
[0162] In the main program, the `ChecktIncomplete` function is first called to retrieve the list of incomplete cases and output their counts. Then, a multi-process pool is created, and cases are grouped according to their assigned sizes. The `Run` function is then called to enable multi-core parallel processing of incomplete cases, improving processing efficiency. Simultaneously, the computational progress of all cases can be output in real time for easy monitoring.
[0163] Step S1203: Perform image mapping processing on the simulation result pair to obtain a flow field image data pair that is spatiotemporally aligned with the simulation result pair.
[0164] It should be noted that the implementation method of "image mapping processing" in this embodiment is the same as the implementation method of "image mapping processing" described in the above embodiment, and will not be repeated here.
[0165] In an exemplary embodiment, the simulation result pairs are subjected to image mapping processing to obtain flow field image data pairs that are spatiotemporally aligned with the simulation result pairs. This includes: for each pair of multiphase flow simulation case studies, performing image mapping processing on the first simulation result corresponding to the first simulation case to obtain first flow field image data that is spatiotemporally aligned with the first simulation result; the first flow field image data includes multiple frames of flow field image data; performing image mapping processing on the second simulation result corresponding to the second simulation case to obtain second flow field image data that is spatiotemporally aligned with the second simulation result; the second flow field image data includes multiple frames of flow field image data. The image resolution of the first flow field image data is different from the image resolution of the second flow field image data.
[0166] Step S1204: Construct a flow field image dataset based on multiple pairs of flow field image data.
[0167] It is understandable that the array corresponding to each frame of flow field image data can be regarded as a two-dimensional image. The specific value of each data point in the array corresponds to the target physical quantity (such as volume fraction, velocity, or pressure) corresponding to the grid point in the simulation result, while in the image representation, it is mapped to the gray value of the pixel, thus achieving an equivalent representation of the physical field and the image space. Furthermore, each multiphase flow simulation case contains multiple recording moments (i.e., time nodes) in the time dimension. For each moment, a set of corresponding low-resolution flow field image data and high-resolution flow field image data are generated. Therefore, the total number of flow field image data can be derived from the following relationship: Total number of images = Total number of simulation case pairs × Number of time nodes recorded in a single case × 2.
[0168] In one exemplary embodiment, Figure 14 Five pairs of flow field image data are provided. Figure 14 The left column contains low-resolution flow field image data, and the right column contains high-resolution flow field image data. The Index indicates the case number; low-resolution and high-resolution flow field image data in the same row correspond to the same case number.
[0169] In this embodiment, by acquiring multiple sets of multiphase flow simulation case pairs with only different grid resolutions, the strict correspondence between high- and low-resolution simulation results under the same physical conditions is ensured. Multiphase flow simulation calculations are performed on each set of multiphase flow simulation case pairs to generate corresponding simulation result pairs. Image mapping processing is performed on the simulation result pairs to obtain flow field image data pairs that are spatiotemporally aligned with the simulation result pairs, thus achieving accurate mapping from flow field data to image data. A flow field image dataset is constructed based on multiple sets of flow field image data pairs. An initial flow field super-resolution reconstruction model is trained based on the flow field image dataset, enabling the model to effectively learn the high-resolution prior features and detailed evolution laws of the multiphase flow field.
[0170] It should be noted that, compared to traditional image super-resolution techniques (such as interpolation methods and non-deep learning sparse representation methods), the advantages of a well-trained flow field super-resolution reconstruction model in prediction results are mainly reflected in:
[0171] First, the authenticity of the generated details: Traditional methods achieve resolution improvement through "pixel filling," which easily leads to blurring and over-smoothing problems. For example, the interface of multiphase flow will be processed into a gradient region without details, which cannot restore the physical structure of the real flow field. However, the well-trained flow field super-resolution reconstruction model learns the physical laws of flow field data through adversarial training, and can generate details that conform to the fluid motion mechanism. These details are not randomly generated, but are based on "physical prior knowledge" learned from a large number of flow field image data pairs (i.e., LR-HR data pairs, that is, low resolution-high resolution data pairs), which ensures the authenticity and rationality of the reconstruction results.
[0172] Second, it has stronger noise resistance: Low-resolution CFD data may contain noise due to grid discretization errors. Traditional methods will amplify the noise, resulting in artifacts in the reconstruction results. The generator of the well-trained flow field super-resolution reconstruction model can suppress noise while improving resolution through residual blocks and batch normalization layers, resulting in better stability of flow field data.
[0173] The flow field super-resolution reconstruction method provided in this application represents a breakthrough over traditional high-resolution CFD computation: it solves the problem of time-consuming high-grid-count CFD calculations and ensures the detail accuracy and physical consistency of the reconstruction results through neural networks. Furthermore, the method can be extended to three-dimensional problems and widely applied in fields highly reliant on simulation, such as aerospace, energy and power, and automotive engineering, providing efficient and accurate technical support for engineering design optimization and flow mechanism research.
[0174] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0175] Based on the same inventive concept, this application also provides a flow field super-resolution reconstruction apparatus for implementing the flow field super-resolution reconstruction method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more flow field super-resolution reconstruction apparatus embodiments provided below can be found in the limitations of the flow field super-resolution reconstruction method described above, and will not be repeated here.
[0176] In one exemplary embodiment, such as Figure 15 As shown, a flow field super-resolution reconstruction device is provided, including: a result acquisition module 1501, a mapping module 1502, a model acquisition module 1503, and a prediction module 1504.
[0177] The result acquisition module 1501 is used to acquire the simulation results of the multiphase flow to be reconstructed corresponding to the multiphase flow case to be simulated.
[0178] The mapping module 1502 is used to perform image mapping processing on the simulation results of the multiphase flow to be reconstructed, so as to obtain the flow field image data to be reconstructed that is spatiotemporally aligned with the simulation results of the multiphase flow to be reconstructed;
[0179] Model acquisition module 1503 is used to acquire a trained flow field super-resolution reconstruction model;
[0180] The prediction module 1504 is used to perform super-resolution prediction on the flow field image data to be reconstructed using the trained flow field super-resolution reconstruction model, so as to obtain target reconstructed flow field image data with a higher image resolution than the flow field image data to be reconstructed.
[0181] The aforementioned flow field super-resolution reconstruction device acquires the simulation results of the multiphase flow to be reconstructed corresponding to the multiphase flow case to be simulated, and performs image mapping processing on the simulation results to obtain flow field image data that is spatiotemporally aligned with the simulation results. Then, using a trained flow field super-resolution reconstruction model, it performs super-resolution prediction on the flow field image data to be reconstructed, generating target reconstructed flow field image data with a higher image resolution than the original flow field image data. By converting low-resolution simulation data into image representations adapted to deep learning, and with the help of a trained flow field super-resolution reconstruction model, it learns the complex mapping relationship between high and low resolution flow fields to achieve rapid resolution improvement. This effectively avoids the high cost and high time consumption problems in the traditional high-resolution mesh iterative solution process, and effectively improves the computational efficiency of high-resolution flow field data while ensuring the computational accuracy of high-resolution flow field data.
[0182] In one embodiment, the result acquisition module 1501 is further configured to:
[0183] Obtain the initial multiphase flow case, initial simulation conditions, and the first objective solver;
[0184] Based on the initial simulation conditions, the initial multiphase flow case is initialized and configured to obtain the multiphase flow case to be simulated;
[0185] Based on the first objective solver, multiphase flow simulation calculations are performed on the multiphase flow case to be simulated, generating the multiphase flow simulation results to be reconstructed corresponding to the multiphase flow case to be simulated.
[0186] In one embodiment, the multiphase flow simulation results to be reconstructed include multiphase flow simulation results at different time steps; each multiphase flow simulation result includes simulation data of grid points corresponding to multiple simulation grid points; the mapping module 1502 is further used for:
[0187] Obtain the mesh definition information corresponding to the multiphase flow case to be simulated;
[0188] For the multiphase flow simulation results at each time step, based on the grid definition information and the target physical quantities in the grid point simulation data, the multiphase flow simulation results are subjected to spatial mapping and data mapping processing to generate target flow field image data that is spatiotemporally aligned with the multiphase flow simulation results.
[0189] The target flow field image data that is spatiotemporally aligned with the multiphase flow simulation results at each time step is determined as the flow field image data to be reconstructed that is spatiotemporally aligned with the multiphase flow simulation results to be reconstructed.
[0190] In one embodiment, the mesh definition information includes the mesh spatial resolution and the coordinates of the mesh vertex points; the mapping module 1502 is also used for:
[0191] Based on the grid spatial resolution, construct an initial image array with a shape consistent with the grid spatial resolution;
[0192] Based on the target physical quantities and grid vertex coordinates in the grid point simulation data, the initial image array is filled point by point according to the preset data filling rules to generate target flow field image data that is spatiotemporally aligned with the multiphase flow simulation results.
[0193] In one embodiment, the model acquisition module 1503 is further configured to:
[0194] Acquire the flow field image dataset and the initial flow field super-resolution reconstruction model; wherein, the flow field image dataset includes multiple pairs of flow field image data; each pair of flow field image data includes two sets of flow field image data with different image resolutions;
[0195] Based on the flow field image dataset, the initial flow field super-resolution reconstruction model is subjected to adversarial training until the target loss function corresponding to the initial flow field super-resolution reconstruction model satisfies the preset convergence condition, thus obtaining the trained flow field super-resolution reconstruction model.
[0196] In one embodiment, the model acquisition module 1503 is further configured to:
[0197] Obtain multiple sets of multiphase flow simulation case pairs; the multiphase flow simulation case pairs include a first simulation case and a second simulation case with different mesh resolutions but identical other simulation conditions;
[0198] For each pair of multiphase flow simulation cases, multiphase flow simulation calculations are performed on the pair of multiphase flow simulation cases, and simulation result pairs corresponding to the pair of multiphase flow simulation cases are generated.
[0199] The simulation results are processed by image mapping to obtain flow field image data pairs that are spatiotemporally aligned with the simulation results.
[0200] A flow field image dataset is constructed based on multiple pairs of flow field image data.
[0201] In one embodiment, the model acquisition module 1503 is further configured to:
[0202] Based on preset simulation case pairs, multiple sets of intermediate simulation case pairs are generated;
[0203] Based on multiple sets of randomly generated preset simulation initial conditions, simulation parameters are configured for multiple sets of intermediate simulation case pairs to generate corresponding sets of multiphase flow simulation case pairs.
[0204] In one embodiment, the model acquisition module 1503 is further configured to:
[0205] Obtain a pre-defined list of unfinished tasks and a second objective solver; the pre-defined list of unfinished tasks includes multiple sets of multiphase flow simulation case pairs to be simulated.
[0206] Based on the second objective solver, multiphase flow simulation calculations are performed on multiple sets of multiphase flow simulation cases to be simulated, and the simulation results corresponding to each multiphase flow simulation case are obtained.
[0207] In one embodiment, the model acquisition module 1503 is further configured to:
[0208] According to the preset data ratio, the flow field image dataset is divided into data sets to obtain the training set;
[0209] Based on the training set, the discriminator and generator in the initial flow field super-resolution reconstruction model are trained alternately in adversarial manner until the first loss function corresponding to the discriminator satisfies the first preset convergence condition and the second loss function corresponding to the generator satisfies the second preset convergence condition, thus obtaining the trained flow field super-resolution reconstruction model.
[0210] Each module in the aforementioned flow field super-resolution reconstruction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0211] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 16As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data related to flow field super-resolution reconstruction. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a flow field super-resolution reconstruction method.
[0212] Those skilled in the art will understand that Figure 16 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0213] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0214] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0215] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0216] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0217] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0218] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A flow field super-resolution reconstruction method, characterized in that, The method includes: Obtain the simulation results of the multiphase flow to be reconstructed corresponding to the multiphase flow case to be simulated; The simulation results of the multiphase flow to be reconstructed are processed by image mapping to obtain the flow field image data to be reconstructed that is spatiotemporally aligned with the simulation results of the multiphase flow to be reconstructed. Obtain a trained flow field super-resolution reconstruction model; The trained flow field super-resolution reconstruction model is used to perform super-resolution prediction on the flow field image data to be reconstructed, so as to obtain target reconstructed flow field image data with a higher image resolution than the flow field image data to be reconstructed.
2. The method according to claim 1, characterized in that, The process of obtaining the simulation results of the multiphase flow to be reconstructed corresponding to the multiphase flow case to be simulated includes: Obtain the initial multiphase flow case, initial simulation conditions, and the first objective solver; Based on the initial simulation conditions, the initial multiphase flow case is initialized and configured to obtain the multiphase flow case to be simulated; Based on the first objective solver, multiphase flow simulation calculations are performed on the multiphase flow case to be simulated, generating the multiphase flow simulation results to be reconstructed corresponding to the multiphase flow case to be simulated.
3. The method according to claim 1, characterized in that, The multiphase flow simulation results to be reconstructed include multiphase flow simulation results at different time steps; each multiphase flow simulation result includes simulation data of grid points corresponding to multiple simulation grid points. The step of performing image mapping processing on the simulation results of the multiphase flow to be reconstructed to obtain the spatiotemporally aligned flow field image data of the simulation results includes: Obtain the mesh definition information corresponding to the multiphase flow case to be simulated; For the multiphase flow simulation results at each time step, based on the grid definition information and the target physical quantities in the grid point simulation data, the multiphase flow simulation results are subjected to spatial mapping processing and data mapping processing to generate target flow field image data that is spatiotemporally aligned with the multiphase flow simulation results; The target flow field image data that is spatiotemporally aligned with the multiphase flow simulation results at each time step is determined as the flow field image data to be reconstructed that is spatiotemporally aligned with the multiphase flow simulation results to be reconstructed.
4. The method according to claim 3, characterized in that, The grid definition information includes the grid spatial resolution and grid vertex coordinates; the step of performing spatial mapping and data mapping processing on the multiphase flow simulation results based on the grid definition information and the target physical quantities in the grid point simulation data to generate target flow field image data that is spatiotemporally aligned with the multiphase flow simulation results includes: Based on the grid space resolution, an initial image array with a shape consistent with the grid space resolution is constructed; Based on the target physical quantities in the grid point simulation data and the grid point vertex coordinates, the initial image array is filled point by point according to the preset data filling rules to generate target flow field image data that is spatiotemporally aligned with the multiphase flow simulation results.
5. The method according to claim 1, characterized in that, The process of obtaining the trained flow field super-resolution reconstruction model includes: Acquire a flow field image dataset and an initial flow field super-resolution reconstruction model; wherein, the flow field image dataset includes multiple pairs of flow field image data; each pair of flow field image data includes two sets of flow field image data with different image resolutions; Based on the flow field image dataset, the initial flow field super-resolution reconstruction model is subjected to adversarial training until the target loss function corresponding to the initial flow field super-resolution reconstruction model satisfies the preset convergence condition, thereby obtaining the trained flow field super-resolution reconstruction model.
6. The method according to claim 5, characterized in that, The acquisition of the flow field image dataset includes: Multiple sets of multiphase flow simulation case pairs are obtained; the multiphase flow simulation case pairs include a first simulation case and a second simulation case with different mesh resolutions but the same other simulation conditions; For each pair of multiphase flow simulation cases, multiphase flow simulation calculations are performed on the pair of multiphase flow simulation cases to generate simulation result pairs corresponding to the pair of multiphase flow simulation cases. The simulation results are processed by image mapping to obtain flow field image data pairs that are spatiotemporally aligned with the simulation results. A flow field image dataset is constructed based on multiple sets of flow field image data pairs.
7. The method according to claim 6, characterized in that, The acquisition of multiple sets of multiphase flow simulation case pairs includes: Based on preset simulation case pairs, multiple sets of intermediate simulation case pairs are generated; Based on multiple sets of randomly generated preset simulation initial conditions, simulation parameters are configured for multiple sets of intermediate simulation case pairs to generate corresponding sets of multiphase flow simulation case pairs.
8. The method according to claim 6, characterized in that, The process of performing multiphase flow simulation calculations on the multiphase flow simulation case pairs and generating corresponding simulation result pairs includes: Obtain a preset list of unfinished tasks and a second objective solver; the preset list of unfinished tasks includes multiple sets of the multiphase flow simulation case pairs to be simulated. Based on the second objective solver, multiphase flow simulation calculations are performed on multiple sets of multiphase flow simulation case pairs to be simulated, and simulation result pairs corresponding to each multiphase flow simulation case pair are obtained.
9. The method according to claim 5, characterized in that, The process of adversarially training the initial flow field super-resolution reconstruction model based on the flow field image dataset until the target loss function corresponding to the initial flow field super-resolution reconstruction model satisfies a preset convergence condition, thereby obtaining a trained flow field super-resolution reconstruction model, includes: The flow field image dataset is divided into training sets according to a preset data ratio; Based on the training set, the discriminator and generator in the initial flow field super-resolution reconstruction model are trained alternately in adversarial manner until the first loss function corresponding to the discriminator satisfies the first preset convergence condition and the second loss function corresponding to the generator satisfies the second preset convergence condition, thus obtaining the trained flow field super-resolution reconstruction model.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.