State parameter generation method, device and equipment of fluid model, and storage medium

By preprocessing the coefficient matrix and residual vector of the fluid model and performing parallel orthogonal projection operations, the problem of excessively long generation time of fluid model state parameters is solved, enabling faster fluid state analysis and prediction.

CN119514394BActive Publication Date: 2025-12-09ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311068405.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-22
Publication Date
2025-12-09
Estimated Expiration
2043-08-22

AI Technical Summary

Technical Problem

In existing technologies, the calculation and generation of fluid model state parameters take a long time, which affects the timeliness of fluid state data analysis and prediction, especially when the grid cell size is large.

Method used

By obtaining the first coefficient matrix and the first residual vector of the fluid model, specified preprocessing is performed to reduce the matrix condition number. Then, based on the second coefficient matrix and the second residual vector, orthogonal projection operation is performed iteratively. The orthogonal projection process is executed in parallel multiple times to select the state change parameter with the smallest residual as the output of each iteration until the specified accuracy condition is reached.

Benefits of technology

It reduces the time required to generate target state parameters, thereby improving the timeliness of fluid state analysis and prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119514394B_ABST
    Figure CN119514394B_ABST
Patent Text Reader

Abstract

The embodiments of the present specification provide a state parameter generation method, device and equipment of a fluid model and a storage medium. The method comprises: obtaining a first coefficient matrix and a first residual vector of a fluid model; performing a specified preprocessing operation on the first coefficient matrix and the first residual vector to obtain a second coefficient matrix and a second residual vector; performing an orthogonal projection operation process on an initial value of a state change parameter of the fluid model based on the second coefficient matrix, the second residual vector, and probability distribution data constructed according to the second coefficient matrix until the obtained state change parameter meets a specified accuracy condition, and taking the obtained state change parameter as a target state change parameter; and generating a target state parameter of the fluid model at a specified time according to the target state change parameter. The number of iterations is reduced, and the time for generating the state parameter is reduced, thereby improving the timeliness of analyzing or predicting the fluid state based on simulation to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments in the specification relate to the field of fluid simulation, and in particular to a method and apparatus for generating state parameters of a fluid model. BACKGROUND

[0002] By simulating the state changes of fluid in various complex situations, the complex physical phenomena from fluid dynamics and thermodynamics can be better understood to predict the movement and change process of fluid in various application scenarios such as engineering, manufacturing, climate, energy, etc., and thus to provide data support for related product development, risk assessment, etc.

[0003] Currently, the simulation of fluid state is mainly based on computer simulation technology, which involves constructing a fluid model and dividing it into discrete grid cells, and then calculating according to the problems and requirements in the actual application scenario, and generating the related state parameters of the fluid model to represent the state of the simulated fluid.

[0004] However, in the related art, the calculation and generation of the state parameters of the fluid model involve a large number of grid cells, and thus require a long time, which to some extent affects the timeliness of the simulation-based fluid state data in predicting related problems. SUMMARY

[0005] Therefore, the embodiments in the specification are committed to providing a method and apparatus for generating state parameters of a fluid model, which can reduce the time for calculating and generating the state parameters of the fluid model, and to some extent improve the timeliness of the simulation-based fluid state data in analyzing and predicting related problems.

[0006] One embodiment in the specification provides a state parameter generation method of a fluid model, the fluid model being used to simulate state changes of a fluid over time, and the fluid model being divided into a plurality of grid units; the method comprising: obtaining a first coefficient matrix and a first residual vector of the fluid model; wherein the first coefficient matrix comprises a coefficient set obtained based on state parameters of the plurality of grid units at a previous time of a specified time; the first residual vector comprises a residual amount set obtained based on the state parameters of the plurality of grid units at the previous time of the specified time; performing a specified pre-processing operation on the first coefficient matrix and the first residual vector to obtain a second coefficient matrix and a second residual vector; wherein the specified pre-processing operation is used to reduce the condition number of the matrix; based on the second coefficient matrix, the second residual vector, and probability distribution data constructed according to the second coefficient matrix, performing an orthogonal projection operation process on an initial value of a state change amount parameter of the fluid model until a state change amount parameter obtained in the process meets a specified precision condition, and the state change amount parameter obtained is taken as a target state change amount parameter; wherein in the orthogonal projection operation process, one of a plurality of state change amount parameters obtained by performing a plurality of orthogonal projection processes in parallel and having the smallest residual with the target state change amount parameter is taken as a state change amount parameter output by each orthogonal projection operation process; the target state change amount parameter represents a difference between a target state parameter of the fluid model at the specified time and a state parameter of the fluid model at a previous time of the specified time; and generating the target state parameter of the fluid model at the specified time according to the target state change amount parameter.

[0007] One embodiment of the present specification provides a state parameter generation method of a fluid model, the fluid model being used to simulate state changes of a fluid over time, and the fluid model being divided into a plurality of grid units; the method comprises: obtaining initial state parameters of the fluid model, the initial state parameters comprising state parameters of the plurality of grid units at an initial time; taking the initial state parameters as state parameters of a time point preceding a specified time point in the state parameter generation method of the fluid model provided by the above embodiment, iteratively performing the state parameter generation method of the fluid model provided by the above embodiment according to a time sequence of a plurality of specified time points, until a modulus of the first residual vector meets a specified accuracy condition, to generate target state parameters of the fluid model at the corresponding specified time points; the target state parameters are used to represent a stable state of the simulated fluid; wherein the specified accuracy condition comprises: a value range of the modulus of the first residual vector when the simulated fluid is in a stable state; in the process of iteratively performing the state parameter generation method of the fluid model provided by the above embodiment, the target state parameters obtained by performing the state parameter generation method of the fluid model provided by the above embodiment each time are taken as state parameters of a time point preceding the specified time point in the next performance of the state parameter generation method of the fluid model provided by the above embodiment.

[0008] One embodiment of the present specification provides a state parameter generation device of a fluid model, the fluid model being used to simulate state changes of a fluid over time, and the fluid model being divided into a plurality of grid units; the device comprises: an obtaining module, configured to obtain a first coefficient matrix and a first residual vector of the fluid model; wherein the first coefficient matrix comprises a coefficient set obtained based on state parameters of the plurality of grid units at a time point preceding a specified time point; the first residual vector comprises a residual amount set obtained based on the state parameters of the plurality of grid units at the time point preceding the specified time point; a preprocessing module, configured to perform a specified preprocessing operation on the first coefficient matrix and the first residual vector, to obtain a second coefficient matrix and a second residual vector; wherein the specified preprocessing operation is used to reduce a condition number of a matrix; an iteration module, configured to iteratively perform an orthogonal projection operation process on an initial value of the state parameters of the fluid model based on the second coefficient matrix, the second residual vector, and probability distribution data constructed according to the second coefficient matrix, until a obtained state parameter meets a specified accuracy condition, the obtained state parameter being taken as a target state parameter of the fluid model at the specified time point; wherein in the orthogonal projection operation process, one of a plurality of state parameters corresponding to the target state parameter with the smallest residual is taken as a state parameter output by each orthogonal projection operation process, the plurality of state parameters being obtained by performing the orthogonal projection process in parallel for multiple times.

