Introduction

Groundwater is an essential resource for human life, healthy ecosystems, and socio-economic development worldwide. In recent decades, many countries, including Iran, have been faced with water shortages (Motiee et al. 2001; Barzegar et al. 2017a, b, c). Increased global exposure to water scarcity has resulted in numerous hydrogeological studies on groundwater quality and quantity. Investigations of groundwater chemistry contribute to greater understanding of the spatial and temporal distribution of groundwater and to better management of groundwater resources for domestic, industrial, and agricultural water supplies (Hosono et al. 2009; Ayotte et al. 2011).

Groundwater quality is a function of physical, chemical, and biological parameters, and constitutes the final result of all the processes and reactions that act on the water from the moment it condenses in the atmosphere to the time it is discharged by a well (Arumugam and Elangovan 2009; Pichaiah et al. 2015; Pandey 2016; Barzegar et al. 2016b). Groundwater quality is mainly controlled by natural and anthropogenic factors. Natural processes include precipitation, water–rock/soil interactions, evaporation/crystallization, groundwater velocity, oxidation or reduction reactions and local hydrology–hydrogeology; anthropogenic factors include agriculture, industry, mining, urban development, and increased utilization of water resources (Chan 2001; Barzegar et al. 2015, 2017b, 2018).

Along the path of groundwater movement, processes such as dissolution and deposition of minerals, cation exchange (i.e., direct and reverse), redox reactions, evaporation/crystallization, and anthropogenic inputs may affect the chemistry and quality of the water. Different scatter plots based on ionic ratios and hydrogeochemical modeling are used to understand these processes (Barzegar et al. 2016a, b, 2017a). Hydrogeochemical modeling is a helpful tool for reproducing and predicting hydrogeochemical processes. There are two general geochemical modeling approaches; forward and inverse modeling for water–rock interactions (Plummer 1984). During the forward modeling process, the final composition of a water sample is simulated after reacting it with different phases and processes such as evaporation, cation exchange, etc. In inverse geochemical modeling, a mass balance model is used to determine the reaction quantity and the chemical composition of groundwater after its interaction with rock along its path. Unlike inverse modeling, which is used to determine reactions based on observed data, forwarding modeling predicts the evolution of the water composition based on hypothetical reactions, whether or not data are available (Plummer 1992).

Studies of groundwater quality using different ionic ratios and hydrogeochemical modeling have been carried out in different parts of the Middle East. Bozdağ (2016) used a forward hydrogeochemical model to assess hydrogeochemical characteristics of groundwater in two aquifer systems in the Cumra Plain, Central Anatolia, Turkey. Results showed that the mechanism controlling groundwater chemistry in the Neogene aquifer was actually regulated by geogenic processes (water–rock interaction) rather than by anthropogenic activities. Askri et al. (2016) studied groundwater quality and salinization processes in the Salalah plain, Sultanate of Oman, using molar ratios and inverse modeling simulations. They concluded that the seawater intrusion, halite dissolution, and use of fertilizers in agriculture were the main sources producing groundwater salinization in the study area. Salem et al. (2016) employed hydrogeological and hydrochemical data (e.g., ionic ratios) to explore the origin of low-salinity brackish groundwater in the Abu Madi area in the northern Nile Delta, Egypt. Results indicated that the brackish nature and higher piezometric surface of the groundwater, as well as the occurrence of a vertical low-salinity seawater zone in the coastal area, supported the possibility of submarine groundwater discharge. Moreover, the ionic ratios confirmed the occurrence of the dissolution of evaporites and dilution of sodium-rich marine clays and cation exchange in the groundwater system of the area.

Groundwater has a significant importance for drinking, industry, and agriculture in the Khoy plain in northwest Iran, and its hydrogeochemical characteristics are key factors in making water resources management decisions. This paper presents an overview of the current hydrochemical status of groundwater in the Khoy area while also providing a sound scientific basis for recognizing the potential processes in the groundwater system. The main objective of the current research is to understand the geochemical processes potentially controlling the behavior and quality of the groundwater system in the Khoy plain using different ion ratios and hydrogeochemical modeling.

Materials and methods

Location, climate, geological, and hydrogeological settings

