Introduction

Coal resources occupy an extremely important position in China 's energy structure. However, during coal-seam mining, the nature of the original surrounding rock is altered by mining, causing roof water intrusion or floor water intrusion. This portion of the water becomes one of the components of the mine water, potentially threatening the safe extraction of coal resources. In addition, the chemical composition of untreated mine water is complex due to the combined effects of natural factors and mining activities, which can easily lead to environmental pollution and waste of water resources. The Ordos Basin is currently the most important coal-producing area in China. It is rich in coal but relatively short on water. Therefore, the analysis of the chemical properties and sources of mine water in the deep coal seams of the Ordos Basin provides theoretical support for exploring the connectivity of the aquifers in the coal seams, preventing the occurrence of water intrusion accidents in the floor, and rational utilization of mine water resources.

The analysis of hydrochemical characteristics is an essential part of the study of mine hydrogeology and hydrogeochemistry (Mondal et al. 2010). At present, the methods for analyzing hydrochemical characteristics can be mainly divided into conventional analysis, graphic method and mathematical statistics (Fu et al. 2023; Liang et al. 2022), software simulation (Chen et al. 2023a) and so on. Various methods have been used to comprehensively explore the evolutionary characteristics of the chemical composition of regional groundwater, to elucidate the major hydrogeochemical processes occurring in regional groundwater, and to speculate on the genesis and migration laws of groundwater. In the 1940s, Piper summarized the trilinear diagram graphical method, which is still widely used today to determine ionic composition and hydrochemistry type (Piper 1944). Subsequently, Gibbs diagram, ion ratio coefficient diagram, ion concentration composition diagram and other hydrochemical graphic methods (Liu et al. 2020) were gradually used to analyze the hydrochemical characteristics. Chen et al. (2023b) carried out hydrochemical analysis and multivariate statistical induction on the water samples in the study area, divided the area into two different hydrological circulation flow zones according to different hydrochemical characteristics and chemical actions, and constructed the hydrochemical evolution model of aquifer. With a focus on the hydrochemical characteristics and evolution of aquifers under mining disturbance, Chen et al. (2017) utilized principal component analysis and conventional ion analysis to reveal the degree of influence from dissolution, cation exchange, and other factors. This provides support for subsequent water disaster prevention and control measures. ​With the development of computer networks, the techniques of ion correlation analysis, saturation index calculations, and software simulations have been continuously updated, and the evolution mechanism of groundwater genesis has been continuously improved. Based on multiple sets of aquifer data, Chen et al. (2021) fitted a water source identification model suitable for Peigou Coal Mine through hydrochemical analysis and BP neural network, combined with Fisher discriminant. Tang et al. (2023) analyzed the characteristics and evolution mechanism of groundwater by using mathematical statistics, Piper trilinear diagram, Gibbs diagram and other methods, evaluated the water quality by combining the water quality index method, and comprehensively put forward the reasonable exploitation scheme of groundwater. Boonkaewwan et al. (2020) used multivariate statistics and PHREEQC to carry out reverse hydrogeochemical simulation of excessive pollutants in groundwater, revealed the release mechanism of pollutants in aquifer from the perspective of hydrogeochemistry, and verified the occurrence environment of groundwater.

The Longwanggou Coal Mine is located in the northeastern Ordos Basin, within the Yimeng Uplift Zone, and its extreme geographical coordinates are (2000 National Geodetic Coordinate System): longitude 111°09′27" to 111°16′57" E and latitude 39°48′01" to 39°50′45" N. The main coal seam of the mine is 6 coal seam. The main stratigraphic rock groups in the mine field include three categories: the loose-rock porous phreatic aquifers, the classic-rock porous and fissured water-bearing rock groups, and the carbonate-rock karst fissured aquifers. Of these, the aquifers that affect coal-seam mining are divided into three main categories: Roof Sandstone Water, Sandstone Floor Water, and Ordovician Limestone Water. Aquifers are primarily recharged vertically or laterally through overlying aquifers, and the distribution of water abundance is inhomogeneous. In the course of mining, the floor failure zone communicates with the sandstone pressure aquifer of the Taiyuan Formation. The Ordovician limestone aquifer has a large water pressure and a large volume of water. After connecting with the sandstone of the Taiyuan Formation, it is prone to water intrusion accidents that threaten the safety of mine production.

Based on this, this paper takes Longwanggou Coal Mine as the research object, and based on the data of regional geological and hydrogeological conditions, through various hydrochemical analysis methods such as Piper trilinear diagram, Gibbs graphic method, ion ratio coefficient, ion correlation analysis, etc., probes into the ion composition characteristics, hydrochemical types and ion exchange effects of main aquifers that affect coal seam mining, and conducts inverse geochemical modeling with PHREEQC to analyze the formation of hydrochemical components of groundwater in different aquifers, which is of great significance for water disaster prevention and water resources in coal mines.

Study area

