Large-time-step shallow water flow simulation method and system based on HLL format

By adopting the large time step method of HLL format in shallow water flow simulation, the sparse wave fracture problem in traditional methods is solved, and efficient and accurate shallow water flow simulation is achieved, breaking through the limitations of CFL conditions, improving the calculation efficiency and accurate results are achieved. sex.

CN119312713APending Publication Date: 2025-01-14YANGZHOU UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411238282.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

There are limitations in the solution method of traditional shallow water equations, especially the large time step method based on the Roe format will produce illegal entropy solutions such as sparse wave fracture, which will affect the calculation efficiency and the accuracy of the result.

Method used

Using the large time step method based on the HLL format, by obtaining the river parameter division unit, calculating the interface state value and time step, updating the state value of each river unit, determining whether the interface is the last interface, and meeting specific conditions Perform calculation and update of wave velocity and wave strength to avoid wave splitting correction.

Benefits of technology

It improves the calculation efficiency and result accuracy, can correctly simulate sparse waveforms, breaks through the limitations of CFL conditions, greatly improves the calculation efficiency, and does not require entropy correction of wave splitting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119312713A_ABST
    Figure CN119312713A_ABST
Patent Text Reader

Abstract

The invention discloses a large-time-step shallow water flow simulation method based on an HLL format, and the method comprises the steps: obtaining a river channel parameter, dividing a river channel into a plurality of units according to the river channel parameter, and taking a river channel water flow initial value as a state value in each river channel unit; calculating an interface state value between the river channel units according to the state value in each river channel unit, and obtaining a time step length according to a preset CFL value and a CFL theorem; updating the state value in each river channel unit by using the time step length and the state value of the interface between the river channel units to obtain a shallow water flowing state value of each river channel unit at the next moment, judging whether the interface of each river channel unit is the last interface or not, and if not, repeating the operation of calculating the state value of the interface between the river channel units; according to the method, the first judgment is performed on the shallow water flow simulation time of the river channel unit, and if the simulation time does not reach the preset simulation time, the river channel shallow water flow simulation operation is repeated, so that the limitation of CFL conditions is broken through, and the illegal entropy solution is avoided while the calculation efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of shallow water dynamics, and in particular to a method and system for simulating shallow water flow with a large time step based on an HLL format. Background Art

[0002] Shallow water flow refers to the flow in which the horizontal movement scale is much larger than the vertical movement scale. It is characterized by negligible vertical flow velocity and acceleration, so that the water pressure is close to the static pressure distribution, there is a free liquid surface, and gravity is the main driving force. Usually, the water flow in the river channel can be considered as shallow water flow. The shallow water equation is an important mathematical model in hydraulics to describe shallow water flow. Therefore, the simulation of shallow water flow state is mainly achieved by solving the shallow water equation.

[0003] Shallow water equations are partial differential equations and are difficult to solve directly. Currently, the numerical simulation of such equations is to solve them discretely. In order to improve computational efficiency, the industry has proposed to consider the use of a large time step format for simulating nonlinear hyperbolic partial differential equations. By changing the original update method, the CFL number limitation is broken, and the computational efficiency is greatly improved. The previously proposed large time step format is based on the Roe format, which will produce entropy-violating solutions such as sparse wave breaks. The present invention proposes a large time step method based on the HLL format, which can solve this problem well. Summary of the invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the technical problem solved by the present invention is: the present invention solves the limitations brought by the traditional solution method of shallow water equations, and the problem that the previously proposed solution method is based on the Roe format, which will produce entropy-violating solutions such as sparse wave breaking.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In a first aspect, the present invention provides a method for simulating shallow water flow with a large time step based on the HLL format, comprising:

[0008] Acquire river channel parameters, divide the river channel into multiple units according to the river channel parameters, and use the initial value of the river channel flow as the state value in each river channel unit;

[0009] The shallow water flow simulation of the river channel includes calculating the interface state value between each river channel unit according to the state value in each river channel unit, and obtaining the time step according to the preset CFL value and CFL theorem;

[0010] Using the time step and the state value of the interface between each channel unit, the state value in each channel unit is updated to obtain the shallow water flow state value of each channel unit at the next moment, and whether the channel unit interface is the last interface is determined. If it is not the last interface, the operation of calculating the state value of the interface between each channel unit is repeated;