The Khoy plain, with an area of approximately 600 km2, is located in the north of West Azarbaijan province, northwest Iran (Fig. 1). The plain is part of the Aras River basin. Khoy City is the most important city in the area, with a population of over 348,000, and uses groundwater as an essential resource for various purposes. According to the Emberger climate index (Emberger 1930), the area is considered cold and dry with an annual average rainfall of 292 mm. The annual average temperature and humidity are 11.6 °C and 60%, respectively. The plain is surrounded by mountains of which the highest is Avrin Mountain (1300 m) in the west of the plain. Surface water resources of the area are made up mostly of two rivers, the Aland and the Qotur-Chay, which originate in the western highlands and discharge to the Aras River in the northeast of the area. The Qotur-Chay River carries a high sediment load, which is typically deposited as poorly sorted alluvium containing a high percentage of fine material (e.g., silt and fine sand) (Jalali 2012).

Fig. 1
figure 1

Geological units of the Khoy area (adopted from Radfar et al. 2005), location of the sampling points and inverse geochemical modeling paths

The Khoy area is structurally part of the Khoy-Mahabad geological zone, which has frequent occurrences of magmatic activity. Figure 1 shows the geological units of the Khoy area. Magmatic and metamorphic facies and also recent alluvium are abundant facies in the area. Except for metamorphic rocks with a lithological composition of gneiss, migmatite, and schist that are probably related to the Precambrian era, other rock units of the Late Precambrian forming the Kahar formation (composed of slate, shale, and coals with flakes of graphite north of the Khoy city) are considered the oldest units (Yeganeh et al. 2015). Mesozoic rocks consisting of ophiolitic complex, mafic and ultramafic rocks (e.g., diorite, gabbro, basalt, serpentinite, dunite, harzburgite, etc.), and metamorphic rocks (e.g., gneiss, marble, schist related to the Cretaceous) are found in the western, northern, and south-western parts of the Khoy plain. The Miocene units are made up of conglomerate, representing a disruptive environment. The Upper Miocene-to-Pliocene deposits composed of sandstone and conglomerate with marl, shale, and layers of gypsum and salt are known as the Upper Red Formation and can be observed in the west, southeast, and northeast of the plain. Units of the Pliocene period are a composition of conglomerate, marl, and sandstone, which are distributed in the south and southeast of the plain (Radfar et al. 2005).

The Khoy aquifer was filled with materials eroded from the surrounding mountains during the Quaternary period and deposited by the main rivers that flowed through the plain. These materials included volcanic grains (e.g., diabese, andesite, etc), dolomite, calcite, gypsum, and serpentinite. (Roshanbakht 2002). Alluvial deposits in the plain resulted from deposition of the Aland and Qotur-Chay Rivers and are mainly composed of gravel, sand, silt, and clay particles in terms of grain size. Old terrace surfaces consist of clay loam and show low permeability. Recent (Quaternary) terraces near the rivers consist of unconsolidated sands and show high permeability (Jalali 2012). According to information from geophysical studies, log drillings, and geological investigations, the aquifer is formed in recent alluvial deposits (Quaternary). Aquifers of the Khoy plain consist of two main types: unconfined and confined. The unconfined aquifer (main aquifer) covers the entire plain, whereas the confined aquifers are situated in the west and central parts of the plain. Figure 2 shows the schematic position of the aquifers in the plain. In general, the confined aquifer is formed in the Qotur-Chay River watershed, where the alluvium is not uniform in direction of flow and depth. The fine-grained clay and silty layers cause a separation among the deposits, which result in a confined aquifer. In the Aland River watershed, tectonic movement has an important role in the formation of the confined aquifer. Displacement of the strata and layers with less permeability on top of coarse-grained layers by the Firooraq fault caused the confined aquifer. Figure 3 shows geological cross sections of the unconfined and confined aquifers in the plain. The confined aquifer was artesian, but due to over-exploitation, hydraulic heads have been lowered, such that artesian conditions are no longer observed. Total thickness of the aquifers ranges between 20 and 200 m in the northwest and central parts of the plain. The transmissivity values for the unconfined aquifer range between 50 and 1500 m2/day, and pumping tests in the area give an average storage coefficient of 0.05 (Jalali 2012).

Fig. 2
figure 2

Schematic position of the aquifers and groundwater flow direction in the unconfined aquifer

Fig. 3
figure 3

Geological cross section from a unconfined and b confined aquifers in the Khoy plain

The recharge to the aquifers is mainly taking place either from some elevated areas in the west or from local surface water infiltrations, e.g., rivers, creeks, and irrigation return flow. The rivers pass through the geological formations in the area, and therefore, the formation materials, especially in the west of the basin, may have an important role in the hydrogeochemistry of the aquifer.

