DADavid Angwenyi

David Angwenyi

*This is an algorithmically generated author record based on publicly available information.

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article


David Angwenyi has a total of 18 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Open Access

    Three-dimensional numerical simulation, sensitivity analysis, and practical implications for crude oil pipeline flow

    by Sarah Khaindi Wandabwa, David Angwenyi, Frankline Tireito

    This paper presents comprehensive three-dimensional numerical simulations of crude oil flow in pipelines using the finite element method to investigate the effects of inlet velocity, fluid viscosity, pipe diameter, and bend curvature on flow behavior and energy consumption. The validated Navier–Stokes solver with k-epsilon turbulence model is employed. Results show that pressure drop increases linearly with velocity in laminar flow and as U^1.75 in turbulent flow; doubling velocity increases pumping power by a factor of 6.4. Bitumen (μ = 0.5 Pa·s) experiences 43 times higher pressure drop than light crude (μ = 0.001 Pa·s) at the same flow rate. Pressure drop scales as D^-5 at constant flow rate; increasing diameter from 0.5 m to 0.8 m reduces annual energy costs by 94%. Long-radius bends (Rc/D ≥ 3) reduce bend losses by 50–60% compared to short-radius bends, following the correlation K = 0.21(Rc/D)^-0.5. Sensitivity analysis identifies inlet velocity as the most influential parameter (SU = 1.78), and uncertainty quantification yields a combined uncertainty of ±15.3% in pressure drop predictions. These findings provide quantitative guidance for pipeline design, operation, and cost optimization.

  • Open Access

    Three-dimensional navier–stokes formulation, finite element discretization, stability analysis, and validation for crude oil pipeline flow

    by Sarah Khaindi Wandabwa, David Angwenyi, Frankline Tireito

    This paper presents a comprehensive formulation of the three-dimensional Navier–Stokes equations for viscous, incompressible crude oil flow in pipelines, including finite element discretization, energy stability analysis, and thorough validation. The governing equations are derived from first principles using the Reynolds transport theorem. A Newtonian constitutive relation appropriate for light to medium crude oils is adopted. The weak formulation is obtained using the Galerkin method, while the finite element discretization employs Taylor–Hood P2–P1 elements that satisfy the discrete inf–sup condition. The Crank–Nicolson scheme is used for temporal integration. For turbulent flows, the standard k–ε model is incorporated. Energy stability is established for both the continuous and semidiscrete formulations. The model is validated against the analytical Hagen–Poiseuille solution for laminar flow, achieving maximum relative errors below 0.05% and a root mean square error of 8.2 × 10⁻⁵ m/s. For turbulent flow, validation against Laufer’s experimental data at Re = 50,000 yields a coefficient of determination of R² = 0.996, with errors below 4% for wall shear stress and the skin friction coefficient. A detailed implementation section covering mesh generation, solver specifications, and computational costs is also provided. These results confirm the accuracy and reliability of the proposed model for predicting velocity profiles, pressure drops, and turbulence characteristics in pipeline flows.

  • Open Access

    Stochastic modelling of predator–prey dynamics in a three-patch ecosystem

    by Lucian Talu Mayabi, David Angwenyi, Duncan Oganga

    This study presents a stochastic predator-prey model in a three-patch ecosystem, motivated by cage-based fish farming. Each patch hosts prey and predator populations, with inter-patch prey migration and unbounded variations in the population represented by stochastic terms. The model integrates logistic prey growth, predation, and mortality within a coupled system of stochastic differential equations. We assess stochastic stability using stochastic Lyapunov function methods. Numerical simulations confirm that when predator efficiency ei < 1, the total population remains bounded, indicating stability. However, for ei > 1, the system becomes unstable. The model also demonstrates that prey populations remain viable under low harvesting rates (ν1 = ν2 = ν3 = 0.02) and moderate noise intensities (0.10 ≤ σ ≤ 0.90). This work contributes to sustainable resource management by offering a robust framework for modeling predator-prey interactions in multi-patch environments.

  • Open Access

    Second order extended ensemble Kalman filter with stochastically perturbed innovation for initializing artificial neural network weights

    by Cavin Oyugi Ongere, David Angwenyi, Robert Oryiema

    Artificial neural networks are widely applied in solving non-linear state-space dynamic models, yet the challenge of inaccurate initial weights remains a critical bottleneck. Weight initialization methods significantly influence convergence speed and model efficiency. While conventional approaches such as random initialization and filtering techniques are commonly used, the Bayesian method—though highly accurate—suffers from the computational burden of inverting highdimensional matrices. This study has developed a novel solution: the Second Order Extended Ensemble Filter with Perturbed Innovation (SoEEFPI). Developed from a second-order Taylor expansion of the stochastically perturbed KushnerStratonovich equation, SoEEFPI provides a tractable numerical solution to the inverse covariance matrix problem. Validation is conducted using the Lorenz63 system, comparing SoEEFPI’s performance to that of the Kalman-Bucy Filter (SoEKBF) and the First Order Extended Ensemble Filter (FoEEF) in MATLAB. Furthermore, SoEEFPI is employed to initialize neural network weights, yielding a new model whose convergence time, RMSE, and epoch count are evaluated. Results demonstrate improved convergence efficiency and accuracy, positioning SoEEFPI as a robust alternative for neural network initialization.

  • Open Access

    Modeling the effect of devolution on youth unemployment rates in Kenya using autoregressive integrated moving average - intervention model

    by Samuel Wesonga Usolo, Annette Okoth, David Angwenyi

    Youth unemployment remains a major concern, particularly in African countries with the youngest population globally. In Kenya, youth unemployment rate has shown fluctuations despite several government efforts such as the Youth Enterprise Development Fund (YEDF), Kenya Youth Empowerment Project (KYEP) and the Youth Employment Scheme Abroad (YESA). The impact of devolution on youth unemployment in Kenya has had little investigation on, which is the reason for this study. The study aims to assess the effect of devolution on youth unemployment rates in Kenya, utilizing Autoregressive Integrated Moving Average-Intervention model. This research was informed by the Keynesian and Decentralization theories of employment, which collectively illustrate how government efforts, like introduction of devolution, are anticipated to influence labor market results. This study used the yearly secondary data on youth unemployment rates from the World Bank covering the period from 1991 to 2022. Computational analysis was done using Python programming. An ARIMA (0, 0, 0)(0,0,1)[4] was selected as the most suitable model for the youth unemployment rates prior to devolution (noise model) due to its lowest Akaike Information Criterion (AIC) value of 234.746 in comparison to other identified candidate models. By including devolution as an intervention in the selected noise model, its statistical significance was established at the 0.05 level of significance. Comparative analysis findings revealed that the average youth unemployment rate increased from 6.67% prior to devolution to 10.19% during the devolution period. The projected counterfactual rate during devolution was approximated to be 8.583%, which confirmed the observed increase as statistically significant. In conclusion, the effect of devolution was found to be statistically significant, implying that youth unemployment rates increased during devolution, as confirmed by the fitted ARIMA - Intervention model. Based on the upward trend in youth unemployment rates, the study recommended that policymakers prioritize other context specific and targeted interventions to address structural barriers in the youth labour markets. These should include expanding access to skills training and vocational education, fostering youth entrepreneurship through financing and mentorship programs, and aligning education curriculum with labour market needs.


  • Open Access

    Solutions of navier stokes equations for dam break problem in two dimension using finite element method

    by Owen Mulinya Kizito, David Angwenyi, Duncan Oganga

    A dam break is one of the most catastrophic events in hydraulic systems it happens when a dam suddenly fails, unleashing massive amounts of water in an uncontrolled rush. Even though water covers most of the Earth, water scarcity continues to be a serious challenge, especially in regions that rely heavily on irrigation. In response, many governments have invested in large scale dam construction to support food security by irrigating over 600,000 hectares of dry and semi-arid land. While dams are essential for water storage and agricultural productivity, they also come with significant risks. The enormous potential energy they store can lead to devastating environmental and social consequences if a failure occurs. This study focuses on modeling and simulating dam break scenarios using the two-dimensional Navier-Stokes equations, widely recognized for describing fluid behavior, solved through the Galerkin finite element method in MATLAB. The simulation considers steady-state, incompressible Newtonian fluids without body forces and applies the classic lid-driven cavity problem for benchmarking. To achieve accurate results, the study uses eight-noded rectangular elements, with quadratic interpolation for velocity and bilinear interpolation for pressure, resulting in 20 unknowns per element. The finite element method was selected over other numerical approaches because of its accuracy, especially when dealing with complex geometries. The simulation results align well with benchmark data across various Reynolds numbers, confirming the method’s accuracy and reliability. These findings are valuable to the field of computational fluid dynamics (CFD), offering an effective way to simulate dam related fluid movement. More importantly, in the context of hydraulic engineering and disaster preparedness, the study provides critical insights into how dam failures evolve and how flood waters behave when released. This knowledge can inform smarter emergency planning, safer dam designs, and stronger public awareness for downstream communities, ultimately contributing to more resilient disaster risk reduction efforts.

  • Open Access

    A probabilistic approach to solving unknown linear stochastic differential equations with Bayesian uncertainty quantification and inference

    by Collins Musera, Fredrick Onyango, David Angwenyi

    This work develops a probabilistic framework for solving unknown linear stochastic differential equations (SDEs) by treating the numerical solution as an inference problem. Starting from classical foundations, including the Fokker–Planck and Kushner–Stratonovich formulations, the study derives the evolution of conditional probability densities and presents both the strong and weak forms of the Kushner– Stratonovich equation. Under linear–Gaussian assumptions, the solution remains Gaussian and is fully characterized by its mean and covariance. Deterministic moment equations are derived for state transition and covariance propagation, providing a computationally tractable alternative to full sampling methods. Embracing probabilistic numerics, the framework interprets numerical solvers as inference procedures that return distributions over trajectories, thereby quantifying both process noise and discretization uncertainty. Connections are established with Bayesian probabilistic numerics, and the results demonstrate that moment-based probabilistic solvers deliver calibrated uncertainty for filtering and forecasting tasks. This approach is particularly valuable in engineering, finance, and climate modeling, where reliable uncertainty quantification is critical for decision-making under stochastic dynamics. The paper concludes by recommending robust numerical schemes for the Kushner– Stratonovich equation, comparative studies against Euler–Maruyama and Milstein methods, extensions to partially observed and real-time systems, and validation of the framework using real-world case studies.

  • Open Access

    A probabilistic approach to solving unknown nonlinear stochastic differential equations with Bayesian uncertainty quantification

    by Collins Musera, Fredrick Onyango, David Angwenyi

    This study develops a unified Bayesian framework for solving nonlinear stochastic differential equations (SDEs) with unknown dynamics, treating their solution as a problem of probabilistic inference rather than deterministic computation. Classical numerical solvers typically assume known system dynamics and ignore modeling or discretization errors, leading to overconfident predictions. To address these limitations, the proposed approach simultaneously reconstructs hidden state trajectories, estimates unknown drift and diffusion terms, and rigorously quantifies uncertainty. The method integrates the Fokker–Planck and Kushner–Stratonovich equations within a continuous-time Bayesian filtering framework, enabling full propagation of state distributions and recursive assimilation of measurements. Analytical derivations for the mean and covariance provide practical tools for uncertainty quantification, while the probabilistic formulation ensures consistent joint estimation of states and parameters. Results show that embedding uncertainty directly into the solution process enhances reliability, facilitates data-driven model discovery, and provides a principled foundation for sensitivity analysis and risk-aware decision-making in complex stochastic systems.

  • Open Access

    Optimal control harvesting in a deterministic predator-prey model for a three-patch ecosystem

    by Lucian Talu Mayabi, David Angwenyi, Duncan Oganga

    Predator-prey interactions play a pivotal role in shaping ecosystem dynamics, with significant implications for sustainable resource management. While much of the existing literature has focused on deterministic harvesting models in single or two-patch ecosystems, there remains a gap in exploring optimal harvesting strategies within spatially distributed multi-patch systems. This study develops a deterministic predator-prey model across three interconnected patches, representing cage-based aquaculture zones within a lake. The model incorporates prey migration between patches and harvesting applied to the prey population only. We formulate an optimal control problem aimed at maximizing the net economic return from harvesting while ensuring ecological sustainability. Using Pontryagin’s Maximum Principle, we derive necessary conditions for optimality and construct a time-dependent control strategy. Numerical simulations, with the help of Python software, reveal that fixed-rate harvesting lead to population decline or instability, while the optimal control strategy stabilizes both predator and prey populations within sustainable bounds. These findings provide valuable insights for fisheries management, aquaculture policy, and the design of ecologically sound harvesting strategies in multi-zone environments.

  • Open Access

    Second Order Extended Ensemble Filter for Non-linear Filtering

    by Kevin Midenyo, David Angwenyi, Duncan Oganga

    Whenever the state of a system must be estimated from noisy information, a state estimator is employed to fuse the data with the model to produce an accurate estimate of the state. When the system dynamics and observation models are linear, the Kalman Filter which is optimal, is used. However, in most applications of interest the system dynamics and observations equations are not- linear and suitable extensions of the Kalman Filter have been developed; for example, the Extended Kalman Filter(EKF). The Extended Kalman Filter is based on linearization by the Taylor series expansion about the mean of the state. This filtering process is however computationally expensive especially in high dimensional data. The cause for this is the high cost of integrating the equation of evolution of covariances. Due to this complexity in integration, new methods were sought known as the particle filters. It replaces linearization of non-linearities with Monte Carlo methods. The particle filter formed a basis for Ensemble Kalman Filter (EnKF) an extension of Kalman filter to non-linear filtering. The EnKF reduced the computational cost but its innovation process does not capture information sufficiently hence there is need to improve its performance. This study has developed a new filter, Second order Extended Ensemble Filter (SoEEF).We derived it from stochastic state models by expansion of expected values to the second order by use of Taylor series together with Monte Carlo method and Matlab. We used Lorenz 63 system of ordinary equations and differential Matlab to test the performance of the new filter. Then we compared its performance with four other filters like Bootstrap Particle Filter (BPF), First order Kalman Bucy Filter (FoEKBF),Second order Kalman Bucy Filter (SoKBF) and First order Extended Ensemble Filter (FoEEF). SoEEKF performs much better than the other four filters.