Introduction

Water covers about 70% of the Earth’s surface, and while only 3.5% of global water reserves are freshwater, groundwater resources account for 1.7% of this amount (Khatri and Tyagi 2015; Sobhanardakani et al. 2016). Although it seems that global freshwater reserves are large enough to satisfy human needs for consecutive years, the contamination of these resources by different kinds of pollutants, such as heavy metals have been the cause of increasing concern worldwide (Sobhanardakani et al. 2016, 2017; Alizamir and Sobhanardakani 2017a).

Nowadays, about half of the world’s population is utilizing groundwater for purposes, such as drinking, irrigating and performing industrial activities. Therefore, contamination of these resources by trace elements is causing serious problems (Yari and Sobhanardakani 2016; Alizamir and Sobhanardakani 2017a).

It has been shown that both natural processes, such as groundwater velocity, dissolution, and precipitation of minerals, interaction with water aquifers and the quality of recharge waters and anthropogenic activities like urbanization, industrial development, mining, solid waste disposal, and agronomic practices can affect the quality of groundwater resources (Andrade et al. 2008; Devic et al. 2014; Alizamir and Sobhanardakani 2018). Meanwhile, groundwater contamination by toxic heavy metals can occur through direct migration, infiltration recharge from surface water, and interaquifer exchange (Ardani et al. 2015; Sobhanardakani et al. 2016; Alizamir et al. 2017). Although an important specification of most elements in water is their tendency to form hydrolyzed species, some such as As, Cd, Cr, and Pb show a certain tendency to combine combined with inorganic anions notably chlorine, bicarbonate, nitrate, and sulfate and to form complex species (Devic et al. 2014). Of course, it should be noted that many trace elements, such as Fe, Cu, Zn, and Mn play essential functional and structural roles in the biological processes (Ibrahim et al. 2009; Kadi 2009; Devic et al. 2014; Sobhanardakani and Jafari 2014; Hosseini et al. 2015a, b), or trace amounts of Cr(III) and Ni have important roles in the metabolism of macromolecules, the synthesis of red blood cells and the activation of some enzyme systems (Hosseini et al. 2013; Sobhanardakani 2018). However, As, Pb, Cd, and Cr(IV) as carcinogen agents are very toxic to humans and have no possible beneficial effects for living organisms (Kabata-Pendias 2010; Hosseini et al. 2015b; Sabzevari and Sobhanardakani 2018; Sobhanardakani et al. 2018). Therefore, consumption of groundwater with poor quality for drinking or irrigating purposes can cause some adverse effects on human health or may reduce crop productivity (Azizullah et al. 2011; Devic et al. 2014).

Since a large part of Iran is located within the dry regions and about 90% of the required water for drinking, industrial, and agricultural purposes is provided from groundwater resources, groundwater supplies have a vital role in many regions of the country (Sobhanardakani 2016b; Sobhanardakani et al. 2016, 2017; Alizamir and Sobhanardakani 2017b). Moreover, as Hamedan–Bahar Plain is one of the major agricultural regions in Hamedan County especially in terms of wheat and potato production, the excessive use of agricultural inputs, such as metal-containing pesticides, phosphate-based fertilizers, and other organic, and inorganic fertilizers can be considered as the main source of groundwater pollution in the area (Akhavan et al. 2011; Khalijian et al. 2016). Besides, some previous studies (Sobhanardakani et al. 2014a, b, 2017; Sobhanardakani 2016a)—have revealed the probability of contamination of groundwater resources of Hamedan Province (i.e., Razan Plain, Toyserkan Plain, Ghahavand Plain, and Asadabad Plain) with As, Cd, Cr, Cu, Mg, Mn, Pb, and Zn; therefore, since the lack of enough information about the hydrogeochemical characteristics of Hamedan–Bahar Plain, this study was conducted (1) to determine the levels and the temporal and spatial variations of physicochemical properties (T, pH, EC, TDS, and TH), major ions (Ca2+, Cl, HCO3, K+, Mg2+, Na+, NO3, PO43−, and SO42−) and trace elements (As, Cd, Cr, Cu, Fe, Mn, Ni, Pb, and Zn) in groundwater samples from Hamedan–Bahar Plain; (2) to understand the main geochemical processes in the study district; and (3) to identify their sources by hierarchical cluster and principal component analysis (HCA and PCA).

Materials and methods

Study area

The study zone with an area of 536 km2 is situated in Bahar County of Hamedan province, west of Iran. This Plain is located between 48° 17′ and 48° 33′ eastern longitude and 34° 49′ to 35° 02′ northern latitude. Rainfall with an annual average of about 320 mm is the most important supplier of water in this Plain. It should be noted that groundwater supplies are the main sources of water for residents of Hamedan County (Khalijian et al. 2016). Geologically, the study area is located on Sanandaj–Sirjan metamorphic zone with calcareous shale, limestone, and granitic material parent rocks (Akhavan et al. 2011). Although the main portion of the basin is covered by Quaternary sediments and consists mainly of recent conglomerate and alluvium, the oldest deposits contain schist and slate from Jurassic age that outcrop in the southern and eastern parts of the study area. However, the Cretaceous deposits consist of the carbonate series while the thickness of the alluvial sediment varies from 25 to 75 m in the sides to the center of the plain, and sand, clay, gravel, and silt are the main components of Hamedan–Bahar alluvial aquifers. It is also worth mentioning that the transmissivity of the plain ranges from 100 to 1750 m2 day−1, while the specific yield of the aquifer has been estimated to be about 5 to10%. Besides, this aquifer has a hydrogeological affinity with Kabodarahang and Qahavand Plains (Bayatvarkeshi et al. 2018).