Potentiometric contours are commonly used to represent the spatial distribution of hydraulic head across an aquifer. The map of the potentiometric surface was used to guide the linked potential flow paths from upgradient to downgradient areas across the aquifer. The general groundwater flow direction in the unconfined aquifer is mainly from southwest to northeast (Fig. 2). The inconsistency between contoured heads in the southwest of the aquifer may be attributed to over-exploitation of groundwater. The bedrock of the plain includes marl and conglomerate, which are predominant in the northern and southern parts of the plain, respectively.

Water sampling and analysis

To evaluate hydrogeochemical processes and factors, 54 water samples from the groundwater resources (well and qanat) of the area were collected in July 2017, and analyzed for major cations and anions (Na, K, Ca, Mg, HCO3, SO4, and Cl), minor ions (NO3 and F), and Al. There are 15 overflowing artesian wells in the confined aquifer from which four water samples were collected. The locations of the sampling points are shown in Fig. 1. Electrical conductivity (EC) and pH were measured in the field. All the analyses were performed according to APHA (2005) at the Water Laboratory of the University of Tabriz. Field blanks and duplicate procedures were used for quality control assurance.

Accuracy of the analysis of the major ions was also checked by computing the cation–anion charge balance as follows:

$$B=\frac{{\left( {C - A} \right)}}{{\left( {C+A} \right)}} \times 100,$$
(1)

where C and A are the concentrations of the total cations (Ca + Mg + Na + K) and the total anions (HCO3 + Cl + SO4 + NO3), respectively, in meq/L, and B is the percentage of ionic balance error. The charge balances for all the samples were within the limit of ± 5% as suggested by Domenico and Schwartz (1998).

Geochemical computations

Forward and inverse geochemical modeling were applied for groundwater using the software PHREEQC 3.0 (Parkhurst and Appelo 2013). The PHREEQC thermodynamic database was used for saturation index (SI) computations. The SI of mineral phases, as well as partial pressure of CO2 (PCO2), were computed as follows (Parkhurst and Appelo 2013):

$${\text{SI}}={\log _{10}}\left( {\frac{{{\text{IAP}}}}{{{K_{{\text{sp}}}}}}} \right),$$
(2)

where IAP is the ionic activity product of the dissociated chemical species in solution and \({K_{{\text{sp}}}}\) denotes the equilibrium solubility product for the chemicals involved at the sample temperature. SI < 0 and SI > 0 indicate under-saturation (dissolution) and over-saturation (precipitation) states for groundwater with respect to the specific mineral phase, respectively (Parkhurst and Appelo 2013).

The mixing simulation between the groundwater samples was carried out using PHREEQC 3.0 (Parkhurst and Appelo 2013). In the mixing simulation, each solution was multiplied by its mixing fraction and a new solution was calculated by summing all of the fractional solutions (Barbieri et al. 2018). The major ion concentrations, F, pH, and water temperature (by default 25 °C), were considered for this modeling. Results obtained from the mixing modeling were expressed in molar concentration and further converted to meq L−1. The example PHREEQC script for the mixing modeling of the groundwater in the Khoy plain is given in the Electronic Supplementary Material.

Inverse geochemical modeling was also performed using the PHREEQC (Parkhurst and Appelo 2013) thermodynamic database to simulate the solute mass transfer along the flow paths of the Khoy groundwater system. It was clear that the aquifer matrix was composed of materials resulting from geological units in the Khoy basin. The mineral composition in disparate parts of the aquifer may have differed because of the varying sources of deposition. Zolfaghar (2015) investigated the geochemical characteristics of stream sediments in the Khoy area and provided some mineral sections from different geological units which were sources of the stream sediments in the area. These are shown in Fig. 4. The main minerals of each rock type were as follows: for the feldspathic quartz rocks: quartz, feldspar, biotite, muscovite, and chlorite; for the metagabbro rocks: plagioclase and amphibole; for the graywacke: quartz, hematite, calcite, and opaque; and for the conglomerate rocks: calcite and opaque. The halite, dolomite, and gypsum minerals could also be found in the sandstone, limestone, and gypsiferous marls in the area as described in the geological setting section. Halite is supposed to be present, because it is a common dissolving phase in terrains containing calcite and dolomite (Parkhurst and Appelo 2013). Khoei (2002) reported that chlorite (minor), kaolinite, montmorillonite (minor), and illite were the clay minerals in the sediments of the area as determined through X-ray diffraction analysis by the Geological Survey of Iran.

Fig. 4
figure 4

[adapted from Zolfaghar (2015)]

Microscope photos showing the mineralography of a feldspathic quartz, b metagabbro, c graywacke, and d conglomerate rocks in the study area

