Introduction

Spill accidents in rivers have significant environmental, economic, and social impacts without mitigation. Accidents involving releasing dangerous substances into rivers happen for various reasons, including navigation accidents, industrial incidents, pipeline breaks, or natural disasters. When spills occur, harmful chemicals or pollutants are suddenly introduced to the river ecosystem. Then, the natural water flow currents transport the contamination further downstream, enlarging the zone impacted as it spreads out over a wider region. Advanced planning and rehearsal of mitigation strategies are crucial for effectively and safely managing spill incidents in river environments. The study of spill accidents in rivers has become a significant field of study, aiming to predict the dispersion and transformation of different contaminants when they are discharged into river systems. Many researchers have focused on studying accidental spills using different models and have developed mitigation strategies to minimize the impact of such spills on water quality.

Numerous studies have been conducted on spill accidents in various aquatic environments such as seas, estuaries, lakes, and rivers around the world to understand their impacts and dispersion patterns. Some of the most frequently used models are WASP, QUAL-2 k, Delft-3D, EFDC, and MIKE (Zheng et al. 2018; Arefinia et al. 2020; Angello et al. 2021; Costa et al. 2021; Wimordi et al. 2021). A comprehensive investigation was carried out to establish a strong knowledge base on spill studies conducted globally. Spill accidents in different bodies of water in the USA were examined using various methodologies. The spill of MCHM in the Ohio River at different concentrations was analyzed using the river contaminant risk (RANK) and computational fluid dynamics (CFD) models (Behzadi et al. 2022). The risk level to the water ecosystem from pollutants in the water bodies of Soc Trang province, Vietnam was studied using the water quality index (WQI), impact and risk level (risk quotient or RQ, RQ-F), correlation analysis, and principal component analysis (PCA) (Nguyen et al. 2023). Two separate case studies were conducted to compare spill behavior in the Songhua River, a large river in China, and the Truckee River, a smaller river in California, using the MIKE 11 model (Shi et al. 2018). Additionally, in South America, an oil spill accident in the Amazon River in Brazil was modeled to investigate the characteristics of the plume and its environmental impacts (Da Cunha et al. 2021). The oil spill incident in the main seaport in Peru, South America, was simulated using the NOAA Operational Modelling Environment (GNOME) to determine the trajectory of the spill plume (Mogollón et al. 2023). The Telemac3D model was employed to simulate an oil spill at Tramandai Beach in Brazil and assess the influence of weather conditions on the behavior of the oil plume (Marques et al. 2017). Araújo et al. used the SisBaHia mode to simulate oil spills in the Lower Amazon River, Brazil, to investigate environmental vulnerability zones (Araújo et al. 2023).

In the case of the Geum River in South Korea, the EFDC model was utilized to identify pollution sources that cause water quality degradation and algal growth (Shiferaw et al. 2023). Khoi et al. developed an integrated tool combining the Environmental Sensitivity Index with a numerical model Mike 21 to simulate oil spill accidents along Ho Chi Minh City’s riverine systems and coastal areas in Vietnam (Khoi et al. 2023). China focuses heavily on studying spill accidents due to its numerous rivers and reservoirs exhibiting diverse water characteristics and witnessing actual spills of various chemicals, providing opportunities to learn from a range of spill scenarios (Xin et al. 2012; Tang et al. 2016; Zheng et al. 2018; Li et al. 2021; He et al. 2022; Yan et al. 2022). Mike 21 software was used to simulate the impact of different working conditions on suspended iron and COD pollution in the upper reaches of Dahuofang Reservoir (Yan et al. 2022). Ran et al. (2022) developed a water quality model based on EFDC software for the Songbaishan Reservoir to simulate how pollutants move and to examine how leaks affect the quality of water intake.

The Delft3D software has found extensive applications across various industries for simulating hydrodynamic processes and water quality (El-Adawy et al. 2013; El Saeed et al. 2016; Khanam and Navera 2016; Noha et al. 2016; Amorim et al. 2021; Shen et al. 2022; Rifaat et al. 2023). The Delft3D model is a powerful tool for simulating spill accidents in a variety of water bodies and under different conditions. This is because it can couple hydrodynamic and water quality models, which allows it to account for the complex interactions between the spilled pollutant and the environment. The Delft3D model was utilized to develop a hydrodynamic model for the coastal areas of Central Sulawesi, Indonesia, and a decision support system using the analysis hierarchy process (AHP) was implemented to assess the suitability of a potential development area of the region (Hermawan et al. 2023). The Delft3d model was utilized to forecast oil spill response in Belfast Lough at the mouth of the Lagan River in Northern Ireland (Abascal et al. 2017). Four oil spill accidents were simulated using the Delft3d-Part model for Itapua State Park, Brazil, to determine the priority protection areas (Marinho et al. 2021). Oliveira et al. (2021) used the Delft3d model to understand the characteristics of plumes during both summer and winter seasons in the Minho and Lima estuaries in Portugal (Oliveira et al. 2021).

