Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “Python codes”

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 505 records · Page 28

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↗

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↗

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↗

A Python Script to Read MCNP6.3 Surface-Source Files

This report provides a Python script to read an MCNP ® surface source file created with the SSW card with SYM = 0 (i.e., the default symmetry treatment). For background: the general format of an MCNP surface-source file is described in; however, that document did not provide coding and/or a tool to interrogate such files. The current format will not be given in this document other than through the record-read statements necessary for the script to function. The reader capability in this report is augmented with the ability to directly write a couple demonstrative outputs: 1. A comma-separated value (CSV) file containing particle phase-space state information and 2. A Matplotlib histogram of the energy distribution of the particles. This report also describes accompanying verification work that shows the script performing as required with MCNP6.2, MCNP6.3, and (expected) MCNP6.4 surface-source files. However, users of the enclosed script must still verify that the script is behaving correctly for their own work.

97 MATHEMATICS AND COMPUTING↗

Developments in SRW Code and Sirepo Framework Supporting Simulation of Time-Dependent Coherent X-ray Scattering Experiments

Physical optics simulations for beamlines and experiments are essential for the effective use of synchrotron light source facilities such as NSLS-II at BNL. The SRW software package supports such source-to-detector simulations for coherent X-ray scattering and imaging experiments through its Python interface and Sirepo browser-based graphical user interface. This allows one to define custom sample models, assess the feasibility of an experiment, and estimate most appropriate beamline settings before using valuable beamtime. We discuss the recent use of general-purpose GPU resources and coherent mode decomposition algorithms in SRW to accelerate physical optics simulations with partially coherent X-rays. To illustrate these new capabilities, we describe simulations of typical time series of partially coherent scattering images used in X-ray Photon Correlation Spectroscopy (XPCS) experiments; aiming to characterize the nanoscale dynamics of a disordered sample, representing a solution of nanoparticles undergoing Brownian diffusion.

36 MATERIALS SCIENCE↗

BuildingsBench: A Benchmark for Universal Building Load Forecasting [SWR-23-51]

The residential and commercial building stock in the United States is responsible for a significant percentage of energy consumption and greenhouse gas emissions. Electrification of end-uses, as well as decarbonizing the electrical grid through renewable energy sources such as solar and wind, constitutes the pathway to zero-emission buildings. Forecasting day-ahead building energy consumption is an integral part of this solution. Currently, specialized forecasting models are hand-made for each individual building, which is time-consuming, expensive, and leads to duplicated efforts. BuildingsBench is a Python software framework for training and comparing generalized machine learning models for universal building load forecasting. This challenge tasks a single foundational model to generalize its forecasts for a wide variety of buildings, across geographic regions, building types, weather patterns, and more. This software provide code for pre-training such models and subsequently evaluating their performance on a suite of hundreds of diverse real and synthetic buildings. BuildingsBench is a platform for: - Large-scale pretraining with the synthetic Buildings-900K dataset for short-term load forecasting (STLF). Buildings-900K is statistically representative of the entire U.S. building stock and is extracted from the NREL End-Use Load Profiles database. - Benchmarking on two tasks evaluating generalization: zero-shot STLF and transfer learning for STLF. We provide an index-based PyTorch Dataset for large-scale pretraining, easy data loading for multiple real building energy consumption datasets as PyTorch Tensors or Pandas DataFrames, simple (persistence) to advanced (transformer) baselines, metrics management, and more.

Emami, Patrick↗

The Nuclear System-of-Systems Capabilities Analytic Process

This dissertation discusses the impetus for, development of, and initial demonstration of NuSCAPTM: the Nuclear System-of-Systems Capabilities Analytic Process TM . NuSCAP is an approach executed via a Python® application that enables capabilities-based vulnerability analyses of military systems of systems (SOS) exposed to prompt nuclear weapon effects. The NuSCAP application calls on industry-standard, fast-running nuclear weapon effects tools and the Monte Carlo N-Particle®1 (MCNP®) code to evaluate the impact of nuclear weapon environments on the military capabilities of a complex and networked SOS.

45 MILITARY TECHNOLOGY, WEAPONRY, AND NATIONAL DEF↗

Dataset for "Climatic and socioeconomic drivers of water use and their spatio-temporal patterns for small and mid-sized cities in the Contiguous United States"