As recommended by Zang et al. (2015) and Jia et al. (2017), the expected mineralogy of the lithologies in the region and the characteristics of the aquifers should be considered to select mineral phases, cation exchange, and thermodynamics constraints in the inverse geochemical modeling. In this way, calcite (CaCO3), dolomite (CaMg(CO3)2), halite (NaCl), gypsum (CaSO4_nH2O), biotite (KMg3AlSi3O10(OH)2), plagioclase (Na0.62Ca0.38Al1.38Si2.62O8), and K-feldspar (KAlSi3O8) as potential mineral phases and CaX2 and NaX as the most common exchange process were selected for the inverse geochemical simulation. The phases and reactions for the inverse geochemical modeling are presented in Table 1. The example PHREEQC script for the inverse modeling of groundwater chemistry in the Khoy plain is provided in the Electronic Supplementary Material.

Table 1 Hydrogeochemical phases considered in mole-balance inverse modeling

Results and discussion

Physio-chemical parameters and hydrogeochemical facies

A statistical description of the measured and analyzed parameters for groundwater samples is given in Table 2. The pH ranged between 6.5 and 8.2 (with a median value of 7.6), which indicated that the samples were slightly alkaline. EC varied between 460 and 7100 µS cm−1 (with a median value of 1295 µS cm−1) and exceeded the WHO (2011) permissible value (1500 µS cm−1) in 40% of the samples. Based on the median values, the order of abundance of the major cations was Ca (74.5 mg L−1) > Mg (70 mg L−1) > Na (59.5 mg L−1) > K (3.7 mg L−1), and of the major anions was HCO3 (489.2 mg L−1) > SO4 (86.2 mg L−1) > Cl (79.8 mg L−1). NO3 and F concentrations were below the WHO (2011) permissible values for all samples.

Table 2 Statistical description of the measured and analyzed parameters for groundwater samples of the Khoy plain

Samples were plotted on the Piper diagram (Piper 1944) to identify water types (Fig. 5). The diagram indicated that the majority of samples from the unconfined aquifer and all of the samples from the confined aquifer had a Ca(Mg)–HCO3 water type indicating a carbonate (temporary) hardness. None of the samples showed non-carbonate (permanent) hardness. There were six samples located in the northeast of the plain with a Na–Cl water type (saline). Almost 11% of the samples (samples 1, 7, 8, 31, 33, and 45) were in the E domain of the diagram, which indicated a mixing zone, where none of the cations and anions was predominant. These sampling points were mainly situated in the discharge zone (west of the plain).

Fig. 5
figure 5

Piper diagram of the groundwater samples in the Khoy plain

Hydrogeochemical processes and factors

Different reactions can occur within an aquifer system that may impact the quality and hydrogeochemical features of the groundwater. We studied major processes and factors including mineral dissolution and precipitation, cation exchange, evaporation, and anthropogenic activities in the groundwater of the Khoy plain.

Mineral dissolution and precipitation

As shown in the Piper diagram (Fig. 5), Ca and Mg were the dominant cations and HCO3 was the dominant anion in the groundwater of the study area. Carbonate-rich rocks (e.g., calcite and dolostone) could be the source of HCO3 and Ca and Mg may be derived from the sulfate-rich minerals (e.g., gypsum and anhydrite and silicates). Figure 6a shows the plot of (HCO3 + SO4) versus (Ca + Mg). As can be seen, the majority of the samples from the unconfined aquifer fell along the 1:1 line, which suggested that these ions were derived from weathering and dissolution of carbonate and sulfate minerals, and the proportion of calcite and gypsum dissolution was approximately the same. In addition, if Ca and Mg were only derived from carbonate and silicate weathering, these ions should be balanced by HCO3. The majority of the unconfined aquifer samples fell on the (Ca + Mg) side indicating that excessive Ca and Mg originated from other processes such as reverse ion-exchange reactions (Subramani et al. 2010). All the confined aquifer samples (not on the 1:1 line) showed ion exchange as the potential process for Ca and Mg. Garrels and Mackenzie (1971) suggested that, in silicate terrain, equivalent ratios of 1:2 and 1:4 for Ca/HCO3 in groundwater indicated calcite and dolomite dissolution, respectively. In the plot of Ca versus HCO3 (Fig. 6b), some of the samples of the unconfined aquifer fell along the 1:2 and 1:4 lines because of the contribution of calcite and dolomite weathering, respectively. Moreover, some of the samples fell along the 1:1 and 1:2 lines in the plot of Ca versus SO4 (Fig. 6c) indicating gypsum and anhydrite dissolution as the potential origins of Ca and SO4. In addition, removal of Ca from the groundwater system, likely by calcite precipitation, can be deduced from the excess of SO4 over Ca in several samples.

