Modelling of corrosion rate in the drinking water distribution network using Design Expert 13 software

This study is focused on the modelling of the composite effect of corrosion factors using Design Expert 13 software on the corrosion rate in the water distribution network of Patna (Bihar), India. A total of nine variables, including pH, temperature, total dissolved solid (TDS), alkalinity, calcium hardness, chloride, sulphate, dissolved oxygen (DO) and time, were considered for modelling. The physicochemical parameters were determined through regular monitoring of water samples. The corrosion rate was determined by the direct monitoring of water distribution pipes using adjustments of seven GI coupons for 45, 90, 135, 180, 225, 270 and 315 days. Modelling was performed for various corrosion factors using the low-level and high-level experimental ranges. Nine of the corrosion factors, i.e. pH, temperature, TDS, alkalinity, calcium hardness, chloride, sulphate, DO and time, were considered in this study. The data used for low-level and high-level range were 7.28, 23, 430, 115, 24, 18, 10.94, 3.5 and 0 and 7.86, 28, 704, 284, 180, 98, 38.7, 6.8 and 315, respectively. Using the Box-Behnken design (BBD), 160 runs were conducted, including ten replicates at the central point of each block. The results of ANOVA indicate that the values of R2, adjusted R2 and predicted R2 are 0.9714, 0.9507 and 0.8941, respectively. The value of R2 (0.9714) was close to 1, which indicates a good fit. The adequate precision was found to be 30.8442, indicating a good signal. The coefficient of variance discusses reproducibility, and in this case, it was 9.90%. On the basis of the ANOVA result, the quadratic model is well-fitted and can be accepted as a suitable model. A total of seven parameters, such as chloride, sulphate, hardness, alkalinity, pH, calcium and hardness, were used for the design of the experimental corrosion rate (CR). Corrosion rate as observed by direct monitoring of the water distribution system was 1.37, 3.08, 1.90, 1.38, 1.09, 2.05 and 1.45 MPY for 45, 90, 135, 180, 225, 270 and 315 days, respectively. These individual CR versus synthetic aqueous solutions were used to validate the interaction of the response surface. It was observed that the trend of individual corrosion rates in synthetic aqueous solutions and the interaction of composite variables with corrosion rates in a quadratic model of response surfaces were clearly correlated.


