Building water supply pipeline water age calculation method

CN122594626APending Publication Date: 2026-08-18CHINA ARCHITECTURE DESIGN & RES GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611079553.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0004]鉴于上述的分析,本发明旨在提供一种建筑给水管道水龄计算方法,用以解决现有技术难以适应室内环状给水管道水龄计算的问题

Benefits of technology

[0016]本发明技术方案至少能够实现以下效果之一:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122594626A_ABST
    Figure CN122594626A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of building water supply pipeline water age calculation method, belong to building water supply technical field, solve the problem that existing technology is difficult to adapt to indoor annular water supply pipeline water age calculation.The building water supply pipeline water age calculation method of the present application specifically includes the following steps: step S1: obtaining the topological structure data of water supply pipeline and boundary condition data;Step S2: collect the flow and water head of the theoretically most unfavorable node of water supply pipeline and the flow and water head of one of the nodes directly connected with water source;Step S3: based on the flow and water head of the theoretically most unfavorable node collected and the flow and water head of the node directly connected with water source, calculate the water head of each unknown node and the water flow of each pipe section;Step S4: according to the water flow of each pipe section, calculate the water age of each node.The present application realizes the real-time water age of each node in building indoor annular water supply pipeline to be calculated quickly, reliably and accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of building water supply technology, and in particular to a method for calculating the water age of building water supply pipes. Background Technology

[0002] As people's requirements for drinking water quality continue to increase, the water age in water supply pipelines has become an important indicator for evaluating water quality safety. Water age refers to the average time it takes for water to travel from the water source into the pipeline to a certain point of use. The longer the water age, the more serious the decay of residual chlorine and the higher the risk of microbial growth, thus affecting water quality safety and, in severe cases, posing a threat to human health.

[0003] Existing water age calculation methods are mainly designed for branched pipes or large municipal ring pipes, relying on complete node flow monitoring data. For ring water supply pipes in single-family residences, the following characteristics exist: First, the water flow path in a ring pipe is multidirectional, and some nodes may receive water flow from two directions simultaneously. If the single upstream path accumulation method used for branched pipes is applied, the water age of such nodes cannot be accurately calculated. Second, indoor pipes cannot deploy a large number of sensors like municipal pipes, and the lack of node water consumption data makes it difficult to directly apply traditional water age calculation formulas. As a result, existing technologies either rely on complete pipe adjustment data or require the deployment of a large number of online monitoring devices, resulting in high deployment costs and making them unsuitable for practical scenarios where indoor pipe data is lacking and sensor deployment is limited. Summary of the Invention

[0004] Based on the above analysis, the present invention aims to provide a method for calculating the water age of building water supply pipes, in order to solve the problem that the existing technology is difficult to adapt to the calculation of water age of indoor ring water supply pipes.

[0005] The objective of this invention is mainly achieved through the following technical solutions: A method for calculating the water age of building water supply pipes, used to calculate the water age of each water point in a building's indoor ring water supply pipe, includes the following steps: Step S1: Obtain the topology data and boundary condition data of the water supply pipeline; Step S2: Collect the flow rate and head of the theoretically most unfavorable node in the water supply pipeline, as well as the flow rate and head of one of the nodes directly connected to the water source; Step S3: Based on the collected data of the flow rate and head of the most unfavorable node and the flow rate and head of the node directly connected to the water source, calculate the head of each unknown node and the flow rate of each pipe segment. Step S4: Calculate the water age of each node based on the water flow rate of each pipe section.

[0006] Further, step S2 includes: step S21: determining the theoretically most unfavorable node of the water supply pipeline.

[0007] Furthermore, step S2 also includes: step S22: arranging flow sensors and pressure sensors at the theoretically most unfavorable node and one of the nodes directly connected to the water source, and collecting the flow rate and head at the theoretically most unfavorable node and the node directly connected to the water source.

[0008] Further, step S3 includes: step S31: using the head of the theoretically most unfavorable node as a reference, the initial head of the unknown node is set using the fixed initial value method.

[0009] Furthermore, step S3 also includes: step S32: calculating the head of each unknown node and the water flow rate of each pipe segment using a force model.

[0010] Furthermore, step S3 also includes: step S33: calculating the flow residuals of the water source point, the theoretically most unfavorable node, and the node directly connected to the water source.