A two-dimensional Delft3D flow model was used to simulate and analyze the fuel oil leakage accident in Huangpu River (Kuang et al. 2011). Xu et al. (2017) developed an integrated 3D hydrodynamic and water quality model to study emerging contaminants (Atrazine and Bisphenol) in Qingcaosha Reservoir using the Delft3D suit model. Delft3D software was employed to investigate the potential effects of accidental water pollution incidents on nearby drinking water sources in the Chengtong Reach area (Ding et al. 2019). Tong et al. (2021) investigated how nutrient levels affect the distribution of emerging pollutants in water and sediments of a tropical reservoir and its tributaries using a combined hydrodynamic and eutrophication-emerging contaminants risk assessment model. Delft3D flow model was used to study phenol leakage in Fen River, China, and developed early warning and emergency response (Guo and Duan 2021). Recent studies developed hydrodynamic and water quality models to provide early warnings of water pollution in China’s Three Gorges Reservoir Area (Liu et al. 2024; Sang et al. 2024). Additionally, a study used a convolutional neural network to create a chemical accident model for South Korea’s Namhan River (Kim et al. 2023).

The potential impacts of an oil spill incident in the Lancang River basin were investigated using the MIKE 21 software platform (Lu et al. 2024). A hydrodynamic and water quality model was developed using GIS, FORTRAN, and TECPLOT360 software to predict and mitigate heavy metal pollution accidents in the Three Gorges Reservoir Area (Liu et al. 2024; Sang et al. 2024). Delft3D model was used to simulate marine pollution from heavy metals in Saronikos Gulf (Aegean Sea, Eastern Mediterranean) (Mazioti et al. 2024). The oil spills were simulated under ice-covering conditions using the GNOME oil spill model and GLOFS hydrodynamic model (Song et al. 2024). Spill accidents in the Nile River, Egypt, were studied from an assessment point of view. Limited studies focused on the behavior of spill materials using the coupling of hydrodynamic and water quality models. Shehata et al. (2019) used a one-dimensional HEC-RAS model to simulate a phosphate spill in the Nile River DS Assuit Barrage. Mahmoud et al. (2020) coupled Delft3D flow and a water quality model to study the impact of thermal pollution water quality parameters in Egypt’s Rosetta Branch. MIKE21FM was used to study the effect of climate changes on water quality parameters for Lake Burullus, Egypt (Shalby et al. 2020). Salama et al. (2023) developed an advanced system using the Delft3D model and GIS tool to study spill accident impacts on water station intakes along the Nile River reach four. The integration of water quality modeling with hydrodynamic modeling has significantly enhanced the ability for two and three-dimensional analysis taking into account the interrelationships between physical, chemical, and biological processes (Shakibaeinia et al. 2016).

There have been several spill accidents in Nile Reach Four, caused by both navigation ships and industrial effluents. Ship accidents along the studied reach occur due to several factors, including human errors, navigation challenges, mechanical failures, infrastructure and maintenance issues, and adverse weather conditions (Shama 2009a, b). Among these factors, navigation challenges, such as the presence of narrow passages, sharp bends, and varying water depths, are often the primary contributing factors to accidents on the Nile River (Raslan and Abdelbary 2001). In 2015, there was a diesel fuel leakage from a power station in Assuit, which posed a threat to the ecosystem and human activities in the area. Another significant spill accident occurred in 2017 when 20 tons of phosphate spilled in front of the Assuit government building while crossing the navigation pass of the old Assuit barrage. Measures were taken in 2019 to address the potential danger of a solar spill coming from Sohag. This further emphasizes the importance of conducting research and implementing preventive measures to avoid spill accidents in the fourth reach of the Nile River.

Accidental spills in the Nile River negatively affect water quality. Most of the previous studies on the Nile River have focused on more basic analysis and evaluation techniques rather than applying sophisticated computational modeling approaches. This is an important limitation, as spills in a complex river system like the Nile can involve intricate hydrodynamic processes and contaminant transport mechanisms that need to be investigated. Therefore, this research aims to fill this key knowledge gap by developing multi-dimensional models.

The main contribution of this study is the use of a multi-dimensional hydrodynamic and water quality model to comprehensively assess the oil spill problem in the Nile River, which has not been extensively explored in previous studies. The goal is to create powerful simulation capabilities that can recreate potential accidental spill events and track how contaminants would move, disperse, and impact water quality throughout the river system over time. This modeling-based approach offers several advantages over more traditional observational or empirical studies of spills. It helps to explore a wider range of hypothetical spill scenarios. The models can also provide detailed spatial and temporal data on contaminant transport and fate that would be very challenging to measure in the actual accident. This advanced computational modeling can help decision-makers better understand the risks and potential consequences of spill events under different scenarios. This is crucial for protecting this vital freshwater ecosystem of the Nile.

The main focus is to gain a comprehensive understanding of how spills behave and the impact they have on the aquatic environment. Therefore, a hydrodynamic and water quality model was developed specifically for simulating spill accidents. Initially, a hydrodynamic flow model was constructed and adjusted to represent diverse flow conditions accurately. Subsequently, the hydrodynamic model’s outputs were utilized as inputs for the water quality model, considering multiple water quality factors and parameters. Finally, spill scenarios were simulated under varying flow conditions to comprehensively understand the spill behavior and the influencing factors. The main difficulty is the complexity of modeling river hydrodynamics over the long Nile reach, which requires more computational time and storage data, so the model was simplified to focus on spill scenarios. The lack of historical spill data is a challenge to relying on virtual spill events and analyzing plume dispersal, relying on modeling skills to compensate for a lack of realistic scenarios.

Material and methodology

The Delft3D model provides a coupling of hydrodynamic and water quality models for a powerful understanding of the behavior and impacts of spills in water aquatic systems. Figure 1 shows the procedures for the hydrodynamic and water quality modeling. This involves the main steps: collecting the required data for the studied area, developing the hydrodynamic model, preparing coupling and processes inputs, and creating the water quality model. Finally, spill scenarios can be simulated to study spills and their impacts.

