SWMM and EFDC Coupling Method, Device, Terminal and Storage Medium
By obtaining coupling information and updating the time series parameter list of the EFDC model, the automatic coupling calculation between SWMM and EFDC model is realized, solving the problem of inefficient coupling, improving execution efficiency and reducing memory footprint.
Patent Information
- Application Number
- CN202211233847.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-10
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-10-10
AI Technical Summary
In the prior art, there are problems of inefficient coupling efficiency and large memory usage in the coupling process between SWMM and EFDC models, especially when parsing EFDC models, all model files need to be read and parsed, resulting in high maintenance costs.
By obtaining coupled information, simulate and convert the model files of the SWMM model, obtain model simulation results that conform to the EFDC time series format, and update the time series parameter list in the EFDC model to realize automatic and rapid processing of the EFDC model files, including SWMM simulation calculation and result extraction, and search and modification of EFDC boundaries and time series.
It reduces the post-processing of data, improves coupling efficiency, avoids the construction of the entire EFDC model database, effectively reduces memory usage, and improves execution efficiency.
Smart Images

Figure CN115470733B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of hydrological model construction, and particularly relates to a coupling method, device, terminal and storage medium for SWMM and EFDC. Background Art
[0002] In watershed simulation, it includes a hydrological process and a river network hydrodynamic water quality change process. The two can be respectively simulated and calculated through the SWMM (storm water management model) model and the EFDC (The Environmental Fluid Dynamics Code three-dimensional environmental fluid dynamics program) model. The SWMM model simulates the rainfall-runoff process on land, and the EFDC model simulates the river network water body and water quality transport process. A complete watershed simulation requires coupling and calculating the two.
[0003] During the coupling process, the simulation calculation results of SWMM need to be input into the EFDC model as boundary conditions. This process requires parsing the EFDC model and modifying the corresponding boundary and time series data. Currently, parsing the EFDC model mainly involves converting the master file data format into the EFDC-ML (EFDC markup language) language (defined as a markup language in XML format), modifying the boundary and time series data, and then converting it into the EFDC model file. This method requires reading and parsing the data of all model files, occupies a large amount of memory, and has a high maintenance cost.
[0004] Based on this, it is necessary to develop and design a coupling method for SWMM and EFDC. Summary of the Invention
[0005] Embodiments of the present invention provide a coupling method, device, terminal and storage medium for SWMM and EFDC, which are used to solve the problem of low coupling efficiency in the prior art.
[0006] In a first aspect, embodiments of the present invention provide a coupling method for SWMM and EFDC, including:
[0007] Obtaining coupling information, where the coupling information represents the interaction information between the SWMM model and the EFDC model;
[0008] Performing simulation and conversion according to the model file of the SWMM model to obtain a model simulation result that conforms to the EFDC time series format;
[0009] Obtain the time series parameter list in the EFDC model, and update the time series parameter list according to the coupling information, where the update includes adding the time series parameter list that does not exist in the time series parameter list in the coupling information to the time series parameter list;
[0010] Update the time series parameters in the EFDC model according to the time series parameter list in the EFDC model and the model simulation results.
[0011] In a possible implementation manner, the performing simulation and conversion according to the model file of the SWMM model includes:
[0012] Obtain the model file of the SWMM model;
[0013] Perform simulation calculations using the calculation method in swmm-toolkit according to the model file of the SWMM model to obtain calculation results;
[0014] Parse the calculation results according to the result reading method of swmm-toolkit to obtain a data table;
[0015] Convert the data table according to the EFDC time series format to obtain the model simulation results that conform to the EFDC time series format.
[0016] In a possible implementation manner, the converting the data table according to the EFDC time series format to obtain the model simulation results that conform to the EFDC time series format includes:
[0017] Construct a conversion class, where the conversion class includes: a data overall description variable, a data volume variable, a sequence name variable, a hierarchical variable, and a time series data variable;
[0018] Construct a conversion object according to the conversion class, where the conversion object includes a time conversion method and a write file method. The time conversion method converts the Date and Time in the data table into the relative time in EFDC, and the write file method writes the data of the conversion object into the EFDC model file.
[0019] In a possible implementation manner, the obtaining the time series parameter list in the EFDC model includes:
[0020] Obtain the main control file of the EFDC model;
[0021] Search for the content of the master file through the module card and the parameter line of the module card, or through the module card, the parameter line of the module card, and the identifier, to obtain the time series parameter list in the EFDC model.
[0022] In a possible implementation, the coupling information includes multiple confluence area names. Updating the time series parameter list according to the coupling information includes:
[0023] Compare the multiple boundary condition names in the time series parameter list with the multiple confluence area names to obtain multiple return items and multiple new items, where the return items are the items in the multiple boundary condition names that are the same as the multiple confluence area names, and the new items are the items in the multiple confluence area names that do not exist in the multiple boundary condition names;
[0024] According to the multiple return items, return multiple return serial numbers, where the return serial numbers correspond to the serial numbers of the time series of the return items;
[0025] Add to the time series parameter list according to the multiple new items.
[0026] In a possible implementation, updating the time series parameters in the EFDC model according to the time series parameter list in the EFDC model and the model simulation results includes:
[0027] According to the multiple return serial numbers, find multiple time series positions corresponding to the multiple return serial numbers, where the multiple time series positions are based on the files corresponding to the multiple return serial numbers;
[0028] Replace and / or add the boundary conditions of the multiple time series positions according to the model simulation results.
[0029] In a possible implementation, after updating the time series in the EFDC model according to the time series parameter list in the EFDC model and the model simulation results, it further includes:
[0030] Call the EFDC model calculation program for simulation calculation.
[0031] In a second aspect, an embodiment of the present invention provides a SWMM and EFDC coupling device for implementing the SWMM and EFDC coupling method described in the first aspect or any possible implementation of the first aspect above. The SWMM and EFDC coupling device includes:
[0032] A coupling information acquisition module for acquiring coupling information, where the coupling information represents the interaction information between the SWMM model and the EFDC model;
[0033] An SWMM model file simulation module for simulating and converting according to the model file of the SWMM model to obtain a model simulation result conforming to the EFDC time series format;
[0034] A time series parameter list update module for acquiring the time series parameter list in the EFDC model and updating the time series parameter list according to the coupling information, where the update includes adding the time series parameters not existing in the time series parameter list in the coupling information to the time series parameter list;
[0035] And,
[0036] An EFDC model update module for updating the time series parameters in the EFDC model according to the time series parameter list in the EFDC model and the model simulation result.
[0037] In a third aspect, an embodiment of the present invention provides a terminal, including a memory and a processor. A computer program that can run on the processor is stored in the memory. When the processor executes the computer program, the steps of the method described in the first aspect or any possible implementation manner of the first aspect above are implemented.
[0038] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the steps of the method described in the first aspect or any possible implementation manner of the first aspect above are implemented.
[0039] The beneficial effects of the embodiments of the present invention compared with the prior art are:
[0040] An SWMM and EFDC coupling method disclosed by an embodiment of the present invention first obtains coupling information, where the coupling information represents the interaction information between the SWMM model and the EFDC model; then, according to the model file of the SWMM model, simulations and conversions are performed to obtain a model simulation result that conforms to the time series format of the EFDC; next, a list of time series parameters in the EFDC model is obtained, and the list of time series parameters is updated according to the coupling information, where the update includes adding time series parameters that do not exist in the list of time series parameters in the coupling information to the list of time series parameters; finally, the time series parameters in the EFDC model are updated according to the list of time series parameters in the EFDC model and the model simulation result. The method of the embodiment of the present invention can greatly reduce the post-processing work of data and improve work efficiency through the automated and rapid processing of the whole process of SWMM and EFDC coupling simulation calculations, including SWMM simulation calculations and result extraction, "checking, modifying, and adding" of EFDC boundaries and time series, and EFDC simulation calculations. This technology innovatively constructs an algorithm for "checking, modifying, and adding" to the EFDC model file, which can accurately locate the key information in the boundaries and time series of the model file and modify and add it. This algorithm only performs "checking, modifying, and adding" on the key information of the EFDC model, avoiding the construction of the entire EFDC model database, effectively reducing memory occupancy, and improving execution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0042] Figure 1 is a flowchart of the SWMM and EFDC coupling method provided by the embodiment of the present invention;
[0043] Figure 2 is a process diagram of the SWMM and EFDC coupling method provided by the embodiment of the present invention;
[0044] Figure 3 is a process diagram of the main control file update provided by the embodiment of the present invention;
[0045] Figure 4 is a process diagram of importing the SWMM result into the EFDC model provided by the embodiment of the present invention;
[0046] Figure 5It is a functional block diagram of the SWMM and EFDC coupling device provided by the embodiment of the present invention;
[0047] Figure 6 It is a functional block diagram of the terminal provided by the embodiment of the present invention. Specific embodiments
[0048] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present invention. However, those skilled in the art should clearly understand that the present invention can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, and methods are omitted to avoid unnecessary details from interfering with the description of the present invention.
[0049] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will be described through specific embodiments with reference to the accompanying drawings.
[0050] The following details the embodiments of the present invention. This example is implemented on the premise of the technical solution of the present invention, and detailed implementation manners and specific operation processes are given. However, the protection scope of the present invention is not limited to the following embodiments.
[0051] The embodiment of the present invention aims to solve the problem of automated coupled calculation of SWMM and EFDC, optimize the process of "searching, modifying, and adding" to the EFDC model file, reduce memory occupancy, lower maintenance costs, and improve coupling efficiency. The main processes include: extracting the calculation results of the SWMM model, searching for and modifying the EFDC boundary conditions, searching for and modifying the time series, and automated simulation calculation.
[0052] Figure 1 It is a flowchart of the SWMM and EFDC coupling method provided by the embodiment of the present invention.
[0053] Figure 2 It is a process diagram of the SWMM and EFDC coupling method provided by the embodiment of the present invention.
[0054] As Figure 1 shown, it shows the implementation flowchart of the SWMM and EFDC coupling method provided by the embodiment of the present invention, which is detailed as follows:
[0055] In step 101, coupling information is obtained, where the coupling information represents the interaction information between the SWMM model and the EFDC model.
[0056] In step 102, according to the model file of the SWMM model, simulation and conversion are performed to obtain a model simulation result that conforms to the EFDC time series format.
[0057] In some embodiments, step 102 includes:
[0058] Obtain the model file of the SWMM model;
[0059] According to the model file of the SWMM model, perform simulation calculations using the calculation methods in swmm - toolkit to obtain calculation results;
[0060] According to the result reading method of swmm - toolkit, parse the calculation results to obtain a data table;
[0061] According to the EFDC time series format, convert the data table to obtain the model simulation results that conform to the EFDC time series format.
[0062] In some embodiments, the step of converting the data table according to the EFDC time series format to obtain the model simulation results that conform to the EFDC time series format includes:
[0063] Construct a conversion class, where the conversion class includes: overall data description variables, data volume variables, sequence name variables, hierarchical variables, and time series data variables;
[0064] Construct a conversion object according to the conversion class, where the conversion object includes a time conversion method and a write - to - file method. The time conversion method converts the Date and Time in the data table to the relative time in EFDC, and the write - to - file method writes the data of the conversion object to the EFDC model file.
[0065] Exemplarily, first, a coupling file needs to be constructed. The file records the path information of the SWMM model and the EFDC model file; the number of catchment areas for which SWMM results need to be output; the number of pollutant types; the detailed information of the connection between SWMM and EFDC; and the pollutant correspondence.
[0066] For example, a coupling file structure is as follows:
[0067] # Hydrological model file path
[0068] SHWMPath D:\Work\2021season4.inp
[0069] # River model file path
[0070] RiverModelPath D:\Work\efdc.inp
[0071] # Number of connections
[0072] NumberOFConnections 2
[0073] # Number of pollutant types
[0074] NumberOfPollutants 4
[0075] # Connection information
[0076] # Name of confluence area, number of connected grids, Grid I, Grid J
[0077] ConnectionInfo
[0078] NODE15 1 901 282
[0079] NODE53 4 897 289 897 298 897 305 897 319
[0080] # Pollutant correspondence between EFDC and SWMM
[0081] pollutantRelationship
[0082] CODMn COD
[0083] TP TP
[0084] TN TN
[0085] NH3N NH3-N
[0086] Then, perform SWMM model simulation calculation and result analysis according to:
[0087] According to the SWMM model file path information in the coupling file, import the SWMM model file, use the calculation method in the third-party library swmm-toolkit to perform simulation calculation, and use the result reading method in swmm-toolkit to analyze the model results after the calculation is completed. Construct a DataFrame data table named swmm_result. In one application scenario, the data table is shown in Table 1:
[0088] Table 1
[0089]
[0090] Then, convert the data table to the EFDC time series format, as shown in Table 2:
[0091] Table 2
[0092]
[0093] For the above process, the compiled program adopts an object-oriented design concept, constructs a timeseries class, and its member variables (attributes) include: dataDiscription (overall data description), numberOfData (data volume), name (sequence name), layer (stratification), and dataList (time series data). A program compiled based on the Python language is as follows:
[0094]
[0095]
[0096] The program constructs a timeseries object based on the SWMM simulation results. The object contains a conv (time conversion) method and a saveToLocal (write to file) method. Among them, conv can convert the Date and Time in Table 1 into the relative time in EFDC, and writeToFile can write the data of the entire timeseries object into the EFDC model file, as follows:
[0097]
[0098]
[0099] In step 103, obtain the time series parameter list in the EFDC model, and update the time series parameter list according to the coupling information. Among them, the update includes adding the time series parameter list that does not exist in the time series parameter list in the coupling information to the time series parameter list.
[0100] In some embodiments, the obtaining the time series parameter list in the EFDC model includes:
[0101] Obtain the main control file of the EFDC model;
[0102] Search the content of the main control file through the module card and the parameter line of the module card or through the module card, the parameter line of the module card, and the identifier to obtain the time series parameter list in the EFDC model.
[0103] In some embodiments, the coupling information includes multiple confluence area names. The updating the time series parameter list according to the coupling information includes:
[0104] Compare according to multiple boundary condition names in the time series parameter list and the multiple confluence area names to obtain multiple return items and multiple new items, where the return items are the items in the multiple boundary condition names that are the same as the multiple confluence area names, and the new items are the items in the multiple confluence area names that do not exist in the multiple boundary condition names;
[0105] According to the multiple return items, return multiple return sequence numbers, where the return sequence number corresponds to the sequence number of the time series of the return item;
[0106] According to the multiple new items, add to the time series parameter list.
[0107] Exemplarily, after performing simulation calculations and parsing on SWMM, it is necessary to parse the main EFDC model file:
[0108] The EFDC model files have a unified format standard, and there are associated relationships between files and between front and back parameters within files. Therefore, when parsing the files, first search for information in the main control file efdc.inp, obtain the boundary condition information, and then parse the corresponding time series file according to the time series information in the boundary conditions.
[0109] ①Construct a general EFDC model information search method.
[0110] The method contains three parameters, CardName, Id, and parameter, where CardName inputs the Card serial number (such as "C24"), id inputs the unique identifier (the default value is the dash "----"), and parameter inputs the parameter (such as "IQSERQ").
[0111] In the method, filter and obtain the model information card through CardName and Id, then filter out invalid information using the key "*", and finally obtain the key parameter in the model information card through parameter. This method returns parameter information. The code example is as follows
[0112] "def getModelInfo(CardName,Id="---",parameter):
[0113] with open(efdc.inp)as f:
[0114] for lines in f.readlines:
[0115] if CardName in line:
[0116] ……
[0117] If Id in line:
[0118] ……
[0119] If parameter in line:
[0120] ……
[0121] f.close
[0122] return number”
[0123] For the C24 structure as shown in Table 3:
[0124] Table 3
[0125]
[0126] ② For the "addition and modification" of the EFDC boundary, using the method in ①, through the parameters CardName = "C24", default Id, and parameter = "ID", obtain all boundary condition names, and compare them with the "confluence area name" in the "ConnectionInfo" information in the coupling file. If the boundary already exists, return the "sequence number of the time series" of this boundary; if it does not exist, add a new boundary below. The process is as Figure 3 shown.
[0127] In step 104, according to the time series parameter list in the EFDC model and the model simulation results, update the time series parameters in the EFDC model.
[0128] In some embodiments, step 104 includes:
[0129] According to the multiple return sequence numbers, find multiple time series positions corresponding to the multiple return sequence numbers, where the multiple time series positions are based on the files corresponding to the multiple return sequence numbers;
[0130] According to the model simulation results, replace and / or add boundary conditions for the multiple time series positions.
[0131] Exemplarily, after parsing the main EFDC model file, the SWMM results can be imported into the EFDC model:
[0132] According to the time series sequence number returned in step 103 - ②, find the time series position in the corresponding time series file, and use the SWMM results in step 2 to replace it (in the case where the corresponding boundary condition already exists) or add it (for the corresponding new boundary condition). The process is as Figure 4 shown.
[0133] In addition, in some application scenarios, it further includes the EFDC model calculation step 105, which is set after step 104 and includes:
[0134] Call the EFDC model calculation program to perform simulation calculations.
[0135] For the implementation manner of the SWMM and EFDC coupling method of the present invention, first, coupling information is obtained, where the coupling information represents the interaction information between the SWMM model and the EFDC model; then, according to the model file of the SWMM model, simulation and conversion are performed to obtain a model simulation result that conforms to the time series format of the EFDC model; next, a time series parameter list in the EFDC model is obtained, and the time series parameter list is updated according to the coupling information, where the update includes adding a time series parameter list that does not exist in the time series parameter list in the coupling information to the time series parameter list; finally, according to the time series parameter list in the EFDC model and the model simulation result, the time series parameters in the EFDC model are updated. Through the automated and rapid processing of the whole process of SWMM and EFDC coupling simulation calculations, including SWMM simulation calculations and result extraction, "checking, modifying, and adding" of EFDC boundaries and time series, and EFDC simulation calculations, the implementation manner of the method of the present invention can greatly reduce the post-processing work of data and improve work efficiency. This technology innovatively constructs an algorithm for "checking, modifying, and adding" to the EFDC model file, which can accurately locate the key information in the boundaries and time series of the model file and modify and add it. This algorithm only performs "checking, modifying, and adding" on the key information of the EFDC model, avoiding the construction of the entire EFDC model database, effectively reducing memory occupancy, and improving execution efficiency.
[0136] When the present invention is actually applied, first, coupling files are constructed respectively according to the SWMM model, the EFDC model, and pollution inflow data. The files contain information such as the file paths, connection locations, connection quantities, and pollutant correspondence relationships of the SWMM model and the EFDC model. Then, the coupling files and the coupling calculation program are placed in the same folder. Finally, the coupling calculation program is executed. The program first performs the simulation calculation of SWMM. After waiting for the calculation to be completed, water quality and water quantity data are extracted according to the connection locations in the coupling files, and they are imported into the EFDC model file as time series in combination with the connection locations and pollutant correspondence relationship information in the coupling files. Finally, the EFDC model calculation program is executed, thereby realizing the coupling of the SWMM model and the EFDC model calculation program.
[0137] The implementation mode of the method of the present invention can be applied to the early warning and prediction of water quality and quantity in river basins. In the comprehensive management system platform of the river basin water environment, the present invention can be used to achieve automated simulation calculations. According to future rainfall data, the SWMM model is used to calculate the pollution load of surface and underground pipe networks, and the pollution load is imported into the EFDC model as boundary conditions to calculate the changes in water quality and quantity of the future water system.
[0138] It can also be applied to the planning, design, and operation and maintenance of the comprehensive treatment of the water ecological environment.
[0139] When applied to urban flood control and drainage, the present invention can be used to calculate urban rainfall waterlogging, identify waterlogging risk areas, and provide data support for urban command and dispatch.
[0140] When applied to the planning of sponge cities, the present invention can be used to calculate surface runoff. Combining with urban planning, sponge engineering measures are reasonably configured, and water volume is reasonably allocated in the whole process of infiltration, retention, storage, purification, utilization, and drainage, providing data support for planning and design.
[0141] It should be understood that the magnitudes of the sequence numbers of the steps in the above implementation modes do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the implementation mode of the present invention.
[0142] The following is the device implementation mode of the present invention. For the details not described in detail, reference can be made to the corresponding method implementation mode above.
[0143] Figure 5 is the functional block diagram of the SWMM and EFDC coupling device provided by the implementation mode of the present invention. Referring to Figure 5 , the SWMM and EFDC coupling device 5 includes: a coupling information acquisition module 501, an SWMM model file simulation module 502, a time series parameter list update module 503, and an EFDC model update module 504, where:
[0144] The coupling information acquisition module 501 is used to acquire coupling information, where the coupling information represents the interaction information between the SWMM model and the EFDC model;
[0145] The SWMM model file simulation module 502 is used to perform simulation and conversion according to the model file of the SWMM model to obtain a model simulation result that conforms to the EFDC time series format;
[0146] The time series parameter list update module 503 is configured to obtain the time series parameter list in the EFDC model and update the time series parameter list according to the coupling information, where the update includes adding the time series parameters that do not exist in the time series parameter list in the coupling information to the time series parameter list;
[0147] The EFDC model update module 504 is configured to update the time series parameters in the EFDC model according to the time series parameter list in the EFDC model and the model simulation results.
[0148] Figure 6 It is a functional block diagram of the terminal provided by the embodiment of the present invention. As Figure 6 shown, the terminal 6 of this embodiment includes: a processor 600 and a memory 601, and a computer program 602 that can run on the processor 600 is stored in the memory 601. When the processor 600 executes the computer program 602, the steps in the above-mentioned various SWMM and EFDC coupling methods and embodiments are implemented, such as Figure 1 the steps 101 to 104 shown.
[0149] Exemplarily, the computer program 602 can be divided into one or more modules / units, and the one or more modules / units are stored in the memory 601 and executed by the processor 600 to complete the present invention.
[0150] The terminal 6 can be a computing device such as a desktop computer, a notebook, a palm computer, and a cloud server. The terminal 6 may include, but is not limited to, a processor 600 and a memory 601. Those skilled in the art can understand that Figure 6 it is only an example of the terminal 6 and does not constitute a limitation on the terminal 6. It may include more or fewer components than shown in the figure, or combine some components, or different components. For example, the terminal 6 may further include input / output devices, network access devices, a bus, etc.
[0151] The so-called processor 600 may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0152] The memory 601 may be an internal storage unit of the terminal 6, such as the hard disk or memory of the terminal 6. The memory 601 may also be an external storage device of the terminal 6, such as a plug-in hard disk equipped on the terminal 6, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 601 may also include both the internal storage unit of the terminal 6 and the external storage device. The memory 601 is used to store the computer program 602 and other programs and data required by the terminal 6. The memory 601 may also be used to temporarily store data that has been output or is to be output.
[0153] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.
[0154] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0155] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0156] In the embodiments provided by the present invention, it should be understood that the disclosed device / terminal and method can be implemented in other ways. For example, the device / terminal embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.
[0157] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0158] In addition, the functional units in each embodiment of the present invention can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0159] When the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiments of the method of the present invention, it can also be completed by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method and apparatus embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0160] The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A coupling method of SWMM and EFDC, characterized in that, Including: Obtain coupling information, where the coupling information characterizes the interaction information between the SWMM model and the EFDC model; Perform simulation and conversion based on the model file of the SWMM model to obtain a model simulation result that conforms to the EFDC time series format; Obtain the time series parameter list in the EFDC model, and update the time series parameter list according to the coupling information, where the update includes adding the time series parameter list that does not exist in the time series parameter list in the coupling information to the time series parameter list; Update the time series parameters in the EFDC model according to the time series parameter list in the EFDC model and the model simulation result; The performing simulation and conversion based on the model file of the SWMM model to obtain a model simulation result that conforms to the EFDC time series format includes: Obtain the model file of the SWMM model; Perform simulation calculations using the calculation method in swmm-toolkit based on the model file of the SWMM model to obtain a calculation result; Parse the calculation result according to the result reading method of swmm-toolkit to obtain a data table; Convert the data table according to the EFDC time series format to obtain the model simulation result that conforms to the EFDC time series format; The converting the data table according to the EFDC time series format to obtain the model simulation result that conforms to the EFDC time series format includes: Construct a conversion class, where the conversion class includes: a data overall description variable, a data volume variable, a sequence name variable, a hierarchical variable, and a time series data variable; Construct a conversion object according to the conversion class, where the conversion object includes a time conversion method and a write file method. The time conversion method converts the Date and Time in the data table into the relative time in EFDC, and the write file method writes the data of the conversion object into the EFDC model file; The obtaining the time series parameter list in the EFDC model includes: Obtain the main control file of the EFDC model; Search the content of the main control file through the module card and the parameter line of the module card or through the module card, the parameter line of the module card, and the identifier to obtain the time series parameter list in the EFDC model; The coupling information includes multiple confluence area names. The updating the time series parameter list according to the coupling information includes: Compare the multiple boundary condition names in the time series parameter list with the multiple confluence area names to obtain multiple return items and multiple new items, where the return items are the items in the multiple boundary condition names that are the same as the multiple confluence area names, and the new items are the items in the multiple confluence area names that do not exist in the multiple boundary condition names; According to the multiple return items, return multiple return serial numbers, where the return serial number corresponds to the serial number of the time series of the return item; Add to the time series parameter list according to the multiple newly added items.
2. The SWMM and EFDC coupling method according to claim 1, wherein Updating the time series parameters in the EFDC model according to the time series parameter list in the EFDC model and the model simulation results includes: Finding multiple time series positions corresponding to the multiple return sequence numbers according to the multiple return sequence numbers, wherein the multiple time series positions are based on files corresponding to the multiple return sequence numbers; Replacing and / or adding boundary conditions for the multiple time series positions according to the model simulation results.
3. The SWMM and EFDC coupling method according to any one of claims 1-2, characterized in that After updating the time series in the EFDC model according to the time series parameter list in the EFDC model and the model simulation results, it further includes: Invoking the EFDC model calculation program to perform simulation calculations.
4. A SWMM and EFDC coupling device, characterized in that, For implementing the SWMM and EFDC coupling method according to any one of claims 1-3, the SWMM and EFDC coupling device includes: A coupling information acquisition module for acquiring coupling information, wherein the coupling information represents the interaction information between the SWMM model and the EFDC model; An SWMM model file simulation module for performing simulation and conversion according to the model file of the SWMM model to obtain a model simulation result conforming to the EFDC time series format; A time series parameter list update module for acquiring the time series parameter list in the EFDC model and updating the time series parameter list according to the coupling information, wherein the update includes adding the time series parameter list that does not exist in the time series parameter list in the coupling information to the time series parameter list; And, An EFDC model update module for updating the time series parameters in the EFDC model according to the time series parameter list in the EFDC model and the model simulation results.
5. A terminal, comprising a memory and a processor, wherein a computer program capable of running on the processor is stored in the memory, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 3 above.
6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 3 above.
Citation Information
Patent Citations
Wetland and water supplementing engineering environment effect evaluation method and device based on SWMM and EFDC
CN111353718A
Construction method and device of water environment detection coupling model and computer equipment
CN111428350A