Sampling and sample preparation

In this work, a total of 120 groundwater specimens were collected from 20 different semi-deep water wells located in the residential and agricultural regions of the study area in the spring and summer seasons (between 11th and 14th day) using 250 ml high-density PVC bottles that were cleaned with nitric acid and double-distilled water before sampling (ddH2O). The unstable (basic) parameters of the water quality including T, pH, EC, and TDS were determined in situ by multiparameter portable meters (TS 606-G/2-I, WTW, Germany). Then, the bottled samples were kept at a temperature of 4 °C for future analysis (Devic et al. 2014; Yari and Sobhanardakani 2016). Figure 1 shows the sampling sites in the study area.

Fig. 1
figure 1

Location of groundwater sampling stations

After filtering the groundwater specimens by Whatman Filter Paper No. 42, the samples were analyzed based on APHA, AWWA, and WEF (Rice et al. 2017). The precision of the method for all determined variables was satisfactory. The blank samples were analyzed and the accuracy of the methods was checked based on the methods described by Devic et al. (2014). The results indicated no inherent bias in the method of analysis of all the measured parameters since the total analytical error rate of 5.2% observed in the current study was within the range of 3.7–9.5%.

Assessing hydrogeochemical processes and water quality

In the current study, to evaluate the geochemical processes and the groundwater quality and the chemistry of the study area the TH, KR, magnesium adsorption ratio (MAR) or MH, PI, RSC, SAR, SSP, or Na% and CAI-1 and CAI-2 parameters/indices were computed as follows:

Although no adverse effects have been reported for the short-term consumption of hard water on human health so far, the incidence of anencephaly, cardiovascular disorders, urolithiasis, and some types of cancer have been associated with the long-term use of very hard water. The literature review shows that the high TH value might lead to encrustation on the water distribution systems and can increase the boiling point of water and also prevent the formation of soapsuds (Singh et al. 2008).

The total hardness (mg L−1) was measured using Eq. 1 (Ragunath 1987; Islam et al. 2017):

$${\text{TH }} = { 2}. 4 9 7 {\text{ Ca}}^{ 2+ } + 4.115\;{\text{Mg}}^{2 + }$$
(1)

The TH falls under four ranges: Class I (TH < 75) and class II (75 < TH < 150) indicate that waters are classified as soft and moderate hard for drinking consumption, while class III (150 < TH < 300) and class IV (TH > 300) denote the hard and very hard drinking water (Ramesh and Elango 2012).

To classify water as suitable for irrigation, based on Kellys ratio (Eq. 2), Na+ needs to be measured against Mg2+ and Ca2+ (Kelly 1957). Here, a KR less than 1 indicates that groundwater is suitable for irrigation, while the values more than 1 indicate an excess content of sodium in water. Also, the index value of more than 3 indicates that water is unsuitable for such purposes (Kelly 1963; Ramesh and Elango 2012; Islam et al. 2017).

$${\text{KR }} = {\text{ Na}}^{ + } /\left( {{\text{Ca}}^{ 2+ } + {\text{ Mg}}^{ 2+ } } \right)$$
(2)

The alkaline soil and the subsequent decrease in crop yields are known as the consequences of excess amounts of magnesium in groundwater. The magnesium hazard was computed in accordance with Eq. 3 (Ragunath 1987):

$${\text{MH }} = \, ({\text{Mg}}^{ 2+ } \times 100)/\left( {{\text{Ca}}^{ 2+ } + {\text{ Mg}}^{ 2+ } } \right)$$
(3)

Magnesium hazard more than 50 indicates that water quality is unsuitable and harmful for irrigation (Singh et al. 2008; Ramesh and Elango 2012).

As the long-term irrigation of soil may affect its permeability through influence on the contents of calcium, sodium, magnesium and bicarbonate contents, classification of irrigation waters was performed based on the PI under three classes, i.e., class I (> 75%), class II (25-75%) and class III (< 25%) (Doneen 1964). This index was computed in accordance with Eq. 4 (Doneen 1964):

$${\text{PI }} = \, [({\text{Na}}^{ + } + \, \surd {\text{HCO}}_{ 3}^{ - } )/({\text{Ca}}^{ 2+ } + {\text{ Mg}}^{ 2+ } + {\text{Na}}^{ + } )] \times 100$$
(4)

Here, class I and class II waters with ≥ 75% of maximum permeability are classified as good for irrigation use, while, class III water with 25% of maximum permeability is unsuitable for irrigation.

At the meantime, the RSC index was measured to evaluate the effects of HCO3 and CO32− on the quality of water for agronomic activities. This parameter was computed using Eq. 5 (Eaton 1950; Rao et al. 2012):

$${\text{RSC }} = \, \left( {{\text{CO}}_{ 3}^{ 2- } + {\text{ HCO}}_{ 3}^{ - } } \right){-}({\text{Ca}}^{ 2+ } + {\text{ Mg}}^{ 2+ } )$$
(5)

Here, RSC < 1.25 indicates that the water supplies are safe for agronomic practices; whereas, RSC > 2.5 indicates that waters are unsuitable (Ramesh and Elango 2012).

