Engineering PapersSearch

SEARCH · Engineering Papers

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 73 records · Page 4

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

Raptor: A Python Library for Porosity Predictions in Additive Manufacturing

Raptor is an efficient Python library for simulating stochastic lack-of-fusion (sLoF) defects in additive manufacturing (AM) processes. These defects arise from stochastic variations in the melt pool boundary leading to undermelting from insufficient overlap between adjacent melt pools or successive layers (Grasso & Colosimo, 2017; Khairallah et al., 2016). Performance variability of AM parts is a pressing challenge in qualification and certification of AM parts; this is in part due to the poorly understood formation rate and statistics of sLoF defects. Raptor is designed to capture the explicit morphologies of sLoF defects and their statistics to accelerate qualification and certification efforts of AM parts in critical applications.

Subraveti, Vamsi [Vanderbilt University]

An Evaluation of Main Content Extraction Libraries in Java and Python

Main content extraction is a method to isolate the relevant content from a webpage and remove extraneous content such as advertisements and sidebars. There are many different Python and Java libraries that attempt to perform main content extraction through various algorithms. Due to the differing structures between web pages, there is no “perfect” way to accomplish this task, motivating an evaluation of different main content extraction libraries.

97 MATHEMATICS AND COMPUTING

Python UQ Workflows Progress [Poster]

Project Overview and Goal: Create a Python Toolkit for UQ (PyTUQ) to facilitate the interoperability of FASTMath UQ tools (Dakota, UQTk, KLPC), as well as other ASCR funded capabilities for UQ workflows.

97 MATHEMATICS AND COMPUTING

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

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

97 MATHEMATICS AND COMPUTING

Documentation for Python Automation in CYME for DER Hosting Capacity Analysis of Different Feeder Configurations

This file provides the documentation for several Python scripts that were developed by Sandia National Laboratories to enhance the automation and customization capabilities for performing various distribution system planning and analysis tasks in CYME. Specifically, these scripts (.py files detailed in Figure 1) enable the user to evaluate different distribution system configurations and the resulting impacts on hosting capacity results and other metrics. In general, these scripts—and the accompanying documentation—provide the foundation upon which future customized tools can be created. For example, the scripts show how to extract and modify parameters of various circuit components, set up and run analyses using built-in CYME tools (iteratively), and export reports for further evaluations and comparisons. Thus, the capabilities and syntaxes used in the scripts can be adapted and leveraged for countless other objectives.

97 MATHEMATICS AND COMPUTING

Peregrine Software Development: Report on the Code Conversion From Python to C++

This work package seeks to convert the Peregrine software tool from its original Python implementation to a production version based on the C++ language. Peregrine is a powerful research platform with a multitude of advanced data analytics and data visualization functionalities. Developed by scientists to explore multimodal and multidimensional data related to the production of components using powder bed additive manufacturing processes, the tool implements state-of-the-art algorithms to assist machine users in making build or part quality determinations. Given that Peregrine is data-intensive, the goal of this conversion is to enhance the tool’s flexibility and interactivity and reduce the number of code dependencies to facilitate its deployment as part of the ongoing technology transfer campaign. This brief document provides an overview of Peregrine’s functionalities and capabilities, along with a detailed description of the core functionalities that have been implemented to date in the new C++ version. This document serves as a development update at the end of the first year of the ongoing conversion and will be regularly updated as progress continues.

97 MATHEMATICS AND COMPUTING

SULI Deliverables Using: Python-B1500 [Slides]

A new electrical setup for testing ECRAM devices is described in this presentation. This presentation details the background of ECRAM devices, how the B1500 is used to program ECRAM devices, and the python GUI that was created for controlling the B1500. ECRAM devices are a form of non-volatile memory. The stored data is the resistance between two of the terminals on the device. Using only the B1500, the ECRAM devices can be programmed and the state read out. This creates a simple, logical testing setup. The overall setup was successful, ECRAM devices could easily be programmed and measured. However, there is still room for improvement. Specifically, in the creation of an automated “Program” feature and a “Data Collection” feature. These features will require additional advances in the understanding of ECRAM devices but will greatly automate and improve the current data collection and application of ECRAM devices.

42 ENGINEERING

