Publications

12 Results

Search results

Jump to search filters

CSPlib: A performance portable parallel software toolkit for analyzing complex kinetic mechanisms

Computer Physics Communications

Diaz-Ibarra, Oscar H.; Kim, Kyungjoo; Najm, H.N.; Safta, Cosmin S.

Computational singular perturbation (CSP) is a method to analyze dynamical systems. It targets the decoupling of fast and slow dynamics using an alternate linear expansion of the right-hand side of the governing equations based on eigenanalysis of the associated Jacobian matrix. This representation facilitates diagnostic analysis, detection and control of stiffness, and the development of simplified models. We have implemented CSP in a C++ open-source library CSPlib1 using the Kokkos2 parallel programming model to address portability across diverse heterogeneous computing platforms, i.e., multi/many-core CPUs and GPUs. We describe the CSPlib implementation and present its computational performance across different computing platforms using several test problems. Specifically, we test the CSPlib performance for a constant pressure ignition reactor model on different architectures, including IBM Power 9, Intel Xeon Skylake, and NVIDIA V100 GPU. The size of the chemical kinetic mechanism is varied in these tests. As expected, the Jacobian matrix evaluation, the eigensolution of the Jacobian matrix, and matrix inversion are the most expensive computational tasks. When considering the higher throughput characteristic of GPUs, GPUs performs better for small matrices with higher occupancy rate. CPUs gain more advantages from the higher performance of well-tuned and optimized linear algebra libraries such as OpenBLAS. Program summary: Program Title: CSPlib CPC Library link to program files: https://doi.org/10.17632/p9gb7z54sp.1 Developer's repository link: https://github.com/sandialabs/csplib Licensing provisions: BSD 2-clause Programming language: C++ Nature of problem: Dynamical systems can involve coupled processes with a wide range of time scales. The computational singular perturbation (CSP) method offers a reformulation of these systems which enables the use of dynamically-based diagnostic tools to better comprehend the dynamics by decoupling fast and slow processes. CSPlib is an open-source software library for analyzing general ordinary differential equation (ODE) and differential algebraic equation (DAE) systems, with specialized implementations for detailed chemical kinetic ODE/DAE systems. It relies on CSP for the analysis of these systems. CSPlib has been used in gas kinetic and heterogeneous catalytic kinetic models. Solution method: CSP analysis seeks a set of basis vectors to linearly decompose the right-hand side (RHS) of a dynamical system in a manner that decouples fast and slow processes. The CSP basis vectors are often well approximated with the right eigenvectors of the RHS Jacobian. And the left basis vectors are found by the inversion of the matrix, whose columns are the CSP basis vectors. Accordingly, the right and left CSP basis vectors are orthonormal. CSP defines mode amplitudes as the projections of the left basis vectors on the RHS; the time scales as the reciprocals of the RHS Jacobian eigenvalue magnitudes; and the CSP pointers, which are the element-wise multiplication of the transpose of the right CSP basis vectors with the left CSP basis vectors. For kinetic models that can be cast as the product of a generalized stoichiometric matrix and a rate of progress vector, CSP defines the participation index, which represents the contribution of a chemical reaction to each mode. Further, it defines the slow and fast importance indices, which describe the contribution of a chemical reaction to the slow and fast dynamics of a state variable, respectively. These indices are useful in diagnostic studies of dynamical systems and the construction of simplified models. Additional comments including restrictions and unusual features: CSPlib is a portable library that carries out many CSP analyses in parallel and can be used in modern high-performance platforms.

More Details

Using computational singular perturbation as a diagnostic tool in ODE and DAE systems: a case study in heterogeneous catalysis

Combustion Theory and Modelling

Diaz-Ibarra, Oscar H.; Kim, Kyungjoo K.; Safta, Cosmin S.; Zador, Judit Z.; Najm, H.N.

We have extended the computational singular perturbation (CSP) method to differential algebraic equation (DAE) systems and demonstrated its application in a heterogeneous-catalysis problem. The extended method obtains the CSP basis vectors for DAEs from a reduced Jacobian matrix that takes the algebraic constraints into account. We use a canonical problem in heterogeneous catalysis, the transient continuous stirred tank reactor (T-CSTR), for illustration. The T-CSTR problem is modelled fundamentally as an ordinary differential equation (ODE) system, but it can be transformed to a DAE system if one approximates typically fast surface processes using algebraic constraints for the surface species. We demonstrate the application of CSP analysis for both ODE and DAE constructions of a T-CSTR problem, illustrating the dynamical response of the system in each case. We also highlight the utility of the analysis in commenting on the quality of any particular DAE approximation built using the quasi-steady state approximation (QSSA), relative to the ODE reference case.

More Details

CSPlib - A Software Toolkit for the Analysis of Dynamical Systems and Chemical Kinetic Models

Diaz-Ibarra, Oscar H.; Kim, Kyungjoo K.; Safta, Cosmin S.; Najm, H.N.

CSPlib is an open source software library for analyzing general ordinary differential equation (ODE) systems and detailed chemical kinetic ODE systems. It relies on the computational singular perturbation (CSP) method for the analysis of these systems. The software provides support for: General ODE models (gODE model class) for computing source terms and Jacobians for a generic ODE system; TChem model (ChemElemODETChem model class) for computing source term, Jacobian, other necessary chemical reaction data, as well as the rates of progress for a homogenous batch reactor using an elementary step detailed chemical kinetic reaction mechanism. This class relies on the TChem [2] library; A set of functions to compute essential elements of CSP analysis (Kernel class). This includes computations of the eigensolution of the Jacobian matrix, CSP basis vectors and co-vectors, time scales (reciprocals of the magnitudes of the Jacobian eigenvalues), mode amplitudes, CSP pointers, and the number of exhausted modes. This class relies on the Tines library; A set of functions to compute the eigensolution of the Jacobian matrix using Tines library GPU eigensolver; A set of functions to compute CSP indices (Index Class). This includes participation indices and both slow and fast importance indices.

More Details

TChem v2.0 - A Software Toolkit for the Analysis of Complex Kinetic Models

Safta, Cosmin S.; Kim, Kyungjoo K.; Diaz-Ibarra, Oscar H.; Najm, H.N.

TChem is an open source software library for solving complex computational chemistry problems and analyzing detailed chemical kinetic models. The software provides support for: complex kinetic models for gas-phase and surface chemistry; thermodynamic properties based on NASA polynomials; species production/consumption rates; stable time integrator for solving stiff time ordinary differential equations; and, reactor models such as homogenous gas-phase ignition (with analytical Jacobian matrices), continuously stirred tank reactor, plug-flow reactor. This toolkit builds upon earlier versions that were written in C and featured tools for gas-phase chemistry only. The current version of the software was completely refactored in C++, uses an object-oriented programming model, and adopts Kokkos as its portability layer to make it ready for the next generation computing architectures i.e., multi/many core computing platforms with GPU accelerators. We have expanded the range of kinetic models to include surface chemistry and have added examples pertaining to Continuously Stirred Tank Reactors (CSTR) and Plug Flow Reactor (PFR) models to complement the homogenous ignition examples present in the earlier versions. To exploit the massive parallelism available from modern computing platforms, the current software interface is designed to evaluate samples in parallel, which enables large scale parametric studies, e.g. for sensitivity analysis and model calibration.

More Details
12 Results
12 Results