Engineering PapersSearch

SEARCH · Engineering Papers

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 37 records · Page 2

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

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

Los Alamos National Laboratory R&D Intern

This report details the responsibilities, outcomes, and project details of a summer R&D internship at Los Alamos National Laboratory (LANL). LANL is a multidisciplinary laboratory that focuses on current cutting-edge research in many fields such as national security, engineering, materials science, computational modeling, and advanced manufacturing. The goal of the internship project was to work with lab engineers and resources to develop an energy absorbing structure for high-velocity impact applications. The successful development of this technology and methodology would not only positively impact future project funding but also contribute to the laboratory's commitment to solve national security challenges through simultaneous excellence. Such devices would also support efforts surrounding the research and development of energy absorbing structures and would provide new vital information backed by experimentation. Different computational and modeling methods were used to design these structures, in addition to qualitative background information provided by past literature. The resultant designs were successfully tested, and the test results were successfully quantified. From these results, new computational methods were developed through python programming and modeling to predict ideal materialistic properties for these structures given a sufficiently defined application.

36 MATERIALS SCIENCE

AutoSAC-Automated Sample Activation Calculation on VULCAN

AutoSAC is an automated python program to conduct sample activation calculation immediately after neutron scattering experiment on VULCAN. AutoSAC takes account of sample dimensions, compositions, forms, sample environments, neutron beam configurations, neutron scattering history, and proton charged resolved beam power etc., and uses a simplified method to rapidly estimate the radioactivity at end of beam or after. It generates a draft report per sample and repository of radioactivity per measurement and provides feedback of current radioactivity and decay time back to a neutron proposal Slack channel to inform users immediately on sample handling. It also utilizes either the sample note field in EPICS or sample composition or thickness correction and takes slack prompt or command to conduct post-beam SAC by demand. The program can be shared to be used in other beamlines at spallation neutron source with modified instrument configurations including instrument specific characteristic beam fluxes.

