Search NASA⌕ Search

SEARCH · Search NASA

Results for “differential equation solver”

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

Fourier Neural Networks as Function Approximators and Differential Equation Solvers

We present a Fourier neural network (FNN) that can be mapped directly to the Fourier decomposition. The choice of activation and loss function yields results that replicate a Fourier series expansion closely while preserving a straightforward architecture with a single hidden layer. The simplicity of this network architecture facilitates the integration with any other higher-complexity networks, at a data pre- or postprocessing stage. We validate this FNN on naturally periodic smooth functions and on piecewise continuous periodic functions. We showcase the use of this FNN for modeling or solving partial differential equations with periodic boundary conditions. The main advantages of the current approach are the validity of the solution outside the training region, interpretability of the trained model, and simplicity of use.

Fourier decomposition↗

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↗

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↗

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↗

PythonFOAM: In-situ data analyses with OpenFOAM and Python

Here, we outline the development of a general-purpose Python-based data analysis tool for OpenFOAM. Our implementation relies on the construction of OpenFOAM applications that have bindings to data analysis libraries in Python. Double precision data in OpenFOAM is cast to a NumPy array using the NumPy C-API and Python modules may then be used for arbitrary data analysis and manipulation on flow-field information. We highlight how the proposed wrapper may be used for an in-situ online singular value decomposition (SVD) implemented in Python and accessed from the OpenFOAM solver PimpleFOAM. Here, 'in-situ' refers to a programming paradigm that allows for a concurrent computation of the data analysis on the same computational resources utilized for the partial differential equation solver. In addition, to demonstrate parallel deployments, we deploy a distributed SVD, which collects snapshot data across the ranks of a distributed simulation to compute the global left singular vectors. Crucially, both OpenFOAM and Python share the same message passing interface (MPI) communicator for this deployment which allows Python objects and functions to exchange NumPy arrays across ranks. Subsequently, we provide scaling assessments of this distributed SVD on multiple nodes of Intel Broadwell and KNL architectures for canonical test cases such as the large eddy simulations of a backward facing step and a channel flow at friction Reynolds number of 395. Finally, we demonstrate the deployment of a deep neural network for compressing the flow-field information using an autoencoder to demonstrate an ability to use state-of-the-art machine learning tools in the Python ecosystem.

97 MATHEMATICS AND COMPUTING↗

Modeling MTS pyrolysis and SiC deposition kinetics using principal component analysis and neural networks

Accurate chemical kinetics modeling is crucial for improving the efficiency of chemical processing and synthesis of ceramic matrix composites. Detailed kinetic models are computationally expensive due to the large number of transported chemical species, while the simplified physics-based models, such as single-step global mechanisms, are efficient but often overlook key chemical intermediates and pathways. Recent deep learning approaches promise accurate and cost-effective models. Yet, they require additional closures for the transported nonlinear latent variables, complicating integration with existing solvers. In this work, we develop a hybrid linear—nonlinear reduced model for silicon carbide deposition from methyltrichlorosilane precursor by combining principal component analysis (PCA) and autoencoder (AE) neural network (NN) approaches. PCA is used to identify a smaller set of linear transport variables, enabling direct reuse of conventional transport solvers. NNs then reconstruct the full chemical state from these reduced variables. We demonstrate the method on a chemical vapor deposition reactor—comprising a gas-phase pyrolysis plug flow reactor and a heterogeneous surface reactor—over a wide range of temperatures, pressures, and residence times. Our PCA–AE model achieves high accuracy with only five transported scalars, achieving an eightfold cost reduction compared to detailed mechanisms, in both a priori (using data from the test set only) and a posteriori (coupled with a differential equation solver). In conclusion, notable errors arise primarily near training domain boundaries and for long residence times, indicating the need for domain shift indicators and better long-horizon predictions in future reduced chemistry model development.

autoencoder neural networks↗

JuliaOceanWaves

SAND2023-05107O JuliaOceanWaves is a collection of packages and functions for modeling wave energy converters. The open-source software is designed to be used by the wave energy community to model new concepts, perform design optimization, and more. Capabilities include: • A representation of ocean wave spectra and input/output (e.g. read from National Oceanic and Atmospheric Administration buoys) and post-processing functionalities; • A solver for the linear potential flow radiation and diffraction equations for wave forcing on floating structures. • Solving the floating body linear dynamics in the frequency domain. Future additions to the software will include solving non-linear floating body dynamics in the time-domain through time-marching Ordinary Differential Equation solvers and the pseudo-spectral optimization method. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.

Michelen Strofer, Carlos↗

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↗

Application of physiologically based pharmacokinetic modeling for sertraline dosing recommendations in pregnancy

