# Analysis of Water Quality Improvement Effect of Controlled River by Multi-Functional Weir Operation
## 2 Research Background
### EFDC (Environmental Fluid Dynamics Code) Overview  
EFDC is a software program developed by the Virginia Institute of Marine Science and is maintained and managed by the Environmental Protection Agency (EPA) of the United States of America. It consists of a hydrodynamics model, a water quality model, and a sediment transport model. It is capable of quasi-three-dimensional (3D) hydraulic and water quality analysis in various areas, such as rivers, lakes, and coastal systems. The hydrodynamic model, which is the basis of simulation using EFDC, uses the time-averaged Navier-Stokes equation as the governing equation. It uses the curvilinear-orthogonal coordinate in the horizontal direction and the sigma coordinate in the vertical direction. The momentum equations of the hydrodynamics model in the x and y directions are as follows [12]:  
\[\frac{\partial}{\partial t}\left(m_{x}m_{y}Hu\right)+\frac{ \partial}{\partial x}\left(m_{y}Huu\right)+\frac{\partial}{\partial y}\left(m _{x}Hvu\right)+\frac{\partial}{\partial z}\left(m_{x}m_{y}wu\right)-f_{e}m_{x} m_{y}Hv \tag{1}\] \[= -m_{y}H\frac{\partial}{\partial x}\left(p+p_{atm}+\phi\right)+m_ {y}\left(\frac{\partial}{\partial x}z_{b}^{*}+z\frac{\partial}{\partial x}H \right)\frac{\partial}{\partial z}p+\frac{\partial}{\partial z}\left(m_{x}m_{ y}\frac{A_{v}}{H}\frac{\partial}{\partial z}u\right)\] \[+\frac{\partial}{\partial x}\left(\frac{m_{y}}{m_{x}}HA_{H}\frac{ \partial}{\partial x}u\right)+\frac{\partial}{\partial y}\left(\frac{m_{x}}{m _{y}}HA_{H}\frac{\partial}{\partial y}u\right)-m_{x}m_{y}c_{p}D_{p}\left(u^{2} +v^{2}\right)^{1/2}u\] \[\frac{\partial}{\partial t}\left(m_{x}m_{y}Hv\right)+\frac{ \partial}{\partial x}\left(m_{y}Huv\right)+\frac{\partial}{\partial y}\left(m _{x}Hvv\right)+\frac{\partial}{\partial z}\left(m_{x}m_{y}ww\right)+f_{e}m_{x }m_{y}Hu\] \[= -m_{x}H\frac{\partial}{\partial y}\left(p+p_{atm}+\phi\right)+m_ {x}\left(\frac{\partial}{\partial y}z_{b}^{*}+z\frac{\partial}{\partial y}H \right)\frac{\partial}{\partial z}p+\frac{\partial}{\partial z}\left(m_{x}m_ {y}\frac{A_{v}}{H}\frac{\partial}{\partial z}v\right)\] \[+\frac{\partial}{\partial x}\left(\frac{m_{y}}{m_{x}}HA_{H}\frac {\partial}{\partial x}v\right)+\frac{\partial}{\partial y}\left(\frac{m_{x}}{m _{y}}HA_{H}\frac{\partial}{\partial y}v\right)-m_{x}m_{y}c_{p}D_{p}\left(u^{2} +v^{2}\right)^{1/2}v\]  
where \(u\), \(v\), and \(w\) are flow velocities in the x, y, and z directions. \(m_{x}\) and \(m_{y}\) are scale factors in the x and y directions. \(A_{H}\) and \(A_{V}\) are eddy viscosities in the horizontal and vertical directions. \(z_{s}\)*, \(z_{b}\)* are the physical vertical coordinates of the free surface and bed. \(H\) is the water depth, \(f_{e}\) is the effective Coriolis acceleration, \(D_{p}\) is the dimensionless projected vegetation area, and \(c_{p}\) is the drag coefficient. As the motion equation for the vertical direction, the following equation assuming hydrostatic pressure was used:  
\[\frac{\partial}{\partial z}p=-gHb=-gH(\rho-\rho_{o})\rho_{o}^{-1} \tag{3}\]  
where \(\rho\) and \(\rho_{o}\) are the density and reference density, respectively, and denotes the buoyancy. In addition, the continuity equation is as follows:  
\[\frac{\partial}{\partial t}\left(m_{x}m_{y}H\right)+\frac{\partial}{\partial x }\left(m_{y}Hu\right)+\frac{\partial}{\partial y}\left(m_{x}Hv\right)+\frac{ \partial}{\partial z}\left(m_{x}m_{y}w\right)=0 \tag{4}\]The water quality model of EFDC calculates the spatio-temporal distribution of water quality factors using the flow calculation results of the hydrodynamics model, and utilizes the following 3D advection-diffusion equation as the governing equation. \[