Introduction

The water–energy nexus assessment framework is a recently used type of systemic approach that highlights the linkages between water and energy (Landa-Cansigno et al. 2020). The water–energy nexus treats energy and water as being interlinked primarily in terms of resource use. It is obvious that energy is required to secure, deliver, treat, and distribute water (Scott et al. 2011; Pan et al. 2018). This holds true for the operations of wastewater treatment processes which have major energy demand. Furthermore, energy is used directly for water generation, distribution, and treatment, and is consumed indirectly by municipal heating, cooling, and pumping (Wang et al. 2017). However, many researchers ignore wastewater treatment processes as insignificant for the water–energy nexus, focusing more on water consumption in the energy sector and the protection of water resources. In fact, energy consumption of the water sector should be an important consideration of the water–energy nexus, especially the wastewater treatment process. This study evaluates the energy costs of an industrial wastewater treatment plant in terms of the water–energy nexus. Wastewater treatment plants (WWTPs) are widely used to protect receiver water bodies from hazardous wastewater discharges (Metcalf & Eddy 2014). These plants are regarded as one of the highest energy consumers (Castellet-Viciano et al. 2018). High energy consumption of wastewater treatment processes leads to high operational costs of WWTPs. High energy use in WWTPs also involves greenhouse gas emissions, contributing to global warming (Yapıcıoğlu 2018). This includes off-site greenhouse gas emissions; therefore, electricity consumption should be taken under control for the reduction of greenhouse gas emissions (Yapıcıoğlu 2018; Parravicini et al. 2016). Energy demand of a plant is largely dependent on operational parameters which are the volume of treated wastewater (wastewater flow rate) and organic load (biological oxygen demand [BOD], chemical oxygen demand [COD], total organic carbon, etc.) (Metcalf & Eddy 2014). These two operational parameters should be the focus in order to provide energy efficiency and minimize the energy costs of WWTPs. Considering the studies on energy intensity for different water technologies in the literature, it is estimated that energy consumption is higher in WWTPs in which the organic loading rate is higher. Especially for industrial wastewater treatment plants, as in the dairy industry, organic loading rate is generally higher than it is for other plants.

Turkey has become one of the largest milk producers in the world over recent decades. Milk production in Turkey has increased over the last few years with total raw milk production in 2015 amounting to 18.5 million tons (Kırdar and Karaca 2017). The large volume of water required to generate dairy products makes the dairy industry one of the major producers of wastewaters (Pereira et al. 2018). Dairy industries generate significant quantities of wastewater with relatively high organic matter concentrations on a daily basis (Amini et al. 2013). The dairy industry is also regarded as one of the main freshwater consumption enterprises, huge volumes of water being required for the sterilization, pasteurization, and cooling processes. Freshwater consumption for these processes leads in turn to high energy consumption. The cooling process especially consumes huge amounts of water and energy in the dairy industries. The rising demand for freshwater due to the growth of population, industrialization, and urbanization has raised the tendency for wastewater reuse and reclamation (Kaftan 2010), such that treated wastewater is increasingly being seen as a water resource. Dairy wastewater is a potential raw material for wastewater reuse due to its characterization. The sterilization process involves boiling, and vast quantities of freshwater are then needed for cooling. After proper treatment, dairy wastewater can be used as the cooling water in the dairy plant. The energy demand of this industry can therefore be decreased through water reuse, and the wastewater treatment plant can be regarded as the freshwater resource. The other significant factor for these processes in terms of the water–energy nexus is the heavy energy consumption that comes with the highly organic wastewater content typical of dairy industries. Dairy influents contain soluble organic substances, suspended solids, and organic compounds, especially milk fats and proteins (Falletti et al. 2014). Dairy wastewater effluents are concentrated in nature, and the major contributors to high organic loading in these effluents are carbohydrates, proteins, and fats that originate from milk. Wastewater characterization differs according to the dairy products. The dairy industry is one of the most polluting industries, not only in terms of the volume of effluent discharged but also in terms of its characterization. COD and fats, oils, and grease (FOG) are the main pollution indicator parameters of dairy effluents. Dairy wastewaters can be treated using biological and physicochemical methods such as activated sludge (AS) process, aerated lagoons, trickling filters, anaerobic sludge blanket (UASB) reactor, sequencing batch reactor (SBR), and anaerobic filter adsorption (Kushwaha et al. 2010; Amini et al. 2012), as well as reverse osmosis and ion exchange (RO). Dissolved air flotation (DAF) has been used in recent decades for wastewater treatment, and this process is particularly effective in the treatment of dairy wastewater, with very high FOG removal efficiencies (Falletti et al. 2014; Pereira et al. 2018). DAF process is used before the secondary treatment which generally tends to be anaerobic treatment configurations (Castillo et al. 2017). Dissolved air flotation process is a type of flotation process that separates oils and grease and other organic substances from wastewater (Behin and Bahrami 2012). The most significant parameters for ensuring high treatment efficiencies in DAF involve determining the volume of microbubbles occurring in the DAF tank (depending on the recirculation ratio and the pressure in the DAF system) and the coagulation and flocculation processes that depend on the pH of the media, the concentrations and the types of coagulants and flocculants used (Pereira et al. 2018; Edzwald 2010).