[0009] The embodiments of the present specification provide a device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described in the above embodiments when executing the computer program.

[0010] The embodiments of the present specification provide a computer readable storage medium, which stores computer program instructions, and the program is executed by a processor to implement the method described in the above embodiments.

[0011] The embodiments of the present specification provide a plurality of embodiments, which obtain the first coefficient matrix and the first residual vector of the plurality of grid units at the specified time based on the state parameters of the plurality of grid units of the fluid model at the previous time of the specified time, then obtain the second coefficient matrix and the second residual vector after the specified pre-processing operation capable of reducing the condition number of the matrix is performed on the first coefficient matrix and the first residual vector, and then perform the orthogonal projection operation on the initial value iteration of the state variation parameter of the fluid model based on the second coefficient matrix, the second residual vector, and the probability distribution data constructed according to the second coefficient matrix. In each operation, the state variation parameter with the smallest residual between the target state variation parameter among the plurality of state variation parameters obtained by the plurality of parallel orthogonal projection processes is output as the state variation parameter output by each orthogonal projection operation process, and then the next operation is performed. When the state variation parameter obtained by the iterative operation meets the specified accuracy condition, it is taken as the target state variation parameter of the fluid model at the specified time. Then, the target state parameter of the fluid model at the specified time is generated according to the relationship between the target state variation parameter and the target state parameter at the specified time. By performing the plurality of orthogonal projections in parallel in each iteration operation process, and taking the state parameter with the fastest residual decline among the plurality of state parameters as the output of each iteration operation process for updating the input of the next iteration operation, the number of iterations required is reduced, and the time for generating the target state parameter is reduced, thereby improving the timeliness of the analysis or prediction based on the simulated fluid state to a certain extent. BRIEF DESCRIPTION OF DRAWINGS

[0012] Figure 1 The state parameter generation method of the fluid model provided by one embodiment of the present specification is shown in the schematic diagram.

[0013] Figure 2 The state parameter generation method of the fluid model provided by another embodiment of the present specification is shown in the schematic diagram.

[0014] Figure 3 The state parameter generation device of the fluid model provided by one embodiment of the present specification is shown in the schematic diagram.

[0015] Figure 4 The computer device provided by one embodiment of the present specification is shown in the schematic diagram. DETAILED DESCRIPTION

[0016] The technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work are within the scope of protection of the present application.

[0017] In the description of the embodiments of the present application, it should be understood that the terms “first”, “second” are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with “first”, “second” can explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of “multiple” is two or more, unless otherwise specifically limited.

[0018] Simulation of fluid state plays a very important role in the fields of engineering, manufacturing, climate prediction, urban planning, energy development, etc. By simulating the state change process of fluid in different problem scenarios, developers or researchers can better understand the complex physical phenomena and their interactions from fluid dynamics and thermodynamics, such as heat transfer, flow field change, etc., and then predict the behavior of fluid in these problem scenarios, providing support and help for related product development, risk analysis and evaluation, etc. For example, through fluid state simulation, the motion state of products under different stress, temperature and other environments can be analyzed and predicted, so as to better design, evaluate and optimize large transportation tools such as ships and airplanes; for another example, through fluid state simulation, data support can be provided for the research of climate change, sea-air interaction, etc., and then basis for predicting weather and climate change can be provided.

[0019] At present, the simulation of fluid state is usually based on computer simulation technology, which is realized by constructing a fluid model and dividing it into discrete grid cells, and then calculating and generating state parameters according to the problems and needs in specific scenarios. For example, Computational Fluid Dynamics (CFD) is a method based on discretization and numerical methods to simulate and predict the changes of various physical quantities in fluid.

[0020] In the process of simulating fluid movement by computer technology, for example, in the process of using CFD simulation, the state parameters of the constructed fluid model at all times from the initial state until reaching the steady state need to be calculated. The state parameters at each time need to be calculated according to the linear relationship between the state parameters at the time and the coefficient matrix and residual matrix of each grid element obtained based on the state parameters at the previous time. It can be seen that in the case of large scale of the divided grid elements, the calculation of the state parameters at each time will be relatively complex. In the related technology, some classic iterative methods are usually used to calculate and generate the state parameters at each time. However, in the case of large scale of the grid elements, the number of required iterative calculations is large, and the time required to generate the state parameters of the fluid model is long, which to some extent affects the timeliness of analyzing or predicting based on the simulated fluid state.

[0021] Therefore, it is necessary to provide a fluid model state parameter generation method. The fluid model state parameter generation method can obtain a first coefficient matrix and a first residual vector of a plurality of grid elements of the fluid model at a specified time based on the state parameters of the plurality of grid elements at a previous time before the specified time, then perform a specified preprocessing operation capable of reducing the condition number of the matrix on the first coefficient matrix and the first residual vector to obtain a second coefficient matrix and a second residual vector, then perform orthogonal projection operation on the initial value iteration of the fluid model state change parameter based on the second coefficient matrix, the second residual vector, and the probability distribution data constructed according to the second coefficient matrix, and output the state change parameter with the smallest residual between the target state change parameter in each orthogonal projection operation process as the state change parameter output in each orthogonal projection operation process in each operation by performing multiple parallel orthogonal projection processes to obtain multiple state change parameters, then perform the next operation, and when the state change parameter obtained by the iterative operation meets the specified accuracy condition, the state change parameter is taken as the target state change parameter of the fluid model at the specified time, and then the target state parameter of the fluid model at the specified time is generated according to the relationship between the target state change parameter and the target state parameter at the specified time. By performing multiple orthogonal projections in parallel in each iteration operation process and taking the state parameter with the fastest residual decline among the multiple state parameters obtained as the output of each iteration operation process for updating the input of the next iteration operation, the number of iterations required is reduced, thereby the time for generating the target state parameter can be reduced, and the timeliness of analyzing or predicting based on the simulated fluid state can be improved to some extent.

[0022] Please refer to Figure 1 One embodiment of the present specification provides a fluid model state parameter generation method. The fluid model is used to simulate the state change of the fluid over time, and the fluid model is divided into a plurality of grid elements.

[0023] Fluid models can be used to simulate the motion behavior of fluids in different scenarios. Fluid models can reflect the motion law and behavior characteristics of fluids by simulating the state change process of fluids over time. Fluid models can be mathematical models used to describe the motion behavior of fluids. Fluid models can be selected according to the problem requirements and the nature of the solution, and different models can include different assumptions and conditions, such as different fluid models used in the fields of ocean, atmosphere, hydrology, etc. to solve different problems. Specifically, fluid models can describe fluid motion as mathematical equations through physical equations (such as Euler equations, Navier-Stokes equations, etc.), and solve the temperature, velocity, pressure, and other related state parameters of the fluid to predict, design, and optimize fluid behavior. Specifically, in practical applications, based on fluid models, numerical methods can be used to simulate the motion process of fluids to obtain simulation results for further analysis and application. For example, when using CFD technology to simulate fluid state, the CFD solver needs to perform time integration on the partial derivative equation, so it needs to use time increments to calculate small changes in the fluid system and stop when it becomes stable.