Fig. 1
figure 1

Methodological flowchart for hydrodynamic and water quality modeling using Delft3D model

Study area and data collection

Location

The Nile River is divided into four reaches from the High Aswan Dam (HAD) to Delta Barrages. The first reach (167 km) extends from the High Aswan Dam (HAD) to the Esna Barrages. The second reach (192 km) extends from the Esna Barrages to the Nagaa Hammadi Barrages. The third reach (186 km) extends from the Nagaa Hammadi Barrages to the Assiut Barrages. The fourth reach (409 km) extends from the Assiut Barrages to the Delta Barrages. Human activities strongly influence the hydrodynamics and water quality in Fourth Reach. Water quality in the Fourth Reach has deteriorated due to waste loads from drains, industrial effluents, and treated wastewater discharges. The selected study reach was approximately 144 km long, extending from Assuit Barrage (544.78 km DS OAD) to the El-Menia monitoring station (687.55 km DS OAD). The location map for the selected reach was prepared using Google Earth Pro, as shown in Fig. 2 (Google 2021). The studied reach of the Nile River is a crucial area as it provides water to 14 drinking water treatment plants. Unfortunately, it is also vulnerable to pollution from drains and industrial waste discharges.

Fig. 2
figure 2

Location of the studied “Fourth Reach of the Nile River in Egypt” (Google 2021)

Data collection

Water level, discharge, and cross-section data were collected and analyzed to develop a complete hydrodynamic model. First, the land boundaries were extracted from topographic maps of the study area to represent the left and right banks. After that, bed topography was extracted as XYZ coordinates from contour maps and cross-sectional data obtained from a hydrographic survey of the year 2005 provided by the Nile Research Institute (NRI). Water level and discharge data for 2018 were obtained from the gauge stations at Assuit (544.78 km DS AHD) and El-Menia (687.55 km DS AHD) by the National Water Resource Center (NWRC). The other two gauge stations, Mandara (612.10 km DS AHD) and Maabda (576.20 km DS AHD) were not operational that year. In February and September 2018, water quality parameters like BOD, COD, DO, NO3, and PO4 were collected at Assuit (545 km DS AHD), Mallawy (635 km DS AHD), and El-Menia (683 km DS AHD). Other data was collected from eleven drains that release agricultural, industrial, and domestic wastewater. Previous studies and reports provided water quality data for these drains, which was then used to create a model of contaminant spill in a water quality model. Additionally, meteorological data sets, including wind vectors, solar radiation, relative humidity, and temperature were obtained from the online source wunderground.com.

Numerical schemes of the Delft3D model

Delft3D is a fully integrated modeling suite for coastal, river, lake, and estuarine regions, with a multi-disciplinary approach by WL\Delft Hydraulics in the Netherlands (Deltares 2013). Spill accident modeling using Delft3D is a complex process that requires expertise in hydrodynamics, environmental science, and modeling techniques. The Delft3D-FLOW model solves the Navier–Stokes equations for an incompressible fluid, assuming shallow water and Boussinesq conditions. A two-dimensional hydrodynamic model solves depth-averaged shallow water equations using an orthogonal curvilinear coordinate system as shown in Eqs. (1), (2), and (3).

Continuity equation:

$$Q = \frac{\partial \zeta }{\partial t}+\frac{1}{\sqrt{{G}_{\xi \xi }}\sqrt{{G}_{\eta \eta }}}\frac{\partial \left[(d+\zeta )u\sqrt{{G}_{\eta \eta }}\right]}{\partial \xi }+\frac{1}{\sqrt{{G}_{\xi \xi }}\sqrt{{G}_{\eta \eta }}}\frac{\partial \left[\left(d+\zeta \right)v\sqrt{{G}_{\xi \xi }}\right]}{\partial \eta }$$
(1)

Moment equations in \(\overrightarrow{\xi }\) and \(\eta\) direction:

$$\begin{array}{cc}& \frac{\partial u}{\partial t}+\frac{u}{\sqrt{{G}_{\xi }}}\frac{\partial u}{\partial \zeta }+\frac{v}{\sqrt{{G}_{m}}}\frac{\partial u}{\partial \eta }+\frac{u}{\sqrt{{G}_{\xi }}\sqrt{{G}_{mp}}}\frac{\partial \sqrt{{G}_{\xi j}}}{\partial \eta }-\frac{{v}^{2}}{\sqrt{{G}_{\xi }}\sqrt{{G}_{mp}}}\frac{\partial \sqrt{{G}_{m}}}{\partial \xi }-fv\\ & =-\frac{1}{A\sqrt{{G}_{\xi F}}}{P}_{z}+{F}_{z}+{M}_{z}\\ & \frac{\partial v}{\partial t}+\frac{u}{\sqrt{{G}_{m}}}\frac{\partial v}{\partial \xi }+\frac{v}{\sqrt{{G}_{vp}}}\frac{\partial v}{\partial \eta }+\frac{uv}{\sqrt{{G}_{m}}\sqrt{{G}_{pv}}}\frac{\partial \sqrt{{G}_{ev}}}{\partial \xi }-\frac{{u}^{2}}{\sqrt{{G}_{m}}\sqrt{{G}_{pv}}}\frac{\partial \sqrt{{G}_{mi}}}{\partial \eta }+fu\\ & =-\frac{1}{{\rho }_{0}\sqrt{{G}_{eq}}}{P}_{\eta }+{F}_{\eta }+{M}_{\eta }\\ & \end{array}$$
(2)

