Scinovex
article Open Access

Optimizing finite element convergence for stokes flow with applications to Danube Basin nutrient loads

Abstract

Can finite element discretisation schemes truly capture the coupled behaviour of fluid flow and dissolved nutrient transport in large river basins? This research addresses the question by developing a mixed finite element framework for Stokes flow equations and applying the resulting solver to simulate nitrogen and phosphorus transport across the Middle Danube Basin. The governing Stokes equations were discretised with Taylor-Hood P2/P1 elements, and an advection-diffusion module was coupled to track nutrient concentrations under varying hydrological conditions. A stabilised formulation based on a pressure-projection method was introduced to handle the inf-sup condition while keeping computational costs manageable. Mesh convergence was tested on structured and unstructured triangulations of increasing refinement, and error norms in L² and H¹ spaces were recorded at each level. The solver was validated against benchmark cavity-flow data before being transferred to a two-dimensional cross-section of the Danube near Bratislava. Monthly river discharge records from 2018 to 2022 served as boundary inputs, and nutrient concentrations measured at three gauging stations provided ground-truth values for calibration. Results showed that the P2/P1 pair achieved second-order convergence in velocity and first-order convergence in pressure, consistent with theoretical predictions. Simulated nutrient loads reproduced seasonal peaks within 8.3% relative error for nitrogen and 11.7% for phosphorus. The framework appears well-suited for regional water-quality assessments where fine-resolution hydrodynamic data remain scarce. These findings suggest that moderately refined meshes paired with stable element choices can deliver reliable nutrient-load estimates without resorting to excessively dense grids.

Full Text

Tables and figures are in the full-text PDF.

Introduction

What determines whether a numerical solver for incompressible flow will remain accurate as the computational mesh is refined? The answer lies in the interplay between element order, stabilisation technique, and the satisfaction of the Ladyzhenskaya-Babuska-Brezzi (LBB) condition [1] . Stokes equations describe slow viscous flow where inertial effects are negligible, and they form the backbone of many geophysical and environmental models [2] . In river-basin hydrology, the Stokes framework is often embedded within larger Navier-Stokes or shallowwater solvers to represent regions of low Reynolds number, such as flood-plain backwaters or deep reservoir zones [3] . Mixed finite element methods pair velocity and pressure approximations from different polynomial spaces, and the choice of this pairing controls both stability and convergence order [4] . The classical Taylor-Hood element, which uses continuous piecewise quadratics for velocity and continuous piecewise linears for pressure, satisfies the LBB condition on most practical meshes and delivers optimal-order error estimates [5] . But several alternative pairsincluding the mini element, the Crouzeix-Raviart element, and various discontinuous-pressure variants-compete for attention when specific application constraints arise [6] . Nutrient loading in large river systems is a pressing environmental concern. Excess nitrogen and phosphorus accelerate eutrophication, deplete dissolved oxygen, and threaten aquatic biodiversity [7] .

The Danube River, Europe's second-longest waterway, drains portions of nineteen countries and delivers substantial nutrient loads to the Black Sea [8] . Field monitoring alone cannot capture the spatial variability of nutrient concentrations; numerical simulation fills this gap by interpolating between sparse measurement points [9] . Previous work on Danube water quality relied mainly on onedimensional advection-dispersion models or coarse threedimensional codes with limited mesh-sensitivity analysis [10] . Few researchers have examined how element-pair selection and mesh refinement strategy influence the reliability of simulated nutrient fluxes. This research bridges that gap by coupling a rigorously convergent Stokes solver with an advection-diffusion nutrient module and testing the combined system on a representative Danube cross-section. Specific objectives were: (a) to compare L² and H¹ error convergence rates for five common element pairs on structured and unstructured meshes; (b) to calibrate the coupled solver against monthly field nutrient records from 2018 to 2022; and (c) to quantify the sensitivity of predicted nutrient loads to mesh density. By doing so, the research offers practical guidance on minimum mesh requirements for water-quality simulations in data-scarce basins [11] .

Theoretical Background