Moreover, SAR index was used to assess the sodium or alkali hazard of the irrigation water for crops (Bhuiyan et al. 2015; Islam et al. 2017). In this regard, if water specimens are low in calcium and high in sodium, the soil structure may be destroyed due to the saturation of the ion exchange complex with sodium (Ramesh and Elango 2012). In the present study, this parameter was estimated using Eq. 6 based on the relative proportion of Na+ to Mg2+ and Ca2+ (Alrajhi et al. 2015);

$${\text{SAR }} = {\text{ Na}}^{ + } /\left[ {\surd \left( {{\text{Ca}}^{ 2+ } + {\text{ Mg}}^{ 2+ } / 2} \right)} \right]$$
(6)

Sodium adsorption ratio values are categorized between excellent (SAR < 10) and unsuitable (SAR > 26). Also, the groundwater supplies quality is classified as good and doubtful if SAR values fall between 10 and 18, and between 18 and 26, respectively (Ramesh and Elango 2012).

In assessing the Na+ or salts hazard on the growth rate of the plants, soil structure, aeration, and permeability, the SSP parameter is considered as a very important parameter in classifying irrigation waters (Todd 1980). The percentage of Na (Na %) in groundwater specimens is calculated in accordance with Eq. 7:

$${\text{Na}}\% \, = \, [({\text{Na}}^{ + } + {\text{ K}}^{ + } )/({\text{Ca}}^{ 2+ } + {\text{ Mg}}^{ 2+ } + {\text{Na}}^{ + } + {\text{ K}}^{ + } )] \times 100$$
(7)

Soluble sodium percentage values may fall between excellent (SSP < 20) and unsuitable (SSP > 80). Also, the quality of groundwater supplies is considered as good if the SSP value falls between 20 and 40, as permissible if it is between 40 and 60 and as doubtful if the value is between 60 and 80 (Ramesh and Elango 2012).

Besides, Schoeller indices (CAI-1 and CAI-2) were measured to survey a possible ion-exchange among the aquifer materials and the groundwater supplies during the movement and residence time. These indices were computed in accordance to Eqs. 8 and 9 (Marghade et al. 2012; Sako et al. 2018).

$${\text{CAI-1}} = \, [{\text{Cl}}^{ - } - \, \left( {{\text{Na}}^{ + } + {\text{ K}}^{ + } } \right)/{\text{Cl}}^{ - } ]$$
(8)
$${\text{CAI-2}} = \, [{\text{Cl}}^{ - } - \, \left( {{\text{Na}}^{ + } + {\text{ K}}^{ + } } \right)/\left( {{\text{HCO}}_{ 3}^{ - } + {\text{ SO}}_{ 4}^{ 2} + {\text{ CO}}_{ 3}^{ 2- } + {\text{ NO3}}^{ - } )} \right]$$
(9)

Here, if these indices have negative values, it can be concluded that potassium or/and sodium have been released in the groundwater resources and magnesium and calcium have been adsorbed onto the aquifer materials. With the same token, the positive values of both indices indicate that alkalis have been retained by the aquifer materials and alkaline earth ions (i.e., Mg2+ and Ca2+) have been released in the groundwater (Sako et al. 2018).

In Eqs. 2 to 9, the contents of Ca2+, Cl, CO32−, HCO3, K+, Mg2+, Na+, NO3, and SO42− ions in water samples are in meq L−1.

Statistical analysis and chemometric methods

In this study, the SPSS software, version 19.0 was used for statistical analyses. Mean and standard deviations of values or contents of all the measured parameters were computed for every sampling site. The Kolmogorov–Smirnov (K–S) test was used to assess the normality of the data. Correlations between variable groups including physicochemical properties, major cations and anions and also trace elements contents between groundwater specimens were calculated using Pearson’s correlation coefficient (PCC). Furthermore, to differentiate among the different groups for all the measured parameters, factor analysis (FA, using PCA) and HCA were run. At the same time, the ionic ratios were computed to determine the origin of groundwater salts and to identify the active chemical reactions in the aquifer.

Results and discussion

General hydrochemistry and hydrochemical facies

The quality of groundwater determines its suitability for different purposes, such as drinking and irrigating depending upon the specific standards (Ramesh and Elango 2012). The values of all the studied variables of the groundwater samples obtained from Hamedan–Bahar Plain in the sampling periods in 2018 are illustrated in Tables 1 and 2, and also S1 and S2 (Supplementary materials), respectively. Kolmogorov–Smirnov (K–S) test confirmed the normal distribution of the data for spring and summer seasons. The median, minimum, and maximum levels and lower and upper quartile of all the analyzed variables in both seasons are presented in the box-whisker plot diagram (Figs. S1 and S2, Supplementary materials). Based on the results, among various analyzed parameters, temperature was detected in amounts ranging from 21.80 to 29.60 with a mean value of 25.0 in the spring season and between 20.40 °C and 28.70 °C with a mean value of 25.21 °C in the summer season. The pH values of the specimens collected in the spring season varied between 6.90 and 8.50 with an average value of 7.62; while, for the groundwater samples collected in the summer season it fell between 6.40 and 8.30 with an average value of 7.51. These pH values indicated that groundwater specimens of Hamedan–Bahar Plain were slightly alkaline in the sampling periods.

Table 1 Analyzed variables value of the studied specimens from Hamedan–Bahar Plain in the spring season
Table 2 Analyzed variables value of the studied specimens from Hamedan–Bahar Plain in the summer season

