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 109 records · Page 6

Myco-CORPSE simulations assessing mycorrhizal carbon allocation across U.S. forests and global change scenarios

Plants allocate a substantial portion of their fixed carbon belowground to mycorrhizal fungi in exchange for nutrients and other benefits. However, most current ecosystem models omit mycorrhizal processes, limiting our ability to predict plant–soil carbon dynamics under environmental change. To address this gap, we used a mycorrhiza-explicit soil biogeochemical model, Myco-CORPSE (Mycorrhizal Carbon, Organisms, Rhizosphere, and Protection in the Soil Environment), to simulate tree carbon allocation to arbuscular mycorrhizal (AM) and ectomycorrhizal (ECM) fungi in temperate forests.The dataset includes outputs from two sets of model simulations:1. Perturbation experiments: Simulations across gradients of ECM dominance (0–100%), nitrogen deposition, soil temperature, and net primary productivity (NPP) to test how these factors affect mycorrhizal C allocation and nutrient cycling.2. FIA-based simulations: Model applications to over 1,800 U.S. forest sites using site-specific data from the U.S. Forest Inventory and Analysis (FIA) program, including vegetation composition, mycorrhizal type, climate, litter traits, soil properties, and N deposition.Model outputs include simulated mycorrhizal carbon allocation and related biogeochemical variables, such as soil and microbial carbon and nitrogen stocks. Data are provided in CSV format and organized by experiment type (in separate ZIP files). Python scripts for running simulations, plotting, and spatial mapping are also included and organized similarly. No proprietary software is required. These outputs support a peer-reviewed study and were used to generate figures and tables in the associated publication.

54 ENVIRONMENTAL SCIENCES

The Advanced Dimensional Depletion for Engineering of Reactors (ADDER) Software for Depletion and Fuel Management

The Advanced Dimensional Depletion for Engineering of Reactors (ADDER) software is being developed in the Research and Test Reactor (RTR) Program at Argonne National Laboratory to meet the reactor design and analysis needs of the Conversion Program. ADDER is a flexible tool that (1) provides a depletion capability through coupling external neutronics codes with a built-in CRAM solver or external depletion code and (2) provides a user-friendly interface to perform fuel management and criticality search operations. The ADDER software is a Python 3 application written using modern software development practices subject to a compliant implementation of NQA-1 and applicable Department of Energy software quality assurance standards. This report is the user guide for the software release referred to as ADDER v1.1.0. The motivation for a software to have flexible capabilities that ADDER possesses is the need to support a wide variety of geometries that are commonly required in analysis of research and test reactors. These reactors can have complex fuel, experiment, or control material shuffling patterns that persist over several years with many fuel management and partial refueling intervals. The scale of fuel management analysis can require tracking of an inventory that is multiple times the core loading. Many reactors, both power and non-power reactors of various types, will find the features of ADDER useful to facilitate key tasks that a fuel or core design engineer must perform with the convenience of concise input and validated functionality.

22 GENERAL STUDIES OF NUCLEAR REACTORS

The Advanced Dimensional Depletion for Engineering of Reactors (ADDER) Software for Depletion and Fuel Management

The Advanced Dimensional Depletion for Engineering of Reactors (ADDER) software is being developed in the Research and Test Reactor (RTR) Program at Argonne National Laboratory to meet the reactor design and analysis needs of the Conversion Program. ADDER is a flexible tool that (1) provides a depletion capability through coupling external neutronics codes with a built-in CRAM solver or external depletion code and (2) provides a user-friendly interface to perform fuel management and criticality search operations. The ADDER software is a Python 3 application written using modern software development practices subject to a compliant implementation of NQA-1 and applicable Department of Energy software quality assurance standards. This report is the user guide for the software release referred to as ADDER v1.1.0. The motivation for a software to have flexible capabilities that ADDER possesses is the need to support a wide variety of geometries that are commonly required in analysis of research and test reactors. These reactors can have complex fuel, experiment, or control material shuffling patterns that persist over several years with many fuel management and partial refueling intervals. The scale of fuel management analysis can require tracking of an inventory that is multiple times the core loading. Many reactors, both power and non-power reactors of various types, will find the features of ADDER useful to facilitate key tasks that a fuel or core design engineer must perform with the convenience of concise input and validated functionality.

