Search NASA⌕ Search

SEARCH · Search NASA

Results for “ODE solvers”

Search indexed NASA NTRS and DOE OSTI research on propulsion, heat transfer, battery materials and energy systems. Follow report and document links to the original sources.

Quote a phrase for an exact phrase match. Source license links do not imply unrestricted reuse.

At least 19 records

Implementing Ordinary Differential Equation Solvers in Rust Programming Language for Modeling Vehicle Powertrain Systems: Preprint

Efficient and accurate ordinary differential equation (ODE) solvers are necessary for powertrain and vehicle dynamics modeling. However, current commercial ODE solvers can be financially prohibitive, leading to a need for accessible, effective, open-source ODE solvers designed for powertrain modeling. Rust is a compiled programming language that has the potential to be used for fast and easy-to-use powertrain models, given its exceptional computational performance, robust package ecosystem, and short time required for modelers to become proficient. However, of the three commonly used (>3,000 downloads) packages in Rust with ODE solver capabilities, only one has more than four numerical methods implemented, and none are designed specifically for modeling physical systems. Therefore, the goal of the Differential Equation System Solver (DESS) was to implement accurate ODE solvers in Rust designed for the component-based problems often seen in powertrain modeling. DESS is a text-based software package that provides a flexible framework for building and solving systems of ODEs. This allows DESS to be included as a dependency for automotive powertrain models that require a variety of solvers and solver configurations. Seven explicit ODE solver methods have been implemented in DESS: Euler’s, Heun’s, midpoint, Ralston’s, classic Runge-Kutta, Bogacki-Shampine, and Cash-Karp. These represent five fixed-step methods and two adaptive-step methods. This paper shows that the solver implementations increase accuracy and computational efficiency compared to Euler's method when modeling a system of three thermal masses in Rust. DESS also includes features designed for modeling component-based physical systems. Users can define relationships between nodes in their system, which the package then translates into a system of equations, leading to simpler and more intuitive code. In the case of a three-thermal-mass system, the user can specify node thermal properties (e.g., thermal capacitance), how nodes are interconnected, and thermal conductance between nodes rather than providing a system of equations. The core contribution from this work is an open-source, text-based Rust package with ODE solvers for automotive powertrain modeling to support cost-free, fast, and accurate simulation.

ADVANCED PROPULSION SYSTEMS↗

DESS (Differential Equation System Solver) [SWR-24-48]

The Differential Equation System Solver (DESS) is a Rust crate implementing fixed-step and adaptive-step solvers and designed especially for modeling physical systems. Seven explicit ordinary differential equation (ODE) solver methods have been added so far: Euler’s, Heun’s, Midpoint, Ralston’s, Classic Runge-Kutta, Bogacki-Shampine, and Cash-Karp. These comprise five fixed-step methods and two adaptive-step methods. Few solver packages are implemented in the Rust ecosystem and none are intended specifically for physical system modeling, so the goal of DESS is to create a Rust ODE solver crate designed to easily specify and model physical systems with modular, configurable solver options. In addition to allowing users to directly input equations to solve, DESS allows users to optionally specify and define relationships between nodes in their system, which the package then translates into a system of equations via the Rust macro system, leading to simpler and more intuitive code.

Steuteville, Robin↗

A physics-constrained neural ordinary differential equations approach for robust learning of stiff chemical kinetics

