Pipe network flow resistance rapid calculation method based on Modelica
Through the fast calculation method of pipeline network flow resistance based on Modelica, the problems of low flow resistance calculation efficiency and high iteration cost in the existing technology are solved, and the rapid calculation and iterative verification of pipeline network flow resistance are realized, which improves the calculation efficiency and model application sex.
Patent Information
- Application Number
- CN202411455389.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-17
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art has low flow resistance calculation efficiency in pipeline network systems, making it difficult to quickly iterate and verify, and local modifications to complex systems require recalculation, which has high iteration cost.
The rapid calculation method of pipeline network flow resistance based on Modelica is adopted, and rapid calculation and iterative verification are achieved through flow resistance node decomposition, characteristic flow resistance unit model construction, flow resistance system model construction, experimental data calibration and verification.
It realizes rapid calculation and iterative verification of pipeline network flow resistance, improves computing efficiency and model applicability, reduces iterative costs, and provides a fast and flexible design verification tool.
Smart Images

Figure CN119442949A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of system modeling and simulation, and in particular to a method for quickly calculating pipe network flow resistance based on Modelica. Background Art
[0002] In modern industry and engineering design, pipe network systems are widely used in various fluid transportation, distribution and processing tasks, such as water supply systems, oil and gas pipelines, fluid transportation systems in chemical production, cooling circuits of various equipment, etc. These pipe network systems are usually composed of multiple components, including pipes, valves, pumps, heat exchangers, etc. In order to ensure the efficient, safe and economical operation of the pipe network system, the flow resistance characteristics in the pipe network system must be accurately calculated and analyzed.
[0003] There are two main traditional methods for calculating flow resistance. One is based on empirical formulas or data tables, and the other is based on finite element models. The first method has high calculation efficiency, but empirical formulas often cannot calculate the flow resistance of all types of pipelines. It is also necessary to decompose and calculate the pipeline network and then sum them. At the same time, many parameters are coupled, and it is difficult to determine local parameters for complex systems, making calculation difficult. CFD is a more commonly used calculation method with high calculation accuracy, but it is inefficient for complex pipeline networks. At the same time, local modifications require recalculation of the entire system, and the iteration cost is high.
[0004] Modelica is an open, equation-based, object-oriented, multi-domain unified modeling language. It can easily realize physical system modeling for complex heterogeneous models of multi-domain coupling in different fields such as mechanics, electronics, hydraulics, air pressure, heat, etc., so as to quickly build physical simulation models of complex systems. It also supports generalized Kirchhoff's laws and has inherent advantages in calculating the flow resistance of complex pipe networks. It can directly integrate the traditional empirical formula or interpolation table flow resistance calculation method without processing and storing intermediate variables. Compared with CFD simulation, it can also conveniently adjust the local pipe network without rebuilding the entire model, which has the advantages of fastness and flexibility.
[0005] Therefore, those skilled in the art provide a method for quickly calculating the flow resistance of a pipe network based on Modelica to solve the problems raised in the above background technology. Summary of the invention
[0006] 1. Technical issues to be resolved
[0007] In view of the shortcomings of the prior art, the present invention provides a method for quickly calculating the flow resistance of a pipeline network based on Modelica to meet the needs of engineering personnel for analyzing the pressure loss and flow distribution of each part of the pipeline network during pipeline design or use, thereby realizing rapid calculation and rapid iterative verification of the flow resistance of each part of the pipeline network, and providing a fast and flexible design verification tool for engineering personnel in the planning, design or application stages.
[0008] (II) Technical solution
[0009] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0010] A method for quickly calculating the flow resistance of a pipe network based on Modelica comprises the following steps:
[0011] Step 1. Flow resistance node decomposition
[0012] For a complex pipe network, the first step is to decompose the parts that may cause flow resistance, such as joints, damping holes, concentrated pipes, and long pipes;
[0013] Step 2. Characteristic flow resistance unit model construction
[0014] The characteristic flow resistance unit disassembled in step 1 is modeled using the Modelica model. The core of this model is that the interfaces at both ends of the Modelica model are composed of pressure and flow.
[0015] Step 3. Flow resistance system model construction
[0016] Use the flow resistance characteristic unit established in step 2 to construct the system model in the same way as decomposed in step 1;
[0017] Step 4. Calibrate and verify experimental data
[0018] If there are corresponding experimental data, the system model can be calibrated and verified through the experimental data;
[0019] Step 5. Conduct simulation analysis and application
[0020] After completing the above steps, the characteristic flow resistance unit model library and system model are obtained. The characteristic flow resistance unit model library can be accumulated and reused to provide a basis for subsequent system model simulation.
[0021] Furthermore, in step 1, the complex pipe network is split into flow resistance pipe networks composed of various characteristic flow resistance units by using a lumped parameter method.
[0022] Furthermore, in step 2, the generalized Kirchhoff's law is used to describe the fluid. The relationship between the pressure and flow of the interface recording node is used to establish the relationship between the flow resistance. There are many ways to express the relationship. Modeling can be derived through mechanism formulas, such as theoretical formulas for slender holes and thin-walled holes, or empirical formulas, such as the empirical formula for pipeline flow resistance that refers to the friction coefficient of the pipeline wall, or experimental data of characteristic nodes. The experimental data can be interpolated or the data can be interpolated using AI tools. The data and mechanism can also be combined to form a solution model for mechanism data fusion, and the CFD simulation results can also be reduced-order integrated.
[0023] Furthermore, in step 2, the characteristic flow resistance unit model can also take advantage of the simulation model to establish information transmission between nodes, such as the dynamic pressure head and Reynolds number of the previous node, and transmit the kinetic energy information and flow state information in the previous node to the next node.
[0024] Furthermore, in step 3, the construction is carried out according to the actual pipe network structure, the corresponding node interfaces containing pressure and flow are connected, the necessary information interfaces for upstream and downstream node calculations are connected, the characteristic parameters of each characteristic flow resistance unit are defined, the working medium and environmental parameters are defined, and the construction of the flow resistance model is completed.
[0025] Furthermore, in step 4, some empirical parameters or parameters that are difficult to positively determine may be calibrated, and then the system model may be verified by comparing simulation and experimental parameters.
[0026] Furthermore, in step 5, the system model can simulate the current state and also quickly modify the system, such as replacing some components or modifying parameters, for rapid iterative verification.
[0027] (III) Beneficial effects
[0028] The present invention provides a method for quickly calculating the flow resistance of a pipe network based on Modelica. It has the following beneficial effects:
[0029] 1. The present invention provides a method for quickly calculating the flow resistance of a pipe network based on Modelica. By establishing and accumulating a characteristic flow resistance unit model library, a variety of methods can be used to flexibly construct characteristic flow resistance unit models, such as mechanism models, mechanism data fusion models, integrated external models, and other methods to model the flow resistance unit. The modeling methods are flexible and diverse. At the same time, the accumulated flow resistance unit models can be reused and applied to multiple objects, and have wider applicability.
[0030] 2. The present invention provides a method for quickly calculating the flow resistance of a pipe network based on Modelica. The model built based on the Modelica language has two programming methods: text and graphical. The model can be quickly built through a drag-and-drop modeling method, and the system model parameters can be conveniently adjusted through text. The model can be quickly iterated in the design stage and the application stage, thereby achieving rapid model construction and convenient modification.
[0031] 3. The present invention provides a method for quickly calculating the flow resistance of a pipe network based on Modelica. Compared with the traditional method of using an algorithm to iteratively calculate until convergence, the method of using a unified solver to generate code and run it through Modelica language programming will greatly improve the calculation efficiency, making the calculation efficiency higher.
[0032] 4. The present invention provides a method for quickly calculating the flow resistance of a pipe network based on Modelica. When using this method to calculate the flow resistance, the model will be verified by unit testing, component testing, and system testing. During the step-by-step verification, the model confidence can be guaranteed by calibration and verification of parameters, making the model confidence more guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of a simulation method flow chart provided by an embodiment of the present invention;
[0034] Figure 2 A schematic diagram of the example model building process provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the specific embodiments of the present invention to clearly and completely describe the technical solutions in the specific embodiments of the present invention. Obviously, the specific embodiments described are only part of the specific embodiments of the present invention, not all of the specific embodiments. Based on the specific embodiments of the present invention, all other specific embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] The specific implementation of the present invention provides a method for quickly calculating the flow resistance of a pipe network based on Modelica, comprising the following steps:
[0038] Step 1. Decomposition of flow resistance nodes
[0039] For a complex pipe network, the first step is to decompose the parts that may cause flow resistance, such as joints, damping holes, concentrated pipes, and long pipes. By using the concentrated parameter method, the complex pipe network is split into flow resistance pipe networks composed of various characteristic flow resistance units;
[0040] Step 2. Characteristic flow resistance unit model construction
[0041] The characteristic flow resistance unit disassembled in step 1 is modeled using the Modelica model. The core of this model is that the interfaces at both ends of the Modelica model are composed of pressure and flow.
[0042] Use generalized Kirchhoff's law to describe the fluid, record the relationship between the pressure and flow of the node through the pressure and flow of the interface, and establish the relationship between the flow resistance. There are many ways to express it. It can be derived from the mechanism formula, such as the theoretical formula of slender holes and thin-walled holes, or it can be an empirical formula, such as the empirical formula of pipeline flow resistance that refers to the friction coefficient of the pipeline wall, or it can be the experimental data of the characteristic node. Interpolate the experimental data or use AI tools to interpolate the data. It can also combine the data and mechanism to form a solution model that integrates the mechanism data, and can also reduce the order of integration of CFD simulation results;
[0043] At the same time, the characteristic flow resistance unit model can also take advantage of the simulation model to establish information transmission between nodes, such as the dynamic pressure head and Reynolds number of the previous node, and transmit the kinetic energy information and flow state in the previous node to the next node;
[0044] Step 3. Flow resistance system model construction
[0045] Use the flow resistance characteristic unit established in step 2, build the system model in the manner decomposed in step 1, build it according to the real pipe network structure, connect the corresponding node interfaces containing pressure and flow, connect the necessary information interfaces for upstream and downstream node calculations, define the characteristic parameters of each characteristic flow resistance unit, define the working medium and environmental parameters, and complete the construction of the flow resistance model;
[0046] Step 4. Calibrate and verify experimental data
[0047] If there are corresponding experimental data, the system model can be calibrated and verified through the experimental data. Some empirical parameters or parameters that are difficult to positively determine can also be calibrated, and then the system model can be verified by comparing the simulation and experimental parameters;
[0048] Step 5. Conduct simulation analysis and application
[0049] After completing the above steps, the characteristic flow resistance unit model library and system model are obtained. The characteristic flow resistance unit model library can be accumulated and reused to provide a basis for subsequent system model simulation;
[0050] The system model can not only simulate the current state, but also quickly modify the system, such as replacing some components or modifying parameters, for rapid iterative verification.
[0051] The following will refer to the attached Figure 1 The present invention is described in detail with reference to specific examples.
[0052] Step 1: Decomposition of flow resistance nodes
[0053] For a complex pipe network, the first step is to decompose the parts that may cause flow resistance in order to Figure 2 For example, the pipe network in Figure 2 The decomposition includes characteristic flow resistance units such as the circumferential flow resistance of the concentrated pipe, the axial flow resistance of the concentrated pipe, and the flow resistance along the pipeline. These characteristic flow resistance units can be used to describe the complex pipe network.
[0054] Step 2: Characteristic flow resistance unit model construction
[0055] The characteristic flow resistance unit disassembled in step 1 is modeled using the Modelica model. The core of this model is that the interfaces at both ends of the Modelica model are composed of pressure and flow.
[0056] Use generalized Kirchhoff's laws to describe the fluid. Record the relationship between the pressure and flow of the node through the pressure and flow of the interface. There are many ways to express the relationship between flow resistance. For the model in the example, the concentrated pipe is a combination of the flow resistance along the way and the local flow resistance. It is difficult to calculate it theoretically. Experimental data or CFD simulation data are used for data reduction and a data-based black box model integration is built. For the flow resistance along the way of the pipeline, the empirical formula can be used in combination with the flow state and dynamic pressure head of the front and rear sections for calculation. If some parameters are difficult to determine, the model can also be built using theoretical formulas combined with empirical parameters.
[0057] Step 3: Flow resistance system model construction
[0058] Use the flow resistance characteristic unit established in step 2, construct the system model in the manner decomposed in step 1, construct it according to the actual pipe network structure, connect the corresponding node interfaces containing pressure and flow, connect the necessary information interfaces for upstream and downstream node calculations, define the characteristic parameters of each characteristic flow resistance unit, define the working medium and environmental parameters, and complete the construction of the flow resistance model.
[0059] Taking this case as an example, build a system model such as Figure 2 Shown on the far right.
[0060] Step 4: Calibrate and verify experimental data
[0061] If there are corresponding experimental data, the system model can be calibrated and verified through the experimental data. Taking this case as an example, the correction parameters of the centralized pipe model can be calibrated in combination with the experimental data, and the empirical parameters in the empirical formula can also be calibrated in combination with the experimental data.
[0062] Step 5: Conduct simulation analysis and application
[0063] After completing the above steps, the characteristic flow resistance unit model library and system model are obtained. The characteristic flow resistance unit model library can be accumulated and reused to provide a basis for subsequent system model simulation;
[0064] The system model can not only simulate the current state, but also quickly modify the system, such as replacing some components or modifying parameters, and quickly iterate and verify.
[0065] Taking the case as an example, the single-machine calculation time is about 5s, the CFD simulation takes more than 2h, the model building time is about 30min, and the traditional theoretical calculation modeling time is about more than 10h. At the same time, the simulation data is compared with the actual measurement, and the confidence level is more than 85%, which can meet the engineering needs.
[0066] In the present invention, through the establishment and accumulation of the characteristic flow resistance unit model library, firstly, a variety of methods can be used to flexibly construct the characteristic flow resistance unit model, such as mechanism model, mechanism data fusion model, integrated external model and other methods to model the flow resistance unit, the modeling method is flexible and diverse, and at the same time the accumulated flow resistance unit models can be reused and applied to multiple objects, with wider applicability.
[0067] In the present invention, the model built based on the Modelica language has two programming methods, text and graphical. The model can be quickly built through the drag-and-drop modeling method, and the system model parameters can be conveniently adjusted through text. The model can be quickly iterated in the design stage and the application stage, realizing the rapidity of model building and the convenience of modification.
[0068] In the present invention, compared with the traditional method of using algorithm iterative calculation until convergence, the method of using a unified solver to generate code and run it through Modelica language programming will greatly improve the calculation efficiency and make the calculation efficiency higher.
[0069] In the present invention, when the flow resistance is calculated using this method, the model will be subjected to unit test verification, component test verification, and system test verification. During the step-by-step verification, the model confidence can be guaranteed through parameter calibration and verification, making the model confidence more guaranteed.
[0070] Although specific embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the specific embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for rapid calculation of pipe network flow resistance based on Modelica, characterized in that: The following steps are involved: Step 1. Decomposition of flow resistance nodes For a complex pipe network, the first step is to decompose the parts that may cause flow resistance, such as joints, damping holes, concentrated pipes, and long pipes; Step 2. Characteristic flow resistance unit model construction The characteristic flow resistance unit disassembled in step 1 is modeled using the Modelica model. The core of this model is that the interfaces at both ends of the Modelica model are composed of pressure and flow. Step 3. Flow resistance system model construction Use the flow resistance characteristic unit established in step 2 to construct the system model in the same way as decomposed in step 1; Step 4. Calibrate and verify experimental data If there are corresponding experimental data, the system model can be calibrated and verified through the experimental data; Step 5. Conduct simulation analysis and application After completing the above steps, the characteristic flow resistance unit model library and system model are obtained. The characteristic flow resistance unit model library can be accumulated and reused to provide a basis for subsequent system model simulation.
2. A method for rapid calculation of pipe network flow resistance based on Modelica according to claim 1, characterized in that: In the step 1, the complex pipe network is split into flow resistance pipe networks composed of various characteristic flow resistance units by using the lumped parameter method.
3. The method for rapid calculation of pipe network flow resistance based on Modelica according to claim 1, characterized in that: In step 2, the generalized Kirchhoff's law is used to describe the fluid. The relationship between the pressure and flow of the node is recorded through the pressure and flow of the interface. There are many ways to express the relationship of flow resistance. Modeling can be derived through mechanism formulas, such as theoretical formulas for slender holes and thin-walled holes, or empirical formulas, such as the empirical formula of pipeline flow resistance that refers to the friction coefficient of the pipeline wall. It can also be experimental data of characteristic nodes, and the experimental data can be interpolated or the data can be interpolated using AI tools. It can also be combined with data and mechanism to form a solution model that fusions mechanism data, and the CFD simulation results can be reduced-order integrated.
4. The method for rapid calculation of pipe network flow resistance based on Modelica according to claim 1, characterized in that: In step 2, the characteristic flow resistance unit model can also take advantage of the simulation model to establish information transmission between nodes, such as the dynamic pressure head and Reynolds number of the previous node, and transmit the kinetic energy information and flow state information in the previous node to the next node.
5. The method for rapid calculation of pipe network flow resistance based on Modelica according to claim 1, characterized in that: In step 3, the pipeline network is constructed according to the actual structure, the corresponding node interfaces containing pressure and flow are connected, the necessary information interfaces for calculating the upstream and downstream nodes are connected, the characteristic parameters of each characteristic flow resistance unit are defined, the working medium and environmental parameters are defined, and the construction of the flow resistance model is completed.
6. The method for rapid calculation of pipe network flow resistance based on Modelica according to claim 1, characterized in that: In step 4, some empirical parameters or parameters that are difficult to positively determine may also be calibrated, and then the system model may be verified by comparing simulation and experimental parameters.
7. The method for rapid calculation of pipe network flow resistance based on Modelica according to claim 1, characterized in that: In step 5, the system model can simulate the current state and also quickly modify the system, such as replacing some components or modifying parameters, to quickly iterate and verify.