22 GENERAL STUDIES OF NUCLEAR REACTORS

Decoherence Noise on the Superconducting Qubits Training Program

Quantum computing is a growing field with promising applications in a variety of fields such as healthcare, energy consumption, and cryptography. Quantum computing leverages the principles of quantum mechanics - superposition and entanglement. Yet, in the Noisy Intermediate Scale Quantum (NISQ) Era - quantum systems face the major challenge of decoherence due to noise. This era is characterized by low amounts of qubits and high gate error. Decoherence leads to the loss of the quantum information stored in the qubit. Noise occurs with any quantum system that is exposed to the environment. It should also be noted that quantum information can be stored in the cavity - Fermilab specializes in coupling transmons to ultrahigh-Q SRF cavities. The Superconducting Qubits Training Program (SQTP) provides a visualization for beginners in quantum computing. The open quantum system simulated is a superconducting qubit (two-level atom) coupled to a microwave cavity whose excitations are photons. The Rotating Wave Approximation of the Jaynes-Cumming Hamiltonian is used. SQTP utilizes open-source Python-based libraries scQubits, NumPy, and QuTiP alongside the Master Lindblad equation. In this project, we study the different decay behaviors of qubits and cavities with collapse operators.

Lopez, Sara

SLIA Reference Architecture Models

The SLIA Reference Architecture Models project, sponsored by the DOE CESER Energy CyberSense Program (Oct 2024–Sep 2025), advanced LLNL’s PySCES simulation tool to better support CyTRICS Prioritization and Initial Risk Assessment (PIRA) reference architectures. Key achievements include enhancements to the PySCES transmission substation facility model, expanded asset coverage, and enhancements to the PySCES code base. Software improvements reduced code complexity, migrated PySCES to Python version 3.11, introduced an object-oriented design, and added a schema database for easier updates and validation. New features support device criticality assessments and a more precise parametric simulation mode. Remaining gaps include model validation, workflow limitations, Monte Carlo convergence issues, full device criticality metric implementation, model fidelity, and general software improvements. Continued development is recommended to address these gaps and fully align PySCES with CyTRICS PIRA requirements.

97 MATHEMATICS AND COMPUTING

The Hydropower Game: An Interactive Learning Tool for the Future Hydropower Workforce

This report documents a Seedling project supported by the U.S. Department of Energy (DOE) Water Power Technologies Office (WPTO), conducted by Argonne National Laboratory (ANL) and the National Laboratory of the Rockies (NLR). The Seedling and Sapling Program provides small grants over short duration to enable early-stage research at national laboratories. This funding mechanism is intended to cultivate innovative ideas and expand research road maps in hydropower and marine energy technologies. Under this Seedling award, the project team developed an educational outreach tool, or “serious game”, built in Python and powered by the Pygame library, aimed at teaching fundamental hydropower concepts through an engaging, interactive learning experience. The game features multiple lessons covering several hydropower topics while allowing for expansion and customization in the instance of future funding availability: • Hydropower Plant Types: Players explore and compare the mechanics and applications of run-of-river, dam hydropower, and pumped-storage hydropower. • Flow Dynamics and Power Generation: Interactive tasks demonstrate how release rate and hydraulic head combine to determine power output. • Grid Operations and Load Following: Simulations illustrate how hydropower facilities respond to fluctuating electricity demand to balance the grid. • Market Integration: Levels scaffold understanding of how hydropower interfaces with the broader energy market, including operational and economic considerations. The tool was showcased at several science, technology, engineering, and mathematics (STEM) outreach events, where it was demoed to students, educators, and the general public. These events provided valuable opportunities to collect feedback on the gameplay, storyline, and educational objectives from a wide audience. The game was presented at STEMapalooza, Introduce a Girl to Engineering Day, STEMCON, and Clean Currents 2025. Insights gathered during these demonstrations informed refinements to the game’s user experience and strengthened its effectiveness as an educational tool for teaching hydropower concepts. This report outlines the game’s design philosophy, educational objectives, technical implementation, user experience insights, and potential for broader deployment within educational and workforce development contexts. It emphasizes how gamified learning can demystify complex hydropower science and inspire interest in water-power technologies. The project’s success demonstrates the value of Seedling funding in fostering creative, lowcost educational tools that support DOE’s mission to advance energy literacy and innovation. The report concludes with recommendations for expanding the tool by adding new levels, integrating assessment metrics, and exploring commercialization or deployment pathways through future Sapling funding. The official webpage of the Hydropower Game, which includes a link to the educational tool, can be accessed at www.anl.gov/hydropower/hydropower-game.

