A method for automatic calibration of roughness of two-dimensional unstructured grid water-sediment mathematical model by region
By using the roughness region automatic rate determination method in the water and sand mathematical model, the roughness coefficient is automatically adjusted using cross-sectional data and cross-product calculation algorithm, the problem of time-consuming and inaccurate determination of roughness coefficients in the prior art is solved, and the accuracy and applicability of the model are significantly improved.
Patent Information
- Application Number
- CN202411357374.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-09-27
AI Technical Summary
When simulating complex water bodies, the determination of the roughness coefficient depends on on-site measurement or expert experience, which is time-consuming and costly, and a single or several fixed roughness values are difficult to accurately reflect the actual situation of the entire model area.
A method for determining the roughness of the plane two-dimensional non-structural grid water and sand mathematical model is proposed. By using cross-sectional data to define different regions in the model area, calculate the position of nodes relative to the cross-section, classify nodes into different regions, and use an algorithm based on cross-product calculation to classify nodes. This method automatically adjusts the roughness coefficient in different regions, implements the entire process through automated scripts, and reduces manual intervention.
It significantly improves the accuracy and applicability of the water and sand model, can automatically adjust the roughness coefficient, reduce manual intervention, and improves the accuracy of the model's water flow and sediment transportation simulation in complex hydrological environments.
Smart Images