Concentration equation:

$$\begin{array}{cc}& \frac{\partial (d+\zeta )C}{\partial }+\frac{1}{\sqrt{{G}_{m}}\sqrt{{G}_{m}}}\left\{\frac{\partial \left[\sqrt{{G}_{m}}(d+\zeta )C\right]}{\partial \xi }+\frac{\left.\partial \sqrt{{G}_{m}}(d+\zeta )nC\right]}{\partial \eta }\right\}\\ & \left.=\frac{d+\zeta }{\sqrt{{G}_{m}}\sqrt{{G}_{m}}}\frac{\partial }{\partial \xi }\left[{D}_{n}\frac{\sqrt{{G}_{m}}}{\sqrt{{G}_{m}}}\frac{\partial C}{\partial \xi }\right]+\frac{\partial }{\partial \eta }\left[{D}_{m}\frac{\sqrt{{G}_{m}}}{\sqrt{{G}_{m}}}\frac{\partial C}{\partial \eta }\right]\right\}-{\lambda }_{\text{m}}\left(d+\zeta \right)C+S\end{array}$$
(3)

where \(Q\) is the source or sink flow per unit area; \({G}_{\xi \xi }\) and \({G}_{\eta n}\) are the transformation coefficient between the orthogonal curvilinear coordinate system and the Cartesian coordinate system; \(u\) and \(v\) are the depth-averaged velocity of water in \(\xi\) and \(\eta\) direction, respectively; \({F}_{\xi }\) and \({F}_{\eta }\) are the uneven level of Reynolds stress; \({M}_{\xi }\) and \({M}_{\eta }\) are the additional momentum caused by the source and sink terms; \(\zeta\) is the free surface elevation above the reference plane; \(d\) is the depth below the reference plane; \(H=d+\zeta\) is the total water depth; \({P}_{\xi }\) and \({P}_{\eta }\) are pressure gradient in \(\xi\) and \(\eta\) direction, respectively; \(f\) is the Coriolis parameter; \(n\) is the Manning coefficient.

The Delft3D-WAQ module is based on the three-dimensional advection–diffusion equations, together with an extensive water quality library of interrelated source and sink terms to represent water quality processes. A water system can be divided into segments or volume elements referred to as computational cells. For each segment or cell, there must be mass balance over time for each water quality constituent. Delft3D-WAQ solves the mass balance equation for each computational cell and contaminant, as shown in Eq. (4) (Hydraulics 2009).

$${M}_{i}^{t+\Delta t}={M}_{i}^{t}+\Delta t\times {\left(\frac{\Delta M}{\Delta t}\right)}_{Tr}+\Delta t\times {\left(\frac{\Delta M}{\Delta t}\right)}_{P}+\Delta t\times {\left(\frac{\Delta M}{\Delta t}\right)}_{S}$$
(4)
\({M}_{i}^{t}\):

the mass in the computational cell \(i\) at the beginning of a time step t.

\({M}_{i}^{t+\Delta t}\):

the mass in the computational cell \(i\) at the end of a time step t.

\({\left(\frac{\Delta {M}_{i}}{\Delta t}\right)}_{\text{Tr}}\):

changes in the computational cell \(i\) by transport.

\({\left(\frac{\Delta {M}_{i}}{\Delta t}\right)}_{P}\):

changes in computational cell \(i\) by physical, (bio) chemical, or biological processes.

\({\left(\frac{\Delta {M}_{i}}{\Delta t}\right)}_{S}\):

changes in the computational cell \(i\) by sources (e.g., waste loads, river discharges).

Delft3D model setup

The Delft3D flow module involves several steps to set up the model, including specifying domain data, timeframes, and initial and boundary conditions. The first step in building a flow model is to prepare the land boundary, bathymetry, and grid for the studied reach. For the 144 km reach, the land boundary was extracted using the right and left bank data. RGFGRID, the grid generator in Delft3D, was used to produce an unstructured curvilinear grid. Many splines were drawn along the boundaries and cross-sections, which were then converted into a curvilinear grid. The average dimensions of each grid cell were approximately 30 m by 20 m in the M and N directions, respectively, as shown in Fig. 3a.

Fig. 3
figure 3

a Hydrodynamic grid. b Bathymetry of the Fourth reach of the Nile River in Egypt

Several crucial processes were carried out to ensure an optimized grid, including orthogonality, aspect ratio, and smoothing. Orthogonality refers to the cosine value of grid corners, which should be less than 0.02 for offshore areas and 0.04 for near-shore areas. Aspect ratio measures grid cell smoothness as the ratio of dimensions in the M and N directions, and the ratio of neighboring cell dimensions. This value should vary between 1 to 2 unless flow predominantly follows a grid line. All these factors were checked to ensure the model’s high performance. The depth data was imported into the QNICKIN tool as an XYZ file, and then the depth data was interpolated to the grid nodes to obtain the bathymetry in the form of a depth file. Smoothing and internal diffusion were performed to ensure the bathymetry smoothness as shown in Fig. 3b. Additionally, it is important to calculate the Courant number, which determines the accuracy and stability of the model. The Courant number is a function of the time step as Eq. (5):