13 HYDRO ENERGY

Models and Algorithms for Equilibrium Analysis of Mixed-Material Nucleic Acid Systems

Dynamic programming algorithms within the NUPACK software suite enable analysis of equilibrium base-pairing properties for complex and test tube ensembles containing arbitrary numbers of interacting nucleic acid strands. Currently, calculations are limited to single-material systems that are either all-RNA or all-DNA. Here, to enable analysis of mixed-material systems that are critical for modern applications in vitro, in situ, and in vivo, we develop physical models and dynamic programming algorithms that allow the material of the system to be specified at nucleotide resolution. Free energy parameter sets are constructed for both RNA/DNA and RNA/2'OMe-RNA mixed-material systems by combining available empirical mixed-material parameters with single-material parameter sets to enable treatment of the full complex and test tube ensembles. New dynamic programming recursions account for the material of each nucleotide throughout the recursive process. For a complex with N nucleotides, the mixed-material dynamic programming algorithms maintain the O(N 3 ) time complexity of the single-material algorithms, enabling efficient calculation of diverse physical quantities over complex and test tube ensembles (e.g., complex partition function, equilibrium complex concentrations, equilibrium base-pairing probabilities, minimum free energy secondary structure(s), and Boltzmann-sampled secondary structures) at a cost increase of roughly 2.0-3.5×. The results of existing single-material algorithms are exactly reproduced when applying the new mixed-material algorithms to single-material systems. Accuracy is significantly enhanced using mixed-material models and algorithms to predict RNA/DNA and RNA/2'OMe-RNA duplex melting temperatures from the experimental literature as well as RNA/DNA melt profiles from new experiments. In conclusion, mixed-material analyses can be performed online using the NUPACK web app (www.nupack.org) or locally using the NUPACK Python module.

2′OMe-RNA

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

pyDiSCaMB : enabling the use of multipolar scattering factors in Phenix

Multipolar scattering models, such as the transferable aspherical atom model, account for atomic chemical interactions and provide a more accurate representation of experimental data. However, the simpler independent atom model (IAM), which assumes non-interacting atoms, is the only model available in the most widely used macromolecular refinement programs. This is primarily because IAM offers a hard-to-beat combination of computational efficiency and modelling power at typical macromolecular resolutions. By contrast, more accurate multipolar modelling has historically been limited due to its computational cost and the absence of an interface between software capable of calculating structure factors and gradients based on multipolar models and software designed for macromolecular refinement. This work introduces pyDiSCaMB , a Python software package designed to integrate between the computational crystallography toolbox ( cctbx ) and the quantum crystallography library DiSCaMB ( Densities in Structural Chemistry and Molecular Biology ), thus enabling multipolar scattering models in Phenix 's toolkit. The implementation, features and capabilities of pyDiSCaMB are presented, the runtimes for the calculation of structure factor and target gradients with respect to atomic parameters are explored, and Fourier images of electrostatic potential, electron density and deformation maps are computed as illustrative examples. The pyDiSCaMB library will make multipolar modelling widely available to the structural biology community, potentially transforming refinement and model-building for both crystallography and cryogenic electron microscopy (cryoEM).