De-Risking Exploration for Geothermal Plays in Magmatic Environments Through Open-Source Tools: An Open-Source Python Framework for 2D and 3D Play Fairway Analysis

The De-Risking Exploration for Geothermal Plays in Magmatic Environments (DEEPEN) project seeks to accelerate superhot geothermal development by reducing exploration risk through advanced open-source modeling tools. This work presents a novel Python-based framework, geoPFA, for conducting 2D and 3D play fairway analysis (PFA) tailored to superhot geothermal systems. Building on previous methodologies, the framework integrates thermo-hydro-mechanical-chemical simulation outputs from TReactMech, resulting in improved representation of subsurface properties that are critical to superhot resource producibility. The workflow has been applied to the Nesjavellir field in Iceland, a candidate site for the third Iceland Deep Drilling Project's superhot production scenarios. This application demonstrates the value of modular, transparent, and extensible workflows for integrating geological, geophysical, and simulation-derived datasets in high-enthalpy environments. Preliminary results indicate favorable zones consistent with known hydrothermal activity and suggest possible upflow from the Hengill volcanic system. The geoPFA library is publicly available, offering a scalable and reproducible approach to geothermal exploration across varied geological contexts.

15 GEOTHERMAL ENERGY

geoPFA: A Python-Based Open-Source Software for 3D Geothermal PFA

This work presents a novel Python-based framework, geoPFA, for conducting 3D play fairway analysis (PFA) tailored to superhot geothermal systems. The workflow has been applied to the Nesjavellir field in Iceland, a candidate site for the third Iceland Deep Drilling Project's superhot production scenarios. This application demonstrates the value of modular, transparent, and extensible workflows for integrating geological, geophysical, and simulation-derived datasets in high-enthalpy environments. Preliminary results indicate favorable zones consistent with known hydrothermal activity. The geoPFA library will soon be publicly available, offering a scalable and reproducible approach to geothermal exploration across varied geological contexts.

15 GEOTHERMAL ENERGY

Mahakala: A Python-based Modular Ray-tracing and Radiative Transfer Algorithm for Curved Spacetimes

We introduce Mahakala, a Python-based, modular, radiative ray-tracing code for curved spacetimes. We employ Google's JAX framework for accelerated automatic differentiation, which can efficiently compute Christoffel symbols directly from the metric, allowing the user to easily and quickly simulate photon trajectories through non-Kerr spacetimes. JAX also enables Mahakala to run in parallel on both CPUs and GPUs. Mahakala natively uses the Cartesian Kerr–Schild coordinate system, which avoids numerical issues caused by the pole in spherical coordinate systems. We demonstrate Mahakala's capabilities by simulating 1.3 mm wavelength images (the wavelength of Event Horizon Telescope observations) of general relativistic magnetohydrodynamic simulations of low-accretion rate supermassive black holes. The modular nature of Mahakala allows us to quantitatively explore how different regions of the flow influence different image features. We show that most of the emission seen in 1.3 mm images originates close to the black hole and peaks near the photon orbit. We also quantify the relative contribution of the disk, forward jet, and counterjet to 1.3 mm images.

79 ASTRONOMY AND ASTROPHYSICS

Full-sky Models of Galactic Microwave Emission and Polarization at Subarcminute Scales for the Python Sky Model

Polarized foreground emission from the Galaxy is one of the biggest challenges facing current and upcoming cosmic microwave background (CMB) polarization experiments. We develop new models of polarized Galactic dust and synchrotron emission at CMB frequencies that draw on the latest observational constraints; that employ the “polarization fraction tensor” framework to couple intensity and polarization in a physically motivated way; and that allow for stochastic realizations of small-scale structure at subarcminute angular scales currently unconstrained by full-sky data. We implement these models into the publicly available Python Sky Model (PySM) software and additionally provide PySM interfaces to select models of dust and CO emission from the literature. We characterize the behavior of each model by quantitatively comparing it to observational constraints in both maps and power spectra, demonstrating an overall improvement over previous PySM models. Finally, we synthesize models of the various Galactic foreground components into a coherent suite of three plausible microwave skies that span a range of astrophysical complexity allowed by current data. Author contributions to this paper can be found at the end of this work.