$$Cr=c \frac{\Delta t}{\Delta x}$$
(5)

where c represents celerity, ∆t is the time step, and ∆x is the variation in grid size. Different time steps were tested, such as 0.1, 0.2, and 0.5 min, to run the model. The most suitable time step was found to be 0.2 min, as it ensured that the Courant number remained below 10.

The grid parameters, dry points, initial conditions, and numerical parameters can be defined using the flow-input domain. The initial condition refers to the hydrodynamic situation at the beginning of the simulation. The initial condition is chosen for the water level as the downstream boundary condition measured at the El-Menia gauge station. The first simulation, called a cold start, uniformly set the initial water level across the domain to the downstream level recorded at El-Menia. The output restart file from this cold start was then used as the initial condition file for the second hot start simulation. The boundary conditions are the open boundaries upstream and downstream of the reach. The total discharge downstream of Assuit Barrage is assigned as the upstream boundary condition, and the water level at El-Menia station is assigned as the downstream boundary condition. The hydrodynamic model was run three times to simulate minimum flow in February, average flow in September, and maximum flow in June.

The coupling process is the first stage in water quality modeling, as it uses the outputs (velocities, water elevations, viscosity, and diffusivity) from the hydrodynamic flow model as inputs. Developing a water quality model requires several steps: aggregating the grids, and defining initial conditions, boundary conditions, and waste loads. These steps are crucial for building a model that can accurately predict how pollutants move and change in a water body over time. The time step selected for the water quality model was 5 min. The boundary conditions for the open boundaries included measured water quality parameter values for the same time. Defining waste load sources involves identifying point and non-point pollution sources. Point sources can be from agriculture, industry, and domestic discharges as several drains discharge their water into the study reach.

The processes library configuration tool (PLCT) is a graphical user interface that allows users to select and configure the water quality processes in the Delft3D-WAQ model. PLCT is divided into three main sections: substances, processes, and parameters. The substances section selects which constituents to model. The processes section chooses which processes to apply to each substance. Consequently, the parameters section in the water quality model specifies the parameters for each process. The selection of process parameters is crucial for accurately simulating water quality processes such as dispersion and chemical reactions. These parameters are specific to each substance being modeled and play a significant role in determining how the substance behaves in the water body. The selection of substances and their process parameters was based on available data and calibration requirements. The values of these parameters are derived from established equations and guidelines provided in the Delft3D Water Quality Manual and D-Water Quality Processes Technical Reference Manual. The selected substance groups and parameters are described in Table 1. The water quality model was run for the same periods as the hydrodynamic model: for minimum flow during February and average flow during September.

Table 1 Selected model substance groups, parameters, and processes using the PLCT tool

Calibration procedure and error analysis

Using both qualitative and quantitative methods to evaluate the model provides a more comprehensive understanding of its performance (Bennett et al. 2013). Qualitative evaluation is a way of assessing model performance by visually inspecting its output, such as a comparison graph between observed and simulated data which can be used to assess the model performance. Hydrodynamic and water quality models are calibrated using available data. The hydrodynamic model is first calibrated using water level measurements from Assiut Barrage during low, average, and high flow periods. Furthermore, water surface elevations and velocities are also calibrated against available field data. The outputs of the calibrated flow model are used as inputs for the water quality model. Simulation continuity is used to check the stability of the water quality model, which is regarded as a reliable sign that the hydrodynamic flow model is working as intended. The initial and boundary condition is set to have a concentration of 1 gm/m3. Any deviation from this value (1 gm/m3) indicates a numerical error during simulation. Consequently, water quality model calibration is performed using available data for BOD, DO, COD, and PO4 during February and September.

Model performance indicators can be used for quantitative evaluation. The Nash–Sutcliffe efficiency (NSE) measures how well a model’s output matches the observed data. A perfect model would have an NSE of 1.0, which means that the model’s output perfectly matches the observed data. A model with an NSE of zero does not match the observed data at all. The percent bias (PBIAS) measures the difference between the model’s output and the observed data, expressed as a percentage. A PBIAS of zero means that there is no bias, meaning that the model’s output is the same as the observed data. A PBIAS of 100 means that the model’s output is always 100% greater than the observed data. RMSE is a commonly used error index statistic as the lower RMSE reflects high model performance. RSR standardizes RMSE using the observation’s standard deviation. The lower the RSR, the lower the RMSE, and the better the model simulation performance (Moriasi et al. 2007). Equations (6), (7), (8), and (9) are used to calculate performance indicators, while Table 2

$$\text{NSE}=1-\left[\frac{{\sum }_{\text{i}=1}^{\text{n}} {\left({\text{X}}_{\text{i}}^{\text{obs }}-{\text{X}}_{\text{i}}^{\text{sim }}\right)}^{2}}{{\sum }_{\text{i}=1}^{\text{n}} {\left({\text{X}}_{\text{i}}^{\text{obs }}-{\text{X}}^{\text{mean }}\right)}^{2}}\right]$$
(6)
$$\text{PBIAS}=\left[\frac{{\sum }_{\text{i}=1}^{\text{n}} \left({\text{X}}_{\text{i}}^{\text{obs}}-{\text{X}}_{\text{i}}^{\text{sim}}\right)}{{\sum }_{\text{i}=1}^{\text{n}} \left({\text{X}}_{\text{i}}^{\text{obs}}\right)}\times (100)\right]$$
(7)
$$\text{RMSE}=\sqrt{\frac{{\sum }_{\text{i}=1}^{\text{N}} {\left({\text{X}}_{\text{i}}^{\text{obs }}-{\text{X}}_{\text{i}}^{\text{sim }}\right)}^{2}}{\text{N}}}$$
(8)
$$\text{RSR}=\frac{\text{RMSE}}{{\text{STDEV}}_{\text{obs}}}=\frac{\left[\sqrt{{\sum }_{\text{i}=1}^{\text{n}} {\left({\text{X}}_{\text{i}}^{\text{obs }}-{\text{X}}_{\text{i}}^{\text{sim }}\right)}^{2}}\right]}{\left[\sqrt[]{{\sum }_{\text{i}=1}^{\text{n}} {\left({\text{X}}_{\text{i}}^{\text{obs }}-{\text{X}}^{\text{mean }}\right)}^{2}}\right]}$$
(9)

