Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “Python API”

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 37 records · Page 2

CatHub

Python API for the Surface Reactions database on Catalysis-Hub.org, used for querying and uploading data.

Winther, Kirsten↗

GAT (Grid Analysis Toolkit) [SWR-25-41]

Grid Analysis Toolkit (GAT) is a unified Python API and plotting for power system PCM and CEM results (Sienna, PLEXOS, ReEDS™). It's a toolkit for wrangling data for Bulk Grid Dispatch and Transmission Analysis. GAT aims to provide simplified access to PCM and CEM results in a standard format while also allowing raw data access to underlying datasets specific to the model. This software can also be found on PyPI at For plotting, GAT defaults to standard National Lab of the Rockies (NLR) color schemes and standard styles while allowing customization.

Webb, Micah [National Laboratory of the Rockies (N↗

pySimpleMask

SF-26-118 pySimpleMask is a tool for creating masks and Q-partition maps for X-ray scattering patterns, supporting SAXS, WAXS, and XPCS data reduction. It ships both a desktop GUI and a headless Python API that can drive the full pipeline from scripts.

Chu, Miaoqi [Argonne National Laboratory (ANL), Ar↗

rabpro: global watershed boundaries, river elevation profiles, and catchment statistics

River and Basin Profiler (rabpro) is a Python package to delineate watersheds, extract river flowlines and elevation profiles, and compute watershed statistics for any location on the Earth’s surface. As fundamental hydrologically-relevant units of surface area, watersheds are areas of land that drain via aboveground pathways to the same location, or outlet. Delineations of watershed boundaries are typically performed on digital elevation models (DEMs) that represent surface elevations as gridded rasters. Depending on the resolution of the DEM and the size of the watershed, delineation may be very computationally expensive. With this in mind, we designed rabpro to provide user-friendly workflows to manage the complexity and computational expense of watershed calculations given an arbitrary coordinate pair. In addition to basic watershed delineation, rabpro will extract the elevation profile for a watershed’s mainchannel flowline. This enables the computation of river slope, which is a critical parameter in many hydrologic and geomorphologic models. Finally, rabpro provides a user-friendly wrapper around Google Earth Engine’s (GEE) Python API to enable cloud-computing of zonal watershed statistics and/or time-varying forcing data from hundreds of available datasets. Altogether, rabpro provides the ability to automate or semi-automate complex watershed analysis workflows across broad spatial extents.

54 ENVIRONMENTAL SCIENCES↗

Methods in PES-Learn: Direct-Fit Machine Learning of Born–Oppenheimer Potential Energy Surfaces

The release of PES-L EARN version 1.0 as an open-source software package for the automatic construction of machine learning models of semi-global molecular potential energy surfaces (PESs) is presented. Improvements to PES-L EARN ’s interoperability are stressed with new Python API that simplifies workflows for PES construction via interaction with QCSchema input and output infrastructure. In addition, a new machine learning method is introduced to PES-L EARN : kernel ridge regression (KRR). The capabilities of KRR are emphasized with examination of select semi-global PESs. All machine learning methods available in PES-L EARN are benchmarked with benzene and ethanol datasets from the rMD17 database to illustrate PES-L EARN ’s performance ability. Fitting performance and timings are assessed for both systems. Finally, the ability to predict gradients with neural network models is presented and benchmarked with ethanol and benzene. PES-L EARN is an active project and welcomes community suggestions and contributions.

kernel ridge regression↗

HydroChrono: An Open-Source Hydrodynamics Package for Project Chrono

In this paper we present the development and verification of HydroChrono, a hydrodynamics package for the Project Chrono physics engine. This package includes the implementation of hydrodynamics equations, the added mass for multibody systems, the development of I/O functions as well as a Python API, and comparison against standard reference cases and other existing tools. HydroChrono provides a flexible, fully open-source solution for simulating wave energy converters (WECs), floating offshore wind turbines (FOWTs) platforms, and other hydrodynamic systems. Here we show, via comparisons with existing tools for benchmark verification cases, that HydroChrono accurately models hydrodynamic forces - making it a useful tool for the design and optimization of these systems. Additionally, the integration of HydroChrono with Project Chrono offers access to finite element modeling capabilities and high-fidelity modelling - with Chrono's existing coupling to CFD and SPH codes. This provides numerical modelers with a multifidelity simulation framework for designing and validating these systems. The development of HydroChrono provides a new, open-source solution for simulating hydrodynamic systems. Its compatibility with other simulation tools enables a more streamlined and efficient design process, advancing the field and providing new opportunities for innovation in this area.

BEM↗

BM3DORNL

BM3DORNL is a high-performance, open-source library for removing streak and ring artifacts from computed-tomography (CT) data, developed for neutron imaging at Oak Ridge National Laboratory's Spallation Neutron Source (VENUS beamline) and applicable to X-ray CT as well. Ring artifacts — concentric rings in reconstructed slices caused by detector pixel-to-pixel response non-uniformities — appear as vertical streaks in the sinogram and degrade both image quality and quantitative analysis. BM3DORNL operates in the sinogram domain using an adaptation of the BM3D (block-matching and 3D collaborative filtering) algorithm (Dabov et al., 2007). It provides a dedicated streak-removal mode, a true multi-scale BM3D variant (after Mäkinen et al., 2021) that suppresses wide streaks single-scale methods miss, and an alternative Fourier–SVD method (~2.6× faster) combining FFT-based energy detection with rank-1 SVD. The computationally intensive core is implemented in Rust with parallel (Rayon) block matching, integral-image pre-screening, and optimized transforms, and is exposed through a simple Python API (with an optional GUI) so it integrates directly into existing tomography reconstruction pipelines. It processes both 2D sinograms and 3D sinogram stacks, is pip-installable for Linux and macOS, and is documented at https://bm3dornl.readthedocs.io.

Zhang, Chen [Oak Ridge National Laboratory (ORNL),↗

LeWRON: Agentic Analysis of Electroweak Phase Transitions

The electroweak phase transition (EWPT) is a central topic in particle physics and cosmology, connecting collider phenomenology, baryogenesis, and gravitational-wave observatories. Its analysis requires a technically demanding, convention-sensitive, and model-dependent pipeline, from constructing the finite-temperature effective potential to tracking thermal histories, computing bubble nucleation rates, and predicting gravitational-wave spectra. We present LeWRON (Learning ElectroWeak phase tRansitiON), an agentic framework that orchestrates this pipeline starting from an input Lagrangian. LeWRON combines audited toolbox construction with an Explorer module that uses the generated model-specific code for further analysis, including scans and plots. Intermediate analytic outputs are checked by auditor agents and stored as structured artifacts, enabling reproducible human inspection and downstream use through both a command-line interface and a public Python API. The framework supports a reproduction mode, which infers conventions from the literature and reproduces published results, and a discovery mode, which guides users through structured checkpoints for new models. We demonstrate LeWRON across representative beyond-the-Standard-Model scenarios and release the code on GitHub.

Wang, Isaac R. [Fermilab] (ORCID:000000030789218X)↗

Enhancing Monte Carlo Workflows for Nuclear Reactor Analysis with Metamodel-Driven Modeling

Monte Carlo codes are essential components of many reactor physics simulation workflows as high-fidelity continuous-energy neutron transport solvers. Among Monte Carlo radiation transport codes, MCNP is particularly notable due to its diverse simulation capabilities, large user base, and long validation history. Despite being a powerful simulation tool, MCNP provides limited capabilities to allow automated execution, model transformation, or support for user-defined logic and abstractions that limit its compatibility with modern workflows. Here, to better integrate MCNP into a modern scientific workflow, we have developed an intuitive yet full-featured MCNP Application Program Interface (API) in Python, named MCNPy, which provides a specialized set of classes for MCNP input development. Moreover, to guarantee that our reading, writing, and modeling capabilities remain self-consistent (and to render the huge scope of the MCNP API manageable), we have adopted a strategy of model-driven software development in which a generalized model of the MCNP input format has been created. From this generalized model, or “metamodel,” problem-specific implementations such as an engine for input validation or a codebase for programmatic operations may be automatically generated. Since MCNPy primarily acts as a Python front-end to the underlying Java API that directly interfaces with the metamodel, it is intrinsically linked to the metamodel and thus remains maintainable. With MCNPy, users can programmatically read, write, and modify any syntactically valid MCNP input file regardless of its origin. These capabilities allow users to automate complicated tasks like design optimization and model translation for nuclear systems. As examples, this work demonstrates the use of MCNPy to find the critical radius of a plutonium sphere and to translate a 9000+ line MCNP input file into a corresponding OpenMC model.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

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↗

sfapi_client v1.0

This software is a client designed to interact with the Superfacility API developed at NERSC. It allows users to easily access the api in python and programmatically interact with the compute resources available at NERSC. Other implementations are ad-hoc and made by our user base, the goal of the project is to encourage more users to adopt the API by making it easier to start building complex HPC workflows.

Tyler, Nicholas↗

Improving Runtime Performance of Tensor Computations using Rust From Python

In this work, we investigate improving the runtime performance of key computational kernels in the Python Tensor Toolbox (pyttb), a package for analyzing tensor data across a wide variety of applications. Recent runtime performance improvements have been demonstrated using Rust, a compiled language, from Python via extension modules leveraging the Python C API—e.g., web applications, data parsing, data validation, etc. Using this same approach, we study the runtime performance of key tensor kernels of increasing complexity, from simple kernels involving sums of products over data accessed through single and nested loops to more advanced tensor multiplication kernels that are key in low-rank tensor decomposition and tensor regression algorithms. In numerical experiments involving synthetically generated tensor data of various sizes and these tensor kernels, we demonstrate consistent improvements in runtime performance when using Rust from Python over 1) using Python alone, 2) using Python and the Numba just-in-time Python compiler (for loop-based kernels), and 3) using the NumPy Python package for scientific computing (for pyttb kernels).

97 MATHEMATICS AND COMPUTING↗

CrossLink: General Overview [Slides]

Problem: Traditional mesh generation approaches are labor intensive and have limited robustness when applied to parametric design exploration and optimization of complex geometries. While automatic mesh generation approaches exist, they tend to generate tetrahedral or mixed-hybrid meshes which are generally unsuitable for physics applications with strong shock waves, thin boundary layers, and strong gradients. In addition, simulations sizes in the billions of cells are becoming more common with traditional mesh generation methods quickly reaching scalability limits. Solution: CrossLink offers a topology-based mesh generation approach with unstructured block-filling methods and a scalable mesh generation engine. In addition, CrossLink incorporates a python-based API for seamless workflow integration and robust repeatability of the geometry handling and mesh generation process. This makes it ideal for parametric design study and optimization of complex geometries. Finally, future versions of CrossLink will offer a parametric mesh capability that optimizes a high-order mesh and enables reconstruction of the final mesh in memory by the physics solver.

97 MATHEMATICS AND COMPUTING↗

Tools for Assessing Performance: FY23-Q1 Report [Slides]

LANL was tasked with working with NREL to implement QUIC within the TAP API by the end of Q1, FY2023. If QUICURB cannot be implemented in a way that it can be run outside of the QUIC platform, there will be no further R&D funding for QUIC development. QUIC includes a graphical user interface that imports and preprocesses the various input data streams (3D building databases, ambient wind, vegetation, etc.) and writes them in a format that the QUICURB Fortran executable requires. In order to interface with the TAP API, a Python script was developed that would replace the functionality previously only available within QUICGUI. LANL worked with NREL to test the Python script to ensure that it was operation and fulfilled the requirements.

58 GEOSCIENCES↗

CrossLink: Advancements in Scalable Unstructured Mesh Generation [Slides]

Traditional mesh generation approaches are labor intensive and have limited robustness when applied to parametric design exploration and optimization of complex geometries. While automatic mesh generation approaches exist, they tend to generate tetrahedral or mixed-hybrid meshes which are generally unsuitable for physics applications with strong shock waves, thin boundary layers, and strong gradients. In addition, simulations sizes in the billions of cells are becoming more common with traditional mesh generation methods quickly reaching scalability limits. CrossLink offers a topology-based mesh generation approach with unstructured block-filling methods and a scalable mesh generation engine. In addition, CrossLink incorporates a python based API for seamless workflow integration and robust repeatability of the geometry handling and mesh generation process. This makes it ideal for parametric design study and optimization of complex geometries. Finally, future versions of CrossLink will offer a parametric mesh capability that optimizes a high-order mesh and enables reconstruction of the final mesh in memory by the physics solver.

97 MATHEMATICS AND COMPUTING↗

Python wrapper library and analysis functions for Geotab Altitude API [SWR-24-77]

This software library serves as a Python wrapper for Geotab's Altitude API. It streamlines querying of the API, converts loosely structured API outputs into a standardized tabular data format, and enables analysis of the resulting data tables. It also includes example notebooks showing how to use the library.

Bruchon, Matthew↗

Cross-Facility Orchestration of Electrochemistry Experiments and Computations

Instrument-computing ecosystems supporting automated electrochemical workflows typically require the integration of disparate instruments such as syringe pump, fraction collector, and potentiostat, all connected to an electrochemical cell. These specialized instruments with custom software and interfaces are not typically designed for network integration and remote automation. We developed a networked ecosystem of these instruments and computing platforms, which includes software to enable automated workflow orchestration from remote computers. Specifically, we developed Python wrappers of APIs and custom Pyro client-server modules to support remote operation of these instruments over the ecosystem network. Herein, we describe a specific workflow for generating and validating voltammogram (I-V) measurements of an electrolyte solution pumped into the electrochemical cell. We demonstrate the orchestration of this workflow which is composed using a Jupyter notebook and executed on a remote computer.

Al Najjar, Anees↗

A parametric finite element study for determining burst strength of thin and thick-walled pressure vessels

To accurately predict the burst strength of both thin and thick-walled pressure vessels (PVs), a parametric study of PV burst strength was performed for a wide range of vessel geometries and materials using elastic-plastic finite element analysis (FEA). A valid FEA model was established through a detailed study of 2D versus 3D FEA models, the critical stress failure criterion versus the limit load criteria, and the thick-wall effect on the FEA simulations. Here, the results show that the stresses and strains at the mean diameter, rather than outside diameter, determines a more accurate burst strength for both thin and thick-walled PVs. On this basis, a parametrized FEA script using the ABAQUS Python application programming interface (API) was used to create a large database of PV burst strengths for a variety of vessel geometries and materials, demonstrating that Python scripting is a powerful technique for performing parametric studies or generating large databases. From the FEA results, using the regression method, a new burst pressure model was developed as a function of the vessel geometry (D/t ratio) and material properties (UTS and n). As validated by a large number of full-scale burst test data, the proposed burst model can very accurately predict the burst strength for both thin and thick-walled PVs.

42 ENGINEERING↗