Engineering Papers⌕ Search

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 73 records · Page 4

EPICS for small-scale laboratories with Python soft IOCs

While the Experimental Physics and Industrial Control System (EPICS) is widely used at large laboratories for slow controls and instrumentation, the deployment of a full EPICS installation can be difficult, with a steep learning curve to new users. Taking advantage of the pythonSoftIOC module, we developed an EPICS slow controls implementation for Jefferson Lab's Hall B cryotarget written entirely in Python and based on software IOCs that communicate with instruments over Ethernet. Here, this system ran successfully, interfacing with Jefferson Lab's full EPICS network, and we offer it as an example of the capabilities of pythonSoftIOC to build lightweight, yet robust and flexible instrumentation platforms that would be easily adapted for use at a small-scale laboratory. University groups can use these examples to build complete slow controls systems, from device communication to data archiving and display, using open-source, mature EPICS tools and student-friendly Python as an alternative to expensive and proprietary systems such as LabVIEW.

Computing↗

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

Demonstrating solarpilot ’s Python Application Programmable Interface Through Heliostat Optimal Aimpoint Strategy Use Case

solarpilot is a software package that generates solar field layouts and characterizes the optical performance of concentrating solar power (CSP) tower systems. solarpilot was developed by the National Renewable Energy Laboratory (NREL) as a stand-alone desktop application but has also been incorporated into NREL’s System Advisor Model (SAM) in a simplified format. Prior means for user interaction with solarpilot have included the application’s graphical interface, the SAM routines with limited configurability, and through a built-in scripting language called “LK.” This article presents a new, full-featured, python-based application programmable interface (API) for solarpilot, which we hereafter refer to as CoPylot. CoPylot enables python users to perform detailed CSP tower analysis utilizing either the Hermite expansion technique (analytical) or the SolTrace ray-tracing engine. CoPylot’s enables CSP researchers to perform analysis that was previously not possible through solarpilot’s existing interfaces. This article discusses the capabilities of CoPylot and presents a use case wherein we populate a model that obtains optimal solar field aiming strategies.

14 SOLAR ENERGY↗

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

Tapsolver: A Python Package For The Simulation And Analysis Of Tap Reactor Experiments

TAPsolver is a python package, which automates TAP simulation and analysis routines. TAPsolver is built around the python packages FEniCS and Dolfin-Adjoint, which help take advantage of model adjoints to provide automatic derivatives. TAPsolver is flexible, with reaction mechanisms and rate constants that can be set through input files that allow users to take advantage of the different functionalities, which include sensitivity analyses, parameter optimization and uncertainty quantification.

Yonge, Adam↗

Deep-Lynx-Python-Package

This software is a python package that interacts with the Application Programming Interface (API) suite provided by Deep Lynx. A python codebase may import this package in order to have access to these methods for communicating with a Deep Lynx instance.

Browning, JerenM↗

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↗

CO 2 Storage prospeCtive Resource Estimation Excel aNalysis (CO 2 -SCREEN) User’s Manual: Python_V4.1

This user’s manual guides the use of the National Energy Technology Laboratory’s (NETL) CO 2 Storage prospeCtive Resource Estimation Excel aNalysis (CO 2 -SCREEN) tool, which was developed to aid users in screening geologic formations for prospective CO 2 storage resources. This manual is specific to the CO 2 -SCREEN 4.1 version which is based in Python. The 4.1 version of CO 2 -SCREEN adds in newly updated storage efficiency factors for saline formations. CO 2 -SCREEN applies U.S. Department of Energy (DOE) methods and equations for estimating prospective CO 2 storage resources for saline formations, shale formations, and residual oil zones (ROZ). CO 2 -SCREEN was developed to be substantive and user-friendly and provide a consistent method for calculating prospective CO 2 storage resources. CO 2 -SCREEN uses a Java- based graphical user interface (GUI) for data inputs and uses Python to calculate prospective CO 2 storage resources.

54 ENVIRONMENTAL SCIENCES↗

PyEmittance: A General Python Package for Particle Beam Emittance Measurements With Adaptive Quadrupole Scans [Poster]

We present PyEmittance: a new Python package for general particle beam emittance measurements that offers adaptive quadrupole scans and is designed for robust and flexible integration with Python-based software, with online accelerators, and with simulation software. It is open source software, and can be installed via the command pip install pyemittance.

43 PARTICLE ACCELERATORS↗

Parametric and Sensitivity Analysis of a Steam Generator Model Using Python and Machine-Learning Tools

For this study, we used Python and machine-learning tools to perform a comprehensive parametric and sensitivity analysis on a steam generator (SG) model. (The Python model was based on a previously completed MATLAB framework for the Holtec SMR-160 SG.) We investigated the influence of various input parameters (e.g., heat transfer coefficient [HTC], Nusselt number, and heat exchanger effectiveness) on the system’s output. With machine-learning tools such as the Risk Analysis Virtual Environment (RAVEN), which was developed at Idaho National Laboratory, we were then able to perform an automated analysis of the SG inputs’ effect on the HTC. The analysis results give valuable insights into the performance and optimization of SG systems. We found the inlet mass flow rate (MFR) to have the greatest impact on the HTC, followed closely by the inlet temperature, and then pressure. Shifting of the input parameters causes the location of the maximum HTC along the SG length to change incrementally. The cold leg (CL) MFR was also found to impact the HTC magnitude as well as the location of the maximum HTC. At between 0.4–0.9 of the total SG length, the input parameters experience maximum impact on the HTC, leading us to suggest that sensors be efficiently placed on the SG so as to closely and effectively monitor thermal-hydraulic properties during reactor operation. We also found that the sensitivity data calculated manually agrees with the RAVEN – based data, confirming the same range of maximum sensitivity. However, the RAVEN-based analysis showed that cold leg pressure and hot leg temperature have a greater impact on the heat transfer coefficient than the mass flow rate, implying that a manual sensitivity study taking only two samples is not accurate.

