Search NASA⌕ Search

SEARCH · Search NASA

Results for “Python”

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 811 records · Page 45

Computing the Instantaneous Collision Probability between Satellites using Characteristic Function Inversion

The probability that two satellites overlap in space at a specified instant of time is called their instantaneous collision probability. Assuming Gaussian uncertainties and spherical satellites, this probability is the integral of a Gaussian distribution over a sphere. This paper shows how to compute the probability using an established numerical procedure called characteristic function inversion. The collision probability in the short-term encounter scenario is also evaluated with this approach, where the instant at which the probability is computed is the time of closest approach between the objects. Python and R code is provided to evaluate the probability in practice. Overall, the approach has been established for over fifty years, is implemented in existing software, does not rely on analytical approximations, and can be used to evaluate two and three dimensional collision probabilities.

79 ASTRONOMY AND ASTROPHYSICS↗

Homomorphic Encryption for Electrical Metering Aggregation: Protecting the Privacy of Building Tenants

Electrical meters are devices that measure consumer electricity usage. The data collected by these meters is necessary for utility billing and electrical grid management but can also be used to assess the environmental impact of buildings. Prior research has found that unprotected metering data could potentially be used to infer some information about the behaviors of building tenants by detecting changes in electricity usage. For example, a period of low electricity usage could suggest that the tenants are not in the building. As smart metering becomes more common, there is a growing need for data privacy protections for metering data that do not negatively impact the quality and availability of data used for energy management and billing applications. To identify potential solutions, we developed a Python-based data aggregation platform to analyze the potential efficacy of privacy-enhancing technologies for energy metering applications. This platform aggregates groups of metering sites into virtual buildings, which could potentially detach changes in electrical activity from individual tenants, making it more difficult to track the activity of a specific tenant. To further protect data during analysis, this project utilizes homomorphic encryption as part of its initial approach. Homomorphic encryption offers a means of protecting energy consumption data while permitting mathematical operations to be performed without the need to know the data contents. This allows for data to be processed into usable statistics without revealing energy consumption information. A series of homomorphic encryption libraries were evaluated to determine their applicability and limitations in the context of metering data. The use of these techniques may help to reassure consumers and encourage further adoption of smart grid infrastructure.

32 ENERGY CONSERVATION, CONSUMPTION, AND UTILIZATI↗

Integration of Waveform Simulation Methods

The generation of synthetic seismograms through simulation is a fundamental tool of seismology required to run quantitative hypothesis tests. A variety of approaches have been developed throughout the seismological community and each has their own specific user interface based on their implementation. This causes a challenge to researchers who will need to learn new interfaces with each new software they wish to use and create substantial challenges when attempting to compare results from different tools. Here we provide a unified interface that facilitates interoperability amongst several simulation tools through a modern containerized Python package. Further, this package includes post-processing analysis modules designed to facilitate end-to-end analysis of synthetic seismograms. In this report we present the conceptual guidance and an example implementation of the new Waveform Simulation Framework.

58 GEOSCIENCES↗

Automated Calibration System for Beam Current Monitor

The Beam Current Monitor (BCM) measures the instantaneous current in a beam. This work aims to develop an automated calibration system for the BCM to address the need for calibration without interrupting beam operation. We strive to create a synchronous calibration method integrated into the master timeline by utilizing the pulsed nature of synchrotrons to run calibration pulses during inter-pulse gaps. This improvement should enhance operational efficiency, ensure safe operation, and help mitigate beam loss, all by enabling intermittent calibration during the operation of the accelerator. This is accomplished by developing a Python program that interfaces with a Keithley 6221 DC and AC source and a Keithley 2182A Nanovoltmeter. The program configures both of these devices to perform a selected mode of the current sweep, allows for the initiation of the current sweep, collects the measured voltage data from the 2182A, stores the collected data to the computer in a CSV file, and graphs the collected data.

Haller, James↗

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↗

Black Box Equations of State: Creating Semi-analytic Solutions to the Noh Problem and Verifying Equation of State Interfaces

The objective of this report is threefold. First, it details a method for deriving a semi-analytic solution to the Noh Problem when using a “black-box” equation of state. Such capability allows us to perform verification on complicated, more realistic equations of state. Examples include Steinberg equations of state for materials and tabulated equations of state. The second objective is to apply the methodology to verify the singularity-eos equation of state library. We do so by solving the Rankine-Hugoinot jump conditions for the Noh Problem, ensuring singularity derives the correct solution and comparing the error to an exact implementation of the equation of state. The third objective is to perform verification of the xRAGE Eulerian hydrodynamics code when interfaced with singularity. We provide the theory, analysis, documentation for a python implementation of the proposed solver, and verification results.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