Introduction
A key infrastructure of our society is the distribution of drinking water. As water flows through distribution mains and service lines in a distribution network, the quality of the water deteriorates (Maheshwari et al. 2020). The corrosion developed in iron pipes used in a distribution system can cause three distinct but related problems. First, a pipe loses mass through oxidation to ferrous species or iron-containing scale. Secondly, the scale can develop into large tubercles that decrease water capacity and increase head loss. This corrosion scale deposit reduces the hydraulic capacity of the pipes, making it more difficult to deliver water at a desired flow rate (Sarin et al. 2004). Lastly, the release of soluble or particulate corrosion by-products into water lowers aesthetic quality (Mcneill & Edwards 2001). There are several economic and cost implications associated with internal corrosion. Pipe failures in distribution systems and in homes can lead to costly repairs, not only in terms of piping but also in terms of other assets damaged (AWWA 2011). There are a number of economic and health risks associated with corrosion, which are usually not evident without distribution network observations. Monitoring of water stability is an effective way of preventing leaks and reducing the cost of repairing pipes, pumps and equipment (Mirzabeygi et al. 2016). Corrosion can be measured in two ways: indirectly and directly. Customer complaint logs, corrosion indices and physicochemical analyses of water samples are all components of the indirect method. Indirect methods do not provide corrosion rates. This method only indicates corrosion, scaling and changing trends in a system. In direct corrosion measurement, the actual metal loss is determined by examining the corroded surface during corrosion rate measurement. Direct methods consist of (a) examining pipe sections and (b) measuring rates. In corrosion rate calculations, mils penetration per year (MPY) is often used. One mils is equivalent to 0.001 inch (EPA 1984).
A corrosive water has a variety of physical, chemical and biological factors based on the pH, temperature, total dissolved solids (TDS), alkalinity, hardness, chloride, sulphate, carbon dioxide, dissolved oxygen (DO) and salt content (Alipour et al. 2015). Despite several indexes being developed, none has been able to quantify or predict water corrosivity accurately (Alsaqqar et al. 2014). Water corrosion and scaling can be predicted using the Langelier saturation index, Ryznar stability index, Aggressive index, Larson-Skold index and Puckorius scaling index (Kumar and Singh 2021). Using this method, the corrosion and scaling behaviour of water can be calculated indirectly. These corrosiveness indexes do not discuss corrosion rate. These indices are mathematically formulated using temperature, pH, total dissolved solid (TDS), alkalinity, calcium hardness, chloride and sulphate (Kumar et al. 2022a). Alternatively, the coupon weight loss method gives direct information about the corrosion rate of a water distribution system (Slavíčková et al. 2013). Studies in the fields and pilots are carried out using it. In this test, coupons or pipe sections are used as specimens. In the corrosive environment, cleaned samples are installed so their attachment is not affected by pipes or containers. Weighing the specimen or coupon before and after immersion in the test water is done using an analytical balance. Corrosion rate is calculated based on weight loss. It only provides a uniform corrosion rate (EPA 1984).
Direct and indirect corrosion monitoring does not indicate a composite effect of corrosion factors. The corrosion rate's model can be developed to identify the composite effect of corrosion factors. So that corrosion and scaling can be minimised and the distribution network can be free from corrosion. A literature review inspired the idea. A prediction model for the corrosion inhibition of mild steel in sulphuric acid by mebendazole was developed and optimized by Edoziuno et al. (2020) using the response surface methodology (RSM) and the Central Composite Design (CCD) tool of Design Expert Software version 11.
Compared to traditional optimization methods, RSM is a more efficient, powerful, time-saving and systematic optimization technique. It is mostly used to identify the effect of individual parameters and to establish their relationship. It is also possible to represent values of responses in a 2D visual (contour plot) as well as in a 3D visual (surface of responses) (Myers et al. 2009). An RSM consists of a number of mathematical and statistical techniques used for the design of experiments, the building of models, evaluating the effects of multiple factors and determining the best conditions for the response (Nair et al. 2014).
The main objective of the present study was to develop a model of the corrosion rate with composite effects of corrosion factors in the water distribution network of Patna (Bihar), India. The work has been divided into several parts to achieve the main objective, which is as follows: (1) to measure corrosion rates, the water distribution network was monitored directly using a weight loss method; (2) to validate the trend of corrosion factors, designing particular corrosion factors by making synthetic aqueous solutions; (3) to monitor water samples regularly for corrosion factors; and (4) to develop model of corrosion rates using Design Expert 13 software.

Study area
The Patna urban distribution network was selected for the study. It has crossed the design life cycle. Figure 1 shows coupons adjusted in the distribution network pipe at the National Institute of Technology Patna campus. It was indicative of Patna city as a whole that coupons were installed on the institutional campus. As noted by Kumar et al. (2022b), there was a minimal change in corrosion rate over the entire urban Patna water distribution network. Using static water samples collected from the entire urban Patna distribution network, their study assessed corrosion rates. Patna is the capital city of Bihar. It lies between the north and east of the country. January is the coldest month, with temperatures around 9 °C, and June is the hottest month, with temperatures around 36 °C.

Materials
Testing was performed using a galvanised iron (GI) plate as a test coupon. The size of the GI plate was 25 mm, 17.9 mm and 1.4 mm. The work was performed using Merck (India) analytical grade (AR) chemicals. Throughout the experiment, Milli-Q water was used to prepare all reagents and solutions.

