IberWQ: A GPU Accelerated Tool for 2D Water Quality Modeling in Rivers and Estuaries
Abstract
1. Introduction
2. Model Structure and Equations
2.1. Model Structure
2.2. Model Equations
2.3. Numerical Solver
2.4. Parallelization
3. Test Cases
3.1. Faecal Contamination in a Coastal Estuary
3.1.1. Description
3.1.2. Results
3.2. Organic Matter Contamination in an Estuary
3.2.1. Description
3.2.2. Results
3.3. Combined Sewer Overflows in a River Miño Reach
3.3.1. Description
3.3.2. Results
3.4. Effluent Discharge from a Wastewater Treatment Plant
3.4.1. Description
3.4.2. Results
4. Conclusions
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
Appendix A. Reaction Terms
Appendix B. pH model
Appendix C. Model Constants
Constant | Units | Suggested Values | Description | |
Min | Max | |||
mg/mg | 0.7 | 9.0 | Ratio of Nitrogen to Chl-A in phytoplankton | |
mg/mg | 0.1 | 2.0 | Ratio of Phosphorus to Chl-A in phytoplankton | |
mg/mg | 14 | 180 | Ratio of Oxygen to Chl-A in phytoplankton | |
mg/mg | - | - | Ratio of Carbon to Chl-A in phytoplankton | |
1/day | 0.04 | 0.8 | Phytoplankton respiration rate | |
1/day | 1.0 | 3.0 | Maximum photosynthesis rate | |
1/day | 0.05 | 0.5 | Phytoplankton death rate | |
- | 0.0 | 1.0 | Phytoplankton preference factor for ammonia | |
m/day | - | - | Phytoplankton settling velocity | |
mg/L | 0.01 | 0.3 | Nitrogen half-saturation constant for photosynthesis attenuation | |
mg/L | 0.001 | 0.05 | Phosphorus half-saturation constant for photosynthesis attenuation | |
mg/L | - | - | Carbon half-saturation constant for photosynthesis attenuation | |
W/m2 | 0.05 | 0.3 | Light half-saturation constant for photosynthesis attenuation | |
mg/L | - | - | Oxygen half-saturation constant for respiration attenuation | |
1/m | - | - | Light extinction coefficient in water | |
m/day | - | - | Organic phosphorus settling velocity | |
m/day | - | - | Inorganic phosphorus settling velocity | |
1/day | 0.01 | 0.7 | Organic phosphorus hydrolysis rate at 20 °C | |
1/day | 0.01 | 1.0 | Nitrification rate at 20 °C | |
1/day | 0.02 | 0.4 | Organic nitrogen hydrolysis rate at 20 °C | |
1/day | 0.001 | 0.1 | Denitrification rate at 20 °C | |
m/day | 0.001 | 0.1 | Organic nitrogen settling velocity | |
mg/L | Oxygen half-saturation constant for nitrification attenuation | |||
mg/L | Oxygen half-saturation constant for denitrification attenuation | |||
1/day | 0.02 | 3.4 | CBOD degradation rate at 20 °C | |
m/day | 0.01 | 0.36 | CBOD settling velocity | |
mg/L | Oxygen half-saturation constant for CBOD degradation attenuation | |||
kg/m2/day | 0.0 | 0.01 | Sediment oxygen demand rate | |
mg/mg | - | - | Ratio of oxygen consumed per organic carbon oxidized to inorganic carbon | |
1/day | Mancini | Degradation constant for E. coli |
Appendix D. Time Series for Test 3
Appendix E. Time Series for Test 4
Appendix F. Data Sources for the Test Cases
Bathymetry | Bathymetric survey carried out for previous studies. Spatial resolution of 30 m. |
Effluent Discharge and Concentration | Virtual |
Streamflow | Annual average flow from river Grande de Xubia. Available from the regional Meteorological Agency MeteoGalicia (www.meteogalicia.gal). |
Tide | Tidal harmonics obtained from the tidal gauge of Ferrol. Available from Puertos del Estado (www.puertos.es). |
Bathymetry | Bathymetric survey carried out for previous studies. Spatial resolution of 30 m. |
Effluent Discharge and Concentration | Sewer network model carried out in previous studies. |
Streamflow | Annual average flow from river Mero. Available from the regional Meteorological Agency MeteoGalicia (www.meteogalicia.gal). |
Tide | Tidal harmonics obtained from the tidal gauge of A Coruña. Available from Puertos del Estado (www.puertos.es). |
Bathymetry | Bathymetric survey carried out in [44]. |
Effluent Discharge and Concentration | Sewer network model carried out in [46] and [46]. |
Streamflow | River discharge obtained from a Water Quality Automatic Information System (SAICA) located upstream the river reach under study. Available from the regional water administration Confederación Hidrográfica del Miño-Sil (www.chminosil.es). |
Bathymetry | Digital terrain model at 2 m resolution, obtained from LiDAR data from the Spanish National Plan of Aerophotogrammetry (PNOA), available from the Spanish National Geographic Institute (www.ign.es). |
Effluent Discharge and Concentration | Virtual. |
Streamflow | Annual average flow obtained from the regional water administration Confederación Hidrográfica del Guadalquivir (www.chguadalquivir.es). |
References
- Foundation of Water Research. Urban Pollution Management Manual: A Planning Guide for the Management of Urban Wastewater Discharges During Wet Weather; Foundation of Water Research: Buckinghamshire, UK, 1998. [Google Scholar]
- Robinson, R.B.; Roby, J.C. Concentration-duration-frequency curves for pH in a stream in the great smoky mountains. J. Environ. Eng. 2006, 132, 1600–1605. [Google Scholar] [CrossRef]
- Schwartz, J.S.; Dahle, M.; Bruce Robinson, R. Concentration-duration-frequency curves for stream turbidity: Possibilities for assessing biological impairment. J. Am. Water Resour. Assoc. 2008, 44, 879–886. [Google Scholar] [CrossRef]
- Di Toro, D.; Fitzpatrick, J.; Thomann, R. Documentation for Water Quality Analysis Simulation Program (WASP) and Model Verification Program (MVP); United States Environmental Protection Agency: Washington, DC, USA, 1983.
- Ambrose, R. WASP4, a Hydrodynamic and Water Quality Model: Model Theory, User’s Manual and Programmer’s Guide; United States Environmental Protection Agency: Washington, DC, USA, 1988.
- Chapra, S.C.; Pelletier, G.J.; Tao, H. QUAL2K: A Modeling Framework for Simulating River and Stream Water Quality; Version 2.11: Documentation and Users Manual; Civil and Environmental Engineering Dept., Tufts University: Medford, MA, USA, 2008. [Google Scholar]
- Cole, T.M.; Buchak, E.M. CE-QUAL-W2: A Two-Dimensional, Laterally Averaged, Hydrodynamic and Water Quality Model; Version 2.0: User Manual; US Army Corps of Engineers: Vicksburg, MS, USA, 1995. [Google Scholar]
- Cole, T.M.; Wells, S.A. CE-QUAL-W2: A Two-Dimensional, Laterally Averaged, Hydrodynamic and Water Quality Model; Version 3.5; US Army Engineering and Research Development Center: Vicksburg, MS, USA, 2006. [Google Scholar]
- Kashefipour, S.M.; Lin, B.; Harris, E.; Falconer, R.A. Hydro-environmental modelling for bathing water compliance of an estuarine basin. Water Res. 2002, 36, 1854–1868. [Google Scholar] [CrossRef]
- Kay, D.; Stapleton, C.M.; Wyer, M.D.; McDonald, A.T.; Crowther, J.; Paul, N.; Jones, K.; Francis, C.; Watkins, J.; Wilkinson, J.; et al. Decay of intestinal enterococci concentrations in high-energy estuarine and coastal waters: Towards real-time T 90 values for modelling faecal indicators in recreational waters. Water Res. 2005, 39, 655–667. [Google Scholar] [CrossRef] [PubMed]
- Wu, Y.; Falconer, R.; Lin, B. Modelling trace metal concentration distributions in estuarine waters. Estuarine Coast. Shelf Sci. 2005, 64, 699–709. [Google Scholar] [CrossRef]
- Gao, G.; Falconer, R.A.; Lin, B. Numerical modelling of sediment–bacteria interaction processes in surface waters. Water Res. 2011, 45, 1951–1960. [Google Scholar] [CrossRef]
- Abu-Bakar, A.; Ahmadian, R.; Falconer, R.A. Modelling the transport and decay processes of microbial tracers in a macro-tidal estuary. Water Res. 2017, 123, 802–824. [Google Scholar] [CrossRef]
- Cea, L.; Bermúdez, M.; Puertas, J.; Bladé, E.; Corestein, G.; Escolano, E.; Conde, A.; Bockelmann-Evans, B.; Ahmadian, R. IberWQ: New simulation tool for 2D water quality modelling in rivers and shallow estuaries. J. Hydroinf. 2016, 18, 816–830. [Google Scholar] [CrossRef]
- Frick, W.E.; Roberts, P.J.W.; Davis, L.R.; Keyes, J.; Baumgartner, D.J.; George, K.P. Dilution Models for Effluent Discharges, 4th ed.; (Visual Plumes); U.S. Environmental Protection Agency, Office of Research and Development: Washington, DC, USA, 2003.
- Doneker, R.L.; Jirka, G.H. CORMIX-GI systems for mixing zone analysis of brine wastewater disposal. Desalination 2001, 139, 263–274. [Google Scholar] [CrossRef]
- Kiesel, J.; Schmalz, B.; Brown, G.L.; Fohrer, N. Application of a hydrological-hydraulic modelling cascade in lowlands for investigating water and sediment fluxes in catchment, channel and reach. J. Hydrol. Hydromech. 2013, 61, 334–346. [Google Scholar] [CrossRef][Green Version]
- D’Ambrosio, E.; Gentile, F.; de Girolamo, A.M. Assessing the sustainability in water use at the basin scale through water footprint indicators. J. Clean. Prod. 2019, 244, 118847. [Google Scholar] [CrossRef]
- Bladé, E.; Cea, L.; Corestein, G.; Escolano, E.; Puertas, J.; Vázquez-Cendón, E.; Dolz, J.; Coll, A. Iber: herramienta de simulación numérica del flujo en ríos. Rev. Int Metodos Numer. Para Calculo Diseno Ing. 2014, 30, 1–10. [Google Scholar] [CrossRef]
- Michaud, J.P. A Citizien’s Guide to Understanding and Monitoring Lakes and Streams; Washington State Department of Ecology, Publications Office: Olympia, WA, USA, 1991.
- García-Feal, O.; González-Cao, J.; Gómez-Gesteira, M.; Cea, L.; Domínguez, J.M.; Formella, A. An accelerated tool for flood modelling based on Iber. Water (Switzerland) 2018, 10, 1459. [Google Scholar] [CrossRef]
- Chapra, S.C. Surface Water-Quality Modeling; McGraw-Hill: New York, NY, USA, 1997; ISBN 1478608307. [Google Scholar]
- Cea, L.; Puertas, J.; Vázquez-Cendón, M.E. Depth averaged modelling of turbulent shallow water flow with wet-dry fronts. Arch. Comput. Meth. Eng. 2007, 14, 303–341. [Google Scholar] [CrossRef]
- Millero, F.J.; Poisson, A. International one-atmosphere equation of state of seawater. Deep Sea Res. Part A 1981, 28, 625–629. [Google Scholar] [CrossRef]
- Bowie, G.; Mills, W.; Porcella, D.; Campbell, C.; Pagenkopf, J.; Rupp, G.; Johnson, K.; Chan, P.; Gherini, S.; Chamberlin, C. Rates, Constants, and Kinetics Formulations in Surface Water Quality Modeling; EPA: Athens, GA, USA, 1985.
- Cea, L.; Vázquez-Cendón, M.E. Unstructured finite volume discretisation of bed friction and convective flux in solute transport models linked to the shallow water equations. J. Comput. Phys. 2012, 231, 3317–3339. [Google Scholar] [CrossRef]
- Versteeg, H.K.; Malalasekera, W. An Introduction to Computational Fluid Dynamics—The Finite Volume Method; Pearson Education: New York, NY, USA, 2007. [Google Scholar]
- Jasak, H.; Weller, H.G.; Gosman, A.D. High resolution NVD differencing scheme for arbitrarily unstructured meshes. Int. J. Numer. Methods Fluids 1999, 31, 431–449. [Google Scholar] [CrossRef]
- Nvidia Corporation CUDA C Programming Guide. Available online: https://docs.nvidia.com/cuda/pdf/CUDA_C_Programming_Guide.pdf (accessed on 17 December 2019).
- Crespo, A.J.C.; Domínguez, J.M.; Rogers, B.D.; Gómez-Gesteira, M.; Longshaw, S.; Canelas, R.; Vacondio, R.; Barreiro, A.; García-Feal, O. DualSPHysics: Open-source parallel CFD solver based on Smoothed Particle Hydrodynamics (SPH). Comput. Phys. Commun. 2015, 187, 204–216. [Google Scholar] [CrossRef]
- Crossley, A.; Lamb, R.; Waller, S. Fast solution of the Shallow Water Equations using GPU technology. In Proceedings of the British Hydrological Society 3rd International Symposium, Newcastle, UK, 13–19 July 2010. [Google Scholar]
- Vacondio, R.; Dal Palù, A.; Mignosa, P. GPU-enhanced finite volume shallow water solver for fast flood simulations. Environ. Modell. Softw. 2014, 57, 60–75. [Google Scholar] [CrossRef]
- Lacasta, A.; Morales-Hernández, M.; Murillo, J.; García-Navarro, P. An optimized GPU implementation of a 2D free surface simulation model on unstructured meshes. Adv. Eng. Softw. 2014, 78, 1–15. [Google Scholar] [CrossRef]
- Liu, Q.; Qin, Y.; Li, G. Fast Simulation of Large-Scale Floods Based on GPU Parallel Computing. Water 2018, 10, 589. [Google Scholar] [CrossRef]
- NVIDIA Corporation NVIDIA Tesla V100 GPU Architecture. Available online: https://images.nvidia.com/content/volta-architecture/pdf/volta-architecture-whitepaper.pdf (accessed on 7 December 2019).
- Moon, B.; Jagadish, H.V.; Faloutsos, C.; Saltz, J.H. Analysis of the Clustering Properties of Hilbert Space-filling Curve. IEEE Trans. Knowl. Data Eng. 2001, 13, 124–141. [Google Scholar] [CrossRef]
- Nvidia CUB. Available online: https://nvlabs.github.io/cub/ (accessed on 7 December 2019).
- NVIDIA Corporation NVIDIA Turing GPU Architecture. Available online: https://www.nvidia.com/content/dam/en-zz/Solutions/design-visualization/technologies/turing-architecture/NVIDIA-Turing-Architecture-Whitepaper.pdf (accessed on 2 February 2020).
- Cea, L.; Bermúdez, M.; Puertas, J. Uncertainty and sensitivity analysis of a depth-averaged water quality model for evaluation of Escherichia Coli concentration in shallow estuaries. Environ. Modell. Softw. 2011, 26, 1526–1539. [Google Scholar] [CrossRef]
- García-Barcina, J.M.; Oteiza, M.; de la Sota, A. Modelling the faecal coliform concentrations in the Bilbao estuary. Hydrobiologia 2002, 475, 213–219. [Google Scholar] [CrossRef]
- Kashefipour, S.M.; Lin, B.; Falconer, R.A. Modelling the fate of faecal indicators in a coastal basin. Water Res. 2006, 40, 1413–1425. [Google Scholar] [CrossRef] [PubMed]
- Manache, G.; Melching, C.S.; Lanyon, R. Calibration of a continuous simulation fecal coliform model based on historical data analysis. J. Environ. Eng. 2007, 133, 681–691. [Google Scholar] [CrossRef]
- Bode, A.; Álvarez-Ossorio, M.T.; González, N.; Lorenzo, J.; Rodríguez, C.; Varela, M.; Varela, M.M. Seasonal variability of plankton blooms in the Ria de Ferrol (NW Spain): II. Plankton abundance, composition and biomass. Estuarine Coast. Shelf Sci. 2005, 63, 285–300. [Google Scholar] [CrossRef]
- Anta Álvarez, J.; Bermúdez, M.; Cea, L.; Suárez, J.; Ures, P.; Puertas, J. Modelización de los impactos por DSU en el río Miño (Lugo). Ingeniería del agua 2015, 19, 105–116. [Google Scholar] [CrossRef]
- Stumm, W.; Morgan, J. Aquatic Chemistry: Chemical Equilibria and Rates in Natural Waters; Wiley: New York, NY, USA, 1996. [Google Scholar]
- Piñeiro, J.; Maestro, I.; Aguirre, F.; Ures, P.; Torres, D.; Anta, J.; Puertas, J.; Suárez, J. Análisis del funcionamiento de un depósito-aliviadero en el sistema de saneamiento unitario en la aglomeración de Lugo. In Proceedings of the Actas de las II Jornadas de Ingeniería del Agua, Barcelona, Spain, 5–6 October 2011. [Google Scholar]
Model | Run Time (s) | Time per Step (ms) | Millions of Cells per Second | Speedup vs. Iber |
---|---|---|---|---|
Iber | 60,545 | 66.8 | 2.2 | 1 |
Iber+ GPU | 335 | 0.4 | 400.0 | 181 |
Model | Run Time (s) | Time per Step (ms) | Millions of Cells per Second | Speedup vs. Iber |
---|---|---|---|---|
Iber | 31,615 | 28.8 | 1.8 | 1 |
Iber+ GPU | 522 | 0.5 | 107.1 | 61 |
Model | Run Time (s) | Time per Step (ms) | Millions of Cells per Second | Speedup vs. Iber |
---|---|---|---|---|
Iber | 3054 | 8.6 | 1.0 | 1 |
Iber+ GPU | 105 | 0.3 | 30.2 | 29 |
Model | Run Time (s) | Time per Step (ms) | Millions of Cells per Second | Speedup vs. Iber |
---|---|---|---|---|
Iber | 44,367 | 146.5 | 0.6 | 1 |
Iber+ GPU | 482 | 1.6 | 56.9 | 92 |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
García-Feal, O.; Cea, L.; González-Cao, J.; Domínguez, J.M.; Gómez-Gesteira, M. IberWQ: A GPU Accelerated Tool for 2D Water Quality Modeling in Rivers and Estuaries. Water 2020, 12, 413. https://doi.org/10.3390/w12020413
García-Feal O, Cea L, González-Cao J, Domínguez JM, Gómez-Gesteira M. IberWQ: A GPU Accelerated Tool for 2D Water Quality Modeling in Rivers and Estuaries. Water. 2020; 12(2):413. https://doi.org/10.3390/w12020413
Chicago/Turabian StyleGarcía-Feal, Orlando, Luis Cea, José González-Cao, José Manuel Domínguez, and Moncho Gómez-Gesteira. 2020. "IberWQ: A GPU Accelerated Tool for 2D Water Quality Modeling in Rivers and Estuaries" Water 12, no. 2: 413. https://doi.org/10.3390/w12020413
APA StyleGarcía-Feal, O., Cea, L., González-Cao, J., Domínguez, J. M., & Gómez-Gesteira, M. (2020). IberWQ: A GPU Accelerated Tool for 2D Water Quality Modeling in Rivers and Estuaries. Water, 12(2), 413. https://doi.org/10.3390/w12020413