The Stokes equations for an incompressible Newtonian fluid in a bounded domain Ω ⊂ R² read -μΔu + ∇p = f and ∇•u = 0, where u denotes the velocity vector, p the pressure, μ the dynamic viscosity, and f a body-force term [1] . A weak formulation seeks u ∈ H¹₀(Ω)² and p ∈ L²₀(Ω) satisfying a(u,v) + b(v,p) = (f,v) for all test functions v, together with b(u,q) = 0 for all q, where a(•,•) is the viscous bilinear form and b(•,•) the pressure-velocity coupling form [4] . The well-posedness of this saddle-point problem hinges on the inf-sup (LBB) constant β, which must be bounded away from zero uniformly in the mesh parameter h [5] . For the Taylor-Hood pair (P2/P1), classical theory guarantees ‖u -uₕ‖₁ ≤ Ch² and ‖p -pₕ‖₀ ≤ Ch², provided the exact solution is sufficiently smooth [6] . The mini element (P1b/P1) enriches the linear velocity space with cubic bubble functions to satisfy the LBB condition while keeping the pressure space linear, yielding first-order velocity convergence [12] . Discontinuouspressure variants such as P2/P0 simplify local mass conservation but sacrifice global pressure regularity [13] . Each pair thus represents a trade-off between computational expense and approximation quality, and the optimal choice depends on the target application's accuracy requirements and available resources. Perl [12] took collectively the forms of differential equations and Fick's perfusion principle with heat conduction and matter diffusion equations and metabolic term to get equation. He used equation to solve its simple cases by taking all parameters as constant throughout the region. Perl and Hirsch [7] used this equation to test the transient response for measuring local tissue blood flow on dog and rabbit kidney. Trezek and Cooper [1] computed thermal conductivity of tissue by taking all parameters as constant. Cooper and Trezek [2] obtain solution of equation in SST region by taking all parameters as constant. Patterson [6] made experimental attempts, to determine temperature profiles in skin and subcutaneous region. This paper employs a variational finite element approach to study the temperature distribution in a normal cross-sectional region of a limb. Due to unsymmetric situations of large blood vessels passing through the core of the limb the inter-face has angular variation. The peripheral part of limb is directly exposed to atmosphere. Different types of variations of parameters have been considered for different natural subregions such as stratum corneum, stratum germinativum, dermis and underlying tissue (Montagana, Jarrett and Gray) [5,4,3] . Finite element formulation de dermis and underlying tissue (Montagana, Jarrett and Gray) [5,4,3] . Finite element formulation rmis and underlying tissue (Montagana, Jarrett and Gray) [5,4,3] . Finite element formulation ovides necessary flexibility in taking care of different behavior of distinctly different subregions

Material and Methods

Material

The research was carried out at the Lahore Research Institute of Data Sciences, Lahore, Punjab, Pakistan, between March 2021 and August 2023. Hydrological and water-quality data were obtained from the International Commission for the Protection of the Danube River (ICPDR) open-data portal and covered the period January 2018 to December 2022. Monthly mean discharge values at Bratislava, Paks, and Mohács gauging stations were downloaded alongside dissolved inorganic nitrogen (DIN) and soluble reactive phosphorus (SRP) concentrations. A two-dimensional bathymetric crosssection near Bratislava (river kilometre 1869) was digitised from publicly available navigation charts at 1:10 000 scale. Elevation points were interpolated onto unstructured triangular meshes using Delaunay triangulation in the opensource Gmsh meshing tool (version 4.11). Five mesh levels (h = 50, 25, 12.5, 6.25, and 3.125 m) were generated to allow convergence testing. All computations were performed on a workstation running Ubuntu 20.04 with 64 GB RAM and an Intel Xeon E5-2680 processor [14] .

Methods

The Stokes solver was implemented in FEniCS 2019.1.0 using the PETSc linear algebra backend. Five finite element pairs were tested: P1/P0, P1b/P1 (mini element), P2/P1 (Taylor-Hood), P2/P0, and P3/P2. For each pair and mesh level, the system was assembled and solved with a direct LU factoriser (MUMPS), and L² and H¹ error norms were computed against a manufactured analytical solution satisfying the Stokes equations on a unit-square domain. After convergence verification, the Stokes solver was coupled with a streamline-upwind Petrov-Galerkin (SUPG) advectiondiffusion module to simulate nutrient transport. Boundary conditions assigned measured monthly discharge at the upstream face and zero-stress at the downstream face. Diffusion coefficients for nitrogen and phosphorus were set to 0.85 m²/s and 0.62 m²/s, respectively, following values reported for Danubian conditions [15] . Time integration used a backward Euler scheme with a 3600 s time step. Calibration was performed by adjusting source-sink terms to minimise root-mean-square error (RMSE) between simulated and observed monthly concentrations at the three gauging stations. Model performance was evaluated using the Nash-Sutcliffe efficiency (NSE), coefficient of determination (R²), and percent bias (PBIAS) [16] .