Determination of physicochemical parameters
Based on Standard Methods for Analysis of Water and Wastewater (Clesceri et al. 1989), a sampling protocol was adopted for the study location. A de-ionized bottle was used for collecting the water sample and preserving it before testing (Vasistha & Ganguly 2022). A total of 21 samples were collected from the design setup at 15-day interval during 315 days. All experimental procedures were followed as directed in the standard method (Clesceri et al. 1989). pH measurements on a site were conducted using a pH probe tester pen. The conductivity meter (Eutech instrument Cyberxan Con11) was used to measure temperature, conductivity and TDS. The alkalinity (Clesceri et al. 1989(Clesceri et al. , 2320, total hardness (Clesceri et al. 1989(Clesceri et al. , 2340 and calcium hardness (Clesceri et al. 1989, 3500 D) were examined using the titration method. Chloride concentration was determined by the argentometric method (Clesceri et al. 1989, 4500 B). A UV-Visible spectrophotometer (ThermoFisher Scientific Evolution 201) at 420-nm wavelength (turbidimetric method) was used for the analysis of sulphate (Clesceri et al. 1989, 4500 E). An oxidation-reduction titration method called Winkler's method (iodometric method) was used for the determination of dissolved oxygen (Clesceri et al. 1989, 4500 B).

Corrosion rate calculation
Cleaning procedures were performed using the ASTM G1-90 (1999) method. Pre-cleaning had been done on the test coupon using corrosion cleaning reagent. The cleaning reagent was a mixture of hydrochloric acid (500 mL) and hexamethylene tetramine (3.5 g) dissolved in distilled water to make 1000 mL. Afterwards, distilled water, acetone and distilled water were used to wash the test coupon. Acetone acts as an anticorrosion regent. A dried test coupon was weighted with a precision of 0.0001 g. A holder with seven test coupons was fitted into the distribution network pipe for 45,90,135,180,225,270 and 315 days. Upon completion of the period, the test coupons were retrieved from the pipe. The coupons were first dried in hot air and weighed. Afterwards, cleaning procedures were repeated as before, and then final weighing was performed (Kumar et al. 2022c

Preparations of synthetic aqueous solutions
The synthetic aqueous solutions were prepared from the procedure defined for making standard solutions mentioned in Clesceri et al. (1989). Standard chloride concentration of 50, 100, 150, 200, and 250 mg/L was prepared using sodium chloride. A total of 824.0 mg of NaCl (dried at 140 °C) was mixed with 1000 mL of distilled water to give 500 µg of Cl − per mL (Clesceri et al. 1989, 4500 B). Standard sulphate concentration of 25, 50, 75, 100 and 125 mg/L was made using anhydrous sodium sulphate. Anhydrous sodium sulphate (0.1479) (Na 2 SO 4 ) was mixed with 1000 mL of distilled water to produce 100 µg of SO 4 2− per mL (Clesceri et al. 1989, 4500 E). Hardness of 50, 100, 150, 200 and 250 mg/L was prepared using calcium carbonate. One gram AR grade of CaCO 3 was transferred to a 250-mL conical flask. Adding 1 + 1 HCl until CaCO 3 is completely dissolved, then adding 200 mL of distilled water and boiling for 20-30 min maximises CO 2 . When it was cool, added a few drops of methyl red indicator. Add 3 N NH 4 OH dropwise till an intermediate orange colour appears. When diluted to 1000 mL, 1 mg of CaCO 3 per mL was achieved (Clesceri et al. 1989(Clesceri et al. , 2340. A buffer solution of AR grade was used to prepare pH of 4, 6.86 and 9.18. One millilitre of 0.2N H 2 SO 4 was diluted into 500 mL of distilled water measured by pH meter that found pH of 1.4. NaOH (0.8 g) was diluted to 1000 mL and measured by pH meter that achieved a pH of 10.97. The normality of NaOH was determined to be 0.02N. Soda ash (Na 2 CO 3 ) was used to prepare alkaline concentration of 100, 200, 300, 400 and 500 mg/L. A standard alkaline solution was prepared with 3 to 5 g of Na 2 SO 4 at 250 °C for 4 h and cooled in a desiccator. It was taken in doses of 2.5 g diluted in 1000 mL of distilled water. This solution's pH was determined to be 11.05. It was then titrated with 0.02 N H 2 SO 4 in a 50-mL solution (Clesceri et al. 1989(Clesceri et al. , 2320. It was found the total alkalinity was 2560 mg/L. A concentration of 50, 100, 150, 200, and 250 mg/L calcium was prepared by diluting 1 g of CaCl 2 in 1000 mL of distilled water. An EDTA (ethylenediamine tetraacetic acid) titrant of 0.02N was used to titrate 50 mL of solution (Clesceri et al. 1989, 3500 D). It was found to be 580 mg/L calcium hardness. A water sample from the Old City Coat (Patna) was used to prepare total dissolved solid (TDS) concentrations of 250, 500, 700 and 1000 mg/L. This water sample contained TDS of 2180 mg/L, conductivity of 3080 µS/cm, pH 7.15, alkalinity 192 mg/L, total hardness 664 mg/L, calcium hardness 560 mg/L, chloride 140 mg/L, sulphate 385 mg/L and dissolved oxygen 3.4 mg/L. Initial weighed GI plates were dipped in aqueous solutions for 45, 90, 135 and 180 days after preparation of synthetic solutions. After completion of time, all GI plates were ejected, and cleaning procedures were repeated as before, and then final weighing was noted.
Corrosion rate of all GI plates was determined using Eq. 1.

Mathematical formulation of linear regression
A regression analysis was performed by taking one parameter as a dependent variable and the other parameter as an independent variable. In regression equations, the dependent parameter (y) is assumed to be directly or indirectly proportional to the independent parameter (x) (Chattefuee & Hadi 2006). If two parameters x and y, then the Karl Pearson's coefficient of correlation 'r' between the two parameters is shown by Eq. 3.
It is highly significant if r lies between 0.8 < r < 1.0, and it is moderately significant if r lies between 0.6 < r < 0.8 (Jothivenkatachalam et al. 2010).
The linear regression equation is expressed as Eq. 4: where, a intercept on y-axis a and b were evaluated by the shown Eqs. 5 and 6:

Experiment design and data analysis
A proper approximation between factors and responses is needed when dealing with RSM problems since there is no identification of the relationship between variables and responses. A rigorously used approximating function is a polynomial (Nair et al. 2014). Equation 7 describes the relationship between variables and response using a quadratic second-order equation with interaction terms (Bashir et al. 2012). pH, temperature, total dissolved solid, alkalinity, calcium hardness, chloride, sulphate, dissolved oxygen and time were all varied from 7.28 to 7.86, from 23 to 28 ℃, from 430 to 704 mg/L, from 115 to 284 mg/L, from 24 to 180 mg/L, from 18 to 98 mg/L, from 10.94 to 38.7 mg/L, from 3.5 to 6.8 mg/L, and from 0 to 315 days, respectively. Statistical analysis of the Box-Behnken design (BBD) model was performed with Design Expert 13 software (Stat Ease Inc. Minneapolis, USA).
In this equation, Y represents the predicted response, X i and X j represent the independent variables, and o , i , j , and ij represent the regression coefficients, respectively. When k is the number of variables studied. o , i , j , and ij are signified as intercept, linear, quadratic, and interaction coefficients.

Physicochemical analysis
The water distribution network was regularly monitored for checking water quality throughout the coupon analysis. An analysis of physicochemical parameters is presented in Table 1 with the limits prescribed by BIS (2012). As every phase of water supply is pH-dependent, measuring pH is one of the most important factors . Water was observed to be alkaline (pH > 7) during coupon analysis. A rise in temperature was observed from winter to summer. The temperature fluctuated between 23.3 and 28 °C. Conductivity was found within the range of 1500 mg/L (WHO 2006). BIS (2012) does not define the limit of conductivity. The TDS, alkalinity, hardness and calcium hardness were sometimes found to be within range and sometimes crossing the limit (BIS 2012). There were a number of instances in which alkalinity and hardness were rated higher than BIS (2012). Observations indicated that the water was in the slightly hard to moderately hard category (soft water < 75 mg/L as CaCO 3 , slightly hard water 75-150 mg/L as CaCO 3 , moderately hard water 150-300 mg/L as CaCO 3 , and very hard water > 300 mg/L as CaCO 3 ) (Tyagi & Sarma 2020). The chloride and sulphate were always in compliance with the standards (BIS 2012). Dissolved oxygen found to have a maximum time of less than 5 mg/L (BIS 2012) does not define the DO limit for drinking water, but the Indian Council Medical Research has specified that it should be greater than 5 mg/L (Sharma 2014). Table 2 shows the correlation coefficients of corrosion factors with the corrosion rate. The high correlations among these parameters result in interdependence among the parameters, which affects corrosion rate as one parameter varies and influences another (Vasistha and Ganguly 2020). A Pearson coefficient r indicates a linear relationship between two or more variables. Positive shows the proportional relationship, and negative shows the inverse relationship between them. It states a weak relationship if the coefficient of correlation r < 0.5 and a strong relationship if r ≥ 0.5 (Tyagi and Sarma 2020). A correlation coefficient of − 0.582 is found between calcium hardness and temperature, which indicates a 33.9% (− 0.582 2 = 0.339) negative relationship between calcium hardness and temperature at 1% significant level. Similarly, the correlation coefficient between sulphate and calcium hardness is 0.517, which indicates a 26% positive relationship at 1% significant level. The correlation coefficient between chloride and sulphate is 0.510, which indicates a 26% positive relationship between chloride and sulphate at a significant p < 0.01.

Corrosion rate analysis in the WDN
In Fig. 2, the kinetic study of corrosion rate and percentage scaling of seven GI plates for 315 days has been depicted in Fig. 2a and b. The direct monitoring of the water distribution network has been carried out for 315 days. Figure 2a clearly shows that the corrosion rate increased from 45 to 90 days and then decreased till 225 days, again increased till 270 days and finally decreased till 315 days. Figure 2b depicts that scaling percentages first increased from 45 to 180 days, then decreased to 225 days and then again increased to 315 days. Some of the literature suggests that a film of minerals is deposited by scaling water on pipe walls, which prevents the metallic surfaces from corroding (Alsaqqar et al. 2014). Initially, when coupons were inserted, though scaling was slow to deposit, the corrosion reaction rate was fast because the surface was clean. Therefore, the corrosion rate increased between 45 and 90 days, as depicted in Fig. 2a. Thereafter, the corrosion rate decreased between 90 and 225 days, as illustrated in Fig. 2a, since corrosion was prevented due to a high percentage of scale deposition on the coupon's surface, as illustrated in Fig. 2b. Scales did not withstand water pressure, though the thickness of scale deposited on GI plates increased and got washed away. Percentage scale decreased between 180 and 225 days, as depicted in Fig. 2b. So, less scale was left on the surface of the GI plate. As corrosion inhibitors, i.e. scales decreased, corrosion rates were further increased between 225 and 270 days as depicted in Fig. 2a. Again, scale deposition on the GI plate surface rose between 225 and 315 days as depicted in Fig. 2b, and increased inhibitory behaviour leading to a decrease in corrosion rate between 270 and 315 days as shown in Fig. 2a.

Corrosion rate analysis in the synthetic aqueous solution
There are several factors that affect the corrosion rate. A total of seven parameters such as chloride, sulphate, hardness, alkalinity, pH, calcium, and hardness were taken for corrosion rate analysis of synthetic aqueous solutions. They are used in the formulation of analytical stability indices, such as the Langelier Saturation Index, the Ryznar Stability Index, the Puckorius Scaling Index, the Larson-Skold Index and the Aggressive Index . A graph of corrosion rate versus time is shown in Fig. 3 for these seven synthetic aqueous parameters. Figure 3a and b show an increase in corrosion rate with time in chloride and sulphate solutions. A study suggested that iron surface chemisorption of chloride ions caused oxidation of iron. Accordingly, chloride ions corrode rebar by chemisorbing on rebar surfaces and boosting the electron loss from Fe atoms (Chen et al. 2022).
It was found by Haleem et al. that rebars corrode much more readily in a solution containing sulphates than in an equivalent solution with chlorides. Sulphate ions are more aggressive towards rebar than chloride ions (Abd El Haleem et al. 2013). Liu et al. (2016) also found similar results through electrochemical testing. There is an increase in trend with time for 50 mg/L and 100 mg/L for soft water and slightly hard water, respectively, in Fig. 3c. For moderately hard water at 150, 200, and 250 mg/L, it shows a decreasing trend with time. The literature also suggests that soft water is more corrosive than hard water (EPA 1984). Figure 3d shows an initially increasing and then decreasing trend in corrosion rate with time for alkaline solutions. Alkaline solutions inhibit the corrosion of iron due to formation of an anodic film of a ferrous compound, e.g., ferrous hydroxide, or ferrous salts, if anions (Gilroy & Mayne 2013). In Fig. 3e, corrosion rate with time was found nearly zero for a pH of 6.86 and 9.18. The corrosion rate was higher in acidic solutions of pH 1.4 and pH 4.01 in respect to basic solutions of pH 9.18 and 10.97. There is evidence in the literature that corrosion occurs at a greater rate at lower pH values when the metal surface is not protected by an oxide film (Pisigan & Singley 1985). Figure 3f shows that the corrosion rate initially increased due to less-scale deposition and then decreased due to high-scale deposition in the calcium hardness solution. There is research that suggests that corrosion rates are lower in the presence of CaCO 3 . In conjunction with CaCO 3 , the mixed carbonate (Fe x Ca 1−X CO 3 ) is formed (Tavares et al. 2015). As reported by Esmaeely et al. (2013) with low concentrations of Ca 2+ (10 ppm and 100 ppm), the corrosion rate decreased over time as iron carbonate formed as a protective barrier. As shown in Fig. 3g, the corrosion rate in TDS solution increases with time due to the presence of chloride and sulphate in high concentration.
A graph of corrosion rate versus concentration of seven synthetic aqueous parameters is shown in Fig. 4. As the concentration of chloride or sulphate increases, corrosion rate also increases as shown in Fig. 4a and b. The literature suggests that the two ions, chloride (Cl − ) and sulphate (SO 4 −− ), may cause pitting of metallic pipes by reacting with the metals in solution. They prevent the formation of protective metallic oxides (Benamor et al. 2005). Chloride is three times more active than sulphate (EPA 1984). Corrosion rate decreases with increase in hardness or alkalinity concentration ( Fig. 4c and d). In a literature review, it was found that high alkalinity or hardness cause scales to form on the pipes. The formation of scale serves as a protective mechanism against corrosion (EPA 1984). As the pH changes from acidic to neutral, the corrosion rate decreases from maximum to near zero (Fig. 4e). The corrosion rate increases very slight as pH varies from neutral to alkaline. There is evidence that corrosion occurs more rapidly in acidic than in alkaline environments. Figure 4f illustrates that corrosion rates Tem. temperature, TDS total dissolved solid, ALK alkalinity, Ca hard. calcium hardness, DO dissolved oxygen

Linear regression models in the synthetic aqueous solutions
This Fig. 5 illustrates a linear regression model of corrosion rate vs. concentration in seven solutions. The linear regression model leads to a direct correlation between corrosion rate and chloride or sulphate concentration with an R 2 0.9527 or 0.8184 respectively, ( Fig. 5a and b). As shown in Fig. 5c and d, a linear regression model predicts an inverse correlation between corrosion rate and hardness or alkalinity concentration (R 2 0.8847 or 0.9161, respectively). In Fig. 5e, pH regression model is inversely correlated between corrosion rate and pH with an R 2 0.839. A logarithmic or exponential model of corrosion rate vs pH with R 2 0.8817 is better than a linear model, as shown in Fig. 5f. The linear regression model of corrosion rate vs. chloride is inversely correlated with R 2 0.6127 (Fig. 5g). The linear regression model leads to a direct correlation between corrosion rate and TDS with an R 2 0.8931.

Statistical analysis by Design Expert 13 software
The model's suitability was evaluated using statistical methods. An evaluation of the RSM program was performed using software called Design Expert 13. An analytical method of stability indices is formulated by using a total of seven variables, including pH, temperature, total dissolved solid (TDS), alkalinity, calcium hardness, chloride and sulphate. Therefore, these parameters were considered as independent variables for modeling. In the mathematical formulation of stability indices, dissolved oxygen (DO) is not considered. As DO also contributes to corrosion, it was also included as an independent variable in this model. Corrosion rate (CR) was the dependent variable for this modeling. These 9 factors, such as pH, temperature, TDS, Fig. 6 a Normal probability plot of residual for corrosion rate, b plot of predicted versus actual data alkalinity, calcium hardness, chloride, sulphate, DO and time, were nominated as X 1 , X 2 , X 3 , X 4 , X 5 , X 6 , X 7 , X 8 , and X 9 , respectively. Water samples were regularly monitored to determine the range of these parameters. The low-level and high-level experimental range for X 1 , X 2 , X 3 , X 4 , X 5 , X 6 , X 7 , X 8 and X 9 was 7.28, 23, 430, 115, 24, 18, 10.94, 3.5 and 0 and 7.86, 28, 704, 284, 180, 98, 38.7, 6.8 and 315, respectively. CR range was determined by direct monitoring using the coupon weight loss method for 45,90,135,180,225,270 and 315 days.
Using the Box-Behnken design (BBD), 160 runs were conducted, including ten replicates at the central point of each block. Testing of water samples led to experimental data that was used for modelling. The Design Expert 13 software generated the fit summary and recommended quadratic model as shown in Table 3. Observed values were fitted using second-order polynomials as discussed in Eq. 7. The quadratic equation for corrosion rate in terms of actual factors is given by Eq. 8 as shown below: The suitability of this second-order polynomial model was determined by analysis of variance (ANOVA). Each parameter was also subjected to the Fisher test to find out the consequences. In Table 4, the ANOVA results for corrosion rate are presented along with the F value and p value. Whenever P > F is greater than 0.05, the model term is considered to be insignificant (Nair et al. 2014). Statistical significance is defined as ANOVA test results with a P > F value less − 0.000071X 5 X 6 + 0.000062X 5 X 7 + 0.001365X 5 X 8 − 0.000092X 5 X 9 + 0.000060X 6 X 7 − 0.000198X 6 X 8 + 0.000084X 6 X 9 − 0.020307X 7 X 8 + 0.000193X 7 X 9 + 0.002908X 8 X 9 + 0.121408X 2 1 + 0.052464X 2 2 + 0.00000999229X 2 3 + 0.000000662808X 2 4 + 0.000017X 2 5 + 0.000022X 2 6 + 0.000778X 2 7 + 0.046948X 2 8 − 0.000075X 2 9 than 0.05 at a 5% confidence interval. If the P > F value is greater than 0.05, the model term is eliminated. In this case, X 1 , X 2 , X 8 , X 1 X 7 , X 2 X 6 , X 2 X 7 , X 2 X 9 , X 3 X 9 , X 4 X 8 , X 5 X 9 , X 6 X 9 , X 7 X 8 , and X 2 9 were found to be significant model terms. Therefore, in Eq. 8, many terms were eliminated except for the terms (main parameters used in the model and significant model terms) to maintain hierarchical order and reduce to Eq. 9 as shown below: The results of an ANOVA are generally expressed as P > F value, F value, R 2 value, adjusted R 2 , adequate precision (AP), and coefficient of variance (CV) (Mritunjay and Quaff 2021). The above-mentioned parameters can be used to predict model behaviour. The overall strength of the model is determined by the values of R 2 , adjusted R 2 , and predicted R 2 . The values of R 2 , adjusted R 2 and predicted R 2 are 0.9714, 0.9507 and 0.8941, respectively. The value of R 2 (0.9714) was close to 1, which indicates a good fit. A good fit model requires a difference between the predicted R 2 and adjusted R 2 of less than 0.2. It is calculated as 0.0566, which is less than 0.2. A reasonable agreement exists between the predicted R 2 and the adjusted R 2 .
Any model's adequacy is also determined by its adequate precision (AP). The signal-to-noise ratio should be greater than 4, which is necessary for a good fit model (S. Kumar & Quaff 2020). In this model, the AP was found to be 30.8442, indicating a good signal. A CV discusses reproducibility, and in this case, it was 9.90%. Hence, it is acceptable (less than 10% is desirable). It can be concluded from the results of ANOVA that the model is well-fit and can be accepted as a suitable model based on the results of the statistical analysis. Model fitting can (9) CR(MPY) =9.25432 + 5.87035X 1 − 1.53494X 2 + 0.006381X 3 + 0.066575X 4 + 0.034498X 5 − 0.223974X 6 + 0.398906X 7 − 4.77363X 8 − 0.067078X 9 − 0.108096X 1 X 7 + 0.004090X 2 X 6 + 0.019295X 2 X 7 + 0.003029X 2 X 9 + 0.000022X 3 X 9 − 0.002890X 4 X 8 − 0.000092X 5 X 9 + 0.000084X 6 X 9 − 0.020307X 7 X 8 + 0.002908X 8 X 9 − 0.000075X 2 9 also be analysed using the normal plot of residuals. It is said that a model is well fitted when the data plot has a straight line with very low scatter (Myers et al. 2009). As shown in Fig. 6a, there is a straight line with a few scattered points, showing the quadratic model developed in this model is well accepted. A comparison of the experimental and predicted corrosion rates is shown in Fig. 6b. An observation from this plot is that there is very little difference between the actual and predicted plots, indicating that the model is well fitted. The model validation was conducted using physicochemical parameters based on the corrosion rate analysis of seven coupons (illustrated in Table 5). Table 6 summarizes the model validation results using Eq. 8. A negative calculation was shown at zero day; the first day coupons were inserted in the pipe, indicating that there was no corrosion. The model included nine corrosion factors, but several factors influenced corrosion, resulting in a greater than 10% error between calculated and actual corrosion rates. Figure 7 illustrates the influence of independent variables and their interactions on the corrosion rate as a 3D response surface plot. Figure 7a shows the interaction between calcium hardness and alkalinity on corrosion rates. It shows that corrosion rates decrease with increasing calcium hardness or alkalinity concentration. In Fig. 7b, dissolved oxygen and chloride interact to affect corrosion rate. Based on the response surface, corrosion rate increased as DO or chloride concentration increased. A study conducted by de Alwis et al. (2022) suggests that dissolved oxygen facilitates corrosion on iron surfaces by facilitating chloride ions. The corrosion rate is represented in Fig. 7c by the interaction between sulphate and pH. When sulphate concentrations increase, corrosion rates also increase. Corrosion rate decreases with increasing pH, as shown by the response surface. The interaction between corrosion rate, TDS and temperature is shown in Fig. 7d. Based on the interaction, corrosion rate increases as TDS concentration or temperature increases. Temperature appears to have a significant effect on corrosion processes on metal and alloy surfaces (Konovalova 2021). The interaction of pH and time on corrosion rate is shown in Fig. 7e. Corrosion rates initially increased with time but then decreased with time on the response surface, which indicates scaling was the predominant inhibitor of corrosion rate. As seen in Fig. 2a, it clearly verified the direct monitoring of corrosion rates in distribution pipes using a weight loss method.

Strategy to prevent corrosion in pipe networks
In this study, pH was found to be alkaline. Corrosion and scaling behaviours are strongly influenced by the pH of water. Soda ash can be used to adjust pH (near neutral pH = 7) to improve water quality. Alkalinity and hardness were observed to be greater in the water that was deposited on the pipe surface. Softeners or zeolite basins can be used to remove the hardness and alkalinity. Oxidants such as dissolved oxygen, chlorine and sulphate can rapidly react with iron pipe and feed it (Liu et al. 2016a).
The majority of Patna's distribution system is made of cast iron. It is therefore necessary to control the DO and remove chloride and sulphate from it.

Conclusions
The weight loss method is used to monitor the corrosion rate directly in the distribution pipe. Figure 2a and b demonstrate the inverse relation of scaling with corrosion rate. As time passes, the corrosion rate increases, but after a few days, it decreases because of the scaling tendency of water due to the presence of hardness and alkalinity. This has been validated by the response surface. The supply water in Patna's distribution network was found to be mostly alkaline, just as the supply water had a scaling tendency. So, a purification system is required to keep the pH, alkalinity, and hardness of water in check. A similar result, that is, a decrease in corrosion rate with time, is depicted by Quadratic model-generated response surfaces for Ca hardness and alkalinity as well as by experimental design using synthetic mediums of hard and alkaline solution. The trend of individual corrosion rates in synthetic aqueous solutions and the interaction of composite variables with corrosion rates in the quadratic model of response surfaces are clearly correlated. In both cases, Fig. 7 Three-dimensional response surface: Interaction effect of a Ca hardness, alkalinity with corrosion rate; b DO, Cl with corrosion rate; c sulphate, pH with corrosion rate; d TDS, temperature, with corrosion rate; e pH, time with corrosion rate ◂ there is a similar trend toward an increase or decrease. In individual experimental designs, regression models were well-defined with moderately or highly significant R 2 values. In the statistical analysis of composite effects on corrosion rate, the quadratic model performed better as compared to other models. Both of the models indicate that chloride and sulphate lead to an increased corrosion rate, so to prolong the life of distribution network pipes, chloride and sulphate should be reduced. It is also clearly demonstrated in the statistical model that the corrosion rate increases with an increase in temperature or DO. The analytical method of corrosiveness indices can also be modified by taking DO into account.
Author contribution All the authors contributed to the study conception and design. Material preparation, data collection and analysis were performed by Saurabh Kumar. The first draft of the manuscript was written by Saurabh Kumar, and all the authors commented on a previous version of the manuscript. All authors read and approved the final manuscript.
Funding The National Institute of Technology Patna provided financial support.
Data availability Not applicable.

Declarations
Ethical approval Not applicable.

Consent to participate Not applicable.
Consent for publication Not applicable.

Competing interests
The authors declare no competing interests.