Search NASA⌕ Search

SEARCH · Search NASA

Results for “Python Programming”

Search indexed NASA NTRS and DOE OSTI research on propulsion, heat transfer, battery materials and energy systems. Follow report and document links to the original sources.

Quote a phrase for an exact phrase match. Source license links do not imply unrestricted reuse.

At least 19 records

INL Senior Project

What did my team set out to accomplish:? Can I put a custom Machine Learning Model on FPGA?? Can I analyze network traffic in real time?? Can a QSFP port be used with an FPGA?? Does a visual representation of the latent space enhance our understanding of network traffic?? What is QSFP QSFP (Quad Small Form-Factor Pluggable)? QSFP supports transfer speeds generally up to 100Gb/s? Runs 4 parallel lines running up to 28 Gb/s? Why the latent space is important to our project ?Latent space is the compressed mapping of data points in a non-linear fashion? Create an understanding of the relationship of data collected? Can represent that relationship of a single network packet in 3 points (X, Y, Z) Project Outline FPGA? Custom Xilinx Petalinux Image for the operating system? Python program to collect packets and run them through the DPU (Data Processing Unit)? The program then sends the information over a socket to a computer? Display Program? Python Program that collects the information sent from the FPGA and display it in a graph

99 GENERAL AND MISCELLANEOUS↗

An Expanded Role for Python in Expediting System Simulation Development

The Python programming language has traditionally been used as a “scripting” language and is not generally recognized as a language for building system simulations, where C++, Java, and other compiled languages are typically used. While very powerful and gaining favor for a large set of programming tasks, Python is generally regarded as not having the speed to directly do the extensive numeric computations required in large-scale simulation. This paper aims to present an approach, supported by case studies, to re-think this assertion. Directly using Python in this new role has the potential to expedite an agile, spiral cycle of development of design-test-modify for systems simulation.

programming language↗

PyOMP: Multithreaded Parallel Programming in Python

We know that Python is a widely used language in scientific computing. When the goal is high performance, however, Python lags far behind low-level languages such as C and Fortran. To support applications that stress performance, Python needs to access the full capabilities of modern CPUs. That means support for parallel multithreading. In this paper, we describe PyOMP, a system that enables OpenMP in Python. Programmers write code in Python with OpenMP, Numba generates code that compiles to LLVM, and the resulting programs run with performance that approaches that from code written with C and OpenMP. In this paper we provide an update on the PyOMP project and explain how to install it and use it to write parallel multithreaded code in Python.

97 MATHEMATICS AND COMPUTING↗

Advancement of the General Aviation Synthesis Program Using Python to Enable Optimization-Based Hybrid-Propulsion Aircraft Design

In support of the Electrified Powertrain Flight Demonstrator and Advanced Air Transport Technologies projects at NASA, a new tool has been developed at NASA’s Ames and Glenn Research Centers to enable coupled engine and airframe optimization and analysis. The new tool combines the engineering-level analysis methods and empirical models of the FORTRAN General Aviation Synthesis Program (GASP) with the Python-based OpenMDAO framework to provide a modular framework for efficient gradient-based optimization with the aim of incorporating new subsystem models for unconventional configurations. The tool has been verified against GASP analyses of several aircraft models and mission formulations. Preliminary efforts have been made to integrate pyCycle, a thermodynamic cycle analysis tool, to enable simultaneous optimization of hybrid propulsion system and vehicle parameters while taking full mission performance and constraints into account. This will improve current capabilities to assess impacts of electrified powertrain technologies on future aircraft designs.

Kenneth R. Lyons↗

Advancement of the General Aviation Synthesis Program Using Python to Enable Optimization-Based Hybrid-Propulsion Aircraft Design