[0011] Furthermore, step S3 also includes: step S34: determining whether the flow residuals of the water source point, the theoretically most unfavorable node, and the node directly connected to the water source converge.

[0012] Further, step S34 includes: when the flow residual of the water source point, the theoretically most unfavorable node, and the node directly connected to the water source is less than a preset residual threshold, it is considered convergence, and the head of each node and the flow rate of each pipe segment are output; otherwise, it is considered non-convergence, and the head correction of each unknown node is calculated by the Newton-Raphson iteration method, and the corrected head of each unknown node is updated, and then step S32 is repeated.

[0013] Further, step S4 includes: step S41: calculating the water flow velocity of each pipe segment based on the water flow rate of each pipe segment.

[0014] Furthermore, step S4 also includes: step S42: calculating the water age of each node sequentially according to the water flow direction; The formula for calculating water age is:

[0015] In the formula, For nodes Water age; For nodes upstream node Water age, when When the value is 0, the node represents a water source point, and its water age is 0s. For inflow node All upstream nodes The sum of the sets; For pipe section Water flow rate; For pipe section Equivalent length; For pipe section The speed of water flow; For time step.

[0016] The technical solution of this invention can achieve at least one of the following effects: (1) This invention provides a method for calculating the water age of building water supply pipes, which is used to calculate the water age of each water point in a building's indoor ring water supply pipe. Specifically, it includes the following steps: Step S1: Obtain the topological structure data and boundary condition data of the water supply pipe; Step S2: Collect the flow rate and head of the theoretically most unfavorable node of the water supply pipe, as well as the flow rate and head of one of the nodes directly connected to the water source; Step S3: Based on the collected flow rate and head of the theoretically most unfavorable node and the flow rate and head of the node directly connected to the water source, calculate the head of each unknown node and the water flow rate of each pipe segment; Step S4: Calculate the water age of each node according to the water flow rate of each pipe segment; This invention realizes the calculation of the water age of indoor ring water supply pipes, thereby enabling more accurate and reliable water quality safety assessment of building water supply pipes, improving water quality safety, and reducing threats to human health.

[0017] (2) The water age calculation method for building water supply pipelines of the present invention also allows for the calculation of the water age of all nodes by means of a minimum of only two nodes: the node with the most unfavorable theoretical conditions and one node directly connected to the water source. This eliminates the need to install a large number of sensors throughout the entire pipeline network, thereby reducing the investment in monitoring hardware and the cost of construction and renovation.

[0018] (3) The method for calculating the water age of building water supply pipelines in this invention also adopts the "fixed initial value method" to replace the random initial value or empirical initial value. The water head of the theoretically most unfavorable node is used as the benchmark for standardized initial assignment, so that the Newton-Raphson iteration method has a faster convergence speed and stronger stability when solving the nonlinear pipe network hydraulic equation, reducing the iteration divergence problem caused by improper selection of initial value, thereby improving the reliability of the calculation results.

[0019] (4) The water age calculation method for building water supply pipelines of the present invention also verifies the flow residuals at three points: the water source point, the node directly connected to the water source, and the theoretically most unfavorable node. Convergence is determined only when the flow residuals at all three points are lower than a preset threshold. This method differs from the traditional method of verifying only the residuals of a single node, thus avoiding false convergence problems such as local flow balance and overall pipeline flow imbalance. The output flow and velocity data of each pipe segment are real and reliable, providing accurate data for subsequent water age calculation.

[0020] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description

[0021] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.

[0022] Figure 1 This is a flowchart of the water age calculation method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of an example indoor ring-shaped water supply pipe according to an embodiment of the present invention. Detailed Implementation

[0023] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which constitute a part of the present invention and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0024] Example 1 A specific embodiment of the present invention discloses a method for calculating the water age of building water supply pipes, used to calculate the water age of each node in a building's indoor ring-shaped water supply pipe, such as... Figure 1 As shown, it includes the following steps: Step S1: Obtain the topology data and boundary condition data of the water supply pipeline; The topology data of water supply pipelines includes pipe segment and node data, local resistance component data, and coefficient data; Pipe segment and node data, as well as local resistance component data, can be obtained through design drawings or on-site surveying. Pipe segment and node data includes node type (such as water source point, water use point) and location, node number, pipe segment distribution and direction, pipe segment number, pipe segment length, pipe segment inner diameter, and pipe material type; local resistance component data includes the type and quantity of components such as elbows, tees, and valves; coefficient data includes the roughness coefficient of the pipe segment. Boundary condition data includes the head and flow rate at the water source point of the water supply pipe inlet.