The present study investigates optimum operating conditions through wastewater analyses and Monte Carlo simulation for a DAF process in a dairy wastewater treatment plant; energy costs are then evaluated for existing and optimum conditions using a newly developed model of energy cost indicators. In terms of the water–energy nexus, wastewater reuse potential from dairy effluent was also investigated as a method of energy consumption reduction. The cooling processes in the dairy industry require a huge amount of freshwater and have high energy consumption. Wastewater reuse could therefore minimize both freshwater usage and the energy consumption of the plant. There are several studies on water–energy nexus in the literature. Pan et al. (2018) performed a study on water–energy nexus proposing wastewater reuse for the thermoelectric industry. Landa-Cansigno et al. (2020) evaluated water reuse strategies using an integrated framework of urban water metabolism and the water–energy–pollution nexus. Güven and Tanik (2018) conducted a study related to gray water use in the water–energy nexus. Feng and Chen (2016) conducted a similar study on the water–energy nexus of wastewater treatment systems. Lee et al. (2018) researched the water–energy nexus in water resource management using multi-criteria decision analysis. Apart from these studies, the current paper also aims to minimize the energy costs and to recommend an energy consumption technique involving wastewater reuse within the water–energy nexus. Wastewater reuse can be an alternative to freshwater consumption to reduce energy consumption of the cooling process.

One of the main strategies of this paper is to reveal the role of optimum operating conditions on energy efficiency and costs. The effect of optimum organic loading parameters (COD and FOG) for a dairy wastewater treatment plant on energy costs was investigated and benchmarked with the operational organic load using energy cost indicators. The originality of this work is that the optimum operating conditions were determined using Monte Carlo simulation, and energy cost assessment was applied according to these results using an adapted energy cost estimation tool. The studies related to DAF processes focus on the design of DAF tanks. Unlike previous studies in the literature, energy cost assessment was made for a DAF process according to the optimum operating conditions established in a simulation study in the field of the water–energy nexus. The use of cost functions is widespread in the literature in order to estimate the energy costs of WWTPs in the water–energy nexus. In this study, however, optimum and operational conditions and contaminant removal were considered in an integrated form for energy cost assessment using a newly adapted estimation tool. The originality of this work is that the role of design parameters in terms of organic load was investigated for an industrial plant with a highly organic wastewater content. Due to significant energy costs in the wastewater treatment process in the water–energy nexus, various methods have been developed to evaluate the energy efficiency of the process (Pan et al. 2018; Torregrossa et al. 2016). As several studies have been carried out using benchmarking methodologies (Castellet-Viciano et al. 2018; Hernández-Sancho et al. 2011a; Longo et al. 2019), application of cost functions has been a commonly employed method in the literature over the last decades. This paper aims to address gaps in the literature by ensuring energy efficiency based on organic load and wastewater characterization for an industrial wastewater treatment plant processing highly organic wastewater, using an economical approach which depends on a derived cost function and a new energy cost estimation model. The existing cost models in the literature focus mainly on municipal WWTPs and are mainly concerned with impacts of plant capacity, generally by analyzing flow rate. By contrast, the current study uses a derived numerical approach, in addition to calculating wastewater reuse potential using Monte Carlo simulation.

Materials and methods

Description of the study area and DAF process