where N is the total number of observed values, \({\text{X}}_{\text{i}}^{\text{obs}}\) is the observed value for the evaluated constituent, \({\text{X}}_{\text{i}}^{\text{sim}}\) is the corresponding simulated value, and \({\text{X}}^{\text{mean}}\) is the mean value of the observation data for the same constituent.

Table 2 General performance rating for recommended statistics (Moriasi et al. 2007)

shows the recommended values of performance indicators (Moriasi et al. 2007).

$$NSE=1-\left[\frac{{\sum }_{i=1}^{n} {\left({X}_{i}^{\text{obs }}-{X}_{i}^{\text{sim }}\right)}^{2}}{{\sum }_{i=1}^{n} {\left({X}_{i}^{\text{obs }}-{X}^{\text{mean }}\right)}^{2}}\right]$$
(10)
$$\text{PBIAS}=\left[\frac{{\sum }_{\text{i}=1}^{\text{n}} \left({\text{X}}_{\text{i}}^{\text{obs}}-{\text{X}}_{\text{i}}^{\text{sim}}\right)}{{\sum }_{\text{i}=1}^{\text{n}} \left({\text{X}}_{\text{i}}^{\text{obs}}\right)}\times (100)\right]$$
(11)
$$RMSE=\sqrt{\frac{{\sum }_{i=1}^{N} {\left({X}_{i}^{\text{obs }}-{X}_{i}^{\text{sim }}\right)}^{2}}{N}}$$
(12)
$$\text{RSR}=\frac{\text{RMSE}}{{\text{STDEV}}_{obs}}=\frac{\left[\sqrt{{\sum }_{i=1}^{n} {\left({X}_{i}^{\text{obs }}-{X}_{i}^{\text{sim }}\right)}^{2}}\right]}{\left[\sqrt{{\sum }_{i=1}^{n} {\left({X}_{i}^{\text{obs }}-{X}^{\text{mean }}\right)}^{2}}\right]}$$
(13)

where N is the total number of observed values, \({X}_{i}^{\text{obs}}\) is the observed value for the evaluated constituent, \({X}_{i}^{\text{sim}}\) is the corresponding simulated value, and \({X}^{\text{mean}}\) is the mean value of the observation data for the same constituent.

Executive scenarios

Several phosphate spill accidents occurred in the Nile River, each with varying concentrations (Raslan and Abdelbary 2001; Shama 2009a, b). However, due to a lack of comprehensive spill data, the assumptions about spill amounts were based on the maximum amount of phosphate released in an accident. The primary objective was to investigate the behavior of the spill plume under various flow conditions. Spill scenarios were carried out under minimum flow conditions in February and maximum flow conditions in September. A spill point was selected to be downstream of the Assuit barrage to simulate an instantaneous spill of phosphate. A total of 500 tons of phosphate was assumed to be spilled in the middle of the cross-section for 2 h, and the spill rate was specified as a specific mass distributed over this period. The accident was assumed to have occurred on February 4th and September 4th at 6:00 a.m.

Results

Calibration results

The calibration process was performed in two phases: hydrodynamic modeling and water quality modeling. First, water levels and velocity derived from the flow model were adjusted to match the measured data during the corresponding model duration. Subsequently, water quality parameters at different locations and periods were calibrated based on the available data.

Hydrodynamic model calibration

The simulated water level DS Assuit barrage was compared to the available water level using daily data during a month for minimum, average, and maximum flow. Several runs were performed using different values of Manning’s roughness coefficient until simulated and observed water levels showed good agreement. Manning’s roughness values used to range between 0.025 and 0.029. The results showed good agreement between simulated and observed data DS Assuit barrage during the minimum flow (Fig. 4), the average, flow (Fig. 5), and the maximum flow (Fig. 6).

Fig. 4
figure 4

Simulated and measured water level DS Assuit barrage during min flow

Fig. 5
figure 5

Simulated and measured water level DS Assuit barrage during average flow

Fig. 6
figure 6

Simulated and measured water level DS Assuit barrage during max flow

Furthermore, the water surface profile along the studied reach was compared with the simulated one during min, average, and maximum flow conditions revealing high accordance as shown in Fig. 7. Due to the leak of data, simulated velocity was compared to the measured one at the El-Mandra cross-section during May, as shown in Fig. 8. The performance indicators such as the Nash–Sutcliffe efficiency, percent bias, and observations standard deviation ratio showed a strong correlation between observed and simulated data with minimal modeling errors (see Table 3).

Fig. 7
figure 7

Simulated and measured water surface profile

Fig. 8
figure 8

