Fluid model state parameter generation method and device, equipment and storage medium

By performing preprocessing and subspace mapping in the fluid model, the problem of long generation of state parameters of the fluid model is solved, and faster and more stable state parameter generation is achieved, improving the prediction timeliness of fluid state data.

CN119476068AActive Publication Date: 2025-02-18ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311011806.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-11
Publication Date
2025-02-18
Estimated Expiration
2043-08-11

AI Technical Summary

Technical Problem

In the prior art, the calculation and generation of fluid model state parameters require a large number of grid cells, resulting in a long calculation time, which affects the timeliness of prediction of fluid state data for related problems.

Method used

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, in the subspace with a preset small dimension, the subspace coefficient vector and the basis vector are determined to generate the fluid model target status parameters.

Benefits of technology

The time to generate state parameters is reduced, the timeliness of analysis or prediction based on simulated fluid states is improved, and the stability of the time required to generate state parameters is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119476068A_ABST
    Figure CN119476068A_ABST
Patent Text Reader

Abstract

The invention provides a state parameter generation method of a fluid model. The method comprises the following steps: acquiring a first coefficient matrix and a first residual vector of a fluid model; performing 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 for reducing the matrix condition number; in a preset subspace, based on the second coefficient matrix and the second residual vector, determining a subspace coefficient vector and a group of base vectors of the preset subspace; wherein the dimension of the preset subspace is smaller than the dimension of the first residual vector; and according to the subspace coefficient vector and a group of base vectors of a preset subspace, generating a target state parameter of the fluid model at a specified moment. The time for calculating and generating the state parameters of the fluid model is shortened, and the timeliness of analyzing and predicting related problems based on simulated fluid state data is improved.
Need to check novelty before this filing date? Find Prior Art

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] In the specification, multiple embodiments provide a method for generating state parameters 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; 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; the specified preprocessing operation is used to reduce the matrix condition number; within a preset subspace, based on the second coefficient matrix and the second residual vector, determining a subspace coefficient vector and a set of basis vectors of the preset subspace; wherein the dimension of the preset subspace is smaller than the dimension of the first residual vector; generating the target state parameters of the fluid model at a specified moment according to the subspace coefficient vector and a set of basis vectors of the preset subspace.

[0007] One embodiment of the present specification 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 device includes: an acquisition module, used to acquire 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 plurality of grid units at a moment before a specified moment; the first residual vector includes 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, used 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 matrix condition number; a determination module, used to determine a subspace coefficient vector and a set of basis vectors of the preset subspace based on the second coefficient matrix and the second residual vector within a preset subspace; wherein the dimension of the preset subspace is smaller than the dimension of the first residual vector; a generation module, used to generate the target state parameter of the fluid model at a specified moment according to the subspace coefficient vector and a set of basis vectors of the preset subspace.

[0008] The embodiments of this specification provide a computer 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.

[0009] 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.

[0010] 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 moment 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 determine the subspace coefficient vector and a group of basis vectors of the subspace in a preset small-dimensional subspace according to the second coefficient matrix and the second residual vector, and then generate the target state parameters of the fluid model at the specified time according to the subspace coefficient vector and the group of basis vectors. By mapping the matrix formed by the set of state parameters to be generated to a preset subspace of smaller dimension for calculation, the number of iterative calculations required is reduced, thereby reducing the time for generating state parameters, and to a certain extent, can improve the timeliness of analysis or prediction based on simulated fluid state. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] 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.

[0012] Figure 2 A schematic diagram of a device for generating state parameters of a fluid model provided in accordance with one embodiment of the present specification.

[0013] Figure 3 A schematic diagram of a computer device provided for one embodiment of the present specification. DETAILED DESCRIPTION

[0014] 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.

[0015] 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.

[0016] 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.

[0017] Therefore, it is necessary to provide a method for generating state parameters of a fluid model, which can obtain the first coefficient matrix and the first residual vector of the multiple grid units at a specified time based on the state parameters of the multiple grid units of the fluid model at a 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 determine the subspace coefficient vector and a group of basis vectors of the subspace in a preset small-dimensional subspace according to the second coefficient matrix and the second residual vector, and then generate the target state parameters of the fluid model at the specified time according to the subspace coefficient vector and the group of basis vectors. The method for generating state parameters of a fluid model provided in the embodiment of the present specification reduces the number of required iterative calculations by mapping the matrix formed by the set of state parameters to be generated to a preset subspace of smaller dimension for calculation, thereby reducing the time required to generate state parameters, and to a certain extent can improve the timeliness of analysis or prediction based on simulated fluid states. Moreover, since the state parameter generation method of the fluid model provided in the implementation mode of this specification performs calculation by mapping the matrix formed by the set of state parameters to be generated to a preset fixed-dimensional subspace, the number of required iterative calculations will not fluctuate significantly when the scale of the fluid model grid increases, thereby enhancing the stability of the time required to generate the state parameters to a certain extent, thereby improving the timeliness of analysis or prediction based on the simulated fluid state.