[0025] Step S2: Collect the flow rate and head at the theoretically most unfavorable node in the water supply pipeline, as well as the flow rate and head at one of the nodes directly connected to the water source; specifically including the following steps: Step S21: Determine the theoretically most unfavorable node of the water supply pipeline; Specifically, the equivalent lengths of the two water supply paths at each node are calculated, and the smaller equivalent length is taken as the comprehensive resistance of that node, thus obtaining the comprehensive resistance of all nodes. The comprehensive resistances of all nodes are compared, and the node with the largest comprehensive resistance is the theoretically most unfavorable node of the water supply pipeline. The equivalent length of a local resistance component can be obtained by referring to a table based on the inner diameter of the pipe fitting and the type of component (for details, please refer to the "Standard for Design of Building Water Supply and Drainage" GB50015). Step S22: Deploy flow sensors and pressure sensors at the theoretically most unfavorable node and one of the nodes directly connected to the water source, and collect the flow rate and head at the theoretically most unfavorable node and the node directly connected to the water source.

[0026] Step S3: Based on the collected flow rate and head of the theoretically most unfavorable node and the flow rate and head of the node directly connected to the water source, calculate the head of each unknown node and the flow rate of each pipe segment; specifically including the following steps: Step S31: Using the head of the theoretically most unfavorable node as a reference, set the initial head of the unknown node using the fixed initial value method; Specifically, firstly, the integer and decimal parts of the head at the theoretically most unfavorable node are extracted; if the decimal part is less than 0.5, the initial value is the integer part plus 0.5; if the decimal part is greater than or equal to 0.5, the initial value is the integer part plus 1.0. This is used to assign initial head values ​​to unknown nodes. The calculation formula is as follows:

[0027] In the formula, For unknown nodes The initial head; The integer part of the node with the worst theoretical outcome; Step S32: Calculate the head of each unknown node and the flow rate of each pipe section using the hydraulic model; The hydraulic model includes the nodal flow conservation equation and the Hayzen-Williams pipe section flow equation. The node flow conservation equation is:

[0028] In the formula, For inflow node Total flow outflow node Total flow For nodes Water flow rate; The flow equation for the Hayzen-Williams pipe section is:

[0029] In the formula, For pipe section The water flow, i.e., the node To node Water flow rate in the pipe section between; , For pipe section Nodes at both ends and nodes water head; For pipe section The drag coefficient; To determine the pipe section The direction of water flow, when Take +1 to indicate the pipe section The direction of water flow is determined by the nodes. Flow to Node Otherwise, take -1, indicating a pipe section. The direction of water flow is determined by the nodes. Flow to Node ; The resistance coefficient of each pipe section was calculated using the Hayzen-Williams empirical formula, which is as follows:

[0030] In the formula, For pipe section The length of the pipe segment, i.e., the node. To node The length of the pipe section; For pipe section The roughness coefficient of the pipe section, also known as the Hayzen-Williams coefficient, can be determined according to the relevant clauses in the "Standard for Design of Building Water Supply and Drainage" GB50015. For pipe section The inner diameter; Step S33: Calculate the flow residuals of the water source point, the theoretically most unfavorable node, and the node directly connected to the water source; Specifically, the formula for calculating the flow residual is:

[0031] In the formula, For nodes The flow residual; For nodes The net flow, i.e., the flow into the node The sum of water flow rates in the pipe section minus the outflow node The sum of water flow rates in the pipe sections; For nodes Water flow rate; For pipe section Water flow rate; Step S34: Determine whether the flow residuals of the water source point, the theoretically most unfavorable node, and the node directly connected to the water source have converged. If they have converged, output the head of each node and the flow rate of each pipe segment. If they have not converged, calculate the head correction of each unknown node using the Newton-Raphson iteration method, update the corrected head of each unknown node, and then repeat step S32. Specifically, when the flow residuals at the water source, the theoretically most unfavorable node, and the node directly connected to the water source are less than a preset residual threshold (the preset residual threshold can be selected based on the accuracy value of the water meter at the water source; in this embodiment, it is taken as...), the flow residuals are considered to be... If the expression is true, the expression is convergent; otherwise, it is non-convergent.