The high computational cost associated with solving for detailed chemistry poses a significant challenge for predictive computational fluid dynamics (CFD) simulations of turbulent reacting flows. While deep learning techniques have been explored to develop faster surrogate models, they often fail to integrate reliably with CFD solvers. This instability arises because traditional deep learning approaches optimize for training error without ensuring compatibility with ordinary differential equation (ODE) solvers, resulting in accumulation of errors over time. Recently, neuralODE (NODE) based approaches have been shown to be a promising technique to emulate and accelerate detailed chemistry computations. Here, in the present work, we extend this NODE framework for stiff chemical kinetics by incorporating mass conservation constraints directly into the loss function during training. This ensures that the total mass as well as the individual elemental species masses are conserved in an a-posteriori manner. Proof-of-concept studies are performed with the novel physics-constrained NODE (PC-NODE) approach for homogeneous autoignition of hydrogen-air mixture over a range of composition and thermodynamic conditions. It is demonstrated that the PC-NODE framework not only improves the physical consistency of the resulting data-driven model with respect to mass conservation criteria, but also improves training efficiency. PC-NODE is shown to achieve 2–100× speedup relative to the hydrogen-air detailed chemical mechanism depending on the type of the ODE solver (implicit or explicit) used during autoregressive inference tests. Lastly, a-posteriori studies are performed wherein the trained PC-NODE model is coupled with a CFD solver. It is shown that higher accuracy is achieved with PC-NODE relative to the purely data-driven NODE approach. Moreover, PC-NODE also exhibits robustness and generalizability to unseen initial conditions from within (interpolative capability) as well as outside (extrapolative capability) the training regime.

computational combustion↗

scikit-SUNDAE ((SUN)DIALS Differential Algebraic Equations) [SWR-24-137]

Scikit-SUNDAE provides Python bindings to SUNDIALS integrators. The implicit differential algebraic (IDA) solver and C-based variable-coefficient ordinary differential equations (CVODE) solver are both included. The name SUNDAE combines (SUN)DIALS and DAE, which stands for differential algebraic equations. Solvers specific to DAE problems are not frequently available in Python. An ordinary differential equation (ODE) solver is also included for completeness. ODEs can be categorized as a subset of DAEs (i.e., DAEs with no algebraic constraints). https://pypi.org/project/scikit-sundae

Randall, Corey↗

Quantum algorithm for the linear Vlasov equation with collisions

The Vlasov equation is a nonlinear partial differential equation that provides a first-principles description of the dynamics of plasmas. Its linear limit is routinely used in plasma physics to investigate plasma oscillations and stability. In this paper, we present a quantum algorithm that simulates the linearized Vlasov equation with and without collisions, in the one-dimensional electrostatic limit. Rather than solving this equation in its native spatial and velocity phase space, we adopt an efficient representation in the dual space yielded by a Fourier-Hermite expansion. For a given simulation time, the Fourier-Hermite representation is exponentially more compact, thus yielding a classical algorithm that can match the performance of a previously proposed quantum algorithm for this problem. Further, this representation results in a system of linear ordinary differential equations (ODEs) which can be solved with well-developed quantum algorithms: a Hamiltonian simulation in the collisionless case, and quantum ODE solvers in the collisional case. In particular, we demonstrate that a quadratic speedup in system size is attainable.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

TChem-atm (v2.0.0): scalable performance-portable multiphase atmospheric chemistry

We present TChem-atm, a performance-portable approach that enables efficient simulation of chemically detailed and multiphase atmospheric chemistry on modern heterogeneous computing architectures. Unlike previous efforts that rely on architecture-specific code or focus exclusively on gas-phase chemistry, TChem-atm supports fully coupled gas–aerosol systems with execution across CPUs, NVIDIA GPUs, and AMD GPUs through the Kokkos programming model. It integrates the flexible multiphase capabilities of the Community Atmospheric Model Chemistry Package (CAMP) with the high-performance kinetic routines of TChem, and includes automatic Jacobian construction with support for a range of stiff ODE solvers. In a proof-of-concept integration with the particle-resolved model PartMC, TChem-atm reproduces the existing PartMC–CAMP implementation within solver tolerances and delivers substantial GPU speedups, especially for large particle populations. Performance benchmarks reveal substantial speedups on GPU platforms, particularly for large particle populations, with consistent results across hardware backends. TChem-atm enables performance-portable execution across CPUs and GPUs, though optimal efficiency may require modest architecture-specific tuning (e.g., team and vector sizes), with up to a twofold improvement on the NVIDIA H100. It directly supports sectional and particle-resolved host models, while modal aerosol schemes require minor adaptation to provide particle-scale quantities such as representative diameters. By enabling chemically detailed, multiphase simulations with performance portability and host-model flexibility, TChem-atm facilitates the incorporation of advanced chemistry into atmospheric models.