In support of the Electrified Powertrain Flight Demonstrator and Advanced Air Transport Technologies projects at NASA, a new tool has been developed at NASA's Ames and Glenn Research Centers to enable coupled engine and airframe optimization and analysis. The new tool combines the engineering-level analysis methods and empirical models of the FORTRAN General Aviation Synthesis Program (GASP) with the Python-based OpenMDAO framework to provide a modular framework for efficient gradient-based optimization with the aim of incorporating new subsystem models for unconventional configurations. The tool has been verified against GASP analyses of several aircraft models and mission formulations. Preliminary efforts have been made to integrate pyCycle, a thermodynamic cycle analysis tool, to enable simultaneous optimization of hybrid propulsion system and vehicle parameters while taking full mission performance and constraints into account. This will improve current capabilities to assess impacts of electrified powertrain technologies on future aircraft designs.

Kenneth R Lyons↗

Advancement of the General Aviation Synthesis Program Using Python to Enable Optimization-Based Hybrid-Propulsion Aircraft Design

In support of Electrified Powertrain Flight Demonstrator and Advanced Air Transport Technologies programs at NASA, engineers at NASA Ames and NASA Glenn Research Centers have developed a new tool for coupled engine and airframe optimization and analysis. The new tool combines the engineering-level analysis methods of the FORTRAN General Aviation Synthesis Program (GASP) with the OpenMDAO framework to handle highly coupled problems that legacy tools struggle to optimize. The tool has been verified to match GASP with good agreement on a 737 MAX8 baseline vehicle closure problem, and preliminary efforts have been made to integrate the pyCycle thermodynamic cycle analysis tool for electrified engine optimization in the context of a vehicle optimization problem.

Kenneth R. Lyons↗

Demonstration of the On-the-Fly Shielding Analysis Method: Spent Fuel and Waste Disposition

This report documents work performed supporting the US Department of Energy (DOE) Office of Nuclear Energy (NE) Spent Fuel and Waste Disposition (SFWD) Integrated Waste Management activities under work breakdown structure element 1.08.02.04.01, “Data and Tools Development, Validation, and Maintenance.” In particular, this report fulfills milestone M3SF-21OR020401016, “Implement on-the-fly dose analysis methodology in UNF-ST&DARDS” within work package SF-21OR02040101, “Commercial SNF Characterization - ORNL.” The Used Nuclear Fuel - Storage, Transportation & Disposal Analysis Resource and Data System (UNFST& DARDS) enables automated dose rate calculations for spent nuclear fuel (SNF) transportation packages and storage casks using a Monte Carlo radiation transport code. The explicit method uses a detailed model of the SNF system and its contents. Therefore, a dose rate calculation is required for each as-loaded transportation package or storage cask because the SNF assemblies within a canister typically have unique irradiation characteristics. An alternate method, referred to as the “on-the-fly” shielding analysis method, has been proposed that requires only a set of Monte Carlo dose rate calculations for each transportation packaging/storage cask design. The results of the Monte Carlo dose rate calculations are independent of the SNF assembly irradiation and decay characteristics. The dose rate values may then be combined with the radiation source strength of the SNF assemblies associated with a particular transportation packaging/storage cask design to determine actual dose rates. This report presents on-the-fly dose rate calculations for a representative SNF storage cask and verification of the on-the-fly dose rate calculation results by comparison with reference dose rate calculations using the explicit Monte Carlo dose rate calculation. The on-the-fly shielding analysis method was implemented in UNF-ST&DARDS. A Python program was developed to process the MAVRIC dose rate results obtained by source particle type, energy group, and fuel geometry region. A Python processor created binary files, which were saved as a special UNF-ST&DARDS library for on-the- fly shielding analyses. UNF-ST&DARDS uses the precalculated on-the-fly binary libraries generated by the Python data processor and directly executes the Python code for on-the-fly dose analysis. This Python code unzips the pre-generated binary files mentioned above, reads the data, and combines them with user-specified sources for dose and uncertainty calculations. The Python programs were verified using Excel calculations and by comparison with the values obtained with the MAVRIC post-processing utilities applied to the 3dmap files. This method can currently be used to determine dose rates for as-loaded HI-STORM FW storage casks. The UNF-ST&DARDS analysis wizard for on-the-fly shielding analysis is described in this report.

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

