Search NASA⌕ Search

SEARCH · Search NASA

Results for “python code”

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 739 records · Page 41

Simulation Toolkit for Renewable Energy Advanced Materials Modeling

STREAMM is a collection of python classes and scripts that enables and eases the setup of input files and configuration files for simulations of advanced energy materials. The core STREAMM python classes provide a general framework for storing, manipulating and analyzing atomic/molecular coordinates to be used in quantum chemistry and classical molecular dynamics simulations of soft materials systems. The design focuses on enabling the interoperability of materials simulation codes such as GROMACS, LAMMPS and Gaussian.

Sides, Scott↗

Benchmark Exercise for the Control Rod Swelling Evaluation

The VTR core has six reactivity control assemblies and three safety assemblies. The control assemblies or primary control rods are adjusted during the normal operation to balance the core reactivity and to control the reactor power. A typical control assembly radial layout is presented in Figure 1. The figure shows the swelled absorber (B 4 C) rod. Initially, helium gas fills the gap between the pin and the cladding before irradiation swelling takes place. For VTR, HT9 steel was selected as the cladding and duct material. The main neutron absorbing material used in the VTR is B 4 C. When residing in the core, the neutronics, thermophysical, and mechanical properties of the materials used in a control assembly will degrade due to accumulated neutron damage. Material degradation limits how long a control assembly can reside in the core. Many phenomena affect the control assembly lifetime, such as the loss of reactivity worth due to B 4 C depletion, the mechanical interaction of the absorber rod and the cladding due to B 4 C swelling, the helium gas buildup in the pin due to B-10 capture, etc. B 4 C swelling, which causes closure of the gap between the absorber rod and the cladding, is usually considered as the main limiting factor from past experience. An initial study was conducted at PNNL to evaluate the irradiation behavior of a VTR control assembly. The evaluation was performed using the CNRD2 code that was initially developed for the FFTF. The study also included an assessment of the VTR control assembly and focused on a 61-pin control assembly design, which is different from that used (37-pin design) in the core design study. The study conducted by PNNL was reviewed independently by ANL. A Python script referred to as the Control Assembly Evaluation Script (CAES) was developed for the independent review and additional assessment of 37-pin control assembly design. The script has focused on the assessment of the absorber rod swelling for its importance in determining the control assembly lifetime. CAES uses geometry, neutronics, materials data as input to predict the swelling of the absorber rod during its residence in the reactor core. The results from CAES showed some non-negligible differences against the PNNL results. Some of the differences can be attributed to the different interpretation of the control rod assembly dimensions. To resolve this issue, a benchmark exercise was proposed. The benchmark specification was developed by PNNL. The benchmark exercise was performed independently at PNNL and ANL using different codes/scripts (CRND2 and CAES). This memo documents the results calculated using the different codes. However, this report is limited to presenting the results obtained. Further investigation of the cause of the observed difference will be performed as part of future activities, pending continuation of the VTR program.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

sparse_bias

This is a python package used to fit an unknown function from data that potential contains systematic biases related to metadata. The model fits the unknown function and uses a Bayesian horseshoe prior model to impose sparsity on the bias terms. This code has been generalized from research code developed for AIACHNE into a package that should have more general application in a wider class of statistical models.

Walton, Noah↗

Nuclear forensics: Soil content

Nuclear Forensics is a growing field that is concerned with all stages of the process of creating and detonating a nuclear weapon. The main goal is to prevent nuclear attack by locating and securing nuclear material before it can be used in an aggressive manner. This stage of the process is mostly paperwork; laws, regulations, treaties, and declarations made by individual countries or by the UN Security Council. There is some preliminary leg work done in the form of field testing detection equipment and tracking down orphan materials; however, none of these have yielded any spectacular or useful results. In the event of a nuclear attack, the first step is to analyze the post detonation debris to aid in the identification of the responsible party. This aspect of the nuclear forensics process, while reactive in nature, is more scientific. A rock sample taken from the detonation site can be dissolved into liquid form and analyzed to determine its chemical composition. The chemical analysis of spent nuclear material can provide valuable information if properly processed and analyzed. In order to accurately evaluate the results, scientists require information on the natural occurring elements in the detonation zone. From this information, scientists can determine what percentage of the element originated in the bomb itself rather than the environment. To this end, element concentrations in soils from sixty-nine different cities are given, along with activity concentrations for uranium, thorium, potassium, and radium in various building materials. These data are used in the analysis program Python.