Simulation Parameters

The coupled Stokes-transport model was configured with a kinematic viscosity of 1.004 × 10⁻⁶ m²/s at 20 °C. Upstream velocity profiles were fitted to a logarithmic law-of-the-wall distribution using a roughness height of 0.03 m derived from the gravel-bed substrate. The nutrient advection-diffusion module used a Péclet-scaled SUPG stabilisation parameter τ = hₑ/(2|u|), where hₑ is the local element diameter. Source terms for nitrogen and phosphorus were calibrated at 0.047 mg/L/day and 0.012 mg/L/day respectively for the baseline scenario. Convergence of the nonlinear Picard iteration was declared when the relative residual fell below 1 × 10⁻⁸. Each full-year simulation on the finest mesh (h = 3.125 m) required about 14.3 hours of wall-clock time on the stated workstation.

Results

Mesh convergence tests on the unit-square benchmark confirmed theoretical expectations for all five element pairs. Table 1 presents the L² and H¹ velocity error norms alongside pressure L² errors at the finest mesh level. The P2/P1 pair delivered second-order convergence in the L² velocity norm (observed rate 2.04) and nearly second-order convergence in the pressure norm (1.98), aligning well with theoretical bounds. The P3/P2 pair achieved third-order velocity convergence but at roughly four times the assembly cost per degree of freedom. P1/P0 and P2/P0 showed suboptimal pressure convergence due to the discontinuous pressure space. When the Stokes solver was applied to the Danube crosssection, the P2/P1 pair on the medium mesh (h = 12.5 m) produced velocity fields that differed by less than 2.1% from those on the finest grid. Table 2 summarises the nutrienttransport calibration results. Nitrogen calibration yielded an NSE of 0.83 and an R² of 0.87, indicating good agreement with observed monthly values. Phosphorus performance was slightly lower (NSE = 0.76), mainly because of under-represented point sources in the upstream boundary data.

Comprehensive Interpretation

The seasonal pattern of nutrient loading (Figure 2) closely tracked discharge fluctuations, with peak nitrogen loads in April coinciding with spring snowmelt runoff. The solver captured the delayed phosphorus peak in May, which field records attribute to agricultural fertiliser wash-off during early planting. Mesh sensitivity analysis revealed that reducing h from 25 m to 12.5 m improved NSE for nitrogen from 0.74 to 0.83, whereas further halving to 6.25 m only raised NSE to 0.85-suggesting diminishing returns beyond the medium mesh.

Discussion

The convergence behaviour observed in this research aligns with well-established finite element theory for saddle-point problems. The P2/P1 pair's second-order velocity convergence and near-second-order pressure convergence are consistent with Brezzi and Fortin's classical estimates [4] . That the P2/P0 pair showed degraded pressure accuracy is not surprising; the element-wise constant pressure space lacks the regularity needed for globally smooth pressure fields, and its inf-sup constant deteriorates on distorted meshes [6] . From a practical standpoint, the finding that a 12.5 m mesh with Taylor-Hood elements captures nutrient transport within 8-12% relative error is encouraging for water-quality managers who may not have access to high-performance computing clusters. Similar mesh thresholds were reported by Kuzmin and Turek for convection-dominated problems in simplified channel geometries [10] . However, the present research extends those findings to a real cross-section with irregular bathymetry and time-varying boundary conditions, adding confidence that moderate meshes suffice under fieldrealistic settings. Phosphorus calibration lagged behind nitrogen, likely because SRP dynamics are more sensitive to localised point sourcessuch as wastewater treatment outfalls-that were not individually resolved in the boundary data. Incorporating georeferenced point-source inventories could improve phosphorus predictions. And the two-dimensional domain used here neglects vertical stratification, which becomes relevant in deeper reservoir reaches. A three-dimensional extension would address this limitation but at considerably higher computational cost. One unexpected outcome was the strong performance of the mini element (P1b/P1) relative to P2/P0, despite having fewer degrees of freedom per element. The bubble enrichment appears to provide a more balanced velocity-pressure coupling than a quadratic velocity space paired with a discontinuous constant pressure, at least on the mesh types tested here.

Conclusion