Processing Meteorological Data for the CAP-88 PC Model at Los Alamos National Laboratory

The Environmental Protection and Compliance-Compliance Programs (EPC-CP) group at Los Alamos National Laboratory (LANL) uses the Clean Air Act Assessment Package 1988 (CAP-88, Littleton 2020) PC model (Version 4.1) to estimate radiological doses for a set of areal sectors surrounding a release location, in order to satisfy the Environmental Protection Agency (EPA) National Emission Standards for Hazardous Air Pollutants (NESHAP) dose calculation requirement in 40 CFR 61 Subpart H. Among several types of data that must be prepared for CAP-88 input is a text file of meteorological data (“WIND” file), consisting of the joint frequency of wind direction, wind speed, and atmospheric stability categories. EPC-CP produces customized WIND files by running a CAP-88 utility program on a user generated text file of wind data in a different format, known as a STability ARray (STAR) file (Turner, 1964). At LANL, EPC-CP meteorologists prepare customized STAR files with data over desired time periods at selected meteorological towers. A custom program written in Precision Visuals -Workstation Analysis and Visualization Environment (PV-WAVE), a commercial Fortran-like language, is used to read LANL meteorological data and write a STAR file; the executable filename is “Star.out”. However, the outdated PV-WAVE utility program is being phased out by EPC-CP, due to the inefficient process to run it and an inability to modify the code. To preserve the ability to create customized meteorological data for CAP-88 in a way that will be easy to use and maintain, a new replacement utility program, written in the Python programming language, has been developed. The new, improved program reads a data file from any LANL meteorological tower, and at each desired observation time, determines the wind direction, wind speed, and stability categories defined in the CAP-88 documentation. The frequencies of all combinations of the three sets of categories are calculated and written to a file in the STAR format, which can later be converted to a WIND file for input into CAP-88.

54 ENVIRONMENTAL SCIENCES↗

Coffea -- Columnar Object Framework For Effective Analysis

The coffea framework provides a new approach to High-Energy Physics analysis, via columnar operations, that improves time-to-insight, scalability, portability, and reproducibility of analysis. It is implemented with the Python programming language, the scientific python package ecosystem, and commodity big data technologies. To achieve this suite of improvements across many use cases, coffea takes a factorized approach, separating the analysis implementation and data delivery scheme. All analysis operations are implemented using the NumPy or awkward-array packages which are wrapped to yield user code whose purpose is quickly intuited. Various data delivery schemes are wrapped into a common front-end which accepts user inputs and code, and returns user defined outputs. We will discuss our experience in implementing analysis of CMS data using the coffea framework along with a discussion of the user experience and future directions.

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

Oscilloscope Data Push Program

This paper details the development of a Python program designed to automate the data acquisition and conversion for an oscilloscope for the purposes of a one-off/temporary data acquisition system for users that readily need data, and do not have the option of obtaining a Data Acquisition (DAQ) solution. Creating DAQ systems for analyzing a system requires expensive electronics and a dedicated team of engineers for support. Traditionally, manual data collection and processing are time consuming and prone to error. By automating these processes, the cost, efficiency and accuracy of data handling are improved upon. This project involves the creation of a program that interacts with the oscilloscope. During this interaction, there are various functions being performed such as the acquisition of waveform data via floating points, generating plots with the acquired wave points, and storing of floating points in a CSV file format for future reference and plotting purposes. While the initial aim of the project included continuous logging to a cloud database, this was deferred due to time constraints. The results portrayed an almost-instant rate of data collection with a buffer time, showcasing the potential for further integration and real-time data processing.

Osei-Tutu, Jason↗

System and Method for Providing a Climate Data Analytic Services Application Programming Interface