54 ENVIRONMENTAL SCIENCES↗

Python Codebase and Jupyter Notebooks - Applications of Machine Learning Techniques to Geothermal Play Fairway Analysis in the Great Basin Region, Nevada

Git archive containing Python modules and resources used to generate machine-learning models used in the "Applications of Machine Learning Techniques to Geothermal Play Fairway Analysis in the Great Basin Region, Nevada" project. This software is licensed as free to use, modify, and distribute with attribution. Full license details are included within the archive. See "documentation.zip" for setup instructions and file trees annotated with module descriptions.

Brown, Stephen↗

Mesh-based multiphysics coupling acceleration for fusion neutronics through clustering for fusion blanket applications

Accurate modeling of particle transport within fusion blankets is essential for predicting performance metrics such as heat deposition and the tritium breeding ratio (TBR). However, high-fidelity coupling of thermal fluids from computational fluid dynamics (CFD) to neutronics simulations often incurs significant computational costs due to the complexity of surface intersection calculations in Monte Carlo codes. This paper presents an accelerated multiphysics coupling method for neutronics that utilizes hierarchical agglomerative clustering to map complex material property distributions to a neutronics model. Implemented within the fusion reactor design and assessment (FREDA) framework, the method leverages existing Python packages to automate the creation of clustered geometries for OpenMC. The approach is demonstrated on a sector model of an ARC-class tokamak with an immersion molten salt blanket, and an simple geometry with varying isotopic concentrations. Results show that the clustering method significantly reduces computational burden without compromising fidelity, providing a foundation for agile iteration of neutronics simulations involving multiple coupled material properties.

Bae, Jin Whan [ORNL] (ORCID:0000000326548907)↗

TRINIDI (Time-of-Flight Resonance Imaging with Neutrons for Isotopic Density Inference)

This software is an open-source Python library that provides tools for processing hyperspectral neutron time-of-flight radiography data. This type of data allows material decomposed reconstructions to be generated with the use of material characteristic spectral responses and the algorithms provided in this code library. The software library will contain tools for pre-processing the neutron measurement data, estimating measurement system parameters, reconstructing material decomposed radiographs, and computing material decomposed computed tomography (CT). Furthermore, it will have capability to generate and process simulated neutron time-of-flight data with the goal of benchmarking and demonstrating the tools that are provided. The software will include thorough documentation and application examples.

Balke, Thilo↗

Battery Lifecycle Framework

The Battery Lifecycle (BLC) Framework is an open-source platform that provides tools to visualize and share battery data from material characterization, cell testing, manufacturing, and field testing through the technology development cycle. BLC has three components: data importers, a front-end for querying the data and creating visualizations, and an application programming interface to provide access to the data from Python. BLC has been deployed for tracking the development of a battery from the lab to a manufacturing line and systems installed in the field and for comparing studies of multiple cells of the same battery chemistry and configuration. The code was developed around Redash, a robust open-source extract-transform-load engine. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525. SAND2021-4546 O

De Angelis, Valerio↗

Advanced TidGen Power System - OpenFOAM Version 5 CFD Case Files

The TidGen Power System generates emission-free electricity from tidal currents and connects directly into existing grids using smart grid technology. The power system consists of three major subsystems: shore-side power electronics, mooring system, and turbine generator unit (TGU) device. This submission contains supporting CFD files, case files and geometry for the Advanced TidGen. TSR = Tip speed ratio Cp = Power coefficient Cl = Lift coefficient Cd = Drag coefficient

16 TIDAL AND WAVE POWER↗

Provenance-Enabling DOE Visualization Applications