[0032] Step S4: Calculate the water age of each node based on the water flow rate of each pipe section; specifically, this includes the following steps: Step S41: Calculate the water flow velocity of each pipe section based on the water flow rate of each pipe section; The formula for calculating the water flow velocity in each pipe section is as follows:

[0033] In the formula, For pipe section water flow speed, For pipe section Water flow rate For pipe section The inner diameter; Step S42: Calculate the water age of each node sequentially according to the direction of water flow; The formula for calculating water age is:

[0034] In the formula, For nodes Water age; For nodes upstream node Water age, when When the value is 0, the node represents a water source point, and its water age is 0s. For inflow node All upstream nodes The sum of the sets; For pipe section Water flow rate; For pipe section Equivalent length; For pipe section The speed of water flow; The time step is set to 1 minute, or 60 seconds. When the inflow node When the total flow is 0, it indicates that the node There is no upstream water flow; at this point, the node... The water age is treated as a stagnation state, maintaining the value from the previous calculation time and accumulating the time step, i.e.:

[0035] In the formula, For nodes The water age at the previous moment; △t is the time step, which is 1 minute, or 60 seconds; The methods for calculating the water age of water supply pipelines do not consider flow velocity head; By following the steps above, the real-time water age of each node in the building's indoor ring water supply pipe can be obtained.

[0036] Compared with the prior art, this embodiment has at least the following effects: (1) The present invention only requires the installation of flow and pressure monitoring equipment on two nodes, namely the node with the most unfavorable theoretical conditions and one node directly connected to the water source. The water age of all nodes can be inferred from the hydraulic model. There is no need to install a large number of sensors in the entire pipeline network, which reduces the investment in monitoring hardware and construction and renovation costs.

[0037] (2) The present invention adopts the "fixed initial value method" to replace the random initial value or empirical initial value. The water head of the theoretically most unfavorable node is used as the benchmark for normalized initial assignment, so that the Newton-Raphson iteration method has a faster convergence speed and stronger stability when solving the nonlinear pipe network hydraulic equation, reducing the iteration divergence problem caused by improper selection of initial value, and improving the reliability of the calculation results.

[0038] (3) This invention is designed for the mixed characteristics of incoming water in the indoor ring water supply network of buildings. It uses a flow weighting method to calculate the water age of nodes, and the result is closer to the actual hydraulic residence time.

[0039] (4) The present invention uses a 1-minute time step for recursive calculation, which can be combined with sensor data to realize dynamic real-time update of water age. When the operating conditions of the pipeline network (such as changes in water consumption and valve adjustment) change, the system can quickly respond and output the real-time water age of each node.

[0040] (5) In this embodiment, the flow residuals at three points are checked: the water source node, the node directly connected to the water source, and the node with the most unfavorable theoretical conditions. Convergence can only be determined when the flow residuals at all three points are lower than the preset threshold (i.e., the water meter accuracy threshold). This is different from the traditional method of checking only the residuals of a single node. It avoids the false convergence problem of local flow balance and overall pipeline flow imbalance. The output flow and velocity data of each pipe section are real and reliable, providing accurate data for subsequent water age calculation.

[0041] To clearly and fully explain the method for calculating the water age of building water supply pipes in this embodiment, the following method is adopted: Figure 2 The following example illustrates the concept of an indoor ring-shaped water supply pipe: Step S1: Obtain the topology data and boundary condition data of the indoor ring water supply pipe; The topology data is shown in Table 1: Table 1. Topological data of indoor ring-shaped water supply pipes

[0042] The water supply pipe is an old steel pipe with a roughness coefficient of 100 and an inner diameter of 25.4 mm. Boundary condition data, namely the head and flow rate at water source point 0, are obtained from the water meter at the household water supply point: =25.0m, =2.05L / s.