MATTS data bank

Hls4ml Synthesis Testing

HLS4ml (high level synthesis for machine learning) Is a Python package used to translate commonly used open-source machine learning models into HLS. This is useful in machine learning applications on FPGAs. Machine learning algorithms are only as fast as the hardware that they are used on, and some applications require high speed without sacrificing accuracy. In these situations, an FPGA is a good choice since it is faster than a CPU or a GPU, but programming an FPGA is difficult. This is where HLS4ml can be used to simplify the process, as a well-known learning model can be converted to HLS and more easily deployed onto an FPGA. There are many use cases for a machine learning algorithm running on an FPGA. For example, detectors in a particle accelerator cannot keep every event that they detect, and so a computer must decide which events to keep and which to discard. Using an FPGA with a machine learning algorithm would be a good way to keep as many events as possible.

Swanson, Caiden

hls4ml

hls4ml (high level synthesis for machine learning) Is a Python package used to translate commonly used open-source machine learning models into HLS. This is useful in machine learning applications on FPGAs. Machine learning algorithms are only as fast as the hardware that they are used on, and some applications require high speed without sacrificing accuracy. In these situations, an FPGA is a good choice since it is faster than a CPU or a GPU, but programming an FPGA is difficult. This is where hls4ml can be used to simplify the process, as a well-known learning model can be converted to HLS and more easily deployed onto an FPGA. There are many use cases for a machine learning algorithm running on an FPGA. For example, detectors in a particle accelerator cannot keep every event that they detect, and so a computer must decide which events to keep and which to discard. Using an FPGA with a machine learning algorithm would be a good way to keep as many events as possible.

Swanson, Caiden

solposx: A Python package for determining solar position and atmospheric refraction

solposx is a Python package of reference algorithms for calculating the sun’s position and atmospheric refraction. The package includes 11 solar position algorithms and 6 refraction models from the past 50 years. All functions follow a standardized design pattern, making it easy to compare different algorithms. The provided algorithm implementations have been thoroughly vetted, making the package a valuable research tool and a reliable reference for implementing solar position algorithms in other programming languages or applications.