[0011] A first judgment is made on the shallow water flow simulation time of the river unit, wherein the first judgment includes repeating the shallow water flow simulation operation of the river if the simulation time has not reached the preset simulation time.

[0012] As a preferred solution of the method for simulating shallow water flow with a large time step based on the HLL format of the present invention, the calculation of the interface state value between each channel unit includes:

[0013] According to the state value in each channel unit, the left and right state values ​​of the interface between each channel unit are determined as the initial conditions, and the transition variables at the interface are calculated:

[0014] If the water depth on both sides of the interface is 0, then the intermediate variable at the interface is also 0, and the wave speed on both sides of the interface is also 0;

[0015] If the water depth on the left side is 0, the intermediate variable at the interface is also 0, and the wave speed on the left side of the interface is The wave velocity on the right side of the interface is The characteristic wave velocity of the right unit is

[0016] If the water depth on the right side is 0, the intermediate variable at the interface is also 0, and the wave velocity on the left side of the interface is the characteristic wave velocity of the left unit. The wave speed on the right side of the interface is

[0017] If the water depth on the left and right sides of the interface is not 0, the water depth in the intermediate state at the interface is:

[0018] Among them, u R 、u L is the flow velocity on the right and left sides of the interface, h R 、h L is the water depth on the left side of the interface, c L 、c R is the wave velocity of the left and right units, g is the acceleration of gravity;

[0019] According to the states on the left and right sides of the interface, the wave velocities on the left and right sides of the interface, the intermediate state at the interface, and the left and right waves generated at the interface are calculated.

[0020] As a preferred solution of the method for simulating shallow water flow with a large time step based on the HLL format of the present invention, the calculation of the wave speed on the left and right sides of the interface includes:

[0021] When the water depth on both sides is not 0:

[0022] For the left side of the interface, if the water depth in the intermediate state at the interface is less than the water depth on the left side of the interface, the wave velocity on the left side of the interface is the characteristic wave velocity of the left unit;

[0023] If the water depth in the middle state at the interface is less than the water depth on the left side of the interface, the condition is not met, then the result of the water depth in the middle state plus the water depth on the left side of the interface is multiplied by the water depth in the middle state divided by the water depth on the left side of the interface multiplied by one-half, and the square root is multiplied by the left unit wave velocity, and the above result is subtracted from the flow velocity on the left side of the interface to obtain the wave velocity on the left side of the interface;

[0024] For the right side of the interface, if the water depth in the intermediate state at the interface is less than the water depth on the right side of the interface, the wave velocity on the right side of the interface is the characteristic wave velocity of the right unit;

[0025] If the water depth in the intermediate state at the interface is less than the water depth on the right side of the interface, the condition is not met, then the result of the water depth in the intermediate state plus the water depth on the right side of the interface is multiplied by the water depth in the intermediate state divided by the water depth on the right side of the interface multiplied by one-half and the square root is taken. The square root result is multiplied by the unit wave velocity on the right side, and the flow velocity on the right side of the interface is added to the above result to obtain the wave velocity on the right side of the interface.

[0026] As a preferred solution of the method for simulating shallow water flow with a large time step based on the HLL format of the present invention, the intermediate state at the interface includes:

[0027] If the wave speed on the left side of the interface is equal to the wave speed on the right side, the HLL intermediate state is 0;

[0028] If the condition that the wave velocity on the left side of the interface is equal to the wave velocity on the right side is not met, then the conserved variable on the right side of the interface is multiplied by the wave velocity on the right side of the interface minus the conserved variable on the left side of the interface multiplied by the wave velocity on the left side of the interface plus the physical flux on the left side of the interface minus the physical flux on the right side of the interface to obtain the result, and divide the result by the wave velocity on the right side of the interface minus the wave velocity on the left side of the interface to obtain the HLL intermediate state.

[0029] As a preferred solution of the method for simulating shallow water flow with a large time step based on the HLL format of the present invention, the left and right waves generated at the interface include:

[0030] For the wave on the left side of the interface, if the wave velocity is greater than 0, the wave intensity is the conserved variable on the left side of the interface minus the conserved variable on the right side of the interface;

[0031] If the condition that the wave velocity on the left side of the interface is greater than 0 is not satisfied, the wave intensity is the HLL intermediate state minus the conserved variable on the left side;

