## 5 Case Study
### Drinking-Water System Calculation
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Building Type** & **Subtype** & **Endowment** \\ \hline Social housing & Not applicable & 70 Lt/inhab/day \\ \hline \multirow{5}{*}{Single-family house} & With one bathroom, a kitchen and a & 250 Lt/inhab/day \\  & washing machine & 300 Lt/inhab/day \\  & With two bathrooms, a kitchen and a & 350 Lt/inhab/day \\  & washing machine & & \\ With three bathrooms, a kitchen and a & 400 Lt/inhab/day \\  & washing machine & & \\ With more than three bathrooms, a & 450 Lt/inhab/day \\  & kitchen and a washing machine & & \\ \hline Single-start apartment building & Not applicable & 450 Lt/inhab/day \\ Apartment building with an independent & & Endowment varies by department and \\ meter or sub-meter & Not applicable & according to the subtypes applied for \\  & & single-family dwellings \\ \hline Commercial or office premises & Occupation per employee & 150 Lt/inhab/day \\  & Occupancy by surface area & 10 Lt/m2/day \\ \hline Bar, restaurant, fountain and similar & Not applicable & 40 Lt/m2/day \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Adapted supplies for automatic calculation. In the case in which a network has sub-meters with diameters that are not consecutive values in relation to the general meter diameter, according to the order tabulated in Table 4, the final diameter of the sub-meter should be considered as the value immediately below the diameter of the general meter of the system. This is for construction purposes because, if diameters differ by more than two values, the connection of the meter to the sub-meter segment would lead to the incorporation of an unnecessary number of diameter reduction accessories, making the sub-meter inefficient in terms of construction. The material type of the pipe is defined according to the minimum acceptable nominal pressure for water conduction, which must be greater than or equal to 10 kgf/cm\({}^{2}\)[26]. In addition, the usable diameter is limited to a minimum, imposed by the RIDAA, of 13 mm for copper or 16 mm for plastic materials. In addition, diameters that are not commercially available are not considered, as is the case for 15 mm copper pipes. Based on the parameters required as input data for the calculation of sanitary plumbing networks, as well as the considerations previously mentioned, a database spreadsheet was generated. The contents of this spreadsheet are summarised in Table 5.  
As an adaptation for the automatic iteration processes, and in order to obtain results within the normative margins, a safety criterion can be established regarding the flow velocities in the pipes for the conduction of drinking water. The maximum flow velocity must be 2.5 m/s for external or main distribution pipes and 2.0 m/s for the internal pipes of the network [26]. As a result, the restriction limiting velocity can be modified to 2.0 m/s in all the pipes of the system, regardless of their conditions, except for the section located immediately downstream of the house connection, where the restriction can be maintained at 2.5 m/s. These values are selected under the assumption that this section will be the one with the largest diameter in the entire network. This definition has the purposes of giving continuity to the changes in diameter between the different sections and protecting the system from possible damage due to water hammer effects. Applying the workflow described in Figure 2, different series of codes were analysed and tested in order to extract the relevant information from the model. The optimal and lightest way to transfer the data corresponding to each object in the project model in an \begin{table}
\begin{tabular}{c c c} \hline \hline
**Diameter (mm)** & \
\begin{tabular}{c} **Maximum Daily** \\ **Consumption (m\({}^{3}\)/day)** \\ \end{tabular} &
\begin{tabular}{c} **Probable Maximum** \\ **Consumption (L/min)** \\ \end{tabular} \\ \hline
13 & 3 & 50 \\
19 & 5 & 80 \\
25 & 7 & 117 \\
38 & 20 & 333 \\
50 & 30 & 500 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Table of meter capacities [26].