The water quality simulation model comprises of two modules: (i) The Flow model and (ii) Reactive transport model.

#### 2.1.1. The Flow Model

The Flow model numerically solves the one-dimensional Saint-Venant equations for flow in a channel [

37]. It may be noted that the proposed model is not applicable for flow in an estuary. The governing equations for a non-prismatic rectangular tidal river are:

where,

h = flow depth (m),

u = cross-sectional averaged flow velocity (m/s),

B = width of the river (m),

R = hydraulic mean depth =

A/P (m),

A = Cross sectional area (m

^{2}),

P = wetted perimeter (m),

η = tidal height above a reference datum (m),

Q_{L} = lateral flow into the river through the loading point,

n = Manning’s roughness coefficient of the river bed and

g = acceleration due to gravity.

Equations (1) and (2) were numerically solved using the classical Preissmann implicit scheme [

37], for the specified initial and boundary conditions. Temporal variation of water release rate,

Q_{u} was specified as the upstream boundary condition. Temporal variation in the tidal water level above a mean value was specified as the downstream boundary condition. Tidal level variation was taken as a combination of six harmonic components. To start with, upstream flow rate and the downstream water level corresponded to the lowest level of a large spring tide. Water levels and flow rates at intermediate locations were specified arbitrarily as equal to the boundary values. The flow model was then run for one complete spring-neap cycle (approximately 34 days) to obtain the initial conditions corresponding to the next cycle. Other inputs to the flow model included the cross-sectional characteristics, bed profile, roughness coefficient and lateral inflow values at sewage treatment plant (STP) outlets along the river. Spatial and temporal variations of flow depth in terms of water elevation above mean level and flow rate were obtained as part of the solution.

#### 2.1.2. Transport Model

The reactive transport model in the present study is based on the simple model proposed by Rodrigues et al. [

26] for N

_{2}O emissions from a tidal river. It simultaneously solves the fate and transport equations for (i) NH

_{4}^{+}, (ii) NO

_{3}^{−} and (iii) N

_{2}O. These equations are based on the following assumptions: (i) All the components are well mixed in the cross-section, and so the transport is considered only in the flow direction. (ii) There is no reduction of N

_{2}O into molecular nitrogen, N

_{2}. (iii) Generation of NH

_{4}^{+}is from a diffuse homogeneous source from sediment at the bed, at the same rate throughout the length of the river. (iv) Although anoxic denitrification in the bed sediment also contributes to N

_{2}O generation, it is insignificant and neglected. (v) Nitrous oxide generation is from nitrification in the water column. (vi) Nitrification and algal uptake are first order reactions. It is assumed that most of the organic matter in the wastewater gets treated before nitrogen removal stage and so BOD/COD (chemical oxygen demand) are not tracked in this study.

In the present work, the model developed by Rodrigues et al. [

26] has been adopted for simulating the N

_{2}O production from the river. This model has been applied to Tyne river in the UK by them. Nitrifiers are usually present in the river, as well as STP effluent. Field data from the Tyne river in the year 2000 [

26] indicated that Tyne river was supersaturated with N

_{2}O. Much of the nitrification was occurring in the top layers of water column, where the nitrifiers were available from the sewage treatment plant effluent. Although nitrifiers were also present in the river, they were mostly present in the bed sediment. It was hypothesized that these nitrifiers might not be responsible for N

_{2}O generation because the suspended sediment concentration in the river was low.

Sediment-generated N

_{2}O resulting from the anoxic denitrification may also result in elevated concentrations. However, for the particular case of Tyne river, it was found that the concentration of N

_{2}O was much higher near surface waters making the sewage-input NH

_{4} and its nitrification to be the main N

_{2}O contributor [

26]. It was also found that dissolved oxygen was high along the river [

26], making the N

_{2}O generation due to anoxic conditions negligible. However, there is a potential for N

_{2}O generation due to denitrification in the bed sediment in other rivers.

As the data related to the quantification of bacteria/their growth was not available during their study, Rodrigues et al. [

26] have adopted a potential approach for nitrification kinetics. In this approach, bacterial density was parameterised by a single coefficient for nitrification

${K}_{NIT}$. N

_{2}O was an intermediate product of the nitrification process. This model was calibrated for Tyne river. Authors have adopted the same model in the present work. The governing equations may be written as given below [

26]:

where,

${N}_{1}={\mathrm{NH}}_{4}{}^{+}$,

${N}_{2}={\mathrm{NO}}_{3}{}^{-}$;

${N}_{3}={\mathrm{N}}_{2}\mathrm{O}$ concentrations (mg/L);

${D}_{x}$ = longitudinal dispersion coefficient (m

^{2}/s);

${q}_{L}$ = rate of lateral flow into the river per unit length through the loading point (m

^{2}/s);

${N}_{{}_{1}}$ = ammonium concentration in the lateral flow (mg/L);

${N}_{{2}_{L}}$ = nitrate concentration in the lateral flow (mg/L);

${N}_{{3}_{L}}$ = nitrous oxide concentration in the lateral flow (mg/L);

$\varnothing 1$ = Arrhenius coefficient;

${R}_{Ammon}$ = rate of ammonification (/day);

${K}_{NIT}$ = rate constant for nitrification, /day;

${K}_{Alg-up}$ = rate constant for algal uptake, /day;

$\propto $ = first order rate constant for transfer of N

_{2}O across air-water interface;

${N}_{{3}_{atm}}$ = nitrous oxide concentration in water at air-water interface which is under equilibrium with the surrounding air = 0.224 (mg/L) [

38].

Equations (3)–(5) represent transport (advection and dispersion) and reactive processes for ammonium, nitrate and nitrous oxide. In the present simulation model [

26], ammonium gets generated from a benthic process through ammonification. It gets depleted because of nitrification to produce

${\mathrm{NO}}_{3}{}^{-}$ and is also consumed because of algal uptake. N

_{2}O gets generated as a fraction of the rate of nitrification (0.25%). N

_{2}O gets emitted into the atmosphere when

${N}_{3}$ exceeds

${N}_{{3}_{atm}}$. Variation of the longitudinal dispersion coefficient is written as summation of time-averaged and transient components wherein the transient component can be written as a cosine harmonic function [

39].

where,

$A$ = Amplitude of the function,

$\omega $ = angular velocity of the function,

$\varphi $ = phase angle. In the present study,

A(

x),

$\omega $ and

$\varphi \left(x\right)$ were found out using calibration, and the ranges for variations were obtained from Park and James [

39]. Only measured values of ammonium concentration were used in calibration. Calibrated set of values were used for transport of all the contaminants in the Tyne estuary.

To solve the transport model, the following inputs are needed: Initial spatial distribution of all involved components, boundary conditions, i.e., temporal variations at upstream and downstream boundaries, loading at different intermediate locations, flow depth and flow rate. It may be noted here that output from the solution of flow equations was provided as input for flow velocity and flow cross-sectional area while solving the transport equations. At the upstream tidal limit, the measured concentration of each component was specified as the boundary condition. The zero concentration gradient was specified as the downstream boundary condition. Essentially the same results were obtained if the measured concentrations were specified as the boundary condition at the downstream boundary. The semi-implicit finite-difference scheme was used to solve the transport equation.