Simulated and observed velocity at the El-Mandra cross-section

Table 3 Model performance results

Water quality model calibration

According to the results of the continuity simulation, it can be inferred that the model is well-equipped for simulating water quality.

During the calibration process, multiple values for process parameters within the acceptable range were tested to investigate how they impact the simulation results. The comparison between simulated and measured data was performed for each trial in addition to error estimation. The chosen parameter value was selected to align the simulated results with the calibrated data and minimize error. The selected values were aligned with the values used in some studies on the Nile River (Shehata et al. 2019; Mahmoud et al. 2020). (Table 4) shows the final values of different process parameters that obtained a good agreement of observation data with simulation results. The observation data and simulation results were compared during February as the minimum flow condition (Fig. 9) and September as the maximum flow condition (Fig. 10).

Table 4 Calibration process for water quality parameter
Fig. 9
figure 9

Water quality calibration results during February

Fig. 10
figure 10

Water quality calibration results during September

A spatial distribution for DO, BOD, and COD along the studied reach is shown in Figs. 11 and 12 for February and September, respectively. The results demonstrated how water quality parameters in the Nile River vary seasonally due to changes in flow and temperature between February and September. In addition, ortho-phosphate (PO4) concentration of PO4 in the Nile River ranges from less than 0.01 to over 1.0 mg/L, depending on the location and time of year. In general, the concentration of PO4 tends to be higher in the Nile River during the dry season, when water flow is lower and there is less dilution of nutrients.

Fig. 11
figure 11

Spatial distribution for simulated results (DO, BOD, and COD) during February

Fig. 12
figure 12

Spatial distribution for simulated results (DO, BOD, and COD) during September

Applied scenarios results

The results of both scenarios were illustrated as a spatial distribution along the studied reach, with the intervals corresponding to the travel time of phosphate. The concentration of phosphate was measured along the study reach at intervals of 12 h starting from the moment of the spill in February (Figure 13) and September (Fig. 14). The simulations showed that the shape and extent of the plume varied between maximum and minimum flow conditions, appearing more dispersed during periods of lower discharge. Additionally, the model demonstrated differences in the concentration and time taken for phosphate to transport downstream depending on flow levels. The plume reached the downstream of the studied reach by 7th February at 18:00 as shown in Fig. 13 (b). It took a total of 84 h to traverse the reach with a concentration of 13.96 mg/l as shown in Fig. 13 (c). On the other hand, during the maximum flow condition, the spill plume arrived at Menia on 7th September at 0:00, taking 72 h to pass through the reach with a concentration of 7.87 mg/l as shown in Fig. 14 (a) and (b).

Fig. 13
figure 13figure 13

Phosphate concentration distribution every 12 h from spill occurrence during February

Fig. 14
figure 14

Phosphate concentration distribution every 12 h from spill occurrence during September

In addition, the phosphate concentration was assessed at observation points located at Mallawy and El-Menia, as shown in Figs. 15 and 16. The simulations showed the phosphate plume took approximately 39 h to reach Mallawy during high flow periods, compared to 50 h under low flow conditions. The peak phosphate concentrations were also higher during low flow, at 21.4 mg/l, versus 12.59 mg/l when the flow was at a maximum condition.

Fig. 15
figure 15

Phosphate concentration at Mallawy and El-Menia during February

Fig. 16
figure 16

Phosphate concentration at Mallawy and El-Menia during September

Discussion

The spill accident in the Nile River was simulated based on calibration using actual accidents that have occurred along the Nile River. For the simulation, a spill scenario involving 500 tons of phosphate was chosen as the worst-case scenario, representing the maximum amount and shortest duration of such a spill accident. Studying water quality parameters in the Nile River’s fourth reach showed seasonal variation due to flow and temperature changes during minimum, average, and maximum flow. A study on a phosphate spill accident DS Assuit barrage showed different travel times for phosphate downstream, with a total of 84 h and a concentration of 13.96 mg/l during minimum flow conditions, and 72 h and a concentration of 7.87 mg/l in September during maximum flow conditions. The movement of phosphate is governed by advection and dispersion processes. Advection determines the initial shape of the pollutant plume, while dispersion leads to the mixing and dilution of contaminants throughout the river. Lateral diffusion and blending of phosphate across the river width were delayed until further downstream. Once a plume is formed, dispersion mechanisms such as turbulent mixing and molecular diffusion cause contaminants to mix across the width and depth, leading to dilution and spreading of the pollutants and a subsequent decrease in their concentration. The size and shape of the spill plume are influenced by factors such as pollutant type, quantity released, flow velocity, and depth. Under minimum flow conditions, the movement of spilled phosphate is delayed, and its concentration gradually decreases due to dispersion.

During maximum flow conditions, the plume is broader and exhibits increased turbulence and dispersion. The concentration of spilled material is higher during maximum flow conditions compared to minimum flow conditions at specific locations along the river. The results of the study indicate a strong correlation between river flow velocity and pollutant levels in the water. Higher flow velocity leads to a decrease in pollution concentration as a result of increased mixing and dilution, as shown in Figs. 13 and 14. This was observed at two points along the river, Mallawy and El-Menia, where the material reached these locations in a few hours with higher concentrations during maximum flow compared to minimum flow conditions, as shown in Figs. 15 and 16. The higher concentrations observed in this study highlight the importance of rapid response and containment measures to minimize the spread and impact of such spills. The significance of our study lies in the relevance of the existing knowledge in spill accident research and its ability to simulate actual spill accidents, which makes it significant. Applying a two-dimensional model provided the ability to study the flow behavior in both longitudinal and transverse directions. This affords an expanded understanding of the phosphate spill’s characteristics in addition to potential effects. Furthermore, as this approach is fundamental and applicable to other scenarios and research, it can represent a significant advancement in the modeling of spills in the Nile River Reach Four.

