Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “Python codes”

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 523 records · Page 29

BUTTER-Clarifier [SWR-23-61]

This repository contains a python package of neural network interpretability techniques (interpretability) and a keras callback to easily compute and capture data related to these techniques (values metrics) during training. It was developed to be used with NREL's BUTTER Deep Learning Experimental Framework, but does not depend on this framework and may be useful to projects outside of this framework. The vision for this codebase is to collect algorithms for explainable artificial intelligence (XAI) in a single framework that is easy to use, easy to read, and can be expand upon. Here, we package XAI algorithms into a module called "metrics", which are implemented as python functions. The return type of a metric is typically a dictionary holding data of multiple data types, such as real values and numpy matrices. Callbacks and any other connector code is provided as necessary in a separate module to make these metrics more easily usable. This project depends on Tensorflow's Keras API, although it would be nice to try and support multiple backends one day. Related to: https://github.com/NREL/BUTTER-Empirical-Deep-Learning-Experimental-Framework

Perr-Sauer, Jordan↗

EGS Collab Experiment 2: Continuous Broadband Seismic Waveform Data

Two broadband seismometers were installed on the 4100 level and recorded for the duration of EGS Collab Experiment #2. Inspired by published data from similar instruments installed in the Aspo Hard Rock Lab, these long-period instruments aimed to measure the tilting of the drift in response to the injection of fluid into the testbed. One instrument was installed underneath the wellheads in Site A (aka the "battery" alcove) and the other was installed along the east wall of the drift, south of Site B. Due to the feet of gravel (ballast) laid along the floor of the drift, we were unable to anchor the sensors directly to the rock. As a result, the coupling of the sensors to the experiment rock volume is likely poor. In addition, there are a number of noise sources that complicate the interpretation of the data. For example, sensor BBB is installed adjacent (within 3 ft) to the rail line that runs towards the Ross shaft. Trains (motors) run along this line almost daily and produce a large signal in these data. Careful extraction of periods of interest, as well as filtering for specific signals, is necessary. The sensors are Nanometrics Trillium Compact Posthole seismometers, sensitive down to 120 seconds period. They were installed as close to the drift wall and as deep as we could manually excavate (only about 1 ft or so). The holes were leveled with sand and the sensors were placed on a paver before backfilling with sand. The hole was then covered by a bucket filled with insulation to improve the sensor's isolation from daily temperature variations, which are minor but present due to drift ventilation from the surface. Data were recorded on Nanometrics Centaur digitizers at 100 Hz. The full response information is available in the StationXML file provided here, or by querying the sensors through the IRIS DMC (see links below). These instruments were provided free of charge through the IRIS PASSCAL instrument center. The network code is XP and the station codes are BBA and BBB. The waveform data can be queried through the IRIS FDSN server using any method the user likes. One convenient option is to use the Obspy python package: https://docs.obspy.org/packages/obspy.clients.fdsn.html

15 GEOTHERMAL ENERGY↗

Co-Design of Marine Energy Converters for Autonomous Underwater Vehicle Docking and Recharging - Software and Data

Software and testing data from the OH Hinsdale Wave lab for DOE-funded project on Co-Design of Marine Energy Converters for Autonomous Underwater Vehicle Docking and Recharging. This project will perform foundational research and testing to accelerate the sector-wide development and deployment of marine energy converters to provide Power-At-Sea. Specifically, we seek to overcome known challenges and knowledge gaps for the successful co-design of coupled Wave Energy Converter (WEC)-Autonomous Underwater Vehicles (AUV) systems; systems designed and tested for WEC array system health and environmental monitoring applications. This project brings together an experienced, multi-institution, and multi-disciplinary team to focus on the co-design of marine energy (ME) technologies and AUV docking systems, including multi-body hydrodynamic modeling, active control, autonomy, and hardware interfaces necessary to enable new WEC-focused understanding, and allow for robust and ubiquitous AUV docking and recharging in real-world conditions.

16 TIDAL AND WAVE POWER↗

Model data for numerical evaluation of photosensitive tracers as a strategy for separating surface and subsurface transient storage in streams

