Search NASASearch

SEARCH · Search NASA

Results for “Python Programming”

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 55 records · Page 3

Nondestructive Modular Leak Detection in 3D Printed 316L Stainless Steel Pipes via Laser Powder Bed Fusion

This research investigates the leak detection features of 316L Stainless Steel pipe structures manufactured via Laser Powder Bed Fusion (LPBF). This work involves the design of a modular sensor system integrating nondestructive evaluation (NDE) methods, including thermal imaging and ultrasonic frequency detection to detect and characterize leaks in components. This aims to improve leak detection sensitivity within medium-pressure gas systems, during continuous operation without halting flow or introducing safety risks. The system could be adaptable for use on unmanned aerial vehicles (UAVs), enabling remote leak detection in active environments. A custom pneumatic system incorporating temperature and pressure sensors was assembled to detect leaks in LPBF-printed 316L SS tee pipes. Experimental results and simulations confirm the system’s effectiveness in leak detection and material evaluation. This research program also integrated a Python-based image recognition platform based on a metallography and optical microscopy to assess the porosity and complement the leak detection data on the printed structures. This allows a detailed analysis of pore distribution and internal leak paths, which could compromise structural integrity, critical for quality control during manufacturing. Findings suggest that the investigated approach holds potential for enhancing leak detection technologies and adapt them for advanced manufactured parts.

36 MATERIALS SCIENCE

Validation and Verification of Python based Neutron Spectrum Unfolding Software

To validate and verify the python-based code (PySL), designed to replicate the programs used by STAYSL for Beam Correction Factor (BCF) and Self-Shielding Factor (SHIELD), a series of tests were performed. To test BCF a python script was written to generate a random flux history file and both versions of the code processed the data. The test verified matching values up to at least one decimal place, approximately 10,000 tests where run and each one passed. Isotopes began to fail the tests once neutron saturation was reached. To verify this the total time of exposure was varied the isotopes that failed were compared to a list of their half-lives. The test process for SHIELD was very similar but, in this case, the code began by producing an input file with varying thickness and device type/environment for the SHIELD input. The failure condition for this test was if any of the data points for an isotope had a difference above 3%. Approximately 40 of these tests were run and there were only 3 isotopes that had reoccurring failures but only 2% of their points were above the 3% difference. A visual comparison was conducted by plotting the results from both programs. Although the test failed, the differences between their values were minuscule, and the self-shielding factor’s shape was preserved when plotted. Next steps for this project will be validating and verifying the python-based SigPhi code and then reproducing and testing the least squares unfolding performed by STAYSL.

73 - NUCLEAR PHYSICS AND RADIATION PHYSICS

Evapotranspiration partitioning estimates from 8 methods from 47 NEON sites, 2019-2021

This dataset provides daily estimates of evapotranspiration (ET) and the transpiration-to-evapotranspiration ratio (T/ET) across 47 terrestrial National Ecological Observatory Network (NEON) sites spanning diverse environmental and biome conditions in the United States across three years of data (2019-2021). Daily ET is reported in both energy units (MJ m⁻² day⁻¹) and equivalent water depth (mm day⁻¹), assuming a constant latent heat of vaporization of 2.45 MJ/kg. The primary method uses a hybrid recurrent neural network–Penman–Monteith framework (RNN-PM), which integrates physically based surface energy balance constraints with data-driven learning to partition ET into transpiration and evaporation components. Model inputs include in situ meteorological observations (air temperature, vapor pressure deficit, wind speed, and radiation) combined with satellite-derived land surface temperature, leaf area index, and soil moisture. For benchmarking and uncertainty assessment, T/ET estimates from seven additional models are included: Priestley-Taylor Jet Propulsion Laboratory (PT-JPL), Penman-Monteith (P-M), Two-Source Energy Balance (TSEB), Support Vector Regression (SVR), and Categorical Boosting (CatBoost), among others—spanning empirical, machine-learning, and process-based approaches (see methods section or linked publication for detailed descriptions). Data Package Contents: The dataset a csv files containing daily ET and T/ET estimates for each site and model, along with associated metadata files these variables. Data can be accessed using common spreadsheet software (e.g., Microsoft Excel, LibreOffice) or programming environments such as R or Python. Together, these data support cross-site comparisons of ecosystem water use, evaluation of ET partitioning methods, and development of improved land–atmosphere exchange models.

EARTH SCIENCE > ATMOSPHERE

"Source Term Modeling for Advanced Gas Micro-Reactors"