[0024] The state parameters of the fluid model can be used to represent the state of the simulated fluid at a certain time. The state parameters can include physical quantities used to describe the state of the simulated fluid. Specifically, for example, the state parameters can include density, temperature, pressure, velocity, energy, and other physical quantities.

[0025] Grid cells can be obtained by dividing the fluid model according to the motion area of the simulated fluid. Grid cells can be understood as a discrete representation of the spatial continuous domain of the fluid problem to be solved, and each spatial point can be considered as a node. A grid cell can be defined by a volume bounded by a group of adjacent nodes. The division of grid cells can be selected according to the problem requirements. Specifically, for example, the division of grid cells can be based on the Finite Volume Method (FVM), or other methods such as adaptive mesh division methods can be used to divide the grid cells.

[0026] In the FVM method, numerical grids can be divided into multiple grid cells, considering the local volume associated with each grid cell, and applying the integral conservation law. This law shows that the change of all variables within the volume depends only on the flux F on its surface S. FVM can satisfy the conservation properties of fluid mechanics equations. The conservation equation can be written as follows:

[0027]

[0028] After discretizing the spatial continuum domain into grid cells, the mathematical operators of the equations to be solved also need to be discretized, and this approximation of the equations can be achieved through numerical schemes. Based on this, two types of numerical schemes can be considered: time integration schemes and spatial schemes. The time integration scheme can be to model the time integration of the variables to be solved starting from the initial state of the fluid, while the spatial scheme can represent the spatial gradient of these variables to be solved.

[0029] Further, based on the above discretized numerical scheme and solution method, the numerical grid of the space can be solved. In the discretized representation of formula 1, the differential operation is replaced by a numerical approximation, and the implicit Euler format is selected to handle the time differential. Formula 1 is discretized as the following expression:

[0030]

[0031] where U n represents the fluid state of all grid cells at the nth time (i.e., the nth integration), U n = {U i}, i = 0, 1, 2,..., N-1, U i = (p, pu, pv, E) i , U i represents the fluid state of the ith grid cell, p represents the fluid density, u and v represent the two components of the fluid velocity in two-dimensional coordinates, E represents the total energy of unit mass of fluid, b n+1 (U n+1 ) represents the residual quantity at the n+1 time, and it is a function related to U n .

[0032] Let ΔU n = U n+1 - U n , then:

[0033]

[0034] Substituting formula 3 into formula 2 gives:

[0035]

[0036] where δ i,i' δ j,j' represents a parameter related to the coordinate information of the grid cell.

[0037] Let , then formula 4 can be equivalent to the following form:

[0038] A(U n )ΔU n = -b n (Un )......Formula 5

[0039] wherein A(U n ) represents the coefficient matrix at the n-th moment, i.e., the Jacobian matrix at the n-th moment, and the coefficient matrix is a function related to U n , b n (U n ) represents the residual quantity at the n-th moment. In this way, in order to calculate the state parameter of the simulated fluid in a stable state, it can be converted into an iterative calculation problem of a linear system A(U n )ΔU n =-b n (U n ). When N grid cells are divided, and the physical state to be solved is 1, A(U n ) can be an N×N matrix, and ΔU n can be an N×1 column vector. When N grid cells are divided, and the physical state to be solved is 4, A(U n ) can be a 4N×4N matrix, and ΔU n can be a 4N×1 column vector. It can be understood that the dimension of the above linear system is related to the number of physical states to be solved, specifically, the more the number of physical states to be solved, the larger the scale of the above linear system. Specifically, in the calculation process, A 0 and b 0 can be calculated based on the obtained initial state parameter U 0 of each grid cell, then U 1 can be calculated, then U 1 can be calculated based on U 2 , and the iterative calculation is continued, when b n (U n ) approaches 0, it indicates that the modulus of the state fluctuation vector formed by the difference between the state parameters of the simulated fluid at the n+1-th moment and the n-th moment tends to a preset precision, and the preset precision can be a value approaching 0, such as 1e-4, 1e-6, etc., at this time, the state parameter at the n+1-th moment can be used to represent the stable state of the simulated fluid.

[0040] It can be seen that in the solving process of a linear system with a physical state to be solved of 4, the solving process of each iteration needs to solve a linear equation set with a dimension of 4N x 4N. For one solving process, some classical methods are usually used for iterative calculation and solving. In the iteration of such methods, the number of iterations usually increases with the increase of the dimension of the linear system. However, in some cases, the grid cell size of the fluid model is relatively large, and accordingly, the iterative calculation using such methods is very complex, the number of iterations is large, and the time required is long, thereby affecting the timeliness of generating the state parameters. The embodiments of the present specification can reduce the number of iteration operations required in the solving process by performing multiple orthogonal projections in parallel in each iteration operation process and taking the residual error of the state change parameter that decreases the fastest as the output of each iteration operation process to update the input of the next iteration operation. In this way, the number of iteration operations in the solving process can be reduced, the time for generating the target state parameter can be reduced, and the timeliness of analyzing or predicting the fluid state based on simulation can be improved.

[0041] In the present embodiment, the state parameter generation method of the fluid model can include the following steps.

[0042] Step S110: obtaining a first coefficient matrix and a first residual error vector of the fluid model; wherein the first coefficient matrix includes a coefficient set obtained based on the state parameters of the plurality of grid cells at a previous time of a specified time; and the first residual error vector includes a residual error set obtained based on the state parameters of the plurality of grid cells at the previous time of the specified time.

[0043] In the present embodiment, the first coefficient matrix of the fluid model can be understood as A(U n ) in formula 5, and the first coefficient matrix can represent the Jacobian matrix related to the state parameters of each grid cell at the nth time (i.e. U n ) in formula 5, which can be calculated according to U n and the grid coordinate information according to . The first residual error vector of the fluid model can be understood as b n (U n ) in formula 5, and the first residual error vector can represent a set of residual errors related to the state parameters of each grid cell at the nth time, which can be calculated according to the functional relationship between the residual error and the state parameters of each grid cell at the nth time. By obtaining the first coefficient matrix and the first residual error vector of the fluid model, the first coefficient matrix and the first residual error vector can be taken as known quantities, and the state parameters of the fluid model at the (n+1)th time can be calculated according to formula 5.

[0044] In the embodiment, the specified time point can be used as a time reference for obtaining the first coefficient matrix and the first residual vector of the fluid model, and can also be used as a time reference for generating the target state parameter of the fluid model. Specifically, to simulate the state change of the fluid, in the time integration scheme, the time point at which the fluid is in the initial state can be used as the initial time point, and the modeling is integrated from the initial time point. According to the foregoing derivation, for the state parameter of each time point, the equation shown in formula 5 can be satisfied. In this way, from the initial time point, in the time sequence to the n+1 time point, each time point between them can be used as the specified time point, that is, as the time reference of the state parameter generation method of the fluid model. For example, the specified time point can include the initial time point, the time point after the initial time point, the n time point, or the n+1 time point.