This model-data archive pertains to a study aimed at the numerical evaluation of the photosensitive tracers as a potential strategy for separating the effects of surface and hyporheic storage zones (SSZs and HSZs, respectively). Separating effects of SSZ and HSZ are important for accurately representing stream function as HSZs and SSZs expose solutes to significantly different biogeochemical conditions. We perform numerical experiments using a multiscale reactive transport model for stream corridors implemented in ATS code, which allows for representing multiple storage zones with their respective travel time distributions and biogeochemistry. For each of the numerical experiment, we provide in this model-data archive python wrapper to drive ATS (forward_model.py), synthetic observation (synthetic_btc.py, BTC_observed.csv), forward model files including ATS input (multiscale_transport.tpl), PFLOTRAN inputs (reactions_channel.tpl, reactions_hz.tpl, reactions_sz.tpl), MCMC (mcmc_run.py), predictive uncertainty (pred_uncert.py, BTCs_simulated_day.csv, BTCs_simulated_night.csv), MCMC outputs (tracer_test_GR.npy, tracer_test_logps.npy, tracer_test_parameters.npy) and Jupyter notebook for post-processing and visualization (post-processing.ipynb). For the denitrification application, ATS input file (denitrification_multisubgrid.tpl), PFLOTRAN input files (denitrification_channel.in, denitrification_hz.in), predictive uncertainty (pred_uncert_denitrification.py, BTCs_simulated_DO.csv, BTCs_simulated_DOC.csv, BTCs_simulated_Nitrate.csv).

54 ENVIRONMENTAL SCIENCES↗

ZMPY3D: accelerating protein structure volume analysis through vectorized 3D Zernike moments and Python-based GPU integration

