Engineering PapersSearch

SEARCH · Engineering Papers

Results for “python”

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

ZMPY3D: accelerating protein structure volume analysis through vectorized 3D Zernike moments and Python-based GPU integration

Abstract Motivation Volumetric 3D object analyses are being applied in research fields such as structural bioinformatics, biophysics, and structural biology, with potential integration of artificial intelligence/machine learning (AI/ML) techniques. One such method, 3D Zernike moments, has proven valuable in analyzing protein structures (e.g., protein fold classification, protein–protein interaction analysis, and molecular dynamics simulations). Their compactness and efficiency make them amenable to large-scale analyses. Established methods for deriving 3D Zernike moments, however, can be inefficient, particularly when higher order terms are required, hindering broader applications. As the volume of experimental and computationally-predicted protein structure information continues to increase, structural biology has become a “big data” science requiring more efficient analysis tools. Results This application note presents a Python-based software package, ZMPY3D, to accelerate computation of 3D Zernike moments by vectorizing the mathematical formulae and using graphical processing units (GPUs). The package offers popular GPU-supported libraries such as CuPy and TensorFlow together with NumPy implementations, aiming to improve computational efficiency, adaptability, and flexibility in future algorithm development. The ZMPY3D package can be installed via PyPI, and the source code is available from GitHub. Volumetric-based protein 3D structural similarity scores and transform matrix of superposition functionalities have both been implemented, creating a powerful computational tool that will allow the research community to amalgamate 3D Zernike moments with existing AI/ML tools, to advance research and education in protein structure bioinformatics. Availability and implementation ZMPY3D, implemented in Python, is available on GitHub (https://github.com/tawssie/ZMPY3D) and PyPI, released under the GPL License.

Lai, Jhih-Siang (ORCID:0000000156775890)

Mojo: MLIR-based Performance-Portable HPC Science Kernels on GPUs for the Python Ecosystem

We explore the performance and portability of the novel Mojo language for scientific computing workloads on GPUs. As the first language based on the LLVM’s Multi-Level Intermediate Representation (MLIR) compiler infrastructure, Mojo aims to close performance and productivity gaps by combining Python’s interoperability and CUDA-like syntax for compile-time portable GPU programming. We target four scientific workloads: a seven-point stencil (memory-bound), BabelStream (memory-bound), miniBUDE (compute-bound), and Hartree–Fock (compute-bound with atomic operations); and compare their performance against vendor baselines on NVIDIA H100 and AMD MI300A GPUs. We show that Mojo’s performance is competitive with CUDA and HIP for memory-bound kernels, whereas gaps exist on AMD GPUs for atomic operations and for fast-math compute-bound kernels on both AMD and NVIDIA GPUs. Although the learning curve and programming requirements are still fairly low-level, Mojo can close significant gaps in the fragmented Python ecosystem in the convergence of scientific computing and AI.

Godoy, William [ORNL] (ORCID:0000000225905178)

Geometric surprises in the Python's lunch conjecture

A bulge surface, on a time reflection-symmetric Cauchy slice of a holographic spacetime, is a non-minimal extremal surface that occurs between two locally minimal surfaces homologous to a given boundary region. According to the python’s lunch conjecture of Brown et al., the bulge’s area controls the complexity of bulk reconstruction, in the sense of the amount of post-selection that needs to be overcome for the reconstruction of the entanglement wedge beyond the outermost extremal surface. We study the geometry of bulges in a variety of classical spacetimes, and discover a number of surprising features that distinguish them from more familiar extremal surfaces such as Ryu-Takayanagi surfaces: they spontaneously break spatial isometries, both continuous and discrete; they are sensitive to the choice of boundary infrared regulator; they can self-intersect; and they probe entanglement shadows, orbifold singularities, and compact spaces such as the sphere in AdS _p× S^q p × S q . These features imply, according to the python’s lunch conjecture, novel qualitative differences between complexity and entanglement in the holographic context. We also find, surprisingly, that extended black brane interiors have a non-extensive complexity; similarly, for multi-boundary wormhole states, the complexity pleateaus after a certain number of boundaries have been included.

Physics

Once-Through Steam Generator Model Analysis Using Python and Advanced Optimization Tools (Summer Internship Report)

This study focuses on the parametric analysis of design parameters for a once-through steam generator (OTSG) model, using python and advanced optimization tools to facilitate applications such as the flowing autoclave steam generator (FASG) test cases. Building on previous research involving another OTSG with a different design, this project aims to enhance our understanding of how steam generators (SGs) behave and how their outputs are influenced by changes in design. The reason for this design change is to allow for more precise modeling and optimization of SG performance, to provide a comparative analysis between the two designs, and to set up the model for integration with the FASG test case. The OTSG python-model is a mathematical representation (including fluid flow and heat transfer equations/models/correlations) of a steam-generating unit in a pressurized water reactor-type small modular reactor system. Design studies involve changing the model’s input design parameters to observe the resulting effects on the output of the system. By using advanced optimization tools, such as the Risk Analysis Virtual Environment (RAVEN) developed at Idaho National Laboratory, detailed design parametric studies and model optimization were performed. Six input parameters—pressure, temperature, and mass flow rate for the inlet of the primary-side (hot fluid) and secondary-side (cold fluid), respectively, of the SG—were randomly perturbed via RAVEN’s Monte Carlo Sampler module, using uniform distributions (i.e., ±1%, ±5% and ±10% relative changes) for 600 samples. The analysis provides valuable insights into SG optimization and can be used for sensor placement optimization to effectively monitor and obtain experimental data in other tests.

20 FOSSIL-FUELED POWER PLANTS

ATEAM4Py: An Efficient and Scalable Python-Based Model for Charging Demand

This report details the development and implementation of ATEAM4Py, a Python-based simulation model that projects demand for battery electric vehicle (BEV) charging based on adoption trends and consumer behavior. With Exelon’s support, Argonne National Laboratory converted the original Java-based Agent-based Transportation Energy Analysis Model (ATEAM) into Python, resulting in a faster and more efficient tool for forecasting the timing, location, and scale of charging demand growth. ATEAM4Py tackles key challenges in simulation efficiency and runtime, supporting the strategic development of cost-effective grid capacity expansion strategies and ensuring reliable service for stakeholders.

33 ADVANCED PROPULSION SYSTEMS

A Fortran–Python interface for integrating machine learning parameterization into earth system models

Abstract. Parameterizations in earth system models (ESMs) are subject to biases and uncertainties arising from subjective empirical assumptions and incomplete understanding of the underlying physical processes. Recently, the growing representational capability of machine learning (ML) in solving complex problems has spawned immense interests in climate science applications. Specifically, ML-based parameterizations have been developed to represent convection, radiation, and microphysics processes in ESMs by learning from observations or high-resolution simulations, which have the potential to improve the accuracies and alleviate the uncertainties. Previous works have developed some surrogate models for these processes using ML. These surrogate models need to be coupled with the dynamical core of ESMs to investigate the effectiveness and their performance in a coupled system. In this study, we present a novel Fortran–Python interface designed to seamlessly integrate ML parameterizations into ESMs. This interface showcases high versatility by supporting popular ML frameworks like PyTorch, TensorFlow, and scikit-learn. We demonstrate the interface's modularity and reusability through two cases: an ML trigger function for convection parameterization and an ML wildfire model. We conduct a comprehensive evaluation of memory usage and computational overhead resulting from the integration of Python codes into the Fortran ESMs. By leveraging this flexible interface, ML parameterizations can be effectively developed, tested, and integrated into ESMs.

54 ENVIRONMENTAL SCIENCES

A Fortran-Python Interface for Integrating Machine Learning Parameterization into Earth System Models

Parameterizations in Earth System Models (ESMs) are subject to biases and uncertainties arising from subjective empirical assumptions and incomplete understanding of the underlying physical processes. Recently, the growing representational capability of machine learning (ML) in solving complex problems has spawned immense interests in climate science applications. Specifically, ML-based parameterizations have been developed to represent convection, radiation and microphysics processes in ESMs by learning from observations or high-resolution simulations, which have the potential to improve the accuracies and alleviate the uncertainties. Previous works have developed some surrogate models for these processes using ML. These surrogate models need to be coupled with the dynamical core of ESMs to investigate the effectiveness and their performance in a coupled system. In this study, we present a novel Fortran-Python interface designed to seamlessly integrate ML parameterizations into ESMs. This interface showcases high versatility by supporting popular ML frameworks like PyTorch, TensorFlow, and Scikit-learn. We demonstrate the interface's modularity and reusability through two cases: a ML trigger function for convection parameterization and a ML wildfire model. We conduct a comprehensive evaluation of memory usage and computational overhead resulting from the integration of Python codes into the Fortran ESMs. By leveraging this flexible interface, ML parameterizations can be effectively developed, tested, and integrated into ESMs.

54 ENVIRONMENTAL SCIENCES

DancePartner: Python Package to Mine Multiomics Relationship Networks from Literature and Databases

A goal of multi-omics experiments is to understand how mechanistic molecular biology is altered between conditions, typically a control group and experimental groups. Oftentimes this involves studying changes in biomolecule relationships (e.g. interactions, metabolic relationships) of several types of biomolecules (e.g. proteins, lipids, metabolites). Though several databases contain relationships between biomolecules, understudied species may have little to no relationship information in databases and thus must be mined from literature. There are several challenges to literature mining, including automated full-text extraction, duplicate biomolecule term collapsing, and implementing complex machine learning tools. To make relationship extraction more accessible to the community, a python package called DancePartner was developed to allow for the extraction of relationships from literature and databases, with functions to map biomolecule synonyms to standardized identifiers and visualize and characterize the resulting multi-omics network. Here, in this study, an example dataset involving Caenorhabditis elegans is presented, where relationships are mined from 1443 publications using DancePartner. These relationships are combined with relationships from KEGG, WikiPathways, UniProt, and LipidMaps, and visualized.

BERT

BatteryPro: A Python Toolkit for Battery Data Analysis and Machine Learning Predictions

Analyzing battery test data for research & development can be time-consuming since battery tests often run on the order of months to years, generating large volumes of data. BatteryPro is a comprehensive Python package and software designed to facilitate advanced analysis and performance predictions for battery test data. Developed for battery researchers, it supports data types from widely used battery testing instruments, including MACCOR and Biologic cycling systems. The software provides a variety of tools for extracting and plotting key battery parameters such as time, voltage, capacity, current, and pressure. In addition to its extensive data analysis capabilities, BatteryPro features a dedicated machine learning module that employs a Bayesian Gaussian Mixture Model (GMM) to predict battery performance and degradation. Users can generate synthetic capacity fade data, calculate fade metrics, and leverage predictive models to forecast long-term battery behavior. The software's graphical user interface (GUI) enhances usability, allowing researchers to upload, merge, and analyze multiple data files with full customizability. The GUI also supports machine learning predictions, enabling users to fit models and make predictions based on selected data and parameters. BatteryPro is built using QtDesigner, scikit-learn, matplotlib, and pandas, ensuring a high level of customization, flexibility, and accuracy in battery data analysis. This tool aims to empower researchers with the ability to perform detailed battery analysis and make informed predictions, ultimately advancing the field of battery research.

25 - ENERGY STORAGE

Enhancing EnergyPlus capabilities to model dynamic building envelopes using python plugin

Nearly half of the energy consumption in the United States is related to buildings, resulting in an urgent need to develop innovative technologies to improve building energy efficiency. Dynamic building envelopes, comprising switchable insulation and thermal energy storage materials, have been proposed recently as a promising solution to reduce buildings' heating and cooling loads by thermally coupling the indoor environment with the ambient environment when beneficial while decoupling them when outdoor conditions are not favorable. Although various related technologies are still underway, the whole-building energy modeling tools, like EnergyPlus, do not have the capability to simulate the transient and dynamic nature of dynamic envelope materials and components to accurately predict their impact on building energy use. The objective of this study is to formulate a method in EnergyPlus simulation engine to model multilayer envelopes, comprising dynamic building materials with variable thermophysical properties, and discuss the changes made to the program using a Python plugin. Furthermore, the thermal performance of the dynamic envelopes using the proposed method is compared and verified with the results from a well-established commercial code, COMSOL Multiphysics. A parametric assessment is also conducted to evaluate the energy efficiency benefits of dynamic envelopes in a single-family residential building, demonstrating total annual energy savings up to 11.6 %, when a dynamic envelope operates alone, and up to 18.2 % when it is combined with a thin layer of phase change material as a thermal storage medium. Finally, a United States wide energy efficiency assessment is presented to showcase the geographical spread of the energy savings. The method designed and implemented in this study provides the researchers with the ability to implement their dynamic insulation methods in EnergyPlus and evaluate the whole building energy impact.

25 ENERGY STORAGE

Grain2mesh: A Python and cubit mesh generator from unprocessed mesoscale images

Predicting bulk behavior from microscale features constitutes a key objective in multiscale modeling research, often involving numerical models composed of finite elements that capture the diversity of constituent phases, shapes, and orientations within the material. The Grain2mesh toolbox allows the user to input unprocessed mesoscopic images for automatic segmentation, pre-processing, quality control, and numerical mesh generation. The numerical mesh generation incorporates Cubit routines to generate robust multi-phase mesh structure for use in computational mechanics solvers. The python classes developed contain detailed documentation and examples to support standard usage and case-specific alternative options.

58 GEOSCIENCES

Teaching Nonradiative Transitions with MATLAB and Python

Nonradiative transitions are changes in energy states of atoms, ions, or molecules that do not involve the emission or absorption of photons. Despite their importance in understanding luminescent properties and photochemical reaction mechanisms, nonradiative transitions are rarely given more than a qualitative overview in undergraduate and even graduate physical chemistry curricula. To supplement the coverage of nonradiative transition topics, we provide here a set of active learning exercises to help students develop an intuitive understanding of the factors that determine the rate of nonradiative transitions. Here, we start by outlining the theoretical background through the formulations of the Franck–Condon factor and its relation to the rate of nonradiative transition. We then introduce three teaching modules, with associated MATLAB and Python codes, to explore how (1) the excited state nuclear displacement, (2) the electronic energy gap between excited and ground state and (3) the excited/ground state vibrational mode frequencies affect the magnitude of the Franck–Condon factor and thereby the rate of nonradiative transitions. The wave function overlap plots that accompany all teaching modules provide direct visualization of the effect of input parameters on the magnitude of Franck–Condon overlap integral.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH

KBKit: A Python Toolkit for Kirkwood–Buff Theory from Molecular Dynamics

Thermodynamic properties of liquid mixtures govern processes that range from drug delivery to energy storage, yet extracting these properties from molecular simulations remains challenging. Kirkwood–Buff (KB) theory offers a rigorous route by linking microscopic pair distribution functions to macroscopic free energies, but practical use of the theory has been hindered by two obstacles: (i) the long simulations needed to obtain well-converged Kirkwood-Buff integrals (KBIs) and (ii) the specialized corrections required to translate finite-size data to the thermodynamic limit. $\texttt{KBKit}$ is an open-source Python package that removes these barriers. It automatically computes KBIs and derived thermodynamic quantities from GROMACS input files, applies state-of-the-art finite-size corrections, and provides built-in diagnostic tools to quantify statistical uncertainty. Written with modern software-engineering practices—continuous integration, extensive unit testing, and thorough documentation—$\texttt{KBKit}$ is both reliable and easy to extend. By condensing complex KBI analysis into a few intuitive commands, $\texttt{KBKit}$ enables researchers to incorporate KB theory into routine simulation workflows and accelerate the discovery of solution-phase thermodynamics.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH

PyLRO: A Python calculator for analyzing long-range structural order

We present PyLRO, an open-source Python calculator designed to detect, quantify, and display long-range order in periodic structures. The program’s design methodology, workflow, and approach to order quantification are described and demonstrated using a simple toy model. Additionally, we apply PyLRO to a series of metastable AlPO 4 structural intermediates from a prior high-pressure study, demonstrating how to compute and visualize structural order in all directions on a Miller sphere. We further highlight the program’s capabilities through a high-throughput analysis of structural patterns in the pressure-induced amorphization of AlPO 4 , revealing atomistic insights into specific energy regions of massive amorphous structures. These results suggest that PyLRO can be a valuable tool for investigating crystal–amorphous transition in materials research.

36 MATERIALS SCIENCE

Application of an Empirical Density Law via Python for Aqueous Plutonium Chloride Systems for MCNP6

Criticality safety models for aqueous plutonium chloride systems often contain a significant bias due to assumptions in material compositions. These systems are currently modeled as a fictitious metal-water mixture because little is known about the true solution density. Furthermore, no predictive density tools or capabilities for modeling aqueous plutonium chloride systems are approved for use at Los Alamos National Laboratory. Recent density measurements of this ternary system (PuCl 3 -HCl-H 2 O) have allowed for the development of a more realistic density law, which is applied in this work via an empirical method based in Python. This tool, entitled PuCS (Plutonium Chloride Solution tool) may be used to determine solution density and composition based on the plutonium content, acid content, and temperature for MCNP6 inputs. PuCS has been found to predict density within 2% of experimental data. In conclusion, MCNP6 calculations have found that crediting minimal amounts of free acid (0.5 M) may correspond to a ~12% decrease in peak reactivity in comparison to current modeling methods.

42 ENGINEERING

A Python Tool for Aqueous Plutonium Nitrate Density Law Input Preprocessing in MCNP6

Here, this work develops a predictive density tool in Python, named Plutonium Nitrate Solutions (PuNS), to reduce bias and uncertainty in nuclear criticality safety calculations for plutonium nitrate systems. The Pitzer method and an empirical method were implemented into the PuNS tool to generate atom densities for use in MCNP6 material cards. These material cards are directly prepared into an MCNP6 input text file and are calculated based on customizable user inputs of plutonium content, nitric acid content, temperature, and plutonium isotope weight percentages. The PuNS tool is validated and verified against the International Criticality Safety Benchmark Evaluation Project Handbook experiments and is observed to predict densities within a root mean square error of 0.89% for the Pitzer method and 1.82% for the empirical method. These errors in density lead to up to 1569 pcm difference in MCNP6 calculated k eff for the Pitzer method and up to a 1751 pcm difference for the empirical method when compared to experimental benchmarks. Simultaneous work is also being performed at Los Alamos National Laboratory and the University of New Mexico to create a similar tool for plutonium chloride solutions, named Plutonium Chloride Solution, which aims to provide the accreditation of the chlorine absorption. These capabilities will not only provide more accurate models but also facilitate an improved understanding of solution systems and a potential relaxation in the conservatism of current aqueous plutonium processing criticality safety limits.

38 RADIATION CHEMISTRY, RADIOCHEMISTRY, AND NUCLEA

Eliater: a Python package for estimating outcomes of perturbations in biomolecular networks

We introduce Eliater, a Python package for estimating the effect of perturbation of an upstream molecule on a downstream molecule in a biomolecular network. The estimation takes as input a biomolecular network, observational biomolecular data, and a perturbation of interest, and outputs an estimated quantitative effect of the perturbation. We showcase the functionalities of Eliater in a case study of Escherichia coli transcriptional regulatory network.

59 BASIC BIOLOGICAL SCIENCES

PyFaults: A Python Toolkit for Stacking Fault Screening

PyFaults is an open-source Python library designed to model stacking fault disorder in crystalline materials and qualitatively assess the characteristic selective broadening effects in powder X-ray diffraction (PXRD). Here, the main capabilities of PyFaults are presented, including unit cell and supercell model construction, PXRD pattern calculation, assessment against experimental PXRD, and methods for rapid screening of candidate models within a set of possible stacking vectors and fault occurrence probabilities. This program aims to serve as a computationally inexpensive tool for identifying and screening potential stacking fault models in materials with planar disorder. Three diverse case studies, involving GaN, Li2MnO3 and Li3YCl6, are presented to illustrate the program functionality across a range of structure types and stacking fault modalities.

MATHEMATICS AND COMPUTING