The Longwanggou Coal Mine is located in the north-central part of the Zhungar Coalfield in Ordos City, Inner Mongolia Autonomous Region, in the northeastern of the Ordos Basin. It is a typical loess plateau landform. The annual average rainfall is 408 mm, mostly concentrated in July, August and September, and the distribution is extremely uneven. Furthermore, this region represents a classic example of a continental arid climate with significant diurnal temperature variations; the annual average temperature stands at approximately 8.6 ℃. The topography is typically steep to the west and low to the east, with vertical and horizontal surface gullies, much of which is covered by loess, resulting in severe soil erosion. Minor precipitation and strong evaporation occur in the area, with bedrock exposed only on the sides of large valleys. There are seasonal gullies in the area, and the amount of water varies with the season.

The mine is located in the Zhungar Coalfield, on the northeastern margin of the Ordos Basin of the North China Plate. The majority of the mine field is covered by Quaternary loess and aeolian sand, with only bedrock exposed in some of the beam tops or gullies. The stratigraphic sequence is illustrated in Fig. 1 Of these, the Ordovician is a group of shallow marine deposits. The lithology is dolomite and dolomitic limestone. The upper parts are pale grayish-yellow, brownish-grey, with thin argillaceous limestone, thick limestone, thin limestone and local leopard skin limestone. A histogram of the area stratification is shown in Fig. 1.

Fig. 1
figure 1

Regional stratigraphic histogram of Zhungar Coalfield

The perimeter of the main bedrock aquifer in the mine is generally a water-resistant boundary, and atmospheric precipitation is the primary recharge source for direct water-filled water-bearing rock formations. Due to the large topographic relief, the valley is deeply cut, which is not conducive to groundwater recharge. The aquifers that have an impact on coal seam mining mainly involve the Shihezi Formation, Taiyuan Formation and Ordovician limestone aquifers. The Upper and Lower Shihezi Formation sandstone fissure water-bearing rocks of the Upper Shihezi Formation are locally shallowly buried and belong to the fissure water. The main recharge sources are atmospheric precipitation direct infiltration recharge, surface water leakage recharge, and upper quaternary vertical leakage recharge. The porous fissures of the sandstone of the Shanxi Formation belong to the class of unconfined water, which is mainly recharged vertically or laterally through overlying aquifers. The total recharge is small, the overall water abundance is poor, and the local water abundance is moderate and extremely uneven. The pore-fissured waters of the Taiyuan Formation sandstone belong to the class of confined waters, which are chiefly recharged by the vertical or lateral supply of an overlying aquifer (Zhang et al. 2023). The total recharge is small and the water abundance is poor and uneven.

Sample collection and testing

According to the hydrogeological conditions of the study area, 106 groups of groundwater samples were collected from different aquifers (Table 1), including 27 groups of water samples from Ordovician limestone aquifers, 47 groups of water samples from Roof sandstone aquifers (Upper and Lower Shihezi Formation, Shanxi Formation) and 32 groups of water samples from Sandstone floor aquifers (Taiyuan Formation). The samples were stored in plastic bottles washed with sample water 3 to 4 times. The water samples were filtered with 0.45 μm filter membrane, sealed with film and stored at constant low temperature. According to the DZ / T 0064–2021 ' groundwater quality analysis method ', we measured the pH and temperature of the water samples at the sampling site, and other water quality indicators were analyzed according to the APHA (2005) standard method. After collecting water samples and sorting out the data of different water samples, the samples were tested according to the relevant regulations in the 'Groundwater Quality Standard' (GB / T 14848–2017), and the water quality was completely analyzed. The contents of the analysis include pH value, TDS, total rigidity, total basicity and mineralization degree. Cations include: K+, Na+, Ca2+, Mg2+; anions include: NO2, HCO3, Cl, SO42−, etc. In the field, we employed a portable multi-parameter water quality analyzer (HANNA HI98129) to conduct pH and temperature measurements as well as analyze other relevant parameters. The determination of K+, Na+, Ca2+, and Mg2+ was performed using an inductively coupled plasma emission spectrometer (Thermo Fisher ICAP-6300). Additionally, Cl and SO42− were determined through ion chromatography (Dionex ICS-1100). Lastly, CO32− and HCO3 concentrations were determined utilizing the double indicator titration method. The mass concentration of total dissolved solids (TDS) in water was calculated by subtracting 1/2 HCO3 mass concentration from the sum of anion and cation mass concentrations. The sampling point locations are plotted in Fig. 2.

Table 1 Statistical table of water sample data in the study area
Fig. 2
figure 2

Sampling point location diagram (a) China map, (b) Inner Mongolia Autonomous Region map, (c) Sampling point location map

Result and discussion

Chemical composition and types of groundwater

From Table 1, it can be seen that the TDS of the water samples in the study area ranged from 382.20—2840.40 mg/L, and the mineralization degree ranged from 232—2333.77 mg/L. The average value is shown as Sandstone floor water > Roof sandstone water > Ordovician limestone water; most of the water samples have a pH between 7 and 8, and the water samples are alkaline and the ion content is abundant.

