An Adaptive Time-Progression Computational Method for Unsteady Fluid Simulation
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2026-08-14
AI Technical Summary
因此,如果采用固定的时间步长Δt,则会在流体速度u较小,网格长度Δx较大(即克朗数过小)的时间段内具有较低的时间推进速度,或是在流体速度u较小,网格长度Δx较大(即克朗数过大)的时间段内具有较差的计算精准度
[0030] (1) This invention uses a recursive function to continuously divide the solution steps into two parts until the smallest time step that meets the requirements of accurate solution is decomposed. The time step interval can be flexibly determined according to the transient characteristics of the flow field at different times, thereby improving the calculation speed and accuracy of fluid unsteady numerical simulation.
Smart Images

Figure CN117236128B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computational fluid dynamics technology, and in particular relates to a time-progression calculation method for unsteady numerical simulation of fluids. Background Technology
[0002] Numerical simulation is an important tool in fluid mechanics research. Generally speaking, whether it is a numerical simulation of a steady or unsteady fluid problem, it is necessary to use algorithms for time progression to simulate the fluid evolution process. Steady problems usually study the fluid state that tends to stabilize after evolution, while unsteady problems usually focus on the process of fluid state evolution itself, thus requiring higher accuracy from the time progression algorithm.
[0003] In numerical simulations of fluid mechanics, the discrete time step method is commonly used. The typical approach is to pre-define a fixed time step Δt, use the fluid state at time t to calculate the partial derivatives of each fluid variable with respect to time, and then use methods such as TVD, Runge-Kutta, etc., to calculate the fluid state at time t+Δt, thus achieving time progression in the numerical simulation.
[0004] In unsteady numerical simulations of fluids, the time step Δt is a crucial parameter. If this value is too small, time progression is slow, resulting in low computational efficiency; if it is too large, it reduces computational accuracy and may even cause divergence in results and program crashes. The required value for Δt is generally described by the Cronowski number (CFL), a dimensionless quantity defined as...
[0005]
[0006] In the formula, u is the velocity of the fluid within the grid, and Δx is the grid length. It is generally considered that a Kronen number of around 0.5 is preferable, as it ensures both the accuracy and reliability of the results while allowing for faster computation.
[0007] In unsteady numerical simulations of fluids, fluid state parameters may undergo drastic changes, with the fluid velocity u potentially varying across two to three orders of magnitude. In some dynamic mesh algorithms, the mesh length Δx may also change significantly. Therefore, using a fixed time step Δt will result in either a slow time progression during periods with low fluid velocity u and high mesh length Δx (i.e., a small Cronbach's alpha number) or poor computational accuracy during periods with low fluid velocity u and high mesh length Δx (i.e., a large Cronbach's alpha number). Summary of the Invention
[0008] The technical problem solved by this invention is to overcome the shortcomings of the prior art and provide an adaptive time-progression calculation method for fluid unsteady simulation, which is used to realize recursive adaptive time progression for fluid unsteady numerical simulation, thereby improving the calculation speed and accuracy of fluid unsteady numerical simulation.
[0009] The objective of this invention is achieved through the following technical solution: an adaptive time-progression calculation method for unsteady fluid simulation, comprising:
[0010] (1) Before the calculation begins, complete the fluid mesh generation, determine the initial state of the fluid in each mesh, and complete the assignment of relevant variables. Set the time step index i = 0 and t0 = 0 at the initial time t0.
[0011] (2) Set the storage time interval Δt save Calculate the stopping time t limit And the upper limit of the crown number CFL limit ;
[0012] (3) Let the current calculation time step Δt i =Δt save ;
[0013] (4) At the current time t i The current calculation time step Δt i and the fluid parameter matrix M of each mesh of the current fluid i As input, the recursive time-progression function f TM (t i ,Δt i M i ), calculate t i+1 =t i +Δt save Fluid parameter state M at time t i+1 ;
[0014] (5) Store fluid parameter states and perform time checks; if the current time t i ≥t limit The calculation ends if i+1 is assigned to the time step index i, and steps (3) to (5) are repeated until i = 0 to t is obtained. limit / Δt save The fluid parameter states at all times between.
[0015] The fluid mesh can be divided into one-dimensional, two-dimensional, or three-dimensional spaces.
[0016] The relevant variables include density, pressure, velocity, temperature, enthalpy, and internal energy.
[0017] The specific form of the recursive time progression function is M. tar =f TM (t ini ,Δt,M ini ), where M on the left side of the equals sign tar The result of the recursive time progression function is t. tar Fluid parameter state M at time tar In the recursive time-progression function, the input condition t is used... ini , Δt and M ini Calculate M tar The process includes:
[0018] (a) Calculate the crown number CFL for each grid cell to obtain the maximum crown number CFL for all grid cells. max If CFL max <CFL limit If yes, then execute (b); otherwise execute (c).
[0019] (b) Obtain M by performing the minimum step time advance. tar ;
[0020] (c) Halve the time step and perform two time advances to obtain M. tar ;
[0021] In the above calculations, the subscript ini represents the initial time of the time step; the subscript tar represents the target time of the time step. tar =t ini +Δt, where Δt represents the time step.
[0022] The minimum step time is used to advance to obtain M. tar This includes: calculating the rate of change of each fluid variable within each grid over time, and thus obtaining t. tar All fluid parameters M within each grid at any given time tar .
[0023] Halve the time step and perform two time advances to obtain M. tar This includes: executing the recursive time-progression function M once. mid =f TM (t ini ,0.5Δt,M ini ), obtain t mid =t ini At time +0.5Δt, all fluid parameters M within each grid mid And execute the recursive time-progression function M again. tar =f TM (t mid ,0.5Δt,M mid ) obtain ttar All fluid parameters M within each grid at any given time tar .
[0024] The crown number (CFL) of each grid is calculated using the following formula:
[0025]
[0026] In the formula, u is the velocity of the fluid within the grid, and Δx is the length of the grid.
[0027] The method for performing minimum step time advancement adopts the TVD method or the Runge-Kutta method.
[0028] The calculation of the rate of change of each fluid variable over time within each grid is performed using either the finite difference method or the finite volume method.
[0029] Compared with the prior art, the present invention has the following advantages:
[0030] (1) This invention uses a recursive function to continuously divide the solution steps into two parts until the smallest time step that meets the requirements of accurate solution is decomposed. The time step interval can be flexibly determined according to the transient characteristics of the flow field at different times, thereby improving the calculation speed and accuracy of fluid unsteady numerical simulation.
[0031] (2) This invention adopts a recursive approach to achieve adaptive time progression. Time progression at different time scales is achieved by repeatedly calling the same function. The code is concise, the logic is clear, and it is easy to debug, use and further optimize. Attached Figure Description
[0032] Figure 1 This is a flowchart illustrating the overall implementation of the present invention for unsteady numerical simulation of fluids.
[0033] Figure 2 This is a flowchart illustrating the implementation of the recursive time-progression function used in this invention.
[0034] Figure 3 This is a schematic diagram illustrating a typical calculation process for time step advancement using the method described in this invention. Detailed Implementation
[0035] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0036] like Figure 1 As shown, this invention provides an adaptive time-progression calculation method for unsteady fluid simulation. It includes the following steps:
[0037] (1) Before the calculation begins, complete the fluid mesh generation, determine the initial state of the fluid in each mesh, and complete the assignment of relevant variables. Set the time step index i = 0 and t0 = 0 at the initial time t0.
[0038] (2) Set the storage time interval Δt save Calculate the stopping time t limit And the upper limit of the crown number CFL limit ;
[0039] (3) Let the current calculation time step Δt i =Δt save ;
[0040] (4) At the current time t i The current calculation time step Δt i and the fluid parameter matrix M of each mesh of the current fluid i As input, the recursive time-progression function f TM (t i ,Δt i M i ), calculate t i+1 =t i +Δt save Fluid parameter state M at time t i+1 ;
[0041] (5) Store fluid parameter states and perform time checks; if the current time t i ≥t limit The calculation ends if i+1 is assigned to the time step index i, and steps (3) to (5) are repeated until i = 0 to t is obtained. limit / Δt save The fluid parameter states at all times between.
[0042] The mesh division described in step (1) can be a mesh division of the fluid in one-dimensional space, two-dimensional space or three-dimensional space.
[0043] The relevant variables mentioned in step (1) include density, pressure, velocity, temperature, enthalpy, and internal energy.
[0044] The specific form of the recursive time progression function is M. tar =f TM (t ini ,Δt,M ini ), where M on the left side of the equals sign tar The result of the recursive time progression function is t. tar Fluid parameter state M at time tar In the recursive time-progression function, the input condition t is used... ini , Δt and M ini Calculate M tar The process includes:
[0045] (a) Calculate the crown number CFL for each grid cell to obtain the maximum crown number CFL for all grid cells. max If CFL max <CFL limit If yes, then execute (b); otherwise execute (c).
[0046] (b) Obtain M by performing the minimum step time advance. tar ;
[0047] (c) Halve the time step and perform two time advances to obtain M. tar ;
[0048] In the above calculations, the subscript ini represents the initial time of the time step; the subscript tar represents the target time of the time step. tar =t ini +Δt, where Δt represents the time step.
[0049] The minimum step time is used to advance to obtain M. tar This includes: calculating the rate of change of each fluid variable within each grid over time, and thus obtaining t. tar All fluid parameters M within each grid at any given time tar .
[0050] Halve the time step and perform two time advances to obtain M. tar This includes: executing the recursive time-progression function M once. mid =f TM (t ini ,0.5Δt,M ini ), obtain t mid =tini At time +0.5Δt, all fluid parameters M within each grid mid And execute the recursive time-progression function M again. tar =f TM (t mid ,0.5Δt,M mid ) obtain t tar All fluid parameters M within each grid at any given time tar .
[0051] The crown number of each grid is calculated using the following formula:
[0052]
[0053] In the formula, u is the velocity of the fluid within the grid, and Δx is the grid length.
[0054] The calculation method for completing the minimum step time advancement can be either the TVD method or the Runge-Kutta method.
[0055] The calculation of the rate of change of each fluid variable over time within each grid is performed using either the finite difference method or the finite volume method.
[0056] This invention provides an adaptive time-stepping calculation method for unsteady fluid simulation. Addressing the need for time step adjustment in unsteady fluid numerical simulation, it sets separate storage and calculation advance time intervals. Utilizing a recursive approach, it first judges the rationality of the time step before advancing the simulation. If the requirement is met, the minimum step size is advanced; otherwise, the time step size is halved and the process is repeated twice. This achieves adaptive adjustment of the time step during time advancement, improving the calculation speed and accuracy of unsteady fluid numerical simulation.
[0057] This invention can be applied to unsteady numerical simulation of fluids, and the implementation flowchart is as follows. Figure 1 As shown.
[0058] Before the calculation begins, the program needs to mesh the fluid, determine the initial state of the fluid within each mesh, and assign initial values to the corresponding fluid variables. A pre-defined storage time interval Δt is also required. save Calculate the stopping time point t limit and the upper limit of the crown number CFL limit Let the calculation start time be t = 0.
[0059] The program stores the time interval Δt. save Time is advanced based on the base time step, that is, within the i-th storage time interval, the initial value of time is t = (i-1)Δt. save The initial value of the time step is Δt = Δtsave At this point, the recursive time progression function is called. After the function returns, all variables are stored. At this point, t = i * Δt save This allows for the calculation of the next storage time interval.
[0060] The computational flow within the recursive time-progression function is as follows: Figure 2 As shown, the logic is as follows: First, using the fluid parameter variables at time t, calculate the Cron number for each grid cell. Then, find the maximum Cron number (CFL) for all grid cells. max Determine CFL max Is it smaller than CFL? limit If CFL max <CFL limit Then proceed with the minimum step time advance; if CFL max ≥CFL limit Then Δt is halved, and the recursive time advance function is called twice.
[0061] The minimum step time advance calculation method is as follows: Based on the grid division and data discretization method, calculate the rate of change of each fluid variable with time in each grid, and use methods such as TVD and Runge-Kutta to calculate the distribution at time t+Δt using the fluid parameter distribution at time t. Finally, assign the value of t+Δt to t to complete the minimum step time advance.
[0062] This invention can also be applied to typical calculations of time step progression, such as... Figure 3 As shown. During the program initialization phase, mesh generation is performed, initial values are assigned to fluid parameter variables, and the storage time interval Δt is preset. save Calculate the stopping time point t limit and the upper limit of the crown number CFL limit At the beginning of the first storage time interval, t = 0, Δt = Δt save Calculate the maximum CFL value for all grid cells. max After assessment, CFL max Less than CFL limit The process proceeds with the minimum step time increment to obtain the flow information at time t+Δt, updates the value of t to t+Δt, and assigns values to the fluid parameter variables. At the beginning of the i-th storage time interval, t = (i-1)Δt. save , Δt=Δt save At this point, it was determined that CFL max Greater than CFL limit Δt is halved, that is, let Δt = 0.5Δt save After further evaluation, CFL... max Still larger than CFL limit Δt is halved again, that is, let Δt = 0.25Δt. saveAt this time, CFL max Less than CFL limit This allows for a minimum step time advance, yielding (i-0.75)Δt. save Information flowing through time. Let t = (i - 0.75)Δt save And determine the crown number, at which point CFL max Less than CFL limit This allows for a minimum step time advance, yielding (i-0.5)Δt. save Information flowing at any given moment. At this point, Δt = 0.5Δt save After assessment, CFL max Less than CFL limit This allows for a minimum step time progression, yielding i*Δt. save The process involves storing data and then terminating the calculation for the i-th storage time interval. The calculation flow described in this section is merely an example; in actual applications, the minimum advance time step is automatically calculated and determined by the program. Therefore, the recursive calculation process is not subject to the flow described above. Figure 3 Restrictions.
[0063] This invention can flexibly determine the time advance interval based on the transient characteristics of the flow field at different times, thereby improving the calculation speed and accuracy of unsteady fluid numerical simulation. Furthermore, this invention employs a recursive approach to achieve adaptive time advancement, resulting in simple code, clear logic, and ease of debugging, use, and further modification.
[0064] Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make possible changes and modifications to the technical solutions of the present invention by utilizing the methods and techniques disclosed above without departing from the spirit and scope of the present invention. Therefore, any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solutions of the present invention shall fall within the protection scope of the technical solutions of the present invention.
Claims
1. An adaptive time-progression calculation method for unsteady fluid simulation, characterized in that, include: (1) Before the calculation begins, complete the fluid mesh generation, determine the initial state of the fluid in each mesh and assign values to the relevant variables, and set the time step index i=0 and t0=0 at the initial time t0. (2) Set the storage time interval Δt save Calculate the stopping time t limit and the upper limit of the crown number CFL limit ; (3) Let the current calculation time step Δt i =Δt save ; (4) Using the current time t i The current calculation time step Δt i and the fluid parameter matrix M of each mesh of the current fluid i As input, the recursive time-progression function f TM (t i , Δt i M i ), calculate t i+1 = t i +Δt save Fluid parameter state M at time t i+1 ; (5) Store the fluid parameter state data and perform time judgment. If the current time t i ≥t limit Then end the calculation; otherwise, assign i+1 to the time step index i and repeat steps (3) to (5) until i=0~t is obtained. limit / Δt save The fluid parameter states at all times between; The specific form of the recursive time progression function is M. tar = f TM (t ini , Δt, M ini ), where M tar The result of the recursive time progression function is t. tar Fluid parameter state M at time tar ; In the recursive time-progression function, the input condition t is used... ini , Δt and M ini Calculate M tar The process includes: (a) Calculate the crown number CFL for each grid cell to obtain the maximum crown number CFL for all grid cells. max If CFL max <CFL limit If yes, then execute (b); otherwise execute (c). (b) Obtain M by performing minimum step time progression. tar ; (c) Halve the time step and perform two time advances to obtain M. tar ; Wherein, the subscript ini represents the initial time of the time step; the subscript tar represents the target time of the time step; and t tar =t ini +Δt, where Δt represents the advance time step; The minimum step time is used to advance to obtain M. tar This includes: calculating the rate of change of each fluid variable within each grid over time, and thus obtaining t. tar All fluid parameters M within each grid at any given time tar ; Halve the time step and perform two time advances to obtain M. tar This includes: executing the recursive time-progression function M once. mid =f TM (t ini ,0.5Δt,M ini ), obtain t mid =t ini At time +0.5Δt, all fluid parameters M within each grid mid And execute the recursive time-progression function M again. tar =f TM (t mid , 0.5Δt, M mid ) Obtain t tar All fluid parameters M within each grid at any given time tar The subscript mid indicates the intermediate moment of the time step. The crown number (CFL) of each grid is calculated using the following formula: In the formula, u is the velocity of the fluid within the grid, and Δx is the length of the grid.
2. The adaptive time-progression calculation method for unsteady fluid simulation according to claim 1, characterized in that: The fluid mesh can be divided into one-dimensional, two-dimensional, or three-dimensional spaces.
3. The adaptive time-progression calculation method for unsteady fluid simulation according to claim 1, characterized in that: The relevant variables include density, pressure, velocity, temperature, enthalpy, and internal energy.
4. The adaptive time-progression calculation method for unsteady fluid simulation according to claim 1, characterized in that: The TVD method or Runge-Kutta method is used for minimum step long-time advancement.
5. The adaptive time-progression calculation method for unsteady fluid simulation according to claim 1, characterized in that: The calculation of the rate of change of each fluid variable over time within each grid is performed using either the finite difference method or the finite volume method.
Citation Information
Patent Citations
Large deformation motion numerical simulation method based on interpolation deformation grid
CN113111553A
Computational fluid dynamics simulation method and apparatus based on quantum algorithm, and device
WO2022027916A1