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

OpenSn: A massively parallel, open-source simulation environment for discrete ordinates radiation transport

OpenSn is an open-source, massively parallel deterministic radiation transport code for solving the discrete-ordinates ( S N ) form of the Boltzmann transport equation on unstructured, arbitrary polyhedral meshes. It supports high-fidelity simulations involving steady-state, eigenvalue, and adjoint problems for neutral particles (e.g., neutrons, photons, multi-particles), using the multigroup approximation in energy. OpenSn combines angular discretization via discrete ordinates with a discontinuous Galerkin finite element method (DGFEM) in space, enabling accurate resolution of transport physics on arbitrary polyhedral cells, included locally refined spatial grids. It includes multiple angular quadrature types, including locally refined angular quadratures. Written in modern C++ with a Python API, OpenSn runs efficiently on platforms ranging from laptops to supercomputers. The transport sweep algorithm is implemented using a task-based, directed-acyclic-graph (DAG) approach for each angle and supports asynchronous parallelism across thousands of MPI ranks. Group-set aggregation improves compute intensity, and synthetic acceleration techniques (e.g., diffusion synthetic acceleration, second-moment method) enhance solver convergence. OpenSn has been verified on reactor physics problems and demonstrated excellent weak and strong scaling performance on more than 32,768 processes, making it a versatile and robust platform for large-scale transport simulations in complex geometries.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

SparcleQC: Automated Input File Creation for QM/MM Studies of Protein:Ligand Complexes

SparcleQC is a Python package that, given a protein:ligand complex in the Protein Data Bank (PDB) file format, can create quantum mechanics/molecular mechanics (QM/MM)-like input files for the electronic structure theory packages PSI4, QChem, and NWChem. The resulting input files include quantum mechanical representations of the ligand and a small section of the protein, surrounded by point charges that represent the rest of the protein. Creation of these QM/MM input files includes cutting and capping the QM subregion, obtaining point charges for the protein, and adjusting charges at the QM/MM boundary; and each of these tasks are automated by the software. In this article, we describe the details of SparcleQC’s procedure, show examples of the Python API, and explain additional features that are helpful in protein:ligand interaction studies. Finally, we show that SparcleQC enables automated preparation of input files for QM/MM calculations, which can return can return accurate interaction energies in minutes, while a fully quantum mechanical computation on the protein:ligand complex could take days, if it is even possible.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗

Geant4 Monte-Carlo (GEMC) A database-driven simulation program

GEMC[1] is an application that harnesses the power of databases to execute Geant4 Monte-Carlo simulations. The databases (MYSQL, CSQL, TEXT) define the geometry, materials, digitization algorithms, readout electronics and output formats. Implemented in C++, GEMC also boasts a user-friendly Python API that facilitates detector construction and database population. GEMC can handle real-life scenarios such as geometry variations and the run number-dependent calibration constants and digitization parameters. This abstract provides an overview of GEMC, accompanied by examples that showcase its versatility. We delve into the practical application of GEMC within the the CLAS12 experimental program at Jefferson Lab.

Ungaro, Maurizio↗

Collision Tracking in OpenMC: Methods and Applications in Neutron Noise, Neutron Imaging, Time-of-Flight, and Multiplicity Counting

We present the development and application of a collision tracking feature within the OpenMC Monte Carlo particle transport code, designed for diverse applications such as neutron spectroscopy, scatter camera system, neutron noise, and multiplicity counting simulations. This feature enables the tracking of individual particle collisions, with potential applications in nuclear nonproliferation, reactor physics, and nuclear security. Additionally, the feature holds potential for the calibration of neutron detectors, specifically in converting light output into energy deposited within the detectors. The implementation consists of a set of filters—such as reaction type, energy, cell, and material—that constrain the set of collisions that are tracked, extensions to the Python API to enable simple input specification, and support for writing either OpenMC’s native HDF5-based format or the Monte Carlo particle list format. This feature was added to the official OpenMC release in version 0.15.3. In this work, the feature will be applied to showcase scenarios such as time-of-flight simulations, scatter-camera imaging for neutron source localization, neutron-noise analysis to extract integral kinetic parameters such as the prompt decay constant α, and multiplicity counting to estimate the mass of special nuclear materials. Ultimately, this feature aims to expand the application scope of open-source Monte Carlo particle transport codes such as OpenMC.

Monte Carlo code↗