The mineralization degree of Ordovician limestone water is between 232—1223 mg/L, of which less than 1000 mg/L is fresh water, and the mineralization degree is 1000 ~ 3000 mg/L, which is brackish water, and the water quality is basically good. The cations are mainly Ca2+, Mg2+, Na+, and the anions are mainly HCO3 and SO42−. The Roof sandstone water includes the water sample data of the upper and lower Shihezi Formation and the Shanxi Formation. The overall mineralization degree is between 758 and 2334 mg/L, which is brackish water. The cations in the water are mainly Ca2+, Mg2+, Na+, and the anions are mainly HCO3, SO42−, Cl. The sandstone water in the floor is the water sample data of the Taiyuan Formation, and the overall mineralization degree is between 873—2329 mg/L, which is brackish water; the cations are mainly Ca2+, Mg2+and Na+. The anions are mainly HCO3, SO42−, Cl, HCO3 accounts for the main part, and the anion concentration is greater than the cation concentration.

Piper trilinear diagrams can directly reflect the content and chemical properties of the anion and cation components in different aquifers. The Piper trilinear diagram is plotted in Fig. 3 from a statistical study of 106 sets of water sample data from the study area. The ion distribution in the studied region is relatively concentrated, with the bulk mostly located in the 7th and 9th regions of the diamond map and with relatively high Na+ and Cl contents. The remaining region has a small number of water sample points falling into, and the ionic composition is relatively homogeneous, with no obvious dominant ion. The hydrochemical types of Ordovician limestone water (Miao et al. 2021) are relatively complex, mainly HCO3-Na·Ca type, HCO3-Ca·Mg type, Cl-Na type and SO4·Cl-Na type water, indicating that the aquifer is characterized by complex hydrochemical composition, large differences in hydrochemical types and poor connectivity. The types of Roof sandstone water are mainly HCO3-Na·Ca type, HCO3·Cl-Na type and HCO3·SO4-Na type. The shallow water cycle is rapid, the HCO3 concentration is relatively low, the deep water cycle is alternatingly limited, the SO42− and Cl concentrations are high, and the overall mineralization of the water samples is quite different, indicating that the supply and circulation of the Roof sandstone water is not uniform. The hydrochemical types of Sandstone floor water are mainly Cl-Na type, HCO3·Cl-Na type and HCO3·Cl-Na·Ca type. HCO3, SO42− and Cl concentrations are high in this aquifer, water circulation is limited, circulation exchange is slow, the overall mineralization of the water samples is quite different, and the recharge and circulation of the Sandstone floor water is uneven.

Fig. 3
figure 3

Piper trilinear diagram of water samples in the study area

By comparing the water samples from each aquifer, there are both differences and the same parts of the hydrochemical types between different aquifers. On the Piper trilinear diagram, the water sample points show a gradual shift from the left to the right of the middle position of the diamond as the depth increases. The depth range spans approximately from 200 to 240m. In the natural state, the water supply and migration conditions of aquifers in different vertical sections are fairly heterogeneous. The Ordovician limestone water sample has a elevated overall HCO3 concentration and low mineralization, indicating that the aquifer's overall water circulation rate is rapid, with positive recharge, runoff, and discharge conditions. As the depth increases, the water cycle gradually weakens (Long et al. 2021). The SO42−, Cl, and Na+ contents of the Roof sandstone water and the Sandstone floor water are high and the mineralization degree is strong. Some of them show the characteristics of deep retained water, indicating that the aquifer water recharge cycle is uneven and the runoff is sluggish (He et al. 2022).

Differences in groundwater chemical characteristics of different aquifer

Analysis of the source of groundwater chemical composition