Jensen, Adam R. [Technical University of Denmark,

Assessing Energy Infrastructure Devices for Vulnerabilities

Industrial control systems prove to be vital to the health and security of the nation in our critical infrastructure. Critical infrastructure includes the most foundational systems to support modern civilization which includes water and wastewater systems, communications, and the electricity we use to name a few sectors. However, these devices' overall composition remains largely unknown and are untested from a cyber security perspective. As part of the Cyber Testing for Resilient Industrial Control Systems (CyTRICS) program, I analyzed one such energy infrastructure device to better understand how it functions, what hardware and software components are present within it, and assess it for security vulnerabilities. To achieve this, I reverse engineered binary files using Ghidra to understand system functionality and learned more about how to collaborate with other researchers on a shared Ghidra project. I learned more about how web sockets function and how to interact with them through Python to test if they are secure or not. This work led me to assess possible vulnerabilities in this device and provide a better understanding of its composition and function, which are essential to INL's mission of securing our nation's energy infrastructure.

99 - GENERAL AND MISCELLANEOUS

stor4build

The EnergyPlus simulation engine supports modeling and simulation of thermal energy storage (TES) systems in several ways, including using the Python-EMS feature, which extends the operation of the engine with custom code written in Python. Creation of models using this feature can be tedious and error prone, with the connection of the model components to the Python code a particularly troublesome area. The stor4build Python package simplifies this process by modifying an input model to add a selected TES technology (implemented with the Python-EMS feature) and runs the simulation. The package leverages the OpenStudio middleware software development kit to automate this process as much as possible, eliminating potential errors and simplifying usage of EnergyPlus. The package provides objects, functions, and OpenStudio measures that implement the necessary operations to automate the creation of EnergyPlus models that integrate TES technologies with building systems. In addition, two user interfaces are provided: a command line interface and a web application programming interface. The automated process implemented by the package greatly simplifies the modeling and simulation process, allowing for parametric studies to be executed much more efficiently and effectively. The OpenStudio-based workflow is also very flexible and will allow for future additions of new technologies.

DeGraw, JasonWilliam [Oak Ridge National Laborator

MTUQ: a framework for estimating moment tensors, point forces, and their uncertainties

SUMMARY We introduce MTUQ, an open-source Python package for seismic source estimation and uncertainty quantification, emphasizing flexibility and operational scalability. MTUQ provides MPI-parallelized grid search and global optimization capabilities, compatibility with 1-D and 3-D Green’s function database formats, customizable data processing, C-accelerated waveform and first-motion polarity misfit functions, and utilities for plotting seismic waveforms and visualizing misfit and likelihood surfaces. Applicability to a range of full- and constrained-moment tensor, point force, and centroid inversion problems is possible via a documented application programming interface, accompanied by example scripts and integration tests. We demonstrate the software using three different types of seismic events: (1) a 2009 intraslab earthquake near Anchorage, Alaska; (2) an episode of the 2021 Barry Arm landslide in Alaska; and (3) the 2017 Democratic People’s Republic of Korea underground nuclear test. With these events, we illustrate the well-known complementary character of body waves, surface waves, and polarities for constraining source parameters. We also convey the distinct misfit patterns that arise from each individual data type, the importance of uncertainty quantification for detecting multimodal or otherwise poorly constrained solutions, and the software’s flexible, modular design.

58 GEOSCIENCES

FLARE: field line analysis and reconstruction for 3D boundary plasma modeling

The FLARE code is a magnetic mesh generator that is integrated within a suite of tools for the analysis of the magnetic geometry in toroidal fusion devices. A magnetic mesh is constructed from field line segments and permits fast reconstruction of field lines in 3D boundary plasma codes such as EMC3-EIRENE. Both intrinsically non-axisymmetric configurations (stellarators) and those with symmetry breaking perturbations of an axisymmetric equilibrium (tokamaks) are supported. The code itself is written in Modern Fortran with MPI support for parallel computing, and it incorporates object-oriented programming for the definition of the magnetic field and the material surface geometry. Extended derived types for a number of different magnetohydrodynamic equilibrium and plasma response models are implemented. The core element of FLARE is a field line tracer with adaptive step-size control, and this is integrated into tools for the construction of Poincaré maps and invariant manifolds of X-points. A collection of high-level procedures that generate output files for visualization is build on top of that. The analysis modules are build with Python frontends that facilitate customization of tasks and/or scripting of parameter scans.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY

DICOMs, Missiles, and Metadata: The U.S. Nuclear Weapons Program Leverages a Medical Standard

Digital Imagine and Communications in Medicine (DICOM) images, although most commonly used in medical settings, have been widely adopted by the United States Department of Energy (DOE) for capturing images of the internal components in a nuclear weapon. DICOMs, a lesser-known file format that combine nested metadata structures with complex image data-including multiple planes, frames, and high resolution-require the creation of access copies to support usability within the DOE. Used primarily for ensuring the safety, security, and reliability of the U.S. nuclear stockpile, the Los Alamos National Laboratory (LANL)’s DICOM images and corresponding image metadata must be accessible to scientists and researchers via our institutional centralized databases. This paper describes the author's creation of a Python script that converts DICOM images into accessible, archive-friendly TIFF files while preserving key image data and metadata.

96 KNOWLEDGE MANAGEMENT AND PRESERVATION

A Python Tool for Reconstructing MCNP6 Particle Histories from an HDF5 PTRAC File [Slides]

A Python tool for converting the MCNP6 HDF5 PTRAC file to a list of Python trees is presented. The particle trees store MCNP6 simulated events for each history using parent-child relationships, which ensures that branching processes are accurately reproduced. A variety of post-processing scripts are presented and used in conjunction with the Python particle trees to make special tallies that are currently not available in the MCNP6 software and visualize the particle tracks.

97 MATHEMATICS AND COMPUTING