Fig. 6
figure 6

Plot of a log (HCO3 + SO4) versus log (Ca + Mg); b Ca versus HCO3; and c Ca versus SO4

Ca/Mg molar ratios for the samples are shown in Fig. 7a. A Ca/Mg molar ratio equal to unity (i.e., 1) reflects dissolution of dolomite, whereas a higher ratio is indicative of greater calcite contribution (Mayo and Loucks 1995; Belkhiri et al. 2011). A Ca/Mg molar ratio greater than 2 is indicative of dissolution of silicate minerals (Katz et al. 1998). The molar ratios for 70% of the unconfined aquifer samples were less than or equal to 1, and 7% were greater than 2. Therefore, dissolution of calcite and dolomite followed by silicate weathering were the dominant processes. All samples from the confined aquifer had a Ca/Mg molar ratio smaller than 1, which indicated dissolution of calcite. The spatial distribution of the Ca/Mg molar ratio (Fig. 7b) showed that most of the silicate mineral weathering and dissolution occurred in the northern part of the aquifer, and there was no specific distribution pattern for calcite and dolomite dissolutions.

Fig. 7
figure 7

a Ca/Mg molar ratio for the samples and b spatial distribution of the Ca/Mg molar ratio in the Khoy plain

The presence of feldspars (albite, orthoclase, and microcline) was responsible for the release of Na and K ions into groundwater of the study area. To investigate the effect of silicate weathering on groundwater chemistry, (Na + K) versus total cations (TC) was plotted (Fig. 8a). As can be seen, only a few samples from the unconfined aquifer were placed on the 1:0.5 line, which indicated weathering and dissolution of the Na and K-rich silicate minerals. The deviation of the samples from the 1:0.5 line may be an indication of Ca/Na exchange reactions. (Ca + Mg) versus TC (Fig. 8b) was plotted to show the effect of Ca and Mg-rich silicate minerals (e.g., anorthite and mica) on the groundwater of the plain. The plot showed that the majority of the samples deviated from the 1:0.5 line and indicated the insignificant role of these silicates in releasing Ca and Mg into groundwater.

Fig. 8
figure 8

Plot of a TC versus (Na + K) and b TC versus (Ca + Mg)

Ion exchange

Direct and reverse ion exchange with clay materials is one of the important processes affecting the chemical quality of groundwater. Direct ion exchange is represented by the displacement of the Na ion at mineral surfaces (e.g., clay) by other cations in the water, such as Ca and Mg in Eq. (3). The reverse ion exchange is defined by the exchange of Ca and Mg ions on clay minerals by Na ions in the water as in Eq. (4) (Appelo and Postma 2005):

$$2{\text{NaX}}+{\text{C}}{{\text{a}}^{2+}} \to 2{\text{N}}{{\text{a}}^+}+{\text{Ca}}{{\text{X}}_2}$$
(3)
$${\text{Ca}}{{\text{X}}_2}+2{\text{N}}{{\text{a}}^+} \to {\text{C}}{{\text{a}}^{2+}}+{\text{NaX.}}$$
(4)

To study the effect of ion exchange (Ca + Mg)–(HCO3 + SO4) versus (Na–Cl) (Jankowski and Acworth 1997) were plotted (Fig. 9). If ion exchange was a significant geochemical process for controlling groundwater composition, the relationship between these two parameters would be linear with a negative slope of one (Fisher and Mulican 1997; Singh et al. 2011). As can be seen in Fig. 9, the plot of the samples for the unconfined aquifer has a negative linear trend with a gradient close to one (− 0.9156), which indicated that the ion-exchange process was significant for the unconfined aquifer samples. The gradient for the confined aquifer samples was − 1.42.

Fig. 9
figure 9

Plot of (Ca + Mg)–(HCO3 + SO4) versus Na–Cl

The chloro-alkaline index (CAI) (Schoeller 1977) can be used to determine the type of ion exchange between groundwater and the aquifer material. The negative and positive CAIs represent direct and reverse ion exchanges, respectively (Aghazadeh and Asghari Moghaddam 2011). The source of HCO3 in water can also be found using the CAI. The positive and negative values of CAIs indicate the weathering and dissolution of silicate and carbonate minerals, respectively, as the origin of HCO3 in the groundwater (Chidambaram et al. 2011). Figure 10a shows the CAIs calculated for the samples. The CAIs for 42% of the unconfined aquifer samples were positive, which indicated a reverse ion exchange and weathering and dissolution of silicate minerals as the source of HCO3; 58% of the samples of the unconfined aquifer had negative CAIs that revealed ion exchange and dissolution of carbonate minerals as a source of HCO3. All samples of the confined aquifer had positive CAIs that indicated a reverse ion exchange. The spatial distribution of the CAI (Fig. 10b) showed that ion exchange mainly occurred in the north and southwest of the aquifer; while reverse ion exchange contributed to the chemistry of the central, north-east, and south-east parts of the aquifer. Therefore, the high salinity of these parts could be deduced as occurring from reverse ion exchange.