This dataset contains all code for calibrating and analyzing machine learning models for "Climatic and socioeconomic drivers of water use and their spatio-temporal patterns for small and mid-sized cities in the Contiguous United States". Please unzip the folders and follow the instructions from 'README.txt'. Required python modulessklearn=1.2.2numpy=1.23.3xgboost=2.0.2joblib=1.2.0 Required R libraryshapFlex:devtools::install_github("nredell/shapFlex")library(shapFlex)

Dave, Hari [Civil and Environmental Engineering De↗

LCA-PyTorch

LCA-PyTorch is a code repository which contains PyTorch implementations of the Locally Competitive Algorithm (LCA), which is a biologically-plausible sparse coding model. LCA-PyTorch allows for the training, testing, and analysis of single layer LCA networks, multi-layer LCA networks, and hybrid LCA-based deep neural network models on a wide variety of applications and data types. LCA-PyTorch was developed in Python, a high-level programming language that takes advantage of the Python ecosystem of high-quality open-source packages for machine learning. LCA-PyTorch interfaces heavily with the open-source PyTorch Python package.

Teti, Michael↗

SimpleMass (Version 2.0.1 Report)

SimpleMass v2 is an updated GUI version of the SimpleMass Excel spreadsheet. It was developed using Python 3.7 and wxPython, a cross-platform GUI toolkit. The program was developed on Windows 10 and tested on macOS Catalina. In theory, the program should work on Linux based operating systems such as Ubuntu, but this has not been tested. Executable versions of the code were built using PyInstaller. The version described in this report is an alpha version that is still in development. It has only been tested by the developer.

97 MATHEMATICS AND COMPUTING↗

Noodles: Cooking Up Collaborative Visualization

NOODLES is a new cross-domain collaborative visualization and analysis capability being developed at NREL. The NOODLES specification is a minimal protocol that can tie different software packages and platforms together. As an example, a simulation code that speaks this protocol could stream iso-surfaces to an immersive VR space and a web browser. Another example is a team (with some members across the country) classifying and discovering features in a statistical data plot, driven from a researcher's existing Python-based workflow. In this talk, we will discuss some background on the problems that this protocol intends to solve, basic principles of the specification, the current state of supporting libraries, and some demonstrations of the protocol in action.

3D↗

NRAP-Open-IAM: NRAP Open Source Integrated Assessment Model

Note: This is the last version (a2.6.1) of NRAP-Open-IAM released during NRAP Phase II in 2022. The latest version of NRAP-Open-IAM is available here: https://edx.netl.doe.gov/dataset/phase-iii-nrap-open-iam NRAP-Open-IAM is an open-source software product that enables quantification of containment effectiveness and leakage risk at storage sites in the context of system uncertainties and variability. NRAP-Open-IAM represents the next-generation in a line of systems-based computational models developed for quantitative geological carbon storage (GCS) risk assessment. The model comprises a set of reduced-order and analytical models of various components of the GCS system, potential leakage pathways, receptors of concern including impact to groundwater resources and the atmosphere, a framework to support stochastic simulation, time stepping, uncertainty quantification, other analytical functionality for scenario and risk-performance evaluation, and a basic graphical user interface to support scenario development, data input simulation definition, and basic post-processing and results display. As the NRAP Open-IAM functionality continues to evolve, we continue to add to its capability to develop quantitative, probabilistic, and time-dependent profiles of the evolution of risk at a GCS site and evaluate the influence of uncertain parameters on uncertainty in predicted risk. It can be used to quantify the dynamics of reservoir saturation plume and pressure-affected area, for evaluation of the area of potential groundwater impact (i.e., Area of Review) and monitoring requirements to support cost and regulatory analysis, and for consideration of different post-injection site care and closure scenarios. This submission contains the current version of NRAP-Open-IAM available for evaluation and testing. To use the NRAP-Open-IAM, download the source code (https://edx.netl.doe.gov/dataset/08f396c8-bc5f-44ad-a028-6e98a6ea6d70/resource/4c24a3da-3b40-4ffe-9892-c807ae9f8760) then open the NRAP-Open-IAM user's guide (https://edx.netl.doe.gov/dataset/08f396c8-bc5f-44ad-a028-6e98a6ea6d70/resource/8b27335a-343c-4836-b8a3-3ad0bdc9e669) to read more about the tool. Installation instructions for Windows, Mac, and Linux can be found in the "installers" folder of the extracted NRAP-Open-IAM folder and describe setup of environment (e.g., Python libraries) needed for proper work of the tool. Test of installation can be done by running "python openiam_setup_tests.py" in the "setup" folder. The installation test also runs a test suite to see if the NRAP-Open-IAM has been installed correctly. To run the test suite separately, run "python iam_test.py" in the "test" folder. User's guide: https://edx.netl.doe.gov/dataset/08f396c8-bc5f-44ad-a028-6e98a6ea6d70/resource/8b27335a-343c-4836-b8a3-3ad0bdc9e669 Developer's guide: https://edx.netl.doe.gov/dataset/08f396c8-bc5f-44ad-a028-6e98a6ea6d70/resource/3bc6ee7d-609d-4eb6-80ba-fa6130ee0313 Reservoir simulation data used in some examples distributed with NRAP-Open-IAM: - Kimberlina: https://edx.netl.doe.gov/dataset/08f396c8-bc5f-44ad-a028-6e98a6ea6d70/resource/eb62cece-61b2-4037-9b6d-32407dde2ab8 - Kimberlina (compartmentalized): https://edx.netl.doe.gov/dataset/08f396c8-bc5f-44ad-a028-6e98a6ea6d70/resource/366f9530-3b32-4b84-affe-ab2df1d9a8b5 - FutureGen 2.0: https://edx.netl.doe.gov/dataset/futuregen-2-0-1008-simulation-reservoir-lookup-table NRAP-Open-IAM GitLab repository: https://gitlab.com/NRAP/OpenIAM Related publications: - Bacon, D., Yonkofski, C., Brown, C., Demirkanli, D. and Whiting, J., 2019. Risk-based post injection site care and monitoring for commercial-scale carbon storage: Reevaluation of the FutureGen 2.0 site using NRAP-Open-IAM and DREAM. International Journal of Greenhouse Gas Control 90: 102784. - Bacon, D. Demirkanli, D., and White, S., 2020. Probabilistic risk-based Area of Review (AoR) determination for a deep-saline carbon storage site. International Journal of Greenhouse Gas Control 102: 103153. - Harp, D., Oldenburg, C., and Pawar, R., 2019. A metric for evaluating conformance robustness during geologic CO2 sequestration operations. International Journal of Greenhouse Gas Control 85: 100-108. - Lackey, G., Vasylkivska, V., Huerta, N., King, S., and Dilmore, R., 2019. Managing well leakage risks at a geologic carbon storage site with many wells, International Journal of Greenhouse Gas Control, 88 :182-194. - Vasylkivska, V., Dilmore, R., Lackey, G., Zhang, Y., King, S., Bacon, D., Chen, B., Mansoor, K., and Harp, D., 2021. NRAP-Open-IAM: A flexible open-source integrated assessment model for geologic carbon storage risk assessment and management, Environmental Modelling & Software, 143: 105114. Presentations: - Chen, B., Harp, D., and Pawar, R., A data assimilation approach (ES-MDA) coupling with NRAP-Open-IAM for quantifying uncertainty reduction in geological CO2 sequestration. AGUFM 2019: T44A-02. - Chen, B., and Harp, D., Improving risk analysis precision for geologic CO2 sequestration by quantifying the uncertainty reduction before and after acquiring monitoring data. 14th Greenhouse Gas Control Technologies Conference, Melbourne, Australia, 2018, pp. 21-26. - Harp, D., National Risk Assessment Partnership Task 2: Containment Assurance. No. LA-UR-19-28654, Los Alamos National Laboratory (LANL), Los Alamos, NM (United States), 2019. - Vasylkivska, V., King, S., Bacon, D., Harp, D., Chen, B., Mansoor, K., Onishi, T., Yang, Y., Zhang, Y., and Keating, E., NRAP-Open-IAM: An open-source integrated assessment model, poster, Mastering the Subsurface Through Technology Innovation, Partnerships and Collaboration: Carbon Storage and Oil and Natural Gas Technologies Review Meeting, Pittsburgh, PA, August 13-16, 2018. - Vasylkivska, V., Lackey, G., King, S., Wentworth, A., Huerta, N., Creason, C., DiGiulio, J., Yang, Y., and Dilmore, R., Long-term risk analysis of a geologic CO2 storage project during the post-injection period, SIAM Conference on Computational Science and Engineering, Spokane, WA, February 25-March 1, 2019. - Vasylkivska, V., Overview of the NRAP-Open-IAM tool for carbon storage (beta release), 2019 Annual NRAP Tool Users Meeting, Pittsburgh, PA, August 27, 2019. - Vasylkivska, V., Bacon, D., Chen, B., Dilmore, R., Harp, D., King, S., Lackey, G., Lindner, E., Liu, G., Mansoor, K. and Zhang, Y., NRAP-Open-IAM: A new, open-source code for integrated assessment of geologic carbon storage containment effectiveness and leakage risk, poster, American Geophysical Union Fall Meeting 2020 (virtual meeting), December 2020. - Vasylkivska, V., NRAP open-source integrated assessment model and relevant application, oral presentation, NRAP workshop "NRAP Tools for Geologic Carbon Storage Risk-Based Decision Making" held in conjunction with Groundwater Protection Council (GWPC) 2021 Annual Forum (virtual meeting), Salt Lake City, UT, September 2021. - Vasylkivska, V., NRAP-Open-IAM: open-source integrated assessment model, digital poster/demonstration, software demonstration session, 2022 Carbon Management Project Review Meeting, August 16, 2022

AoR↗

Robust Machine Learning

UQ4ML is a code repository for a set of tools for the development of robust machine learning methods, uncertainty quantification and explainability of machine learning methods. The goal of these tools is to develop more robust and statistically rigorous machine learning methods for scientific applications. These tools are developed in Python, a high-level programming language that takes advantage of the Python ecosystem of high-quality open-source packages for machine learning.

Oyen, Diane↗

Access Capabilities Through Ccs Communications Protocol (acccs)

AcCCS is a collection of scripts that leverage open-source code, off-the-shelf hardware, and published protocol specifications to create a flexible and inexpensive test and evaluation device for the Electric Vehicle industry. AcCCS is capable of emulating either an Electric Vehicle (EV) or Electric Vehicle Supply Equipment (EVSE). It provides a flexible set of Python scripts to test and evaluate the various communication protocols between the Electric Vehicle Communication Controller (EVCC) and Supply Equipment Communication Controller (SECC). This capability is useful for cybersecurity researchers, automotive OEMs, and EVSE manufactures.

Rohde, KennethW [Idaho National Laboratory (INL), ↗

Demonstration of Optimal Benchmark Selection Website and Validation of the q c Coverage Metric Using HEU-SOL-THERM-013-003 Experiment

In the work documented in this interim report, the experiment selection toolkit web site was demonstrated and q C coverage metric methodology was validated for IEU-MET-FAST-002-001, MIX-COMP-THERM 004-004, and HEU-SOL-THERM-013-003 experiments. 𝑞 𝐶 is an information-theoretic measure based on mutual information that quantifies the ability of candidate benchmark experiments to reduce the bias and uncertainty of a target criticality safety application. The metric and an accompanying open-source Python toolkit with a web-based interface were tested against a benchmark set of 425 experiments drawn from the International Criticality Safety Benchmark Evaluation Project Handbook. The interface is hosted at https://edim.covdef.com. It accepts sensitivity data files produced by the TSUNAMI-IP module of the SCALE code system and supports both (i) deterministic analysis using the ENDF/B-VII.0 covariance library and (ii) stochastic analysis based on user-supplied keff samples. Demonstrations on representative applications across a range of material composition, spectrum, and form show that q C -guided benchmark selection achieves greater uncertainty reduction with fewer experiments and yields more stable posterior bias and uncertainty estimates than traditional similarity coefficient ( c k )–based selection, while also capturing valuable low-ck experiments that one-to-one metrics overlook.

Abdel-khalik, Hany S. [Indiana Univ.-Purdue Univ. ↗

PandAna: A Python Analysis Framework for Scalable High Performance Computing in High Energy Physics

Modern experiments in high energy physics analyze millions of events recorded in particle detectors to select the events of interest and make measurements of physics parameters. These data can often be stored as tabular data in files with detector information and reconstructed quantities. Current techniques for event selection in these files lack the scalability needed for high performance computing environments. We describe our work to develop a high energy physics analysis framework suitable for high performance computing. This new framework utilizes modern tools for reading files and implicit data parallelism. Framework users analyze tabular data using standard, easy-to-use data analysis techniques in Python while the framework handles the file manipulations and parallelism without the user needing advanced experience in parallel programming. In future versions, we hope to provide a framework that can be utilized on a personal computer or a high performance computing cluster with little change to the user code.

Groh, Micah↗