The dairy industry is located in an organized industrial zone in Turkey. For this study, a full-scale Turkish dairy wastewater treatment plant was chosen as the pilot plant, having 550 tons/day raw cow’s milk processing capacity. The dairy wastewater included cooling water, sanitary wastewater, and process wastewater. The main products being processed were drinking milk, fruit juice, cream, milk powder, yoghurt, ayran, and butter. The main wastewater generating points of the industry are the clarification/standardization, pasteurization and homogenization processes. The other wastewater resources are residential activities (dining hall, toilet, etc.) and cleaning in the factory. The wastewater characteristics of the dairy industry are given in Table 1. The wastewater analyses were performed using Standard Methods (APHA 1998).

Table 1 Influent wastewater characterization of the dairy industry

Figure 1 presents the existing wastewater treatment process flow scheme in the plant. The major treatment units are the UASB reactor and DAF tank in the WWTP. The UASB reactor is used as the anaerobic treatment to remove organic and suspended materials from wastewater. In DAF process, fats, oils, grease, and partial organic materials are obtained. After the wastewater is treated, the effluent is discharged to the Organized Industrial Zone Central Wastewater Treatment Plant, with the nearby river as the receiver water body.

Fig. 1
figure 1

Wastewater treatment process flow diagram

Flotation involves the separation of solids from the water phase by attaching these solids to fine air bubbles, decreasing the density of the particles so that they float instead of settling. Dissolved air flotation (DAF) is the most practical and widespread type of flotation process. DAF systems are designed and planned to remove suspended solids (SS), COD, and FOG from a wastewater mass. Pollutant materials are treated with the use of dissolved air in a wastewater system generated by injecting air under high pressure into a recycle stream of clarified DAF effluent by a blower. This recycle stream is then mixed with the inlet (influent wastewater) in an internal contact tank where the dissolved air comes out in the form of the bubbles that attach to the pollutants. The bubbles and organic materials rise to the tank surface and form a floating bed of material that is removed by a surface skimmer. The principles of dissolved air flotation (DAF) are bubble formation and sizing, bubble–particle interactions, control of supplied air, and modeling of the reaction and clarification zones of the flotation tank (Edzwald 2010). The feed wastewater of the DAF tank is often supported with a coagulant such as ferric chloride, aluminum sulfate, or polyaluminum chloride (PAC) to agglomerate the colloidal particles, and a flocculant (polyelectrolyte etc.) to conglomerate the particles into heavier flocks.

In this study, a DAF tank was continually operated in a full-scale wastewater treatment plant under specific varying conditions to achieve the highest treatment efficiency. A DAF unit is a type of crossflow plate pack tank. In the DAF system, the polyaluminum chloride (PAC) was used as the coagulant and a cationic polymer known as polyelectrolyte (PE) was used as the flocculant. PAC is manufactured in both liquid and powder form. For this study, the powder form was used. AC 100 S, a particular type of PAC, was prepared as the aqueous solution. The characteristics of the small-scale wastewater plant used in this study are given in Table 2 for the calculation of energy cost indicators. Operational and design flow rate, influent COD and FOG values, and operational COD and FOG concentrations were determined by analyses, and optimum COD and FOG concentrations resulting from the simulation study (see Table 2) were used to determine the energy costs.

Table 2 Data set of dairy industry

Experimental design

In the DAF process, the operating parameters, including pH, recirculation ratio (RR), saturation pressure (SP), and coagulant (PAC) and flocculant (polyelectrolyte) concentrations need to be adjusted optimally for high efficiency of the treatment. For this reason, an experimental data set consisting of thirty analyses was formed considering the most important operating parameters. The values and ranges of these five operating parameters were obtained from the internal JAR tests and the DAF tank sales firm. The ranges of operating parameters were pH = 6–9.5, SP = 4–10 bar, recirculation ratio (RR) = 20–80 %, PAC concentration = 10–50 mg/L, and PE concentration = 10–50 mg/L. The number of analyses in this study was determined according to the operation period of the DAF tank. A DAF tank located in a full-scale dairy wastewater treatment plant was observed for 12 weeks in the start-up phase. The operating conditions were changed approximately once every 3 days and analyses were performed.

COD analyses were performed according to Standard Methods (APHA 1998) using COD kits and the dichromate reactor digestion method. FOG analysis was performed with HEM (Hexane Extractable Material) test and EPA 1664 method (EPA 2010). COD and FOG analyses related to influent and effluent wastewater of the DAF tank were performed to observe the treatment efficiencies.