Maintaining the safety of the public, environment, and operating personnel is the most important factor in designing, operating, maintaining, and decommissioning nuclear reactors. In recent years, there has been a growing interest in the development of micro-reactors employing TRi-structural ISOtropic (TRISO)-coated particle fuel. In gas reactors, TRISO fuel plays an important role in the safety case for high temperature reactors because of the fission product retention properties of the fuel. This ability enables the use of a functional containment strategy for the reactor where multiple barriers are used to prevent fission product release to the environment. Part of the safety analysis of these advanced reactors is the assessment of radionuclide releases under normal and accident conditions through the multiple credited safety barriers. Using conservative assumptions, a mechanistic analysis can be performed to quantify these releases that combines the probabilistic assessment of failure with analytic solutions to radionuclide transport equations. Source term modeling for TRISO fuel has been performed for previous reactor designs; however, these models are outdated, in many cases proprietary, and need updates to be applied to the current state of TRISO fuel technology and alternative gas reactor core configurations [1]. Currently, the only publicly available source term assessment for gas reactors is an expert-based Monte Carlo simulation based on the effectiveness of the fuel kernel, coating layers, and graphite block in a modular high temperature gas reactor [2]. Thus, there is a need to develop a simple, versatile, and mechanistic model of fission product release and transport in gas reactor cores that could be applied to a variety of reactors through user inputs and reactor-specific radionuclide inventories. The release is calculated by the diffusion of the key safety important fission products through the kernel, silicon carbide (SiC), graphite for both intact and defective TRISO particles based on fuel and graphite temperatures in the reactor under normal operation. These releases from the fuel enter the coolant where they can plate-out on cooler surfaces. A clean-up model is included for designs with a coolant purification system to remove fission gases. This initial distribution of fission products in the reactor serves as an initial condition for potential releases under postulated accident conditions. The model then can calculate the fission product release for any transient temperature profile and fission product releases can then be used to assess radiological dose to the workers and the public using conventional dose tools. Data on the diffusion of fission products is based on historic German TRISO experiments and the more current Department of Energy (DOE) Advanced Gas Reactor (AGR) TRISO fuel development program. The model is coded in python with inputs and outputs in excel spreadsheets, as well as python plotting utilities to aid in the interpretation of the results. References: [1] INL, NGNP Mechanistic Source Term White Paper, INL-10-17997, July 2010. [2] David A. Petti, Richard R. Hobbins, Peter Lowry, Hans Gougar, “Representative Source Terms and The Influence of Reactor Attributes on Functional Containment in Modular High Temperature Gas-cooled Reactors,” Nuclear Technology, Vol. 184, p. 181-197, Nov. 2013.

07 ISOTOPE AND RADIATION SOURCES

Cross Section Evaluation for Exclusive Channels of K+Λ and K+Σ0 Electroproduction off Protons Using CLAS Detector Data

In this work, a method for evaluating the cross sections of electroproduction of K+Λ0 and K+Σ0 off protons in the region of invariant masses of final hadrons MK + MY <W < 2.65 GeV (MK and MY being the masses of the kaon and hyperon, respectively) and squares of four-momentum transfers of virtual photons, i.e., photon virtualities 0 < Q2 < 5 GeV2, is developed based on experimental data of these exclusive channels’ cross sections measured by the CLAS detector in Hall B at Jefferson Lab. A set of algorithms has been implemented to evaluate the differential cross sections of these channels, along with their statistical and systematic uncertainties. A program was developed for the evaluation of differential cross sections and structure functions using C++ and Python libraries. An interactive website was created for working with the program, enabling the analysis of one-dimensional and two-dimensional dependences of structure functions and differential cross sections. The evaluation of differential cross sections for the K+Λ and K+Σ0 electroproduction channels is necessary for extracting the structure function σLT from the data on the polarization asymmetry of electroproduction reactions of these final states with longitudinally polarized electrons. The obtained results are also important for the development of realistic Monte Carlo event generators in planning future experiments and for evaluating the efficiency of detecting final particles when extracting reaction cross sections from experimental data.

Golda, A. V.

BLDAP Intro to Python/Data Science Curriculum v1

The Github repository contains the Jupyter notebooks for the intro to Python / Data Science course for Berkeley Lab Director's Apprenticeship Program (BLDAP). This course is designed for students with little to no experience in coding to learn skills in Python necessary for data science. Students utilize Jupyter notebooks throughout the course. The overall goal is for students to learn how to use Python to clean, analyze, and visualize large data sets in order to communicate effectively their conclusions about the data set. Students apply the skills they learned on actual data sets provided by researchers in Berkeley Lab.