[0018] 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.

[0019] 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.

[0020] 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.

[0021] 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.

[0022] 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:

[0023]

[0024] 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.

[0025] 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:

[0026]

[0027] 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.

[0028] Let ΔU n =U n+1 -U n ,So:

[0029]

[0030] Substituting Formula 3 into Formula 2 yields:

[0031]

[0032] Among them, δ i,i' δ j,j' Represents parameters related to the coordinate information of the grid cells.

[0033] make Then formula 4 can be equivalent to the following form:

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

[0035] 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 a preset accuracy, it means that the modulus of the vector formed by the difference between the state parameters of the simulated fluid at the n+1th moment and the nth moment approaches a preset accuracy. The preset accuracy can be a value close to 0, such as 1e-4, 1e-6, etc. At this time, it further means that the state change between the n+1th moment and the nth moment approaches 0, and the state parameters at the n+1th moment can be used to represent the stable state of the simulated fluid.

[0036] 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 reduces the number of iterative calculations required by mapping the matrix formed by the set of state parameters to be generated to a preset subspace of smaller dimension for calculation, thereby reducing the time required for generating state parameters, and thus improving the timeliness of analysis or prediction based on simulated fluid states.

[0037] In this embodiment, the method for generating state parameters of the fluid model may include the following steps.

[0038] 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.

[0039] 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.

[0040] 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.

[0041] 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.

[0042] 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.

[0043] 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.

[0044] 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.

[0045] 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.

[0046] 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.

[0047] Step S130: In a preset subspace, based on the second coefficient matrix and the second residual vector, determine a subspace coefficient vector and a set of basis vectors of the preset subspace; wherein the dimension of the preset subspace is smaller than the dimension of the first residual vector.

[0048] In some cases, some classic iterative methods are usually used to directly calculate the linear equations shown in Formula 5. When the grid unit scale is large, such a calculation method requires 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 using the subspace algorithm to map the linear equations with larger dimensions to a subspace with smaller dimensions for solution, the problem of solving large-scale linear equations can be transformed into a problem of searching for approximate solutions that meet the accuracy in the subspace, reducing the complexity of the problem, and then reducing the number of iterations required when solving, so as to reduce the time required for calculation and improve the speed of generating target state parameters.

[0049] In this embodiment, the subspace coefficient vector can be used as a vector to be solved in the linear equation system of smaller dimension obtained by mapping the large-dimensional linear equation system shown in Formula 5 to a preset subspace. Specifically, for example, the large-dimensional linear equation system can be mapped to a Krylov subspace, and the best approximate solution of its analytical solution can be found in the subspace. For linear problems such as Ax=b in Formula 5, where A is a non-singular full-rank n-dimensional matrix. Given an initial solution x0, there is an initial residual r0=b-Ax0. Then, is the m-order Krylov subspace of the matrix A and the initial residual r0. Assume v1,v2,......v m yes A set of basis vectors, then Any vector x can be expressed as: x = y1v1 + y2v2 + ... + y m v m =V m y m , where y m =[y1,y2,......,y m ] T is the linear coefficient, V m =[v1,v2,......v m ] including the A set of basis vectors. It can be understood that Find the best approximate solution x in (m) The problem can be transformed into: finding a set of suitable basis vectors v1, v2, ... v m , and solve for x (m) The linear expression coefficient y under this set of basis vectors m The set of basis vectors V m =[v1,v2,......v m ] can be understood as a set of basis vectors of the preset subspace determined in this embodiment, and the set of basis vectors V m =[v1,v2,......v m ] can be a set of standard orthogonal bases, which can be obtained by pairing {r0,Ar0,A 2 r0,…,A m-1 r0} is obtained by unit orthogonalization. m It can be understood that the subspace coefficient vector y is determined in this embodiment. mIt can be solved based on the relationship between it and an upper Hessenberg matrix determined in the process of determining the standard orthogonal basis. In this embodiment, the dimension of the subspace can be preset according to the problem or accuracy requirements, and the dimension can be smaller than the dimension of the first residual vector, that is, the dimension of the solution space of the target state parameter to be determined. The dimension of the preset subspace can be a fixed value so that the number of iterations required for the calculation is not easily affected by the increase in the size of the grid unit and is kept at a small number. Specifically, for example, the subspace The dimension m can be set to 20, 30, or other values.

