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 19 records

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

pvplr-python: Python package implementation of PVplr for Performance Loss Rate (PLR) analysis

Due to software fragmentation, PV system modeling teams can be limited to language specific packages, preventing cross-sectional analysis of different modeling techniques and workflows. To this end, PVplr, a popular PV performance modeling R software package, has been ported to the Python programming language. To verify and test the robustness of the port, NSRDB data has been used to simulated PV installations at native resolution (~2 million Sites), with a variety of degradation rates, degradation patterns, and modules. Performance Ratios were calculated using the ported functions from pvplr-python and compared against Rdtools YoY values. Due to the complicated nature of degradation, a new metric has been proposed to quantify the performance loss of a system. The cumulative production loss, is the total amount of energy lost due to the degrading performance of the system. Cumulative production loss alleviates the problems with fitting linear functions to non-linear degradation. Cumulative Production loss was shown to better estimate the total lost revenue for non-linear degradation patterns. $XbX + UTC$ was found to most accurately predict the total lost revenue in simulated systems.

Kumar, Suraj

Oscilloscope Data Push Program

Data acquisition (DAQ) is a complex and costly process. Creating DAQ systems for analyzing a system requires expensive electronics and a dedicated team of engineers for support, posing a challenge for users who readily need data. This project is a proof of concept to create a temporary or one-off DAQ system using equipment commonly available to every team. We aim to automate the data acquisition process from the Rohde \& Schwarz RTO 1044 oscilloscope, convert the acquired binary data into floating point values, and store the results in a CSV file format. By developing a Python program to handle these tasks, we seek to reduce the manual effort involved in data collection, significantly increasing efficiency.

Osei-Tutu, Jason

Control And Optimization Modular Modeling Application For Nuclear Deployment