Hales, Laurel [Lawrence Berkeley National Laborato

Computerized Assignment of Reviewers to Applicants for the Truman Fellowship

This report presents a user-friendly tool for assigning reviewers to the President Harry S. Truman Postdoctoral Fellowship applicants, replacing a previous program that required technical skills. Built with Python libraries, it organizes reviewer preferences and balances workloads, outputting five solutions as Excel files. Validation confirms its effectiveness, making it suitable for broader applications while ensuring efficient assignments without technical expertise.

97 MATHEMATICS AND COMPUTING

Tough Errors Are no Match (TEAM): Optimizing the quantum compiler for noise resilience

This report summarizes Unitary Fund’s contributions to the Department of Energy’s TEAM project (DE-SC0020266) under Thrust 2: Quantum Programming and Compilation. The central outcomes of this work have been the development of Mitiq, an open-source Python toolkit for applying quantum error mitigation (QEM) techniques to noisy quantum programs, and the invention, benchmarking and theoretical investigation of novel QEM techniques. Additional outcomes include the development of other open source software packages for the usage, simulation and control of quantum computers.

97 MATHEMATICS AND COMPUTING

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)

Using Parameter Sweep in WaterTAP to Analyze New Water Treatment Technologies

We describe a powerful and generalized parameter sweep tool in this report that was originally developed to analyze the performance of existing and novel water treatment models being developed in WaterTAP. Since WaterTAP is built upon IDAES and Pyomo, the parameter sweep tool can be used to systematically explore and debug the behavior of most Pyomo and IDAES numerical models. In order to enable meaningful analyses, the parameter sweep tool has been designed with the following features: 1) Model flexibility: The parameter sweep tool does not enforce any restrictions on the types of models that can be used with it. As long as a Pyomo model can be solved and the parameter is active and mutable, the tool only needs functions that describe how to run the model, the sweep parameters, and the output quantities of interest. 2) Flexible sampling: The parameter sweep tool has inbuilt functions to generate samples from a random distribution or a multidimensional Euclidean space. Furthermore, the users have to ability to supply samples generated from a tool of their choice. 3) Multiple sweep types: A user can choose from one of 3 types of parameter sweeps depending on their needs. 4) Detailed outputs: Outputs generated by the parameter sweep tool can be stored in detailed H5 file or user-friendly CSV files for post processing. 5) Parallel computing: The parameter sweep supports shared and distributed memory parallel computing to enable the use of high performance computers (HPC) for large-scale analyses. 6) Modular: The parameter sweep tool is self-contained and can easily be integrated within an outer-loop analysis or as desired by the user. 7) Ease of use: The tool is well documented and a simple sweep can be easily executed by following the online documentation in a few lines of code. We demonstrate the use of the parameter sweep tool on a simple water treatment system from the WaterTAP repository and show its parallel scaling performance on an Apple laptop and NREL's Eagle HPC. The parameter sweep tool is actively being used with models currently being developed within WaterTAP and we expect its use to grow beyond it to other IDAES and Pyomo models.

97 MATHEMATICS AND COMPUTING

DASSH-F: Subchannel Based Thermal Analysis

The DASSH thermal analysis code is designed to rapidly allow a reactor design engineer to obtain flow rates requirements that satisfy peak temperature constraints in the domain. The advantage of using DASSH over a hand calculation is that it has a more rigorous treatment of the pin power distribution and coolant heat transfer within an assembly and between assemblies. The advantage of using DASSH over a conventional 3D subchannel code or a computational fluid dynamics code (CFD) is that it can obtain the desired solution in a matter of minutes in serial with minor computer memory needs. The DASSH methodology is virtually identical to SUPERENERGY-2 with additional functionalities taken from follow on work to SUPERENERGY-2 done at ANL in the 1980s. DASSH today is an integral component of the Argonne Fast Reactor analysis suite for reactor design work. DASSH obtains the power distribution from a coupled neutron-gamma heating calculation in GAMSOR (including DIF3D) at each time point of a companion fuel cycle analysis calculation with REBUS. The domain in DASSH assumes a hexagonal grid typical for fast reactors with much of the geometry information taken from the DIF3D model. DASSH assumes the assemblies that are loaded into each grid position are ducted to control the coolant flow. Considerable detail is given on the subchannel formulation of DASSH in this document. Much of the formulation and design of the code builds upon research done by previous authors with little new investigation. Thus the decisions made in developing the subchannel model used in DASSH have their origins over 50 years ago. Much of the heat transfer methodology in DASSH is built upon correlations for both the coolant mixing and heat transfer coefficients for pins and ducts. DASSH is thus not a rigorous treatment of a given problem, but a rapid assessment of the temperature field that has known limitations with respect to an experimental measurement or CFD calculation. The DASSH input and output are detailed along with usage of the software. The DASSH output provides tables of evaluated material properties and key coolant and pin temperature results. DASSH can create Python scripts that generate domain summary pictures. DASSH can also generate assembly temperature maps and VTK output files which allow the DASSH solution to be visualized. As the primary purpose of the DASSH software is to compute the coolant and fuel pin temperature distribution for a given model of a reactor, much of the output focus is giving the user quick summary tables needed to assess the performance of a given orifice flow specification. The present version of DASSH has a crude orifice search capability and an efficient orifice flow search capability. The flow search tries to meet user specified constraints for 1) peak 2-sigma clad midwall temperature, 2) peak coolant temperature, and 3) desired bulk outlet temperature. There are many development shortcomings in DASSH detailed in this document, but this version is functional for modern analysis needs. This document serves as the manual for the Fortran based DASSH software that was developed to replace the Python version of DASSH developed as part of the VTR program.