Pregnancy is a period of significant change that impacts physiological and metabolic status leading to alterations in the disposition of drugs. Uncertainty in drug dosing in pregnancy can lead to suboptimal therapy, which can contribute to disease exacerbation. A few studies show there are increased dosing requirements for antidepressants in late pregnancy; however, the quantitative data to guide dose adjustments are sparse. We aimed to develop a physiologically based pharmacokinetic (PBPK) model that allows gestational-age dependent prediction of sertraline dosing in pregnancy. A minimal physiological model with defined gut, liver, plasma, and lumped placental-fetal compartments was constructed using the ordinary differential equation solver package, ‘mrgsolve’, in R. We extracted data from the literature to parameterize the model, including sertraline physicochemical properties, in vitro metabolism studies, disposition in nonpregnant women, and physiological changes during pregnancy. The model predicted the pharmacokinetic parameters from a clinical study with eight subjects for the second trimester and six subjects for the third trimester. Based on the model, gestational-dependent changes in physiology and metabolism account for increased clearance of sertraline (up to 143% at 40 weeks gestational age), potentially leading to under-dosing of pregnant women when nonpregnancy doses are used. The PBPK model was converted to a prototype web-based interactive dosing tool to demonstrate how the output of a PBPK model may translate into optimal sertraline dosing in pregnancy. Quantitative prediction of drug exposure using PBPK modeling in pregnancy will support clinically appropriate dosing and increase the therapeutic benefit for pregnant women.

60 APPLIED LIFE SCIENCES↗

Simulating single-particle dynamics in magnetized plasmas: The RMF code

The RMF (Rotating Magnetic Field) code is designed to calculate the motion of a charged particle in a given electromagnetic field. It integrates Hamilton’s equations in cylindrical coordinates using an adaptive predictor-corrector double-precision variable-coefficient ordinary differential equation solver for speed and accuracy. RMF has multiple capabilities for the field. Particle motion is initialized by specifying the position and velocity vectors. Here, the six-dimensional state vector and derived quantities are saved as functions of time. A post-processing graphics code, XDRAW, is used on the stored output to plot up to 12 windows of any two quantities using different colors to denote successive time intervals. Multiple cases of RMF may be run in parallel and perform data mining on the results. Recent features are a synthetic diagnostic for simulating the observations of charge-exchange-neutral energy distributions and RF grids to explore a Fermi acceleration parallel to static magnetic fields.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

A meshless stochastic method for Poisson–Nernst–Planck equations

A plethora of biological, physical, and chemical phenomena involve transport of charged particles (ions). Its continuum-scale description relies on the Poisson–Nernst–Planck (PNP) system, which encapsulates the conservation of mass and charge. The numerical solution of these coupled partial differential equations is challenging and suffers from both the curse of dimensionality and difficulty in efficiently parallelizing. We present a novel particle-based framework to solve the full PNP system by simulating a drift–diffusion process with time- and space-varying drift. We leverage Green’s functions, kernel-independent fast multipole methods, and kernel density estimation to solve the PNP system in a meshless manner, capable of handling discontinuous initial states. The method is embarrassingly parallel, and the computational cost scales linearly with the number of particles and dimension. We use a series of numerical experiments to demonstrate both the method’s convergence with respect to the number of particles and computational cost vis-à-vis a traditional partial differential equation solver.

Chemistry↗

Bayesian differential programming for robust systems identification under uncertainty

This paper presents a machine learning framework for Bayesian systems identification from noisy, sparse and irregular observations of nonlinear dynamical systems. The proposed method takes advantage of recent developments in differentiable programming to propagate gradient information through ordinary differential equation solvers and perform Bayesian inference with respect to unknown model parameters using Hamiltonian Monte Carlo sampling. This allows an efficient inference of the posterior distributions over plausible models with quantified uncertainty, while the use of sparsity-promoting priors enables the discovery of interpretable and parsimonious representations for the underlying latent dynamics. A series of numerical studies is presented to demonstrate the effectiveness of the proposed methods, including nonlinear oscillators, predator–prey systems and examples from systems biology. Taken together, our findings put forth a flexible and robust workflow for data-driven model discovery under uncertainty. All codes and data accompanying this article are available at https://bit.ly/34FOJMj .

Science & Technology - Other Topics↗

Gaussian processes meet NeuralODEs: a Bayesian framework for learning the dynamics of partially observed systems from scarce and noisy data