20 FOSSIL-FUELED POWER PLANTS↗

BatAnalysis - A Comprehensive Python Pipeline for Swift BAT Survey Analysis

The Swift Burst Alert Telescope (BAT) is a coded-aperture gamma-ray instrument with a large field of view that primarily operates in survey mode when it is not triggering on transient events. The survey data consist of 80- channel detector plane histograms that accumulate photon counts over periods of at least 5 minutes. These histograms are processed on the ground and are used to produce the survey data set between 14 and 195 keV. Survey data comprise >90% of all BAT data by volume and allow for the tracking of long-term light curves and spectral properties of cataloged and uncataloged hard X-ray sources. Until now, the survey data set has not been used to its full potential due to the complexity associated with its analysis and the lack of easily usable pipelines. Here, we introduce the BatAnalysis Python package, a wrapper for HEASoftpy, which provides a modern, opensource pipeline to process and analyze BAT survey data. BatAnalysis allows members of the community to use BAT survey data in more advanced analyses of astrophysical sources, including pulsars, pulsar wind nebula, active galactic nuclei, and other known/unknown transient events that may be detected in the hard X-ray band. We outline the steps taken by the Python code and exemplify its usefulness and accuracy by analyzing survey data of the Crab Nebula, NGC 2992, and a previously uncataloged MAXI transient. The BatAnalysis package allows for ~18 yr of BAT survey data to be used in a systematic way to study a large variety of astrophysical sources.

46 INSTRUMENTATION RELATED TO NUCLEAR SCIENCE AND ↗

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↗

BatAnalysis - A Comprehensive Python Pipeline for Swift BAT Survey Analysis

The Swift Burst Alert Telescope (BAT) is a coded-aperture gamma-ray instrument with a large field of view that primarily operates in survey mode when it is not triggering on transient events. The survey data consist of 80-channel detector plane histograms that accumulate photon counts over periods of at least 5 minutes. These histograms are processed on the ground and are used to produce the survey data set between 14 and 195 keV. Survey data comprise >90% of all BAT data by volume and allow for the tracking of long-term light curves and spectral properties of cataloged and uncataloged hard X-ray sources. Until now, the survey data set has not been used to its full potential due to the complexity associated with its analysis and the lack of easily usable pipelines. Here, we introduce the BatAnalysis Python package, a wrapper for HEASoftpy, which provides a modern, open-source pipeline to process and analyze BAT survey data. BatAnalysis allows members of the community to use BAT survey data in more advanced analyses of astrophysical sources, including pulsars, pulsar wind nebula, active galactic nuclei, and other known/unknown transient events that may be detected in the hard X-ray band. We outline the steps taken by the Python code and exemplify its usefulness and accuracy by analyzing survey data of the Crab Nebula, NGC 2992, and a previously uncataloged MAXI transient. The BatAnalysis package allows for ~18 yr of BAT survey data to be used in a systematic way to study a large variety of astrophysical sources.

79 ASTRONOMY AND ASTROPHYSICS↗

The E3SM Diagnostics Package (E3SM Diags v2.7): a Python-based diagnostics package for Earth system model evaluation

Abstract. The E3SM Diagnostics Package (E3SM Diags) is a modern, Python-based Earth system model (ESM) evaluation tool (with Python module name e3sm_diags), developed to support the Department of Energy (DOE) Energy Exascale Earth System Model (E3SM). E3SM Diags provides a wide suite of tools for evaluating native E3SM output, as well as ESM data on regular latitude–longitude grids, including output from Coupled Model Intercomparison Project (CMIP) class models. E3SM Diags is modeled after the National Center for Atmospheric Research (NCAR) Atmosphere Model Working Group (AMWG, 2022) diagnostics package. In its version 1 release, E3SM Diags included a set of core essential diagnostics to evaluate the mean physical climate from model simulations. As of version 2.7, more process-oriented and phenomenon-based evaluation diagnostics have been implemented, such as analysis of the quasi-biennial oscillation (QBO), the El Niño–Southern Oscillation (ENSO), streamflow, the diurnal cycle of precipitation, tropical cyclones, ozone and aerosol properties. An in situ dataset from DOE's Atmospheric Radiation Measurement (ARM) program has been integrated into the package for evaluating the representation of simulated cloud and precipitation processes. This tool is designed with enough flexibility to allow for the addition of new observational datasets and new diagnostic algorithms. Additional features include customizable figures; streamlined installation, configuration and execution; and multiprocessing for fast computation. The package uses an up-to-date observational data repository maintained by its developers, where recent datasets are added to the repository as they become available. Finally, several applications for the E3SM Diags module were introduced to fit a diverse set of use cases from the scientific community.

54 ENVIRONMENTAL SCIENCES↗

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↗

Best practices for documenting a scientific Python project

Documentation is a crucial component of software development that helps users with installation and usage of the software. Documentation also helps onboard new developers to a software project with contributing guidelines and API information. The INTERSECT project is an open federated hardware/software library to facilitate the development of au- tonomous laboratories. A documentation strategy using Sphinx has been utilized to help developers contribute to source code and to help users understand the INTERSECT Python interface. Docstrings as well as reStructuredText files are used by Sphinx to automatically compile HTML and PDF files which can be hosted online as API documentation and user guides. The resulting documentation website is automatically built and deployed using GitLab runners to create Docker containers with NGINX servers. The approach discussed in this paper to automatically deploy documentation for a Python project can improve the user and developer experience for many scientific projects.

Wiggins, Gavin↗