When studying the primary source of groundwater ions, the environment, occurrence conditions, and degree of metamorphism of mine water samples are analyzed by calculating the ratio of milligram equivalent values between the ions. The ratio calculation results can further analyze the source, genesis and development of groundwater. The ion ratio coefficient (Lin et al. 2019; Yang et al. 2016) includes sodium chloride coefficient (γNa+/γC1), calcium magnesium coefficient (γCa2+/γMg2+), etc.

  1. 1.

    Sodium chloride coefficient (γNa+/γC1)

    γNa+/γC1 reflects the environmental conditions of water samples; the smaller the ratio, the stronger the cation exchange and the stronger the evaporation and concentration in the environment. Relatively speaking, the environment in which this occurs is also closed, which favors the formation of water concentrations and the occurrence of ion exchange. Sodium chloride coefficients are generally greater than or equal to 1 in areas with additional infiltration recharge from dissolved rock salt formation or atmospheric precipitation (Zhu et al. 2023).

    It can be seen from Fig. 4(a) that the distribution of sodium chloride coefficient ratio in the study area is more dispersed, and the water samples are mostly distributed near the industrial square and roadway, which are highly affected by human activities and the concentration of Cl is higher. Most of the Ordovician limestone water, Roof sandstone water and Sandstone floor water samples have a sodium-chlorine coefficient ratio greater than 1, some of which are located near 0.85 (An et al. 2014). The overall environment is relatively open, with poor sealing and minor metamorphism. Groundwater in the area can better receive atmospheric precipitation and other recharge sources. In addition to the dissolution of rock salt, Na+ in groundwater is also affected by the dissolution of silicate minerals such as potassium feldspar and plagioclase. Some of the lower values may be affected by human activities and surface rivers.

  2. 2.

    Calcium Magnesium Coefficient(γCa2+/γMg2+)

    γCa2+/γMg2+ can determine the source of Ca2+ and Mg2+ in groundwater. If γCa2+/γMg2+  = 1, the ions come from dolomite dissolution; if γCa2+/γMg2+  > 2, they come from silicate dissolution; if it is between 1 and 2, it is calcite dissolution (Mayo and Loucks 1995). From Fig. 4(b), it can be seen that the ratio of calcium and magnesium coefficients of water sample data is essentially less than 3, most of which are less than 2. Among them, most of the Ordovician limestone water and Roof sandstone water are greater than 1, indicating that most of the Ca2+ and Mg2+ ions are derived from the dissolution of dolomite and calcite, and some also include the dissolution of silicate rocks. The overall metamorphic degree is not high and the sealing is not strong. The water ratio of the Sandstone floor is essentially ≤ 2, the metamorphic degree is low, the environment is relatively open, and most of the Ca2+ and Mg2+ ions come from dolomite and calcite dissolution.

  3. 3.

    γ(SO42− + Cl)/γHCO3

    The ratio of γ(SO42− + Cl)/γHCO3 reflects the hydrodynamic characteristics. The larger the ratio, the weaker the hydrodynamic conditions. At the same time, it can also determine the source of its water chemical composition (Xiao et al. 2023). When γ(SO42− + Cl)/γHCO3 > 1, the source of water chemical composition is evaporite, and when γ(SO42− + Cl)/γHCO3 ≤ 1, the source is carbonate. From Fig. 4(c), it can be seen that the water sample ratio of Sandstone floor water in the study area is ≥ 1, and some of the water sample ratios are large, indicating that the source of hydrochemical composition is evaporite, the hydrodynamic conditions are general, and the ratio of some water samples is larger, which may have Cl measurement errors or be affected by human activities. The ratio of Ordovician limestone water samples to Roof sandstone water samples is more than 1 in most cases and less than 1 in a few. The sources of Ordovician limestone water and Roof sandstone water include evaporite and carbonate rocks, while Ordovician limestone water has a larger ratio, weak hydrodynamic conditions, low concentration of HCO3, and mostly Cl enrichment where hydrodynamic conditions are relatively slow.

  4. 4.

    γ(Ca2+ + Mg2+)/γ(HCO3 + SO42−)

    The ratio of γ(Ca2+ + Mg2+)/γ(HCO3 + SO42−) can further determine the source of Ca2+ and Mg2+ in water. When γ(Ca2+ + Mg2+)/γ(HCO3 + SO42−) > 1, the source of Ca2+ and Mg2+ is carbonate. When γ(Ca2+ + Mg2+)/γ(HCO3 + SO42−) ≤ 1, it indicates that the sources of Ca2+ and Mg2+ are evaporite and silicate (Yang et al. 2019). It can be seen from Fig. 4(d) that most of the water samples in the study area are located in the upper part of γ(Ca2+ + Mg2+)/γ(HCO3 + SO42−) = 1, indicating that the source of Ca2+ and Mg2+ is carbonate. In addition to HCO3 + SO42−, there are other anions that consume excess Ca2+ and Mg2+. In addition, the ratio of some Ordovician limestone water samples to Roof sandstone water samples is less than 1, which is jointly controlled by evaporite and silicate rock.

    By comparing the ratios of the ionic ratio coefficients, the studied region as a whole is in a relatively open state, which is better able to accept atmospheric precipitation supplies. The groundwater storage environment is relatively open, the overall degree of metamorphism is not high, and the stratigraphic lithology is rich, including easily dissolved evaporite, carbonate rocks and silicate rocks, Ordovician limestone and Roof sandstone water flow areas, primarily for evaporite and carbonate rock dissolution, Cl enrichment; the dissolution of dolomite and calcite increases the content of Ca2+ and Mg2+ ions, and the dissolution of silicates in some regions also produces Ca2+ and Mg2+. Sandstone floor water areas are mostly dominated by evaporite, with abundant Cl ion concentrations.

Fig. 4
figure 4

Ion ratio coefficient diagram of water samples in the study area (a) γNa+/γC1-, (b) γCa2+/γMg2+, (c) γ(SO42-+Cl-)/γHCO 3-, (d) γ(Ca2++Mg2+)/γ(HCO3-+ SO42-)

Analysis of influencing factors of groundwater chemical characteristics