[0032] For the wave on the right side of the interface, if the wave velocity is less than 0, the wave intensity is the conserved variable on the right side of the interface minus the conserved variable on the left side of the interface;

[0033] If the condition that the wave velocity on the right side of the interface is less than 0 is not satisfied, the wave intensity is the HLL intermediate state minus the conserved variable on the right side.

[0034] As a preferred solution of the method for simulating shallow water flow with a large time step based on the HLL format of the present invention, the updating of the state value in each river channel unit includes:

[0035] For complete wave and unit wave velocity update, when the wave velocity at the interface between units is greater than 0, it means that the wave propagates to the right, and a wave intensity is added to each of the b units on the right side of the unit interface;

[0036] When the wave velocity at the interface between units is less than 0, it means that the wave propagates to the left, and a wave intensity is added to each of the b units on the left side of the unit interface;

[0037] For partial wave and unit wave velocity update, for the b+1th unit of the partial wave, a random number between 0 and 1 is taken. If |ab| is less than the random number, the b+1th unit remains unchanged;

[0038] If |ab| is greater than or equal to a random number, a wave intensity is added to the unit.

[0039] As a preferred solution of the method for simulating shallow water flow with a large time step based on the HLL format of the present invention, the first judgment of the simulation time of shallow water flow of the river unit includes:

[0040] If the total calculation time is less than the preset total time, the next cycle is performed to repeat the shallow water flow simulation operation in the river;

[0041] If the total calculation time is less than the preset total time, the calculation ends and the result is output.

[0042] In a second aspect, the present invention provides a system for simulating shallow water flow with a large time step based on the HLL format, comprising:

[0043] A division module, used for obtaining river channel parameters, dividing the river channel into a plurality of units according to the river channel parameters, and taking the initial value of the river channel flow as the state value in each river channel unit;

[0044] The calculation module is used for simulating shallow water flow in a river channel, including calculating the state value of the interface between each river channel unit according to the state value in each river channel unit, and obtaining the time step according to the preset CFL value and CFL theorem;

[0045] An updating module is used to update the state value in each channel unit by using the time step and the interface state value between each channel unit, obtain the shallow water flow state value of each channel unit at the next moment, and determine whether the channel unit interface is the last interface. If it is not the last interface, the operation of calculating the interface state value between each channel unit is repeated;

[0046] The judgment module is used to make a first judgment on the shallow water flow simulation time of the river unit. The first judgment includes repeating the river shallow water flow simulation operation if the simulation time has not reached the preset simulation time.

[0047] In a third aspect, the present invention provides a computing device, comprising:

[0048] Memory and processor;

[0049] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the method for simulating shallow water flow with a large time step based on the HLL format are implemented.

[0050] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, can implement the steps of the method for simulating shallow water flow with a large time step based on the HLL format.

[0051] Beneficial effects of the present invention: The method for simulating shallow water flow with a large time step based on the HLL format proposed in the present invention has high accuracy of results. For sparse waves, the correct sparse wave pattern can be obtained without entropy correction of wave splitting; the calculation efficiency is high, and a large time step format is used to simultaneously update multiple units on both sides of the interface, breaking through the limitations of the CFL conditions and greatly improving the calculation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:

[0053] Figure 1 The overall flow chart of a method for simulating shallow water flow with a large time step based on the HLL format provided by the present invention;

[0054] Figure 2 A schematic diagram of two waves generated by adjacent cells passing through multiple cells in a method for simulating shallow water flow with a large time step based on the HLL format provided by the present invention;

[0055] Figure 3 A schematic diagram of the initial conditions of adjacent cells of a method for simulating shallow water flow with a large time step based on the HLL format provided by the present invention is provided;

[0056] Figure 4 A schematic diagram of the Riemann solution structure of a method for simulating shallow water flow with a large time step based on the HLL format provided by the present invention;

[0057] Figure 5 A schematic diagram of a single wave passing through multiple units of a method for simulating shallow water flow with a large time step based on the HLL format provided by the present invention;

[0058] Figure 6 A water level initial condition diagram of a method for simulating shallow water flow with a large time step based on the HLL format provided by the present invention;

