DOI:
https://doi.org/10.14483/22487638.16196Publicado:
2020-01-01Número:
Vol. 24 Núm. 63 (2020): Enero - MarzoSección:
Estudio de casoCritical flow in open channels: Numerical solution using the Newton-Raphson method for Android 4.0 applica-tion.
Flujo crítico en canales abiertos, solución numérica me-diante el método de Newton-Raphson para aplicación Android 4.0
Palabras clave:
application software, educational software, water flow, fluid dynamics, JavaScript code (en).Palabras clave:
código JavaScript, dinámica de fluidos, flujo de agua, programa informático, programa informático didáctico (es).Descargas
Referencias
Chow, V. T. (1994). Hidráulica de Canales Abiertos. Bogotá D.C.: McGraw-Hill.
Contreras, L.E., Escobar, I., & Tristancho, J. A. (2013). Estrategias educativas para el uso de las TIC en educación superior. Tecnura, 17, 161-173. https://doi.org/10.14483/22487638.7246
Diaz, J., & Benitez, F. (1998). Introducción a los métodos numéricos para la resolución de ecuaciones. Cádiz: Universidad de Cádiz.
Drumea, A. (2012). Education in development of electronic modules using free and open source software tools. Hidraulica, (3/4), 54-60.
Gasca, M. C., Camargo, L. L., & Medina, B. (2014). Metodología para el desarrollo de aplicaciones móviles. Tecnura, 18(40), 20-35. https://doi.org/10.14483/udistrital.jour.tecnura.2014.2.a02
Gómez, R., Galvis, A., & Mariño, O. (1998). Ingeniería de software educativo con modelaje orientado por objetos: un medio para desarrollar micromundos interactivos. Informática Educativa Uniandes Lidie, 11(1), 9-30.
Jonoski, A., Alfonso, L., Almoradie, A., Popescu, I., Van Andel, S., & Vojinovik, Z. (2012). Mobile phone applications in the water domain. Environmental Engineering and Management Journal, 11, 919-930. https://doi.org/10.30638/eemj.2012.116
Lindley, C. (2013). JavaScript Enligthment. Sebastopol: O'Reilly Media Inc.
Sotelo, F., & Solarte, M. F. (2014). Incorporación de recursos web como servicios de e-learning al sistema de gestión de aprendizaje. LRN: una revisión. Tecnura, 18(39), 165-180. https://doi.org/10.14483/udistrital.jour.tecnura.2014.1.a12
Sotelo, G. (2002). Hidráulica de Canales. México: Facultad de Ingeniería de la UNAM.
Vidal, M., Gómez, F., & Ruiz, A. (2010). Software Educativos. Educación Médica Superior, 24(1). Retrieved from http://scielo.sld.cu/scielo.php?script=sci_arttext&pid=S0864-21412010000100012
Cómo citar
APA
ACM
ACS
ABNT
Chicago
Harvard
IEEE
MLA
Turabian
Vancouver
Descargar cita
Recibido: 10 de junio de 2019; Aceptado: 18 de octubre de 2019
ABSTRACT
Context:
In this article we present an algorithm under JavaScript source code for critical flow equation solution.
Method:
An object-oriented programming language was implemented for Android 4.0 or higher systems based on iterative and incremental processes (Agile development). The numerical method of Newton-Raphson was used to determine the critical depth of seven hydraulic sections (rectangular, trapezoidal, asymmetric trapezoidal, triangular, asymmetric triangular, parabolic and circular). A potential function was obtained to establish the seed value in iterative process, in order to accelerate and guarantee the convergence level for each section. This value is directly associated with hydraulic problem pre-established conditions.
Results:
The application calculates: critical depth, critical speed, hydraulic area, specific energy, wet perimeter and mirror. The results calculated by the application were validated against Excel analysis tool (Goal Seek) results and Hcanales® software developed by Máximo Villón Béjar Engineer. Finally, the application is available for free in Google Play Store, with the name "Critical Flow in Channels. Newton Raphson Solution".
Conclusions:
It is possible to develop easily accessible applications that meet the technical conditions required for the resolution of engineering-related situations.
Keywords:
application software, educational software, water flow, fluid dynamics, JavaScript code.RESUMEN
Contexto:
En este artículo se presenta el desarrollo de un algoritmo bajo código fuente JavaScript para la solución de la ecuación de flujo crítico.
Método:
Se implementó un lenguaje de programación orientado a objetos para sistemas Android 4.0 o superiores, a partir de procesos iterativos e incrementales (desarrollo ágil). Se utilizó el método numérico de Newton-Raphson para determinar la profundidad crítica de siete secciones hidráulicas (rectangular, trapezoidal, trapezoidal asimétrico, triangular, triangular asimétrico, parabólico y circular). Con el propósito de acelerar y garantizar el nivel de convergencia para cada sección, se obtuvo una función potencial para establecer el valor semilla en el proceso iterativo; dicho valor se asocia de forma directa a las condiciones preestablecidas del problema hidráulico.
Resultados:
La aplicación calcula la profundidad crítica, velocidad crítica, área hidráulica, energía específica, perímetro mojado y el espejo. Los resultados fueron validados contra los obtenidos por medio de la herramienta para análisis de Excel (buscar objetivo) y por el software Hcanales® desarrollado por el ingeniero Máximo Villón Béjar. Finalmente, la aplicación se encuentra disponible de forma gratuita en Play Store (Google), con el nombre de "Flujo Crítico en Canales. Solución Newton Raphson".
Conclusiones:
Es posible desarrollar aplicaciones de fácil acceso que cumplan con las condiciones técnicas requeridas para la resolución de situaciones relacionadas con ingeniería.
Palabras clave:
código JavaScript, dinámica de fluidos, flujo de agua, programa informático, programa informático didáctico.INTRODUCTION
Teaching and learning ways must be in line with technological developments that are experienced today (Contreras, Escobar, & Tristancho, 2013;Sotelo & Solarte,2014).The generation of different learning scenarios leads the student to relate the influence of diverse variables and methodologies in real problems solution (Gómez, Galvis, & Mariño, 1998). In this sense, applications development for smartphones, becomes an attractive alternative (Gasca, Camargo, & Medina, 2014), when they are oriented to educational processes (Jonoski et al., 2012). Educational software (ES), are defined as applications or computer programs that facilitate the teaching-learning process (Vidal, Gómez, & Ruiz, 2010; Drumea, 2012). In the free-flowing hydraulic field, most equations that describe the flow behavior do not resist an analytical development, due mainly, to the non-linearity of the functions. Which requires numerical methods implementation that solve the hydraulic problem iteratively (Diaz & Benitez, 1998). In real flow problems it is necessary to use successive approximation methods (Vidal, Gómez, & Ruiz, 2010). The developed algorithm calculates the critical depth from the numerical method of Newton-Raphson, for 5 successive iterations, based on a preset seed value, which accelerates the convergence.
Critical Flow
The Froude Number relates the speed, the geometric parameters of the section and the gravitational effects. The critical depth of the flow is defined as the condition for which, the Froude Number (FN) is equal to 1, where the specific energy is minimal (equation 1). If FN < 1, a subcritical flow is established, and if NF > 1, the flow is supercritical (Figure 1).
Froude:
Where: V = Speed (m/s); A = Hydraulic area (m2); T = Mirror (m); g = Gravity (m/s2).
Function:
Where: Q = Flow (m3/s); A = Hydraulic area (m2); T = Mirror (m); g = Gravity (m/s2).
Derivative:
Newton Raphson Approach:
METHODOLOGY
For the application development we used iterative and incremental processes (Agile Development), in three specific phases:
-
In the first phase, the flow diagram of the iterative process for each of the hydraulic sections (rectangular, trapezoidal, trapezoidal asymmetric, triangular, triangular asymmetric, parabolic and circular) was established.
-
In the second phase, the source code (JavaScript) was developed (Lindley, 2013).
-
For the last phase, the application was validated by comparing the results against the values obtained by Excel analysis tool (Goal Seek) and by Hcanales® software.
The flow chart for the user interface is presented below, which varies according to the selected hydraulic section (Figure 2).
The algorithm shown in Figure 3, was used to program the solution for trapezoidal channel.
In case of a circular section, the height of critical depth exceeds the diameter value, the application generates a warning, where it is recommended to increase the diameter.
RESULTS
Trapezoidal Channel
When you start the application, a menu with seven options of hydraulic sections is displayed (rectangular, trapezoidal, asymmetric trapezoidal, triangular, asymmetric triangular, parabolic and circular). For each section, the algorithm calculates: critical depth, mirror, hydraulic radius, specific energy, flow type, hydraulic area, wet perimeter, critical flow velocity and the Froude number. In order to validate the application, it is proposed to determine the critical depth for a symmetric trapezoidal channel (figure 5), by means of three different methodologies: Newton Raphson, Goal Seek (Excel) and Hcanales®. Hydraulic channel conditions are in Table 1.
Hydraulic area:
Wet perimeter:
Hydraulic radius:
Mirror:
Specific Energy:
Considering (1), (2) and (3), we obtain:
Derivative hydraulic area:
Mirror derivative:
Approach Newton Raphson:
In the case of symmetric trapezoidal channel, the following function is proposed for seed value:
Where: Q = Flow rate (m³/ s); Y_c = Critical depth (m).
The results obtained from these three methodologies, generate the same value for the critical depth, under the initial conditions established.
Asymmetric Trapezoidal Channel
Considering (1), and with the purpose of verifying the capacity of the application for critical depth calculation, we proposed an asymmetric trapezoidal section, with these hydraulic conditions:
Hydraulic area:
Wet perimeter:
Hydraulic radius:
Mirror:
Hydraulic area derivative:
Mirror derivative:
From equations (2), (3) and (4), we can conclude that:
For the asymmetric trapezoidal channel, a potential function was implemented: critical depth vs. flow, for the initial value (seed value). This function accelerates the numerical method convergence. The visual code used in Excel is shown in Figure 9.
Circular Channel
To evaluate the Application results, we present the following hydraulic problem:
Central Angle
Hydraulic area:
Wet perimeter:
Hydraulic radius:
Mirror:
Hydraulic area derivative:
Newton Raphson Approach:
Where:
Figure 13. was constructed from the section factor for critical flow.
Finally, the application was submitted to some exercises development proposed in different Hydraulics books. In order to validate the algorithm developed, the results are presented in tables 10, 11 and 12. Similarly, the results calculated by the Application are shown in figures 15, 16 and 17.
CONCLUSIONS
The algorithm developed for the application "Diseño de Canales Hidráulicos HydroEolm" under JavaScript programming language avoids the use of calculation curves for critical depth. The results showed that the application effectively calculates the critical depth, critical speed, hydraulic area, specific energy, wet perimeter and the mirror.
In the application development, the results were compared with different exercises proposed in Hydraulics books, showing optimal outputs. Likewise, about 95 hydraulic exercises were performed, which were validated by comparing the application results against results obtained from three different methodologies (Goal Seek, Newton-Rapson, Hcanales®).
Finally, the development of algorithms for operating systems compatible with iOS and Windows is recommended, which expands the coverage of the application to a greater number of users. This application has been downloaded in Colombia, Bolivia, Peru, Costa Rica and Algeria.
REFERENCES
Licencia
Esta licencia permite a otros remezclar, adaptar y desarrollar su trabajo incluso con fines comerciales, siempre que le den crédito y concedan licencias para sus nuevas creaciones bajo los mismos términos. Esta licencia a menudo se compara con las licencias de software libre y de código abierto “copyleft”. Todos los trabajos nuevos basados en el tuyo tendrán la misma licencia, por lo que cualquier derivado también permitirá el uso comercial. Esta es la licencia utilizada por Wikipedia y se recomienda para materiales que se beneficiarían al incorporar contenido de Wikipedia y proyectos con licencias similares.