The ionic types and contents and temperature are known as the main parameters that can affect electrical conductivity (EC) (Islam et al. 2017). Electrical conductivity values (µs cm−1) of the groundwater samples were detected in amounts ranging from 453 to 1450 with an average value of 1029 in the spring season and from 545 to 1553 with an average value of 1091 in the summer season. TDS values (mg L−1) of the groundwater samples were detected in amounts ranging from 294 to 942 with an average value of 666 in the spring season and from 354 to 1009 with an average value of 710 in the summer season. Accordingly, since TDS values (mg L−1) within the range of 0 to 1000 are known as freshwater (Fetter 2001), more than 95% of the groundwater specimens in Hamedan–Bahar Plain fell in this group. Hardness criterion was computed to determine groundwater suitability for different kinds of applications, especially industrial, agricultural, and domestic uses. TH values (mg L−1) of the groundwater samples were detected in amounts ranging from 120.32 to 514.56 with a mean value of 287.83 in the spring season and from 320.43 to 699.75 with a mean value of 494.50 in the summer season. The classification of the studied water specimens based on this parameter indicated that 10%, 50%, and 40% of specimens would fall under the moderately hard, hard, and very hard category, respectively, in the spring season (Table 3), while, in the summer season, all the groundwater samples (100%) would be classified as very hard (Table 4).

Table 3 Hydrogeochemical classification of groundwater resources of Hamedan–Bahar Plain in the spring season
Table 4 Hydrogeochemical classification of groundwater resources of Hamedan–Bahar Plain in the summer season

The cation contents of (mg L−1) of the groundwater samples reflected nearly wide ranges in both seasons. In this regard, Mg values were detected in amounts ranging from 11.40 to 57.60 with a mean value of 27.84 in the spring season from 12.60 to 75.0 with a mean value of 41.89 in the summer season. Calcium values were detected in amounts ranging from 25.60 to 142.0 with a mean value of 70.74 in the spring season and from 78.30 to 224.0 with a mean value of 129 in the summer season. Sodium values were detected in amounts ranging from 8.70 to 47.40 with an average value of 20.50 in the spring season, while, potassium values changed from 3.25 to 13.49 with an average value of 7.83 in the spring season; whereas, in the summer season, sodium values were detected in amounts ranging from 8.90 to 59.80 with a mean value of 25.27, while, K values found to vary between 4.27 and 15.07 with a mean value of 9.0. On the other hand, contents of others cations in the spring season were detected in amounts ranging from 0.20 to 11.38 with a mean value of 5.08 for As, from 0.03 to 0.92 with an average value of 0.26 for Cd, from 0.29 to 1.87 with an average value of 1.05 for Cr, from 0.19 to 5.52 with an average value of 2.72 for Cu, from 0.51 to 3.18 with an average value of 1.51 for Fe, from 0.14 to 1.59 with an average value of 0.49 for Mn, from 0.04 to 3.38 with an average value of 1.54 for Ni, from 2.46 to 13.57 with an average value of 7.48 for Pb and from 0.45 to 6.10 with an average value of 1.75 for Zn. Meanwhile, As was detected in amounts ranging from 16.47 to 26.25 with an average value of 20.65, Cd varied from 0.10 to 0.44 with an average value of 0.22, Cr varied from 0.50 to 1.86 with an average value of 0.95, Cu varied from 4.37 to 12.55 with an average value of 7.12, Fe varied from 0.87 to 1.93 with an average value of 1.34, Mn varied from 0.18 to 1.02 with an average value of 0.49, Ni varied from 0.17 to 3.94 with an average value of 1.29, Pb varied from 3.29 to 15.39 with an average value of 8.22 and Zn varied from 0.63 to 7.30 with an average value of 2.08 in the summer season. Based on the results, Ca was found to be the dominant cation in the groundwater with about 48% and 52% of the total amounts of analyzed cations in the spring and summer seasons, respectively. The cationic trend of the groundwater samples of study area in the spring season was Ca > Mg > Na > K > Pb > As > Cu > Zn > Ni > Fe > Cr > Mn > Cd, while, in the summer season it was Ca > Mg > Na > As > K > Pb > Cu > Zn > Fe > Ni > Cr > Mn > Cd.

On the other hand, the contents of anions (mg L−1) of the groundwater samples were detected in amounts ranging from 1.86 to 12.75 with an average value of 6.53 for SO4, from 175 to 485 with an average value of 275.85 for HCO3, from 0.11 to 0.24 with an average value of 0.17 for Cl, from 0.05 to 0.21 with an average value of 0.13 for PO4 and from 16.10 to 45.60 with an average value of 27.96 for NO3. Herein, SO4 were detected in amounts ranging from 3.14 to 13.64 with an average value of 7.87, HCO3 varied from 240 to 530 with an average value of 367.25, Cl varied from 0.13 to 0.23 with an average value of 0.18, PO4 varied from 0.08 to 0.24 with an average value of 0.16 and NO3 varied from 25.30 to 51.70 with an average value of 41.22. Based on the results, HCO3 was detected as the dominant anion in the groundwater with about 88% of the total amounts of the analyzed anions in both seasons. The trend of the anionic contents of the groundwater samples of the study area in both seasons was HCO3 > NO3 > SO4 > Cl > PO4.