[0059] Figure 7 The present invention provides a method for simulating shallow water flow with a large time step based on the HLL format and the results calculated by the method of the present invention. DETAILED DESCRIPTION

[0060] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0061] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0062] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0063] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0064] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0065] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0066] Example 1

[0067] Reference Figure 1-5 , as an embodiment of the present invention, provides a method for simulating shallow water flow with a large time step based on the HLL format, comprising:

[0068] S100: Acquire river channel parameters, divide the river channel into multiple units according to the river channel parameters, and use the initial value of the river channel flow as the state value in each river channel unit;

[0069] Specifically, the river channel parameters include the length and width of the river channel, the initial state of the river flow, the initial state envelope of the river flow, the water depth, flow velocity, upstream inlet flow and downstream water level at the initial moment;

[0070] The river channel is divided into multiple units along the length direction, and the initial state of the river flow is used as the state value in each river channel unit. The total length of the river channel is divided by the number of river channel units to obtain the unit length of each river channel.

[0071] For example, the river channel is divided into 100 units, and each unit is 1 m long.

[0072] Specifically, the governing equation for the flat-bottom inviscid one-dimensional shallow water flow is:

[0073]

[0074] Among them, h is the water depth, u is the flow velocity, and g is the gravitational acceleration.

[0075] The initial value of the river channel is used as the initial condition for solving the shallow water flow control equation, and the flow of the river channel follows the shallow water flow control equation.

[0076] It should be noted that the use of a large time step format means that multiple units on both sides of the interface are updated simultaneously in one time step. The traditional numerical simulation method, limited by the CFL condition, only updates one unit on both sides of the interface in one time step. The present invention solves the problem of entropy-violating solutions caused by this change.

[0077] S200: Simulation of shallow water flow in a river channel includes calculating the state value of the interface between each river channel unit according to the state value in each river channel unit, and obtaining the time step according to the preset CFL value and CFL theorem;

[0078] In the embodiment of the present application, according to the state value in each channel unit, the left and right state values ​​of the interface between each channel unit are determined as the initial conditions, and the transition variable at the interface is calculated:

[0079] Set the water depth h of the left unit of each interface L , flow rate is u L , according to these two known variables, continue to set the conservation variable U L The first component is h L , the second component is h L u L , physical flux F L The first component is h L u L , the second component is The wave speed is

[0080] Set the water depth h of the left unit of each interface R , flow rate is u R , according to these two known variables, continue to set the conservation variable U R The first component is h R , the second component is h R u R , physical flux F R The first component is h R u R , the second component is The wave speed is

[0081] Find the intermediate variable h based on the above known variables s , the wave speed on both sides of the interface s L and R , HLL intermediate state UHLL and wave intensity ΔU.

[0082] If the water depth on both sides of the interface is h L and h R are all 0, then the intermediate variable h at the interface s is also 0, and the wave speed s on both sides of the interface L and R is also 0;

[0083] If only the left side water depth h L is 0, then the intermediate variable h at the interface s Also 0, the wave speed s on the left side of the interface L for Wave speed s on the right side of the interface R The characteristic wave velocity of the right unit is

[0084] If only the right side water depth h R is 0, then the intermediate variable h at the interface s Also 0, the wave speed s on the left side of the interface L The characteristic wave velocity of the left unit is Wave speed s on the right side of the interface R for

[0085] If the water depth on the left side of the interface is h L and right side water depth h R If both are not 0, the water depth at the intermediate state at the interface is:

[0086] According to the states on the left and right sides of the interface, the wave velocities on the left and right sides of the interface, the intermediate state at the interface, and the left and right waves generated at the interface are calculated.

[0087] Specifically, Figure 2 middle Interface, the i-1th unit is on the left, the i-th unit is on the right, enlarge it to the following Figure 3 In which different grayscales represent different state values, which are discontinuous. Taking this as the initial condition, under the control equation of shallow water flow, a new state is derived as follows Figure 4 As shown;

[0088] Specifically, the over-calculated variable is expressed as:

[0089]

[0090] In the embodiment of the present application, when the water depth on both sides is not 0:

[0091] For the left side of the interface, if the water depth h at the intermediate state at the interface is s Less than the water depth h on the left side of the interface L, then the wave speed s on the left side of the interface L The characteristic wave velocity of the left unit