Fig. 10
figure 10

a Calculated CAI values and b spatial distribution of CAI for the samples of Khoy plain

Evaporation

The semi-arid climatic conditions of the area and shallow groundwater in some parts of the plain (especially the east) suggest that evaporation could affect the groundwater chemistry, especially salinity. Gibbs (1970) diagrams can help identify the dominant process controlling groundwater chemistry (Fig. 11a, b). The Gibbs diagrams indicated that a dominant interaction between the water and formations of the region and a secondary evaporation process (for a few samples of the unconfined aquifer) affected the composition of the ions in the groundwater.

Fig. 11
figure 11

Plot of a Na/(Na + Ca) versus TDS; b Cl/(Cl + HCO3) versus TDS; and c Cl versus Na

To further investigate the effect of the evaporation process on groundwater, Na versus Cl was plotted. Figure 10c confirms that evaporation was one of the factors controlling salinity in groundwater, but it was not a major contributor. The plot of samples above the 1:1 line showed that groundwater contained an excessive Na concentration. If HCO3 was the dominant anion, this excessive Na was mainly derived from silicate weathering (Meybeck 1987; Barzegar et al. 2017a). Given the prevalence of the bicarbonate ion in the groundwater of the Khoy plain according to the Piper diagram, this hypothesis could be correct. In addition, a high correlation between Na and Cl ions (R2 = 0.9029) indicated their common source, and the presence of some of the samples on line 1:1 (Fig. 11c) confirmed the effect of halite dissolution in the groundwater of the Khoy plain. Therefore, it can be deduced that in addition to evaporation, which slightly affected the salinity of groundwater in the area, weathering and dissolution of rocks especially silicates and evaporates and reverse ion exchange played important roles in the elevated concentrations of Na and Cl in the groundwater of the area.

Anthropogenic factors

Human activities including industry and agriculture can affect groundwater quality. The effect of anthropogenic activities (e.g., septic tanks, waste disposal, industrial inputs, etc.) on groundwater chemistry can be studied using the plot of HCO3 versus TC (Kim 2003; Reddy et al. 2012; Barzegar et al. 2016b). If the dissolution of silicates and carbonates was a major process controlling the chemical composition of groundwater, then the ratio between HCO3 and TC would be 1:1 (Barzegar et al. 2016b). In Fig. 12a, sample positions adjacent to the 1:1 line indicated the effect of weathering and dissolution of the minerals on groundwater chemistry; samples positioned far from the 1:1 line revealed the effect of a secondary factor (e.g., anthropogenic activities) on the quality of the groundwater. Some of the samples from both unconfined and confined aquifers were affected by human activities. The effects of agricultural activities and septic tanks on water chemistry would be revealed by a high correlation between TDS and (NO3 + Cl + SO4)/HCO3 (Fig. 12b). (Han and Liu 2004; Jalali 2009; Barzegar et al. 2016b, 2017b). The R2 values of 0.3645 and 0.169 for the samples of unconfined and confined aquifers, respectively, suggested a slight effect of agricultural activities on the groundwater quality of the unconfined aquifer. The presence of a confining layer could be preventing the transfer of NO3 into the confined aquifer.

Fig. 12
figure 12

Plot of a TC versus HCO3 and b (NO3 + Cl + SO4)/HCO3 versus TDS

Hydrogeochemical modeling

Calculations of chemical balance between water and minerals are useful for predicting the source of soluble ions, different geochemical processes, and control of ion concentration in groundwater, such as dissolution, precipitation, and cation exchange. The saturation index (SI) makes it possible to predict the reaction between water and minerals using chemical data, without the need for sampling the solid phase and mineralogical analysis.