Gibbs semi-logarithmic coordinate diagram is generally used to analyze the influencing factors of groundwater hydrochemical ion characteristics (Gibbs 1970; Feth and Gibbs 1971). The factors affecting the chemical composition of water are divided into three main control types: rock weathering, atmospheric precipitation and evaporation crystallization (Tiwari et al. 2019; Al-Barakah et al. 2017). According to the Gibbs diagram analysis of the study area (Fig. 5), most of the water sample points in the study area fall in the water–rock interaction area, some water sample points fall in the evaporation concentration influence area, and a small number of water sample points fall outside the three partitions, which may be affected by human activity factors, mixing and other factors (Marandi and Shand 2018; Khan et al. 2020). The chemical composition of water samples in the study area is dominated by the concentration of rock weathering dissolution and evaporation. The TDS of water samples in the study area ranged from 382 to 2658 mg/L. As the TDS value increases, the main controlling factor affecting the chemical composition of groundwater changes from water–rock interaction to evaporation and concentration. The TDS values of some Ordovician limestone water and Roof sandstone water samples are low and the Cl/(Cl + HCO3) ratios are less than 0.2. These water samples are mostly located in the recharge areas and are mainly affected by rock weathering and dissolution. With the increase of TDS value and Cl/(Cl + HCO3) ratio, evaporation concentration has gradually become the main controlling factor of groundwater chemical composition. Evaporation causes a large amount of water to be lost, and the salt in the aqueous solution is retained in the soil. Long-term accumulation makes the TDS of shallow groundwater continue to increase (Gao et al. 2021). The water sample of Roof sandstone basically falls in the water–rock interaction zone, and the ratio of Cl/(Cl + HCO3) changes considerably. It can be seen from the TDS- Na+/(Na+ + Ca2+) diagram that the TDS of water samples in the study area did not change much as a whole, but the concentration ratio of Na+/(Na+ + Ca2+) varied greatly, and some points fell outside the Gibbs model, indicating that cation exchange may occur in the water–rock interaction, resulting in an increase in Na+ content. With the increase of total dissolved solids (TDS), there is a corresponding rise in the concentration of impurities in water, as well as an elevation in the levels of dissolved substances within groundwater. The elevated TDS values in this region contribute to a propensity for brackish water formation (Shang et al. 2021). Concurrently, cation exchange and evaporation concentration processes occurring within the study area result in an accumulation of Na+ and Cl ions within groundwater. Over time, these accumulated ions can be transported from shallow to deep groundwater due to long-term cumulative activity, leading to increased hydraulic gradient and enhanced vertical differentiation (Wang et al. 2023). The aggregation of Cl/(Cl + HCO3) in Gibbs diagram indicates that groundwater may also be affected by human activities.

Fig. 5
figure 5

Gibbs diagram of water samples in the study area

Ion correlation difference

In hydrochemical analysis, correlation analysis and processing methods are commonly used to analyze groundwater hydrochemical data and to judge the similarity and dissimilarity of hydrochemical parameters. If the correlation of parameters is excellent, it can reflect the consistency of groundwater sources or the similarity of reaction processes (Li et al. 2012; Wang and Jiao 2012; Wisitthammasri et al. 2020). The matrix of correlation coefficients for the main hydrochemical parameters of the water sample is plotted in Tables 2, 3, and 4.

Table 2 Correlation coefficient matrix of main hydrochemical parameters of Ordovician limestone water in the study area
Table 3 Correlation coefficient matrix of main hydrochemical parameters of Roof sandstone water in the study area
Table 4 Correlation coefficient matrix of main hydrochemical parameters of Sandstone floor water in the study area

The results in Table 2 show that Cl in Ordovician limestone water has a significant correlation with K+ at the level of 0.05 and with Mg2+ at the level of 0.01, and with K+ and Mg2+ at about 0.5. The correlation between SO42− and each cation is low. HCO3 has a significant correlation with K+ at the 0.05 level, and has a significant correlation with Mg2+ and Cl at the 0.01 level, and the correlation coefficient with Cl is 0.702, indicating that HCO3 and Cl in the Ordovician limestone water in the study area may have the same source, and the dissolution of sulfate minerals is less, mostly salt rock and carbonate rock dissolution, mainly ion exchange. The correlation between K+, Cl, HCO3 and TDS is significant, with a correlation coefficient of 0.912 between K+ and TDS, indicating that these ions play a decisive role in the TDS in the studied region, with K+ having a larger effect on the TDS.

The results in Table 3 show that there is a significant correlation between Cl and Na+ and Ca2+ in the Roof sandstone water at the level of 0.01 with a correlation coefficient of about 0.5 and a strong correlation. SO42− is significantly correlated with Na+ at the level of 0.01, with a correlation coefficient of 0.735, and is less correlated with other ions. HCO3 has a negative correlation with SO42− and Na+ at the 0.01 level and little correlation with other cations, indicating that the Roof sandstone water in the studied area is mostly salt rock dissolved. At the same time, mining causes oxidation of sulfur-bearing minerals, dissolution of sulfate-bearing minerals in sandstone water, and Na+ exchange adsorption. Na+, Ca2+, Cl, SO42− have a significant correlation with TDS at the level of 0.01, and Na+ has a correlation coefficient of 0.806 with TDS, indicating that these ions play a decisive role in TDS in the studied region, with Na+ having a large influence on TDS.