[0092] If the water depth at the intermediate state at the interface is h s Less than the water depth h on the left side of the interface L If the condition is not met, the water depth h in the intermediate state s Add the water depth h on the left side of the interface L The result is multiplied by the water depth h in the intermediate state. s Divide by the water depth h on the left side of the interface L Multiply by one-half to take the square root, and multiply the square root result by the unit wave velocity c on the left side L , using the flow velocity u on the left side of the interface L Subtract the above result to get the wave velocity s on the left side of the interface L ;

[0093] For the right side of the interface, if the water depth in the intermediate state at the interface is less than the water depth on the right side of the interface, the wave velocity on the right side of the interface is the characteristic wave velocity of the right unit;

[0094] If the water depth at the intermediate state at the interface is h s Less than the water depth h on the right side of the interface R If the condition is not met, the water depth h in the intermediate state s Add the water depth h on the right side of the interface R The result is multiplied by the water depth h in the intermediate state. s Divide by the water depth h on the right side of the interface R Multiply by one-half to take the square root, and multiply the square root result by the unit wave velocity c on the right side R , using the flow rate u on the right side of the interface R Adding the above results, we get the wave velocity on the right side of the interface.

[0095] Specifically, the calculation of the left and right wave speeds is expressed as:

[0096]

[0097] In the embodiment of the present application, if the wave speed s on the left side of the interface is L Equal to the right wave speed s R , then the HLL intermediate state U HLL is 0;

[0098] If the wave speed on the left side of the interface is s L Equal to the right wave speed s R If the condition is not met, the conservation variable U on the right side of the interface R Multiply by the wave speed s on the right side of the interface R Subtract the conserved variable U on the left side of the interface L Multiply by the wave speed s on the left side of the interface L Plus the physical flux F on the left side of the interfaceL Subtract the physical flux F on the right side of the interface R Get the result and divide it by the wave speed s on the right side of the interface R Subtract the wave speed s on the left side of the interface L , get the HLL intermediate state U HLL .

[0099] Specifically, the calculation intermediate state is expressed as:

[0100]

[0101] In the embodiment of the present application, for the wave on the left side of the interface, if the wave speed s L is greater than 0, then the wave intensity ΔU is the conserved variable U on the left side of the interface L Subtract the conservation variable U on the right side of the interface R ;

[0102] If the wave speed on the left side of the interface is s L If the condition of being greater than 0 is not satisfied, the wave intensity is the HLL intermediate state minus the left-hand conserved variable;

[0103] For the wave on the right side of the interface, if the wave velocity is less than 0, the wave intensity is the conserved variable U on the right side of the interface HLL Subtract the conserved variable U on the left side of the interface L ;

[0104] If the wave speed on the right side of the interface is s R If the condition is less than 0, the wave intensity is in the HLL intermediate state U HLL Subtract the conserved variable U on the right side R .

[0105] Specifically, the wave intensity is calculated, and two waves are generated at the interface, namely the left wave and the right wave;

[0106] The left wave strength is expressed as:

[0107]

[0108] The right wave intensity is expressed as:

[0109]

[0110] It should be noted that by accurately calculating the intermediate state and wave velocity at the interface, the continuous phenomena in the river flow are simulated more realistically, and the physical consistency of the simulation results is enhanced by considering the water depth and flow velocity on both sides of the interface.

[0111] S300: using the time step and the interface state value between each channel unit, updating the state value in each channel unit, obtaining the shallow water flow state value of each channel unit at the next moment, and judging whether the channel unit interface is the last interface, if not the last interface, repeating the operation of calculating the interface state value between each channel unit;

[0112] In the embodiment of the present application, for the complete wave and unit wave velocity update, when the wave velocity at the interface between units is greater than 0, it means that the wave propagates to the right, and a wave intensity is added to each of the b units on the right side of the unit interface;

[0113] When the wave velocity at the interface between units is less than 0, it means that the wave propagates to the left, and a wave intensity is added to each of the b units on the left side of the unit interface;

[0114] For partial wave and unit wave velocity update, for the b+1th unit of the partial wave, a random number between 0 and 1 is taken. If |ab| is less than the random number, the b+1th unit remains unchanged;

[0115] If |ab| is greater than or equal to a random number, a wave intensity is added to the unit.