Figure 13 shows the SI values of groundwater samples with respect to some minerals, e.g., calcite, dolomite, halite, gypsum, kaolinite, illite, albite, anorthite, K-feldspar, and K-mica and CO2 (g) partial pressure. Groundwater samples were over-saturated with respect to carbonate minerals (e.g., calcite and dolomite) except for samples 19 and 20 from the unconfined aquifer for which the water no longer tended to dissolve these minerals. Increasing the concentrations of Ca and Mg due to reverse cation exchange and dissolution of gypsum and anhydrite caused an over-saturation status for calcite and dolomite and eventually led to the deposition of these minerals (Ahmed et al. 2013). In contrast, the samples of both aquifer types were under-saturated with respect to sulfate (e.g., gypsum and anhydrite), kaolinite, illite, K-mica, and halite minerals; therefore, dissolution of these minerals occurred. Note that the SIs for albite, anorthite, and K-feldspar minerals were both over-saturated and under-saturated.

Fig. 13
figure 13

Calculated saturation indices of some minerals for groundwater of the Khoy plain

The log of calculated CO2 (g) partial pressures ranged between − 0.69 and − 2.84 for the unconfined aquifer samples, and between − 2.64 and − 2.96 for the confined aquifer samples. Although all samples had PCO2 greater than the atmospheric value (i.e., around − 3.5), the confined aquifer samples showed relatively lower values. The presence of CO2 (g) was probably due to biological activity in soils.

The mixing process between the freshwater and mineralized groundwater in the northern and southern parts of the plain was investigated using mixing simulations between samples 21 and 2 and samples 41 and 37. Mixing proportions of the two parent solutions ranged from 10 to 90% of both samples using batch reaction in the PHREEQC, and the results of the mixing calculations are given in Table 3. It was found that 75% of solution 21 and 25% of solution 2 almost matched the composition of sample 45. Although spatially, the distances between mixture and both parent solutions were approximately the same, the proportion of solution 21 was greater than solution 2. For the mixing simulation in the southern part of the plain, sample 40 was similar to the mixing proportion of 90% of solution 41 and 10% of solution 37. The distance between the mixture and parent solution 41 was smaller than that of solution 37, and the proportion of solution 41 was greater. This modeling confirmed the mixing of groundwaters in the plain, as shown in the Piper diagram. The mixing process may lead to disequilibrium states between aquifer minerals and groundwater and dissolution and/or precipitation of secondary minerals, such as calcite, dolomite, and gypsum could occur (Plummer 1975; Wigley and Plummer 1976; Gomis-Yagües et al. 2000; Chae et al. 2012; Garing et al. 2013; Kim et al. 2017).

Table 3 Results of mixing calculations in meq/L using the PHREEQC 3.0 software

Inverse geochemical modeling, widely used to determine the geochemical evolution of groundwater, considers two assumptions. First, the initial and final groundwater sampling points should follow the same flow path (Luo et al. 2008), and second, the hydrochemistry of groundwater is not influenced by the diffusion and mineral phase taken into consideration as these are present in the aquifers under a chemically steady state (Singh et al. 2017).

A total of five flow paths were considered in different parts of the unconfined aquifer based on the geological structure and hydrogeology of the plain. No path was considered for the confined aquifer, because there were not two samples from the confined aquifer in the same flow path. The paths for inverse geochemical modeling are illustrated in Fig. 2 and results of the inverse modeling are given in Table 4. The uncertainty for all the parameters except pH was considered to be 0.01. The uncertainty for the pH was predetermined to be 0.05. Positive and negative phase mole transfers indicated dissolution and precipitation, respectively. For path A, the PHREEQC generated four models through uncertainty coefficient adjustment. In this path, dissolution of calcite, halite, and gypsum occurred and dolomite precipitated for all the models. The solubility of gypsum (2.03–3.12 mol/L) was higher than that of calcite (1.63 × 10−3–2.9 × 10−3 mol/L) and halite (1.67 × 10−4–2.07 × 10−4 mol/L). In addition, weathering and dissolution of biotite (except for model 3) and plagioclase and precipitation of K-feldspar took part in the reaction. The cation-exchange process occurred in this path between Ca and Na, as Ca in the water was adsorbed onto the water-bearing media in exchange for Na originally adsorbed on the media.

Table 4 Results of the inverse geochemical modeling

Along path B, weathering and dissolution of calcite, biotite, and plagioclase and precipitation of dolomite, halite, gypsum, and K-feldspar influenced the groundwater quality. The concentration of dissolved calcite (2.31 × 10−3 mol/L) exceeded the concentrations of the other two minerals in the water. The amount of cation exchange for this path was lower than that for path A. The mole transfer for Ca and Na through the ion-exchange process indicated that this process was significant for path A (9.75 × 10−4 < CaX2 < 1.01 × 10−3 and 1.95 × 10−3 < NaX < 2.02 × 10−3) in comparison with path B (CaX2 = 3.9 × 10− 5 and NaX = 7.81 × 10−5). Therefore, the role of the ion-exchange process was confirmed for elevated values of EC in the northeast of the plain.