Optimizing Batch Crystallization with Model-based Design of Experiments

Poster for Foundations of Computer Aided Process Design (FOCAPD) 2024 describing the formality of model-based design of experiments for batch crystallization. This paper focuses on the implementation of model-based design of experiments for parameter precision, enabled by Pyomo.DoE, a package in Python. Specifically, this work outlines an identifiability analysis for the estimability of the model parameters in a batch crystallization system.

Lynch, Hailey↗

FEM Analysis of Hybrid LTS/HTS Cos-Theta Dipole Magnet

After the recent results on Bi-2212 superconductive magnets realized and tested in canted cosine-theta and solenoid designs, respectively, at Lawrence Berkeley National Laboratory (LBNL) and NHMFL, the first Bi-2212 stress-managed cosine-theta insert magnet is in the assembly phase at Fermilab. This insert will be part of the first hybrid cosine-theta magnet made of Nb3Sn outer layers within the US-MDP effort to reach 20 T bore field. This paper reports the analytical analysis of the cosine-theta Nb3Sn/Bi-2212 hybrid magnet. As an introduction, it shows the validation of the finalized HTS coils' design optimized using the ROXIE code. Subsequently, it reports the parameters, logic, and implementation method of the 2D electromagnetic and mechanical FEM analysis of the LTS/HTS hybrid magnet. Results from the ANSYS detailed model made with sub-modeling geometry are compared with the homogeneous model implemented in the past. Moreover, a Python code was implemented to simulate the current degradation due to stresses in the detail-modeled conductor areas. The current degradation is introduced in the simulation dynamics for both conductors as an iteration process during the energization load step only after applying pre-stress and thermal loads. The numerical and graphic results of the 2D cosine-theta LTS/HTS magnet cross-section will be described and analyzed.

D'Agliano, A.↗

The Foundational Industrial Energy Dataset (FIED): Open-Source Data on Industrial Facilities

The state of data on industrial energy use has co-evolved over several decades with the demands of industrial energy analysis. The most recent development - analysis in support of decarbonizing the industrial sector - has changed the characteristics of industrial data that are useful for analysts and model developers. Although data and its collection processes may be cast from a conventional viewpoint as objective and free from the influence of social dynamics, this provides an incomplete picture of not only the processes by which information is generated, but also the limitations and opportunities of data to be useful for analysis. The foundational industry energy data set (FIED) is a result of the confluence of trends in open data and the demand for higher resolution industrial energy analysis. The general approach to compiling the FIED involves accessing, filtering, and formatting data published by federal organizations on the Internet for public use. Unlike most industrial energy datasets, which are published by the U.S. Energy Information Administration (EIA), the FIED relies on core datasets from the U.S. Environmental Protection Agency (EPA). The FIED addresses several of the areas of growing disconnect between the demands of industrial energy analysis and the state of industrial energy data by providing unit-level characterization - including estimates of energy use, greenhouse gas emissions, and design capacities - for facilities that are identified by latitude and longitude. This enables local-level analysis of existing combustion equipment, as well as regional comparisons with traditional industrial energy data estimates. The report summarizes the general logic behind compiling the FIED. The FIED itself and its Python code are available from OpenEI and GitHub, respectively.

29 ENERGY PLANNING, POLICY, AND ECONOMY↗

Performance Results on CPU/GPU Exascale Architectures for OMEGA: The Ocean Model for E3SM Global Applications

The US Department of Energy (DOE) conducts climate simulations on some of the world’s largest supercomputers. These exascale machines use heterogeneous architectures with both CPUs and GPUs, and scientific codes must adapt to make full use of this computing power. Los Alamos National Lab is developing Omega: The Ocean Model for E3SM Global Applications, which is specifically designed for modern exascale computers. It uses external libraries that have been optimized for a variety of architectures to run on different supercomputers. Omega is an unstructured-mesh ocean model based on TRiSK numerical methods. It will be the new ocean component of the DOE’s Energy Exascale Earth System Model (E3SM). The algorithms in Omega follow those of the current ocean component, MPAS-Ocean, but it will be written in C++ rather than Fortran to take advantage of the Kokkos performance portability library. Omega spatial operators are written as Kokkos kernels to run efficiently on both CPUs and GPUs. Work on Omega began in 2023 with a new C++ framework for unstructured mesh partitioning, halo exchanges, parallel IO, and Kokkos interfaces. The current version, Omega-0, is being developed to solve the shallow water equations and at present includes all of the tendency terms but not time stepping. Here we share the results of Omega-0 verification and performance testing. Verification includes unit tests implemented with CTest as well as convergence tests in Polaris, an in-house python package with a large suite of test problems. Performance tests compare simulations conducted on CPUs versus GPUs and across different architectures: tests are run on Frontier, which has AMD “Optimized 3rd Gen EPYC” CPUs and AMD MI250X GPUs, as well as Perlmutter, which is composed of AMD EPYC 7763 CPUs and NVIDIA A100 GPUs.