[0116] Specifically, according to the wave velocity and wave intensity at the interface between cells, a fixed selection method is used to update the state within the cell to obtain the shallow water flow state at the next moment.

[0117] For the calculation of the number of cells affected by the wave, the inter-cell interface wave velocity is multiplied by the time step and divided by the cell length to obtain the value a, whose integer part is b;

[0118] For example, Figure 2 As shown, in The interface emits two waves with a large and a small speed. Take the speed of the right-transmitting wave as s R ,get Then the value of a is 2.5 and the value of b is 2;

[0119] Specifically, for the complete wave and unit wave velocity update, Figure 5 As shown, for the i unit and i+1 unit on the right side of the interface, the update method is:

[0120] U n+1 =U n +ΔU

[0121] Among them, U n is the state value of the current time step, ΔU is the wave intensity at the interface, which indicates the change in the state value caused by the wave in the current time step, U n+1 is the state value obtained after a time step change;

[0122] For example, for partial wave and unit wave velocity update, Figure 5 As shown, the update method for the b+1th unit on the right side of the interface is the i+2th unit, |ab| is 0.5, and a random number between 0 and 1 is taken. Assuming the random number is 0.9, 0.5 is less than 0.9, then the i+2th unit remains unchanged.

[0123] It should be noted that the fixed selection method can reduce unnecessary calculations, improve the overall calculation efficiency, and has flexibility and applicability, thereby improving the reliability of the prediction.

[0124] S400: performing a first judgment on the shallow water flow simulation time of the river unit, the first judgment comprising: if the simulation time does not reach the preset simulation time, repeating the river shallow water flow simulation operation;

[0125] In the embodiment of the present application, if the total calculation time is less than the preset total time, the next cycle is performed to repeat the shallow water flow simulation operation in the river channel;

[0126] If the total calculation time is less than the preset total time, the calculation ends and the result is output.

[0127] Specifically, the pre-set total time is set based on human experience;

[0128] It should be noted that the simulation will continue until the preset total time is reached to ensure that all required simulation steps can be completed to obtain complete simulation results. By controlling the total simulation time, the model can be made more practical and suitable for different application scenarios and needs.

[0129] The above is a schematic scheme of a method for simulating shallow water flow with a large time step based on the HLL format in this embodiment. It should be noted that the technical scheme of the device for simulating shallow water flow with a large time step based on the HLL format and the technical scheme of the method for simulating shallow water flow with a large time step based on the HLL format above belong to the same concept. For details not described in detail in the technical scheme of the device for simulating shallow water flow with a large time step based on the HLL format in this embodiment, please refer to the description of the technical scheme of the method for simulating shallow water flow with a large time step based on the HLL format above.

[0130] The device for simulating shallow water flow with a large time step based on the HLL format in this embodiment includes:

[0131] A division module, used for obtaining river channel parameters, dividing the river channel into a plurality of units according to the river channel parameters, and taking the initial value of the river channel flow as the state value in each river channel unit;

[0132] The calculation module is used for simulating shallow water flow in a river channel, including calculating the state value of the interface between each river channel unit according to the state value in each river channel unit, and obtaining the time step according to the preset CFL value and CFL theorem;

[0133] An updating module is used to update the state value in each channel unit by using the time step and the interface state value between each channel unit, obtain the shallow water flow state value of each channel unit at the next moment, and determine whether the channel unit interface is the last interface. If it is not the last interface, the operation of calculating the interface state value between each channel unit is repeated;

[0134] The judgment module is used to make a first judgment on the shallow water flow simulation time of the river unit. The first judgment includes repeating the river shallow water flow simulation operation if the simulation time has not reached the preset simulation time.

[0135] This embodiment also provides a computing device, which is applicable to the case of shallow water flow simulation with a large time step based on the HLL format, including:

[0136] A memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the method for simulating shallow water flow with a large time step based on the HLL format as proposed in the above embodiment.

[0137] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for realizing shallow water flow simulation with a large time step based on the HLL format as proposed in the above embodiment is implemented.

