Flux Jacobian matrix update frequency adjustment method, device, equipment and medium
By dynamically adjusting the update frequency of the flux Jacobian matrix, the problems of large calculation amount and low robustness of the flux Jacobian matrix in computational fluid dynamics are solved, and the calculation efficiency and solution stability are improved.
Patent Information
- Application Number
- CN202410889269.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-07-04
AI Technical Summary
In computational fluid dynamics, when the implicit time-step iteration method solves the Navier-Stokes equations, the flux Jacobian matrix requires a large amount of calculation, which affects the solution efficiency, and the fixed update frequency will cause the solution of the equation system to fail or reduce the robustness.
By dynamically adjusting the update frequency of the flux Jacobian matrix based on the residuals, the calculation amount is reduced, the efficiency of solving the system of equations is improved, and the residuals are adapted to the situation of declining conditions to avoid mismatch between the left and right ends of the system of equations.
It effectively reduces the calculation amount of the flux Jacobian matrix, improves the efficiency of solving the system of equations, ensures robustness, and avoids solution failures.
Smart Images

Figure CN118410261B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of fluid computing, and in particular to a method, device, equipment and medium for adjusting the update frequency of a flux Jacobian matrix. Background Art
[0002] When designing aircraft, computational fluid dynamics (CFD) methods are often used. In computational fluid dynamics methods, implicit time-step iteration methods are usually used to solve the Navier-Stokes equations (NS equations). Among them, the conventional method calculates the flux Jacobian matrix once in each time-step iteration process, and the calculation of the flux Jacobian matrix is large, which has a great impact on the efficiency of solving the equation system. Another method is to fix the update frequency of the flux Jacobian matrix. Although this method improves the calculation efficiency, it reduces the robustness of the time-step iteration. Because in the initial stage of the calculation, or when the residual is not well reduced, directly calculating the flux Jacobian matrix based on the fixed update frequency may cause a mismatch between the left and right ends of the equation system, causing the equation system to fail to be solved, resulting in divergence of the time-step iteration. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for adjusting the update frequency of the flux Jacobian matrix, which can dynamically adjust the update frequency of the flux Jacobian matrix based on the residual, reduce the calculation amount of the flux Jacobian matrix, and thus improve the calculation efficiency of solving the system of equations. The specific scheme is as follows:
[0004] In a first aspect, the present application provides a method for adjusting the update frequency of a flux Jacobian matrix, comprising:
[0005] In the process of iterating a preset number of time steps on a discrete equation group, determining a maximum residual corresponding to a target discrete equation; the discrete equation group is an equation group obtained by discretizing the Navier-Stokes equation group using an implicit time step iteration method; all discrete equations in the discrete equation group include a flux Jacobian matrix and a residual; the target discrete equation is the first equation in the discrete equation group;
[0006] In the process of iteratively solving the discrete equation group at a current time step, determining a current residual corresponding to the target discrete equation; the current time step is any time step after the preset number of time steps;
[0007] A current update frequency is determined based on a comparison result between the current residual and a preset residual lower limit and / or the maximum residual, and based on the current update frequency, it is determined whether to update the flux Jacobian matrix of the current time step.
[0008] Optionally, in the process of iterating the discrete equation group for a preset number of time steps, determining the maximum residual corresponding to the target discrete equation includes:
[0009] In the process of iterating the discrete equation group for a preset number of time steps, the flux Jacobian matrix of each time step is recalculated to obtain a preset number of residuals corresponding to the target discrete equation after the preset number of time steps are iterated, and the maximum residual is determined from the preset number of residuals.
[0010] Optionally, before determining the current update frequency based on the comparison result between the current residual and a preset residual lower limit and / or the maximum residual, the method further includes:
[0011] The preset residual lower limit is determined based on a preset calculation precision; wherein the preset calculation precision is a precision determined based on a floating point number precision; the floating point number precision includes single precision and double precision.
[0012] Optionally, determining the current update frequency based on a comparison result between the current residual and a preset residual lower limit and / or the maximum residual includes:
[0013] The current residual reduction magnitude is determined based on a comparison result between the current residual and a preset residual lower limit and / or the maximum residual, and the current update frequency corresponding to the current residual reduction magnitude is determined based on a correspondence between the residual reduction magnitude and the update frequency.
[0014] Optionally, the determining the current residual reduction magnitude based on a comparison result between the current residual and a preset residual lower limit and / or the maximum residual includes:
[0015] Determine whether the current residual is less than a preset residual lower limit;
[0016] If the current residual is less than the preset residual lower limit, the preset residual reduction magnitude is determined as the current residual reduction magnitude;
[0017] If the current residual is greater than or equal to the preset residual lower limit, the magnitude of the current residual decrease is determined based on a comparison result between the current residual and the maximum residual.
[0018] Optionally, the determining the current residual reduction magnitude based on a comparison result between the current residual and the maximum residual includes:
[0019] ;
[0020] Among them, ResDown represents the magnitude of the current residual decrease; Res represents the current residual; and ResMax represents the maximum residual.
[0021] Optionally, the determining whether to update the flux Jacobian matrix of the current time step based on the current update frequency includes:
[0022] Determining a current step number corresponding to the current time step, and determining whether the current step number is divisible by the current update frequency;
[0023] If the current number of steps is divisible by the current update frequency, the flux Jacobian matrices of all the discrete equations are recalculated at the current time step to update the flux Jacobian matrix of the current time step;
[0024] If the current step number cannot be divided by the current update frequency, the flux Jacobian matrix of all the discrete equations in the previous time step is determined as the flux Jacobian matrix of all the discrete equations in the current time step.
[0025] In a second aspect, the present application provides a flux Jacobian matrix update frequency adjustment device, comprising:
[0026] A maximum residual determination module is used to determine the maximum residual corresponding to a target discrete equation in the process of iterating a preset number of time steps on a discrete equation group; the discrete equation group is an equation group obtained by discretizing the Navier-Stokes equation group using an implicit time step iteration method; all discrete equations in the discrete equation group include a flux Jacobian matrix and a residual; the target discrete equation is the first equation in the discrete equation group;
[0027] A current residual determination module, used to determine the current residual corresponding to the target discrete equation during the iterative solution of the discrete equation group at the current time step; the current time step is any time step after the preset number of time steps;
[0028] A matrix update determination module is used to determine a current update frequency based on a comparison result between the current residual and a preset residual lower limit and / or the maximum residual, and to determine whether to update the flux Jacobian matrix of the current time step based on the current update frequency.
[0029] In a third aspect, the present application provides an electronic device, including:
[0030] Memory, used to store computer programs;
[0031] A processor is used to execute the computer program to implement the aforementioned flux Jacobian matrix update frequency adjustment method.
[0032] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the aforementioned flux Jacobian matrix update frequency adjustment method.
[0033] In the present application, in the process of iterating a preset number of time steps on a discrete equation group, a maximum residual corresponding to a target discrete equation is determined; the discrete equation group is an equation group obtained by discretizing the Navier-Stokes equation group using an implicit time step iteration method; all discrete equations in the discrete equation group contain a flux Jacobian matrix and a residual; the target discrete equation is the first equation in the discrete equation group; in the process of iteratively solving the discrete equation group at a current time step, a current residual corresponding to the target discrete equation is determined; the current time step is any time step after the preset number of time steps; the current update frequency is determined based on the comparison result between the current residual and the preset residual lower limit and / or the maximum residual, and based on the current update frequency, it is determined whether to update the flux Jacobian matrix of the current time step. It can be seen that the present application first iterates the discrete equation group for a preset number of time steps to determine the maximum residual corresponding to the target discrete equation in the discrete equation group, thereby avoiding the problem of mismatch between the left and right ends of the equation group caused by directly adjusting the update frequency of the flux Jacobian matrix in the initial stage of solving the equation group; then dynamically adjust the update frequency of the flux Jacobian matrix based on the comparison result between the residual corresponding to the target discrete equation in the subsequent time step and the preset residual lower limit and / or maximum residual, so as to determine whether to update the flux Jacobian matrix of the current time step based on the update frequency. Compared with calculating the flux Jacobian matrix once in each time step iteration process, the calculation amount of the flux Jacobian matrix can be effectively reduced, and the computational efficiency of solving the equation group can be greatly improved; and compared with the fixed flux Jacobian matrix update frequency, it can better adapt to the decrease of the residual and ensure the robustness of the solution of the equation group. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0035] Figure 1 A flow chart of a method for adjusting the frequency of updating a flux Jacobian matrix disclosed in the present application;
[0036] Figure 2This is a schematic structural diagram of a flux Jacobian matrix update frequency adjustment device disclosed in this application;
[0037] Figure 3 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] Since the workload of calculating the flux Jacobian matrix is very large in the process of solving the Navier-Stokes equations using the implicit time-step iterative method, which usually accounts for about a quarter of the calculation amount of each time step, it has a great impact on the efficiency of solving the equations. To this end, the present application provides a method for adjusting the update frequency of the flux Jacobian matrix, which reduces the calculation amount of the flux Jacobian matrix by dynamically adjusting the update frequency of the flux Jacobian matrix based on the residual, thereby improving the computational efficiency of solving the equations.
[0040] In the process of solving the Navier-Stokes equations based on the implicit time-step iterative method, the implicit method discretizes the Navier-Stokes equations into a discrete equation system containing left-hand terms and right-hand terms, and all the discrete equations in the discrete equation system contain the flux Jacobian matrix and the residual. The discrete equation system is shown as follows:
[0041] ;
[0042] In the above formula, Ω is the volume of the discrete control volume, M is the mass matrix, Δt is the step size of the current time step, β is the time accuracy parameter, R is the residual, W is the conserved variable, the subscript I represents the control volume unit number, and the superscript n represents the number of steps in the current time step. represents the difference between the conserved variable of the next time step and the conserved variable of the current time step, that is, , is the flux Jacobian matrix. In the above formula, the term on the left side of the equal sign is called the left-hand term, and the term in the square bracket of the left-hand term is called the implicit operator; the term on the right side of the equal sign is called the right-hand term, also known as the explicit operator. The spatial accuracy of the solution of the system of equations depends on the explicit operator, while the implicit operator affects the computational efficiency of solving the system of equations. Among them, the flux Jacobian matrix is usually a 5*5 matrix. The workload of calculating this matrix is very large, usually accounting for about a quarter of the computation of each time step.
[0043] See also Figure 1As shown, an embodiment of the present invention discloses a method for adjusting the update frequency of a flux Jacobian matrix, comprising:
[0044] Step S11, in the process of iterating the discrete equation group for a preset number of time steps, determining the maximum residual corresponding to the target discrete equation; the discrete equation group is a system of equations obtained by discretizing the Navier-Stokes equation group using an implicit time step iteration method; all discrete equations in the discrete equation group contain a flux Jacobian matrix and a residual; the target discrete equation is the first equation in the discrete equation group.
[0045] In this embodiment, if the Navier-Stokes equations contain 5 equations, correspondingly, the discrete equations obtained by discretizing the Navier-Stokes equations using an implicit time step iteration method also contain 5 equations; and all discrete equations in the discrete equations contain flux Jacobian matrices and residuals, and the target discrete equation is the first equation in the discrete equations. It should be noted that the time step iteration solves the physical equations in the time step by continuously iterating to obtain the solution of the equations for each time step. The time step iteration adopts an implicit method in this application. In the implicit method, the physical equations in the time step will be discretized into algebraic equations, but the algebraic equations contain unknowns. The implicit method solves the algebraic equations in the time step by continuously iterating to obtain the solution of the equations for each time step. By adopting the implicit method, it has the advantages of higher stability and higher precision.
[0046] In this embodiment, in the process of iterating the discrete equation group for a preset number of time steps, the flux Jacobian matrices of all discrete equations in each time step are recalculated, so as to obtain a preset number of residuals corresponding to the target discrete equation after the preset number of time steps are iterated, and the maximum residual is determined from the preset number of residuals. Among them, the preset number can be set according to the actual iteration requirements, for example, the preset number is set to 20. Specifically, in the process of iterating the discrete equation group for the first 20 time steps, the flux Jacobian matrices of all discrete equations are recalculated in each time step, that is, the update frequency of the flux Jacobian matrix is 1 time step. The discrete equation group contains five equations, and it is only necessary to count the residuals obtained in the first 20 time steps of the first target discrete equation in the discrete equation group, that is, Res1, Res2,…, Res 20 ; Then select the maximum value from the 20 residuals as the maximum residual, that is, ResMax=max(Res1,Res2,…,Res 20 ).
[0047] Step S12: during the iterative solution of the discrete equation group at the current time step, determine the current residual corresponding to the target discrete equation; the current time step is any time step after the preset number of time steps.
[0048] In this embodiment, each time step after a preset number of time steps is sequentially used as the current time step, and in the process of iteratively solving the discrete equation system at the current time step, the current residual corresponding to the target discrete equation in the current time step is determined. It should be noted that before the discrete equation system is iteratively solved, the maximum number of time step iterations has been preset, and when the current number of steps corresponding to the current time step reaches the preset maximum number of steps, the time step iterative solution process of the discrete equation system is completed, that is, the final solution of the discrete equation system can be obtained.
[0049] Step S13: determining a current update frequency based on a comparison result between the current residual and a preset residual lower limit and / or the maximum residual, and determining whether to update the flux Jacobian matrix of the current time step based on the current update frequency.
[0050] In this embodiment, the preset residual lower limit is specifically determined based on the preset calculation precision, and the preset calculation precision is the precision determined based on the floating point precision; wherein the floating point precision includes single precision and double precision. Specifically, ResFloor=10 -iexp+3 ; ResFloor represents the preset lower limit of residual; iexp represents the preset calculation precision. When the floating point precision is single precision, the preset calculation precision is 8; when the floating point precision is double precision, the preset calculation precision is 16.
[0051] Further, after determining the current residual corresponding to the target discrete equation in the current time step, the current residual reduction magnitude is determined based on the comparison result between the current residual and the preset residual lower limit and / or the maximum residual, and the current update frequency corresponding to the current residual reduction magnitude is determined based on the corresponding relationship between the residual reduction magnitude and the update frequency. For example, after determining the current residual reduction magnitude, if the current residual reduction magnitude is ≤1, the current update frequency of the flux Jacobian matrix is set to be updated once in one time step; if 1<current residual reduction magnitude ≤2, the current update frequency of the flux Jacobian matrix is set to be updated once in two time steps; if 2<current residual reduction magnitude ≤3, the current update frequency of the flux Jacobian matrix is set to be updated once in four time steps; if 3<current residual reduction magnitude ≤4, the current update frequency of the flux Jacobian matrix is set to be updated once in six time steps; if the current residual reduction magnitude>4, the current update frequency of the flux Jacobian matrix is set to be updated once in ten time steps.
[0052] Among them, the determination of the current residual reduction magnitude is specifically carried out by first judging whether the current residual is less than the preset residual lower limit; if the current residual is less than the preset residual lower limit, it indicates that the time step iteration process has entered the convergence interval, therefore, the preset residual reduction magnitude is directly determined as the current residual reduction magnitude, for example, the preset residual reduction magnitude is set to 10, thereby reducing the update frequency of the flux Jacobian matrix. If the current residual is greater than or equal to the preset residual lower limit, it indicates that the time step iteration process has not yet entered the convergence interval, therefore, the current residual reduction magnitude is dynamically adjusted based on the comparison result between the current residual and the maximum residual, and the specific formula is as follows:
[0053] ;
[0054] Among them, ResDown indicates the current residual decrease level; Res indicates the current residual; and ResMax indicates the maximum residual.
[0055] Finally, after determining the current update frequency of the flux Jacobian matrix, determine whether to update the flux Jacobian matrix of the current time step based on the current update frequency. Specifically, determine the current number of steps corresponding to the current time step, and determine whether the current number of steps is divisible by the current update frequency, that is, determine whether the current update frequency is divisible by the current number of steps, that is, determine whether the current number of steps divided by the current update frequency is equal to an integer. If the current number of steps is divisible by the current update frequency, recalculate the flux Jacobian matrix of all discrete equations in the discrete equation group at the current time step to update the flux Jacobian matrix of the current time step, so as to solve the discrete equation group based on the updated flux Jacobian matrix at the current time step, until the current number of steps corresponding to the current time step reaches the preset maximum number of steps, thereby obtaining the final solution of the discrete equation group. If the current number of steps cannot be divided by the current update frequency, the flux Jacobian matrix of all discrete equations in the previous time step is determined as the flux Jacobian matrix of all discrete equations in the current time step, so that the discrete equation system is solved in the current time step based on the flux Jacobian matrix of all discrete equations in the previous time step, until the current number of steps corresponding to the current time step reaches the preset maximum number of steps, thereby obtaining the final solution of the discrete equation system.
[0056] It should be noted that the technical solution in this application can be applied in scenarios where computational fluid dynamics methods are required. For example, the technical solution provided in this embodiment can be used to perform fluid dynamics calculations during the aircraft design process or rocket design process to improve the design efficiency of aircraft, rockets and other aircraft.
[0057] It can be seen that the present application first iterates the discrete equation group for a preset number of time steps to determine the maximum residual corresponding to the target discrete equation in the discrete equation group, thereby avoiding the problem of mismatch between the left and right ends of the equation group caused by directly adjusting the update frequency of the flux Jacobian matrix in the initial stage of solving the equation group; then dynamically adjust the update frequency of the flux Jacobian matrix based on the comparison result between the residual corresponding to the target discrete equation in the subsequent time step and the preset residual lower limit and / or maximum residual, so as to determine whether to update the flux Jacobian matrix of the current time step based on the update frequency. Compared with calculating the flux Jacobian matrix once in each time step iteration process, the calculation amount of the flux Jacobian matrix can be effectively reduced, and the computational efficiency of solving the equation group can be greatly improved; and compared with the fixed flux Jacobian matrix update frequency, it can better adapt to the decrease of the residual and ensure the robustness of the solution of the equation group.
[0058] See also Figure 2 As shown, an embodiment of the present invention discloses a flux Jacobian matrix update frequency adjustment device, comprising:
[0059] A maximum residual determination module 11 is used to determine the maximum residual corresponding to the target discrete equation in the process of iterating the discrete equation group for a preset number of time steps; the discrete equation group is an equation group obtained by discretizing the Navier-Stokes equation group using an implicit time step iteration method; all discrete equations in the discrete equation group include a flux Jacobian matrix and a residual; the target discrete equation is the first equation in the discrete equation group;
[0060] A current residual determination module 12 is used to determine the current residual corresponding to the target discrete equation during the iterative solution of the discrete equation group at the current time step; the current time step is any time step after the preset number of time steps;
[0061] The matrix update determination module 13 is used to determine the current update frequency based on the comparison result between the current residual and the preset residual lower limit and / or the maximum residual, and determine whether to update the flux Jacobian matrix of the current time step based on the current update frequency.
[0062] It can be seen that the present application first iterates the discrete equation group for a preset number of time steps to determine the maximum residual corresponding to the target discrete equation in the discrete equation group, thereby avoiding the problem of mismatch between the left and right ends of the equation group caused by directly adjusting the update frequency of the flux Jacobian matrix in the initial stage of solving the equation group; then dynamically adjust the update frequency of the flux Jacobian matrix based on the comparison result between the residual corresponding to the target discrete equation in the subsequent time step and the preset residual lower limit and / or maximum residual, so as to determine whether to update the flux Jacobian matrix of the current time step based on the update frequency. Compared with calculating the flux Jacobian matrix once in each time step iteration process, the calculation amount of the flux Jacobian matrix can be effectively reduced, and the computational efficiency of solving the equation group can be greatly improved; and compared with the fixed flux Jacobian matrix update frequency, it can better adapt to the decrease of the residual and ensure the robustness of the solution of the equation group.
[0063] In some specific embodiments, the maximum residual error determination module 11 includes:
[0064] The maximum residual determination unit is used to recalculate the flux Jacobian matrix of each time step during the process of iterating the discrete equation group for a preset number of time steps, so as to obtain a preset number of residuals corresponding to the target discrete equation after the preset number of time steps are iterated, and determine the maximum residual from the preset number of residuals.
[0065] In some specific embodiments, the flux Jacobian matrix update frequency adjustment device further includes:
[0066] The residual lower limit determination unit is used to determine the preset residual lower limit based on a preset calculation precision; wherein the preset calculation precision is a precision determined based on the floating point precision; the floating point precision includes single precision and double precision.
[0067] In some specific embodiments, the matrix update determination module 13 includes:
[0068] The update frequency determination submodule is used to determine the current residual reduction magnitude based on the comparison result between the current residual and the preset residual lower limit and / or the maximum residual, and to determine the current update frequency corresponding to the current residual reduction magnitude based on the corresponding relationship between the residual reduction magnitude and the update frequency.
[0069] In some specific embodiments, the update frequency determination submodule includes:
[0070] A residual error judging unit, used to judge whether the current residual error is less than a preset residual error lower limit;
[0071] A first magnitude determining unit, configured to determine a preset residual reduction magnitude as the current residual reduction magnitude if the current residual is less than the preset residual lower limit;
[0072] The second magnitude determining unit is configured to determine a magnitude of decrease of the current residual based on a comparison result between the current residual and the maximum residual if the current residual is greater than or equal to the preset residual lower limit.
[0073] In some specific embodiments, the second magnitude determining unit includes:
[0074] ;
[0075] Among them, ResDown represents the magnitude of the current residual decrease; Res represents the current residual; and ResMax represents the maximum residual.
[0076] In some specific embodiments, the matrix update determination module 13 includes:
[0077] a divisibility judgment unit, used to determine a current step number corresponding to the current time step, and to judge whether the current step number is divisible by the current update frequency;
[0078] A matrix updating unit, configured to recalculate the flux Jacobian matrix of all the discrete equations at the current time step if the current step number is divisible by the current update frequency, so as to update the flux Jacobian matrix of the current time step;
[0079] A matrix determination unit is used to determine the flux Jacobian matrix of all discrete equations in the previous time step as the flux Jacobian matrix of all discrete equations in the current time step if the current step number cannot be divided by the current update frequency.
[0080] Furthermore, the present application also discloses an electronic device. Figure 3 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0081] Figure 3 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the flux Jacobian matrix update frequency adjustment method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0082] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0083] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0084] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, and can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the flux Jacobian matrix update frequency adjustment method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0085] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed flux Jacobian matrix update frequency adjustment method is implemented. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, and no further description will be given here.
[0086] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0087] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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 application.
[0088] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0089] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0090] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for adjusting the frequency of updating a flux Jacobian matrix, characterized in that: Applications in aircraft design, including: In the process of iterating a preset number of time steps on a discrete equation group, determining a maximum residual corresponding to a target discrete equation; the discrete equation group is an equation group obtained by discretizing the Navier-Stokes equation group using an implicit time step iteration method; all discrete equations in the discrete equation group include a flux Jacobian matrix and a residual; the target discrete equation is the first equation in the discrete equation group; In the process of iteratively solving the discrete equation group at a current time step, determining a current residual corresponding to the target discrete equation; the current time step is any time step after the preset number of time steps; Determine a current update frequency based on a comparison result between the current residual and a preset residual lower limit and / or the maximum residual, and determine whether to update the flux Jacobian matrix of the current time step based on the current update frequency; Wherein, determining whether to update the flux Jacobian matrix of the current time step based on the current update frequency includes: Determining a current step number corresponding to the current time step, and determining whether the current step number is divisible by the current update frequency; If the current number of steps is divisible by the current update frequency, the flux Jacobian matrices of all the discrete equations are recalculated at the current time step to update the flux Jacobian matrix of the current time step; If the current step number cannot be divided by the current update frequency, the flux Jacobian matrix of all the discrete equations in the previous time step is determined as the flux Jacobian matrix of all the discrete equations in the current time step.
2. The flux Jacobian matrix update frequency adjustment method according to claim 1, characterized in that: The step of determining the maximum residual corresponding to the target discrete equation during the process of iterating the discrete equation set for a preset number of time steps includes: In the process of iterating the discrete equation group for a preset number of time steps, the flux Jacobian matrix of each time step is recalculated to obtain a preset number of residuals corresponding to the target discrete equation after the preset number of time steps are iterated, and the maximum residual is determined from the preset number of residuals.
3. The flux Jacobian matrix update frequency adjustment method according to claim 1, characterized in that: Before determining the current update frequency based on the comparison result between the current residual and the preset residual lower limit and / or the maximum residual, the method further includes: The preset residual lower limit is determined based on a preset calculation precision; wherein the preset calculation precision is a precision determined based on a floating point number precision; the floating point number precision includes single precision and double precision.
4. The flux Jacobian matrix update frequency adjustment method according to claim 1, characterized in that: The determining the current update frequency based on a comparison result between the current residual and a preset residual lower limit and / or the maximum residual includes: The current residual reduction magnitude is determined based on a comparison result between the current residual and a preset residual lower limit and / or the maximum residual, and the current update frequency corresponding to the current residual reduction magnitude is determined based on a correspondence between the residual reduction magnitude and the update frequency.
5. The flux Jacobian matrix update frequency adjustment method according to claim 4, characterized in that: The determining the current residual reduction magnitude based on a comparison result between the current residual and a preset residual lower limit and / or the maximum residual includes: Determine whether the current residual is less than a preset residual lower limit; If the current residual is less than the preset residual lower limit, the preset residual reduction magnitude is determined as the current residual reduction magnitude; If the current residual is greater than or equal to the preset residual lower limit, the magnitude of the current residual decrease is determined based on a comparison result between the current residual and the maximum residual.
6. The flux Jacobian matrix update frequency adjustment method according to claim 5, characterized in that: The determining the current residual reduction magnitude based on a comparison result between the current residual and the maximum residual comprises: ; in, ResDown Indicates the magnitude of the current residual decrease; Res represents the current residual; ResMax represents the maximum residual.
7. A flux Jacobian matrix update frequency adjustment device, characterized in that: Applications in aircraft design, including: A maximum residual determination module is used to determine the maximum residual corresponding to a target discrete equation in the process of iterating a preset number of time steps on a discrete equation group; the discrete equation group is an equation group obtained by discretizing the Navier-Stokes equation group using an implicit time step iteration method; all discrete equations in the discrete equation group include a flux Jacobian matrix and a residual; the target discrete equation is the first equation in the discrete equation group; A current residual determination module, used to determine the current residual corresponding to the target discrete equation during the iterative solution of the discrete equation group at the current time step; the current time step is any time step after the preset number of time steps; A matrix update determination module, used to determine a current update frequency based on a comparison result between the current residual and a preset residual lower limit and / or the maximum residual, and determine whether to update the flux Jacobian matrix of the current time step based on the current update frequency; Among them, the matrix update determination module is specifically used to: determine the current step number corresponding to the current time step, and judge whether the current step number is divisible by the current update frequency; if the current step number is divisible by the current update frequency, then recalculate the flux Jacobian matrix of all discrete equations in the current time step to update the flux Jacobian matrix of the current time step; if the current step number is not divisible by the current update frequency, then determine the flux Jacobian matrix of all discrete equations in the previous time step as the flux Jacobian matrix of all discrete equations in the current time step.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the flux Jacobian matrix update frequency adjustment method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the flux Jacobian matrix update frequency adjustment method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Aero-engine model iterative algorithm based on hybrid adaptive differential evolution
CN112131670A
Turbine damping blade response solving method and system based on correction coefficient
CN115688508A
Electromagnetic characteristic analysis method, device and equipment of target object and medium
CN115879276A
Systems and methods for fast and precise frequency estimation
US20130322580A1
Convergence Estimation OF Non-Linear PDE And Linear Solvers
US20170185707A1