The purpose of the COMMAND code is to provide a flexible, scalable tool for use in developing, integrating, and testing the technologies necessary for achieving autonomous operations of advanced nuclear reactors. The code enables users to efficiently implement custom simulations and experiments by combining key methods from different software modules. These modules are focused on: modeling and simulation tools, such as nuclear simulation tools used for high-fidelity modeling (e.g., Reactor Excursion and Leak Analysis Program [RELAP5-3D] and Monte Carlo N-Particle [MCNP]); machine learning and optimization tools (e.g., anomaly detection and data-driven modeling techniques); advanced control in its digital, high-performance, and supervisory control forms (e.g., proportional integral derivative (PID) control and model predictive control (MPC); and integration with hardware through industrial communication protocols. To ensure flexibility and scalability, COMMAND was designed to be both modular—the software “pieces” all inherit from generic building blocks and can be combined and connected to create complicated simulations—and high performing—designed for parallel processing, enabling simulations and experiments to take advantage of multi-core computers, servers, and nodes. The code is written in the Python programming language due to the language's popularity, active community, and open-source and cross-platform nature. Maintaining consistency with other simulation tools used within the nuclear energy community, users implement simulations and experiments through text input files, which define components, parameters, connections, etc., through lines of text. Given that COMMAND is written in Python, these input files are native Python scripts, and so use the standard Python structure and formatting. This also enables users to take advantage of Python's extensive package library to develop custom capabilities for their specific use cases.

Faber, Jacob [Idaho National Laboratory (INL), Ida

Development and validation of a software for simulating γ-γ coincidence emission and detection probabilities

Gamma-gamma coincidence spectrometers have the potential to significantly enhance detection sensitivity for ultra-trace radionuclide measurements. The implementation of these spectrometers, however, is limited by the complexity of acquisition hardware, data processing and quantification. This work reports development of a novel radionuclide quantification software for γ-γ coincidence measurements. For any radionuclide, the software parses the Evaluated Nuclear Structure Data File (ENSDF) database, recursively simulating all possible γ-γ coincidence signatures and their respective emission and detection probabilities. Implemented using Python programming language, the software employs several strategies to boost overall computational performance. Since coincidence-based spectrometers are of notable interest in monitoring compliance for the Comprehensive Nuclear-Test-Ban Treaty (CTBT), the software’s execution was tested for 84 CTBT-relevant radionuclides. To date, the software has been experimentally validated for 15 radionuclides using the Advanced Radionuclide Gamma spectrOmeter (ARGO) at Pacific Northwest National Laboratory, USA (PNNL). Notably, the software can be operated in convergence mode, whereby coincidence detection efficiency’s convergence behavior can help avoid unreliable radionuclide activity estimates. With growing number of coincidence spectrometers worldwide, this paper aims to assist the radiation metrology community in developing similar software for their system.

46 INSTRUMENTATION RELATED TO NUCLEAR SCIENCE AND

Robust Automatic EXAFS First-Shell Fits

Extended X-ray absorption fine structure (EXAFS) is a widely used technique for atomic structure determination. Fourier transformation connects EXAFS in k space and R space. However, determining the appropriate k-range for the transformation can be challenging, but critical for the first-shell fit. In this study, we present an automatic method to determine the k-range using the Larch package and a Python program. The first step is to estimate spectral noise across a series of k-ranges with a fixed minimum value and identify the optimal maximum value in the k-range (k max ). The k max is determined by an empirical noise threshold that marks the point where the noise level in the Fourier transformed spectrum changes dramatically. Using the obtained k max value, the first shell is modeled to determine the minimum k value (k min ) by optimizing the background function through alignment of the spectrum with theory. The optimal k min corresponds to the point of the minimum R-factor, which quantifies the difference between the experimental and fitted spectrum. Our method was tested on various typical datasets and yielded suitable k-ranges for Fourier transformation and accurate first-shell fits. This approach helps avoid unreliable, irreproducible data analysis, especially for noisy data from diluted samples, and enables robust automatic first-shell EXAFS fitting.

EXAFS analysis

Python Measurement-Informed Modelling Method (PythonMIMM) v1.02

This Python program implements the calculations for electrical energy efficiency and electrical losses in the paper "Energy and power quality measurement for electrical distribution in AC and DC microgrid buildings" (https://www.sciencedirect.com/science/article/abs/pii/S0306261921015658). The inputs are metered voltage, current, or power data of meters located throughout the DC system. In the absence of metered data, the user must input some other information about the building such as the types of power converters or wire lengths. The program will build a loss model of the DC system based on metered data and electrical information. It will also generate an equivalent AC system and determine the losses and efficiency.

Gerber, Daniel [Lawrence Berkeley National Laborat

pymcnp v1

This is a software package that makes it easier to handle MCNP, a neutron transport simulation toolkit, simulations. It helps with reading and writing output from MCNP and modifying the input files programmatically. Furthermore, it also allows the visualization of input geometry and of the results. Pymcnp provides access to these features using the Python programming language.

Persaud, Arun

PYDICE

A new Python program has been created that calculates similarity metrics (E, ck), available as a web server. Users can post one or more Sensitivity Data Files (SDFs) to either calculate similarity metrics (returned as a JSON response packet) or to be converted into a different SDF format (returned as a zip file).

Holcomb, Andrew [Oak Ridge National Laboratory (OR

pyTCR: A tropical cyclone rainfall model for python

pyTCR is a climatology software package developed in the Python programming language. It integrates the capabilities of several legacy physical models and increases computational efficiency to allow rapid estimation of tropical cyclone (TC) rainfall consistent with the large-scale environment. Specifically, pyTCR implements a horizontally distributed and vertically integrated model [Zhu et al., 2013] for simulating rainfall driven by TCs. Along storm tracks, rainfall is estimated by computing the cross-boundary-layer, upward water vapor transport caused by different mechanisms including frictional convergence, vortex stretching, large-scale baroclinic effect (i.e., wind shear), topographic forcing, and radiative cooling [Lu et al., 2018]. The package provides essential functionalities for modeling and interpreting spatio-temporal TC rainfall data. pyTCR requires a limited number of model input parameters, making it a convenient and useful tool for analyzing rainfall mechanisms driven by TCs. To sample rare (most intense) rainfall events that are often of great societal interest, pyTCR adapts and leverages outputs from a statistical-dynamical TC downscaling model [Lin et al., 2023] capable of rapidly generating a large number of synthetic TCs given a certain climate. As a result, pyTCR significantly reduces computational effort and improves the efficiency in capturing extreme TC rainfall events at the tail of the distributions from limited datasets. Furthermore, the TC downscaling model is forced entirely by large-scale environmental conditions from reanalysis data or coupled General Circulation Models (GCMs), simplifying the projection of TC-induced rainfall and wind speed under future climate using pyTCR. Finally, pyTCR can be coupled with hydrological and wind models to assess risks associated with independent and compound events (e.g., storm surges and freshwater flooding).

54 ENVIRONMENTAL SCIENCES

PyDislocDyn: A Python code for calculating dislocation drag and other crystal properties

PyDislocDyn is a suite of python programs designed to perform various calculations for dislocation dynamics in the continuum limit. In particular, one of its main purposes is to calculate dislocation drag from phonon wind. Additional features include the averaging of elastic constants for polycrystals, the calculation of the dislocation field including its limiting velocities, and the calculation of dislocation self-energy and line tension.

36 MATERIALS SCIENCE

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

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

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