[0050] Step S140: Generate target state parameters of the fluid model at a specified time according to the subspace coefficient vector and a set of basis vectors of the preset subspace.

[0051] In this embodiment, after determining a set of basis vectors and subspace coefficient vectors of the preset subspace, the best approximate solution in the preset subspace can be calculated, and the target state parameter at a specified time can be generated according to the best approximate solution. Specifically, for example, for the linear problem shown in Formula 5, according to the subspace coefficient vector determined in the above steps and a set of basis vectors of the preset subspace, ΔU is calculated. n The best approximate solution of , and according to ΔU n =U n+1 -U n By calculating the best approximate solution and adding the state parameter matrix at the previous moment, the target state parameter matrix at the specified moment can be generated.

[0052] 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.

[0053] 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 to represent the residual amount of the state parameters of each grid unit.

[0054] 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 A 11 , A 22 , ...A ij,(i=j) .

[0055] 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

[0056] 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

[0057] In some embodiments, the subspace includes a Krylov subspace; the step of determining the subspace coefficient vector and a set of basis vectors of the preset subspace based on the second coefficient matrix and the second residual vector in the preset subspace includes: based on the generalized minimum residual method, in the preset Krylov subspace, according to the second coefficient matrix and the second residual vector, after iterative operation, obtaining the subspace coefficient matrix and a set of standard orthogonal bases of the preset Krylov subspace; according to the subspace coefficient matrix, calculating the subspace coefficient vector.

[0058] In some cases, the Krylov subspace method is used to project the target state parameters to be solved. When looking for an approximate solution that meets the accuracy requirements in the Krylov subspace, the generalized minimum residual method (GMRES) can be used directly from the condition of the minimum modulus of the residual r. The optimal criterion can be described as: Find Solution For any vector Existence vector So that x∈x (0) +V m y m , you can have: Furthermore, due to V m+1 The column vectors of are orthogonal, so Therefore, in the GMRES method, the problem can be transformed into solving H m+1,m y m =βe1 problem.

[0059] In this embodiment, H m+1,m y m =H in βe1 m+1,m It can be understood as the subspace coefficient matrix, H m+1,m It can be a Hessenberg matrix calculated according to the second coefficient matrix and the second residual vector. Based on the generalized minimum residual method, the large-dimensional linear problem of solving the target state parameters of the fluid model shown in Formula 5 is mapped to the preset Krylov subspace and converted into the H in the preset Krylov subspace. m+1,m y m =βe1 problem, the H m+1,m y m =βe1 problem can be understood as a problem of solving a linear equation system with a smaller dimension. According to its linear expression coefficient y m The above relationship between them can be calculated to get y m , that is, the subspace coefficient vector can be calculated based on the subspace coefficient matrix.

[0060] In this embodiment, the subspace coefficient vector obtained by calculation can be calculated by QR decomposition method, or by some iterative algorithms, such as using Kaczmarz algorithm to solve the subspace coefficient vector. Specifically, for example, for H m+1,m y m =βe1 This linear equation system is solved for y m The problem can be solved by using QR decomposition when the dimension of the preset subspace is not very large. Where Q m+1is an orthogonal matrix, R m+1,m It is an upper triangular matrix, and then we can get the following process:

[0061]

[0062] where q1 is Q m+1 The first column, R m For R m+1,m The first m rows of y. m This can be solved by solving βq1(1:m)=R m y m This upper triangular system of equations is obtained, where q1(1:m) represents the vector consisting of the first m elements of the q1 vector.

[0063] In some embodiments, the step of calculating the subspace coefficient vector according to the subspace coefficient matrix includes: according to the linear relationship Hy between the subspace coefficient matrix and the subspace coefficient vector m =βe1, use the Kaczmarz algorithm to perform an iterative operation process to obtain the subspace coefficient vector; wherein H represents the subspace coefficient matrix; y m represents the subspace coefficient vector; β represents a determined value calculated based on the second coefficient matrix and the second residual vector; e1=[1, 0, ... 0] T , the number of rows of e1 is the same as the number of rows of H.