An, Ke [Oak Ridge National Laboratory (ORNL), Oak

The M-Integral for Computing Stress Intensity Factors in Generally Anisotropic Materials

The objective of this project is to develop and demonstrate a capability for computing stress intensity factors in generally anisotropic materials. These objectives have been met. The primary deliverable of this project is this report and the information it contains. In addition, we have delivered the source code for a subroutine that will compute stress intensity factors for anisotropic materials encoded in both the C and Python programming languages and made available a version of the FRANC3D program that incorporates this subroutine. Single crystal super alloys are commonly used for components in the hot sections of contemporary jet and rocket engines. Because these components have a uniform atomic lattice orientation throughout, they exhibit anisotropic material behavior. This means that stress intensity solutions developed for isotropic materials are not appropriate for the analysis of crack growth in these materials. Until now, a general numerical technique did not exist for computing stress intensity factors of cracks in anisotropic materials and cubic materials in particular. Such a capability was developed during the project and is described and demonstrated herein.

Warzynek, P. A.

Multiscale Simulations of Magnetic Island Coalescence

We describe a new interactive parallel Adaptive Mesh Refinement (AMR) framework written in the Python programming language. This new framework, PyAMR, hides the details of parallel AMR data structures and algorithms (e.g., domain decomposition, grid partition, and inter-process communication), allowing the user to focus on the development of algorithms for advancing the solution of a systems of partial differential equations on a single uniform mesh. We demonstrate the use of PyAMR by simulating the pairwise coalescence of magnetic islands using the resistive Hall MHD equations. Techniques for coupling different physics models on different levels of the AMR grid hierarchy are discussed.

Dorelli, John C.

Utilizing Commercial Hardware and Open Source Computer Vision Software to Perform Motion Capture for Reduced Gravity Flight

Long duration space travel to Mars or to an asteroid will expose astronauts to extended periods of reduced gravity. Since gravity is not present to aid loading, astronauts will use resistive and aerobic exercise regimes for the duration of the space flight to minimize the loss of bone density, muscle mass and aerobic capacity that occurs during exposure to a reduced gravity environment. Unlike the International Space Station (ISS), the area available for an exercise device in the next generation of spacecraft is limited. Therefore, compact resistance exercise device prototypes are being developed. The NASA Digital Astronaut Project (DAP) is supporting the Advanced Exercise Concepts (AEC) Project, Exercise Physiology and Countermeasures (ExPC) project and the National Space Biomedical Research Institute (NSBRI) funded researchers by developing computational models of exercising with these new advanced exercise device concepts. To perform validation of these models and to support the Advanced Exercise Concepts Project, several candidate devices have been flown onboard NASAs Reduced Gravity Aircraft. In terrestrial laboratories, researchers typically have available to them motion capture systems for the measurement of subject kinematics. Onboard the parabolic flight aircraft it is not practical to utilize the traditional motion capture systems due to the large working volume they require and their relatively high replacement cost if damaged. To support measuring kinematics on board parabolic aircraft, a motion capture system is being developed utilizing open source computer vision code with commercial off the shelf (COTS) video camera hardware. While the systems accuracy is lower than lab setups, it provides a means to produce quantitative comparison motion capture kinematic data. Additionally, data such as required exercise volume for small spaces such as the Orion capsule can be determined. METHODS: OpenCV is an open source computer vision library that provides the ability to perform multi-camera 3 dimensional reconstruction. Utilizing OpenCV, via the Python programming language, a set of tools has been developed to perform motion capture in confined spaces using commercial cameras. Four Sony Video Cameras were intrinsically calibrated prior to flight. Intrinsic calibration provides a set of camera specific parameters to remove geometric distortion of the lens and sensor (specific to each individual camera). A set of high contrast markers were placed on the exercising subject (safety also necessitated that they be soft in case they become detached during parabolic flight); small yarn balls were used. Extrinsic calibration, the determination of camera location and orientation parameters, is performed using fixed landmark markers shared by the camera scenes. Additionally a wand calibration, the sweeping of the camera scenes simultaneously, was also performed. Techniques have been developed to perform intrinsic calibration, extrinsic calibration, isolation of the markers in the scene, calculation of marker 2D centroids, and 3D reconstruction from multiple cameras. These methods have been tested in the laboratory side-by-side comparison to a traditional motion capture system and also on a parabolic flight.

Biodynamics

Finite Element Modeling and Analysis of Mars Entry Aeroshell Baseline Concept

The structure that is developed and analyzed in this project must be able to survive all the various load conditions that it will encounter along its course to Mars with the minimal amount of weight and material. At this stage, the goal is to study the capability of the structure using a finite element model (FEM). This FEM is created using a python script, and is numerically solved in Nastran. The purpose of the model is to achieve an optimization of mass given specific constraints on launch and entry. The generation and analysis of the baseline Rigid Mid-Range Lift to Drag Ratio Aeroshell model is a continuation and an improvement on previous work done for the FEM. The model is generated using Python programming with the axisymmetric placement of nodes for beam and shell elements. The shells are assigned a honeycomb sandwich material with an aluminum honeycomb core and composite face sheets, and the beams are assigned the same material as the shell face sheets. There are two load cases assigned to the model: Earth launch and Mars entry. The Earth launch case consists of pressure, gravity, and vibration loads, and the Mars entry case consists of just pressure and gravity loads. The Earth launch case was determined to be the driving case, though the analyses are performed for both cases to ensure the constraints are satisfied. The types of analysis performed with the model are design optimization, statics, buckling, normal modes, and frequency response, the last of which is only for the Earth launch load case. The final results indicated that all of the requirements are satisfied except the thermal limits, which could not yet be tested, and the normal modes for the Mars entry. However, the frequency limits during Mars entry are expected to be much higher than the lower frequency limits set for the analysis. In addition, there are still improvements that can be made in order to reduce the weight while still meeting all requirements.

Ahmed, Samee W.

Infrared Free Space Communication - The Autonomous Testing of Free Space Infrared Communication

Fiber optics has been a winning player in the game of high-speed communication and data transfer in cable connections. Yet, in free space RF has been the repeated choice of communication medium of the space industry. Investigating the benefits of free space optical communication over radio frequency is worthwhile. An increase in science data rate return capabilities could occur if optical communication is implemented. Optical communication systems also provide efficiencies in power, mass, and volume over RF systems1. Optical communication systems have been demonstrated from a satellite in orbit with the moon to earth, and resulted in the highest data rates ever seen through space (622Mbps)2. Because of these benefits, optical communication is far superior to RF. The HiDRA (High Data Rate Architecture) project is researching Passive Misalignment Mitigation of Dynamic Free Apace Optical Communication Links. The goal of this effort is to enable gigabit per second transmission of data in short range dynamic links (less than 100 meters). In practice this would enhance data rates between sites on the International Space Station with minimal size, weight, and power requirements. This paper will focus on an autonomous code and a hardware setup that will be used to fulfill the next step in the research being conducted. The free space optical communications pointing downfalls will be investigated. This was achieved by creating 5 python programs and a top-level code to automate this test.

Heldman, Christopher

Stochastic Reduced Order Models with Python (SROMPy)

Stochastic Reduced Order Models with Python (SROMPy) is a software package developed to enable user-friendly utilization of the stochastic reduced order model (SROM) approach for uncertainty quantification. A SROM is a low dimensional, discrete approximation to a random quantity that enables efficient and non-intrusive stochastic computations. With SROMPy, a user can easily generate a SROM to approximate a random variable or vector described by several different types of probability distributions using the Python programming language. Once a SROM is constructed, the software can be used to propagate uncertainty through a user-defined computational model to estimate statistics of a given quantity of interest. This report is meant to introduce the SROMPy module and brie y demonstrate its capabilities. A simple example of a spring-mass system with a random input is included to illustrate the practicality of the SROM approach to uncertainty quantification and relative ease of applying it with SROMPy. The example includes a comparison with a solution obtained using classical Monte Carlo simulation, demonstrating the similarities and advantages of using the SROM approach.

Warner, James E.

A Modified Algorithm and Open-Source Computational Package for the Determination of Infrared Optical Constants Relevant to Astrophysics

Infrared (IR) telescopes, such as Spitzer and SOFIA, have revealed a rich variety of chemical species trapped in interstellar ices. The most fundamental parameters to be derived from observed IR spectra are the identity and abundance of each component. Several compounds have been conclusively or tentatively identified, but the band strengths and optical constants needed to derive accurate abundances for many of these are poorly constrained. We have developed a modified approach to the extraction of the real and imaginary parts of the refractive index (optical constants) of a thin film from a single transmission spectrum measured in the IR spectral range. Our algorithm is similar to those implemented by previous authors, with some major changes that yield results for strong absorptions where previous approaches fail: (1) an adaptive k-correction step size, (2) the use of a root-finding algorithm to obtain a more accurate k-correction at each iteration, and (3) a k-correction step that prevents non-physical results such as negative n-values that prevent convergence in the calculation algorithm. The algorithm is presented and described, with examples to show agreement with some existing results and improvements upon others. New optical-constants calculations for CH3OH, CO2, N2O, and CH4 are presented, and potential implications for the modeling of interstellar and planetary ice data from space telescopes are discussed. With the objective of being open-source and transparent, the full source code in the free Python programming language is made available along with the compiled version and the laboratory data used to produce the results shown.

Perry A. Gerakines

ANS Winter 2024 Summary: MCCAFE: The Monte Carlo Constructor for ATR Fuel Elements

The Irradiation Experiment Neutronics Analysis Department at Idaho National Laboratory (INL) has implemented a new analysis workflow for experiments in the Advanced Test Reactor (ATR). One key piece of this workflow is the Monte Carlo Constructor for ATR Fuel Elements, or MCCAFE. For each ATR operating cycle, the Reactor and Nuclear Safety Engineering (RNSE) Department first solves the core in eigenvalue mode and depletes the driver fuel materials. In a separate calculation, neutronics analysts model and deplete the materials of one or more irradiation experiments, usually in a series of fixed-source Monte Carlo N-Particle (MCNP) models of the ATR for neutron transport calculations. It was desirable to use the results of the former calculations to inform the models of the latter. MCCAFE is a Python program developed using American Society of Mechanical Engineers Nuclear Quality Assurance-1 procedures at INL. Its purpose is to take the calculated results from the RNSE depletion solutions and the measured or projected operating parameters from the Nuclear Data Management and Analysis System (NDMAS) to generate fixed-source models of the ATR core at given points in time across one or more cycles.

99 - GENERAL AND MISCELLANEOUS

Imagining a Stata / Python Combination

There are occasions when a task is difficult in Stata, but fairly easy in a more general programming language. Python is a popular language for a range of uses. It is easy to use, has many high ]quality packages, and programs can be written relatively quickly. Is there any advantage in combining Stata and Python within a single interface? Stata already offers support for user-written programs, which allow extensive control over calculations, but somewhat less control over graphics. Also, except for specifying output, the user has minimal programmatic control over the user interface. Python can be used in a way that allows more control over the interface and graphics, and in so doing provide a roundabout method for satisfying some user requests (e.g., transparency levels in graphics and the ability to clear the results window). My talk will explore these ideas, present a possible method for combining Stata and Python, and give examples to demonstrate how this combination might be useful.