[0045] In the embodiment, the first coefficient matrix and the first residual vector are obtained, and the result calculated by the fluid model based on the state parameter of the previous time point of the specified time point is directly obtained, which is used to solve the target state parameter of the specified time point according to formula 5. Specifically, for example, the specified time point is the n time point, and the result of the first coefficient matrix and the first residual vector calculated according to the function relationship respectively satisfied between the state parameter of the n-1 time point, the first coefficient matrix and the first residual vector is directly obtained, which is used to solve the target state parameter of the n time point according to formula 5.

[0046] In some embodiments, the first coefficient matrix and the first residual vector can also be obtained by receiving data about the first coefficient matrix and the first residual vector sent by other applications or devices, and of course, the first coefficient matrix and the first residual vector can also be obtained by inputting the calculation result into the model by the user. The way of obtaining the first coefficient matrix and the first residual vector is not specifically limited in the specification.

[0047] Step S120: performing a specified preprocessing operation on the first coefficient matrix and the first residual vector to obtain a second coefficient matrix and a second residual vector; the specified preprocessing operation is used to reduce the condition number of the matrix.

[0048] In some cases, as the grid cells usually have a large scale, it can be understood that the linear equation set as shown in formula 5 composed of the first coefficient matrix and the first residual vector also has a large scale, and in order to solve the target state parameter, when the large-scale linear equation set is iteratively calculated, the calculation accuracy and stability may be affected due to the large matrix condition number, thereby increasing the number of iterations and reducing the time required to solve the target state parameter. By performing a specified preconditioning operation on the first coefficient matrix and the first residual vector to reduce the matrix condition number, and then performing iterative calculation based on the second coefficient matrix and the second residual vector obtained after the preconditioning, the influence of errors or disturbances on the calculation result can be reduced during calculation, the calculation accuracy and stability can be improved, and the number of iterations can be reduced to improve the speed of generating the target state parameter.

[0049] In the present embodiment, the specified preconditioning operation can be used to reduce the matrix condition number to improve the accuracy and stability of the calculation of the linear equation set. The specified preconditioning operation can include dividing each row of the first coefficient matrix and the first residual vector by the main diagonal element in the first coefficient matrix.

[0050] In some embodiments, the specified preconditioning operation can also include using a matrix decomposition method or other matrix preconditioning method to transform the original matrix into a preconditioned matrix through a certain mathematical transformation.

[0051] Step S130: based on the second coefficient matrix, the second residual vector, and the probability distribution data constructed according to the second coefficient matrix, performing an orthogonal projection operation process on the initial value of the fluid model state change parameter until the obtained state change parameter meets the specified accuracy condition, and obtaining the state change parameter as the target state change parameter; wherein in the orthogonal projection operation process, the state change parameter output by each orthogonal projection operation process is the one with the smallest residual between the corresponding multiple state change parameters obtained by performing multiple parallel orthogonal projection processes and the target state change parameter; and the target state change parameter represents the difference between the target state parameter of the fluid model at a specified time and the state parameter of the fluid model at a time before the specified time.

[0052] In some cases, for the calculation of large-scale linear equations as shown in formula 5, some classical iterative methods are usually used for direct calculation. When the grid cell size is large, the number of iterations required by such calculation methods is large, which not only takes a long time to calculate, but also may be limited by storage and computing resources, thereby causing the speed of solving the target state parameter to be slow, affecting the timeliness of subsequent analysis and prediction activities. By performing multiple orthogonal projection operations in parallel during each iteration operation to obtain multiple results, and then selecting the one closest to the target state change parameter as the state parameter output by the current iteration operation, which is used as the input for the next iteration operation, each iteration process can update the input for the next iteration in the direction of the fastest residual error reduction. In this way, compared with the classical iterative method, the same convergence condition can have fewer iterations, thereby reducing the time required for calculation and improving the speed of generating the target state parameter.

[0053] In the embodiment, the probability distribution data about the random event of selecting a certain row of the second coefficient matrix can be constructed according to the second coefficient matrix, and the probability distribution data is used to represent the probability distribution of the random event. Further, based on the probability distribution data, multiple rows can be selected in parallel in each iteration of the orthogonal projection operation process as the calculation basis for the corresponding multiple orthogonal projection processes. Specifically, the row index data representing the row order of the second coefficient matrix can be used as a random variable, and the probability distribution data can be constructed based on the corresponding probability of each row index data. For example, if the second coefficient matrix has 3 rows, the row index data 1, 2 and 3 can be used as random variables, and the probability values corresponding to each random variable are used to construct a probability distribution together. Each probability value represents the probability of the corresponding row of the second coefficient matrix being randomly selected. In some embodiments, some other form of data that can establish a one-to-one correspondence with each row of the second coefficient matrix can also be used as a random variable to construct the probability distribution data.

[0054] In the embodiment, the target state change parameter of the fluid model can represent the state change of the simulated fluid at different time points. Specifically, the target state change parameter of the fluid model can represent the difference between the target state parameter of the fluid model at a specified time and the state parameter of the fluid model at a time before the specified time. For example, ΔU in formula 5 n It can be understood that the target state change parameter is the target state change parameter, which can be obtained according to the target state parameter U n+1 and the state parameter U nThe target state variation parameter can be obtained by subtracting the state parameters of the grid units at the n time from the state parameters of the grid units at the n+1 time. It can be understood that the target state variation parameter can include a difference set of each state parameter of each grid unit at the n+1 time and the corresponding state parameter at the n time, and the difference set can form an n x 1 vector.

[0055] In the embodiment, the initial value of the fluid model state variation parameter can be taken as an object of the orthogonal projection operation, and used to perform the orthogonal projection operation. Further, the initial value of the fluid model state variation parameter can also be taken as an input of each iteration of the orthogonal projection operation, and used to perform multiple iterations to obtain the target state variation parameter. In the embodiment, in the first iteration of the orthogonal projection operation, the initial value of the fluid model state variation parameter can be a preset initial value. Specifically, the initial value of the state variation parameter can be preset according to the requirements of the fluid in a specific actual problem scenario, or the initial value of the state variation parameter can be directly set to 0.

[0056] In the embodiment, the state variation parameter obtained by performing the orthogonal projection operation each time can be taken as an output of each iteration, and further taken as an input of the next iteration. Specifically, for example, the initial value of the state variation parameter is x0, which can be a preset initial value of the fluid model state variation parameter in the first iteration. The orthogonal projection operation can obtain a projection point x1 of x0. Then, x1 is taken as the object of the orthogonal projection operation to perform the next iteration, and the iterations are sequentially performed until a stop condition is reached.

[0057] In the embodiment, the specified precision condition can be taken as a stop condition of the orthogonal projection operation. Specifically, when the state variation parameter output after performing the multiple iterations reaches the specified precision condition, the iteration is stopped, and the state variation parameter output by the iteration is taken as the final target state variation parameter. Specifically, the range of the modulus of the residual vector of the state variation parameter output by each iteration and the target state variation parameter can be taken as the specified precision condition. For example, the state variation parameter and the target state variation parameter can be n x 1 vectors, and the specified precision condition can be that the modulus of the residual vector of the two is less than a value close to 0, for example, 1e-4 or 1e-6.