[0064] In this embodiment, β can be calculated based on the second coefficient matrix and the second residual vector. Specifically, β can be ||r0||2, where r0=b-Ax (0) , b represents the second residual vector, A represents the second coefficient matrix, x (0) Represents the ΔU to be solved as shown in Formula 5 n The preset initial value can be preset to 0, or it can be preset to other values ​​according to the requirements of the simulated fluid in a specific problem scenario.

[0065] In this embodiment, the process of calculating the subspace coefficient vector can be iteratively calculated by the Kaczmarz algorithm. m =βe1 This linear equation system is solved for y m For the problem, we can preset an initial iteration point y0, select a row i of the matrix according to the specified selection rule in each iteration, and orthogonally project the current iteration point to the hyperplane where the selected row is located, and use the obtained projection point as the next iteration point y kWhen the number of iterations is m, all rows of the matrix will be scanned, and then the row information of the matrix will be recycled until the specified maximum number of iterations or accuracy conditions are met, and the result will be used as y m .

[0066] In some embodiments, the step of generating the target state parameter of the fluid model at a specified time according to the subspace coefficient vector and a set of basis vectors of the preset subspace includes: obtaining a state fluctuation vector by calculation according to the subspace coefficient vector and a set of basis vectors of the preset subspace; wherein the state fluctuation vector includes a set of changes between the target state parameter at the specified time and the state parameter at a time before the specified time; the subspace coefficient vector, the set of basis vectors of the preset subspace, and the preset initial value of the state fluctuation vector satisfy: x = x (0) +V m y m ; x represents the state fluctuation vector; x (0) V represents the preset initial value of the state fluctuation vector; m A set of basis vectors representing the preset subspace; y m Represents the subspace coefficient vector; based on the state fluctuation vector and the state parameters at the previous moment of the specified moment, determines the target state parameters of the fluid model at the specified moment.

[0067] In some cases, after calculating the subspace coefficient vector in the preset subspace, it is necessary to further calculate the approximate solution of the linear equations problem in the original dimension as shown in Formula 5, that is, ΔU in Formula 5 n The approximate solution is taken as the state parameter change between the target state parameter at a specified time and the state parameter at the previous time, that is, U n+1 -U n In this way, according to the state parameter U at the moment before the specified moment n , the target state parameters of the fluid model at a specified time, i.e., time n+1, can be determined.

[0068] In this embodiment, the state fluctuation vector can be understood as ΔU as shown in Formula 5: n , that is U n+1 -U n , used to represent the change in state parameters between the target state parameter at a specified time and the state parameter at the previous time. (0) It can represent the preset initial value of the state fluctuation vector, that is, the ΔU to be solved as shown in Formula 5 n The preset initial value can be preset to 0, or it can be preset to other values ​​according to the requirements of the simulated fluid in a specific problem scenario.

[0069] In some embodiments, for large-scale linear equations, since the amount of computation and storage for each iteration of the GMRES method will increase with the increase in the number of iterations, when the number of iterations is large, the computation time and storage will increase significantly. In this case, the restarted GMRES method can be used, that is, a maximum number of iterations m is preset (usually much smaller than n, such as 20, 50, etc.). If GMRES still does not meet the accuracy conditions after iterating to m steps, the approximate solution is calculated and used as the new initial value of the iteration, and the GMRES method is restarted. This process can be repeated until an approximate solution that meets the accuracy conditions is found. Specifically, for example, after m iterations based on the GMRES method, y is solved m , but it does not meet the accuracy condition at this time, then according to y m and V m First calculate the approximate solution x, and then use x as the initial value x for iteration (0) , restart the GMRES method to iterate until the accuracy condition is met. m Used to compute an approximate solution x to a linear system of equations problem in the original dimension.

[0070] In this embodiment, by executing the steps of the state parameter generation method of the fluid model provided in this specification, the large-scale linear problem is converted into a small-dimensional problem in the subspace for calculation and solution to generate the target state parameters of the fluid model at a specified time. Not only can the time required for iterative calculation be reduced to improve the speed of the target state parameters generated by multiple iterations, but also because the subspace dimension is fixed, the number of times required for iterative calculation will not fluctuate greatly when the scale of the fluid model grid increases, thereby enhancing the stability of the time required to generate the 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.

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