Fiedler, James

Improving Access to the GEOS Composition Forecast Model with API Development and Ingestion into Google Earth Engine

The GEOS Composition Forecast (GEOS-CF) model produces forecast and historical estimates of atmospheric composition and meteorology fields, which provide useful insight into air quality issues and events. In a year for which Canadian wildfires created adverse air quality conditions in the eastern United States, access to model fields such as PM2.5 are in high demand. The GEOS-CF team at the NASA Global Modeling and Assimilation Office (GMAO) first developed in-house solutions to improve data access via the CF API, and recently partnered with Google to ingest a collated set of model diagnostics into the Google Earth Engine (GEE) data repository. GEOS-CF model output is also being ingested into AWS storage. Creating these various open access points to GEOS-CF model diagnostics provides the public with an opportunity to easily interact with air quality information. Users are able to use a temporally consistent global grid of air quality fields in machine learning applications, mapping tools, and data informatics. Hosting GEOS-CF forecasts and the historical timeseries of these chemistry and meteorology fields in GEE allows users to create dynamic JavaScript-based air quality applications in the GEE code editor. GEOS-CF users can also access the model output via the GEE Python application programming interface (API), making it easy to perform various analyses with Python. This presentation will show two examples of accessing the GEOS-CF model through GEE. The first is an example application made in the GEE code editor which allows users to view time series plots and downscaled maps of surface level NO2. The second example exhibits using the GEE Python API to create a machine learning model to temporally gap-fill between air quality observations. These examples are an introduction to the many possible benefits of having open access to the GEOS-CF model through multiple platforms.