VisTrails, Inc.’s goal main charter has been to develop provenance management solutions for software tools. As the use of computation increases, keeping track of computational processes and the data they consume and derive is essential for many applications. Provenance (also referred to as audit trail, lineage, and pedigree) captures information about the steps used to generate a given data product. Such information provides important documentation that is key to preserving the data, to determining the data’s quality and authorship, and to reproducing as well as validating the results. Given the growing complexity of the computational processes and the volume of data they manipulate, manual approaches to maintaining provenance are both tedious and error-prone. At VisTrails, Inc., we have implemented infrastructure that can be used to provenance-enable existing tools. We have developed a series of plugins for specific applications, including ParaView and VisIt, which enable these applications to capture provenance. While developing these plugins, we identified general patterns across different applications, and these were used to inform the design of a general framework: the VisTrails Provenance Software Development Kit (SDK). The SDK encapsulates a set of core functionality including methods for capture, navigation, analysis and re-use of provenance. It allows application or plugin developers to more effectively provide provenance support: they can use the core functionality and write code only to handle application specific components. The SDK includes features that can be used in any application, for example, a refined interface for browsing the intermediate and final results captured. While the application-specific plugins were written in Python, the SDK was written from scratch in C++. This has led not only to substantial gains in performance but also the ability to integrate the SDK with applications written in other languages, including Java. To ensure that the SDK supported all of the functionality in the application-specific plugins, we have rewritten some of the existing plugins using the SDK. The SDK can be downloaded from www.vistrals.com/sdk.html.

97 MATHEMATICS AND COMPUTING↗

Validation of MCNP Critical Benchmarks Models of Highly Enriched Uranium Cylinders

A new centralized repository of high-quality MCNP models of critical benchmark experiments is currently under development at Los Alamos National Laboratory (LANL). The benchmark experiments are described in the International Criticality Safety Benchmark Evaluation Project (ICSBEP) Handbook, and the initial set of benchmark models are derived from the Whisper Suite provided with MCNP6.2. This effort is a collaboration among the Nuclear Criticality Safety, Nuclear Data, and Monte Carlo code development/application organization at LANL. The objective is to create a current single LANL benchmark collection that includes the latest ICSBEP revision that has a formal review and revision process, is contained in an open- source repository, and utilizes new Python tools for improved input and output file review.

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

Differentiable Quantum Programming with Unbounded Loops

The emergence of variational quantum applications has led to the development of automatic differentiation techniques in quantum computing. Existing work has formulated differentiable quantum programming with bounded loops, providing a framework for scalable gradient calculation by quantum means for training quantum variational applications. However, promising parameterized quantum applications, e.g., quantum walk and unitary implementation, cannot be trained in the existing framework due to the natural involvement of unbounded loops. To fill in the gap, we provide the first differentiable quantum programming framework with unbounded loops, including a newly designed differentiation rule, code transformation, and their correctness proof. Technically, we introduce a randomized estimator for derivatives to deal with the infinite sum in the differentiation of unbounded loops, whose applicability in classical and probabilistic programming is also discussed. We implement our framework with Python and Q# and demonstrate a reasonable sample efficiency. Through extensive case studies, we showcase an exciting application of our framework in automatically identifying close-to-optimal parameters for several parameterized quantum applications.

Computer Science↗

PIO Tools

This is a set of utilities for reading and manipulating PIO files written in python and C++. These files are intended to be building blocks for other scripts / programs that will use them to do great things. The PIO format itself is described in LA-UR-05-7425 at page 102 and embodied in code LA-CC-05-052. In addition to reading the raw PIO files, the bundled utilities will expand variable that use a compressed sparse row notation

Swaminarayan, Sriram↗

Automated Nuclear Data Test Suite

Provides python routines to create a database of test problems in a user-defined directory tree, to query the database using user-defined parameters, to generate a list of test urns, to automatically run with user-defined particle transport codes. Includes natural isotope abundance data, and a table of benchmark effective for fast critical assemblies. Does not include input decks, cross-section libraries, or particle transport codes.

Source record↗

SpacePy - a Python-based library of tools for the space sciences

Space science deals with the bodies within the solar system and the interplanetary medium; the primary focus is on atmospheres and above - at Earth the short timescale variation in the the geomagnetic field, the Van Allen radiation belts and the deposition of energy into the upper atmosphere are key areas of investigation. SpacePy is a package for Python, targeted at the space sciences, that aims to make basic data analysis, modeling and visualization easier. It builds on the capabilities of the well-known NumPy and MatPlotLib packages. Publication quality output direct from analyses is emphasized. The SpacePy project seeks to promote accurate and open research standards by providing an open environment for code development. In the space physics community there has long been a significant reliance on proprietary languages that restrict free transfer of data and reproducibility of results. By providing a comprehensive, open-source library of widely used analysis and visualization tools in a free, modern and intuitive language, we hope that this reliance will be diminished. SpacePy includes implementations of widely used empirical models, statistical techniques used frequently in space science (e.g. superposed epoch analysis), and interfaces to advanced tools such as electron drift shell calculations for radiation belt studies. SpacePy also provides analysis and visualization tools for components of the Space Weather Modeling Framework - currently this only includes the BATS-R-US 3-D magnetohydrodynamic model and the RAM ring current model - including streamline tracing in vector fields. Further development is currently underway. External libraries, which include well-known magnetic field models, high-precision time conversions and coordinate transformations are wrapped for access from Python using SWIG and f2py. The rest of the tools have been implemented directly in Python. The provision of open-source tools to perform common tasks will provide openness in the analysis methods employed in scientific studies and will give access to advanced tools to all space scientists regardless of affiliation or circumstance.