[0072] CPU: 12 cores Memory RAM: 16G

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

[0074] OS: win10 professional version

[0075] Precision condition: residual error is less than 1e-6

[0076] Test results:

[0077] Table 1

[0078]

[0079] 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 is large and the time required is also long. And as the dimension of the linear system increases, the number of iteration steps and the time required also increase, and the fluctuation is large. Compared with the classical method, the number of iteration steps and the time required for the state parameter generation method of the fluid model provided by the present embodiment are both small, and the larger the linear system dimension, the more obvious the improvement relative to the classical iterative method, and it is also relatively stable. In this way, using the present embodiment to iterate to generate the target state parameters of the fluid model at a specified time can reduce the number of iterations and 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.

[0080] In some embodiments, there are multiple designated moments, each designated moment represents a different time point; the multiple designated moments include at least an initial moment and a first moment, wherein the first moment includes the moment after the initial moment; the method also includes: obtaining the initial state parameters of the fluid model, the initial state parameters include the state parameters of the multiple grid units at the initial moment; accordingly, the first coefficient matrix includes a set of coefficients obtained based on the initial state parameters; the first residual vector includes a set of residual quantities obtained based on the initial state parameters; accordingly, the step of generating the target state parameters of the fluid model at the designated moment according to the subspace coefficient vector and a set of basis vectors of the preset subspace includes: generating the target state parameters of the fluid model at the first moment according to the subspace coefficient vector and a set of basis vectors of the preset subspace.

[0081] In some cases, the number of designated moments may be multiple, used to represent different time points, and the multiple designated moments may form a time series in chronological order, such as {0, 1, 2, 3...n}. In this embodiment, moment 0 may represent the initial moment, and moment 1 may 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. Further, according to the state parameter generation method of the fluid model, the target state parameters of the fluid model at the first moment are generated.

[0082] In some embodiments, the fluid model has specified accuracy conditions; the specified accuracy conditions include: the target state parameter is used to represent the range of values ​​that the modulus of the first residual vector conforms to when the simulated fluid is in a stable state; the method also includes: using the target state parameter of the first moment as the state parameter of the moment before the specified moment described in the fluid model state parameter generation method proposed in the embodiment of this specification, executing the method described in the fluid model state parameter generation method proposed in the embodiment of this specification to generate the target state parameter of the fluid model at the second moment; wherein the second moment includes the moment after the first moment; iteratively executing the above steps in the time sequence of the multiple specified moments; when the modulus of the first residual vector conforms to the specified accuracy conditions, generating the target state parameter of the corresponding specified moment; the target state parameter represents the stable state of the simulated fluid.

[0083] 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., moment n+1, can be output to represent the stable state of the simulated fluid.

[0084] In this embodiment, the specified accuracy condition is used as a cutoff condition for the fluid model to iterate in chronological order. Specifically, the specified accuracy can represent 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 in 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 may include: the target state parameter is 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. Specifically, for example, the specified accuracy condition may include that the modulus of the first residual vector is less than a certain value. Of course, the specified accuracy condition may also include the range of values ​​that each element in the first residual vector meets, for example, the accuracy condition may include that each element is less than a certain value. The specified accuracy condition may be specifically determined according to the problem requirements involved in the fluid model. Specifically, for example, the accuracy condition may be set to: the modulus of the first residual vector is less than 1e-6, or it may be set to the modulus of the first residual vector is less than 1e-4.

[0085] 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.

[0086] 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.

[0087] 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.

[0088] See also Figure 2 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:

[0089] 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;

[0090] 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; the specified preprocessing operation is used to reduce a matrix condition number;

[0091] A determination module, configured to determine, within a preset subspace, a subspace coefficient vector and a set of basis vectors of the preset subspace based on the second coefficient matrix and the second residual vector; wherein the dimension of the preset subspace is smaller than the dimension of the first residual vector;

[0092] A generation module is used to generate target state parameters of the fluid model at a specified time according to the subspace coefficient vector and a set of basis vectors of the preset subspace.

[0093] 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.

[0094] See also Figure 3. 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 computer 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.

[0095] 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.

[0096] 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.

[0097] 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.

[0098] 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.

[0099] 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.

[0100] 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.

[0101] 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. 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.

[0102] 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.

[0103] 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.

[0104] 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.

[0105] 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.

[0106] 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.

[0107] 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.

[0108] 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.

