Submitted:
26 June 2025
Posted:
27 June 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
1.1. Equation
1.2. Concepts
1.3. Solution Methods
1.3. Galerkin’s Method
1.3.1. Variational Formulation
1.3.2. Approach Space
1.3.3. Galerkin Discretization
1.3.4. Error Analysis
1.3.5. Instability
1.4. Related Works
2. Materials and Methods
2.1. Mathematical Models
2.2. Shape Functions
2.3. Regular Mesh
2.4. Connectivity Matrix
2.5. Elementary Matrix and Force Vector
2.6. User Interface
- main_cdr.py: This is the main file that contains initialization, the user interface, and all the used functions;
- get_config: This function retrieves all data entered in the user interface and verifies it;
- nodes: This function creates the regular mesh. The first column is the X coordinate, the second column is the Y coordinate, and each row represents a different node. The order of the nodes in this matrix determines the overall node numbering;
- tc3: This function generates the connectivity matrix. As shown in Figure 2, each row represents a triangular element and its component nodes;
- cccnpg: A function that transforms Cartesian coordinates to natural coordinates at a Gauss point;
- kefe2DT: A function that obtains the elemental matrix and force vector, corrected according to ASGS stabilization;
- ffT: A function that generates shape functions and their derivatives at a Gauss point for a given polynomial degree;
- vffydp2DT: Calculates the values of the shape functions and their partial derivatives at all Gauss points for triangular elements and all polynomial degrees;
- gauss2DT: Function to obtain matrices with Gauss weights and points;
- es2: Assembles and solves the system of equations under the entered parameters.
3. Results
3.1. Evolution with Polynomial Degree
3.1. Other Functions for Source Term
4. Discussion
| Name | Technique | Advantages | Limitations |
|---|---|---|---|
| CDR-Solv (Present Study) | ASGS stabilization with Python implementation | Open-source accessibility, educational value, high-order finite elements up to p=3, robust stabilization, user-friendly interface | Limited to structured meshes, requires Python environment |
| Nadukandi et al. (2010) | High-Resolution Petrov-Galerkin (HRPG) with linear elements | Superior shock-capturing, second-order accuracy in smooth regimes | Complex parameter calibration, limited to 1D problems, requires specialized implementation |
| Liu et al. (2021) | Localized Method of Fundamental Solutions (LMFS) with MATLAB | Meshless approach, sparse matrix structure, large-scale capability | Requires MATLAB license, complex mathematical formulation, limited geometric flexibility |
| Mkhatshwa & Khumalo (2022) | Trivariate Spectral Collocation (TSQLM) with MATLAB | Exceptional accuracy (10−17), minimal grid points, spectral convergence | MATLAB dependency, limited to elliptic problems, requires specialized mathematical expertise |
| Parhizi et al. (2022) | Green’s Function analytical approach | Pure analytical framework, superior computational speed, exact solutions | Limited to specific source terms, complex mathematical derivations, restricted geometric applications |
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- R. Cachay Torres, “Influencia del término difusivo en el modelamiento de transporte de masa usando la ecuación de convección difusión no lineal,” Universidad Nacional de Trujillo, 2024. [Online]. Available: https://dspace.unitru.edu.pe/items/756435db-e611-4478-8241-7f1be2b71638.
- C. P. Castro Torres, “Evaluación de la concentración de material radiactivo disperso en la atmósfera a través de la ecuación de difusión: Solución de la ecuación de advección para la liberación instantánea de contaminantes,” ESCUELA POLITÉCNICA NACIONAL, 2023. [Online]. Available: https://bibdigital.epn.edu.ec/handle/15000/24851.
- C. H. Galeano, J. M. Mantilla, and D. A. Garzón-Alvarado, “Experimentos numéricos sobre ecuaciones de reacción convección difusión con divergencia nula del campo de velocidad,” Rev. Int. métodos numéricos para cálculo y diseño en Ing., vol. 26, no. 2, pp. 69–81, 2010, [Online]. Available: https://core.ac.uk/download/pdf/41822303.pdf.
- J. A. M. López, “Análisis numérico de un método de Galerkin para un problema evolutivo no lineal,” Universidad de Córdoba, 2024. [Online]. Available: https://repositorio.unicordoba.edu.co/entities/publication/7f44654d-3d7b-4993-8ea8-020412477bd2.
- A. F. Hernández Marulanda and L. J. Gaviria Posada, “Solución de la ecuación de convección difusión mediante las funciones de base radial multicuádricas,” Ing. USBMed, vol. 11, no. 2, pp. 48–53, Oct. 2020. [CrossRef]
- F. C. Osorio Guzman, P. A. Amador Rodriguez, and C. A. Bedoya Parra, “Solución Numérica de una ecuación de convección-difusión no local fraccionaria,” Entre Cienc. e Ing., vol. 18, no. 35, pp. 25–31, Jun. 2024. [CrossRef]
- Peinado Asensi, “Resolución de ecuaciones de convección-difusión en 2D usando el método de las diferencias finitas compactas,” Universitat Politècnica de València, 2019. [Online]. Available: https://riunet.upv.es/handle/10251/129534.
- T. Coronado González, “Adaptación de mallados de elementos finitos conformes utilizando elementos de tipo hexaedro,” Universidad Politécnica de Madrid, 2021. [Online]. Available: https://oa.upm.es/67850/.
- C. A. Torres Rodríguez, “Desarrollo de código bidimensional transitorio para el estudio de la transferencia de calor en flujo laminar e incompresible aplicado a convección natural con alta variación de relaciones de aspecto,” [sn], 2022. [Online]. Available: https://repositorio.unicamp.br/acervo/detalhe/1242115.
- D. Broersen and R. P. Stevenson, “A Petrov-Galerkin discretization with optimal test space of a mild-weak formulation of convection-diffusion equations in mixed form,” IMA J. Numer. Anal., vol. 35, no. 1, pp. 39–73, Jan. 2015. [CrossRef]
- M. Benítez and B. Cockburn, “Post-processing for spatial accuracy-enhancement of pure Lagrange–Galerkin schemes applied to convection-diffusion equations,” IMA J. Numer. Anal., vol. 42, no. 1, pp. 54–77, Jan. 2022. [CrossRef]
- P. Knobloch and L. Tobiska, “On the stability of finite-element discretizations of convection-diffusion-reaction equations,” IMA J. Numer. Anal., vol. 31, no. 1, pp. 147–164, Jan. 2011. [CrossRef]
- W. Morton, “The convection-diffusion Petrov-Galerkin story,” IMA J. Numer. Anal., vol. 30, no. 1, pp. 231–240, Jan. 2010. [CrossRef]
- Y. Chen and B. Cockburn, “Analysis of variable-degree HDG methods for convection-diffusion equations. Part I: general nonconforming meshes,” IMA J. Numer. Anal., vol. 32, no. 4, pp. 1267–1293, Oct. 2012. [CrossRef]
- V. Dolejsi, M. Feistauer, V. Kucera, and V. Sobotikova, “An optimal L (L2)-error estimate for the discontinuous Galerkin approximation of a nonlinear non-stationary convection-diffusion problem,” IMA J. Numer. Anal., vol. 28, no. 3, pp. 496–521, Nov. 2007. [CrossRef]
- Chen and H. Bagci, “Steady-State Simulation of Semiconductor Devices Using Discontinuous Galerkin Methods,” IEEE Access, vol. 8, pp. 16203–16215, 2020. [CrossRef]
- B. B. King and D. A. Krueger, “The 1-D convection diffusion equation: Galerkin least squares approximations and feedback control,” in 2004 43rd IEEE Conference on Decision and Control (CDC) (IEEE Cat. No.04CH37601), IEEE, 2004, pp. 1502-1507 Vol.2. [CrossRef]
- H. Gómez, I. Colominas, F. L. Navarrina Martínez, and M. Casteleiro Maldonado, “Un nuevo enfoque para el tratamiento de los términos difusivos en la ecuación de convección-difusión en el método de Galerkin discontinuo,” Rev. Int. métodos numéricos para cálculo y diseño en Ing., vol. 23, no. 4, pp. 343–362, 2007, [Online]. Available: https://engineering.purdue.edu/gomez/assets/pdf/art03.pdf.
- H. Chen, J. Li, and W. Qiu, “Robust a posteriori error estimates for HDG method for convection–diffusion equations,” IMA J. Numer. Anal., vol. 36, no. 1, p. drv009, Mar. 2015. [CrossRef]
- P. Nadukandi, E. Oñate, and J. Garcia, “A high-resolution Petrov–Galerkin method for the 1D convection–diffusion–reaction problem,” Comput. Methods Appl. Mech. Eng., vol. 199, no. 9–12, pp. 525–546, Jan. 2010. [CrossRef]
- P. Nadukandi, E. Oñate, and J. García, “A high-resolution Petrov–Galerkin method for the convection–diffusion–reaction problem. Part II—A multidimensional extension,” Comput. Methods Appl. Mech. Eng., vol. 213–216, pp. 327–352, Mar. 2012. [CrossRef]
- S. A. Lima, M. Kamrujjaman, and M. S. Islam, “Numerical solution of convection–diffusion–reaction equations by a finite element method with error correlation,” AIP Adv., vol. 11, no. 8, Aug. 2021. [CrossRef]
- A. Shirzadi, L. Ling, and S. Abbasbandy, “Meshless simulations of the two-dimensional fractional-time convection–diffusion–reaction equations,” Eng. Anal. Bound. Elem., vol. 36, no. 11, pp. 1522–1527, Nov. 2012. [CrossRef]
- S. Liu, P.-W. Li, C.-M. Fan, and Y. Gu, “Localized method of fundamental solutions for two- and three-dimensional transient convection-diffusion-reaction equations,” Eng. Anal. Bound. Elem., vol. 124, pp. 237–244, Mar. 2021. [CrossRef]
- P. Theeraek, S. Phongthanapanich, and P. Dechaumphai, “Solving convection-diffusion-reaction equation by adaptive finite volume element method,” Math. Comput. Simul., vol. 82, no. 2, pp. 220–233, Oct. 2011. [CrossRef]
- P. Mkhatshwa and M. Khumalo, “Trivariate Spectral Collocation Approach for the Numerical Solution of Three-Dimensional Elliptic Partial Differential Equations,” Mathematics, vol. 10, no. 13, p. 2260, Jun. 2022. [CrossRef]
- J. Wei, Y. Ge, and Y. Wang, “High-Order Compact Difference Method for Solving Two- and Three-Dimensional Unsteady Convection Diffusion Reaction Equations,” Axioms, vol. 11, no. 3, p. 111, Mar. 2022. [CrossRef]
- S. Ullmann, C. Müller, and J. Lang, “Stochastic Galerkin Reduced Basis Methods for Parametrized Linear Convection–Diffusion–Reaction Equations,” Fluids, vol. 6, no. 8, p. 263, Jul. 2021. [CrossRef]
- X. Xiao, X. Feng, and Z. Li, “A gradient recovery–based adaptive finite element method for convection-diffusion-reaction equations on surfaces,” Int. J. Numer. Methods Eng., vol. 120, no. 7, pp. 901–917, Nov. 2019. [CrossRef]
- S. T. Zalesak, “Fully multidimensional flux-corrected transport algorithms for fluids,” J. Comput. Phys., vol. 31, no. 3, pp. 335–362, Jun. 1979. [CrossRef]
- Parhizi, G. Kilaz, J. K. Ostanek, and A. Jain, “Analytical solution of the convection-diffusion-reaction-source (CDRS) equation using Green’s function technique,” Int. Commun. Heat Mass Transf., vol. 131, p. 105869, 2022. [CrossRef]














Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 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/).