79 ASTRONOMY AND ASTROPHYSICS↗

PyProcar: A Python library for electronic structure pre/post-processing

The PyProcar Python package plots the band structure and the Fermi surface as a function of site and/or s,p,d,f - projected wavefunctions obtained for each k-point in the Brillouin zone and band in an electronic structure calculation. This can be performed on top of any electronic structure code, as long as the band and projection information is written in the PROCAR format, as done by the VASP and ABINIT codes. PyProcar can be easily modified to read other formats as well. This package is particularly suitable for understanding atomic effects into the band structure, Fermi surface, spin texture, etc. PyProcar can be conveniently used in a command line mode, where each one of the parameters define a plot property. In the case of Fermi surfaces, the package is able to plot the surface with colors depending on other properties such as the electron velocity or spin projection. Furthermore, the mesh used to calculate the property does not need to be the same as the one used to obtain the Fermi surface. A file with a specific property evaluated for each k-point in a k-mesh and for each band can be used to project other properties such as electron–phonon mean path, Fermi velocity, electron effective mass, etc. Another existing feature refers to the band unfolding of supercell calculations into predefined unit cells.

97 MATHEMATICS AND COMPUTING↗

Trident: A Universal Tool for Generating Synthetic Absorption Spectra from Astrophysical Simulations

Hydrodynamical simulations are increasingly able to accurately model physical systems on stellar, galactic, and cosmological scales; however, the utility of these simulations is often limited by our ability to directly compare them with the data sets produced by observers: spectra, photometry, etc. To address this problem, we have created trident, a Python-based open-source tool for post-processing hydrodynamical simulations to produce synthetic absorption spectra and related data. trident can (i) create absorption-line spectra for any trajectory through a simulated data set mimicking both background quasar and down-the-barrel configurations; (ii) reproduce the spectral characteristics of common instruments like the Cosmic Origins Spectrograph; (iii) operate across the ultraviolet, optical, and infrared using customizable absorption-line lists; (iv) trace simulated physical structures directly to spectral features; (v) approximate the presence of ion species absent from the simulation outputs; (vi) generate column density maps for any ion; and (vii) provide support for all major astrophysical hydrodynamical codes. trident was originally developed to aid in the interpretation of observations of the circumgalactic medium and intergalactic medium, but it remains a general tool applicable in other contexts.

79 ASTRONOMY AND ASTROPHYSICS↗

Validation of MCNP Critical Benchmark Models of Moderated Highly Enriched Uranium Slabs

A new centralized repository of high-quality MCNP models of critical benchmark experiments is currently under development at Los Alamos National Laboratory (LANL). The benchmark experiments are described in the International Criticality Safety Benchmark Evaluation Project (ICSBEP) Handbook, and the initial set of benchmark models are derived from the Whisper Suite provided with MCNP6.2. This effort is a collaboration among the Nuclear Criticality Safety, Nuclear Data, and Monte Carlo code development/application organizations at LANL. The goal is to build a single LANL benchmark collection that is up to date with the latest ICSBEP revision, has a formal review and revision process, is contained in an open-source repository, and utilizes new Python tools for improved input and output file review. This paper describes the validation of the models associated with HEU-MET-FAST-007, “Uranium Metal Slabs Moderated with Polyethylene, Plexiglas, and Teflon”. The Monte Carlo n-Particle (MCNP) models were compared to the second revision of HEU-MET-FAST-007. The experiment considered critical configurations of highly enriched uranium (HEU) metal slabs and various moderators in 43 unique cases. The slabs of uranium were separated by layers of moderating material, forming an assembly. The assembly was separated in two halves with one half placed on a stationary table and the other attached to a moveable table that could be raised and lowered via pulleys connected to the ceiling of the shielded room. To reach criticality, the two halves were brought together with a negligible gap between the assemblies.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