58 GEOSCIENCES↗

Improving Self-Driving Labs: Quantifying System-Level Experiment Repeatability and Broadening Instrument-Level Compatibility

Modular Autonomous Research System (MARS) is a self-driving laboratory (SDL) which performs wet-lab science with peptide-lanthanide combinations in an automated and, ultimately, an autonomous manner to aid in soil analysis for domestic lithium mining. Autonomous experimentation involves automated experimentation, experiment planning, and active learning. MARS consists of a 6-axis robotic arm (UR5e) on a linear rail, pipette robots (Opentrons 2), and microplate readers. These components transport, operate on, and collect data with chemical solutions in standard labware. For effective autonomy, MARS must perform system-level labware operations repeatably, plan experiments autonomously, and be portable between research-domains. Repeatability is evaluated by labware placement precision, such that future operations can properly locate labware, as well as the elapsed time, so that low variance mean estimates of experiment duration can inform high-level researcher decision making. Autonomous experiment planning is the next step to decouple experimentation from human management; however, there is a conflict between the ideal system-level experiment goals and the constraints imposed by instruments’ limitations. Sub-domain portability is a long-term goal to extend MARS’ research beyond the chemistry of peptide-lanthanide binding to other sub-domains without having to invest significant overhead to system retrofitting. To address these goals, we manually trained the robotic arm labware placement and modelled statistical failurerate and uncertainty Additionally, we benchmarked the duration and variance of each experiment sub-operation as a heuristic for research decision making. Next, we use a parameterized geometric program (PGP) approach to design experiments that optimize system-level objectives and satisfy instrument-level constraints. Lastly, we proposed a Python framework to maximize MARS’ extensibility to other scientific sub-domains through a JSON-based experiment specification.

36 MATERIALS SCIENCE↗

Efficient Scalable Contact Network Generation from Population Data

Modeling the contacts among a population is critical to understanding the dynamics of a disease outbreak. Contact networks, where nodes are individuals and edges are contacts among them, are used to represent these complex individual-level interactions. In this work, we are given the daily activity schedules of an urban population that represent the activity location and time of individuals in a population during a single twenty four hour period over multiple days. Using collocation to determine contact between individuals, our goal is to extract hourly contact networks from large-scale activity data. We improve upon the existing adjacency matrix-based method by implementing our custom sparse matrix multiplication algorithm. Starting with a Python implementation, we achieve a 1600x speed up in the computation with a fast custom designed sparse matrix multiplier algorithm implemented in the C++ language. This work is central to future parallel designs of the problem.

97 MATHEMATICS AND COMPUTING↗

Improving North American Wildfire Prediction by Integrating a Machine-Learning Fire Model in a Land Surface Model

Wildfires have shown increasing trends in both frequency and severity across the Contiguous United States (CONUS). However, process-based fire models have difficulties in accurately simulating the burned area over the CONUS due to a simplification of the physical process and cannot capture the interplay among fire, ignition, climate, and human activities. The deficiency of burned area simulation deteriorates the description of fire impact on energy balance, water budget, and carbon fluxes in the Earth System Models (ESMs). Alternatively, machine learning (ML) based fire models, which capture statistical relationships between the burned area and environmental factors, have shown promising burned area predictions and corresponding fire impact simulation. We develop a hybrid framework (ML4Fire-XGB) that integrates a pretrained eXtreme Gradient Boosting (XGBoost) wildfire model with the Energy Exascale Earth System Model (E3SM) land model (ELM) version 2.1. A Fortran-C-Python deep learning bridge is adapted to support online communication between ELM and the ML fire model. Specifically, the burned area predicted by the ML-based wildfire model is directly passed to ELM to adjust the carbon pool and vegetation dynamics after disturbance, which are then used as predictors in the ML-based fire model in the next time step. Evaluated against the historical burned area from Global Fire Emissions Database 5 from 2001-2020, the ML4Fire-XGB model outperforms process-based fire models in terms of spatial distribution and seasonal variations. Sensitivity analysis confirms that the ML4Fire-XGB well captures the responses of the burned area to rising temperatures. The ML4Fire-XGB model has proved to be a new tool for studying vegetation-fire interactions, and more importantly, enables seamless exploration of climate-fire feedback, working as an active component in E3SM.