HALOS (Heliostat Aimpoint and Layout Optimization Software) [SWR-21-41]

Heliostat Aimpoint and Layout Optimization Software (HALOS) is an open-source software package that allows users to explore solar field layout optimization, aimpoint strategy optimization, and performance characterization of concentrating solar power tower plants. Users interface with the tool through python, and results are reported in time series tables, plots, runtime logs, and flat-file outputs. Users choose from a list of variables such as tower height, receiver capacity, flux limits, design-point irradiance, etc., and specify information about the system using a small collection of flat files. The software can then optimize the specified variables (e.g., aimpoints for each heliostat) to maximize the thermal energy delivered to the receiver while adhering to flux limits. HALOS is implemented to be flexible with respect to flux characterization methods, but includes a direct connection to NREL's SolarPILOT™ software via its python API so that users can utilize high-fidelity flux simulation methods that have already been developed.

Zolan, Alexander↗

Smart Spectral Matching (SSM)

Smart Spectral Matching (SSM) catalogs spectroscopic data and, within the platform, investigates subtle attributes of spectral signatures from Raman and infrared spectroscopic data and enables statistical identification of connections between underlying structural units and spectroscopic information, particularly in fuel cycle materials that are amorphous or a mixture of several phases. Catalogs spectroscopic data, provides UIs for machine learning training either via JupyterHub for notebooks or domain scientist-specific views, machine learning and catalog REST API Python client libraries, and ability to identify features in files uploaded using pre-trained machine learning models. This is a "service-based" architecture with multiple applications represented by each repository in the group https://github.com/smart-spectral-matching

McDonnell, Marshall [Oak Ridge National Lab. (ORNL↗

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),↗

Building access and community standards for opacity data at the onset of next-generation atmosphere observations

The characterization of a diverse set of exoplanet atmosphere observations, ranging from hot gas giants to small temperate rocky worlds, will be one of the legacies of upcoming facilities such as the James Webb Space Telescope (JWST). Our understanding and interpretation of such observations will hinge on our ability to link observations with atmospheric theoretical studies that critically rely on fundamental molecular and atomic opacities. Computing such opacities is a highly non-trivial and inaccessible process which requires several terabytes of available disk space, hours of CPU time per pressure-temperature combination, and requires users to carefully aggregate line lists data from various sources, which limits access and intercomparison of opacity data in the exoplanet community. Here we present MAESTRO (Molecules and Atoms in Exoplanet Science: Tools and Resources for Opacities) an opacity database that can be accessed by the community via a web interface and python API. MAESTRO was built with community input to create a version-controlled opacity database that is easily queryable, includes informative metadata to ensure reproducibility, and exports relevant citations for inclusion in publications. Scheduled for community release in 2022, MAESTRO will prove to be an invaluable community resource in the era of JWST and beyond.

Natasha Batalha↗

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↗

Improving Access to the GEOS Composition Forecast Model with API Development and Ingestion into Google Earth Engine

The GEOS Composition Forecast (GEOS-CF) model produces forecast and historical estimates of atmospheric composition and meteorology fields, which provide useful insight into air quality issues and events. In a year for which Canadian wildfires created adverse air quality conditions in the eastern United States, access to model fields such as PM2.5 are in high demand. The GEOS-CF team at the NASA Global Modeling and Assimilation Office (GMAO) first developed in-house solutions to improve data access via the CF API, and recently partnered with Google to ingest a collated set of model diagnostics into the Google Earth Engine (GEE) data repository. GEOS-CF model output is also being ingested into AWS storage. Creating these various open access points to GEOS-CF model diagnostics provides the public with an opportunity to easily interact with air quality information. Users are able to use a temporally consistent global grid of air quality fields in machine learning applications, mapping tools, and data informatics. Hosting GEOS-CF forecasts and the historical timeseries of these chemistry and meteorology fields in GEE allows users to create dynamic JavaScript-based air quality applications in the GEE code editor. GEOS-CF users can also access the model output via the GEE Python application programming interface (API), making it easy to perform various analyses with Python. This presentation will show two examples of accessing the GEOS-CF model through GEE. The first is an example application made in the GEE code editor which allows users to view time series plots and downscaled maps of surface level NO2. The second example exhibits using the GEE Python API to create a machine learning model to temporally gap-fill between air quality observations. These examples are an introduction to the many possible benefits of having open access to the GEOS-CF model through multiple platforms.

Callum Wayman↗