In the spring season, pH with 2.62% had the lowest coefficient of variability (CV) followed by T, Cl, Pb, NO3, HCO3, EC, TDS, PO4, Fe, Cr, K, TH, Cu, As, Ca, Ni, Mg, Cd, Mn, Na, SO4, and Zn (9.08, 11.76, 19.52, 21.92, 25.41, 27.16, 27.46, 30.77, 31.79, 32.38, 35.89, 36.38, 38.60, 39.57, 39.86, 40.91, 41.45, 46.15, 46.94, 47.71, 48.39, and 76.57%, respectively). The results indicated that Zn had the greatest variation among the groundwater samples and thus would have the highest possibility of being influenced by the natural mineral pollution notably soil weathering (Simeonov et al. 2003; Singh et al. 2005; Papaioannou et al. 2010; Devic et al. 2014), or it might be related to extrinsic factors specially the use of micronutrient fertilizers in agronomic practices (Westfall et al. 2005). Also, CV value of pH suggested that this parameter had a weak variation and its value was almost constant across the study area. However, in the summer season, pH with 3.86% had the lowest CV followed by Cl, As, T, Pb, Fe, NO3, Cu, PO4, Cr, HCO3, TH, Ca, Cd, TDS, EC, K, Mg, SO4, Na, Mn, Ni, and Zn (5.55, 7.89, 8.33, 16.06, 16.42, 17.25, 18.54, 18.75, 18.95, 20.48, 22.10, 25.46, 27.27, 27.84, 27.91, 32.67, 37.38, 39.64, 43.53, 48.98, 51.16, and 65.86%, respectively). Similar to the spring season, zinc had the greatest variation among the groundwater samples and thus would have the highest possibility of being influenced by the natural mineral pollution or by the use of micronutrient fertilizers in agronomic activities in the study area. Also, CV value of pH suggested that this parameter had weak variation and its value was almost constant across the study area.

The data in Tables 1 and 2 showed that the mean contents of EC, Mg, Ca, Na, K, SO4, HCO3, Cl, PO4, NO3, As, Cd, Cr, Cu, Fe, Mn, Ni, Pb, and Zn of the groundwater samples in the spring season were lower than the maximum permissible limit (MPL) established by the World Health Organization (World Health Organization 2011), while except for Ca and As, the mean values of all the above-mentioned parameters in the summer season were lower than MPL. The previous studies on the groundwater specimens of Hamedan Province showed that the mean values of As, Cu, Pb, and Zn in the specimens collected from Ghahavand Plain in the spring and summer seasons were significantly lower than MPL (Sobhanardakani 2016b). Meanwhile, the average values of As, Cd, Cr, Cu, Mn, Pb, and Zn in groundwater samples of Razan Plain in the spring and summer seasons were reported far below MPL (Sobhanardakani 2016b). Also, Sobhanardakani et al. (2017) reported that the average values of As, Cu, Pb, and Zn in specimens collected from Toyserkan Plain in the spring and summer seasons were lower than MPL. However, the mean values of As (52.53 µg L−1), Cd (4.48 µg L−1) and Pb (10.10 µg L−1) of the specimens of Asadabad Plain in the spring season and also the contents (µg L−1) of As and Cd with an average value of 57.60 and 4.57 in the summer season were reported to exceed far beyond MPL (Sobhanardakani et al. 2016).

The mean pH values of the samples in the both seasons were within MPL of 6.5 to 8.5 established by WHO; whereas, the majority of the specimens notably in the spring season had temperature values within MPL. Furthermore, the mean contents of TDS in 80% of the groundwater samples during both seasons greatly exceeded MPL (500 mg L−1), while, TH values were greatly above MPL (200 mg L−1) in 90% and 100% of the specimens during the spring and summer seasons, respectively. Also, calcium and As contents in 100% of the groundwater samples during the summer season were significantly higher than the permissible limit (75 mg L−1 and 10 µg L−1, respectively) being. However, in the spring season, only the mean contents of Ca collected from sites No. 8, 9, 10, 13, 14, 15, 16, and 17, and the mean contents of As collected from site No. 2 were higher than MPL. In this regard, an increase in the mean contents of arsenic in groundwater samples collected in the summer season can be attributed to the intensive agricultural practices notably the overuse of agricultural inputs, including agricultural chemicals (metal-containing pesticides). Similarly, according to Devic et al. (2014) and Sobhanardakani et al. (2016) an increase in the average values of arsenic in the groundwater samples of the Autonomous Province of Serbia and Asadabad Plain of Hamedan Province (Iran) can be related to anthropogenic activities specially the overuse of agricultural chemicals (metal-containing pesticides).

In the current study, the values of main cations and anions of the groundwater samples of both seasons were plotted by Piper diagram (Figs. S3 and S4, Supplementary materials) with the aim of identifying the hydrochemical facies in order to provide information about changes in the groundwater quality within and between aquifers and also to classify the water types. Also, as shown in Figures S5 and S6 (Supplementary materials), the major ion content of the groundwater samples was evaluated using Schoeller diagrams (Schoeller 1977; Wen et al. 2005; Sivasubramanian et al. 2013). Based on the results obtained, in both studied seasons Ca–Mg–Cl and Na–Cl–HCO3 were the predominant facies water type. It implied that calcium and bicarbonate were the dominant cation and anion, respectively.

Groundwater samples salinity

Salinity is used to describe the contents of different salts notably NaCl, CaSO4, MgSO4, and also bicarbonates. Although the values of Cl and Na are directly proportional to salinity, there are some small amounts of other ions, such as Mg, K, NO3, and SO4 that may affect groundwater salinity. TDS is another important parameter that can be used for assessing groundwater salinity (Islam et al. 2017). The plotting of sodium and chlorine versus TDS showed that there was not a significant correlation between these ions and TDS in both studied seasons (Figs. S7a,b and S8a,b, Supplementary materials). The classification of groundwater based on TDS (World Health Organization 2004), indicated that in the samples of the spring season, 30% could be classified as good, 60% as fair, and 10% as poor (Table 4). Meanwhile, a similar classification was observed for TDS with a slight change for the winter season (Table 5). Also, all other components, i.e., sodium, calcium, magnesium, and potassium reflected weak correlations with chlorine in both seasons indicating that originated from different sources (Figs. S7c–f and S8c-f, Supplementary materials).