A system, method and computer-readable storage devices for providing a climate data analytic services application programming interface. The system includes a programming library that enables client device software to invoke the capabilities of a climate data analytics system through requests to various services supported by the climate data analytics system, and also includes a client-side communications interface that enables the programming library's methods to interact with a climate data analytics system's server interface to obtain access to the capabilities of the system. In one implementation, the programming library is implemented in the Python programming language. The programming library can include basic utilities that call a single, server-side method implemented by one of the various services supported by the climate data analytics system, and extended utilities that call a series of basic utilities and/or other extended utilities that have been placed under programmatic control in order to create client-side convenience methods and workflows.

Schnase, John L.↗

Data on Cu- and Ni-Si-Mn-rich solute clustering in a neutron irradiated austenitic stainless steel

The data presented in this article is supplementary to the research article “Phase instabilities in austenitic steels during particle bombardment at high and low dose rates” (Levine et al.). Needle-shaped samples were prepared with focused ion beam milling from a 304L stainless steel that was irradiated with fast neutrons (E 0.1 MeV) in the BOR-60 reactor at 318 °C to 47.5 dpa. Atom probe tomography (APT) experiments in voltage mode were then conducted on a Cameca LEAP 5000X HR. Atom position, range, and mass spectrum files after reconstruction with Cameca’s IVAS software are included. Cu- and Ni-Si-Mn-rich solute nanoclusters were identified and analyzed using the Open Source Characterization of APT Reconstructions (OSCAR) program. Python code for OSCAR, information on the program’s underlying algorithm, and sample output files are provided. A proximity histogram of a Ni-Si-Mn-rich cluster and a 1D density/solute concentration profile of a Cu-rich cluster are given to demonstrate OSCAR’s analytical functionalities. The provided APT dataset is valuable for benchmarking phase instabilities in neutron-irradiated austenitic stainless steels that occur at high doses. The OSCAR program can be reused to process other APT data sets where solute nanoclustering is of interest.

42 ENGINEERING↗

A2E2G (Atmosphere to Electrons to the Grid platform) [SWR-23-22]