[0043] Step S21: Determine the theoretically most unfavorable node of the water supply pipeline; Specifically, the equivalent lengths of the two water supply paths at each node are calculated, and the smaller equivalent length is taken as the comprehensive resistance of that node, thus obtaining the comprehensive resistance of all nodes. The comprehensive resistances of all nodes are compared, and the node with the largest comprehensive resistance is the theoretically most unfavorable node of the water supply pipeline. Table 2 Calculation Table of the Theoretical Most Unfavorable Nodes for Water Supply Pipelines

[0044] Theoretically, the most unfavorable node is node 3 (i.e., water point 3). Step S22: Deploy flow sensors and pressure sensors at the theoretically most unfavorable node 3 and one of the nodes 1 directly connected to the water source, and collect the flow rate and head at the theoretically most unfavorable node 3 and the node 1 directly connected to the water source. Specifically: Head and flow rate of node 1, which is directly connected to the water source: =21.72m, =0.6L / s The theoretically most unfavorable node 3 head and flow rate: =21.22m, =0.15L / s Step S31: Using the theoretically most unfavorable head of node 3 as a reference, calculate the initial head of the unknown nodes, i.e.: Initial head of node 2: =21.5m Initial head at node 4: =21.5m Initial head at node 5: =21.5m; Step S32: Calculate the water flow rate of each pipe section using a hydraulic model; For the pipe section : =1064443, =1.057L / S; For the pipe section : =748823, =0.297L / S; For the pipe section : =742635, =0.340L / S; For the pipe section : =711692, =-0.348L / S, At this point, the negative sign indicates that the actual water flow direction of the pipe section is opposite to the numbering direction, that is, from node 4 to node 3; For the pipe section : =643617, =0L / S, An initial flow rate of 0 does not mean there is actually no water, but rather a transient value under the initial assumption, which returns to normal after iterative convergence; For the pipe section : =1113952, =-1.068L / S; At this point, the negative sign indicates that the actual water flow direction of the pipe section is opposite to the numbering direction, that is, from node 0 to node 5; Step S33: Calculate the flow residuals at water source point 0, node 1 directly connected to the water source, and node 3, which is theoretically the most unfavorable node, i.e.: Flow residual at water source point 0: =2.05L / S-1.057L / S-1.068L / s=0.075L / s; Flow residual at node 1, which is directly connected to the water source: =1.057L / S-0.297L / S-0.6L / s=0.160L / s; Theoretically, the worst-case scenario for node 3 is the flow residual: =0.340L / S+0.348L / S-0.15L / s=0.538L / s; Step S34: If the flow residual of water source point 0, node 1 directly connected to the water source, and node 3, which is theoretically the most unfavorable, is greater than the preset threshold (0.0001L / s), it is not converged. Then, the head correction value of each unknown water point is calculated by the Newton-Raphson iteration method, and the corrected head of each unknown node is updated. Then, step S32 is repeated. When the flow residuals at water source point 0, node 1 directly connected to the water source, and node 3 (the theoretically most unfavorable node) are less than the preset threshold (0.0001 L / s), convergence is achieved by outputting the head of each node and the flow rate of each pipe segment, i.e.: For node 1: =21.72m; For node 2: =21.231m; For node 3: =21.22m; For node 4: =21.243m; For node 5: =21.945m; For the pipe section : 1.057 L / s; For the pipe section : 0.457 L / S; For the pipe section : =0.06L / S; For the pipe section : =-0.09L / S; For the pipe section : -0.603L / S; For the pipe section : -0.993L / S; Step S41: Calculate the water flow velocity in each pipe section based on the water flow rate in each pipe section; that is... Pipe section Water flow velocity: =2.086m / s; Pipe section Water flow velocity: =0.902m / s; Pipe section Water flow velocity: =0.119m / s; Pipe section Water flow velocity: =0.177m / s; Pipe section Water flow velocity: =1.191m / s; Pipe section Water flow velocity: =1.959m / s; Step S42: Calculate the water age of each node sequentially according to the direction of water flow; First, calculate the water age of nodes 1 and 2 respectively, following the path Node 0 (i.e., water source 0) — Node 1 (i.e., water usage point 1) — Node 2 (i.e., water usage point 2) — Node 3 (i.e., water usage point 3) (nodes 1 and 2 have only one water inflow path), that is: Water age at node 1: =64.12s; Water age at node 2: =130.83s; Then, following the path Node 0 (i.e., water source point 0) — Node 5 (i.e., water usage point 5) — Node 4 (i.e., water usage point 4) — Node 3 (i.e., water usage point 3), calculate the water age of Node 5 and Node 4 respectively (Node 5 and Node 4 only have one water inlet), that is: Water age at node 5: =64.59s; Water age at node 4: =128.96s; Finally, calculate the water age of node 3 (i.e., water point 3) (node ​​3 has two water inflow paths: node 0—node 1—node 2—node 3 and node 0—node 5—node 4—node 3), that is: Water age at node 3: =229.4 s; This allows us to obtain the real-time water age of each node in the building's indoor ring water supply pipe. This water age is within the allowable error range of the water age obtained by measuring the head and flow data of all nodes. The node water age data obtained by this method is in good agreement with the measured values, verifying the effectiveness and reliability of the calculation method.