Callum Wayman

Improving Access to the GEOS Composition Forecast Model with API Development and Ingestion into Google Earth Engine

The GEOS Composition Forecast (GEOS-CF) model produces forecast and historical estimates of atmospheric composition and meteorology fields, which provide useful insight into air quality issues and events. In a year for which Canadian wildfires created adverse air quality conditions in the eastern United States, access to model fields such as PM2.5 are in high demand. The GEOS-CF team at the NASA Global Modeling and Assimilation Office (GMAO) first developed in-house solutions to improve data access via the CF API, and recently partnered with Google to ingest a collated set of model diagnostics into the Google Earth Engine (GEE) data repository. GEOS-CF model output is also being ingested into AWS storage. Creating these various open access points to GEOS-CF model diagnostics provides the public with an opportunity to easily interact with air quality information. Users are able to use a temporally consistent global grid of air quality fields in machine learning applications, mapping tools, and data informatics. Hosting GEOS-CF forecasts and the historical timeseries of these chemistry and meteorology fields in GEE allows users to create dynamic JavaScript-based air quality applications in the GEE code editor. GEOS-CF users can also access the model output via the GEE Python application programming interface (API), making it easy to perform various analyses with Python. This presentation will show two examples of accessing the GEOS-CF model through GEE. The first is an example application made in the GEE code editor which allows users to view time series plots and downscaled maps of surface level NO 2 . The second example exhibits using the GEE Python API to create a machine learning model to temporally gap-fill between air quality observations. These examples are an introduction to the many possible benefits of having open access to the GEOS-CF model through multiple platforms.

Callum Wayman

Optimal Electrification Using Renewable Energies: Microgrid Installation Model with Combined Mixture k-Means Clustering Algorithm, Mixed Integer Linear Programming, and Onsset Method

