Fluid model state parameter generation method and device, equipment and storage medium
By preprocessing and orthogonal projection operations on the first coefficient matrix and residual vector of the fluid model, the problem of long generation of the fluid model state parameters is solved, and faster fluid state data analysis and prediction are achieved.
Patent Information
- Application Number
- CN202311068405.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-22
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2043-08-22
AI Technical Summary
In the prior art, the calculation and generation of fluid model state parameters involves a large number of grid units, resulting in a long time, which affects the timeliness of prediction of fluid state data for related problems.
By obtaining the first coefficient matrix and the first residual vector of the fluid model, a specified preprocessing operation is performed to reduce the number of matrix conditions, and then, based on the second coefficient matrix and the second residual vector, combined with the probability distribution data, an orthogonal projection operation is performed iteratively to reduce the number of iterations to improve the calculation efficiency.
This method can significantly reduce the time to generate fluid model state parameters and improve the timeliness of fluid state data analysis and prediction.
Smart Images

Figure CN119514394A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification relate to the field of fluid simulation, and specifically to a method, device, equipment and storage medium for generating state parameters of a fluid model. Background Art
[0002] By simulating the state changes of fluids under various complex situations, we can better understand the complex physical phenomena from fluid dynamics and thermodynamics, so as to predict the movement and change process of fluids in various application scenarios such as engineering, manufacturing, climate, energy, etc., and then provide data support for related product development, risk assessment and other activities.
[0003] At present, the simulation of fluid state is mainly based on computer simulation technology. By constructing a fluid model and dividing it into discrete grid units, calculations are then performed based on the problems and needs in the actual application scenarios, and the relevant state parameters of the fluid model are generated to represent the state of the simulated fluid.
[0004] However, in the related art, the calculation and generation of fluid model state parameters involve a large number of grid units and therefore take a long time, which to some extent affects the timeliness of predicting related issues based on simulated fluid state data. Summary of the invention
[0005] In view of this, multiple embodiments of the present specification are dedicated to providing a method, device, equipment and storage medium for generating state parameters of a fluid model, which can reduce the time for calculating and generating the state parameters of the fluid model, so as to improve the timeliness of analysis and prediction of related issues based on simulated fluid state data to a certain extent.
[0006] One embodiment of the present specification provides a method for generating state parameters of a fluid model, wherein 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; the method comprises: obtaining a first coefficient matrix and a first residual vector of the fluid model; wherein the first coefficient matrix comprises a set of coefficients obtained based on the state parameters of the plurality of grid units at a moment before a specified moment; the first residual vector comprises a set of residual quantities obtained based on the state parameters of the plurality of grid units at a moment before a specified moment; 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; wherein the specified preprocessing operation is used to reduce the matrix condition number; based on the second coefficient matrix and the second residual vector Quantity, and probability distribution data constructed according to the second coefficient matrix, the initial value of the state change parameter of the fluid model is iteratively performed with an orthogonal projection operation process until the obtained state change parameter meets the specified accuracy condition, and the obtained state change parameter is used as the target state change parameter; wherein, in the orthogonal projection operation process, the one with the smallest residual between the corresponding multiple state change parameters obtained by executing multiple orthogonal projection processes in parallel and the target state change parameter 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; according to the target state change parameter, the target state parameter of the fluid model at the specified time is generated.
[0007] One embodiment of the present specification provides a state parameter generation method for a fluid model, wherein the fluid model is used to simulate the state change of a fluid over time, and the fluid model is divided into a plurality of grid units; the method comprises: obtaining initial state parameters of the fluid model, wherein the initial state parameters comprise state parameters of the plurality of grid units at an initial moment; using the initial state parameters as the state parameters of the moment before the specified moment in the state parameter generation method for the fluid model provided in the above embodiment, iteratively executing the state parameter generation method for the fluid model provided in the above embodiment in the time sequence of the plurality of specified moments until the modulus of the first residual vector meets a specified precision condition, so as to generate a target state parameter of the fluid model at the corresponding specified moment; the target state parameter is used to represent the stable state of the simulated fluid; wherein the specified precision condition comprises: the target state parameter is used to represent the value range of the modulus of the first residual vector when the simulated fluid is in a stable state; during the iterative execution of the state parameter generation method for the fluid model provided in the above embodiment, using the target state parameter obtained each time the state parameter generation method for the fluid model provided in the above embodiment is executed as the state parameter of the moment before the specified moment in the next execution of the state parameter generation method for the fluid model provided in the above embodiment.
[0008] One embodiment of the present specification provides a state parameter generation device for a fluid model, wherein 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; the device comprises: an acquisition module, used to acquire a first coefficient matrix and a first residual vector of the fluid model; wherein the first coefficient matrix comprises a set of coefficients obtained based on the state parameters of the plurality of grid units at a moment before a specified moment; the first residual vector comprises a set of residual quantities obtained based on the state parameters of the plurality of grid units at a moment before a specified moment; a preprocessing module, performing a specified preprocessing operation on the first coefficient matrix and the first residual vector to obtain a first residual vector; two coefficient matrices and a second residual vector; wherein the specified preprocessing operation is used to reduce the matrix condition number; an iteration module, used to iteratively perform an orthogonal projection operation process on the initial values of the state parameters 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 parameters meet the specified accuracy conditions, and the obtained state parameters are used as the target state parameters of the fluid model at the specified time; wherein, during the orthogonal projection operation process, the one with the smallest residual between the corresponding multiple state parameters obtained by executing multiple orthogonal projection processes in parallel and the target state parameter is used as the state parameter output by each orthogonal projection operation process.
[0009] The embodiments of this specification provide a device including 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 this specification provide a computer-readable storage medium having computer program instructions stored thereon. When the program is executed by a processor, the method described in the above embodiments is implemented.
[0011] The multiple implementation methods provided in this specification obtain the first coefficient matrix and the first residual vector of the multiple grid units at the specified time based on the state parameters of the multiple grid units of the fluid model at the time before the specified time, and then obtain the second coefficient matrix and the second residual vector after performing a specified preprocessing operation that can reduce the matrix condition number on the first coefficient matrix and the first residual vector, and then perform an orthogonal projection operation on the initial value iteration 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, and in each operation, the one with the smallest residual between the multiple state change parameters obtained by the parallel multiple orthogonal projection processes and the target state change parameter is used as the state change parameter output by each orthogonal projection operation process, and then the next operation is performed. When the state change parameter obtained by the iterative operation meets the specified accuracy condition, it is used 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 during each iterative operation, and taking the one with the fastest residual decrease among the multiple state parameters obtained as the output of each iterative operation process to update the input of the next iterative operation, the number of required iterative operations is reduced, and the time for generating target state parameters can be reduced, which can improve the timeliness of analysis or prediction based on simulated fluid states to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A schematic diagram of a method for generating state parameters of a fluid model provided in accordance with one embodiment of the present specification.
[0013] Figure 2 A schematic diagram of a method for generating state parameters of a fluid model provided in another embodiment of the present specification.
[0014] Figure 3 A schematic diagram of a device for generating state parameters of a fluid model provided in accordance with one embodiment of the present specification.
[0015] Figure 4 A schematic diagram of a computer device provided for one embodiment of the present specification. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0017] In the description of the embodiments of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" may 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 clearly and specifically defined.
[0018] The simulation of fluid state plays a very important role in engineering, manufacturing, climate forecasting, urban planning, energy development and other fields. By simulating the state change process of fluid in different problem scenarios, it can help developers or researchers better understand the complex physical phenomena and their interactions from fluid dynamics and thermodynamics, such as heat transfer, flow field changes, etc., and then predict the behavior of fluid in these problem scenarios, and provide support and assistance for related product development, risk analysis and evaluation activities. For example, through fluid state simulation, the movement state of products under different stress, temperature and other environments can be analyzed and predicted, so as to better design, evaluate and optimize large-scale transportation products such as ships and aircraft; for example, through fluid state simulation, data support can be provided for research on climate change, sea-air interaction and other aspects, and thus provide a basis for predicting weather and climate change.
[0019] At present, the simulation of fluid state is usually based on computer simulation technology, which is achieved by constructing a fluid model and dividing it into discrete grid units, 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 fluids.
[0020] In the process of simulating fluid motion by computer technology, for example, in the process of using CFD simulation, it is necessary to calculate the state parameters of the constructed fluid model at all times from the initial state to the stable state. The state parameters at each moment need to be calculated based on the linear relationship between the coefficient matrix and residual matrix of each grid unit obtained based on the state parameters of the previous moment and the state parameters of the moment. It can be seen that when the scale of the divided grid units is large, the calculation of the state parameters at each moment will be more complicated. In the related art, some classic iterative methods are usually used to calculate and generate the state parameters at each moment. However, when the scale of the grid units is large, the number of iterative calculations required is large, and the time required to generate the state parameters of the fluid model is long, which to a certain extent affects the timeliness of analysis or prediction based on the simulated fluid state.
[0021] Therefore, it is necessary to provide a method for generating state parameters of a fluid model. The first coefficient matrix and the first residual vector of the multiple grid units at a specified time can be obtained based on the state parameters of the multiple grid units of the fluid model at the moment before the specified time. Then, after performing a specified preprocessing operation that can reduce the matrix condition number on the first coefficient matrix and the first residual vector, a second coefficient matrix and a second residual vector are obtained. Then, based on the second coefficient matrix, the second residual vector, and the probability distribution data constructed according to the second coefficient matrix, an orthogonal projection operation is performed on the initial value iteration of the state change parameter of the fluid model. In each operation, the state change parameter obtained by the parallel multiple orthogonal projection processes, the one with the smallest residual with the target state change parameter, is used as the state change parameter output by each orthogonal projection operation process. Then, the next operation is performed. When the state change parameter obtained by the iterative operation meets the specified accuracy condition, it is used as the target state change 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 change parameter and the target state parameter at the specified time. By performing multiple orthogonal projections in parallel during each iterative operation, and taking the one with the fastest residual decrease among the multiple state parameters obtained as the output of each iterative operation process to update the input of the next iterative operation, the number of required iterative operations is reduced, thereby reducing the time for generating target state parameters, and to a certain extent improving the timeliness of analysis or prediction based on simulated fluid states.
[0022] See also Figure 1 One embodiment of the present specification provides a method for generating state parameters of a fluid model. The fluid model is used to simulate the state change of a fluid over time, and the fluid model is divided into a plurality of grid units.
[0023] Fluid models can be used to simulate the motion behavior of fluids in different scenarios. Fluid models can reflect the motion laws and behavior characteristics of fluids by simulating the state changes of fluids over time. Fluid models can be mathematical models used to describe the motion behavior of fluids. Fluid models can choose appropriate definitions and abstract methods according to the nature of the problem requirements and solutions. Different models can include different assumptions and conditions. For example, different fluid models are used in fields such as ocean, atmosphere, and hydrology 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 obtain relevant state parameters such as temperature, velocity, and pressure of the fluid by solving them, so as 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 states, the CFD solver needs to integrate the partial derivative equations over time, so it is necessary to iterate using 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 moment. The state parameters may include physical quantities used to describe the state of the simulated fluid. Specifically, for example, the state parameters may include physical quantities such as density, temperature, pressure, velocity, and energy.
[0025] The grid unit can be obtained by dividing the fluid model according to the movement area of the simulated fluid. The grid unit can be understood as a discrete representation of the spatial continuous domain of the fluid problem to be solved. Each spatial point can be considered as a node, and a grid unit can be defined by the volume bounded by a group of adjacent nodes. The division of the grid unit can be selected according to the specific division method of the problem. Specifically, for example, the grid unit can be divided based on the finite volume method (FVM), or other methods such as the adaptive grid division method can be used to divide the grid unit.
[0026] In the FVM method, the numerical grid can be divided into multiple grid cells, the local volume associated with each grid cell is considered, and the integral conservation law is applied. This law states that the changes in all variables of the fluid within the volume depend only on the flux F on its surface S. FVM can satisfy the conservation properties of the fluid mechanics equations. The conservation equation can be written as follows:
[0027]
[0028] After the spatial continuous domain is discretized by the divided grid cells, the mathematical operators of the equations to be solved also need to be discretized. 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 space schemes. The time integration scheme can be a time-integrated model of the variables to be solved starting from the initial state of the fluid, while the space scheme can represent the spatial gradients of these variables to be solved.
[0029] Furthermore, based on the above discretization numerical scheme and solution, the numerical grid of space can be solved. In the discretization representation of formula 1, the differential operation is replaced by numerical approximation, and the implicit Euler format is selected to handle the time differential. Formula 1 is discretized into the following expression:
[0030]
[0031] Among them, U n represents the fluid state of all grid cells at the nth moment (i.e., the nth integration), U n = {U i},i=0,1,2...,N-1,U i =(ρ,ρu,ρv,E) i , U i represents the fluid state of the i-th grid unit, ρ represents the fluid density, u and v represent the two components of the fluid velocity in two-dimensional coordinates, E represents the total energy per unit mass of the fluid, and b n+1 (U n+1 ) represents the residual at the n+1th moment, and it is n Related functions.
[0032] Let ΔU n =U n+1 -U n ,So:
[0033]
[0034] Substituting Formula 3 into Formula 2 yields:
[0035]
[0036] Among them, δ i,i' δ j,j' Represents parameters related to the coordinate information of the grid cells.
[0037] make Then formula 4 can be equivalent to the following form:
[0038] A(U n )ΔU n =-b n (Un )......Formula 5
[0039] Among them, A(U n ) represents the coefficient matrix at the nth moment, that is, the Jacobian matrix at the nth moment, and the coefficient matrix is n Related functions, b n (U n ) represents the residual at the nth moment. In this way, in order to calculate the state parameters of the simulated fluid when it is in a stable state, it can be transformed into a linear system A(U n )ΔU n =-b n (U n ) is an iterative calculation problem. When N grid units are divided and there is only one physical state to be solved, A(U n ) can be an N×N matrix, ΔU n It can be an N×1 column vector. When N grid cells are divided and there are 4 physical states to be solved, A(U n ) can be a 4N×4N matrix, ΔU n It 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 physical states to be solved, the larger the scale of the above linear system. Specifically, in the calculation process, based on the initial state parameters U of each grid unit obtained 0 , calculate A 0 and b 0 , then we can calculate U 1 , then based on U 1 Calculate U 2 , continue iterative calculation, when b n (U n ) approaches 0, it means that the modulus of the state fluctuation vector formed by the difference between the state parameters of the simulated fluid at the n+1th moment and the nth moment tends to the preset accuracy. The preset accuracy can be a value close to 0, such as 1e-4, 1e-6, etc. At this time, the state parameters at the n+1th moment can be used to represent the stable state of the simulated fluid.
[0040] It can be seen that in the process of solving a linear system with 4 physical states to be solved, each iterative solution process needs to solve a linear equation group with a dimension of 4N×4N. For a solution process, some classic methods are usually used for iterative calculation and solution. When this type of method is iterated, generally speaking, the number of iterations will increase with the increase of the dimension of the linear system. However, in some cases, the grid unit scale of the fluid model is relatively large. Correspondingly, it is very complicated to use this type of method for iterative calculation, the number of iterations is large, and the time required is long, which affects the timeliness of generating state parameters. The implementation method of this specification performs multiple orthogonal projections in parallel during each iterative operation process, and uses the one with the fastest residual decrease among the multiple state change parameters obtained as the output of each iterative operation process, so as to update the input of the next iterative operation. In this way, the number of iterative operations required in the solution process can be reduced, thereby reducing the time to generate the target state parameters, and thus improving the timeliness of analysis or prediction based on the simulated fluid state.
[0041] In this embodiment, the method for generating state parameters of the fluid model may include the following steps.
[0042] Step S110: Obtain a first coefficient matrix and a first residual vector of the fluid model; wherein the first coefficient matrix includes a set of coefficients obtained based on the state parameters of the multiple grid units at a previous moment in time; and the first residual vector includes a set of residual quantities obtained based on the state parameters of the multiple grid units at a previous moment in time.
[0043] In this embodiment, the first coefficient matrix of the fluid model can be understood as A(U n ), the first coefficient matrix can represent the state parameters of each grid unit at the nth moment (i.e., U in Formula 5 n ) The Jacobian matrix associated with it can be calculated based on U n With grid coordinate information according to The first residual vector of the fluid model can be understood as b in Formula 5 n (U n ), the first residual vector can represent a set of residual quantities related to the state parameters of each grid unit at the nth moment, and can be calculated according to the functional relationship between the residual quantity and the state parameters of each grid unit at the nth moment. By obtaining the first coefficient matrix and the first residual vector of the fluid model, the first coefficient matrix and the first residual vector can be used as known quantities, and the state parameters of the fluid model at the n+1th moment can be calculated according to Formula 5.
[0044] In this embodiment, the designated moment can be used as a time reference for obtaining the first coefficient matrix and the first residual vector of the fluid model, and can further be used as a time reference for generating the target state parameters of the fluid model. Specifically, in order to simulate the state change of the fluid, in the time integration scheme, the moment when the fluid is in the initial state can be used as the initial moment, and integral modeling can be performed from the initial moment. According to the above derivation, for the state parameters at each moment, the equation shown in Formula 5 can be satisfied. In this way, starting from the initial moment, in chronological order to the n+1 moment, each moment in between can be used as a designated moment, that is, as the time reference for the method for generating the state parameters of the fluid model. For example, the designated moment can include the initial moment, or the moment after the initial moment, and of course, it can also include the nth moment, or the n+1th moment.
[0045] In this embodiment, the first coefficient matrix and the first residual vector are obtained, and the result calculated by the fluid model based on the state parameters at the moment before the specified moment can be directly obtained, so as to solve the target state parameters at the specified moment according to Formula 5. Specifically, for example, if the specified moment is moment n, the first coefficient matrix and the first residual vector results calculated based on the functional relationship satisfied by the state parameters at moment n-1 and the first coefficient matrix and the first residual vector respectively can be directly obtained, so as to solve the target state parameters at moment n according to Formula 5.
[0046] In some embodiments, the first coefficient matrix and the first residual vector may be obtained by receiving data about the first coefficient matrix and the first residual vector sent by other applications or devices, or by a user inputting a calculation result into a model. This specification does not specifically limit the method for obtaining the first coefficient matrix and the first residual vector.
[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 matrix condition number.
[0048] In some cases, since the grid unit is usually large in scale, it can be understood that the linear equation system composed of the first coefficient matrix and the first residual vector as shown in Formula 5 is also large in scale. In order to solve the target state parameters, when performing iterative calculations on such a large-scale linear equation system, the matrix condition number may be large, which may affect the accuracy and stability of the calculation, thereby increasing the number of iterations required and reducing the time required to solve the target state parameters. By performing a specified preprocessing operation on the first coefficient matrix and the first residual vector to reduce the matrix condition number, and then performing iterative calculations based on the second coefficient matrix and the second residual vector obtained after preprocessing, the influence of errors or disturbances on the solution results can be reduced during the calculation, and the calculation accuracy and stability can be improved, thereby reducing the number of iterations to increase the speed of generating the target state parameters.
[0049] In this embodiment, the specified preprocessing operation can be used to reduce the matrix condition number to improve the accuracy and stability of calculating the linear equation system. The specified preprocessing operation can include dividing each row of the first coefficient matrix and the first residual vector by the main diagonal elements in the first coefficient matrix.
[0050] In some implementations, the specified preprocessing operation may also include using a matrix preprocessing method such as a matrix decomposition method, by converting the original matrix into a preprocessing 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, an orthogonal projection operation process is performed on the initial value of the state change parameter of the fluid model until the obtained state change parameter meets the specified accuracy condition, and the obtained state change parameter is used as the target state change parameter; wherein, during the orthogonal projection operation process, the one with the smallest residual between the corresponding multiple state change parameters obtained by executing multiple orthogonal projection processes in parallel and the target state change parameter 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.
[0052] In some cases, for calculating large-scale linear equations such as those shown in Formula 5, some classic iterative methods are usually used for direct calculation. When the grid unit scale is large, such calculation methods require more iterations, which not only takes a long time to calculate, but may also be limited by storage and computing resources, resulting in a slow speed of solving the target state parameters, affecting the timeliness of subsequent analysis and prediction activities. By performing multiple orthogonal projection operations in parallel in each iterative operation process to obtain multiple results, and then using the one closest to the target state change parameter as the state parameter output of this iterative operation as the input of the next iterative operation process, each iterative process can update the next input in the direction where the residual decreases fastest. In this way, compared with the classic iterative method, it can have fewer iterations under the same convergence conditions, thereby reducing the time required for calculation and improving the speed of generating target state parameters.
[0053] In this embodiment, the probability distribution data of the random event of selecting a row of the matrix can be constructed according to the second coefficient matrix, and the probability distribution data is used to represent the probability distribution of the occurrence of this 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 to serve as the calculation basis for performing the corresponding multiple orthogonal projection processes in parallel. 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 with the corresponding probability satisfied by 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 a probability distribution can be constructed together with the probability value corresponding to each random variable, and each probability value represents the probability that the corresponding row of the second coefficient matrix corresponding to each row index data is randomly selected. In some embodiments, the probability distribution data can also be constructed with some other forms of data that can establish a one-to-one correspondence with each row of the second coefficient matrix as a random variable.
[0054] In this 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 as a target state change parameter, which can be based on the target state parameter U at a specified time. n+1 The state parameter U at the moment before the specified time nIt can be understood that the target state variation parameter may include a difference set between each state parameter of each grid unit at time n+1 and each corresponding state parameter at time n, and the difference set may form an n×1 vector.
[0055] In this embodiment, the initial value of the state change parameter of the fluid model can be used as the object of orthogonal projection to perform the orthogonal projection process. Furthermore, the initial value of the state change parameter of the fluid model can also be used as the input of each iteration process of the orthogonal projection operation, and is used to perform multiple iterations to obtain the target state change parameter. In this embodiment, in the first iteration of the orthogonal projection operation iterative process, the initial value of the state change parameter of the fluid model can be a preset initial value. Specifically, the initial value of the state change parameter can be preset according to the needs of the simulated fluid in a specific practical problem scenario, or the initial value of the state change parameter can be directly set to 0.
[0056] In this embodiment, the state change parameter obtained by executing the orthogonal projection operation process each time can be used as the result of each iterative operation output, and further as the input of the next iterative operation. Specifically, for example, the initial value of the state change parameter is x0. It can be understood that x0 can be the preset initial value of the state change parameter of the fluid model in the first iterative operation process. After executing an iterative process of orthogonal projection, a projection point x1 of x0 can be obtained, and then the next iterative process of orthogonal projection is executed with x1 as the projected object, and iterates in sequence until the cutoff condition is reached.
[0057] In this embodiment, the specified accuracy condition can be used as a cutoff condition for executing the iterative process of orthogonal projection operation. Specifically, when the state change parameter output after executing multiple iterative operation processes reaches the specified accuracy condition, the iterative process is stopped, and the state parameter output by this operation is used as the target state change parameter output in the final output. Specifically, the value range of the modulus of the residual vector of the state change parameter output by each iterative operation and the target state change parameter can be used as the specified accuracy condition. For example, the state change parameter output by each iterative process and the target state change parameter can be a vector of n×1, and the specified accuracy condition can be that the modulus of the residual vector of the two is less than a value close to 0, for example, the value can be 1e-4 or 1e-6.
[0058] In this embodiment, each orthogonal projection operation process can be used to project the initial value of the state change parameter of the fluid model to the hyperplanes corresponding to the selected multiple rows in the second coefficient matrix, thereby obtaining the corresponding multiple projection points, and then the one with the fastest residual decrease among the multiple projection points is used as the state change parameter output by this iteration process, and it is used as the object to be executed in the next orthogonal projection operation process. Specifically, for example, A represents the second coefficient matrix, b represents the second residual vector, and x0 represents the initial value of the state change parameter of the fluid model. Each orthogonal projection iteration process can be performed in parallel for multiple rows randomly selected in the second coefficient matrix. An orthogonal projection process can be a process of projecting x0 to the hyperplane where one of the multiple rows selected in the second coefficient matrix is located to obtain the projection point x1. It can be understood that corresponding to the randomly selected multiple rows, multiple orthogonal projection processes can obtain multiple x1s. At this time, the one with the smallest residual between the multiple x1s and the target state change parameter, that is, the one with the fastest residual decrease relative to the target to be solved, can be used as the state change parameter x1 output by this iteration process. Specifically, for example, the multiple x1 obtained by multiple orthogonal projection processes can be substituted into the linear relationship satisfied by the second coefficient matrix and the second residual vector as shown in Formula 5 to calculate the residual, that is, |Ax1-b| is calculated respectively, and the smallest of the obtained results is used as the state change parameter x1 output by this iterative process.
[0059] Step S140: Generate the target state parameter of the fluid model at a specified time according to the target state change parameter.
[0060] In this embodiment, when the end condition of the iterative operation process is reached, that is, the state change parameter x output at the kth iteration is k When the specified accuracy condition is met, the target state change parameter x k It 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, that is, ΔU in Formula 5 n , it is understandable that x k By adding the state parameters at the moment before the specified moment, the target state parameters of the fluid model at the specified moment can be obtained.
[0061] In some embodiments, the number of rows of the first coefficient matrix is the same as the number of rows of the first residual vector, and the multiple rows included in the first coefficient matrix correspond one-to-one to the multiple 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 preprocessing the first coefficient matrix and the first residual vector to obtain the second coefficient matrix and the second residual vector includes: dividing each element in the first coefficient matrix by the specified element in the row where the element is located, and the result forms 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, and the result forms the second residual vector.
[0062] In this embodiment, the first coefficient matrix can be an n-order square matrix, and the target state parameters of each grid unit to be determined can be an n×1 column vector. According to the linear relationship shown in Formula 5 satisfied between the first residual vector and the first coefficient matrix and the target state parameter matrix to be determined, the first residual vector can also be an n×1 column vector.
[0063] In this embodiment, each row of the first coefficient matrix may include a specified element located on the main diagonal of the first coefficient matrix. The specified element may be used to perform a preprocessing operation on the first coefficient matrix and the first residual vector. Specifically, for example, for an n-order square matrix A, the specified element may include A11, A22, ...Aij, (i=j).
[0064] In this embodiment, the preprocessing operation includes dividing each element in the first coefficient matrix by a specified element in the row where the element is located, and the result is formed into the second coefficient matrix. Specifically, for example, for a first coefficient matrix The preprocessing operation can be to divide the elements in the first row of the matrix by 1, the elements in the second row by 3, and the elements in the third row by 2. The obtained second coefficient matrix can be
[0065] In this embodiment, the preprocessing operation further includes 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, and the result obtained forms the second residual vector. Specifically, for example, for the first coefficient matrix With the first residual vector The preprocessing operation for the first residual vector may be to divide the elements in the first row of the matrix by 1, the elements in the second row by 3, and the elements in the third row by 2. The obtained second residual vector may be
[0066] In some embodiments, the second coefficient matrix has row index data indicating a row order; the probability distribution data constructed by the second coefficient matrix indicates a probability distribution satisfied by the row index data; the probability distribution includes: 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 the 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 row in the second coefficient matrix can also obey the probability distribution. Furthermore, when iteratively executing the orthogonal projection operation process, 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 execute the orthogonal projection process to obtain the initial value of the state change parameter at the projection point of the hyperplane where the selected row of the second coefficient matrix is located.
[0068] In this embodiment, the row index data can be used to indicate the row order of the second coefficient matrix. The row index data may include multiple row index data, and the multiple row index data may correspond one-to-one to multiple rows in the second coefficient matrix. Specifically, the row index data may include a sequence consisting of natural numbers {1, 2, 3...n}, wherein each row index data may correspond to a 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 kth row of the second coefficient matrix.
[0069] In some embodiments, based on the second coefficient matrix, the second residual vector, and the probability distribution data constructed according to the second coefficient matrix, an orthogonal projection operation process is iteratively performed on the initial value of the state change parameter of the fluid model until the obtained state change parameter meets the specified accuracy conditions, and the step of using the obtained state change parameter as the target state change parameter of the fluid model includes: 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 the corresponding row in the second residual vector; performing multiple orthogonal projection processes in parallel for the initial value of the state change parameter of the fluid model and each group of row data, respectively, to obtain corresponding multiple state change parameters; taking the one with the smallest residual relative to the target state change parameter among the multiple state change parameters as the initial value of the fluid model state parameter, repeating the above steps multiple times, and when the initial value of the fluid model state parameter meets the specified accuracy conditions, taking it as the target state change parameter of the fluid model.
[0070] In some cases, by randomly selecting multiple rows of the second coefficient matrix, and then performing orthogonal projections on the initial values of the state change parameters of the fluid model based on the selected multiple rows, and taking the one with the fastest residual decrease among the multiple projection points obtained as the next iteration point, the execution is repeated until the accuracy condition is met, and the target state change parameter is output, so that each iteration can proceed in the direction with the fastest residual decrease. In this way, compared with the classic iterative calculation method, for the same accuracy condition, this implementation can reduce the number of required iterations, thereby reducing the time to output the iterative calculation results.
[0071] In this embodiment, each row selected in the second coefficient matrix and the corresponding row in the second residual vector can form a set of row data. Specifically, for example, the second coefficient matrix is an n×n matrix, the second residual vector is an n×1 vector, and the 2nd row, the 5th row and the 8th row in the second coefficient matrix are randomly selected according to the probability distribution, then 3 sets of row data can be formed, wherein the 1st set of row data includes all elements of the 2nd row in the second coefficient matrix, and an element of the 2nd row of the corresponding second residual vector. It can be understood that the other two sets of row data can also be obtained in this way, and no further description is given.
[0072] In this embodiment, the step of performing multiple orthogonal projection processes in parallel for the initial value of the state variation parameter of the fluid model and each group of row data to obtain the corresponding multiple state variation parameters may include: corresponding to each group of row data, according to:
[0073]
[0074] Parallel calculations are performed to obtain corresponding multiple state change parameters; wherein each group of row data includes the selected rows in the second coefficient matrix and the corresponding row in the second residual vector x k+1 represents the state change parameter corresponding to each group of row data, x k Specifically, for example, the second coefficient matrix A is an n×n matrix, the second residual vector b is an n×1 vector, and the second row, the fifth row, and the eighth row in the second coefficient matrix are randomly selected according to the probability distribution. For the first group of row data, the element A2 in the second row of the second coefficient matrix can be used as the value in formula 6. The element b2 in the second row of the second coefficient matrix b is used as the Based on the initial value of the state variation parameter of the fluid model, the state variation parameter corresponding to the 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, which will not be described in detail.
[0075] In this embodiment, by executing the steps of the state parameter generation method of the fluid model provided in this specification, the first coefficient matrix and the first residual matrix are preprocessed, the matrix condition number is reduced, the convergence speed of the iterative operation can be accelerated, the operation time is reduced, and multiple orthogonal projection processes are performed in parallel during each iterative operation, and then the one with the fastest residual decrease among the multiple results obtained is used as the output result of this iteration, which further reduces the time required for each iteration to perform the calculation, so as to improve the speed of the target state parameters generated by multiple iterations, and then improve the timeliness of analyzing and predicting the fluid motion behavior based on the target state parameters. In order to illustrate that this embodiment has the above beneficial technical effects, based on the following test environment, the number of iterations and time required for the state parameter generation method of the fluid model provided in this embodiment are compared and tested, and compared with the number of iterations and time required to generate the target state parameters using the classic iterative method. The test results are shown in Table 1.
[0076] Test environment: WIN10 64-bit operating system, x64-based processor
[0077] CPU: 12 cores Memory RAM: 16G
[0078] Processor: Intel(R)Core(TM)i5-10500 CPU@3.10GHZ
[0079] OS: win10 professional version
[0080] Precision condition: residual error is less than 1e-6
[0081] Test results:
[0082] Table 1
[0083]
[0084] It can be seen from the test results in Table 1 that when the target state parameters are generated using the classical iterative method, the number of iteration steps required is very large and fails to converge, which requires a long computing 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 this 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 by this embodiment, a parallel orthogonal projection calculation process is added to each iterative calculation after the preprocessing operation, so that the number of iterations is further reduced. In the case of fewer matrix dimensions, the calculation time is also maintained at a low level. With the increase of the matrix dimension, the calculation time can be further reduced compared to the iterative algorithm with only preprocessing operations. In this way, using this embodiment to iterate 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 thus to a certain extent can improve the timeliness of analysis or prediction based on the simulated fluid state.
[0085] See also Figure 2 One embodiment of the present specification provides a method for generating state parameters of a fluid model. The fluid model is used to simulate the state change of a fluid over time, and the fluid model is divided into a plurality of grid units;
[0086] The method for generating state parameters of the fluid model may include the following steps:
[0087] S210: Acquire initial state parameters of the fluid model, where the initial state parameters include state parameters of the plurality of grid units at an initial moment.
[0088] In this embodiment, by obtaining the initial state parameters of the fluid model at the initial moment, the first coefficient matrix and the first residual vector of each grid unit of the fluid model at a moment after the initial moment can be obtained based on the state parameters. Furthermore, the state parameters of the fluid model at a moment after the initial moment can be generated according to the first coefficient matrix and the first residual vector.
[0089] S220: Using the initial state parameters as the state parameters of the moment before the specified moment in the state parameter generation method for the fluid model provided in any of the above-mentioned embodiments, iteratively executing the state parameter generation method for the fluid model provided in any of the above-mentioned embodiments in the time sequence of multiple specified moments until the modulus of the first residual vector meets the specified precision conditions, so as to generate the target state parameters of the fluid model at the corresponding specified moment; the target state parameters are used to represent the stable state of the simulated fluid; wherein the specified precision conditions include: the target state parameters are used to represent the range of values that the modulus of the first residual vector meets when the simulated fluid is in a stable state; in the process of iteratively executing the state parameter generation method for the fluid model provided in any of the above-mentioned embodiments, the target state parameters obtained each time the state parameter generation method for the fluid model provided in any of the above-mentioned embodiments is executed as the state parameters of the moment before the specified moment in the next execution of the state parameter generation method for the fluid model provided in any of the above-mentioned embodiments.
[0090] In some cases, the fluid model can simulate the process of the fluid moving from the initial state to the stable state over time, and obtain the target state parameters of the fluid model when the fluid is in the stable state. According to the obtained initial state parameters of the fluid model, the state parameters of the fluid model proposed in the embodiment of this specification are used to obtain the state parameters of the first moment, and the state parameters of the first moment are used as input to obtain the state parameters of the second moment. In this way, the iteration is continuously performed in time sequence. When the first residual vector b at time n is n (U n ) approaches 0, the fluid can be considered to be in a stable state. At this time, the state parameters at the current moment, i.e., time n+1, can be output to represent the stable state of the simulated fluid.
[0091] In this embodiment, the number of designated moments can be multiple, used to represent different time points, and the multiple designated moments can form a time series in chronological order, such as {0, 1, 2, 3...n}. In this embodiment, time 0 can represent the initial moment, and time 1 can represent the first moment. It can be understood that the state parameters of the fluid model at the initial moment and the state parameters at the first moment satisfy A(U 0 )(U 1 -U 0 )=-b 0 (U 0 ), so the fluid model obtains the state parameters of multiple grid units at the initial time, that is, obtains U 0The first coefficient matrix and the first residual vector can be obtained accordingly, and further, according to the state parameter generation method of the fluid model, the target state parameter of the fluid model at the first moment is generated. In this way, iterations can be continuously performed in the time sequence of multiple specified moments, and when the accuracy condition of the iteration cutoff is met, the target state parameter at the corresponding moment is output and used as the fluid model state parameter for representing the stable state of the simulated fluid.
[0092] In this embodiment, the specified accuracy condition can be used as a cutoff condition for the fluid model to iterate in chronological order. Specifically, the specified accuracy can indicate the degree to which the residual amount of the state parameter of each grid unit 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 moment, and the closer the simulated fluid is to a stable state. The specified accuracy condition can include: the target state parameter is used to indicate that the simulated fluid is in a stable state, and the modulus of the first residual vector meets the value range. Specifically, for example, the specified accuracy condition can include that the modulus of the first residual vector is less than a certain value. Of course, in some embodiments, the specified accuracy condition can also include the value range that each element in the first residual vector meets, 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 involved in the fluid model. Specifically, for example, the accuracy condition can be set to: the modulus of the first residual vector is less than 1e-6, and can also be set to the modulus 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; the physical state includes at least one of physical quantities such as density, velocity, pressure and temperature.
[0094] In some cases, the physical state of the simulated fluid can be measured by the numerical changes of various physical quantities of the simulated fluid during the movement. Specifically, for example, the state parameters of the fluid model at each moment can constitute a state parameter vector, and the elements in the vector can include the numerical set of physical quantities of each grid unit of the fluid model at the current moment to represent the physical state of the simulated fluid at the current moment. Specifically, for example, the fluid model is divided into N grid units, and the physical state to be determined is one. Then, at a certain moment, the first coefficient matrix is an N×N matrix, where the number of rows N represents the number of grid units, and the elements of each row can represent the physical quantity on the node of the grid unit. The first residual vector is an N×1 column vector, and the state parameter vector composed of the target state parameters at this moment is an N×1 column vector, and the elements in this vector can represent the physical state of the simulated fluid at this moment. For another example, when there are four physical states to be determined, the first coefficient matrix at a certain moment is a 4N×4N matrix, the first residual vector is a 4N×1 column vector, and the state parameter vector composed of the target state parameters at that moment is a 4N×1 column vector, which represents the physical state of the simulated fluid at that moment.
[0095] In this embodiment, the physical quantity may include unknown quantities such as density, velocity, temperature, etc. in the mass equation, momentum equation, and energy equation, wherein the velocity may include velocity components u and v in two directions of two dimensions, or may include velocity components u, v, and w in three directions of three dimensions. In some embodiments, the physical quantity may also include other unknown quantities, such as pressure, etc.
[0096] See also Figure 3 One embodiment of the present specification also provides a state parameter generation device for 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; the state parameter generation device for the fluid model may include:
[0097] An acquisition module, configured to acquire 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 state parameters of the plurality of grid units at a moment before a specified moment; and the first residual vector includes a residual amount set obtained based on state parameters of the plurality of grid units at a moment before a specified moment;
[0098] A preprocessing module, 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; wherein the specified preprocessing operation is used to reduce a matrix condition number;
[0099] An iterative module is used to iteratively perform 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 obtained state change parameter meets the specified accuracy conditions, 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 smallest residual between the corresponding multiple state change parameters obtained by executing multiple orthogonal projection processes in parallel and the target state change parameter 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.
[0100] A generating module is used to generate the target state parameter of the fluid model at a specified time according to the target state variation parameter.
[0101] Regarding the specific functions and effects achieved by the state parameter generation device of the fluid model, reference can be made to other embodiments of this specification for comparative explanation, and no further description is given here. Each module in the state parameter generation device of the fluid model can be implemented in whole or in part by software, hardware, and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.
[0102] See also Figure 4 . The embodiment of this specification also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and is characterized in that when the processor executes the computer program, the state parameter generation method of the fluid model in any of the above embodiments is implemented. The device may 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 may 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. When the computer program is executed by a computer, the computer executes the state parameter generation method of the fluid model in any of the above embodiments.
[0104] The embodiments of this specification also provide a computer program product including instructions, which, when executed by a computer, enables the computer to execute the method for generating state parameters of a fluid model in any of the above embodiments.
[0105] It should be understood that the specific examples herein are only intended to help those skilled in the art to better understand the embodiments of the present specification, rather than to limit the scope of the present invention.
[0106] It can be understood that in the various implementations of this specification, the size of the sequence number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the implementation methods of this specification.
[0107] It can be understood that the various embodiments described in this specification can be implemented individually or in combination, and the embodiments of this specification are not limited to this.
[0108] Unless otherwise specified, all technical and scientific terms used in the embodiments of this specification have the same meaning as those generally understood by those skilled in the art of the technical field of this specification. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the scope of this specification. The term "and / or" used in this specification includes any and all combinations of one or more related listed items. The singular forms of "a", "above", and "the" used in the embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0109] It can be understood that the processor of the embodiment of this specification can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method implementation can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor 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 devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiment of this specification can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of this specification can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0110] It is understood that the memory in the embodiments of this specification may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (programmable ROM, PROM), an erasable programmable read-only memory (erasablePROM, EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0111] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this specification.
[0112] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method implementation methods and will not be repeated here.
[0113] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0114] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may 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 may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0116] If the functions are implemented 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 solution of this specification, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0117] The above is only a specific implementation of this specification, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this specification, which should be included in the protection scope of this specification. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for generating state parameters of a fluid model, characterized in that: 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; the method comprises: Acquire 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 state parameters of the plurality of grid units at a moment before the specified moment; and the first residual vector includes a residual amount set obtained based on state parameters of the plurality of grid units at a moment before the specified moment; 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; wherein the specified preprocessing operation is used to reduce a matrix condition number; Based on the second coefficient matrix, the second residual vector, and the probability distribution data constructed according to the second coefficient matrix, an orthogonal projection operation process is iteratively performed on the initial value of the state change parameter of the fluid model until the obtained state change parameter meets the specified accuracy condition, and the obtained state change parameter is used as the target state change parameter of the fluid model; wherein, during the orthogonal projection operation process, the one with the smallest residual between the corresponding multiple state change parameters obtained by executing the orthogonal projection process multiple times in parallel and the target state change parameter 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; The target state parameter of the fluid model at a specified time is generated according to the target state change parameter.
2. The method according to claim 1, characterized in that The number of rows of the first coefficient matrix is the same as the number of rows of the first residual vector, and there is a one-to-one correspondence between the multiple rows included in the first coefficient matrix and the multiple 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 preprocessing operation on the first coefficient matrix and the first residual vector to obtain a second coefficient matrix and a second residual vector comprises: Divide each element in the first coefficient matrix by a specified element in the row where the element is located, and obtain the result to form the second coefficient matrix; Each element in the first residual vector is divided by the designated element in the corresponding row of the first coefficient matrix corresponding to the row where the element is located, and the obtained result forms the second residual vector.
3. The method according to claim 2, characterized in that The second coefficient matrix has row index data indicating the row order; the probability distribution data constructed by the second coefficient matrix indicates the probability distribution satisfied by the row index data; The probability distribution includes: i=1,2,...m;wherein, m represents the number of rows of the second coefficient matrix, a i T represents the i-th row of the second coefficient matrix, i represents the row index data, and A represents the second coefficient matrix.
4. The method according to claim 3, characterized in that Based on the second coefficient matrix, the second residual vector, and the probability distribution data constructed according to the second coefficient matrix, an orthogonal projection operation process is iteratively performed on the initial value of the state change parameter of the fluid model until the obtained state change parameter meets the specified accuracy condition, and the obtained state change parameter is used as the target state change parameter of the fluid model. The step includes: Randomly selecting a plurality of rows of the second coefficient matrix according to the probability distribution data; wherein each selected row in the second coefficient matrix forms a set of row data with a corresponding row in the second residual vector; For each group of row data and the initial value of the state variation parameter of the fluid model, multiple orthogonal projection processes are performed in parallel to obtain corresponding multiple state variation parameters; The one of the multiple state change parameters with the smallest residual relative to the target state change parameter is used as the initial value of the fluid model state parameter, and the above steps are repeated multiple times. When the initial value of the fluid model state parameter meets the specified accuracy condition, it is used as the target state change parameter of the fluid model.
5. The method according to claim 4, characterized in that The steps of performing multiple orthogonal projection processes in parallel for the initial value of the state variation parameter of the fluid model and each group of row data to obtain corresponding multiple state variation parameters include: For each group of row data, according to Parallel calculations are performed to obtain corresponding multiple state change parameters; wherein each group of row data includes the selected rows in the second coefficient matrix and the corresponding row in the second residual vector x k+1 represents the state change parameter corresponding to each group of row data, x k Represents the initial value of the state change parameter of the fluid model.
6. A method for generating state parameters of a fluid model, characterized in that: 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; the method comprises: Acquire initial state parameters of the fluid model, wherein the initial state parameters include state parameters of the plurality of grid units at an initial moment; The initial state parameters are used as the state parameters of the moment before the specified moment in the method as claimed in claim 1, and the method as claimed in claim 1 is iteratively executed in time sequence of multiple specified moments until the modulus of the first residual vector meets the specified precision conditions, so as to generate the target state parameters of the fluid model at the corresponding specified moment; the target state parameters are used to represent the stable state of the simulated fluid; wherein the specified precision conditions include: the target state parameters are used to represent the range of values that the modulus of the first residual vector meets when the simulated fluid is in a stable state; during the iterative execution of the method as claimed in claim 1, the target state parameters obtained each time the method as claimed in claim 1 is executed are used as the state parameters of the moment before the specified moment in the next execution of the method as claimed in claim 1.
7. The method according to claim 1 or 6, characterized in that: The state parameters of the fluid model represent the physical state of the simulated fluid; the physical state includes at least one of physical quantities such as density, velocity, pressure and temperature.
8. A device for generating state parameters of a fluid model, characterized in that: 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; the device comprises: An acquisition module, configured to acquire 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 state parameters of the plurality of grid units at a moment before a specified moment; and the first residual vector includes a residual amount set obtained based on state parameters of the plurality of grid units at a moment before a specified moment; A preprocessing module, 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; wherein the specified preprocessing operation is used to reduce a matrix condition number; an iterative module, for iteratively 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 obtained state change parameter meets the specified accuracy 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 smallest residual between the corresponding multiple state change parameters obtained by executing the orthogonal projection process multiple times in parallel and the target state change parameter 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; A generating module is used to generate the target state parameter of the fluid model at a specified time according to the target state variation parameter.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
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
Power distribution network topology and line parameter joint identification method and device and electronic equipment
CN116090154A
Methods, systems and computer program products for reduced order model adaptive simulation of complex systems
US20090306943A1