To determine the possibility of reuse as cooling water, the overall treatment process (DAF and anaerobic process) was considered. TSS, BOD, hardness, and alkalinity tests were performed in the laboratory using Standard Methods (APHA 1998). TP, TKN, Cl, TDS, SiO2, Al+3, Fe, Mn+2, Ca+2, Mg+2, HCO3, and SO4−2 analyses were performed for one effluent sample as an outsourced service procurement by a certificated and accredited analysis laboratory firm.

Estimation of optimum operating parameters using Monte Carlo simulation

There are several methods to determine the optimum operating conditions for experimental designs. Box–Behnken design (BBD) and central composite design (CCD) methods are mainly used to determine the number of experiments to be evaluated for the optimization of the variables and responses. One of the novelties of this study is that Monte Carlo simulation is used for the optimization of parameters and also for the calculation of the reuse potential of dairy wastewater using risk assessment tool. Monte Carlo methods or Monte Carlo experiments are developed based on computational algorithms that rely on repeated random sampling to obtain numerical results. The underlying concept is to use randomness to solve problems that might be deterministic in principle. This method is often used in physical and mathematical problems and is most useful when it is difficult or impossible to use other approaches. Monte Carlo methods are mainly used in three problem classes: optimization, numerical integration, and generating draws from a probability distribution (Kroese et al. 2014). Monte Carlo simulation is a mathematical technique that generates random variables to model the risk or uncertainty of a certain system or in order to optimize the variables. Monte Carlo simulation uses the probability distribution for modeling a random variable. Various probability distributions are used for modeling input variables such as normal, lognormal, uniform, and triangular. From the probability distribution of the input variable, different paths of outcome are generated (Economics 2004). In the present study, @RISK software trial 7.6 version was used to apply the Monte Carlo simulation. Volumetric Reserves 0-Model with no uncertainty model in oil and gas module was used, and triangular distributions were chosen for the probability distribution. The uncertain inputs were RR (%), PAC concentration (mg/L), PE concentration (mg/L), and SP (bar). Initially, for these parameters, a correlation was defined for all measured values and treatment efficiencies for FOG and COD for thirty analyses. The output was the maximum treatment efficiency (100%). Then, the simulation involving 10,000 iterations was begun with 1 simulation. The model used in this simulation is given in Eq. (1). The pH was ignored because of irrelevance to this simulation study.

$$ \mathrm{O}=\mathrm{RiskOutput}\left(\hbox{'}\hbox{'}\mathrm{Lognormal}\hbox{'}\hbox{'}\right)+\mathrm{RiskLognorm}\left({\mathrm{S}}_1;{\mathrm{S}}_2\right) $$
(1)
O:

optimized parameter value

S1 :

parameter value

S2 :

maximum treatment efficiency (%)

In this study, S2 values were assumed as 100% maximum efficiency. S1 parameters were obtained from the wastewater analyses. In the result of the simulation, the optimized parameters were to be ensured.

The second stage of the modeling step attempted to determine the reuse potential of DAF effluent. In order to make this assessment, UASB reactor effluent was considered. The inputs were effluent values of COD, FOG, alkalinity, hardness, TP, TN, Cl, TDS, SiO2, Al+3, Fe, Mn+2, Ca+2, Mg+2, HCO3, and SO4−2 parameters. The desirable outputs were the cooling water standards (Büyükkamacı and Onbaşı 2007). In @RISK software, the risk analysis tool was used and the compatibility possibility was determined using 1000 iterations and 1 simulation for one effluent sample. The model used in this simulation is given in Eq. (2). The model was developed based on the basic risk calculation tool at Risk Software. This risk possibility shows how much the effluent parameters converge to the cooling water standards.

$$ \mathrm{RP}=\mathrm{RiskOutput}\left(\hbox{'}\hbox{'}\mathrm{Lognormal}\hbox{'}\hbox{'}\right)+\mathrm{RiskLognorm}\left({\mathrm{P}}_1;{\mathrm{P}}_2\right) $$
(2)
RP :

reuse potential (%)

P1:

effluent values

P2:

cooling water standards in Turkey

Estimation of energy cost indicator