Studies on spill accidents in various rivers and industries all over the world proved the ability of hydrodynamic and water quality models to simulate and predict the effect of spill accidents on water quality parameters. SisBaHia, a 2D numerical model, was employed to simulate oil spill accidents in the Amazon River to study the physical and chemical characteristics of the plume and investigate areas of environmental vulnerability (Da Cunha et al. 2021; Araújo et al. 2023). A risk assessment was investigated for an industrial spill in the Ohio River, USA, during various flow conditions and spill duration. The results agreed with our study, confirming the influence of flow velocity on the peak time and duration of the plume (Behzadi et al. 2022). Similarly, Xin et al. (2012) proved that spill behavior is affected by the flow velocity of the Yangtze River, China, using the Mike 21 model. Guo and Cheng (2019) used the Delft3d model to examine the characteristics of a benzene spill plume in the Fen River, China, ignoring the variations of flow condition impacts. Delft3d was employed to study phenol leakage accidents in the Yellow River, China, with different scenarios, focusing on varying pollution levels without considering the impact of changing discharge and velocity on pollution behavior (Guo and Duan 2021).

Several studies have applied hydrodynamic and water quality models to assess the water quality of the Nile River, in Egypt, but few studies have investigated the impact of spill accidents on water quality. Mahmoud et al. (2020) and Salama et al. (2023) proved the ability of the Delft3d model to simulate spill accidents in different locations along the Nile River, but without considering the influence of flow conditions. Shehata et al. (2019) examined a spill accident in the same fourth reach but they used the one-dimensional HEC-RAS hydrodynamic model. In contrast, the Delft3D multi-dimensional model used in our research has demonstrated improved ability and accuracy in simulating both hydrodynamics and water quality (Shehata et al. 2019). The other differences are that our research utilized up-to-date data and simulated spill scenarios with shorter duration. This shorter spill duration led to higher observed contaminant concentrations, making it a more conservative or “worst-case” scenario compared to the previous study. The studies shared some core objectives around understanding the hydrodynamics and water quality, as well as modeling a spill scenario. However, they differed in terms of the specific modeling approaches, data sources, and characteristics of the spill simulation. The key advantage of your study appears to be the use of the more sophisticated Delft3D model and more current data.

The study confirmed the accuracy and reliability of the Delft3D model in simulating phosphate spills, which aligns with the findings of previous studies that used this model. Consequently, this represents further evidence and insights regarding the most efficient approach for simulating and predicting pollution behavior. However, with good agreement between the results and the measured data, further improvement of the model is required by comprehensive and updated data. It is important to note that the simulation of an actual phosphate spill accident was limited due to the lack of available data for the real accident to compare it with the simulated one. Additionally, the grid resolution was a factor that influenced the results, as the long study reach of 144 km required a lower time step, leading to a longer simulation duration and increased software storage. Consequently, the grid resolution was not sufficiently fine to ensure precise spill simulation.

Conclusion and recommendation

Spill accident simulation is a curious tool for understanding spill dangers and effects, in addition to guiding decision-makers in reducing the adverse effects of spills. Hydrodynamic and water quality modeling was performed and calibrated using the Delft3d program for Nile River reach from Assuit to El-Menia. The calibration shows a good agreement between observation and measured data for both hydrodynamic and water quality models during maximum and minimum flow conditions. An instantaneous 500 tons of phosphate was assumed to spill downstream of the Assuit barrage for 2 h for minimum and maximum flow conditions. The results indicated that during the initial stages of a spill, the dominant factor in the formation of the spill plume is the force of advection. After that, phosphate becomes mixed and diluted through dispersion. The characteristics of the plume are influenced by flow velocity and flow rate. During the minimum flow condition, the plume shape is typically narrow and elongated with high concentration. Whereas, during the maximum flow condition, it tends to be broader with low concentration. The spill plume took 84 h to reach the El-Menia downstream section, with a phosphate concentration of 13.96 mg/l at that point. In contrast, when the flow was at its maximum, the plume only took 72 h to get to the same downstream section, but with a lower concentration of 7.78 mg/l due to the higher flow carrying it further and dispersing it more quickly. Delft3D model proved an ability to represent key spill characteristics under the variety of flows analyzed within the river section studied. This study establishes a starting point for additional efforts going forward to fully develop predictive spill modeling for the Nile River and utilize such models to evaluate emergency response plans. The limitations faced by this research include grid resolution, the lack of data, and the long study reach. Consequently, modifications should be made to the Delft3D model to obtain more reliable and accurate results. These recommendations can be the first step toward more advanced research and studies. Implementing a three-dimensional model to study the behavior of spills at different depths can enhance the understanding of the effect of spilled materials on the ecosystem. Comparing the behavior of various substances spilled at different locations within the study area is crucial for preparing mitigation plans for including challenges of different types of pollution. It is recommended for future studies to investigate methods for removing spilled materials by implementing the most suitable cleanup methods such as skimmers, dispersants, or containment booms. This can minimize the impact of spill accidents on the ecosystem.