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 703 records · Page 39

Autonomous Controls For Reactor Technologies (acorn)

ACORN (Autonomous Controls fOr Reactor techNologies) software utilizes data, obtained from an experimental test bed and/or simulation, to implement a control command for microreactor operation. Command examples include a change to the temperature profile, power profiles, heat fluxes, etc. The control command recommended by the code is derived based on future predicted states of a microreactor, allowing proactive optimal and autonomous microreactor operation. The software is written in Python languages. The current software supports autonomous temperature controls of heat pipe simulator and autonomous heat flux controls of a 37 heat pipe non-nuclear testbed simulator (or its surrogate models).

Lin, Linyu [Idaho National Laboratory (INL), Idaho↗

Montepy

Montepy is an object-oriented Python interface for MCNP input files. It excels at reading, editing, creating, and writing MCNP input files. The Monte Carlo N Particle (MCNP) code is a Monte Carlo transport solver for simulating many different types of radiation problems and is developed by Los Alamos National Laboratory. Montepy creates an object-oriented interface for the MCNP input file to allow for efficient automated modifications to large, complex simulations.

Gale, Micah [Idaho National Laboratory (INL), Idah↗

Multigroup Neutron Cross Section Generation for the SCEPTRE Code

Multigroup neutron cross sections were generated for the deterministic radiation transport code SCEPTRE. ENDF/B-VII.1 nuclear data files were downloaded from Los Alamos National Laboratory (LANL), processed with the LANL cross-section preparation code NJOY-2012, and post-processed to produce a SCEPTRE-formatted cross section file. A simple radiation transport problem was used to compare results calculated with MCNP, a continuous-energy radiation transport code from LANL, to results calculated with SCEPTRE using the NJOY-2012-produced multigroup cross sections. This problem was used to debug the python scripts used to post-process the NJOY-2012 output and to assess the accuracy of the multigroup cross sections. These comparisons demonstrate that the multigroup cross sections generated in this work are accurate for most elements but yielded inaccurate results for several common transition metals. This discrepancy appears to result from poor treatment of the resolved resonance region of the continuous-energy cross sections. Further work is recommended to investigate alternative methods to treat these resonances with NJOY-2012.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

High Flux Isotope Reactor Low-Enriched Uranium Low Density Silicide Fuel Design Parameters

High Flux Isotope Reactor (HFIR) highly enriched uranium (HEU) to low-enriched uranium (LEU) conversion activities are ongoing as part of the Department of Energy (DOE) National Nuclear Security Administration (NNSA)’s nuclear nonproliferation mission. Design activities studying the conversion of HFIR from HEU to LEU fuel explored different fuel design features and shapes with a low density uranium-silicide dispersion (U 3 Si 2 -Al) fuel, which has a uranium density of 4.8 gU/cm 3 . The goal of these studies is to generate several HFIR LEU fuel designs of varying fuel fabrication complexity that meet the current HEU performance metrics and safety requirements. The documented designs will serve as references for fuel fabrication and qualification activities. Recent advancements in modeling and simulation tools enable quick prototyping of fuel designs. Shift, a Monte Carlo neutron transport and depletion tool optimized for high-performance computing (HPC) architectures, is used for efficient fuel cycle and performance metrics calculations. The HFIR Steady State Heat Transfer Code (HSSHTC) is used to vet the thermal safety margin. Also, a new automation tool that connects all fuel design analysis steps, named Python HFIR Analysis and Measurement Engine (PHAME), has been developed to expedite the design study in an efficient and reproducible manner. Leveraging these tools, several candidate fuel designs were selected for varying fabrication complexity. This report provides design feature details for four selected HFIR LEU low density U 3 Si 2 -Al fuel designs and their corresponding performance and safety metrics. Nominal, best-estimate design parameters and irradiation conditions, including fission rate densities, power densities, heat fluxes, and cumulative fission densities are provided for candidate fuel designs relevant to framing irradiation experiments to support fuel qualification efforts. Simulations show that the low density U 3 Si 2 -Al, with design features to enhance safety, can meet HEU core performance metrics and safety requirements if the reactor power is increased from 85 MW (HEU) to 95 MW (LEU) and if the active fuel length is increased from 50.80 cm (HEU) to 55.88 cm (LEU).

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

Ducted Assembly Steady-State Heat Transfer Software (DASSH)

The Ducted Assembly Steady-State Heat transfer software (DASSH) is being developed at Argonne National Laboratory to perform a steady-state thermal fluids calculation to determine the coolant flow and temperature distribution for a hexagonal reactor core configuration with ducted assemblies. DASSH is intended to be used in the early stages of the reactor design process when assembly components can be undefined or are undergoing considerable design changes. DASSH provides a rapid assessment of the temperature and flow distribution to allow quick characterization of the system and identification of problem areas. This document is a guide for DASSH users. It summarizes the core capabilities of DASSH and highlights differences between DASSH and SE2-ANL. Instructions for obtaining and installing DASSH are provided along with some guidelines and recommendations for newer Python users. It covers the structure of the input file, provides directions for running DASSH, describes the various output files produced by the code, and provides instructions for visualizing data. Examples demonstrating various DASSH options are included. DASSH is under active development, so it is anticipated that this guide will grow and evolve as the code is updated.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

LANL Nuclear Data Manager Format Specification v1.0

The LANL nuclear data manager tool is a Python utility that downloads nuclear data from the Nuclear Data Team’s website at https://nucleardata.lanl.gov, arranges it, and configures directory listings for nuclear codes such as the MCNP code to consume. In this document, the Version 1.0 API that this tool relies on will be discussed, which will show how an external provider of nuclear data could set up their website to provide a compatible implementation.

97 MATHEMATICS AND COMPUTING↗

Accelerating Floating-Point Computations with Intel AMX

Intel AMX is a built-in component of recent Intel CPU architectures, first supported by the Intel Sapphire Rapids in 2023, that enables efficient dense matrix multiplications using mixed precision with low-precision data types. The popularity of mixed-precision algorithms has grown recently, primarily due to their use on GPUs to enhance the efficiency of HPC applications, particularly for the training of large language models. The availability of mixed precision on CPUs represents a cost-effective solution for applications where high speed is not critical. This report shows how to use the Intel AMX accelerator through examples in C++ and Python. The examples will focus on mixed-precision floating-point operations obtained by the use of bfloat16 (or BF16) to accelerate code in single precision. We employ a bottom-up methodology, starting from specific register instructions (TMUL operation) to higher-level applications in libraries such as Intel MKL, PyTorch, and TensorFlow, ensuring a comprehensive understanding of the accelerator's potential. Additionally, we provide insights into the expected performance gains when leveraging the accelerator on the Kestrel HPC machine at the National Renewable Energy Laboratory.

97 MATHEMATICS AND COMPUTING↗

openPMD-viewer

Many simulation software produce data in the form of a set of field values or of a set of particle positions. (one such example is that of particle-in-cell codes, which produce data on the electromagnetic fields that they simulate.) However, each particular software uses its own particular format and layout, for the output data. This makes it difficult to compare the results of different simulation software, or to have a common visualization tool for these results. However, a standardized layout for fields and particles has recently been developed: the openPMD format ( HYPERLINK "http://www.openpmd.org/"www.openpmd.org) This format is open- source, and specifies a standard way in which field data and particle data should be written. The openPMD format is already implemented in the particle-in-cell code Warp (developed at LBL) and in PIConGPU (developed at HZDR, Germany). In this context, the proposed software (openPMD-viewer) is a Python package, which allows to access and visualize any data which has been formatted according to the openPMD standard. This package contains two main components: - a Python API, which allows to read and extract the data from a openPMD file, so as to be able to work with it within the Python environment. (e.g. plot the data and reprocess it with particular Python functions) - a graphical interface, which works with the ipython notebook, and allows to quickly visualize the data and browse through a set of openPMD files. The proposed software will be typically used when analyzing the results of numerical simulations. It will be useful to quickly extract scientific meaning from a set of numerical data.

Lehe, Remi↗

Dataset for 'Ombadi et al. (2023). A warming-induced reduction in snow fraction amplifies rainfall extremes, Nature'

This package contains the main codes, sample input data and main result files to reproduce the analysis and results presented in the article: “Ombadi et al. (2023), A warming-induced reduction in snow fraction amplifies rainfall extremes, Nature”. The folder consists of the following: (1) “Raw data”: a folder that contains sample input data which is used in some of the codes for demonstration purposes. It also contains data that was not pre-processed such as Elevation data; (2) “Results”: this folder contains files of the main results presented in the paper including: “Annual-Max-Series”, “Change-rainfall-extremes”, “Change-snow-fraction”, “Warming levels_By scenario_model_year” and “Masks”. Description of these folders is detailed in the "Readme.rtf" file; (3) Python jupyter notebooks (Extract_Annual Max Series (AMS).ipynb, Elevation-dependent amplification of rainfall extremes.ipynb, Sensitivity_to_global_warming.ipynb) demonstrate the main steps of analysis. Further description of those notebooks is provided in the "Readme.rtf" file; (4) R code for extreme value analysis (Extreme_Value_Analysis.R). The sample and pre-processed dataset in "Raw data" is obtained from publicly available repositories of CMIP6 and ERA5 datasets; see Methods for more detail. This research was supported by Office of Science, Office of Biological and Environmental Research of the US Department of Energy under contract no. DE-AC02-05CH11231 for the CASCADE Scientific Focus (funded by the Regional and Global Model Analysis Program area within the Earth and Environmental Systems Modeling Program) and the iNAIADS Early Career Research Project (funded by the Environmental Systems Science program).

54 ENVIRONMENTAL SCIENCES↗

DarkCapPy: Dark matter capture and annihilation

DarkCapPy is a Python 3/Jupyter package for calculating rates associated with dark matter capture in the Earth, annihilation into light mediators, and the subsequent observable decay of the light mediators near the surface of the Earth. The package includes a calculation of the Sommerfeld enhancement at the center of the Earth and the timescale for capture–annihilation equilibrium. The code is open source and can be modified for other compact astronomical objects and mediator spins.

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

Forward Modeling of Large-scale Structure: An Open-source Approach with Halotools

Here, we present the first stable release of Halotools (v0.2), a community-driven Python package designed to build and test models of the galaxy-halo connection. Halotools provides a modular platform for creating mock universes of galaxies starting from a catalog of dark matter halos obtained from a cosmological simulation. The package supports many of the common forms used to describe galaxy-halo models: the halo occupation distribution (HOD), the conditional luminosity function (CLF), abundance matching, and alternatives to these models that include effects such as environmental quenching or variable galaxy assembly bias. Satellite galaxies can be modeled to live in subhalos, or to follow custom number density profiles within their halos, including spatial and/or velocity bias with respect to the dark matter profile. Here, the package has an optimized toolkit to make mock observations on a synthetic galaxy population, including galaxy clustering, galaxy-galaxy lensing, galaxy group identification, RSD multipoles, void statistics, pairwise velocities and others, allowing direct comparison to observations. Halotools is object-oriented, enabling complex models to be built from a set of simple, interchangeable components, including those of your own creation.

46 INSTRUMENTATION RELATED TO NUCLEAR SCIENCE AND ↗

Prediction of tissue optical properties using the Monte Carlo modeling of photon transport in turbid media and integrating spheres

Monte Carlo methods are an established technique for simulating light transport in biological tissue. Integrating spheres make experimental measurements of the reflectance and transmittance of a sample straightforward and inexpensive. This work presents an extension to existing Monte Carlo photon transport methods to simulate integrating sphere experiments. Crosstalk between spheres in dual-sphere experiments is accounted for in the method. Analytical models, previous works on Monte Carlo photon transport, and experimental measurements of a synthetic tissue phantom validate this method. We present two approaches for using this method to back-calculate the optical properties of samples. Experimental and simulation uncertainties are propagated through both methods. Both back-calculation methods find the optical properties of a sample accurately and precisely. Our model is implemented in standard Python 3 and CUDA C++ [J. Nickolls, I. Buck, M. Garland, and K. Skadron, ACM Queue 6 , 40 ( 2008 ) ] and is publicly available in Code 1.

Cook, Patrick D. (ORCID:0000000279345428)↗

GMI-IPS: Processing & Visualization Software Used in ATom DC-8 Aircraft Studies

NASA's Atmospheric Tomography Mission (ATom) deployed in each of the four seasons during 2016-2018, the DC-8 aircraft in order to establish global-scale datasets intended to improve the representation of chemically reactive gases in global atmospheric chemistry models (ACMs). The Global Modeling Initiative (GMI) executed simulations for each ATom flight using the GMI Chemistry Transport Model (GMI-CTM) to provide species concentrations of chemical gases along the DC-8 flight transects. To solve the problem of translating the GMI-CTM simulation data to the unique spatial resolutions of each ATom flight, the GMI ICARTT Processing Software (GMI-IPS) was developed.The GMI-IPS is written in Python and provides data processing, flight extraction, and visualization support for aircraft research projects using ICARTT format, which is a standard format for airborne instrument data. Additionally, the GMI-IPS interpolates global gridded model data from Hierarchical Data Format (HDF) to ICARTT compatible flight transects. Software classes for instruments and collections provided by the ATom DC-8 aircraft such as MER10, MMS, etc. are derived from a common base class. Other functionality provided by the GMI-IPS are: deriving missing flight entries along a transect, reading ICARTT entries from file, and providing Python data structures for storing flight and model information, and more.The GMI-IPS is GIT source controlled, has approximately 30,000 lines of code, and supports parallelization across data collections. It delivered GMI-CTM data for more than forty distinct DC-8 aircraft flights that took place under ATom. The output ICARTT files adhere to format standard V1.1, and pass the scan utility provided by NASA LaRC Airborne Science Data for Atmospheric Composition. This presentation will include a software and methods overview, and results from ATom, including assessments using the GMI-CTM showing how well observations from ATom flight transects represent a broader region.

Damon, M. R.↗

Software development infrastructure for the HYBRID modeling and simulation project

One of the goals of the HYBRID modeling and simulation project is to assess the economic viability of hybrid systems in a market that contains renewable energy sources like wind. The idea is that it is possible for the nuclear plant to sell non-electric energy cushions, which absorb (at least partially) the volatility introduced by the renewable energy sources. This system is currently modeled in the Modelica programming language. To assess the economics of the system, an optimization procedure is trying to find the minimal cost of electricity production. The RAVEN code is used as a driver for the whole problem. It is assumed that at this stage, the HYBRID modeling and simulation framework can be classified as non-safety “research and development” software. The associated quality level is Quality Level 3 software. This imposes low requirements on quality control, testing and documentation. The quality level could change as the application development continues.Despite the low quality requirement level, a workflow for the HYBRID developers has been defined that include a coding standard and some documentation and testing requirements. The repository performs automated unit testing of contributed models. The automated testing is achieved via an open-source python script called BuildingsP from Lawrence Berkeley National Lab. BuildingsPy runs Modelica simulation tests using Dymola in an automated manner and generates and runs unit tests from Modelica scripts written by developers. In order to assure effective communication between the different national laboratories a biweekly videoconference has been set-up, where developers can report their progress and issues. In addition, periodic face-face meetings are organized intended to discuss high-level strategy decisions with management. A second means of communication is the developer email list. This is a list to which everybody can send emails that will be received by the collective of the developers and managers involved in the project. Thirdly, to exchange documents quickly, a SharePoint directory has been set-up. SharePoint allows teams and organizations to intelligently share, and collaborate on content from anywhere.

97 MATHEMATICS AND COMPUTING↗

Admiralty Inlet Advanced Turbulence Measurements: May 2015

This data is from measurements at Admiralty Head, in Admiralty Inlet (Puget Sound) in May of 2015. The measurements were made using Inertial Motion Unit (IMU) equipped ADVs mounted on a 'StableMoor' (Manufacturer: DeepWater Buoyancy) buoy and a Tidal Turbulence Mooring (TTM). These platforms position ADV heads above the seafloor to make mid-depth turbulence measurements. The inertial measurements from the IMU allows for removal of mooring motion in post processing. The mooring and buoy motion has been removed from the stream-wise and vertical velocity signals (u, w). The lateral (v) velocity has some 'persistent motion contamination' due to mooring sway. The TTM was deployed with one ADV, it's position was: 48 09.145', -122 41.209' The StableMoor was deployed twice, the first time it was deployed in 'wing-mode' with two ADVs ('Port' and 'Star') at: 48 09.166', -122 41.173' The second StableMoor deployment was in 'Nose' mode with one ADV at: 48 09.166', -122 41.174' Units ----- - Velocity data (_u, urot, uacc) is in m/s. - Acceleration (Accel) data is in m/s^2. - Angular rate (AngRt) data is in rad/s. - The components of all vectors are in 'ENU' orientation. That is, the first index is True East, the second is True North, and the third is Up (vertical). - All other quantities are in the units defined in the Nortek Manual. Motion correction and rotation into the ENU earth reference frame was performed using the Python-based open source DOLfYN library (http://lkilcher.github.io/dolfyn/). Details on motion correction can be found there. Additional details on TTM measurements at this site can be found in the included Marine Energy Technology Symposium paper.

16 TIDAL AND WAVE POWER↗

Genarris 2.0: A Random Structure Generator for Molecular Crystals

Genarris is an open source Python package for generating random molecular crystal structures with physical constraints for seeding crystal structure prediction algorithms and training machine learning models. Here we present a new version of the code, containing several major improvements. A MPI-based parallelization scheme has been implemented, which facilitates the seamless sequential execution of user-defined workflows. A new method for estimating the unit cell volume based on the single molecule structure has been developed using a machine-learned model trained on experimental structures. A new algorithm has been implemented for generating crystal structures with molecules occupying special Wyckoff positions. A new hierarchical structure check procedure has been developed to detect unphysical close contacts efficiently and accurately. New intermolecular distance settings have been implemented for strong hydrogen bonds. To demonstrate these new features, we study two specific cases: benzene and glycine. Genarris finds the experimental structures of the two polymorphs of benzene and the three polymorphs of glycine. Program summary Program Title: Genarris 2.0 Program Files doi: http://dx.doi.org/10.17632/grx6mz4pjn.1 Licensing provisions: BSD-3 Clause Programming language: Python, C External routines/libraries: Spglib, ASE, pymatgen, SciPy, mpi4py, scikit-learn, PyTorch, FHI-aims. Nature of problem: Molecular crystal structure prediction. Solution method: Genarris 2.0 generates molecular crystal structures over the 230 space groups, on general and special Wyckoff positions, using physical constraints. Down-sampling of the generated structures may be performed subsequently, based on molecular crystal packing descriptors and an unsupervised machine learning algorithm. Lastly, ab initio structure relaxation may be performed for the final pool. Depending on the user-defined workflow implemented, Genarris may be used to generate diverse molecular crystal datasets to seed evolutionary algorithms or to train machine learning algorithms or as a standalone crystal structure prediction method. Restrictions: For crystal structure generation, the molecule of interest must be semi-rigid with no bond rotational degrees of freedom. Unusual features: Genarris 2.0 is a highly distributed program, making use of MPI for Python parallelization. The user has the ability to design and implement workflows by executing a user-defined list of procedures. Genarris 2.0 offers new features including a machine learning model for estimating the molecular volume in the solid state from the single molecule structure, structure generation in special Wyckoff positions of space groups, hierarchical structure checks including rigorous treatment of non-orthogonal structures, and clustering and down-selection workflows combining first principles simulations with machine learning. (C) 2020 Elsevier B.V. All rights reserved.

Crystal structure prediction↗

python binder for libROM

pylibROM introduces python binder for libROM through pybind11. Through python interface, users who are familiar with python can take advantage of capabilities available in libROM that is fully parallelized C++ library for reduced order modeling. libROM itself is an open source code developed at LLNL. libROM is available at https://github.com/LLNL/libROM .

Choi, Youngsoo↗

Recent Updates to the Object Reentry Survival Analysis Tool (ORSAT) Version 7.1

The Object Reentry Survival Analysis Tool (ORSAT) code is maintained and used by the NASA Orbital Debris Program Office (ODPO) and has been under continuous development and improvement since the mid-1990s. ORSAT is an object-oriented reentry simulation tool; it models a satellite as a collection of discrete components that follow independent trajectories upon the breakup of the parent object. Version 7.1 of the tool incorporates five years of new thermal and aerodynamic model development, multi-processor parametric study capability, codebase upgrades, and numerous bug-fixes. The thermal demise model was completely rewritten using a forward-time/central-space numerical stencil and incorporating a new pyrolysis model for fiber-reinforced plastic (FRP) materials. New aerodynamic and aeroheating models for hollow cylinders and hollow square prisms were developed using a combination of flow simulations in the direct simulation Monte Carlo (DSMC) Analysis Code (DAC) and Data Parallel Line Relaxation (DPLR) code and free-flight tests in the University of Texas at San Antonio’s Hypersonic Wind Tunnel. The latest version also incorporates a mechanical, strength-based demise model for FRP materials. Minor improvements include an update to the Fortran 2018 codebase; improved integration and speed with the Python-based, multi-core, parametric study tool, AutoORSAT; and fixes for many minor bugs. This new version of ORSAT will enable more accurate reentry risk assessments for modern satellites. This paper presents an overview of these changes and a summary of the verification and validation performed on the final code.

Benton R. Greene↗