There are several approaches to determine the energy costs of WWTPs defined in the literature, depending on the variables used. Many studies demonstrate that it is possible to use operational parameters, such as the volume of wastewater treated, the wastewater mass discharge identified as the population, or the pollutant removal identified in terms of COD, BOD, TOC, N, or P (Hernández-Sancho et al. 2011a; Tsagarakis et al. 2003; Sipala et al. 2003) to determine the energy costs. Most of the cost functions contain an exponential equation to estimate the energy costs of the wastewater treatment processes (Friedler and Pisanty 2006). In this paper, energy cost assessment is based on the model developed by Hernández-Sancho et al. (2011a). Energy cost indicator (ECI) defines the energy cost index of a wastewater treatment plant based on wastewater flow and organic load. There is no unit for this indicator. It is based on a proportional logic. It describes the energy cost ratio resulting from wastewater volume treated and organic load of the plant. In this model, a calculation is made of the performance index (Z) and energy cost indicator (ECI) which is derived from “Z”. The performance index (Z) comprises operational flow rate (Q) (m3/day) and the design flow rate (q) (m3/day) of the WWTP. Equation 3 shows the calculation of the performance index (Castellet-Viciano et al. 2018).

$$ Z=\frac{\left|\mathrm{q}-\mathrm{Q}\right|}{Q}\times 100 $$
(3)

Energy cost indicator (ECI) is derived from the performance index (Z); the model includes the volume of treated wastewater per year (V) (m3/year) and biochemical oxygen demand (organic loading parameter) (BOD5) (g/m3). The basic equation model for small-scale plants is shown in Eq. 4 (Castellet-Viciano et al. 2018).

$$ \mathrm{ECI}={1983.10}^6\ {\mathrm{V}}^{0.717}\ \mathrm{e}{{{}^{\Big(-14.327\ \mathrm{BOD}}}_5}^{+0.660\mathrm{Z}\Big)} $$
(4)

In this study, energy cost indicator (ECI) is derived from this equation model (Eq. 5) and the model itself contains the volume of treated wastewater per year (V) (m3/year) and organic loading parameter (COD or FOG) (g/m3). The difference between Eqs. 4 and 5 is that the parameter defining the organic load was modified. In the developed model (Eq. 5), COD and FOG were considered the indicators of organic load instead of BOD5 in Eq. 5. In this way, ECI values of operational conditions (ECIoperational) and optimum operating conditions (ECIoptimum) were calculated and benchmarked with each other for COD and FOG parameters. The derived calculation tool of ECI for small-scale WWTPs is given below (Eq. 5). On average, 80% and 55% removal efficiencies were considered for operational FOG and COD concentrations, respectively. The main simulation results of 97% and 70% removal efficiencies were considered for the optimum FOG and COD removal efficiencies.

$$ \mathrm{ECI}={1983.10}^6\ {\mathrm{V}}^{0.717}\ {\mathrm{e}}^{\left(-14.327\ \mathrm{COD},\mathrm{FOG}+0.660\mathrm{Z}\right)} $$
(5)

Results and discussion

FOG and COD removal by using DAF

According to the analyses’ results, it is possible to treat dairy wastewater using DAF with high treatment efficiency if the optimum conditions are obtained. Over a DAF tank operation period of 30 days, experiments were performed to observe the COD and FOG removal efficiencies clearly at different operating conditions. Experimental results showed that FOG removal efficiency was much higher than COD removal efficiency while using the DAF process. Therefore, DAF process is more effective for FOG removal than COD removal from dairy wastewater. FOG removal efficiency was in the range of 61–97% and COD removal efficiency was in the range of 39.1–70.0%, depending on the modified operating conditions in the DAF unit. The operating parameters had a great influence on the variation of treatment efficiencies. The results revealed that the highest and the lowest COD removal efficiencies from dairy wastewater using DAF unit were 70.0% and 39.1%, respectively. For all cases, the maximum FOG removal efficiency was 97.0% and the lowest value was 61.0% in this study. Table 3 demonstrates the experimental results and the DAF unit operating performance. In the literature, the majority of studies are not related to the dairy industry. Chow (2007) investigated COD and FOG removal using DAF tank for a coffee manufacturing industry. He reported 49.6 and 91.9% removal efficiencies for COD and FOG, respectively. It can be said that DAF process is more applicable for dairy industries than coffee manufacturing industries. A study by Rattanapan et al. (2011) investigated COD and FOG removal efficiencies for a biodiesel wastewater treatment plant, reporting 90% and 30% removal efficiencies for FOG and COD, respectively. Predictably, similar results were obtained for FOG removal in this study due to the highly fatty content of wastewater. In this study, COD removal was higher. On the other hand, Nagappan et al. (2018) investigated dairy wastewater treatment using DAF and membrane filtration combination, reporting a much higher COD removal of 75.15 ± 3.95% reduction in COD.

