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 91 records · Page 5

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

solposx: A Python package for determining solar position and atmospheric refraction

solposx is a Python package of reference algorithms for calculating the sun’s position and atmospheric refraction. The package includes 11 solar position algorithms and 6 refraction models from the past 50 years. All functions follow a standardized design pattern, making it easy to compare different algorithms. The provided algorithm implementations have been thoroughly vetted, making the package a valuable research tool and a reliable reference for implementing solar position algorithms in other programming languages or applications.

Jensen, Adam R. [Technical University of Denmark,

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

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

Combustion-chamber Performance Characteristics of a Python Turbine-propeller Engine Investigated in Altitude Wind Tunnel

Combustion-chamber performance characteristics of a Python turbine-propeller engine were determined from investigation of a complete engine over a range of engine speeds and shaft horsepowers at simulated altitudes. Results indicated the effect of engine operating conditions and altitude on combustion efficiency and combustion-chamber total pressure losses. Performance of this vaporizing type combustion chamber was also compared with several atomizing type combustion chambers. Over the range of test conditions investigated, combustion efficiency varied from approximately 0.95 to 0.99.

COMBUSTION - EFFECT OF ENGINE OPERATING CONDITIONS

Updates on SuZIE and Python

SuZIE and Python are two mature cosmic microwave background (CMB) anisotropy experiments. In this presentation we preview recent oberservations from both experiments.

Cosmology Cosmic Microwave Background: Observation

pyam: Python Implementation of YaM

pyam is a software development framework with tools for facilitating the rapid development of software in a concurrent software development environment. pyam provides solutions for development challenges associated with software reuse, managing multiple software configurations, developing software product lines, and multiple platform development and build management. pyam uses release-early, release-often development cycles to allow developers to integrate their changes incrementally into the system on a continual basis. It facilitates the creation and merging of branches to support the isolated development of immature software to avoid impacting the stability of the development effort. It uses modules and packages to organize and share software across multiple software products, and uses the concepts of link and work modules to reduce sandbox setup times even when the code-base is large. One sidebenefit is the enforcement of a strong module-level encapsulation of a module s functionality and interface. This increases design transparency, system stability, and software reuse. pyam is written in Python and is organized as a set of utilities on top of the open source SVN software version control package. All development software is organized into a collection of modules. pyam packages are defined as sub-collections of the available modules. Developers can set up private sandboxes for module/package development. All module/package development takes place on private SVN branches. High-level pyam commands support the setup, update, and release of modules and packages. Released and pre-built versions of modules are available to developers. Developers can tailor the source/link module mix for their sandboxes so that new sandboxes (even large ones) can be built up easily and quickly by pointing to pre-existing module releases. All inter-module interfaces are publicly exported via links. A minimal, but uniform, convention is used for building modules.

Myint, Steven

Polarbrdf: A General Purpose Python Package for Visualization Quantitative Analysis of Multi-Angular Remote Sensing Measurements

The Bidirectional Reflectance Distribution Function (BRDF) is a fundamental concept for characterizing the reflectance property of a surface, and helps in the analysis of remote sensing data from satellite, airborne and surface platforms. Multi-angular remote sensing measurements are required for the development and evaluation of BRDF models for improved characterization of surface properties. However, multi-angular data and the associated BRDF models are typically multidimensional involving multi-angular and multi-wavelength information. Effective visualization of such complex multidimensional measurements for different wavelength combinations is presently somewhat lacking in the literature, and could serve as a potentially useful research and teaching tool in aiding both interpretation and analysis of BRDF measurements. This article describes a newly developed software package in Python (PolarBRDF) to help visualize and analyze multi-angular data in polar and False Color Composite (FCC) forms. PolarBRDF also includes functionalities for computing important multi-angular reflectance/albedo parameters including spectral albedo, principal plane reflectance and spectral reflectance slope. Application of PolarBRDF is demonstrated using various case studies obtained from airborne multi-angular remote sensing measurements using NASA's Cloud Absorption Radiometer (CAR). Our visualization program also provides functionalities for untangling complex surface/atmosphere features embedded in pixel-based remote sensing measurements, such as the FCC imagery generation of BRDF measurements of grasslands in the presence of wild fire smoke and clouds. Furthermore, PolarBRDF also provides quantitative information of the angular distribution of scattered surface/atmosphere radiation, in the form of relevant BRDF variables such as sunglint, hotspot and scattering statistics.

CAR