Abstract Motivation Volumetric 3D object analyses are being applied in research fields such as structural bioinformatics, biophysics, and structural biology, with potential integration of artificial intelligence/machine learning (AI/ML) techniques. One such method, 3D Zernike moments, has proven valuable in analyzing protein structures (e.g., protein fold classification, protein–protein interaction analysis, and molecular dynamics simulations). Their compactness and efficiency make them amenable to large-scale analyses. Established methods for deriving 3D Zernike moments, however, can be inefficient, particularly when higher order terms are required, hindering broader applications. As the volume of experimental and computationally-predicted protein structure information continues to increase, structural biology has become a “big data” science requiring more efficient analysis tools. Results This application note presents a Python-based software package, ZMPY3D, to accelerate computation of 3D Zernike moments by vectorizing the mathematical formulae and using graphical processing units (GPUs). The package offers popular GPU-supported libraries such as CuPy and TensorFlow together with NumPy implementations, aiming to improve computational efficiency, adaptability, and flexibility in future algorithm development. The ZMPY3D package can be installed via PyPI, and the source code is available from GitHub. Volumetric-based protein 3D structural similarity scores and transform matrix of superposition functionalities have both been implemented, creating a powerful computational tool that will allow the research community to amalgamate 3D Zernike moments with existing AI/ML tools, to advance research and education in protein structure bioinformatics. Availability and implementation ZMPY3D, implemented in Python, is available on GitHub (https://github.com/tawssie/ZMPY3D) and PyPI, released under the GPL License.

Lai, Jhih-Siang (ORCID:0000000156775890)↗

fmdtools Tutorial: Intro to Resilience Modelling, Simulation, and Visualization in Python With fmdtools

This workshop will cover the basics of using the fmdtools package for the simulation of hazardous scenarios for resilience simulation. The fmdtools simulation package is an open-source python toolkit for simulating the dynamic response of a system to internal and externally-driven hazardous scenarios, including faults and environmental conditions, that can be used to analyze the risks related to these hazards. Prior to the development of fmdtools, researchers had to either adapt an (often limited) propriety toolkit or develop their own design/simulation/analysis codes to develop their models of hazardous events, a significant technical burden to both (1) leveraging resilience modeling methodologies and (2) extending these methodologies with their own contributions. The fmdtools package provides a number of model constructs and simulation and analysis methods to enable the designer to focus to solely on their modeling case-study while still enabling a significant degree of model expressiveness and adaptability via Python-based model definition. This tutorial will present the setup of fmdtools and a high-level overview of its use, as well as some simple examples for understanding how to leverage its modelling, simulation, and analysis capabilities. Familiarity with jupyter notebook and basic python will be assumed.

Daniel Hulse↗

Full spectrum optical constant interface to the Materials Project

Optical constants characterize the interaction of materials with light and are important properties in material design. Here we present a Python-based Corvus workflow for simulations of full spectrum optical constants from the visible and ultraviolet to hard x-ray wavelengths based on the real-space Green’s function code FEFF10 and structural data from the Materials Project (MP). The Corvus workflow manager and its associated tools provide an interface to FEFF10 and the MP database. The workflow parallelizes the FEFF computations of optical constants over all absorption edges for each material in the MP database specified by a unique MP-ID. The workflow tools determine the distribution of computational resources needed for that case. Similarly, the optical constants for selected sets of materials can be computed in a single-shot. Additionally, to illustrate the approach, we present results for several elemental solids in the periodic table, as well as a sample compound, and compare our predictions with experimental results. In addition, we provide a database of calculated results for all elements for which there is a stable elemental solid at standard conditions available in the Materials Project database. As in x-ray absorption spectra, these results are interpreted in terms of an atomic-like background and fine-structure contributions.

36 MATERIALS SCIENCE↗

MechElastic: A Python library for analysis of mechanical and elastic properties of bulk and 2D materials

We report the MechElastic Python package evaluates the mechanical and elastic properties of bulk and 2D materials using the elastic coefficient matrix ( C ij ) obtained from any ab-initio density-functional theory (DFT) code. The current version of this package reads the output of VASP, ABINIT, and Quantum Espresso codes (but it can be easily generalized to any other DFT code) and performs the appropriate post-processing of elastic constants as per the requirement of the user. This program can also detect the input structure's crystal symmetry and test the mechanical stability of all crystal classes using the Born-Huang criteria. Various useful material-specific properties such as elastic moduli, longitudinal and transverse elastic wave velocities, Debye temperature, elastic anisotropy, 2D layer modulus, hardness, Pugh's ratio, Cauchy's pressure, Kleinman's parameter, and Lame's coefficients, can be estimated using this program. Another existing feature of this program is to employ the ELATE package (2016) [29] and plot the spatial variation of several elastic properties such as Poisson's ratio, linear compressibility, shear modulus, and Young's modulus in three dimensions. Further, the MechElastic package can plot the equation of state (EOS) curves for energy and pressure for a variety of EOS models such as Murnaghan, Birch, Birch-Murnaghan, and Vinet, by reading the inputted energy/pressure versus volume data obtained via numerical calculations or experiments. This package is particularly useful for the high-throughput analysis of elastic and mechanical properties of materials.

2D materials↗

pystorms: A simulation sandbox for the development and evaluation of stormwater control algorithms

Advances in cyber–physical technologies have enabled real-time sensing and adaptive control of stormwater infrastructure. These smart stormwater systems allow for inexpensive, minimally-invasive stormwater control interventions in lieu of new construction. Importantly, however promising the area of smart stormwater control, there still remain barriers – for experts and novices alike – to access shared tools and methods for investigating, developing, and contributing to it. In an effort to make smart stormwater control research more methodical and accessible, we present pystorms, an open-source Python-based simulation sandbox that facilitates the quantitative evaluation and comparison of control strategies. pystorms consists of a collection of real world-inspired smart stormwater control scenarios on which any number of control strategies can be applied and tested via an accompanying Python programming interface and coupled stormwater simulator. pystorms provides a framework for the rigorous and efficient evaluation of smart stormwater control methodologies across diverse watersheds with only a few lines of code.

54 ENVIRONMENTAL SCIENCES↗

PyFloT v0.1

PyFlot is a combination of python and C++ which aims at tuning floating point precision inside scientific applications. PyFloT uses link time interposition for portability and generality. The set of functions of interest are wrapped with code that enables either profiling or their lowering based on the classification criteria: SLOC (Source code LOCation) or backtrace. PyFloT implementation has only be validated using the GNU compiler toolchain.

Brunie, Hugo↗

Framework For Performing Time-dependent Pebble Bed Reactor Simulations

The present work details the creation of a high-fidelity Monte Carlo methodology for analyzing the run-in and subsequent approach to equilibrium for PBRs. The methodology entails a Python module wrapped around Serpent so as to perform neutronics calculations, move pebbles, refuel the core, and discharge pebbles, thereby modeling the explicit behavior of the PBR run-in. The code kugelpy is within the GitHub repository `pyrates`.

Stewart, RyanH. [Idaho National Laboratory (INL), ↗

Sensitivity Analysis of Drivers Water Shortage in the Los Angeles Region During Drought

The code and detailed step-by-step instructions for generating the model output data, processing results, and analysis and plotting are provided at https://github.com/IMMM-SFA/Ferencz_et_al_2026_ER_Water. The PyArtes model is a python adaptation of the Artes model. PyArtes uses many of the same input data and optimization model architecture as Artes. Documentation for the PyArtes model is provided in the Supplement to the paper. The primary data product are simulated monthly water shortages for indoor and outdoor demand under a large ensemble of drought scenarios (>13,000). The droughts are hypothetical and are not based on historical time series data of supply sources - though historical data did help inform ranges explored for supply parameters. Demands are informed by recent 2017-2021 water supply data. Demands used for the model can be accessed at https://github.com/IMMM-SFA/Ferencz_et_al_2026_ER_Water. Simulations resolve demand for over 90 water providers in the study region. The results report 36 months of water shortage data for each indoor and outdoor demand node. The study also developed a multilayer perceptron (MLP) neural network trained on a subset of the simulated shortage ensemble to emulate worst annual water shortage for a given set of parameter multipliers -- provided the parameter values fall within the ranges sampled in the ensemble. Emulated water shortages for synthetic ensembles are in the MLP-generated shortages folder. The MLP model was used to generate larger ensembles to support Sobol analysis that would have been extremely computationally expensive to simulate. Datasets provided in this repository*: Simulated shortages. These results are used for the analysis for Figures 5, 8, and 9 in the paper, and also to train the MLP emulator. .zip file containing outputs for the 13,312 scenario ensemble. Separate .csv files for indoor and outdoor shortage for each scenario. Rows = demand ids (~100), Columns = months (36) Units = acre-feet/month of shortage (shortage = monthly demand - supply). 1 acft = 1233.48 m^3 .csv files of aggregated shortages derived from the 13,312 ensemble Rows = scenarios (13,312), Columns = demand ids (~100) Units = acre-feet/year (either worst annual shortage or total shortage over the 3-year drought) .csv file of the parameter multipliers scenarios for the ensemble .csv file of the parameter ranges and baseline values the multipliers were applied to MLP-generated shortages. These results are used for Figures 4, 6, and 7 in the paper. mwd higher folder: scenario ensembles, emulated worst year total shortages (acft), and Sobol results Emulated shortages. Rows = scenarios, columns = demand ids, units acft Sobol results. Rows = demand ids, columns Sobol (S1, ST, or 95% confidence interval) value for each parameter mwd lower folder: scenario ensembles, emulated worst year total shortages (acft), and Sobol results same organization as mwd higher MLP performance: performance metrics (R^2, RMSE, BIAS, MAPE) for the testing subset (20% or 2,662 scenarios) and simulated vs emulated worst year shortage (acre-feet/year) for every demand node, MWD wholesale regions, and the entire study region (LAC). Supporting data for figures. Figure plotting scripts in the associated GitHub repo. These files support analysis and visualization. Geospatial Data used for plotting simulated water shortages and Sobol results. Dictionary of full names for demand nodes in the model and estimates of water supply by source type informed by Artes input files and California Urban Water Management Planning data: https://water.ca.gov/Programs/Water-Use-And-Efficiency/Urban-Water-Use-Efficiency/Urban-Water-Management-Plans *Readme files provided for each folder.

drought↗

Serpent and MCNP Calculations of the Energy Deposition in the Transformational Challenge Reactor

This paper focuses on the calculation of the energy deposition in the Transformational Challenge Reactor by two major Monte Carlo codes: Serpent and MCNP. The first software computation relies on Kinetic Energy Released per unit Mass (KERMA) factors while the second one relies on Q-values. The results from these two independent computation methodologies are in very good agreement; however, Serpent runs much faster than MCNP (for the same computational model) and allows for a detailed energy deposition distribution from a 1-mm-side square mesh with a relative statistical error between 0.5% and 1%. This detailed energy deposition is suitable for multiphysics analyses aimed at design optimizations. In order to calculate the energy deposition, Serpent needs enhanced ACE files (distributed by the software developers). Unlike other Monte Carlo software that uses inputs based on Python or Java languages, the Serpent input syntax is very similar to that of MCNP; a Python script can convert a MCNP input to a Serpent input in seconds. For simulations not requiring the calculation of the energy deposition, Serpent can also read nuclear data from MCNP ACE files, which eventually improves the comparison of the results of the two codes.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

The SENSEI Generic In Situ Interface: Tool and Processing Portability at Scale [Book Chapter]

One key challenge when doing in situ processing is the investment required to add code to numerical simulations needed to take advantage of in situ processing. Such instrumentation code is often specialized, and tailored to a specific in situ method or infrastructure. Then, if a simulation wants to use other in situ tools, each of which has its own bespoke API [4], then the simulation code team will quickly become overwhelmed with having a different set of instrumentation APIs, one per in situ tool or method. In an ideal situation, such instrumentation need happen only once, and then the instrumentation API provides access to a large diversity of tools. In this way, a data producer’s instrumentation need not be modified if the user desires to take advantage of a different set of in situ tools. The SENSEI generic in situ interface addresses this challenge, which means that SENSEI-instrumented codes enjoy the benefit of being able to use a diversity of tools at scale, tools that include Libsim, Catalyst, Ascent, as well as user-defined methods written in C++ or Python. SENSEI has been shown to scale to greater than 1M-way concurrency on HPC platforms, and provides support for a rich and diverse collection of common scientific data models. Furthermore, this chapter presents the key design challenges that enable tool and processing portability at scale, some performance analysis, and example science applications of the methods.

Bethel, E. Wes↗

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↗

Linearized Distribution Optimal Power Flow for OEDI SI

This research is to meant to demonstrate the OEDI SI use case for distributed optimal power flow (DOPF). The goal was to formulate the optimal power flow problem in the distribution system for active and reactive power setpoints of PV systems using topology information and voltage measurements. The co-simulation runs every 15 minutes as outlined within the scenario file for the given feeder configuration. The linked GitHub repository includes five federates to achieve DOPF for the small, medium, large, and IEEE 123 feeder scenarios. We are using the OEDI SI framework, as well as the example feeder, sensor, recorder, and estimator federates provided in the example repository for OEDI SI. We also provide a runner script for switching between scenarios.

algorithm↗

pvOps: a Python package for empirical analysis of photovoltaic field data

The purpose of pvOps is to support empirical evaluations of data collected in the field related to the operations and maintenance (O&M) of photovoltaic (PV) power plants. pvOps presently contains modules that address the diversity of field data, including text-based maintenance logs, current-voltage (IV) curves, and timeseries of production information. The package functions leverage machine learning, visualization, and other techniques to enable cleaning, processing, and fusion of these datasets. These capabilities are intended to facilitate easier evaluation of field patterns and extraction of relevant insights to support reliability-related decision-making for PV sites. The open-source code, examples, and instructions for installing the package through PyPI can be accessed through the GitHub repository.

14 SOLAR ENERGY↗

Naval Ship Counter Measure Capability (Final Report) [Slides]

Task 1: RUNQUIC.py was modified to add options 4 and 5, which run only the QUIC-PLUME and QUICPRESSURE codes without rerunning QUIC-URB. Task 2: We have verified that the RUNQUIC.py produces a WPC file to facilitate the interface with the CONTAM model. Task 3: RUNQUIC.py is now compatible with Python 3.8 and above. Task 4: The CMWD capability has been added QUIC-PLUME, which uses two new input files: QP_countermeasures.inp and QP_grounddep.inp. This first controls the efficiency of the CMWD system and when it is turned on and off and the second makes it possible to turn of tracking of surface deposition on the ocean surface. Task 5: This report was written for this task. Additionally, we are updating the QUIC Start Guide and RUNQUIC.py Guide, which will be made available once they have gone through the publication review process. Task 6: We performed a literature review on models for inertial deposition on the upwind faces of obstacles. We identified a model that was compatible with QUIC’s existing deposition model and implemented a first draft of this model in QUIC-PLUME. We have performed some preliminary qualitative testing, which shows the expected behavior. Further quantitative testing to fully validate the inertial deposition model.

97 MATHEMATICS AND COMPUTING↗