22 GENERAL STUDIES OF NUCLEAR REACTORS

DistOPF: Advanced Solutions for Distribution Optimal Power Flow Analysis - DistOPF v0.2 Documentation

To achieve an affordable and reliable energy system, research on power distribution system is often focused on integration of distributed generators, energy storage solution, EV charging, smart meters, and other advanced assets that may benefit from or require more advanced control and optimization techniques. Despite this focus on advanced distribution system topics, early researchers and grid scientists often start from scratch when developing optimization programs for power distribution systems. This report introduces DistOPF, a Python package that consolidates years of research into a versatile and modular tool. DistOPF provides researchers with essential capabilities to solve distribution system Optimal Power Flow (OPF) problems using standard network models. Additionally, it offers a platform to benchmark both new and existing algorithms against established test systems.

24 POWER TRANSMISSION AND DISTRIBUTION

DASSH-F: Subchannel Based Thermal Analysis

The DASSH thermal analysis code is designed to rapidly allow a reactor design engineer to obtain flow rates requirements that satisfy peak temperature constraints in the domain. The advantage of using DASSH over a hand calculation is that it has a more rigorous treatment of the pin power distribution and coolant heat transfer within an assembly and between assemblies. The advantage of using DASSH over a conventional 3D subchannel code or a computational fluid dynamics code (CFD) is that it can obtain the desired solution in a matter of minutes in serial with minor computer memory needs. The DASSH methodology for pin lattice models is virtually identical to SUPERENERGY-2 with additional functionalities taken from follow on work to SUPERENERGY-2 done at ANL in the 1980s. DASSH today is an integral component of the Argonne Fast Reactor analysis suite for reactor design work. DASSH obtains the power distribution from a coupled neutron-gamma heating calculation in GAMSOR (including DIF3D) at each time point of a companion fuel cycle analysis calculation with REBUS. The domain in DASSH assumes a hexagonal grid typical for fast reactors with much of the geometry information taken from the DIF3D model. DASSH assumes the assemblies that are loaded into each grid position are ducted to control the coolant flow. The user can alternatively provide their own geometry and power profile instead of inheriting it from DIF3D. Considerable detail is given on the subchannel formulation of DASSH in this document. Much of the formulation and design of the code builds upon research done by previous authors with little new investigation. Thus the decisions made in developing the subchannel model used in DASSH have their origins over 50 years ago. Much of the heat transfer methodology in DASSH is built upon correlations for both the coolant mixing and heat transfer coefficients for pins and ducts. DASSH is thus not a rigorous treatment of a given problem, but a rapid assessment of the temperature field that has known limitations with respect to an experimental measurement or CFD calculation. The DASSH input and output are detailed along with usage of the software. The DASSH output provides tables of evaluated material properties and key coolant and pin temperature results. DASSH can create Python scripts that generate domain summary pictures. DASSH can also generate assembly temperature maps and VTK output files which allow the DASSH solution to be visualized. As the primary purpose of the DASSH software is to compute the coolant and fuel pin temperature distribution for a given model of a reactor, much of the output focus is giving the user quick summary tables needed to assess the performance of a given orifice flow specification. The present version of DASSH has a crude orifice search capability and a sufficient orifice flow search capability. The flow search tries to meet user specified constraints for 1) peak 2-sigma clad temperature, 2) peak coolant temperature, and 3) desired bulk outlet temperature. This document serves as the manual for the Fortran based DASSH software that was developed to replace the Python version of DASSH developed as part of the VTR program.

22 GENERAL STUDIES OF NUCLEAR REACTORS

EnergyPlus View Factor Calculation

The Python code takes EnergyPlus input files and creates input for the View3D program, executes the View3D program, then inserts the respective view factors into the EnergyPlus input file, thus streamlining the process of view factor calculation and modification of the EnergyPlus input file.