[0058] In this embodiment, each orthogonal projection operation can be used to project the initial values ​​of the fluid model state change parameters onto the hyperplanes corresponding to the selected rows in the second coefficient matrix, thereby obtaining multiple projection points. Then, the projection point with the fastest decrease in residual is taken as the state change parameter output in this iteration and used as the target for the next orthogonal projection operation. Specifically, for example, A represents the second coefficient matrix, b represents the second residual vector, and x0 represents the initial value of the fluid model state change parameters. Each orthogonal projection iteration can perform multiple orthogonal projection processes in parallel for randomly selected rows in the second coefficient matrix. One orthogonal projection process can be the process of projecting x0 onto the hyperplane containing one of the selected rows in the second coefficient matrix to obtain projection point x1. It can be understood that multiple orthogonal projection processes can obtain multiple x1 values ​​corresponding to the randomly selected rows. The x1 value with the smallest residual relative to the target state change parameter, i.e., the one with the fastest decrease in residual relative to the target, can be taken as the state change parameter x1 output in this iteration. Specifically, for example, multiple x1 obtained from multiple orthogonal projection processes can be substituted into the linear relationship shown in Formula 5 between the second coefficient matrix and the second residual vector to calculate the residual, that is, to calculate |Ax1-b| respectively, and the smallest of the results is taken as the state change parameter x1 output by this iteration process.

[0059] Step S140: Generate the target state parameters of the fluid model at a specified time based on the target state change parameters.

[0060] In this embodiment, when the cutoff condition of the iterative calculation process is met, that is, when the state change parameter x is output in the k-th iteration... k When the specified accuracy condition has been met, the target state change parameter x is... k It can represent the difference between the target state parameters of the fluid model at a specified time and the state parameters of the fluid model at the time before the specified time, i.e., ΔU in Equation 5. n It is understandable that x k By adding the state parameters from the previous time step, the target state parameters of the fluid model at the specified time step can be obtained.

[0061] In some embodiments, the first coefficient matrix has the same number of rows as the first residual vector, and each row of the first coefficient matrix has one designated element on the main diagonal of the first coefficient matrix; the pre-processing operation on the first coefficient matrix and the first residual vector includes dividing each element in the first coefficient matrix by the designated element in the row where the element is located, and dividing each element in the first residual vector by the designated element in the corresponding row of the first coefficient matrix where the element is located.

[0062] In the present embodiment, the first coefficient matrix can be an n-order square matrix, the target state parameter of each grid cell to be solved can be an n x 1 column vector, and the first residual vector can also be an n x 1 column vector according to the linear relationship shown in formula 5 between the first residual vector and the first coefficient matrix and the target state parameter matrix to be solved.

[0063] In the present embodiment, each row of the first coefficient matrix can include one designated element on the main diagonal of the first coefficient matrix. The designated element can be used for pre-processing operation on the first coefficient matrix and the first residual vector. Specifically, for example, for an n-order square matrix A, the designated elements can include A11, A22,... Aij, (i = j).

[0064] In the present embodiment, the pre-processing operation includes dividing each element in the first coefficient matrix by the designated element in the row where the element is located, and the result forms the second coefficient matrix. Specifically, for example, for a first coefficient matrix The pre-processing operation on the first residual vector can be dividing the elements in the first row of the matrix by 1, dividing the elements in the second row by 3, and dividing the elements in the third row by 2, and the second residual vector can be

[0065] In the present embodiment, the pre-processing operation also includes dividing each element in the first residual vector by the designated element in the corresponding row of the first coefficient matrix where the element is located, and the result forms the second residual vector. Specifically, for example, for a first coefficient matrix and a first residual vector The pre-processing operation on the first residual vector can be dividing the elements in the first row of the matrix by 1, dividing the elements in the second row by 3, and dividing the elements in the third row by 2, and the second residual vector can be

[0066] In some embodiments, the second coefficient matrix has row index data representing row order; the probability distribution data constructed by the second coefficient matrix represents a probability distribution satisfied by the row index data; the probability distribution comprises: i = 1, 2,... m; wherein m represents the number of rows of the second coefficient matrix, represents the i-th row of the second coefficient matrix; i represents the row index data; A represents the second coefficient matrix.

[0067] In some cases, by taking the row index data representing row order as a random variable, a random probability distribution about the row index data is constructed according to the data in the second coefficient matrix, so that the random time of selecting a certain row in the second coefficient matrix can also conform to the probability distribution, and further, in the process of iteratively performing the orthogonal projection operation, the row data of the second coefficient matrix can be selected based on the random probability distribution, and the selected row data can be used to perform the orthogonal projection process to obtain the projection point of the initial value of the state change parameter on the hyperplane where the selected row of the second coefficient matrix is located.

[0068] In the present embodiment, the row index data can be used to represent the row order of the second coefficient matrix. The row index data can include multiple, and multiple row index data can correspond one-to-one to multiple rows in the second coefficient matrix. Specifically, the row index data can include a sequence composed of natural numbers {1, 2, 3... n}, wherein each row index data can correspond to the row of corresponding order in the second coefficient matrix. Specifically, for example, the row index data 1 corresponds to the first row of the second coefficient matrix, and the row index data k corresponds to the k-th row of the second coefficient matrix.

[0069] In some embodiments, the step of performing an orthogonal projection operation process on the initial value of the state variation parameter of the fluid model based on the second coefficient matrix, the second residual vector, and the probability distribution data constructed according to the second coefficient matrix until the obtained state variation parameter meets the specified accuracy condition, and taking the obtained state variation parameter as the target state variation parameter of the fluid model comprises: randomly selecting multiple rows of the second coefficient matrix according to the probability distribution data; wherein each selected row in the second coefficient matrix forms a group of row data with a corresponding row in the second residual vector; performing multiple orthogonal projection processes in parallel on the initial value of the state variation parameter of the fluid model and each group of row data to obtain a corresponding plurality of state variation parameters; taking the one with the smallest residual relative to the target state variation parameter among the plurality of state variation parameters as the initial value of the state parameter of the fluid model; and repeating the above steps multiple times, and taking the initial value of the state parameter of the fluid model that meets the specified accuracy condition as the target state variation parameter of the fluid model.

[0070] In some cases, by randomly selecting multiple rows of the second coefficient matrix, then performing orthogonal projection on the initial value of the state variation parameter of the fluid model based on the selected multiple rows, and taking the one with the fastest residual decline among the obtained multiple projection points as the next iteration point, and repeatedly performing until the accuracy condition is met, the target state variation parameter is output, which can make each iteration proceed in the direction of the fastest residual decline. In this way, compared with the classical iterative calculation method, for the same accuracy condition, the number of iterations required by the present embodiment can be reduced, and the time for outputting the iteration operation result can be reduced.

[0071] In the present embodiment, each selected row in the second coefficient matrix can form a group of row data with a corresponding row in the second residual vector. Specifically, for example, the second coefficient matrix is an n x n matrix, the second residual vector is an n x 1 vector, the 2nd row, the 5th row, and the 8th row of the second coefficient matrix are randomly selected according to the probability distribution, and then 3 groups of row data can be formed, wherein the 1st group of row data includes all elements of the 2nd row of the second coefficient matrix and one element of the 2nd row of the corresponding second residual vector. It can be understood that the other two groups of row data can also be obtained in the same way, and will not be described again.