Díaz-Ibarra, Oscar Homero [Sandia National Laborat↗

Multiphysics Time-Integration for Turbulent Combustion at the Exascale

Turbulent reacting flow systems are often modeled with coupled time-dependent partial differential equations (PDEs). Solving such equations can easily tax the world's largest supercomputers. One pragmatic strategy for attacking such problems is to split the PDEs into components that can more easily be solved in isolation. This generic operator-splitting strategy leads to a set of ordinary differential equations (ODEs) that need to be solved as part of an "outer-loop" time-stepping approach. In many combustion applications, the ODEs to be solved can be very stiff, exhibiting timescales that span many orders of magnitude. The SUNDIALS library provides a plethora of robust time integration algorithms for solving these ODEs on exascale-capable computing hardware, yet for many complex applications (such multicomponent fuels or emissions predictions), the chemical models remain too complex to solve using reasonable resources. The Quasi-Steady State Approximation (QSSA) can be an effective tool for reducing the size and stiffness of the simulations. In this talk, I will discuss the use of the SUDIALS library of ODE solvers together with automatic code generation tools to solve complex turbulent reacting flow problems using QSSA models.

chemistry↗

Integration and validation of some modules for modelling of high-speed chemically reactive flows in two-phase gas-droplet mixtures

Three modules are integrated into the built-in OpenFOAM rhoCentralFoam solver towards accurate and efficient modelling of high-speed chemically reactive flows in two-phase gas-droplet mixtures within the OpenFOAM 10.0 framework. The first module is the mixture-averaged diffusion model. The second module is the built-in OpenFOAM Lagrangian solver coupled with optimised droplet drag coefficient and convective heat transfer coefficient sub-models. The last module is a sparse stiff chemistry solver based on dynamic adaptive hybrid integration (AHI-S). The optimised droplet sub-models are first verified in correct implementation for subsequent simulations in this work. Further, they show good accuracy against experimental and analytical data in the modelling of ammonia droplet acceleration and cooling in the flowing and/or low-temperature air. The accuracy and efficiency gains related to the mixture-averaged diffusion model and the AHI-S chemistry solver are examined by simulating 1-D detonation propagation in ammonia droplet-free/laden ammoniaoxygen mixtures. Numerical results of detonation propagation speed, gaseous temperature, density, and species distributions around the induction zone show good agreement with experimental data and analytical solutions. Compared to the built-in OpenFOAM diffusion model, the mixture-averaged diffusion model provides different numerical predictions of pulsating instabilities in detonation propagation. It shows better accuracy in depicting the detonation structure within the droplet-free section attributed to improved multi-component diffusion modelling. Compared to the built-in OpenFOAM solver EulerImplicit (backward Euler), the AHI-S chemistry solver reduces the computational cost by around 50%. It achieves satisfactory accuracy in calculating detonation propagation speed within the droplet-free section with the optimal efficiency when the safety factor, β, equals 0.5.

42 ENGINEERING↗

Mathematical solutions in internal dose assessment: A comparison of Python-based differential equation solvers in biokinetic modeling

Abstract In biokinetic modeling systems employed for radiation protection, biological retention and excretion have been modeled as a series of discretized compartments representing the organs and tissues of the human body. Fractional retention and excretion in these organ and tissue systems have been mathematically governed by a series of coupled first-order ordinary differential equations (ODEs). The coupled ODE systems comprising the biokinetic models are usually stiff due to the severe difference between rapid and slow transfers between compartments. In this study, the capabilities of solving a complex coupled system of ODEs for biokinetic modeling were evaluated by comparing different Python programming language solvers and solving methods with the motivation of establishing a framework that enables multi-level analysis. The stability of the solvers was analyzed to select the best performers for solving the biokinetic problems. A Python-based linear algebraic method was also explored to examine how the numerical methods deviated from an analytical or semi-analytical method. Results demonstrated that customized implicit methods resulted in an enhanced stable solution for the inhaled 60 Co (Type M) and 131 I (Type F) exposure scenarios for the inhalation pathway of the International Commission on Radiological Protection (ICRP) Publication 130 Human Respiratory Tract Model (HRTM). The customized implementation of the Python-based implicit solvers resulted in approximately consistent solutions with the Python-based matrix exponential method ( expm ). The differences generally observed between the implicit solvers and expm are attributable to numerical precision and the order of numerical approximation of the numerical solvers. This study provides the first analysis of a list of Python ODE solvers and methods by comparing their usage for solving biokinetic models using the ICRP Publication 130 HRTM and provides a framework for the selection of the most appropriate ODE solvers and methods in Python language to implement for modeling the distribution of internal radioactivity.

61 RADIATION PROTECTION AND DOSIMETRY↗

Implementation and (Inverse Modified) Error Analysis for Implicitly Templated ODE-Nets

We focus on learning unknown dynamics from data using ODE-nets templated on implicit numerical initial value problem solvers. First, we perform inverse modified error analysis of the ODE-nets using unrolled implicit schemes for ease of interpretation. It is shown that training an ODE-net using an unrolled implicit scheme returns a close approximation of an inverse modified differential equation (IMDE). In addition, we establish a theoretical basis for hyperparameter selection when training such ODE-nets, whereas current strategies usually treat numerical integration of ODE-nets as a black box. We thus formulate an adaptive algorithm which monitors the level of error and adapts the number of (unrolled) implicit solution iterations during the training process, so that the error of the unrolled approximation is less than the current learning loss. This helps accelerate training while maintaining accuracy. Several numerical experiments are performed to demonstrate the advantages of the proposed algorithm compared to nonadaptive unrollings and validate the theoretical analysis. Here, we also note that this approach naturally allows for incorporating partially known physical terms in the equations, giving rise to what is termed “gray box” identification.

ODE-nets↗

Direct Estimation of Parameters in ODE Models Using WENDy: Weak-Form Estimation of Nonlinear Dynamics

Abstract We introduce the Weak-form Estimation of Nonlinear Dynamics (WENDy) method for estimating model parameters for non-linear systems of ODEs. Without relying on any numerical differential equation solvers, WENDy computes accurate estimates and is robust to large (biologically relevant) levels of measurement noise. For low dimensional systems with modest amounts of data, WENDy is competitive with conventional forward solver-based nonlinear least squares methods in terms of speed and accuracy. For both higher dimensional systems and stiff systems, WENDy is typically both faster (often by orders of magnitude) and more accurate than forward solver-based approaches. The core mathematical idea involves an efficient conversion of the strong form representation of a model to its weak form, and then solving a regression problem to perform parameter inference. The core statistical idea rests on the Errors-In-Variables framework, which necessitates the use of the iteratively reweighted least squares algorithm. Further improvements are obtained by using orthonormal test functions, created from a set of $$C^{\infty }$$ C ∞ bump functions of varying support sizes.We demonstrate the high robustness and computational efficiency by applying WENDy to estimate parameters in some common models from population biology, neuroscience, and biochemistry, including logistic growth, Lotka-Volterra, FitzHugh-Nagumo, Hindmarsh-Rose, and a Protein Transduction Benchmark model. Software and code for reproducing the examples is available at https://github.com/MathBioCU/WENDy .

97 MATHEMATICS AND COMPUTING↗

ARKODE: A Flexible IVP Solver Infrastructure for One-step Methods

We describe the ARKODE library of one-step time integration methods for ordinary differential equation (ODE) initial-value problems (IVPs). In addition to providing standard explicit and diagonally implicit Runge–Kutta methods, ARKODE supports one-step methods designed to treat additive splittings of the IVP, including implicit-explicit (ImEx) additive Runge–Kutta methods and multirate infinitesimal (MRI) methods. We present the role of ARKODE within the SUNDIALS suite of time integration and nonlinear solver libraries, the core ARKODE infrastructure for utilities common to large classes of one-step methods, as well as its use of “time stepper” modules enabling easy incorporation of novel algorithms into the library. Numerical results show example problems of increasing complexity, highlighting the algorithmic flexibility afforded through this infrastructure, and include a larger multiphysics application leveraging multiple algorithmic features from ARKODE and SUNDIALS.

97 MATHEMATICS AND COMPUTING↗

Score-Based Physics-Informed Neural Networks for High-Dimensional Fokker–Planck Equations

The Fokker-Planck (FP) equation is a foundational partial differential equation (PDE) in stochastic processes involving Brownian motions. However, the curse of dimensionality (CoD) poses a formidable challenge when dealing with high-dimensional FP equations. Although Monte Carlo simulation and (vanilla) Physics-Informed Neural Networks (PINNs) have shown the potential to tackle CoD, both methods exhibit significant numerical errors in high dimensions when dealing with the probability density function (PDF) associated with Brownian motion. The point-wise PDF values tend to decrease exponentially as dimensionality increases, surpassing the precision of numerical simulations and resulting in substantial errors. In addition, due to its massive sampling, Monte Carlo fails to offer fast sampling. Modeling the logarithm likelihood (LL) via vanilla PINNs transforms the FP equation into a notoriously difficult Hamilton-Jacobi-Bellman (HJB) equation, which is impractical for PINN learning, whose error grows rapidly with dimension. To this end, we propose a novel approach utilizing a score-based solver to fit the score function in stochastic differential equations (SDEs). The score function, defined as the gradient of the LL, plays a fundamental role in inferring LL and PDF and enables fast SDE sampling, offering an effective means to overcome the CoD. Three fitting methods, Score Matching (SM), Sliced Score Matching (SSM), and Score-PINN, are introduced, each contributing unique advantages in computational complexity, accuracy, and generality. The proposed score-based SDE solver operates in two stages: first, employing score matching or Score-PINN to acquire the score function; and second, solving the LL via an ordinary differential equation (ODE) using the obtained score function. Comparative evaluations across these methods showcase varying trade-offs. The proposed methodology is evaluated across diverse SDEs, including anisotropic Ornstein-Uhlenbeck processes, geometric Brownian motion, and Brownian motion with varying eigenspace. We also test various distributions, including Gaussian, Log-normal, Laplace, and Cauchy distributions. The numerical results demonstrate the score-based SDE solver’s stability, speed, and performance across different experimental settings, solidifying its potential as a solution to CoD for high-dimensional FP equations.

97 MATHEMATICS AND COMPUTING↗

Formulation, Implementation and Validation of a 1D Boundary Layer Inflow Scheme for the QUIC Modeling System

Recent studies have highlighted the importance of accurate meteorological conditions for urban transport and dispersion calculations. In this work, we present a novel scheme to compute the meteorological input in the Quick Urban & Industrial Complex () diagnostic urban wind solver to improve the characterization of upstream wind veer and shear in the Atmospheric Boundary Layer (ABL). The new formulation is based on a coupled set of Ordinary Differential Equations (ODEs) derived from the Reynolds Averaged Navier–Stokes (RANS) equations, and is fast to compute. Building upon recent progress in modeling the idealized ABL, we include effects from surface roughness, turbulent stress, Coriolis force, buoyancy and baroclinicity. We verify the performance of the new scheme with canonical Large Eddy Simulation (LES) tests with the GPU-accelerated FastEddy"Equation missing" solver in neutral, stable, unstable and baroclinic conditions with different surface roughness. Furthermore, we evaluate QUIC calculations with and without the new inflow scheme with real data from the Urban Threat Dispersion (UTD) field experiment, which includes Lidar-based wind measurements as well as concentration observations from multiple outdoor releases of a non-reactive tracer in downtown New York City. Compared to previous inflow capabilities that were limited to a constant wind direction with height, we show that the new scheme can model wind veer in the ABL and enhance the prediction of the surface cross-isobaric angle, improving evaluation statistics of simulated concentrations paired in time and space with UTD measurements.

54 ENVIRONMENTAL SCIENCES↗

Solving differential‐algebraic equations in power system dynamic analysis with quantum computing

Abstract Power system dynamics are generally modeled by high dimensional non‐linear differential‐algebraic equations (DAEs) given a large number of components forming the network. These DAEs' complexity can grow exponentially due to the increasing penetration of distributed energy resources, whereas their computation time becomes sensitive due to the increasing interconnection of the power grid with other energy systems. This paper demonstrates the use of quantum computing algorithms to solve DAEs for power system dynamic analysis. We leverage a symbolic programming framework to equivalently convert the power system's DAEs into ordinary differential equations (ODEs) using index reduction methods and then encode their data into qubits using amplitude encoding. The system non‐linearity is captured by Hamiltonian simulation with truncated Taylor expansion so that state variables can be updated by a quantum linear equation solver. Our results show that quantum computing can solve the power system's DAEs accurately with a computational complexity polynomial in the logarithm of the system dimension. We also illustrate the use of recent advanced tools in scientific machine learning for implementing complex computing concepts, that is, Taylor expansion, DAEs/ODEs transformation, and quantum computing solver with abstract representation for power engineering applications.

computational complexity↗

Applying Quantum Computing to Simulate Power System Dynamics

Power system dynamics are generally modeled by high dimensional nonlinear differential-algebraic equations due to a large number of generators, loads, and transmission lines. Thus, its computational complexity grows exponentially with the system size. This paper demonstrates the potential use of quantum computing algorithms to model the power system dynamics. Leveraging a symbolic programming framework, we equivalently convert the power system dynamics’ differential algebraic equations (DAEs) into ordinary differential equations (ODEs), where the data of the state vector can be encoded into quantum computers via amplitude encoding. The system's nonlinearity is captured by Taylor polynomial expansion, the quantum state tensor, and Hamiltonian simulation, whereas state variables can be updated by a quantum linear equation solver. Our results show that quantum computing can simulate the dynamics of the power system with high accuracy, whereas its complexity is polynomial in the logarithm of the system dimension. Our work also illustrates the use of scientific machine learning tools for implementing scientific computing concepts, e.g., Taylor expansion, DAEs/ODEs transform, and quantum computing solver, in the field of power engineering.

Tran, Huynh↗

A Green's Function Wind Turbine Induction Model That Incorporates Complex Inflow Conditions

ABSTRACT In this work, we develop a new analytical turbine induction model that can incorporate complex inflow conditions including cases where the wind velocity and temperature profiles can vary as functions of height. This induction model is derived from the linearized Navier–Stokes and leads to a second‐order ODE that can be solved using a Green's function formulation. The corresponding Green's function for several configurations are found including the infinite domain, semi‐infinite domain with ground plane, and a power law velocity inflow profile. The results of this approach are then compared with simulations of the turbine induction field using the AMR‐Wind CFD solver with a uniformly loaded actuator disk model. These comparisons show that the Green's function approach captures the centerline blockage, three‐dimensional blockage flow field, and streamwise velocity slow down, with very good agreement for lower thrust conditions and at larger distances away from rotor disk. The effects of shear on the turbine blockage were also compared using a power law inflow profile, and we show that this approach matches the CFD predictions for the cases considered.

17 WIND ENERGY↗

A Quantum Approach for Implementing Fixed-Point Arithmetic in Solving Ordinary Differential Equations

Differential equations (DEs) serve as fundamental tools in mathematical modeling across scientific disciplines, yet classical numerical solvers face limitations with large-scale or computationally intensive problems. This study explores a quantum-inspired approach to solving DEs, combining quantum- inspired techniques with classical methods. It focuses on fixed- point arithmetic on quantum circuits, utilizing basic quantum gates to manipulate DE solutions. We expand upon the techniques introduced by Zanger et al. [Quantum, 5, 502 (2021)] by offering a precise computation for a fixed-point signed multiplication scheme, while also presenting a quantum circuit capable of executing the fixed-point division algorithm. We demonstrate the feasibility of our approach through the simulation of a linear Ordinary Differential Equation (ODE), where initial conditions and parameters are encoded into quantum circuits using fixed- point representation. By executing sequences of quantum gates mimicking numerical integration steps, we obtain approximate solutions to the ODE with specified fixed-point precision.

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