Application of dedicated software for balancing water systems of a deep mine

Balancing the systems of waters in mines or in selected parts of them is an important part of works carried out by geological services of the mines, including the works aiming, for instance, at recording the types of waters flowing into mine excavations, assessing the impact of mining operations on the environment and foreseeing water threats. The article presents research performed with the objective of balancing the selected water systems of the deep coal mine “Jankowice.” The research was performed with the help of the software dedicated directly for balancing water systems, in particular water systems in mines. The computational methods of this software are based on the techniques of matrix calculations, in particular on the methods of results coordination. It allows to obtain fully compliant balances with minimal adjustments of the measured values describing both the types of the system incoming waters and collective waters which are a mixture of types of waters incoming to the system. The results of the conducted research showed the usefulness of the KYBL software for balancing the water systems of deep mines. It was also shown that this tool could also be used to balance any other water systems with a similar physical mixing model as in the case of deep mine water systems.


Introduction
The issues related to balancing of water systems constitute an important part of environmental engineering. Balancing the systems of waters in mines or in selected parts of them is an important part of works carried out by geological services of the mines, including the works aiming, for instance, at recording the types of waters flowing into mine excavations, assessing the impact of mining operations on the environment and foreseeing water threats. Such balances may be performed using methods of hydrometric measurements of flows (Brassington 1999;Wolkensdorfer 2008); however, such measurements are often burdened with a high level of uncertainty of measurement values, resulting mainly from the fact that the inflow of particular types of water within the system is large. It often leads to very inaccurate results which are sometimes impossible to accept. Verification of these studies, performed in a mine practice, showed that the irregularities in the obtained measurement results performed with these techniques result, usually, from the impossibility of precise adherence to the preliminary conditions of the applicability of these methods (Wolkensdorfer 2008). Therefore, balancing mine water systems through indirect research methods often gives better results. These methods are usually computational methods based on mathematical and physical models of water systems, in which the measurement values of chemical and physical parameters of water types identified in the system are used. Due to the complexity of the calculations, these balances are usually obtained with the help of specialized computer programs. In addition to the KYBL-7 program using computational methods of coordinating results (Krzeszowski 2012), which was used in the research presented in this article, there are at least several other programs that allow, among other things, to balance water systems. These include: M3 software (Multivariate Mixing and Mass balance) using PCA (Principal Component Analyzes) calculation methods (Laaksoharju et al. 1999;Laaksoharju et al. 2008), NETPAH program using inverse modeling (Plummer et al. 1994) or the widely recognized PHREEQC software (Parkhurst and Appelo 2013), which also uses reverse for balancing water systems. Each of these programs has its own advantages as well as limitations and imperfections in the computational methods. M3 software should be used when the two main elements of the data set account for more than 60% of the variability of information in the data set (Gomez et al. 2008). Using both NETPAH or PHREEQC in calculations based on datasets describing complex water systems leads to results in the form of large sets of data describing the mixing proportions and transfers of mineral mass which makes the interpretation of the results very difficult. KYBL-7 software, which was employed in the presented research, enables balancing mine water systems composed of a minimum of three and a maximum of ten types of water. Each type of water must be described by concentrations of a minimum of four and a maximum of 12 components. The software uses two calculation methods. The Cholesky method is a stochastic method, based on Cholesky decomposition (Riley et al. 2006;Gille and Clique 1986), while the method of result coordination is based on adjustment calculus (Vaníček 1980;Adamczewski 2007;Krzeszowski 2012). A brief description of all the abovementioned programs, that can be used for balancing the mine water systems, is presented in tabular form in Table 1. KYBL-7 software has already been employed for balancing mine water systems. However, in the majority of cases, it were the studies of open lignite pits (Rapantova et al. 2012(Rapantova et al. , 2013. The objective of this paper was checking the quality of the balances obtained with the help of KYBL-7 software for the water systems of an active deep mine.

Research scope and methodology
The coal mine "Jankowice" is located in the south-western part of the Upper Silesian Coal Basin. It lies on the Rybnik Plateau in the areas of Rybnik, Świerklany and Markowice communes. The mine deposits are located in an area of tectonic folds, in the south-eastern part of the Chwałowice trough (Kotas 1972;Krzeszowska and Gazdecki 2009 The factors determining the size and nature of the mining excavations in the Jankowice mine are: geological structure of the rock mass and its tectonics, the intensity of supplying carboniferous deposits with waters from overlaying strata, thickness of aquifers -their richness in static water, mine's own mining activity (technological water leaks) and the degree of cracking of the rock mass caused by its exploitation (Geological documentation of deep coal mine Jankowice 2012).
The waterlogging of carboniferous strata in deep mine excavations depends on the hydrogeological conditions in the overburden and the geomorphology of these strata. The inflow of atmospheric and Quaternary waters to excavations Balancing does not take into account chemical reactions in the water system. Easy to apply in mining practice. For calculations requires measurement data that is routinely carried out by the mine's geological survey is practically impossible due to the insulating character of claystone strata located in the Tertiary deposits. In the case of Tertiary strata, the biggest impact on the hydrogeological conditions of the excavations have waterlogged sands, found in the floor of Tertiary deposits (Geological documentation of deep coal mine Jankowice 2012). The inflow of natural waters to mine excavations consists of small drainages from the roof rocks of the deposits and, more rarely, from the floor rocks. These are usually low intensity inflows (from a few to several dm 3 /min for the whole strata). These inflows may be observed as single condensations or as dampness in the excavations (Geological documentation of deep coal mine Jankowice 2012).
The computational methods of the KYBL-7 program are based on balances of selected elements describing the composition of individual types of waters flowing into the system and the composition of reservoir waters, without taking into account chemical reactions taking place in these waters. The mixing scheme used in the physical model constructed for the use of the KYBL-7 software is shown in Fig. 1.
The elements subjected to mixing are J streams (types of water) of inflow waters of unknown share (q j ) in collective waters but of known composition described by I values of elements concentrations (C i,j ). The composition and share of collective waters (q=1, M i ) is known. The unknowns of the set (shares values of types of water comprising the balance that are searched for) are marked in blue. If the values describing the water system in the adopted mixing diagram were precise values, consistent with physical reality, then the balance of the system could be described with the following set of equations: In the situation described above, especially when I = J, solving such a set (1) of equations is relatively easy, because the set is determined and fully consistent. Unfortunately, engineering practice shows that the data describing the system usually comes from determinations characterized by uncertainty, such as measurements or averages of many measurements. In addition, very often, and in fact almost always, the number of parameters whose measured values describe the water system, is greater than the number of water types identified in the system. In this cases, the set of equations may be unsolvable or the solution may be seriously wrong. The basic calculation method of the KYBL program, the method of results coordination (Vaníček 1980;Adamczewski 2007;Krzeszowski 2012), hereinafter referred to as MRC, corrects the data describing the system so that the solution is correct both computationally and formally-the calculated contents of (1) constituent waters are positive and lower than 1 (expressed as a percentage from 100%) and add up to one (100%). At the same time, the corrections of the concentration values of the parameters describing the water composition of the water system under study should be minimal from the point of view of the criterion of the lowest sum of squares of the relative corrections understood here as the quotients: correction divided by the original corrected value. The second computational method implemented in the software is Cholesky's method, which is based on the Cholesky decomposition used to solve positively defined systems of equations (Riley et al. 2006;Gille and Clique 1986). This method, further referred to as CHM, is an auxiliary method used for the calculation of the so-called starting point for MRC method. CHM method is a stochastic method. The computational technique used in this method, allows the final result to be calculated as the arithmetic mean of many correct partial solutions. Partial solutions are obtained by randomly changing the values describing the composition of the water types included in the balanced water system. These values are randomly changed in each calculation cycle, within predetermined ranges of deviation. The correct solutions in this method are such balances in which the shares of all types of water flowing into the system are positive, lower than 1 (in percentage terms: from 100%) and add up to values close to 1 (100%). The number of calculation cycles, the ranges of random deviations of the composition of water types and the range of permissible deviations for the sum of shares are set arbitrarily by the program operator. As a standard, the range of deviations of the compositions was assumed to be equal to the measurement uncertainties of the methods used for the measurements. The deviation range for the sum of shares was usually taken as 0.95-1.05 (in percentage terms: 95-105%). The balances obtained by the CHM method are not fully consistent, and the final result is uncertain due to the method's construction. The disadvantages of this method are closely related to the disadvantages of calculations based on Cholesky decomposition (Riley et al. 2006;Gille and Clique 1986). That is why the method is only used as an auxiliary method for establishing the starting point for MRC method. A detailed description of all computational methods of KYBL can be found in referenced publication (Krzeszowski 2012). Both of the aforementioned computational methods can be used in two situations. In the first, basic situation the system of waters described by the measurement values is fully balanced by using the corrections that are within the measurement methods' margin of uncertainty. In the cases where such balances are impossible to obtain with the help of KYBL basic methods, referred to in this paper as MRC1 and CHM1, one may use balancing that takes into account an additional general water stream of unknown composition and share which disrupts the balance of the water system (Krzeszowski 2012). It should be emphasized that this stream of water should not be treated as a stream of water in the strict sense, but as a general sum of all factors leading to the impossibility of obtaining a consistent balance of the tested water system described by a specific set of measurement data. Such factors can be: undocumented types of water entering the system, disrupting physicochemical processes such as evaporation and sedimentation as well as to a greater or lesser extent errors made during measurements. The estimation of the aforementioned composition and the share of the additional, generalized stream disturbing the water system balance may be helpful in identifying the processes that prevent simple balancing of the examined water system. The computational methods of the KYBL-7 program taking into account the additional generalized water stream of unknown composition and share were designated as MRC2 and CHM2.
Three systems of water were selected for the study, one for each operation levels of the mine (levels: 400, 565 and 700). The measurement data describing this systems of water were made for the next two years, hereinafter referred to as Year 1 and Year 2 and they took the form of tabular summaries containing the composition test results of the water types found in the excavations. As a result, six sets of data were prepared for the study-three sets for Year 1 and three for Year 2-consisting of the measurement values of selected parameters of water types flowing into the system and of their mixture (collective waters).
Based on the official results of laboratory tests commissioned by the mine to be performed by a certified chemical laboratory, it was established that the uncertainty of measurements of chemical parameters of water types occurring in the tested mine water systems is 10% of the measured value. This measurement uncertainty value was used in the calculations by the CHM1 and MRC1 methods. The obtained balances were so satisfactory that balancing with the CHM2 and MRC2 methods was considered unnecessary.

Results and discussion
For all six sets of measurement data describing the selected mine water systems, calculations using the CHM1 method were performed in order to establish the starting points for balancing using the second method (MRC1). The CHM1 method is a stochastic method. The balances obtained with this method are not fully compliant, and the end result is uncertain due to the method's design. Therefore, it is primarily used as an auxiliary method (Krzeszowski 2012).
Then, MRC1 calculations were performed in order to obtain fully compliant balances, the quality of which could be assessed by assessing the relative size of the calculated corrections of measured values describing the tested water system. To facilitate the understanding of the balancing process by means of the KYBL-7 program, Table 2 presents a set of data describing the subsequent stages of balancing one of the tested water systems.
The top of the table, with the heading "Input Data Set," contains the input measurement data values describing the mine water system. The values in this part of Table 1, excluding the values in its last two lines, were measured in a certified laboratory commissioned by the mine's geological services. The penultimate line of this part of the table, marked with the heading "Start point," presents the values of shares of particular types of inflow water of the system in the collective waters (Mixture) determined using the CHM1 method. It is easy to notice that the sum of these shares is 1.0091 (in percentage terms 100.91%), which means that the balance obtained using the MCH1 method is not fully correct. It results directly from the construction of the MCH method as a stochastic method, in which the final result is calculated as the arithmetic mean of many correct partial results. The last line contains the values of standard deviations for the shares determined by the MCH1 method. All values in this part of Table 1 are also part of the input data for MRC1. The second part of the table, counting from the top, marked with the heading "Table of uncertainties," contains the uncertainties of the measurement data. These are the measurement uncertainty values for the methods used for the measurements. In the case of the balances presented in this paper, the uncertainty values were assumed to be 0.1 of the measured values (in percentage of 10%). Such uncertainty values were given by the laboratory performing the measurements. The data contained in this part of the table constitute the second part of the input data for the MCH1 method and determine the variability limits of the allowable changes in water composition in each calculation cycle of the MCH1 method. The data in this part of the table is also used in the MRC1 calculation. The third part, headed "Corrections," contains the correction values calculated by the MRC1 method. These values are corrections that should be applied to the measurement data contained in the first part of the table. After applying these corrections, the water system balance determined by the MRC1 method should be formally fully correct. The MRC1 method calculates minimum corrections based on the least squares method. To the right of the part of the table containing the adjustments there is a part of the table presenting, in percentage terms, the values of the adjustments related to the adjusted values. For example, the correction for Ca concentration for stream # 1 is 125.89, which is 4.51% of the value for Ca concentration in stream # 1. These data allow for a more convenient assessment of the quality of the balance obtained with the MRC1 method. Table 3 shows the final balance. It presents measurement data describing the balanced mine water system after applying corrections for both the concentrations of chemical components and the corrected values of shares of all types of water in the collective waters (mixture). The obtained balance is formally correct, because the shares are positive, smaller than 1 and add up exactly to 1 (in percentage terms up to 100%). The purple background shows the shares of individual types of inflow waters in the collective waters. The values of these shares are the main element of the final result of the KYBL calculations. The data set allowing to assess the quality of balances for all six tested water systems is presented in Table 4. Two criteria for assessing the quality of the obtained calculation results were adopted. The main criterion was the number of significant corrections, i.e., corrections exceeding the uncertainty values of the measurement methods used for the concentration measurements. The second criterion was the average value of all corrections for the concentration values of water components. If the mean value of the corrections was low and all the corrections did not exceed the uncertainty of the measurement methods used for the measurements, the obtained result was considered to be very good. If one or two of the corrections slightly exceeded the uncertainty values of the applied measurement methods, the result was considered good. In other cases, the obtained results were considered bad. For three out of six datasets the quality of balances was very good. These were the sets describing the systems of water of levels 400 and 565 for Year 1 data and a set describing the water system of level 700 for Year 2 data. For these three sets, all adjustment values shown as a percent of adjusted values fell within the uncertainty margin of measurement methods and the average values of adjustments were small. For the dataset describing the water system of level 400 for Year 2 data, the balance quality was good. Only one adjustment minimally exceeded the permissible measurement uncertainty margin and the average values of adjustments were small. For the dataset describing the water system of level 565 for Year 2 data the balance quality was mediocre as two adjustments exceeded the limit, one to a considerable degree (23.5% of the initial value). Nevertheless, the average value of adjustments was small. Only in one instance the final balance turned out to be unacceptable. It was the balance for 700 level described with Year 2 data. As many as 9 adjustments exceeded the uncertainty limit, three of them to a considerable degree, exceeding 30% of the adjusted values. As the Year 2 dataset for the same water system gave very good balances, it was decided not to perform the MRC2 calculations.

Conclusions
The research performed for this paper aimed to analyze the quality of KYBL balances carried out, for the first time, for the systems of water of a deep coal mine. The results show that the software performed exceptionally well in this task, allowing to effectively calculate the shares of the water types flowing into the system in their mixture (collective waters). The balances obtained were in most cases very good or good. This quality of balances was obtained for four out of six data sets describing the water systems of the "Jankowice" deep hard coal mine. It should be emphasized that these were the balances obtained with the CHM1 and MRC1 methods, i.e., simple balances, based solely on the sets of measurement data describing only the types of water Fig. 1 Mixing diagram adopted in the physical model used by KYBL-7 software that actually exist in the mine's water systems. For any of the tested mine water systems, it was not found necessary to make a balance sheet assuming the existence of an additional, generalized stream of water representing all factors that may seriously disturb the balance.
The results of the conducted research showed the usefulness of the KYBL software for balancing the water systems of deep mines. It was also shown that this tool could also be used to balance any other water systems, with a similar physical mixing model as in the case of deep mine water systems. The balances obtained with the use of the KYBL 7 software could, in such cases, be useful in assessing which of the water types included in the system could be reused as part of broadly understood recycling.