[0072] In the present embodiment, the step of performing multiple orthogonal projection processes in parallel on the initial value of the state variation parameter of the fluid model and each group of row data to obtain a corresponding plurality of state variation parameters can comprise: for each group of row data, according to:

[0073]

[0074] Parallel computing obtains a plurality of corresponding state change quantity parameters; wherein, each group of row data includes selected rows in the second coefficient matrix and the corresponding row in the second residual vector x k+1 represents the state change quantity parameter corresponding to each group of row data, x k represents the initial value of the fluid model state change quantity parameter. Specifically, for example, the second coefficient matrix A is an n x n matrix, the second residual vector b is an n x 1 vector, the 2nd, 5th and 8th rows of the second coefficient matrix are randomly selected according to the probability distribution, then for the first group of row data, the element A2 of the 2nd row of the second coefficient matrix can be taken as the element b2 of the 2nd row of the second coefficient matrix b as Based on the initial value of the fluid model state change quantity parameter, the state change quantity parameter corresponding to this group of row data is calculated according to formula 6. It can be understood that the other two groups of row data can also be obtained in this way, and will not be repeated here.

[0075] In the present embodiment, by performing the state parameter generation method of the fluid model provided in the present specification, the first coefficient matrix and the first residual matrix are preprocessed, the condition number of the matrix is reduced, the convergence speed of the iterative operation is accelerated, the operation time is reduced, and in each iterative operation process, the orthogonal projection process is performed multiple times in parallel, and the residual of the fastest one of the multiple results obtained is taken as the output result of this iteration, which further reduces the time required for each iteration execution calculation, so as to improve the speed of generating the target state parameter by multiple iterations, and further improve the timeliness of analyzing and predicting the fluid motion behavior based on the target state parameter. In order to illustrate that the present embodiment has the above beneficial technical effects, the number of iterations and the time required by the state parameter generation method of the fluid model provided in the present embodiment are compared and tested based on the following test environment, and compared with the number of iterations and the time required by the classical iterative method to generate the target state parameter. The test results are shown in Table 1.

[0076] Test environment: WIN10 64-bit operating system, x64-based processor

[0077] CPU: 12-core memory RAM: 16G

[0078] Processor: Intel(R) Core(TM) i5-10500 CPU @ 3.10 GHz

[0079] OS: win10 Professional Edition

[0080] Accuracy condition: residual amount less than 1e-6

[0081] Test results:

[0082] Table 1

[0083]

[0084] As can be seen from the test results in Table 1, when using the classical iterative method to generate the target state parameters, a very large number of iterations is required and convergence is not achieved, which requires a long calculation time and the accuracy of the generated results is difficult to guarantee. Compared with the classical iterative method, the iterative method after the preprocessing operation in the present embodiment can effectively reduce the number of iterations and speed up the generation of the target state parameters. Using the target state parameter generation method provided in the present embodiment, the parallel orthogonal projection calculation process is added to each iteration calculation after the preprocessing operation, which further reduces the number of iterations. In the case of a small matrix dimension, the calculation time is also kept at a low level. With the increase of the matrix dimension, the calculation time can be further reduced compared with the iterative algorithm with only the preprocessing operation. In this way, using the present embodiment to generate the target state parameters of the fluid model at a specified time can reduce the number of iterations and the calculation time, improve the speed of generating the target parameters, and further improve the timeliness of the analysis or prediction based on the simulated fluid state to a certain extent.

[0085] Referring to Figure 2 One embodiment of the present specification provides a state parameter generation method of a fluid model. The fluid model is used to simulate the state change of the fluid over time, and the fluid model is divided into a plurality of grid units;

[0086] The state parameter generation method of the fluid model can include the following steps:

[0087] S210: Obtain the initial state parameters of the fluid model, the initial state parameters including the state parameters of the plurality of grid units at the initial time.

[0088] In the present embodiment, by obtaining the initial state parameters of the fluid model at the initial time, the first coefficient matrix and the first residual vector of each grid unit of the fluid model at a time after the initial time can be obtained based on the state parameters, and further, the state parameters of the fluid model at a time after the initial time can be generated according to the first coefficient matrix and the first residual vector.

[0089] S220: iteratively performing the state parameter generation method of the fluid model according to any one of the above embodiments on the initial state parameter as the state parameter of the previous time point of the specified time point in the state parameter generation method of the fluid model according to any one of the above embodiments in the time sequence of the plurality of specified time points, until the norm of the first residual vector meets the specified accuracy condition, to generate the target state parameter of the fluid model at the corresponding specified time point; the target state parameter is used to represent the stable state of the simulated fluid; wherein the specified accuracy condition includes: the value range of the norm of the first residual vector when the simulated fluid is in the stable state; in the process of iteratively performing the state parameter generation method of the fluid model according to any one of the above embodiments, the target state parameter obtained by performing the state parameter generation method of the fluid model according to any one of the above embodiments each time is used as the state parameter of the previous time point of the specified time point in the state parameter generation method of the fluid model according to any one of the above embodiments next time.

[0090] In some cases, the fluid model can simulate the process of the fluid moving to the stable state from the initial time state over time, and obtain the target state parameter of the fluid model when the fluid is in the stable state. According to the obtained initial state parameter of the fluid model, the state parameter generation method of the fluid model proposed in the embodiments of the present specification is used to obtain the state parameter at the first time point, and the state parameter at the first time point is used as the input again to obtain the state parameter at the second time point, and so on in the time sequence. When the first residual vector b n (U n ) approaches 0, it can be considered that the fluid is in the stable state, and the state parameter at the current time point, i.e., the state parameter at the n+1 time point, can be output to represent the stable state of the simulated fluid.

[0091] In the embodiments, the number of specified time points can be multiple, which are used to represent different time points, and the plurality of specified time points can form a time sequence, such as {0, 1, 2, 3... n}, in the time sequence. In the embodiments, the 0 time point can represent the initial time point, and the 1 time point can represent the first time point. It can be understood that the state parameter of the fluid model at the initial time point and the state parameter of the fluid model at the first time point satisfy A(U 0 )(U 1 -U 0 )=-b 0 (U 0 ), so that the fluid model obtains the state parameters of the plurality of grid cells at the initial time point, i.e., obtains U 0The first coefficient matrix and the first residual vector can be obtained accordingly. Further, according to the method for generating the state parameter of the fluid model, the target state parameter of the fluid model at the first time is generated. In this way, iteration can be continuously performed according to the time sequence of the plurality of specified times. When the accuracy condition of the iteration is met, the target state parameter of the corresponding time is output as the state parameter of the fluid model representing the stable state of the simulated fluid.