Group, The Pan-Experiment Galactic Science

Smokescreen: A Python package for data vector blinding and encryption in cosmological analyses

Smokescreen is an open-source Python library for data-vector concealment (blinding) in cosmological analyses. Data-vector blinding works by applying cosmology-dependent shifts to the observed data vector, moving it away from the true cosmological signal without affecting its statistical properties, so that analysts cannot infer the true result until the analysis is frozen and the blinding is lifted. The package computes these shifts using Firecrown likelihoods applied to data vectors stored in the SACC format, ensuring that the theoretical model used for blinding is identical to that used for inference whilst remaining agnostic to the specific observable being blinded. To prevent accidental unblinding, the original SACC file, containing the true cosmology, is encrypted. Although developed for the Vera C. Rubin Observatory Legacy Survey of Space and Time (LSST), Smokescreen is applicable to any experiment using Firecrown likelihoods and the SACC data format.

Loureiro, Arthur [Stockholm U., OKC; Imperial Coll

PV Systems Modelling with Python

PVSC tutorial demonstrating how to download irradiance data and sun position for a specific location, determine the orientation of a single-axis tracker system, calculate Plane of Array irradiance, and estimate the power output of a PV system.

14 SOLAR ENERGY

MontePy: a Python library for reading, editing, and writing MCNP input files.

The Monte Carlo N-Particle (MCNP) radiation transport code is a highly capable and accurate code with a long legacy. MCNP uses the Monte Carlo simulation process to simulate the path of particles (e.g., neutrons, photons, charged particles, etc.), and their interaction with materials. It is widely used in nuclear engineering, high-energy physics, and other fields. Its origins in the mid-twentieth century predate many modern software conventions. MCNP users provide an input file to MCNP, which it then uses to create an internal representation of the simulation problem. These input files originally had to be stored as punchcard decks, and the user manual still uses the terminology of cards and decks, despite moving beyond punchcards. MCNP predates nearly all modern human readable markup or data serialization languages, such as the extensible Markup Language (XML), the Standard Generalized Markup Language (SGML), YAML (YAML Ain’t Markup Language), and Javascript Object Notation (JSON). Due to this, MCNP uses an entirely custom defined syntax language for its input, making off-the-shelf libraries for XML, YAML, and JSON impossible to use for scripting various operations on MCNP input files (Kulesza et al., 2022).

97 - MATHEMATICS AND COMPUTING

Integration of a grey-box refrigerated case model in EnergyPlus via Python plugin

Commercial buildings, in particular grocery stores (due mainly to their large refrigeration load), provide opportunities for energy cost reductions. Grocery stores could offer substantial load flexibility to the power grid through participation in demand response programs because of their usage patterns and relatively high energy intensity. This load flexibility could come from modifying the control of heating, ventilation, and air conditioning (HVAC) systems, refrigeration systems, or both. Although estimation of the HVAC system’s load flexibility potential is relatively targeted in the literature, estimating load flexibility of refrigeration systems is nascent and has been a challenge, in part because of the lack of proper simulation tools that capture the dynamics in the refrigeration cases. The existing refrigerated case model within EnergyPlus, a whole building energy simulation program, assumes a constant case temperature throughout the simulation period and does not explicitly model the cycling of the compressor serving the refrigerated case. In addition, it does not encompass modeling of temperatures of the product inside the refrigerated case. This difference between modeled and actual operation can be a barrier to the development of demand control algorithm and accurate analysis of load flexibility potential. In this paper, we present a grey-box model for modeling refrigerated cases in grocery stores, which include medium temperature and low temperature. Four cases are modeled; two are low-temperature closed cases and two are medium-temperature cases with one closed and one open. Data from an experimental facility are used to train and test the models. Results demonstrate the efficacy of the grey-box models in predicting the temperatures. This model is integrated into EnergyPlus to capture the dynamic effects of case temperature on the environment and enhance the calculation of sensible and latent heat exchange with the environment (case credits). These enhancements can be leveraged more broadly to model advanced refrigeration controls such as defrost, develop and test unique algorithms that could affect refrigeration interactions with HVAC, and refine store design for any commercial building with refrigeration.

29 ENERGY PLANNING, POLICY, AND ECONOMY