Optimal planning and design of microgrids are priorities in the electrification of off-grid areas. Indeed, in one of the Sustainable Development Goals (SDG 7), the UN recommends universal access to electricity for all at the lowest cost. Several optimization methods with different strategies have been proposed in the literature as ways to achieve this goal. This paper proposes a microgrid installation and planning model based on a combination of several techniques. The programming language Python 3.10 was used in conjunction with machine learning techniques such as unsupervised learning based on K-means clustering and deterministic optimization methods based on mixed linear programming. These methods were complemented by the open-source spatial method for optimal electrification planning: onsset. Four levels of study were carried out. The first level consisted of simulating the model obtained with a cluster, which is considered based on the elbow and k-means clustering method as a case study. The second level involved sizing the microgrid with a capacity of 40 kW and optimizing all the resources available on site. The example of the different resources in the Togo case was considered. At the third level, the work consisted of proposing an optimal connection model for the microgrid based on voltage stability constraints and considering, above all, the capacity limit of the source substation. Finally, the fourth level involved a planning study of electrification strategies based mainly on microgrids according to the study scenario. The results of the first level of study enabled us to obtain an optimal location for the centroid of the cluster under consideration, according to the different load positions of this cluster. Then, the results of the second level of study were used to highlight the optimal resources obtained and proposed by the optimization model formulated based on the various technology costs, such as investment, maintenance, and operating costs, which were based on the technical limits of the various technologies. In these results, solar systems account for 80% of the maximum load considered, compared to 7.5% for wind systems and 12.5% for battery systems. Next, an optimal microgrid connection model was proposed based on the constraints of a voltage stability limit estimated to be 10% of the maximum voltage drop. The results obtained for the third level of study enabled us to present selective results for load nodes in relation to the source station node. Finally, the last results made it possible to plan electrification using different network technologies and systems in the short and long term. The case study of Togo was taken into account. The various results obtained from the different techniques provide the necessary leads for a feasibility study for optimal electrification of off-grid areas using microgrid systems.

24 POWER TRANSMISSION AND DISTRIBUTION

Analysis of Bis(trifluoromethylsulfonyl)imide Interactions with Metal Cations Through a Chemical Informatics Approach

Nominally weakly coordinating anions are useful for modulating the solubility and chemical properties of metal complexes, but identification and analysis of the systematics of the interactions of anions with cationic metal complexes has not received the attention it deserves. Here, a chemical informatics approach is demonstrated for identifying and quantitatively analyzing the ways that the bis(trifluoromethylsulfonyl)imide anion (TFSI) can interact with metal-containing species. An open access computer program (PyCIFTer) was developed to facilitate large-scale structural analysis of TFSI-containing species by utilization of experimental atomic coordinate data from single-crystal X-ray diffraction (XRD) studies obtained from the Cambridge Structural Database (CSD). PyCIFTer establishes a three-dimensional vector space from the raw atomic coordinates, generating acyclic, undirected graphs that are used to rapidly analyze the structural properties (bond lengths and angles) of TFSI in individual structures in sequential/batch fashion. The structures are sorted by PyCIFTer into groups based on pre-set and chemically sensible criteria, affording a comprehensive and systematic view of TFSI structural chemistry. This approach avoids tedious one-at-a-time interrogation of structures, a prospect unreasonable in this case, and many others of contemporary chemical relevance; there were over 1500 structures in the CSD containing TFSI as of November 2024. The results demonstrate that TFSI only rarely binds to cations in the solid state, favoring the formation of species in which TFSI is found in cations’ outer coordination spheres. The prospect of applying PyCIFTer to other moieties is also discussed. PyCIFTer is also schematically compared to the commercial CSD Python application programming interface (API). Taken together, this work demonstrates the usefulness of modular workflows for sequential/batch analysis of structural data from XRD, an approach that appears poised to accelerate the translation of legacy structural results into new chemical insights and hypotheses.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH

End-to-End Workflow for Machine-Learning-Based Qubit Readout With QICK and hls4ml

In this article, we present an end-to-end workflow for superconducting qubit readout that embeds codesigned neural networks into the quantum instrumentation control kit (QICK). Capitalizing on the custom firmware and software of the QICK platform, which is built on Xilinx radiofrequency system-on-chip field-programmable gate arrays (FPGAs), we aim to leverage machine learning (ML) to address critical challenges in qubit readout accuracy and scalability. The workflow utilizes the hls4ml package and employs quantization-aware training to translate ML models into hardware-efficient FPGA implementations via user-friendly Python application programming interfaces. We experimentally demonstrate the design, optimization, and integration of an ML algorithm for single transmon qubit readout, achieving 96% single-shot fidelity with a latency of 32.25 ns and less than 16% FPGA lookup table resource utilization. Our results offer the community an accessible workflow to advance ML-driven readout and adaptive control in quantum information processing applications.

42 ENGINEERING