[0092] In the embodiment, the specified accuracy condition can be used as the stop condition of the iteration of the fluid model in the time sequence. Specifically, the specified accuracy can represent the degree to which the residual amount of each grid cell state parameter included in the first residual vector approaches 0. The smaller the residual amount, the smaller the change amount of the state parameter of the fluid model at the current time, and the closer the simulated fluid is to the stable state. The specified accuracy condition can include a value range to which the norm of the first residual vector conforms when the target state parameter represents that the simulated fluid is in the stable state. Specifically, for example, the specified accuracy condition can include that the norm of the first residual vector is less than a certain value. Of course, in some embodiments, the specified accuracy condition can also include a value range to which each element of the first residual vector conforms, for example, the accuracy condition can include that each element is less than a certain value. The specified accuracy condition can be specifically determined according to the problem requirements related to the fluid model. Specifically, for example, the accuracy condition can be set to that the norm of the first residual vector is less than 1e-6, or the norm of the first residual vector is less than 1e-4.

[0093] In some embodiments, the state parameter of the fluid model represents the physical state of the simulated fluid, and the physical state includes at least one of physical quantities such as density, velocity, pressure, and temperature.

[0094] In some cases, the physical quantities of the simulated fluid in the motion process can be used to measure the physical state of the simulated fluid. Specifically, for example, the state parameters of the fluid model at each time can form a state parameter vector, and the elements in the vector can include a set of numerical values of the physical quantities of each grid cell of the fluid model at the current time, to represent the physical state of the simulated fluid at the current time. Specifically, for example, the fluid model is divided into N grid cells, and the physical state to be solved is one, then the first coefficient matrix at a certain time is an N*N matrix, where the number of rows N represents the number of grid cells, and the elements of each row can represent the physical quantity at the grid cell node. The first residual vector is an N*1 column vector, and the state parameter vector formed by the target state parameters at this time is an N*1 column vector, which can represent the physical state of the simulated fluid at this time. For another example, when the physical state to be solved is 4, then the first coefficient matrix at a certain time is a 4N*4N matrix, the first residual vector is a 4N*1 column vector, and the state parameter vector formed by the target state parameters at this time is a 4N*1 column vector, to represent the physical state of the simulated fluid at this time.

[0095] In the embodiment, the physical quantities can include unknown quantities such as density, velocity, temperature, etc. in the mass equation, momentum equation, and energy equation, wherein the velocity can include velocity components u and v in two directions in two dimensions, or velocity components u, v, and w in three directions in three dimensions. In some embodiments, the physical quantities can also include other unknown quantities, such as pressure, etc.

[0096] Please refer to Figure 3 One embodiment of the present specification also provides a state parameter generation device of a fluid model. The fluid model is used to simulate the state change of the fluid over time, and the fluid model is divided into a plurality of grid cells. The state parameter generation device of the fluid model can include:

[0097] The acquisition module is configured to acquire a first coefficient matrix and a first residual vector of the fluid model. The first coefficient matrix includes a set of coefficients obtained based on the state parameters of the plurality of grid cells at a previous time of a specified time. The first residual vector includes a set of residual quantities obtained based on the state parameters of the plurality of grid cells at the previous time of the specified time.

[0098] The preprocessing module is configured to perform a specified preprocessing operation on the first coefficient matrix and the first residual vector to obtain a second coefficient matrix and a second residual vector. The specified preprocessing operation is used to reduce the condition number of the matrix.

[0099] An iteration module is configured to perform an orthogonal projection operation process on an initial value of a state variation parameter of the fluid model based on the second coefficient matrix, the second residual vector, and probability distribution data constructed according to the second coefficient matrix, until a state variation parameter obtained in the orthogonal projection operation process meets a specified accuracy condition, and the state variation parameter obtained is taken as a target state variation parameter of the fluid model; in the orthogonal projection operation process, a state variation parameter corresponding to a minimum residual between the target state variation parameter and a plurality of state variation parameters obtained by performing a plurality of orthogonal projection processes in parallel is taken as a state variation parameter output by each orthogonal projection operation process; and the target state variation parameter represents a difference between a target state parameter of the fluid model at a specified time and a state parameter of the fluid model at a time before the specified time.

[0100] A generation module is configured to generate the target state parameter of the fluid model at the specified time according to the target state variation parameter.

[0101] The specific functions and effects of the state parameter generation apparatus for the fluid model can be explained in detail with reference to other embodiments of the present specification, and will not be described herein. Each module in the state parameter generation apparatus for the fluid model can be implemented in whole or in part by software, hardware, or a combination thereof. The modules can be embedded in or independent of a processor in a computer device in hardware form, or stored in a memory in a computer device in software form, so as to be called and executed by a processor to perform operations corresponding to each module.

[0102] Please refer to Figure 4 The embodiments of the present specification also provide a computer device including a memory and a processor, and the memory stores a computer program. The processor implements the state parameter generation method for the fluid model in any of the above embodiments when executing the computer program. The device can include a processor, a non-volatile storage medium, an internal memory, a communication interface, a display device, and an input device connected by a system bus. The non-volatile storage medium can store an operating system and related computer program instructions.

[0103] The embodiments of the present specification also provide a computer-readable storage medium having a computer program stored thereon, and the computer program is executed by a computer to cause the computer to execute the state parameter generation method for the fluid model in any of the above embodiments.

[0104] The embodiments of the present specification also provide a computer program product including instructions, and the instructions are executed by a computer to cause the computer to execute the state parameter generation method for the fluid model in any of the above embodiments.

[0105] It can be understood that the specific examples herein are only to help those skilled in the art better understand the embodiments of the present specification, and not to limit the scope of the present application.

[0106] It can be understood that in various embodiments of the present specification, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present specification.

[0107] It can be understood that the various embodiments described in the present specification can be implemented alone or in combination, and the embodiments of the present specification do not limit this.

[0108] Unless otherwise specified, all technical and scientific terms used in the embodiments of the present specification have the same meanings as those commonly understood by those skilled in the art of the present specification. The terms used in the present specification are only for the purpose of describing the specific embodiments and are not intended to limit the scope of the present specification. The term "and / or" used in the present specification includes any and all combinations of one or more of the related listed terms. The singular forms "a", "an" and "the" used in the embodiments of the present specification and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise.

[0109] It can be understood that the processor of the embodiments of the present specification can be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method embodiments can be completed by the integrated logic circuit of hardware or the instruction in the form of software in the processor. The processor described above can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The disclosed methods, steps and logic block diagrams in the embodiments of the present specification can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor or the like. The steps of the method disclosed in combination with the embodiments of the present specification can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the above method.

[0110] It is appreciated that the memory in the embodiments of the present specification can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Among them, the nonvolatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM). It should be noted that the memory of the system and method described herein is intended to include, but not limited to, these and any other suitable types of memory.

[0111] Those skilled in the art can appreciate that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present specification.

[0112] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0113] In several embodiments provided in the present specification, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0114] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, i.e., they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the present embodiment.

[0115] In addition, each functional unit in each embodiment of the present specification can be integrated in one processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit.