[0109] 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; the specified preprocessing operation is used to reduce a matrix condition number; In a preset subspace, based on the second coefficient matrix and the second residual vector, determine a subspace coefficient vector and a set of basis vectors of the preset subspace; wherein the dimension of the preset subspace is smaller than the dimension of the first residual vector; The target state parameters of the fluid model at a specified time are generated according to the subspace coefficient vector and a group of basis vectors of the preset subspace.

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 subspace includes a Krylov subspace; the step of determining, within the preset subspace, a subspace coefficient vector and a set of basis vectors of the preset subspace based on the second coefficient matrix and the second residual vector comprises: Based on the generalized minimum residual method, in a preset Krylov subspace, after iterative operation according to the second coefficient matrix and the second residual vector, a subspace coefficient matrix and a set of standard orthogonal bases of the preset Krylov subspace are obtained; According to the subspace coefficient matrix, a subspace coefficient vector is calculated.

4. The method according to claim 3, characterized in that The step of calculating the subspace coefficient vector according to the subspace coefficient matrix comprises: According to the linear relationship Hy between the subspace coefficient matrix and the subspace coefficient vector m =βe1, use the Kaczmarz algorithm to perform an iterative operation process to obtain the subspace coefficient vector; wherein H represents the subspace coefficient matrix; y m represents the subspace coefficient vector; β represents a determined value calculated based on the second coefficient matrix and the second residual vector; e1=[1, 0, ... 0] T , the number of rows of e1 is the same as the number of rows of H.

5. The method according to claim 4, characterized in that The step of generating target state parameters of the fluid model at a specified time according to the subspace coefficient vector and a set of basis vectors of the preset subspace comprises: A state fluctuation vector is obtained by calculation based on the subspace coefficient vector and a set of basis vectors of the preset subspace; wherein the state fluctuation vector includes a set of changes between the target state parameter at the specified time and the state parameter at the previous time of the specified time; the subspace coefficient vector, the set of basis vectors of the preset subspace, and the preset initial value of the state fluctuation vector satisfy: x = x (0) +V m y m ; x represents the state fluctuation vector; x (0) V represents the preset initial value of the state fluctuation vector; m A set of basis vectors representing the preset subspace; y m represents the subspace coefficient vector; Based on the state fluctuation vector and the state parameter at a previous moment of the designated moment, the target state parameter of the fluid model at the designated moment is determined.

6. The method according to claim 1, characterized in that The number of the specified moments is multiple, each of which represents a different time point; the multiple specified moments include at least an initial moment and a first moment, wherein the first moment represents a moment after the initial moment; the method further includes: 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; Accordingly, the first coefficient matrix includes a coefficient set obtained based on the initial state parameters; the first residual vector includes a residual quantity set obtained based on the initial state parameters; Correspondingly, the step of generating the target state parameters of the fluid model at a specified moment based on the subspace coefficient vector and a set of basis vectors of the preset subspace includes: generating the target state parameters of the fluid model at the first moment based on the subspace coefficient vector and a set of basis vectors of the preset subspace.

7. The method according to claim 6, characterized in that The fluid model has a specified accuracy condition; the specified accuracy condition includes: 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; the method also includes: The target state parameter of the first moment is used as the state parameter of the moment before the designated moment described in claim 1, and the method described in claim 1 is executed to generate the target state parameter of the fluid model at the second moment; wherein the second moment represents the moment after the first moment; Iteratively execute the above steps according to the time sequence of the multiple specified moments; When the modulus of the first residual vector meets the specified accuracy condition, a target state parameter at the corresponding specified time is generated; the target state parameter represents the stable state of the simulated fluid.

8. The method according to claim 1, 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.

9. 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, 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 a matrix condition number; A determination module, configured to determine, within a preset subspace, a subspace coefficient vector and a set of basis vectors of the preset subspace based on the second coefficient matrix and the second residual vector; wherein the dimension of the preset subspace is smaller than the dimension of the first residual vector; A generating module is used to generate target state parameters of the fluid model at a specified time according to the subspace coefficient vector and a set of basis vectors of the preset subspace.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.

11. 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 8 is implemented.

Citation Information

Patent Citations

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

    CN114091363A

  • Fluid dynamics calculation system based on quantum calculation and quantum computer

    CN115809705A

  • Quantum linear solving method and device based on generalized minimum residual, and medium

    CN116090571A

  • Method and apparatus for estimating the physical state of a physical system

    US20090138245A1