We present a machine learning framework (GP-NODE) for Bayesian model discovery from partial, noisy and irregular observations of nonlinear dynamical systems. The proposed method takes advantage of differentiable programming to propagate gradient information through ordinary differential equation solvers and perform Bayesian inference with respect to unknown model parameters using Hamiltonian Monte Carlo sampling and Gaussian Process priors over the observed system states. This allows us to exploit temporal correlations in the observed data, and efficiently infer posterior distributions over plausible models with quantified uncertainty. The use of the Finnish Horseshoe as a sparsity-promoting prior for free model parameters also enables the discovery of parsimonious representations for the latent dynamics. A series of numerical studies is presented to demonstrate the effectiveness of the proposed GP-NODE method including predator–prey systems, systems biology and a 50-dimensional human motion dynamical system. This article is part of the theme issue ‘Data-driven prediction in dynamical systems’.

Science & Technology - Other Topics↗

Inference of neutrino flavor evolution through data assimilation and neural differential equations

The evolution of neutrino flavor in dense environments such as core-collapse supernovae and binary compact object mergers constitutes an important and unsolved problem. Its solution has potential implications for the dynamics and heavy-element nucleosynthesis in these environments. In this paper, we build upon recent work to explore inference-based techniques for the estimation of model parameters and neutrino flavor evolution histories. Here, we combine data assimilation, ordinary differential equation solvers, and neural networks to craft an inference approach tailored for nonlinear dynamical systems. Using this architecture, and a simple two-neutrino-beam, two-flavor model, we compare the performances of nine different optimization algorithms and expand upon previous assessments of the efficacy of inference for tackling problems in flavor evolution. We find that employing this new architecture, together with evolutionary optimization algorithms, accurately captures flavor histories in the small-scale model and allows us to quickly explore both model parameters and initial flavor content. In future work we plan to extend these inference techniques to large numbers of neutrinos.

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

gpde

The R package gpde is an R implementation of a probabilistic differential equation solver. The package has a basic implementation of the Chkrebtii (2013) probabilistic ODE solver and an extension using the connection between Kalman Filtering for SDEs and Gaussian Processes from work by Simo Sarkka. The package also implements the Integrated Wiener covariance function from Schober 2014 to obtain probabilistic ODE solutions with the Runge-Kutta solution as the mean result. This collection of tools has been built into an R package for easy use at LANL and in the probabilistic numerics community.

Grosskopf, Michael↗

PDEHats

This is code used to train and evaluate neural partial differential equation solvers on an open source fluid flow data. We evaluate two standard deep learning algorithms for their ability to generalize, a desirable capability for trusthworthy and performant models.

Amarel, James↗

Efficient general method for numerically modeling laser pulse propagation, overlap, and lifetime effects in amplifiers

An efficient numerical time-dependent general method is developed to address incoherent pulse overlap and lifetime effects in laser amplifiers. The alternating propagation-population laser energetics method (APPLE) has been validated against a semi-discrete coupled rate equation numerical method (SDRE) and analytic formalisms in bounding cases. APPLE is based on decoupled rates applied to a time-dependent framework where both space-time-dependent populations and pulse energetics are consistently updated in each time step. A significant advantage of APPLE lies in its conceptual simplicity, ease of implementation, and relatively small computational cost. SDRE tracks the populations through coupled rates and uses the method of lines to discretize the hyperbolic partial differential transport equations allowing for use of ordinary differential equation solvers. With reasonably sized mesh, we report both energetic and power pulse shape relative differences on the order of one percent between the models over a large range of initial conditions.

47 OTHER INSTRUMENTATION↗

Domain Aware Deep-learning Algorithms Integrated with Scientific-computing Technologies (DADAIST)

This technical report summarized the contribution of the DADAIST project funded by the Data Model Convergence Initiative via the Laboratory Directed Research and Development (LDRD) investments at Pacific Northwest National Laboratory (PNNL). Specifically, we report the development of the NeuroMANCER (Neural Modules with Adaptive Nonlinear Constraints and Efficient Regularizations), a new open-source Scientific Machine Learning library for formulating and solving parametric constrained optimization problems, physics-informed system identification, and parametric optimal control problems. NeuroMANCER is using differentiable programming to combine modern data-driven models and optimization modeling language into a coherent algorithmic and software framework. NeuroMANCER is a Pytorch-based framework and adopts much of its philosophy focused on research and development, rapid prototyping, and streamlined deployment. Strong emphasis is given to extensibility, interoperability with the PyTorch ecosystem, and quick adaptability to custom domain problems. Neuromancer repository contains a comprehensive library of differentiable modules, including custom activation functions, matrix factorizations, deep learning architectures, neural differential equations, differential equation solvers, implicit layers such as iterative solvers, high-level API for symbolic expressions, API for modeling and control of dynamical systems, and extensive set of tutorial code examples in the form of python scripts and jupyter notebooks.

97 MATHEMATICS AND COMPUTING↗