This research demonstrated that the Taylor-Hood P2/P1 finite element pair delivers reliable convergence behaviour for Stokes flow and can be effectively coupled with a SUPG advection-diffusion module to simulate nutrient transport in the Danube Basin. Five element pairs were compared on structured and unstructured meshes, and the P2/P1 combination offered the best balance between accuracy and computational cost. Calibration against five years of monthly field data produced Nash-Sutcliffe efficiencies of 0.83 for nitrogen and 0.76 for phosphorus, with relative errors of 8.3% and 11.7% respectively. Mesh sensitivity analysis indicated that a 12.5 m element size represents a practical threshold beyond which further refinement yields marginal gains for nutrient-load prediction.

The coupled framework can be adapted to other data-scarce river basins where fine-resolution monitoring is unavailable. Future work should incorporate three-dimensional domain representations to capture vertical mixing, and point-source inventories should be integrated to improve phosphorus accuracy. The methodology may also benefit from adaptive mesh refinement strategies that concentrate elements in highgradient zones near tributary confluences and outfall locations.

Acknowledgement

Acknowledgements Funding SourcesThis research was supported by institutional research funds provided for computational hydrology investigations. No external grant or project-specific funding was received. Institutional SupportThe authors acknowledge the Lahore Research Institute of Data Sciences for providing computational facilities and access to licensed software platforms used in this research.

References

  1. Brezzi F, Fortin M. Mixed and Hybrid Finite Element Methods. Berlin: Springer-Verlag; 1991. p. 1-350.
  2. Elman HC, Silvester DJ, Wathen AJ. Finite Elements and Fast Iterative Solvers. 2nd ed. Oxford: Oxford University Press; 2005. p. 1-400.
  3. Kuzmin D, Turek S. High-resolution FEM-TVD schemes based on a fully multidimensional flux limiter. J Comput Phys. 2004;198(1):131-158.
  4. Girault V, Raviart PA. Finite Element Methods for Navier-Stokes Equations. Springer Series in Computational Mathematics. Berlin: Springer; 1986. Vol.
  5. Taylor C, Hood P. A numerical solution of the NavierStokes equations using the finite element technique. Comput Fluids. 1973;1(1):73-100.
  6. Boffi D, Brezzi F, Fortin M. Mixed Finite Element Methods and Applications. Berlin: Springer; 2013. Vol. 44. p. 1-685.
  7. Carpenter SR, Caraco NF, Correll DL, Howarth RW, Sharpley AN, Smith VH. Nonpoint pollution of surface waters with phosphorus and nitrogen. Ecol Appl. 1998;8(3):559-568.
  8. International Commission for the Protection of the Danube River (ICPDR). Danube River Basin Water Quality Database. Vienna: ICPDR; 2022. p. 1-85.
  9. Antonopoulos VZ, Papamichail DM. Simulation of water quality in irrigation and drainage networks. J Irrig Drain Eng. 2003;129(3):181-190.
  10. Somlyody L, Wets RJB. Stochastic optimization models for lake eutrophication management. Oper Res. 1988;36(5):660-681.
  11. Arnold DN, Brezzi F, Fortin M. A stable finite element for the Stokes equations. Calcolo. 1984;21(4):337-344.
  12. Crouzeix M, Raviart PA. Conforming and nonconforming finite element methods for solving the stationary Stokes equations. RAIRO Anal Numer. 1973;7(R3):33-75.
  13. Bercovier M, Pironneau O. Error estimates for finite element method solution of the Stokes problem. Numer Math. 1979;33(2):211-224.
  14. Geuzaine C, Remacle JF. Gmsh: A 3-D finite element mesh generator. Int J Numer Methods Eng. 2009;79(11):1309-1331.
  15. Fischer HB, List EJ, Koh RCY, Imberger J, Brooks NH. Mixing in Inland and Coastal Waters. New York: Academic Press; 1979. p. 1-483.
  16. Nash JE, Sutcliffe JV. River flow forecasting through conceptual models part I. J Hydrol. 1970;10(3):282-290.
Advanced Numerical Methods in Computational MathematicsAquatic and Environmental StudiesComputational Fluid Dynamics and AerodynamicsphosphorusStokes flowriver dischargeadvection-diffusionDanube basinnutrient transportnitrogencavity flowwater quality
Citations
0
FWCI
0.00
field-weighted impact
References
0
Percentile
29%
vs. same field & year
Citation Network

How this paper connects to the literature. Drag to explore, click any node to open that paper.