Table 3 Experimental results of DAF process

Optimum operating conditions for DAF process

The five operating parameters of pH, RR, saturation pressure, coagulant concentration, and flocculant concentration were observed to achieve the highest pollutant removal efficiency. In Table 2, the optimum operating parameters are presented for this study. The quality of the coagulation and flocculation of the particles is affected by pH adjustment, which is the most important parameter, directly indicating the treatment efficiency of the DAF process. The highest values of COD and FOG removal efficiency were obtained with a pH value close to neutrality (pH = 8). Figure 2 shows the pH adjustment for the optimal treatment efficiency in the DAF unit.

Fig. 2
figure 2

Optimum pH adjustment

As seen in Fig. 2, at pH of 8 the highest treatment efficiencies were observed (97% FOG removal and 70% COD removal). As far as neutral value is concerned, the treatment value was decreased. In acidic conditions, that is pH of 6, the lowest treatment efficiency was observed for both parameters. Pereira et al. (2018) also investigated the dairy wastewater treatment using DAF process, conducting a study that aimed to determine turbidity removal with DAF process. Similarly, they observed the highest removal efficiency of turbidity at neutral pH values (5–10).

Influent wastewater recirculation to DAF tank is very crucial, because this parameter recycles a ratio of the DAF tank content thus returning effluent saturated with air back to the inlet division of the tank. For the continuity of the treatment, some wastewater should be recirculated to the inlet of the DAF unit. The recirculation ratio varies in the range of 5.0–100.0% according to the types of wastewaters and DAF units (Metcalf & Eddy 2014). For this study, optimum recirculation ratio was 33.0% to achieve 97.0% FOG and 70.0% COD removal while using DAF. When RR is at a value of 80%, the lowest removal efficiencies were observed. By contrast with this study, Pereira et al. (2018) detected the optimum RR as less than 25.0% for the DAF tank of the dairy wastewater treatment plant. Couto et al. (2004) recommended that for the treatment of dairy effluent, the ideal value for RR was 25.0%, according to their studies. Figure 3 shows the variance of the RR for this present study. When RR was 25.0%, FOG removal was 78.5% and COD removal was 58.8% at the average values.

Fig. 3
figure 3

Optimum recirculation ratio

The saturation pressure is very important for the quantity and sizes of air bubbles that are the major parameters for ensuring the maximum treatment efficiencies for DAF process. To treat wastewater, the organic substances should be merged with air bubbles that are pressurized, so the value of the pressure is very significant for this process. The optimal saturation pressure was 5 bars for this study to obtain the highest removal efficiencies. In Fig. 4, the optimum saturation pressure trend is presented. When saturation pressure was 8 bars, the lowest treatment efficiencies were observed in this study.

Fig. 4
figure 4

Optimum saturation pressure adjustment

The coagulation–flocculation process is the most important indicator of treatment efficiencies of the DAF process. The organic materials are removed due to the coagulation–flocculation process. Therefore, the concentration of the chemical substances used in this process has great importance. In this study, optimal PAC concentration was 20 mg/L and PE concentration was 25 mg/L for the highest removal efficiencies. Figure 5 presents the coagulant and flocculant concentrations for the removal efficiencies. In the literature, there are limited studies related to this topic. The studies generally aim to determine the designs of DAF tanks. Contrastingly, this study proves that PAC and PE chemicals can be used for DAF process and it is possible to obtain high removal efficiencies by using DAF. Also, an optimization algorithm is developed for the operating parameters of a DAF tank using Monte Carlo simulation.

Fig. 5
figure 5

Optimum coagulant–flocculant dose

Results of Monte Carlo simulation

Monte Carlo simulation was carried out in order to determine the optimum operating parameters. The simulation results revealed that optimized recirculation ratio (RR) was 26.31%, optimized PAC concentration was 42.5 mg/L, optimized PE concentration was 36.31 mg/L, and optimized saturation pressure (SP) was 4.61 bars for 100% FOG and COD removal efficiency. Figure 6 presents the simulation results. The figures contain optimum values, inputs, lognormal distribution, and statistical assessment which comprises minimum, maximum and mean values, mode, median, and standard deviation. The novelty of this study is that it attempts to determine the optimum operating conditions of a DAF tank using Monte Carlo simulation, along with an estimation of the reuse potential of dairy effluent.