Table 5 Factor analysis of 23 physicochemical parameters in the studied specimens of Hamedan–Bahar Plain in the spring season

Correlation coefficient analysis

The correlation matrix for the 23 variables of the studied specimens during the sampling periods is shown in Table S3 (Supplementary materials). As shown in the table, strong positive correlations were observed between EC and TDS (r = 997), between TH and Mg, Ca and HCO3 (r = 0.831, 0.927 and 0.714, respectively), between Mg and HCO3 (r = 0.727), between Na and Zn (r = 0.594), between Ca and HCO3 (r = 0.572), between Cd and Mn (r = 0.649) and between Fe and Ni (r = 0.609), which suggests that these ions may have a similar origin especially geogenic origin and mobility for metals (Haloi and Sarma 2012). Besides, the strong positive correlations between the values of the above-mentioned parameters may have been due to increases in the conductivity simultaneous to increases in the ionic contents or due to the geochemical behavior during ionic mobilization, or because of the weathering of silicate lithology. Herein, the results obtained are in agreement with the data reported in the literature (Eid Al-Ahmadi 2013; Loganathan and Jafar Ahamed 2017).

Also, a positive correlation was found between Mg and Ca (r = 0.561) and PO4 (r = 0.498). Furthermore, while positive correlations were observed between Cd and Cr, Mn and Zn, and Ni and Zn, correlations between the following qualitative parameters were negative: Na and SO4, Cl and PO4, Cr and Cu, EC and Fe, TDS and Fe, EC and Ni, TDS and Ni. Moreover, Cd had negative correlations with EC, TDS, TH, Ca, PO4 and Cu, and Mn had negative correlations with TH, Ca, and Fe. Zinc also reflected negative correlations with EC, TDS, and Pb.