For path C (in the northwest of the aquifer), the reactions were completely opposite to path B (in the south of the aquifer) and calcite, biotite, and plagioclase were over-saturated and dolomite, halite, gypsum, and K-feldspar were under-saturated. This could be due to the geological characteristics of the paths in which different processes occurred.

The PHREEQC generated three models for path D. For all these models, calcite, halite, and biotite were precipitated, whereas dolomite, gypsum, and plagioclase were dissolved. In this path, cation exchange was simulated only for model 1. The K-feldspar was over-saturated for models 1 and 3 and under-saturated for model 2.

For path E, two models were simulated through uncertainty coefficient adjustment. In this path, calcite, halite, gypsum, biotite, and plagioclase were dissolved and dolomite and K-feldspar were precipitated. The concentration of dissolved gypsum (1.18 × 10−1 mol/L) exceeded the concentrations of the other four minerals in the water, which was attributed to the presence of gypsum formation in the southwest of the plain. Cation exchange between Ca and Na took part in this path.

Evolution of the recharge area was largely determined by the PCO2 and dissolution of calcite and, if present, dolomite. Infiltrating water equilibrates with soil CO2 and dissolves calcite and dolomite and weathers silicate minerals (Robertson 1992). The results of the inverse geochemical modeling showed that the west of the plain had the highest recharge, where path B had the highest amount of dissolution of calcite and weathering of silicate minerals, e.g., biotite and plagioclase. Note that an artificial recharge was performed in this part of the aquifer.

Compilation of the results of ion ratios and geochemical modeling indicated that the high salinity of the samples in the northeast of the plain was due to high solubility of the minerals (e.g., halite and gypsum) and reverse ion exchange. The role of mineral dissolution was more significant than ion exchange. In contrast, the high salinity of the southeast was mostly attributed to reverse ion exchange and slightly attributed to evaporation. In addition, these parts of the aquifer were the ends of the groundwater flow paths that were enriched in minerals.

Conclusions

Measuring and analyzing hydrogeochemical parameters for 54 groundwater samples from both confined and unconfined aquifers in the Khoy plain, in north western Iran, showed that some parameters (e.g., electrical conductivity and major ions) exceeded WHO permissible values for some samples. The Piper diagram indicated that the majority of the samples from the unconfined aquifer and all of the samples from the confined aquifer had a Ca(Mg)–HCO3 water type. Samples with Na–Cl and mixing water types were mainly located in the discharge zone in the west of the plain. The scatter plot of different ionic ratios showed that different processes and factors may influence the water quality of the area. For the unconfined aquifer, the plots showed that Ca and Mg ions were derived from the weathering and dissolution of carbonate and sulfate minerals and the portion of calcite and gypsum dissolution was approximately the same. For the confined aquifer, all samples showed ion exchange as a potential process for generating Ca and Mg in the groundwater. The Ca/Mg molar ratios indicated that dissolution of calcite and dolomite followed by silicate weathering was the dominant rock–water interactions in the groundwater system and the contribution of the silicate minerals was slight. The ion-exchange process was significant for the unconfined aquifer compared to confined aquifer. The positive chloro-alkaline indices for 42% of the unconfined aquifer samples, mainly in the middle, northeast, and south-east parts of the aquifer indicated reverse ion exchange and weathering and dissolution of silicate minerals as the source of the HCO3; the other 58% of the total samples with negative indices, mainly in the north and southwest of the aquifer, revealed ion exchange and dissolution of carbonate minerals as a source of HCO3. Therefore, it can be stated that the high salinity of these parts may be the result of reverse ion exchange. Moreover, the evaporation, which slightly affected the salinity of groundwater in the area, and weathering and dissolution of rocks (especially silicates and evaporates), played an important role in elevated EC, especially Na and Cl. Although human activities (e.g., agriculture and industry) affected the water quality of both unconfined and confined aquifers, the presence of a confining layer protected the confined aquifer from more contamination. The mixing simulation indicated that mixing between the groundwaters in the plain affected the groundwater quality. A compilation of the results of ion ratios and geochemical modeling confirmed that the high salinity of the samples in the northeast of the plain was due to high solubility of the minerals (e.g., halite and gypsum) and reverse ion exchange. It was concluded that the role of mineral dissolution was more significant than ion exchange. In contrast, the high salinity of the southeast was attributed mostly to reverse ion exchange and slight evaporation. These parts of the aquifer are at the end of the groundwater flow paths, which are enriched with minerals.