Figure CN119294292B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the fields of hydrology and hydraulics, and in particular to a method for automatically calibrating the roughness of a two-dimensional non-structured grid water-sand mathematical model in different regions. Background Art
[0002] In hydrology and hydraulics research, planar two-dimensional unstructured grid water-sediment mathematical models are an important tool for simulating and predicting the flow and sediment dynamics of water bodies such as rivers, lakes and reservoirs. These models have a wide range of applications in many fields such as environmental engineering, water resources management, and flood control planning. The accuracy of the model depends largely on the correct setting of the roughness coefficient, which describes the roughness of the bottom and boundaries of the water body and directly affects the speed and direction of the water flow.
[0003] Traditionally, the determination of the roughness coefficient relies on field measurements or expert experience. However, due to the complexity and variability of natural water bodies, this method is often time-consuming and costly. In addition, for large-area or complex-topographic water bodies, a single or several fixed roughness values are difficult to accurately reflect the actual situation of the entire model area. Therefore, a more accurate and flexible method is needed to automatically adjust the roughness coefficient according to the characteristics of different regions.
[0004] At present, although some automated methods have been proposed to optimize water-sediment mathematical models, these methods usually rely on complex algorithms, or require changes to the internal code of the source program, or can only calibrate the roughness of the water level at a single site, and human participation is still required in practical applications. Summary of the invention
[0005] In view of the above problems, the present invention proposes a method for automatic calibration of the roughness of a two-dimensional unstructured grid water-sediment mathematical model by region. The method does not require changing the model source code, performs roughness calibration on water levels of multiple stations in space, and does not require human participation in the entire roughness calibration process. The method aims to improve the accuracy and applicability of the water-sediment model, especially when simulating water flow and sediment transport in a complex hydrological environment. The core of the method is that it can automatically adjust the roughness coefficient in different regions, so as to more accurately simulate the behavior of natural water bodies.
[0006] The present invention is implemented as follows: a method for automatically calibrating the roughness of a two-dimensional unstructured grid water-sand mathematical model by region, the method using a set of cross-section data, wherein each cross-section is defined by the coordinates of two points, for calibrating the spatial reference of the model; calculating the position of each node in the model relative to these cross-sections, and classifying the nodes into different regions; the classification of the nodes is calculated based on the cross product of the node coordinates and the cross-section coordinates, and is used to determine the spatial position of the node relative to the cross-section.
[0007] Furthermore, the method comprises the following steps:
[0008] Step 1: Initialize the model parameters, including setting the model's roughness coefficient, water flow conditions, and grid distribution; load and process the necessary input data, including cross-sectional data and node coordinates, classify the nodes, and set the error threshold error;
[0009] Step 2, calibration of roughness coefficient;
[0010] Step 3, model calculation and evaluation;
[0011] Step 4, adjustment and recalibration of the roughness coefficient;
[0012] Step 5, complete the calibration.
[0013] Furthermore, the specific steps of node classification are as follows:
[0014] Step S1, initialize a zero vector position equal to the number of cross sections to store the position of a single node relative to each cross section, and an nd×3 zero matrix flag to store the x coordinate, y coordinate, and cross section of each node, where nd is the total number of nodes;
[0015] Step S2: for each node P, calculate the cross product between it and each cross section in turn, and store the calculation results in position. Specifically, for the cross section formed by point A and point B, calculate
[0016] Step S3, counting the number of negative numbers in position, numbering the cross-sectional area where the node is located, and updating the third column of the flag matrix for the node.
[0017] Further, the model calculation and evaluation method steps include:
[0018] Step S1, automatically adjusting the roughness coefficient of the nodes in the corresponding area according to the cross-sectional area where the nodes are located;
[0019] Step S2, re-running the water-sediment mathematical model using the adjusted roughness coefficient;
[0020] Step S3, evaluating the accuracy of the roughness coefficient by comparing the difference between the model output and the preset or measured data.
[0021] Furthermore, the accuracy of evaluating the roughness coefficient includes:
[0022] Set an error threshold error;
[0023] For each area, the difference between the model output and the preset or measured data is compared. If the difference is less than the error, the roughness coefficient of the area is considered accurate.
[0024] If the roughness coefficients of all regions meet the accuracy requirements, a success file is generated to mark the success of the calibration process of the entire model.
[0025] Furthermore, the method is implemented by an automated script, comprising the following steps:
[0026] File processing and data conversion;
[0027] Model running and output file generation;
[0028] data extraction, processing, and analysis;
[0029] MATLAB scripts were used to calibrate the data and adjust the roughness coefficient.
[0030] A comparison method based on preset or measured data, based on the above-mentioned planar two-dimensional unstructured grid water-sand mathematical model, is characterized in that it is used to verify the accuracy of the roughness coefficient and evaluate the difference between the model output and the actual data by setting an error threshold.
[0031] A method for automatically calibrating the roughness of a two-dimensional unstructured grid water-sediment mathematical model by region is used for hydrological and hydraulic models, environmental engineering, water resources management, and flood control planning.
[0032] The beneficial effects of the present invention are: providing a novel, efficient and easy-to-implement method for automatically calibrating the roughness of a planar two-dimensional unstructured grid water-sand mathematical model, which can significantly improve the accuracy and applicability of the model.
[0033] The present invention first uses cross-sectional data to define different areas within the model area. By calculating the position of each node in the model relative to these cross sections, the nodes can be classified into different areas; a concise and effective algorithm based on cross product calculation is used to determine the position of the node relative to the cross section. This method is not only computationally efficient, but also easy to implement and apply; the entire process is implemented through automated scripts, including data processing, model operation, output file generation, data extraction and processing, and the final roughness coefficient adjustment, which greatly reduces the need for manual intervention and improves efficiency; a comparison method based on preset or measured data is used, and by setting an error threshold, the difference between the model output and the actual data can be evaluated, thereby ensuring the accuracy of the roughness coefficient.
[0034] The present invention has a wide range of applications. It is an automatic roughness calibration method that does not require changing the model source code, calibrates the water levels of multiple sites in space, and does not require human participation in the entire roughness calibration process. It can be used in various hydrological and hydraulic models, especially in the simulation of large-scale complex water bodies such as rivers, lakes and reservoirs. It has significant advantages; it is suitable for practical applications and academic research such as environmental engineering, water resources management, and flood control planning.
[0035] The present invention will be further described below in conjunction with the accompanying drawings and specific implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a flow chart of the automatic calibration of roughness by region according to the present invention;
[0037] Figure 2 It is a schematic diagram of the regional classification vector construction of the present invention. DETAILED DESCRIPTION
[0038] Embodiment 1:
[0039] A method for automatic calibration of roughness of a two-dimensional unstructured grid water-sand mathematical model by region. Figure 1 , Figure 2 The method uses a set of cross-section data, where each cross-section is defined by the coordinates of two points, to calibrate the spatial reference of the model; calculates the position of each node in the model relative to these cross-sections, and classifies the nodes into different areas; the classification of the nodes is calculated based on the cross product of the node coordinates and the cross-section coordinates, which is used to determine the spatial position of the node relative to the cross-section.
[0040] The method steps include:
[0041] Step 1: Initialize the model parameters, including setting the model's roughness coefficient, water flow conditions, and grid distribution; load and process the necessary input data, including cross-sectional data and node coordinates, classify the nodes, and set the error threshold error;
[0042] Step 2, calibration of roughness coefficient;
[0043] Step 3, model calculation and evaluation;
[0044] Step 4, adjustment and recalibration of the roughness coefficient;
[0045] Step 5, complete the calibration.
[0046] Embodiment 2:
[0047] This embodiment is an improvement and refinement of the first embodiment. Figure 1 As shown, the method steps include:
[0048] Step 1, implementation preparation:
[0049] Step 1.1, initialize the model parameters, including setting the model's roughness coefficient, water flow conditions, grid distribution, etc.;
[0050] Step 1.2, load and process necessary input data, such as cross-section data, node coordinates, etc.;
[0051] Step 1.3, setting the error threshold error, which is used for accuracy evaluation of subsequent roughness calibration.
[0052] The method of the present invention first uses cross-section data to define different areas within the model area. Initialize a zero vector position equal to the number of cross-sections to store the position of a single node relative to each cross-section, and an nd×3 zero matrix flag to store the x-coordinate, y-coordinate, and cross-section of each node, where nd is the total number of nodes. For each node P, calculate its cross product with each cross-section in turn, and store the calculation results in position. Specifically, for the cross section formed by point A and point B, calculate Count the number of negative numbers in position, number the cross-sectional area where the node is located, and update the third column of the flag matrix for the node.
[0053] By calculating the position of each node in the model relative to these cross sections, the nodes can be classified into different regions, such as Figure 2 , to determine the positions of the two nodes P1 and P2 relative to the cross section AB, we can construct a vector to calculate the cross product:
[0054] Therefore, P1 is on the right side of the AB cross section; So P2 is on the left side of the AB cross section.
[0055] Then, the roughness coefficients of the nodes in each area are automatically adjusted according to the specific conditions of the area, such as water velocity, water depth, bottom type, etc.
[0056] Step 2, preliminary calibration of the roughness coefficient:
[0057] Step 2.1, check whether the success file exists to determine the accuracy of the current roughness coefficient;
[0058] Step 2.2, if the success file exists, mark all_done and delete the success file. Since this is the first application, there is no success file.
[0059] Step 3, model calculation and evaluation: according to the cross-sectional area where the node is located, the roughness coefficient of the node in the corresponding area is automatically adjusted, and the water-sediment mathematical model is re-run using the adjusted roughness coefficient. By comparing the difference between the model output and the preset or measured data, the accuracy of the roughness coefficient is evaluated. Including:
[0060] Step 3.1, run the water-sediment mathematical model using the current roughness coefficient;
[0061] Step 3.2, collect model output, including key parameters such as water level and flow rate;
[0062] In step 3.3, a preliminary evaluation of the model output is performed to determine whether the roughness coefficient needs to be adjusted.
[0063] Step 4, adjustment and recalibration of the roughness coefficient: set an error threshold error, and for each area, compare the difference between the model output and the preset or measured data. If the difference is less than the error, the roughness coefficient of the area is considered accurate. If the roughness coefficients of all areas meet the accuracy requirements, a success file is generated to mark the success of the calibration process of the entire model. Including:
[0064] Step 4.1, based on the evaluation results of step 3, compare the water level output by the model with the measured water level;
[0065] Step 4.2, if the error is greater than the set error threshold, adjust the roughness coefficient of the relevant area;
[0066] Step 4.3, if the error is less than or equal to the error threshold, a success file is generated, indicating that the current roughness coefficient is accurate enough;
[0067] Step 4.4: Go to Step 2.
[0068] Step 5, calibration completed:
[0069] Step 5.1: If the all_done flag exists, it means that the current roughness coefficient is accurate enough;
[0070] Step 5.2: Output the final roughness coefficient and set the model status to complete;
[0071] Step 5.3: After all calculations and evaluation processes are completed, exit the program.
[0072] Embodiment three:
[0073] This specific embodiment describes the application of the present invention in the YN catchment area. The YN catchment area is an area with complex hydrological conditions and diverse water characteristics, including different types of water bodies such as rivers, streams and lakes.
[0074] Implementation preparation:
[0075] First, the model parameters are initialized, including setting the roughness coefficient, water flow conditions, and grid distribution. To this end, the hydrological data of the region, including flow velocity, water depth, and riverbed material, are collected, and the cross-sectional data and node coordinate data are loaded. The cross-sectional data is obtained from the hydrological survey of the region, and the node coordinates are generated based on the hydrological topographic map. In this embodiment, the error threshold error is set to 3% to evaluate the accuracy of the roughness coefficient.
[0076] Initial calibration:
[0077] Check if there is a success file to determine the initial accuracy of the roughness coefficient. Since this is the first application, there is no success file. The water-sediment mathematical model was run with the current roughness coefficient to simulate the flow and sediment dynamics in the YN catchment area.
[0078] Model calculation and evaluation:
[0079] The output data of the model, including key parameters such as water level and flow velocity, were collected. The water level data output by the model were compared with the measured water level data in the YN confluence area. It was found that the errors in some areas exceeded the set error threshold.
[0080] Roughness coefficient adjustment and recalibration:
[0081] For the areas with large errors, adjust the roughness coefficient and rerun the model. After several iterations, the roughness errors of all areas are finally less than the set error threshold. At this point, a success file is generated, indicating that the roughness coefficient adjustment is successful.
[0082] Calibration Complete:
[0083] Since the success file was generated, the roughness coefficient of the model was determined to be sufficiently accurate, completing the calibration process;
[0084] Output the final roughness coefficient and set the model status to complete;
[0085] All calculation and evaluation processes were completed, and the method of the present invention was successfully applied to the YN confluence area.
[0086] This example demonstrates the application of the method of the present invention in an actual hydrological model. By automatically adjusting the roughness coefficient and verifying it with measured data, the present invention significantly improves the accuracy and applicability of the model in a complex hydrological environment.
[0087] The present invention proposes a method for automatically calibrating the roughness of a planar two-dimensional unstructured grid water-sediment mathematical model by region, which improves the accuracy and applicability of the water-sediment model, especially when simulating water flow and sediment transport in complex hydrological environments. The core of this method is that it can automatically adjust the roughness coefficient in different regions, thereby more accurately simulating the behavior of natural water bodies.
[0088] The present invention first uses cross-sectional data to define different regions within the model area. By calculating the position of each node in the model relative to these cross-sectional data, the nodes can be classified into different regions. Figure 2 , to determine the positions of the two nodes P1 and P2 relative to the cross section AB, we can construct a vector to calculate the cross product:
[0089] Therefore, P1 is on the right side of the AB cross section; So P2 is on the left side of the AB cross section.
[0090] Then, the roughness coefficient of the nodes in each area is automatically adjusted according to the specific conditions of each area (such as water flow velocity, water depth, bottom type, etc.).
[0091] A concise and effective algorithm based on cross product calculation is used to determine the position of nodes relative to the cross section. This method is not only computationally efficient, but also easy to implement and apply. The entire process is implemented through automated scripts, including data processing, model operation, output file generation, data extraction and processing, and final roughness coefficient adjustment. This level of automation greatly reduces the need for manual intervention and improves efficiency.
[0092] In order to verify the accuracy of the roughness coefficient, the present invention proposes a comparison method based on preset or measured data. By setting an error threshold, the difference between the model output and the actual data can be evaluated, thereby ensuring the accuracy of the roughness coefficient.
[0093] When the roughness coefficients of all regions meet the accuracy requirements, a success file is automatically generated, indicating the success of the model calibration process.
[0094] The present invention is not only applicable to various hydrological and hydraulic models, but also has significant advantages in the simulation of large-scale complex water bodies such as rivers, lakes and reservoirs; it is also applicable to practical applications such as environmental engineering, water resources management, and flood control planning. At the same time, it also provides valuable references in academic research.
[0095] In summary, the present invention provides a novel, efficient and easy-to-implement method for automatic roughness calibration of a planar two-dimensional unstructured grid water-sand mathematical model, which can significantly improve the accuracy and applicability of the model.
[0096] The above embodiments are only used to illustrate the present invention, but not to limit the present invention. It should be noted that those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, so all improvements and modifications made without departing from the scope of the present invention are also within the protection scope of the present invention.
Claims
1. A method for automatically calibrating the roughness of a two-dimensional unstructured grid water-sand mathematical model by region, characterized in that: The method uses a set of cross-section data, each of which is defined by the coordinates of two points, for calibrating the spatial reference of the model; calculating the position of each node in the model relative to these cross-sections, and classifying the nodes into different areas; the classification of the nodes is calculated based on the cross product of the node coordinates and the cross-section coordinates, which is used to determine the spatial position of the node relative to the cross-section. The steps of the method are: Step 1, initialize the model parameters, including setting the model's roughness coefficient, water flow conditions, grid distribution, loading and processing input data, including cross-sectional data and node coordinates, classifying the nodes, and setting the error threshold error. The node classification is: Initialize a zero vector position equal to the number of cross sections to store the position of a single node relative to each cross section, and an nd×3 zero matrix flag to store the x-coordinate, y-coordinate, and cross section of each node, where nd is the total number of nodes. For each node P, calculate the cross product with each cross section in turn, and store the calculation results in position. Specifically, for the cross section formed by point A and point B, calculate Count the number of negative numbers in position, number the cross-sectional area where the node is located, and update the third column of the flag matrix for the node; Step 2, calibration of roughness coefficient; Step 3, model calculation and evaluation: according to the cross-sectional area where the node is located, the roughness coefficient of the node in the corresponding area is automatically adjusted, and the water-sediment mathematical model is re-run using the adjusted roughness coefficient. By comparing the difference between the model output and the preset or measured data, the accuracy of the roughness coefficient is evaluated; Step 4, adjustment and recalibration of the roughness coefficient; Step 5, complete the calibration.
2. The method for automatically calibrating the roughness of a two-dimensional unstructured grid water-sand mathematical model according to claim 1 is characterized by: The accuracy of the roughness coefficient evaluation includes: Set an error threshold error; For each area, the difference between the model output and the preset or measured data is compared. If the difference is less than the error, the roughness coefficient of the area is considered accurate. If the roughness coefficients of all regions meet the accuracy requirements, a success file is generated to mark the success of the calibration process of the entire model.
3. The method for automatically calibrating the roughness of a two-dimensional unstructured grid water-sand mathematical model according to claim 2 is characterized by: The method is implemented by an automated script and comprises the following steps: File processing and data conversion; Model running and output file generation; data extraction, processing, and analysis; MATLAB scripts were used to calibrate the data and adjust the roughness coefficient.
4. A comparison method based on preset or measured data, based on the roughness automatic calibration method of the two-dimensional unstructured grid water-sand mathematical model according to claim 3, characterized in that: Used to verify the accuracy of the roughness coefficient by setting an error threshold to evaluate the difference between the model output and the actual data.
Citation Information
Patent Citations
Automatic calibration method and system for roughness factor parameters of one-dimensional non-constant flow mathematical model of natural river channel
CN116776775A