The data in Table S3 indicate strong positive correlations between EC and TDS (r = 1.000, between TH and Mg (r = 0.665), between EC and Ca (r = 0.603), between TDS and Ca (r = 0.603), between TH and Ca (r = 0.810), between TH and HCO3 (r = 0.818), between Mg and HCO3 (r = 0.774), and between Mn and Ni (r = 0.703). It can imply that these ions have a similar origin. Here, strong negative correlations were observed between Ca and Cd (r = − 0.568) and between Fe and Zn (r = −0675). Furthermore, there were positive correlations between EC and TH, TDS, and TH, Ca and HCO3, Ca and NO3, SO4 and NO3, Cd and Ni, pH and Pb, Cu and Pb, Cd and Zn, and Mn and Zn. Nevertheless, Cd was negatively correlated with EC, TDS, and Fe. Also, negative correlations were found between pH and Cl, Cl, and Cr, TH and Zn, Ca and Zn, and HCO3 and Zn. It should be noted that no significant correlations were observed between other parameters suggesting that the contamination sources of these parameters were different in the wells.

Kelley’s ratio

Based on the results, KR (meq L−1) varied from 0.04 to 0.37 with an average of 0.17 in the spring season (Table S1, Supplementary materials) and from 0.05 to 0.29 with an average of 0.12 in the summer season (Table S2, Supplementary materials) and in both seasons 100% of groundwater samples obtained from Hamedan–Bahar Plain were suitable for drinking or irrigating purposes based on Kelley’s ratio categories (Tables 3 and 4).

Magnesium hazard

According to Ayers and Westcot (1985), infiltration is a problem caused by high amounts of magnesium in the soil (Ayers and Westcot 1985). In the analyzed specimens of the spring season, MH varied between 25.58 and 52.65 meq L−1 with an average value of 39.61 meq L−1 (Table S1, Supplementary materials) and between 15.03 and 46.24 meq L−1 with a mean value of 35.11 meq L−1 in the summer season (Table S2, Supplementary materials). Also, 80% and 100% of the water samples were suitable for irrigation purposes in terms of MH in the spring and summer seasons, respectively (Tables 3, 4).

Permeability index

As shown in Tables S1 and S2 (Supplementary materials), PI (%) ranged between 26.52 and 78.07 with a mean value of 48.76 in the spring season and between 24.96 and 46.88 with a mean value of 32.91 in the summer season. Also, 100% and 95% of groundwater samples of the spring and summer seasons, respectively, were classified as good for irrigation purposes (Tables 3, 4).

Residual sodium carbonate

In the present study, the computed values of RSC (meq L−1) of the specimens in the spring season ranged from − 4.49 to 0.91 with an average of − 1.27 (Table S1, Supplementary materials) and ranged from − 6.28 to − 1.19 with an average of − 3.92 in the summer season (Table S2, Supplementary materials), which indicated that all the groundwater samples of both seasons were safe for agricultural practices notably for irrigation purposes (Tables 3, 4). Negative values of RSC in 80% and 100% of the groundwater samples of the spring and summer seasons, respectively, indicated that sodium buildup was unlikely to have been due to sufficient values of main cations, i.e., magnesium and calcium that were in excess of what could be precipitated as bicarbonate (Ramesh and Elango 2012).

Alkali and salinity hazard

Based on the results, the computed values of SAR (meq L−1) in the studied specimens of the spring season varied between 0.19 and 1.09 (Table S1, Supplementary materials), while, in the summer season they ranged between 0.24 and 1.11 (Table S2, Supplementary materials) which made them suitable and/or excellent for irrigation purposes (Vasanthavigar et al. 2010; Ayuba et al. 2013). Therefore, there were no concerns about the development of alkaline soil and the need for soil amendments due to the loss of soil structure and the decrease in the permeability of the soil to water in the study area; hence, the risk of sodium hazard on plant growth and crop production would also be eliminated (Chandrasekar et al. 2013; Islam et al. 2017). The results obtained showed that all the groundwater samples in both seasons would fall in the suitable category (Tables 3, 4). It has been shown that the leaching from topsoil, weathering of rocks, minor influence on the climate, and the anthropogenic sources are among the main factors that can affect the salinity of groundwater supplies (Prasanna et al. 2011; Islam et al. 2017).

Soluble sodium percentage

The content of Na, as the main cation in irrigation, plays an important role in measuring the soil permeability. It has been reported that excessive amounts of this cation can destroy the soil structure and may consequently decrease crop yields (Srinivasamoorthy et al. 2005; Islam et al. 2017). On the other hand, the presence of sodium salts could lead to osmotic effects in the soil–plant system (Saleh et al. 1999; Ramesh and Elango 2012). According to Wilcox (1948), Na% is an important parameter in evaluating the water suitability for agronomic practices (Wilcox 1948). In this regard, Wilcox (1955) suggested that a maximum of 15% of sodium in groundwater resources would be permitted for agronomic purposes (Islam et al. 2017). The Na% of the groundwater samples of the spring season varied between 5.75% and 29.28%, with a mean value of 16.85% (Table S1, Supplementary materials). Also, Na% in the summer season ranged between 7.07% and 24.14%, with an average of 12.14% (Table S2, Supplementary materials). As shown in Table 3, based on Wilcox’s (1955) classification, 65% of the groundwater specimens of the spring season were classified as excellent and remaining 35% of the samples were classified as good, while, based on the Eaton’s (1950) classification, 100% of samples were classified as safe; whereas, in the summer season, 90% of the groundwater samples fell in the excellent category, and the remaining 10% of the samples were classified as good (Table 4).

The chloro-alkaline indices

Since both chloro-alkaline indices of the studied specimens in the spring and summer seasons were negative (Tables S1 and S2, Supplementary materials), it was concluded that calcium and magnesium ions had been adsorbed onto the aquifer materials and sodium and/or potassium had been released in the groundwater, for example, due to the reverse ion exchange. The linear plot between (Na+ K) - Cl and (Ca + Mg) - (SO4+ HCO3) showed a weak relationship with R2 value of 0.004 and 0.018 for the spring and summer seasons, respectively, and also a slope of – 0.226 and – 0.373 of the groundwater samples of the spring and summer seasons, respectively (Fig. S9, Supplementary materials). This is far from the theoretical correlation (i.e. R2 > 90%) coefficient and slope of about − 1 (Wen et al. 2005; Yidana and Yidana 2010). Therefore, these findings could suggest that the distribution of calcium, magnesium, sulfate, and carbonate in groundwater resources had been just under the influence of chemical weathering as an important hydrogeochemical process. As a result, the abundance of the mentioned ions in the studied specimens could be a function of carbonate mineral distribution in the host aquifer materials. Similar results have also been reported by assessing groundwater quality of northwestern Burkina Faso (Sako et al. 2018).

Multivariate structure, cluster and factor analysis

The dendrogram for the 23 analyzed variables of the groundwater samples in the spring and summer seasons are presented in Figs. 2 and 3, respectively as follows:

Fig. 2
figure 2

Hierarchical dendrogram for the 23 variables of groundwater samples of the spring season

Fig. 3
figure 3

Hierarchical dendrogram for the 23 variables of groundwater samples of the summer season

Based on Fig. 2:

Cluster 1: T, pH, Mg, Ca, Na, K, SO4, Cl, PO4, NO3, As, Cd, Cr, Cu, Fe, Mn, Ni, Pb, and Zn.

Subcluster 1.1: T, Mg, Na, K, SO4, Cl, PO4, NO3, As, Cd, Cr, Cu, Fe, Mn, Ni, Pb, and Zn.

Subcluster 1.2: Ca.

Subcluster 1.3: pH.

Cluster 2: EC.

Cluster 3: TDS.

Cluster 4: TH and HCO3.

Based on Fig. 3:

Cluster 1: T, pH, Mg, Ca, Na, K, SO4, Cl, PO4, NO3, As, Cd, Cr, Cu, Fe, Mn, Ni, Pb, and Zn.

Subcluster 1.1: T, Na, K, SO4, Cl, PO4, As, Cd, Cr, Cu, Fe, Mn, Ni, Pb, and Zn.

Subcluster 1.2: Mg and NO3.

Subcluster 1.3: Ca.

Cluster 2: EC.

Cluster 3: TDS.

Cluster 4: TH and HCO3.

As shown in Figs. 2 and 3, it can be admitted that there was a stronger relationship between T and pH with other variables, such as Mg, Ca, Na, K, PO4, NO3 and the trace elements than with EC, TDS, TH, and HCO3.

To assess the spatial trends of the groundwater-quality data, cluster analysis was performed. The results suggested that all the 20 sampling stations in both seasons could be grouped into four statistically significant clusters (Figs. 4, 5) with the sites falling in the same groups having similar characteristic features in terms of the origin and natural background of qualitative variables. In the spring season, cluster 1 (Sites 1, 5, and 8), cluster 2 (Sites 2–4, 6, 7, 11, and 20), cluster 3 (Site 9), and cluster 4 (Sites 10 and 12–19) were designated as relatively low, moderate and high polluted areas, respectively (Fig. 4). Meanwhile, in the summer season, cluster 1 (Sites 1, 7, 8, and 9), cluster 2 (Sites 2–6 and 11), cluster 3 (Sites 10, 12, and 14–16), and cluster 4 (Sites 13, 19, and 20) were identified as relatively low, moderate and polluted areas, respectively (Fig. 5).

Fig. 4
figure 4

Hierarchical dendrogram of spatial clustering of sampling stations of groundwater in the spring season

Fig. 5
figure 5

Hierarchical dendrogram of spatial clustering of sampling stations of groundwater in the summer season

In this study, all the assessed variables were also input for factor analysis (FA). Following FA, PCA was applied to survey the qualitative parameters of the groundwater which confirmed the most useful variables (Acikel and Ekmekci 2018). The PCA of the 23 physicochemical parameters in the studied specimens of Hamedan–Bahar Plain in the spring and summer seasons and the loaded plot of the analyzed elements in both seasons are summarized in Tables 5 and 6 and Figs S10 and S11 (Supplementary materials), respectively. Based on the results, eight factors explain 83.33% and 86.58% of all the data variation for both sampling periods, respectively. Also, factors with different loadings showed that the chemical compositions in the groundwater resulted from different sources.

Table 6 Factor analysis of 23 physicochemical parameters in the studied specimens of Hamedan–Bahar Plain in the summer season

In the spring season, factor, F1, which accounted for 15.75% of the data variation, showed significant strong positive loadings between EC, TDS, and TH, which could be related to the mineral components of the groundwater supplies. Factor, F2, which explained for 14.32% of all the data variation, reflected significant strong positive loadings between temperature and Pb, which could be related to the anthropogenic sources notably agricultural practices. The next factor, F3, indicated high positive loadings between Mg and HCO3 and accounted for 12.74% of all the data variation. This indicated that Mg and HCO3 had a similar origin. In this regard, the presence of ions in the groundwater samples could be related to natural processes. Factor F4, which accounted for 9.23% of all the data variation, was described by negative relationships among the Cr and Cu. The fifth PC, F5, and also factor F6, had high positive loadings with Cl and Ni, respectively, representing 9.03% and 8.59% of all the data variation. Factor F7, which explained 7.60% of the total variance, was highly loaded with NO3. Meanwhile, the eighth factor had a significant positive correlation with As (6.06% of all the total variation), which may be related to the application of metal-containing pesticides (Devic et al. 2014; Sobhanardakani et al. 2016).

In the summer season, factor, F1, which accounted for 14.58% of the all data variation, could be described as strong positive loadings between EC and TDS, which similar to the spring season could be attributed to the mineral components or natural sources. Factor, F2, which accounted for 13.65% of all the data variation, was highly loaded with TH. The next factor, F3, had high loadings for pH and Cr both of which reflected negative relationships with Cl (11.23% of the total data variation). Factor F4, which explained for 10.90% of all the data variation, was described by strong positive loadings on SO4 and NO3. Therefore, it could be concluded that these anions had a similar source in the groundwater system. The fifth PC, F5, with highly positive loadings with As, represented 9.49% of the total data variation, and might be related to the application of metal-containing pesticides (Devic et al. 2014; Sobhanardakani et al. 2016). Also, factor F6, which explained for 9.19% of the data variation, had highly positive loadings on Cu and Pb. Factor F7, which explained for 9.04% of the total data variation, had high loadings for PO4 and reflected strong negative correlations with Mn and Ni. Meanwhile, the eighth factor had a strong positive correlation with K (8.51% of all the data variation).

Conclusions

The current study was conducted to determine the contents and temporal and spatial variations of some physicochemical properties, major ions, and trace elements in the groundwater samples from Hamedan–Bahar Plain to identify the major geochemical process in the study region and also to determine their sources by HCA and PCA. In so doing, a total of 120 specimens were collected from 20 selected semi-deep wells in the spring and summer seasons. The cationic trend of the specimens in the spring season was Ca > Mg > Na > K > Pb > As > Cu > Zn > Ni > Fe > Cr > Mn > Cd, while that in the summer season was Ca > Mg > Na > As > K > Pb > Cu > Zn > Fe > Ni > Cr > Mn > Cd. Also, the trend of anionic contents of the groundwater samples of the study area in both seasons was HCO3 > NO3 > SO4 > Cl > PO4. The classification of the groundwater samples based on the TDS indicates that in both seasons the majority of the samples (60%) fall in the fair category. Also, based on the results of the computed indices, including KR, MH, PI, RSC, SAR, and SSP, the specimens are suitable for drinking or irrigation purposes. Meanwhile, the CAI-1 and CAI-2 values show that magnesium and calcium ions are adsorbed onto the aquifer materials and Na and/or K are released in the groundwater probably from the reverse ion exchange. Here, the results of these indices suggest that chemical weathering is the important hydrogeochemical process that can control calcium, magnesium, sulfate, and carbonate distribution in the groundwater supplies. The results indicate that in both studied periods, Ca–Mg–Cl and Na–Cl–HCO3 are the predominant facies water type, implying that calcium, and bicarbonate are the dominant cation and anion, respectively.