Kunwar, Niraj [Oak Ridge National Laboratory (ORNL

Dispatch Optimization Variable Engine

The Dispatch Optimization Variable Engine (DOVE) is software tool written in python, developed at Idaho National Laboratory (INL) that provides an easily accessible application-programming-interface (API) to performing resource dispatch optimization analysis for integrated energy system (IES) configurations. DOVE is an integral part of the Framework for Optimization of Resources and Economics (FORCE) software suite and is leveraged by codes such as the Holistic Energy Resource Optimization Network (HERON) and the Optimization of Real-Time Capacity Allocation (ORCA). The philosophy behind DOVE is to provide a modular software solution to IES planning and operation by utilizing state-of-the-art algorithms and machine learning. The goal is to accurately capture the dispatching behavior of a complex energy system given varying time-dependent signals for demand and commodity pricing.

McDowell, DylanJ. [Idaho National Laboratory (INL)

SEGUID v2: Extending SEGUID checksums for circular, linear, single- and double-stranded biological sequences

Background Synthetic biology involves combining different DNA fragments, each containing functional biological parts, to address specific problems. Fundamental gene-function research often requires cloning and propagating DNA fragments, such as those from the iGEM Parts Registry or Addgene, typically distributed as circular plasmids. Addgene’s repository alone offers around 150,000 plasmids. To ensure data integrity, cryptographic checksums can be calculated for the sequences. Each sequence has a unique checksum, making checksums useful for validation and quick lookups of associated annotations. For example, the SEGUID checksum uniquely identifies protein sequences with a 27-character string. Objectives The original SEGUID, while effective for protein sequences and single-stranded DNA (ssDNA), is not suitable for circular DNA since there is no natural starting position nor for double-stranded DNA (dsDNA) since two separate sequences are present. Challenges include how to uniquely represent linear dsDNA, circular ssDNA, and circular dsDNA. To meet these needs, we propose SEGUID v2, which extends the original SEGUID to handle additional types of sequences. Conclusions SEGUID v2 produces orientation and rotation invariant checksums for single-stranded, double-stranded, possibly staggered, linear, and circular DNA and RNA sequences. Customizable alphabets allow for other types of sequences. In contrast to the original SEGUID, which uses Base64, SEGUID v2 uses Base64url to encode the SHA-1 hash. This ensures SEGUID v2 checksums can be used as-is in filenames, regardless of platform, and in URLs, with minimal friction. Availability SEGUID v2 is readily available for major programming languages, distributed under the MIT license. JavaScript package seguid is available on npm, Python package seguid on PyPi, R package seguid on CRAN, and a Tcl script on GitHub. These tools, along with documentation, examples, and an online SEGUID Calculator , can be found at https://www.seguid.org .

Pereira, Humberto

Real Time Phasor Analytics (RTPA) and RTPA-SCR System Strength Online Tool

This presentation showcases the Real-Time Phasor Analytics (RTPA) framework for monitoring inertia and assessing system strength in power grids. RTPA is an open-source tool designed to standardize access to data from Power Management Units (PMUs) and Phasor Data Concentrators (PDCs). It facilitates real-time connectivity to multiple PDCs in accordance with the IEEE C37.118-2 standard and supports asynchronous data stream integration. Additionally, RTPA can simulate a PDC server streaming C37.118-2 data and provides Python bindings for seamless interaction with the framework, eliminating the need for direct Rust programming.

24 POWER TRANSMISSION AND DISTRIBUTION

MontePy: a Python library for reading, editing, and writing MCNP input files.

The Monte Carlo N-Particle (MCNP) radiation transport code is a highly capable and accurate code with a long legacy. MCNP uses the Monte Carlo simulation process to simulate the path of particles (e.g., neutrons, photons, charged particles, etc.), and their interaction with materials. It is widely used in nuclear engineering, high-energy physics, and other fields. Its origins in the mid-twentieth century predate many modern software conventions. MCNP users provide an input file to MCNP, which it then uses to create an internal representation of the simulation problem. These input files originally had to be stored as punchcard decks, and the user manual still uses the terminology of cards and decks, despite moving beyond punchcards. MCNP predates nearly all modern human readable markup or data serialization languages, such as the extensible Markup Language (XML), the Standard Generalized Markup Language (SGML), YAML (YAML Ain’t Markup Language), and Javascript Object Notation (JSON). Due to this, MCNP uses an entirely custom defined syntax language for its input, making off-the-shelf libraries for XML, YAML, and JSON impossible to use for scripting various operations on MCNP input files (Kulesza et al., 2022).

97 - MATHEMATICS AND COMPUTING