The results in Table 4 show that the correlation between Cl, SO42− and cations is low, with Mg2+ and HCO3 being significantly correlated at the level of 0.01 with a correlation coefficient of 0.522; There is a significant correlation between Mg2+ and Na+ at the level of 0.01. This indicates that the water-salt rocks and sulfate-bearing minerals in the sandstone floor of the study area are less dissolved. Na+ is significantly correlated with TDS at the level of 0.05, while Mg2+, Cl and HCO3 are significantly correlated with TDS at the level of 0.01, and the correlation coefficient between Mg2+ and TDS is 0.671, and the correlation coefficient of other ions is about 0.5, which have great influence on TDS in the study area.

Ion-exchange action

Cation exchange is an influential factor affecting the chemical composition of groundwater (Dong et al. 2022). Typically, the cation exchange between Ca2+, Mg2+ and Na+ in groundwater is determined by the milligram equivalent concentration relationship of (Ca2+ + Mg2+-HCO3-SO42−) and (K+ + Na+-Cl) (Liu et al. 2019; Li et al. 2018).

According to Fig. 6, the slope of the Ordovician limestone water sample after fitting is about -0.24; the slope of Roof sandstone water sample after fitting is -1; the slope of the Sandstone floor water sample after fitting is -0.15, indicating cation alternating adsorption in the groundwater in the study area. Of these, the Roof sandstone water has the best fit, with a slope of -1 after the fit and strong ion exchange effects; most Ordovician limestone water samples have slopes close to -1 and a large degree of ion exchange, which corresponds to the analysis of water samples whose Gibbs diagrams fall outside the model and ion correlation coefficients in the previous paper. The ratio of (Ca2+ + Mg2+-HCO3-SO42−) in some Sandstone floor water is relatively large, which is related to the fact that the ratio of calcium magnesium coefficient of water in floor sandstones is basically ≤ 2 in the analysis of ion ratio coefficient, and the degree of metamorphism is relatively low. Most of Ca2+ and Mg2+ ions come from the dissolution of dolomite and calcite.

Fig. 6
figure 6

The diagram of (Ca2+ + Mg2+-HCO3-SO42−) and (K+ + Na+-Cl)

The chlor-alkali index CAI-1 and CAI-2 proposed by Schoeller (Schoeller 1967) can be used to further detect whether cation exchange occurs. If the chlor-alkali index CAI-1 and CAI-2 are greater than 0, it indicates that a positive cation exchange between Na+, K+ and Ca2+, Mg2+ occurs. If both are negative, reverse cation exchange occurs. In order to further eliminate the ion deviation caused by cation exchange, the ion concentration before cation exchange was calculated using formulas (Eq. 3; Eq. 4; Eq. 5), where Ki is the milligram equivalent concentration ratio of (K + Na)/Cl;\(\overline{k }\) is the mean value of Ki; ReC(K+Na).i is the level of Na+ + K+ ions before the exchange interaction; ReC(Ca+Mg).i is the level of Ca2+ + Mg2+ ions before exchange. The ion milligram equivalent concentration is used in the calculation process. The ion exchange amount is the actual measured value minus the value before exchange. The results are expressed in terms of the variation of Na+ + K+.

It can be seen from Fig. 7 that CAI-1 and CAI-2 have positive and negative values, indicating that reverse cations occur in some areas of the study area, which corresponds to the previous ion ratio coefficient analysis and Gibbs diagram. Table 5 is a statistical table of the results of the cation exchange calculation. Among them, 50% of the Ordovician limestone water samples and 43% of the Sandstone floor water samples showed increased Na+ content after exchange, suggesting that reverse cation exchange occurred in these aquifers in the study area. After the exchange of 70% water samples in the Roof sandstone water, the content of Na+ decreased, that is, the positive cation exchange occurred in more areas, which increased the content of Ca2+ and Mg2+.

Fig. 7
figure 7

Histogram of chlor-alkali index of water samples in the study area

Table 5 Statistical table of cation exchange capacity (meq/L)
$$CAI-1=\frac{C{l}^{-}-\left(N{a}^{+}+{K}^{+}\right)}{C{l}^{-}}$$
(1)
$$CAI-2=\frac{C{l}^{-}-\left(N{a}^{+}+{K}^{+}\right)}{HC{O}_{3}^{-}+S{O}_{4}^{2-}+C{O}_{3}^{2-}+N{O}_{3}^{-}}$$
(2)
$${k}_{i}={C}_{\left(K+Na\right).i}/{C}_{\left(Cl\right).i}$$
(3)
$${\text{Re}}{C}_{\left(K+Na\right).i}={C}_{\left(K+Na\right).i}-\left({k}_{i}-\overline{k }\right)\times {C}_{\left(Cl\right).i}$$
(4)
$${\text{Re}}{C}_{\left(Ca+Mg\right).i}={C}_{\left(Ca+Mg\right).i}+\left({k}_{i}-\overline{k }\right)\times {C}_{\left(Cl\right).i}$$
(5)

Analysis of mineral saturation index method

The mineral saturation index (SI) can reflect the degree of dissolution and precipitation of minerals in groundwater. The mineral saturation index calculated by the formula can reflect the change of reactive minerals in groundwater (Hakimi et al. 2021), The formula for the calculation is:

$$SI={\text{lg}}\frac{IAP}{K}$$
(6)

Among them, SI represents the degree of mineral dissolution; IAP represents the ion activity product of the components contained in the mineral in aqueous solution; K denotes the equilibrium constant of the mineral dissolution reaction. When SI < 0, minerals are in an unsaturated state relative to aqueous solution; When SI = 0, the mineral and aqueous solutions are in equilibrium. When SI > 0, minerals are in supersaturated state relative to aqueous solution; normally, the range of ± 0.5 is used as the equilibrium condition in the actual calculation process. When SI < -0.5, minerals are in a dissolved state, when SI > 0.5, minerals are in a saturated state, and when SI is between-0.5 and 0.5, minerals are in a dissolved equilibrium state.

The saturation index of different minerals (Calcite, Dolomite, Gypsum, Halite) is calculated by PHREEQC software, and the calculation results are shown in Fig. 8. The saturation index of gypsum and rock salt is negative, indicating that the dissolution of rock salt and gypsum in groundwater in the study area accounts for the main position of ion action, and the mineral saturation index of gypsum is between -3 ~ -0.5, and the saturation index of rock salt is between-8.5 ~ -5. Both minerals are in a dissolved state, and the production of Na+ and Cl in groundwater is related to rock salt. Gypsum is in an unsaturated state, which is one of the sources of Ca2+ and SO42− in groundwater, indicating that the dissolution of gypsum and rock salt in groundwater is the main role, resulting in higher TDS of SO4-Na type water in some areas (Wu et al. 2020). SO42− is less likely to precipitate with Ca2+ in groundwater, and some of the formed gypsum minerals may dissolve, which will lead to an increase in Ca2+ concentration in the water and promote the saturation of calcite and dolomite.

Fig. 8
figure 8

Relationship diagram between SI and TDS in water samples in study area

The saturation index of 80% dolomite and calcite minerals is above-0.5, and both minerals are essentially in a dissolved equilibrium-saturation state. The remaining small amount of water samples are in an unsaturated state, indicating that the carbonate minerals in the aquifer are relatively less dissolved. Precipitation forms in some supersaturated regions, which reduces the concentrations of Ca2+, Mg2+ and HCO3 in water samples. At the same time, it also confirms the conclusion in the previous ion ratio coefficient, that is, most of the Ca2+ and Mg2+ ions come from the dissolution of dolomite and calcite.

Therefore, the results of mineral saturation index are consistent with the results of ion correlation analysis and ion ratio analysis. The Na+ and SO42− in groundwater in the study area mainly come from the dissolution of rock salt and gypsum minerals, while most of Ca2+ and Mg2+ ions come from the dissolution of dolomite and calcite. Most calcite and dolomite are in a saturated and super-saturated state. The dissolution of carbonate rocks produces Ca2+ and Mg2+. At the same time, due to evaporation concentration and cation exchange, Na+ increases continuously in the groundwater, Ca2+ and Mg2+ decrease correspondingly, and TDS increases in the aquifer, which is in general agreement with the Gibbs diagram model and ion exchange.

Inverse geochemical modeling

When PHREEQC software is selected for inverse geochemical modeling, the appropriate simulation path and ' possible mineral phase' are the keys to model establishment (Bai et al. 2022). By analyzing the mineral saturation index (SI) and the transformation amount of each mineral phase on the simulation path, the composition identification and quantitative hydrogeochemical reactions of water and rock are applied to better explain the formation and evolution of groundwater chemical composition (Jiang et al. 2022). Along the direction of groundwater runoff, the overall TDS values show an increasing trend as hydrogeochemistry continues to advance. According to the variation law of TDS of water samples in the study area, combined with the groundwater flow direction, three simulation paths were selected from three different aquifers, and the spatial variation law and path map of TDS in the study area were drawn (Fig. 9). According to the hydrogeological conditions of the study area, the characteristics of different aquifers and the results of water quality analysis, combined with the mineral saturation index calculated above, calcite, dolomite, gypsum and rock salt were selected as possible mineral phases for simulation, and Na+, Ca2+, Mg2+, Cl, SO42−, HCO3 were selected as constraint variables. After inputting the water quality data into the PHREEQC software, the reverse simulation is carried out, and the solution in line with the actual situation is selected by adjusting the parameters and uncertainty (Chung et al. 2020).

Fig. 9
figure 9

Inverse geochemical modeling path map of the study area