[0045] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for calculating the water age of a building's water supply pipes, used to calculate the water age of each water point in a building's indoor ring-shaped water supply pipe, characterized in that... Includes the following steps: Step S1: Obtain the topology data and boundary condition data of the water supply pipeline; Step S2: Collect the flow rate and head of the theoretically most unfavorable node in the water supply pipeline, as well as the flow rate and head of one of the nodes directly connected to the water source; Step S3: Based on the collected data of the flow rate and head of the most unfavorable node and the flow rate and head of the node directly connected to the water source, calculate the head of each unknown node and the flow rate of each pipe segment. Step S4: Calculate the water age of each node based on the water flow rate of each pipe section.

2. The method for calculating the water age of building water supply pipes according to claim 1, characterized in that, Step S2 includes: Step S21: Determine the theoretically most unfavorable node of the water supply pipeline.

3. The method for calculating the water age of building water supply pipes according to claim 2, characterized in that, Step S2 further includes: Step S22: Flow sensor and pressure sensor are arranged at the theoretically most unfavorable node and one of the nodes directly connected to the water source to collect the flow rate and head of the theoretically most unfavorable node and the node directly connected to the water source.

4. The method for calculating the water age of building water supply pipes according to claim 1, characterized in that, Step S3 includes: Step S31: Using the head of the theoretically most unfavorable node as a reference, the initial head of the unknown node is set using the fixed initial value method.

5. The method for calculating the water age of building water supply pipes according to claim 4, characterized in that, Step S3 further includes: Step S32: Calculate the head of each unknown node and the flow rate of each pipe section using the force model.

6. The method for calculating the water age of building water supply pipes according to claim 5, characterized in that, Step S3 further includes: Step S33: Calculate the flow residuals of the water source point, the theoretically most unfavorable node, and the node directly connected to the water source.

7. The method for calculating the water age of building water supply pipes according to claim 6, characterized in that, Step S3 further includes: Step S34: Determine whether the flow residuals of the water source point, the theoretically most unfavorable node, and the node directly connected to the water source converge.

8. The method for calculating the water age of building water supply pipes according to claim 7, characterized in that, Step S34 includes: if the flow residual of the water source point, the theoretically most unfavorable node, and the node directly connected to the water source is less than the preset residual threshold, it is considered convergence, and the head of each node and the flow rate of each pipe segment are output; otherwise, it is considered non-convergence, and the head correction of each unknown node is calculated by the Newton-Raphson iteration method, and the corrected head of each unknown node is updated, and then step S32 is repeated.

9. The method for calculating the water age of building water supply pipes according to claim 1, characterized in that, Step S4 includes: Step S41: Calculate the water flow velocity of each pipe section based on the water flow rate of each pipe section.

10. A method for calculating the water age of building water supply pipes according to claim 9, characterized in that, Step S4 further includes: Step S42: Calculate the water age of each node sequentially according to the water flow direction; The formula for calculating water age is: In the formula, For nodes Water age; For nodes upstream node Water age, when When the value is 0, the node represents a water source point, and its water age is 0s. For inflow node All upstream nodes The sum of the sets; For pipe section Water flow rate; For pipe section Equivalent length; For pipe section The speed of water flow; For time step.