54 ENVIRONMENTAL SCIENCES↗

Advanced Precipitation and Boundary Layer Data Products Derived from ARM Radar Wind Profilers

This research project was successful in delivering on four main objectives. First, software was developed to accurately calculate 915-MHz radar wind profiler (RWP) spectrum moments from the recorded Doppler velocity power spectra. Second, software was developed to calibrate the RWP reflectivity factor using collocated surface disdrometer observations. Third, the Python processing code was documented and given to the ARM Infrastructure to produce ARM ‘b level’ calibrated RWP products. Fourth, calibrated RWP products were uploaded to the ARM Archive as PI Products for 10 years of SGP RWP observations and for GoAmazon and TRACER field campaign RWP observations. In addition to working with RWP observations, this research project also worked with KAZR observations to distinguish insects from boundary layer clouds to help improve the ARSCL cloud mask product. The PI worked with senior and early career ARM funded scientists at BNL exploring how to include calibrated RWP moments into future versions of the ARSCL product.

54 ENVIRONMENTAL SCIENCES↗

Decomposition and Algorithmic Approaches for Solving Large-Scale Process Family Design Problems

Our most recent work expands the water desalination case study from 76 variants to 10,897 variants using the equation-oriented model built in Pyomo as part of the PARETO project. Using the discretization formulation presented in Stinchfield (2024a), rather than solving for all 10,897 variants simultaneously, we decompose the formulation into subproblems containing subsets of variants from the process family. We solve the overall problem with Progressive Hedging (PH) deployed in parallel on a distributed HPC cluster using the open-source Python package mpi-sppy (Knueven et al., 2023). This approach allowed us to solve this process family design problem to ~1.5% relative optimality gap in about 5 hours; in comparison, Gurobi reached ~50% relative optimality gap in about 6 hours (Stinchfield et al., 2024b). However, this approach still requires discretization of the common unit module design ranges; additionally, PH acts as a heuristic for MILP’s with gap-closing capabilities. Ideally, we would not have to use ML surrogates or discretization to solve this problem, instead solving the process family design problem with the equation-oriented model directly to achieve the most accurate results. However, recall that we did not consider solving the MINLP directly due to complexity and size. In this work, we aim to decompose and solve this large-scale MINLP using a Structured Nonlinear Global Optimization algorithm presented by Cao and Zavala (2019).

Stinchfield, Georgia↗

Rattlesnake User's Manual (V.3)

Rattlesnake is a combined-environments, multiple input/multiple output control system for dynamic excitation of structures under test. It provides capabilities to control multiple responses on the part using multiple exciters using various control strategies. Rattlesnake is written in the Python programming language to facilitate multiple input/multiple output vibration research by allowing users to prescribe custom control laws to the controller. Rattlesnake can target multiple hardware devices, or even perform synthetic control to simulate a test virtually. Rattlesnake has been used to execute control problems with up to 200 response channels and 24 shaker drives. This document describes the functionality, architecture, and usage of the Rattlesnake controller to perform combined environments testing.

97 MATHEMATICS AND COMPUTING↗

Life Cycle Analysis of Natural Gas Extraction and Power Generation: U.S. 2020 Emissions Profile

This analysis expands upon previous life cycle analyses (LCAs) of natural gas systems performed by the National Energy Technology Laboratory (NETL). It provides a complete inventory of emissions to air and water, water consumption, and land use change. These environmental burdens are detailed for all supply chain steps from natural gas production through natural gas distribution. This package includes the report, the NETL Natural Gas Model, and appendices that include several Excel workbooks and a python script to provide transparent access to the calculations and resulting data.<p>To access the NETL Natural Gas Lifecycle model, visit https://doi.org/10.18141/2476250.</p><p>To access the 2020 Report Appendices, visit https://doi.org/10.18141/2438472.</p>

03 NATURAL GAS↗

Grid Expansion Optimal Planning Tools (GridEO): Manual for Users and Developers

This report describes Grid Expansion Optimal Planning Tools (GridEO). GridEO is a Python package for electric power grid capacity expansion modeling. With GridEO, the user can build and solve instances of the Capacity Expansion Planning (CEP) problem to determine an optimal plan of investment in capacity of various types of power grid equipment.

24 POWER TRANSMISSION AND DISTRIBUTION↗