The amount of mineral conversion on the inverse geochemical modeling path of different aquifers in the study area is shown in Table 6. From the calculation results of path 1, it can be seen that along the groundwater flow direction, the dissolution of gypsum, rock salt and dolomite occurred on the Ordovician limestone water path, calcite precipitation, Na+, Ca2+, Mg2+, SO42−, Clcontent increased, and the hydrochemical type evolved from bicarbonate type to sulfuric acid type. Path 2 reflects the flow direction along the groundwater. The law of change in the Roof sandstone water is that the dissolution of gypsum, rock salt and calcite occurs, dolomite precipitates, and the contents of Na+, Ca2+, Mg2+, SO42− and Cl increase. Path 3 shows that gypsum, rock salt and calcite precipitate. In the calculation of regional saturation index, gypsum SI is less than 0, which is in a dissolved state. However, precipitation occurs during the simulation of this group of paths. This path is oriented north–south and lies at the intersection of the first two paths. The TDS is higher in the western part of the region. The Sandstone floor water includes the coal-bearing strata of Taiyuan Formation. The pyrite-containing area is oxidized during the mining process to increase SO42−. The concentration of HCO3, SO42−, and Cl in this type of water is high, and the solubility of gypsum is reduced. There are more Ca2+ and Mg2+ ions produced by ion exchange, and the water cycle is limited, resulting in precipitation.

Table 6 Inverse geochemical modeling results for different paths (mmol/L)

Comprehensive analysis

Combined with the calculation results of different aquifer hydrochemical types and ion ratio coefficients, the hydrochemical types of Ordovician limestone water and Floor sandstone water are similar. Gibbs diagram points out that rock weathering and dissolution are the main control factors in the study area. Sandstone floor water contains the Taiyuan Formation aquifer, and 6 coal is the main coal seam. Water-conducting cracks are easily created during the excavation of the roadway. The entry of CO2 promotes the dissolution of dolomite in the floor sandstone water. The water flowing fractured zone produced in the process of 6 coal seam mining leads to the sandstone pore fissure aquifer at the bottom of the upper Shihezi Formation, and the floor failure zone reaches the sandstone fissure aquifer of Taiyuan Formation. The Roof sandstone water enters the working face through the fissure and mixes with the Floor sandstone water. The dissolution of gypsum and rock salt in the Roof sandstone water promotes the continuous production of Na+ and an increase in Cl and SO42− content. More positive cation exchange occurs in this aquifer, which promotes the production of Ca2+ and Mg2+. At the same time, a portion of the water is mixed with the Floor sandstone water, and the dissolution of dolomite in the Sandstone floor water also increases Ca2+, which promotes the precipitation of calcite and gypsum, and some reverse cation exchange also occurs. Combined with Piper trilinear diagram and Gibbs diagram, it can be seen that the hydrochemical types and variation laws of Roof sandstone water and Sandstone floor water are similar, resulting in a vertically connected hydraulic system. According to the hydrogeological background of the study area, the hydraulic connection between the aquifers is relatively poor, but mining of coal seams has allowed adjacent aquifers to be vertically connected. At the same time, the water–rock interaction and material transfer amount in the evolution path of different aquifers are different, and the types and characteristics of water chemistry are also different. Therefore, the continuous dynamic monitoring and analysis of the chemical evolution of mine water before and after mining is of great significance for preventing mine water inrush, identifying mine water inrush sources and preventing water pollution.

Conclusion

The main results are as follows:

  1. (1)

    The hydrochemical types in the study area have obvious differences between different aquifers. In the natural state, the water recharge and migration conditions of aquifers in different vertical sections have great inhomogeneity. The hydrochemical types of Ordovician limestone water are mainly HCO3-Na·Ca type water, HCO3-Ca·Mg type water, Cl-Na type water and SO4·Cl-Na type water. The hydrochemical types are quite different and the connectivity is poor. The hydrochemical types of Roof sandstone water are mainly HCO3-Na·Ca type water, HCO3·Cl-Na type water and HCO3·SO4-Na type water, and the recharge and circulation of this aquifer are not uniform. The hydrochemical types of Sandstone floor water are mainly Cl-Na type water, HCO3·Cl -Na type water and HCO3·Cl-Na·Ca type water. This aquifer has high concentrations of HCO3, SO42− and Cl, limited water circulation, slow circulation exchange, and the overall mineralization of the water samples is quite different, with non-uniform recharge and circulation of Sandstone floor water.

  2. (2)

    The Gibbs diagram reveals that rock weathering dissolution and evaporation concentration are critical mechanisms to control the changes of hydrochemical components in the study area. At the same time, cation exchange is another important factor affecting the change of regional hydrochemical composition. Evaporation concentration and ion exchange are the main reasons for the enrichment of Na+ in regional groundwater. In addition, human activities have a certain impact on groundwater composition in some areas.

  3. (3)

    The simulation results of ion ratio coefficient, ion exchange analysis, mineral saturation index and PHREEQC show that evaporite and carbonate rock are the main ion sources of Ordovician limestone water and Roof sandstone water in the study area, and are also affected by the dissolution of silicate minerals. Sandstone floor water is mainly affected by the dissolution and precipitation of evaporite and carbonate minerals. The dissolution of rock salt and gypsum in groundwater accounts for the main position of ion action, and Na+, Cl and SO42− mainly come from the dissolution of rock salt and gypsum minerals, while most of Ca2+ and Mg2+ ions come from the dissolution of dolomite and calcite. The Ordovician limestone water and Roof sandstone water have similar mineral changes, with the dissolution of gypsum, rock salt, calcite and dolomite precipitates.