[0116] If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present specification or the parts of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present specification. The foregoing storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0117] The above is only a specific embodiment of the present specification, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present specification, which should be covered within the protection scope of the present specification. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method of generating a state parameter of a fluid model, characterized by, The fluid model is used to simulate the state change of fluid over time, and the fluid model is divided into a plurality of grid units; the state parameter of the fluid model represents the physical state of the simulated fluid; The physical state includes at least one of density, velocity, pressure and temperature; the method comprises: Obtaining a first coefficient matrix and a first residual vector of the fluid model; wherein the first coefficient matrix includes a coefficient set obtained based on the state parameters of the plurality of grid units at a previous time of a specified time; the first residual vector includes a residual amount set obtained based on the state parameters of the plurality of grid units at the previous time of the specified time; Performing a specified pre-processing operation on the first coefficient matrix and the first residual vector to obtain a second coefficient matrix and a second residual vector; wherein the specified pre-processing operation is used to reduce the condition number of the matrix; Based on the second coefficient matrix, the second residual vector, and the probability distribution data constructed according to the second coefficient matrix, orthogonal projection operation process is performed on the initial value of the state change parameter of the fluid model state change parameter until the obtained state change parameter meets the specified precision condition, and the obtained state change parameter is used as the target state change parameter of the fluid model; wherein in the orthogonal projection operation process, the one with the minimum residual between the target state change parameter and the corresponding plurality of state change parameters obtained by performing the orthogonal projection process multiple times in parallel is used as the state change parameter output by each orthogonal projection operation process; the target state change parameter represents the difference between the target state parameter of the fluid model at a specified time and the state parameter of the fluid model at a time before the specified time; Generating the target state parameter of the fluid model at the specified time according to the target state change parameter.

2. The method of claim 1, wherein, The number of rows of the first coefficient matrix is the same as the number of rows of the first residual vector, and a plurality of rows included in the first coefficient matrix correspond one by one to a plurality of rows included in the first residual vector; each row of the first coefficient matrix includes a specified element located on the main diagonal of the first coefficient matrix; The step of performing a pre-processing operation on the first coefficient matrix and the first residual vector to obtain a second coefficient matrix and a second residual vector comprises: Dividing each element in the first coefficient matrix by the specified element in the row where the element is located to form the second coefficient matrix; Dividing each element in the first residual vector by the specified element in the corresponding row of the first coefficient matrix corresponding to the row where the element is located to form the second residual vector.

3. The method of claim 2, wherein, The second coefficient matrix has row index data representing the row order; the probability distribution data constructed by the second coefficient matrix represents the probability distribution satisfied by the row index data; The probability distribution comprises: , ; wherein m represents a number of rows of the second coefficient matrix, represents an i-th row of the second coefficient matrix, i represents the row index data, and A represents the second coefficient matrix.

4. The method of claim 3, wherein, The step of performing an orthogonal projection operation process on the initial value of the state change parameter of the fluid model based on the second coefficient matrix, the second residual vector, and the probability distribution data constructed according to the second coefficient matrix until the state change parameter obtained meets a specified accuracy condition, and taking the state change parameter as the target state change parameter of the fluid model comprises: randomly selecting multiple rows of the second coefficient matrix according to the probability distribution data; wherein each selected row of the second coefficient matrix forms a group of row data with a corresponding row of the second residual vector; performing multiple orthogonal projection processes in parallel on the initial value of the state change parameter of the fluid model and each group of row data to obtain a corresponding multiple state change parameters; taking the state change parameter with the smallest residual relative to the target state change parameter from the multiple state change parameters as the initial value of the state parameter of the fluid model, and repeating the above steps multiple times, and taking the initial value of the state parameter of the fluid model as the target state change parameter of the fluid model when the initial value of the state parameter of the fluid model meets the specified accuracy condition.

5. The method of claim 4, wherein, The step of performing multiple orthogonal projection processes in parallel on the initial value of the state change parameter of the fluid model and each group of row data to obtain a corresponding multiple state change parameters comprises: According to each group of row data, a plurality of state change parameters corresponding to the plurality of groups of row data are calculated in parallel, wherein each group of row data comprises a selected row in the second coefficient matrix and a corresponding row in the second residual vector ; ; denotes a state change parameter corresponding to each group of row data, denotes an initial value of the state change parameter of the fluid model.

6. A method of generating state parameters of a fluid model, characterized by, The fluid model is used to simulate the state change of the fluid over time, and the fluid model is divided into multiple grid cells; the state parameter of the fluid model represents the physical state of the simulated fluid; The physical state includes at least one of density, velocity, pressure, and temperature; the method comprises: obtaining the initial state parameter of the fluid model, the initial state parameter including the state parameter of the multiple grid cells at an initial time; iteratively performing the method of claim 1 on the initial state parameter as the state parameter of the previous time of the specified time in the method of claim 1 according to the time sequence of multiple specified times until the norm of the first residual vector meets the specified accuracy condition to generate the target state parameter of the fluid model at the corresponding specified time; the target state parameter is used to represent the stable state of the simulated fluid; wherein the specified accuracy condition includes: when the target state parameter is used to represent the simulated fluid in a stable state, the norm of the first residual vector meets a value range; in the process of iteratively performing the method of claim 1, the target state parameter obtained by performing the method of claim 1 each time is taken as the state parameter of the previous time of the specified time in the next execution of the method of claim 1.

7. An apparatus for generating a state parameter of a fluid model, characterized by The fluid model is used to simulate the state change of the fluid over time, and the fluid model is divided into multiple grid cells; the state parameter of the fluid model represents the physical state of the simulated fluid; The physical state includes at least one of density, velocity, pressure, and temperature; the device comprises: An acquisition module is configured to acquire a first coefficient matrix and a first residual vector of the fluid model; the first coefficient matrix comprises a coefficient set obtained based on state parameters of the plurality of grid cells at a previous moment of a specified moment; the first residual vector comprises a residual amount set obtained based on state parameters of the plurality of grid cells at the previous moment of the specified moment; A preprocessing module is configured to perform a specified preprocessing operation on the first coefficient matrix and the first residual vector to obtain a second coefficient matrix and a second residual vector; the specified preprocessing operation is configured to reduce a matrix condition number; An iteration module is configured to perform an orthogonal projection operation process on an initial value of a state variation parameter of the fluid model based on the second coefficient matrix, the second residual vector, and probability distribution data constructed according to the second coefficient matrix, until a state variation parameter obtained in the orthogonal projection operation process meets a specified precision condition, and the state variation parameter is taken as a target state variation parameter of the fluid model; in the orthogonal projection operation process, a state variation parameter corresponding to a minimum residual between the target state variation parameter and a plurality of state variation parameters obtained by performing a plurality of orthogonal projection processes in parallel is taken as a state variation parameter output by each orthogonal projection operation process; the target state variation parameter represents a difference between a target state parameter of the fluid model at the specified moment and a state parameter of the fluid model at a previous moment of the specified moment; A generation module is configured to generate the target state parameter of the fluid model at the specified moment according to the target state variation parameter.

8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor executes the computer program to implement the method in any one of claims 1 to 6.

9. A computer-readable storage medium having stored thereon computer program instructions, wherein, The computer program instructions are executed by the processor to implement the method in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Power grid state estimation method of GPU parallel acceleration preprocessing conjugate gradient iteration method

    CN111695080A

  • Computational fluid dynamics simulation method and device based on quantum algorithm, and equipment

    CN114091363A