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↗

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↗

Physical and numerical sources of computational inefficiency in integration of chemical kinetic rate equations: Etiology, treatment and prognosis

The design of a very fast, automatic black-box code for homogeneous, gas-phase chemical kinetics problems requires an understanding of the physical and numerical sources of computational inefficiency. Some major sources reviewed in this report are stiffness of the governing ordinary differential equations (ODE's) and its detection, choice of appropriate method (i.e., integration algorithm plus step-size control strategy), nonphysical initial conditions, and too frequent evaluation of thermochemical and kinetic properties. Specific techniques are recommended (and some advised against) for improving or overcoming the identified problem areas. It is argued that, because reactive species increase exponentially with time during induction, and all species exhibit asymptotic, exponential decay with time during equilibration, exponential-fitted integration algorithms are inherently more accurate for kinetics modeling than classical, polynomial-interpolant methods for the same computational work. But current codes using the exponential-fitted method lack the sophisticated stepsize-control logic of existing black-box ODE solver codes, such as EPISODE and LSODE. The ultimate chemical kinetics code does not exist yet, but the general characteristics of such a code are becoming apparent.

Pratt, D. T.↗

A numerical procedure for analysis of finite rate reacting flows

Combustion processes in rocket propulsion systems are characterized by the existence of multiple, vastly differing time and length scales, as well as flow-speeds at wide variation of Mach numbers. The chemical kinetics processes in the highly active reaction zone are characterized by much smaller scales compared to fluid convective and diffusive time scales. An operator splitting procedure for transient finite rate chemistry problems has been developed using a pressure based method, which can be applied to all speed flows without difficulties. The splitting of chemical kinetics terms formed the fluid-mechanical terms of the species equation ameliorated the difficulties associated with the disparate time scales and stiffness in the set of equations which describes highly exothermic combustion. A combined efficient ordinary differential equations (ODE) solver was used to integrate the effective chemical source terms over the residence time at each grid cell. One and two dimensional reacting flow situations were carried out to demonstrate and verify the current procedure. Different chemical kinetics with different degrees of nonlinearity have also been incorporated to test the robustness and generality of the proposed method.

Shang, H. M.↗

Spacecraft Formation Flying Maneuvers Using Linear Quadratic Regulation With No Radial Axis Inputs

Regarding multiple spacecraft formation flying, the observation has been made that control thrust need only be applied coplanar to the local horizon to achieve complete controllability of a two-satellite (leader-follower) formation. A formulation of orbital dynamics using the state of one satellite relative to another is used. Without the need for thrust along the radial (zenith-nadir) axis of the relative reference frame, propulsion system simplifications and weight reduction may be accomplished. This work focuses on the validation of this control system on its own merits, and in comparison to a related system which does provide thrust along the radial axis of the relative frame. Maneuver simulations are performed using commercial ODE solvers to propagate the Keplerian dynamics of a controlled satellite relative to an uncontrolled leader. These short maneuver simulations demonstrate the capacity of the controller to perform changes from one formation geometry to another. Control algorithm performance is evaluated based on measures such as the fuel required to complete a maneuver and the maximum acceleration required by the controller. Based on this evaluation, the exclusion of the radial axis of control still allows enough control authority to use Linear Quadratic Regulator (LQR) techniques to design a gain matrix of adequate performance over finite maneuvers. Additional simulations are conducted including perturbations and using no radial control inputs. A major conclusion presented is that control inputs along the three axes have significantly different relationships to the governing orbital dynamics that may be exploited using LQR.

Starin, Scott R.↗

Design of a LQR Controller of Reduced Inputs for Multiple Spacecraft Formation Flying

Regarding multiple spacecraft formation flying, the observation is made that control thrust need only be applied coplanar to the local horizon to achieve complete controllability of a two-satellite formation. Without the need for zenith-nadir (radial) thrust, simplifications and reduction of the weight of the propulsion system may be accomplished. This work focuses on the validation of this radial-excluding control system on its own merits, and in comparison to a related system which does provide thrust parallel to the orbital radius. Simulations are performed using commercial ODE solvers to propagate the Keplerian dynamics of a controlled satellite relative to an uncontrolled, leader satellite. The conclusion is drawn that, despite the exclusion of the radial thrust axis, the remaining control thrust available still provides enough control to design a gain matrix of adequate performance using linear-quadratic regulator (LQR) techniques.

Starin, Scott R.↗

Spacecraft Formation Flying Maneuvers Using Linear-Quadratic Regulation with No Radial Axis Inputs

Regarding multiple spacecraft formation flying, the observation has been made that control thrust need only be applied coplanar to the local horizon to achieve complete controllability of a two-satellite (leader-follower) formation. A formulation of orbital dynamics using the state of one satellite relative to another is used. Without the need for thrust along the radial (zenith-nadir) axis of the relative reference frame ' propulsion system simplifications and weight reduction may be accomplished. Several linear-quadratic regulators (LQR) are explored and compared based on performance measures likely to be important to many missions, but not directly optimized in the LQR designs. Maneuver simulations are performed using commercial ODE solvers to propagate the Keplerian dynamics of a controlled satellite relative to an uncontrolled leader. These short maneuver simulations demonstrate the capacity of the controller to perform changes from one formation geometry to another. This work focusses on formations in which the controlled satellite has a relative trajectory which projects onto the local horizon of the uncontrolled satellite as a circle. This formation has potential uses for distributed remote sensing systems.

Starin, Scott R.↗

On the Dynamics of Some Discretizations of Convection-Diffusion Equations

Numerical discretizations of differential equations which model physical processes can possess dynamics quite different from that of the equations themselves. Recently the emphasis has been on the the dynamics of numerical discretizations for Ordinary Differential Equations (ODEs). For Partial Differential Equations (PDEs) using a method of lines approach the situation is more complex. First, the spatial discretisation may introduce dynamics not present in the original equations; second, the solution of the resulting system of ODEs is open to the modified dynamics of the ODE solver used. These two effects may interact in a complex manner. In this talk we present some results of our recent work on the dynamics of discretizations of convection-diffusion equations, including those produced using Total Variation Diminishing (TVD) schemes and adaptive grid techniques. A more general overview of the area may be found on our accompanying poster presentation.

Sweby, Peter K.↗

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↗

Linear iterative solvers for implicit ODE methods

The numerical solution of stiff initial value problems, which lead to the problem of solving large systems of mildly nonlinear equations are considered. For many problems derived from engineering and science, a solution is possible only with methods derived from iterative linear equation solvers. A common approach to solving the nonlinear equations is to employ an approximate solution obtained from an explicit method. The error is examined to determine how it is distributed among the stiff and non-stiff components, which bears on the choice of an iterative method. The conclusion is that error is (roughly) uniformly distributed, a fact that suggests the Chebyshev method (and the accompanying Manteuffel adaptive parameter algorithm). This method is described, also commenting on Richardson's method and its advantages for large problems. Richardson's method and the Chebyshev method with the Mantueffel algorithm are applied to the solution of the nonlinear equations by Newton's method.

Saylor, Paul E.↗

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↗