[0138] The storage medium proposed in this embodiment and the method for realizing shallow water flow simulation with a large time step based on the HLL format proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0139] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ReadOnly, Memory, ROM), random access memory (RandomAccess Memory, RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.

[0140] Example 2

[0141] Reference Figure 6-7 , a method for simulating shallow water flows with a large time step based on the HLL format is provided to verify the technical effects used in this method.

[0142] like Figure 6 The figure shows the set initial state, and the waveform of the initial state is set to a specific shape;

[0143] like Figure 7 The waveform at 5.1 seconds shows the calculation results of different methods. The solid line in the figure provides a theoretical reference standard for the exact solution, the solid circle is the calculation result obtained by the present invention, and the hollow circle is the result of the large time step format based on the Roe format but without the wave splitting entropy correction;

[0144] from Figure 7 It can be seen that the calculation results obtained by the method of the present invention are very close to the exact solution, indicating that the method has high accuracy, while the results using the large time step format based on the Roe format but without the wave splitting entropy correction show a large deviation.

[0145] The method of the present invention can be very close to the exact solution, showing high accuracy in simulating shallow water flow. The method of the present invention does not require the use of wave splitting technology, simplifies the calculation process and reduces the calculation complexity. Although the wave splitting technology can improve the stability of numerical simulation, it also increases the complexity and amount of calculation. The method of the present invention can provide accurate simulation results under different flow conditions, enhancing the applicability of the model.

[0146] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for simulating shallow water flow with a large time step based on the HLL format, characterized in that: include: Acquire river channel parameters, divide the river channel into multiple units according to the river channel parameters, and use the initial value of the river channel flow as the state value in each river channel unit; The shallow water flow simulation of the river channel includes calculating the interface state value between each river channel unit according to the state value in each river channel unit, and obtaining the time step according to the preset CFL value and CFL theorem; Using the time step and the state value of the interface between each channel unit, the state value in each channel unit is updated to obtain the shallow water flow state value of each channel unit at the next moment, and whether the channel unit interface is the last interface is determined. If it is not the last interface, the operation of calculating the state value of the interface between each channel unit is repeated; A first judgment is made on the shallow water flow simulation time of the river unit, wherein the first judgment includes repeating the shallow water flow simulation operation of the river if the simulation time has not reached the preset simulation time.

2. The method for simulating shallow water flow with a large time step based on the HLL format as claimed in claim 1, characterized in that: Calculation of the interface state value between each channel unit includes: According to the state value in each channel unit, the left and right state values ​​of the interface between each channel unit are determined as the initial conditions, and the transition variables at the interface are calculated: If the water depth on both sides of the interface is 0, then the intermediate variable at the interface is also 0, and the wave speed on both sides of the interface is also 0; If the water depth on the left side is 0, the intermediate variable at the interface is also 0, and the wave speed on the left side of the interface is The wave velocity on the right side of the interface is The characteristic wave velocity of the right unit is If the water depth on the right side is 0, the intermediate variable at the interface is also 0, and the wave velocity on the left side of the interface is the characteristic wave velocity of the left unit. The wave speed on the right side of the interface is If the water depth on the left and right sides of the interface is not 0, the water depth in the intermediate state at the interface is: Among them, u R 、u L is the flow velocity on the right and left sides of the interface, h R 、h L is the water depth on the left side of the interface, c L 、c R is the wave velocity of the left and right units, g is the acceleration of gravity; According to the states on the left and right sides of the interface, the wave velocities on the left and right sides of the interface, the intermediate state at the interface, and the left and right waves generated at the interface are calculated.

3. The method for simulating shallow water flow with a large time step based on the HLL format as claimed in claim 2, characterized in that: Calculating the wave speeds on the left and right sides of the interface includes: When the water depth on both sides is not 0: For the left side of the interface, if the water depth in the intermediate state at the interface is less than the water depth on the left side of the interface, the wave velocity on the left side of the interface is the characteristic wave velocity of the left unit; If the water depth in the middle state at the interface is less than the water depth on the left side of the interface, the condition is not met, then the result of the water depth in the middle state plus the water depth on the left side of the interface is multiplied by the water depth in the middle state divided by the water depth on the left side of the interface multiplied by one-half, and the square root is multiplied by the left unit wave velocity, and the above result is subtracted from the flow velocity on the left side of the interface to obtain the wave velocity on the left side of the interface; For the right side of the interface, if the water depth in the intermediate state at the interface is less than the water depth on the right side of the interface, the wave velocity on the right side of the interface is the characteristic wave velocity of the right unit; If the water depth in the intermediate state at the interface is less than the water depth on the right side of the interface, the condition is not met, then the result of the water depth in the intermediate state plus the water depth on the right side of the interface is multiplied by the water depth in the intermediate state divided by the water depth on the right side of the interface multiplied by one-half and the square root is taken. The square root result is multiplied by the unit wave velocity on the right side, and the flow velocity on the right side of the interface is added to the above result to obtain the wave velocity on the right side of the interface.

4. The method for simulating shallow water flow with a large time step based on the HLL format as claimed in claim 3, characterized in that: The intermediate states at the interface include: If the wave speed on the left side of the interface is equal to the wave speed on the right side, the HLL intermediate state is 0; If the condition that the wave velocity on the left side of the interface is equal to the wave velocity on the right side is not met, then the conserved variable on the right side of the interface is multiplied by the wave velocity on the right side of the interface minus the conserved variable on the left side of the interface multiplied by the wave velocity on the left side of the interface plus the physical flux on the left side of the interface minus the physical flux on the right side of the interface to obtain the result, and divide the result by the wave velocity on the right side of the interface minus the wave velocity on the left side of the interface to obtain the HLL intermediate state.

5. The method for simulating shallow water flow with a large time step based on the HLL format as claimed in claim 4, characterized in that: The left and right waves generated at the interface include: For the wave on the left side of the interface, if the wave velocity is greater than 0, the wave intensity is the conserved variable on the left side of the interface minus the conserved variable on the right side of the interface; If the condition that the wave velocity on the left side of the interface is greater than 0 is not satisfied, the wave intensity is the HLL intermediate state minus the conserved variable on the left side; For the wave on the right side of the interface, if the wave velocity is less than 0, the wave intensity is the conserved variable on the right side of the interface minus the conserved variable on the left side of the interface; If the condition that the wave velocity on the right side of the interface is less than 0 is not satisfied, the wave intensity is the HLL intermediate state minus the conserved variable on the right side.

6. The method for simulating shallow water flow with a large time step based on the HLL format as claimed in claim 2 or 5, characterized in that: Updating the status value in each river unit includes: For complete wave and unit wave velocity update, when the wave velocity at the interface between units is greater than 0, it means that the wave propagates to the right, and a wave intensity is added to each of the b units on the right side of the unit interface; When the wave velocity at the interface between units is less than 0, it means that the wave propagates to the left, and a wave intensity is added to each of the b units on the left side of the unit interface; For partial wave and unit wave velocity update, for the b+1th unit of the partial wave, a random number between 0 and 1 is taken. If |ab| is less than the random number, the b+1th unit remains unchanged; If |ab| is greater than or equal to a random number, a wave intensity is added to the unit.

7. The method for simulating shallow water flow with a large time step based on the HLL format as claimed in claim 6, characterized in that: The first judgment of the simulation time of shallow water flow in the river unit includes: If the total calculation time is less than the preset total time, the next cycle is performed to repeat the shallow water flow simulation operation in the river; If the total calculation time is less than the preset total time, the calculation ends and the result is output.

8. A system for simulating shallow water flow with a large time step based on HLL format, characterized in that: include: A division module, used for obtaining river channel parameters, dividing the river channel into a plurality of units according to the river channel parameters, and taking the initial value of the river channel flow as the state value in each river channel unit; The calculation module is used for simulating shallow water flow in a river channel, including calculating the state value of the interface between each river channel unit according to the state value in each river channel unit, and obtaining the time step according to the preset CFL value and CFL theorem; An updating module is used to update the state value in each channel unit by using the time step and the interface state value between each channel unit, obtain the shallow water flow state value of each channel unit at the next moment, and determine whether the channel unit interface is the last interface. If it is not the last interface, the operation of calculating the interface state value between each channel unit is repeated; The judgment module is used to make a first judgment on the shallow water flow simulation time of the river unit. The first judgment includes repeating the river shallow water flow simulation operation if the simulation time has not reached the preset simulation time.

9. An electronic device, characterized in that: The device comprises: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Shallow water dynamic process simulation method based on local time step length

    CN120387399A

  • Shallow water flow simulation method, device, equipment and medium

    CN122572303A

  • Shallow water flow simulation method, apparatus, device, and medium

    CN122572303B