A2E2G is a platform that integrates 1) forecasting tools to account for weather uncertainty, with 2) aerodynamic wind plant models to account for wake dynamics and wind plant operation, and 3) economic models to advise on operation for a wind power plant that offers grid services in addition to energy. The A2E2G platform can be used as a high-level controller for a wind plant for market participation and real-time wind plant control. The A2E2g platform is a holistic Python tool with modules that can be run to 1) advise on market participation and 2) control and operate a wind power plant in real time. The A2E2g framework assumes two stages: the first stage is in day-ahead and the second stage is in real-time. Managing uncertainty is key in the first stage and managing variability is key in the second stage. The different components have models written and developed in the Python programming language. The code is assembled into a Python package and can be easily downloaded and installed from the A2E2g repository (https://github.com/NREL/a2e2g).

Sinner, Michael↗

Potential Cooling Energy Savings of Economizer Control and Artificial-Neural-Network-Based Air-Handling Unit Discharge Air Temperature Control for Commercial Building

Heating, ventilation, and air-conditioning (HVAC) systems play a significant role in building energy consumption, accounting for around 50% of total energy usage. As a result, it is essential to explore ways to conserve energy and improve HVAC system efficiency. One such solution is the use of economizer controls, which can reduce cooling energy consumption by using the free-cooling effect. However, there are various types of economizer controls available, and their effectiveness may vary depending on the specific climate conditions. To investigate the cooling energy-saving potential of economizer controls, this study employs a dry-bulb temperature-based economizer control approach. The dry-bulb temperature-based control strategy uses the outdoor air temperature as an indicator of whether free cooling can be used instead of mechanical cooling. This study also introduces an artificial neural network (ANN) prediction model to optimize the control of the HVAC system, which can lead to additional cooling energy savings. To develop the ANN prediction model, the EnergyPlus program is used for simulation modeling, and the Python programming language is employed for model development. The results show that implementing a temperature-based economizer control strategy can lead to a reduction of 7.6% in annual cooling energy consumption. Moreover, by employing an ANN-based optimal control of discharge air temperature in air-handling units, an additional 22.1% of cooling energy savings can be achieved. In conclusion, the findings of this study demonstrate that the implementation of economizer controls, especially the dry-bulb temperature-based approach, can be an effective strategy for reducing cooling energy consumption in HVAC systems. Additionally, using ANN prediction models to optimize HVAC system controls can further increase energy savings, resulting in improved energy efficiency and reduced operating costs.

32 ENERGY CONSERVATION, CONSUMPTION, AND UTILIZATI↗

Re-imagining a Stata/Python Combination

At last year's Stata Conference, I presented some ideas for combining Stata and the Python programming language within a single interface. Two methods were presented: in one, Python was used to automate Stata; in the other, Python was used to send simulated keystrokes to the Stata GUI. The first method has the drawback of only working in Windows, and the second can be slow and subject to character input limits. In this presentation, I will demonstrate a method for achieving interaction between Stata and Python that does not suffer these drawbacks, and I will present some examples to show how this interaction can be useful.

Fiedler, James↗

Stata Hybrids: Updates and Ideas

At last year's Stata conference I presented two projects for using Python with Stata: a plugin that embeds the Python programming language within Stata and code for using Stata data sets in Python. In this talk I will describe some small improvements being made to these projects, and I will present other ideas for combining tools with Stata. Some of these ideas use Python, some use JavaScript and a web browser.

Fieldler, James↗

SciPy 1.0: fundamental algorithms for scientific computing in Python

SciPy is an open-source scientific computing library for the Python programming language. Since its initial release in 2001, SciPy has become a de facto standard for leveraging scientific algorithms in Python, with over 600 unique code contributors, thousands of dependent packages, over 100,000 dependent repositories and millions of downloads per year. In this work, we provide an overview of the capabilities and development practices of SciPy 1.0 and highlight some recent technical developments.

97 MATHEMATICS AND COMPUTING↗

Virtual Engineering Software Framework for Integrated Biomass Conversion Modeling

This presentation covers the design and implementation of a software tool to systematically connect computational models of unit operations to simulate an integrated process of low-temperature conversion of biomass to fuel. This virtual engineering (VE) software was designed with the overarching goal of connecting unit models written in various programming languages and requiring different computational resources within a single, flexible framework. The models and features currently considered for the VE library include mechanistic models for pretreatment, enzymatic hydrolysis, and aerobic bioreaction; high-fidelity computational fluid dynamics (CFD) simulations for enzymatic hydrolysis and aerobic bioreaction; and the capability to perform techno-economic analyses (TEA) using Aspen Plus, a commercial software package. The CFD models require access to high-performance computing (HPC) resources, so in addition to handling multiple programming languages and interfaces, the VE software must also be capable of interacting with an HPC scheduler to submit, run, and post-process jobs. Using the Python programming language, a new VE software package has been developed that contains functionality to manage the input-output communication between various unit models, schedule simulations to run on NREL's HPC and analyze those results, and interface with existing TEA software workflows. A Jupyter-notebook GUI was also created to solicit user input and provide documentation. In cases where multiple models for a particular unit-operation exist, selection between models is accomplished through a simple checkbox, with the appropriate inputs and outputs being parsed and converted seamlessly in the background. Each operation makes use of a different programming language, but the flow of information from pretreatment to enzymatic hydrolysis to bioreaction is managed with an intuitive, centralized file-communication strategy. In this talk, the programming approach and implementation details of the notebook are presented for multiple possibilities of the conversion process, including a demonstration of the ability to manage HPC resources. Additionally, an example of a sensitivity study of treatment parameters governing the overall conversion outcome is shown which highlights the ease of defining new problems using the VE Notebook workflow and leads into a discussion of ongoing work to enable outer-loop optimization studies.

biofuel↗