Fig. 6
figure 6

Optimized parameters in the result of Monte Carlo simulation

Wastewater reuse potential was investigated in order to consider an alternative water supply to decrease energy and freshwater consumption in terms of the water–energy nexus. The estimation results for cooling water reuse potential are given in Table 4. According to the risk assessment, reuse possibility was 52.0%, considering all parameters. The results reveal that COD, BOD, TSS, TP, TKN, TDS, Ca+2, and Mg+2 parameters were not at a level compatible with the cooling water regulations and standards. So dairy wastewater can only be reused as cooling water after an advanced treatment method such as reverse osmosis, membrane bioreactor, advanced oxidation processes, and adsorption. Reverse osmosis is commonly applied as a reuse method, producing high quality effluent, so this method is applicable for dairy wastewater treatment. Unfortunately this technology requires a huge amount of freshwater for the backwashing process. Membrane bioreactor technology is another candidate due to advantages like high effluent quality and no sludge production. However, this technology requires expert operators to manage it and these systems obviously release greenhouse gas emissions. Also, a disadvantage of this technology is membrane fouling. Advanced oxidation process has gained importance due to offering high effluent quality, thorough disinfection and being cheaper than other techniques. There are several advanced oxidation processes. Among them, UV/H2O2 is applicable for dairy wastewater with effective effluent disinfection. Adsorption is a widespread reuse method but involves the production of adsorbent wastes the disposal of which clearly has costs. From this point of view, considering the advantages of the advanced oxidation process, it would be more applicable for dairy wastewater reuse (Metcalf & Eddy 2014).

Table 4 Reuse possibility of dairy effluent

Pan et al. (2018) conducted a similar study on the water–energy nexus. They also proposed reuse as cooling water and discussed the challenges in terms of the water–energy nexus, but in their case it was for thermoelectric power generation. In a study by Landa-Cansigno et al. (2020), an assessment of water reuse strategies using an integrated framework of urban water metabolism and water–energy–pollution nexus was performed. In developing a model to assess wastewater reuse methods, their study developed WaterMet2 (WM2) as the conceptual mass balance-based model for the simulation. In this study, Monte Carlo simulation was used to determine the reuse possibility in terms of water–energy nexus. They reported that decentralized water reuse strategies using domestic wastewater have the highest potable water saving, reductions of eutrophication, and greenhouse gas emissions, while centralized strategies could obtain the largest savings of energy use. Güven and Tanik (2018) estimated water gain through gray water reuse and rainwater harvesting together with energy recovery from wastewater generated from a fictitious eco-city of 100,000 people located in Istanbul based on the water–energy nexus. They found that the energy recovery from the rest of the wastewater after separation of gray water could be calculated as 15 MWh/day of electricity and heat, roughly corresponding to the electricity demand of 1300 households each bearing four people. Feng and Chen (2016) performed a similar study on the water–energy nexus of wastewater treatment systems. They developed a conceptual model and framework in their study. Lee et al. (2018) investigated water–energy nexus in water resource management using multi-criteria decision analysis. They proposed rainwater harvesting, underlining that consideration of the water–energy nexus was particularly important in their study as water resource management in Taiwan may have to confront not only limitations of freshwater resources but also energy resource constraints.

Energy cost assessment

The assessment results reveal that energy cost indicators of FOG were highest at 8.65 × 1014 (ECIoperational,FOG) and 2.02 × 1015 (ECIoptimum,FOG) for operational and optimum conditions, respectively, while the energy cost indicators of COD were the lowest indicators with the values of 5.9 × 10−19 ((ECIoperational,COD) and 9.40 × 10−8 (ECIoptimum,COD). Figure 7 demonstrates the comparison of the indicators.

Fig. 7
figure 7

Energy cost assessment

According to the assessment results, energy cost indicators of FOG were higher than the indicators of COD for a DAF process. This means that the highest energy costs corresponded to fats, oils, and grease removal from wastewater in a DAF tank. If pollutant removal efficiencies are higher, energy costs increase in parallel. Energy cost indicators of optimum operating conditions are higher than the cost indicators of operational conditions for both of the two contaminant parameters. It can be concluded that pollutant removal efficiency is the key indicator parameter for the energy costs of a wastewater treatment plant.

There are many studies related to this topic. The use of cost functions is widespread in the literature. Most of the developed models for the wastewater treatment process have been applied to estimate the operational and maintenance costs of the process. In this study, optimum and operational conditions and contaminant removal were considered in an integrated form. Hernández-Sancho et al. (2011b) applied a cost modeling methodology using statistical information from a sample of 341 wastewater treatment plants in Spain. Castellet-Viciano et al. (2018) investigated the effect of design flow on energy costs for small-, middle-, and large-scale WWTPs. They reported that Z was 0.20, 0.40, 0.60, and 0.80 for small-scale plants. Similarly, Z value was 0.667 in the present study. Molinos-Senante et al. (2013) used a cost function model to estimate the cost of sludge and waste management. Exponential functions have also been preferred to represent the energy intensity of the WWTPs rather than linear equations. Moreover, cost functions for extended aeration and activated sludge also include the volume of wastewater treated and the biological oxygen demand removal efficiency as a percentage. Another study by Molinos-Senante et al. (2018) tested the degree to which energy intensity (EI) influenced WWTPs using a set of technical variables by modeling the EI of a sample of 305 WWTPs grouped into five secondary treatment technologies. Results showed the following two major findings: WWTPs using conventional activated sludge, extended aeration, trickling biofilters, and biodiscs exhibited significant economies of scale in energy use; and pollutant removal efficiency demonstrated low impacts on WWTP EI. Plumlee et al. (2014) analyzed the cost of advanced treatment, and Yumin et al. (2016) estimated the operational cost of WWTPs in rural areas for the near future. Silva and Rosa (2015) and Verrecht et al. (2010) reported an over cost for a plant designed for twice or three times the mean flow. Likewise, Yapıcıoğlu (2019a) investigated the effect of design flow on energy efficiency for a dairy factory, using a similar model. The results showed that energy cost indicator of operational flow, 2.1 × 10−8, was higher than for design flow, 2.36 × 10−27. She reported that if plants are operated in design flows, energy cost can be decreased. Yapıcıoğlu (2019b) also estimated the energy costs of a dairy plant in terms of organic load, reporting that the energy cost indicator of operational organic load, 2.1 × 10−8, was higher than the design organic load of 7.2 × 10−18. In both studies, she used the biological oxygen demand (BOD) parameter.

Conclusions

FOG was the major pollutant and energy consumer parameter for this dairy wastewater treatment plant. It was found that the highest FOG removal efficiencies (up to 97.0%) were obtained using the DAF process. COD removal at a value of 70.0% is also possible when using the DAF unit according to this study. In order to achieve the highest FOG and COD removal efficiencies, the optimum operating conditions for the DAF process to treat dairy wastewater were a pH of 8, RR of 33%, and saturation pressure of 5 bars and the coagulant and flocculant concentrations were PAC = 20 mg/L and PE = 25 mg/L, respectively. The lowest FOG and COD removal efficiencies were 61.0% and 39.1%, respectively. Monte Carlo simulation can be used for optimizing the operating parameters of wastewater treatment plants. The optimization results were RR = 26.31%, PAC concentration = 42.5 mg/L, PE concentration = 36.31 mg/L, and SP = 4.61 bar. Especially for optimum operating conditions, it is clear that the energy cost would be higher. It can be said that FOG removal leads to the highest energy costs for a DAF process. The results revealed that the energy cost indicators of optimum operating conditions were higher than the indicators for operational conditions. The assessment results show that the highest energy cost indicators of FOG were 8.65 × 1014 (ECIoperational,FOG) and 2.02 × 1015 (ECIoptimum,FOG) for operational and optimum conditions, respectively. The energy cost indicators of COD were the lowest indicators with the values of 5.9 × 10−19 ((ECIoperational,COD) and 9.40 × 10−8(ECIoptimum,COD). Wastewater reuse could therefore be an energy and freshwater consumption minimization technique in terms of the water–energy nexus. The result of risk assessment shows that reuse possibility was 52% for dairy effluent, due to the fact that certain parameters such as COD, BOD, TKN, TDS, Ca+2, and Mg+2 were higher than the recommended limit values according to Monte Carlo simulation. This result suggests that an advanced treatment should be implemented as the wastewater reuse method. Application of advanced oxidation process is recommended as the reuse technology.