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 181 records · Page 10

Constraining the Halo Mass of Damped Lyα Absorption Systems (DLAs) at z = 2–3.5 Using the Quasar-CMB Lensing Cross-correlation

We study the cross-correlation of damped Lyα systems (DLAs) and their background quasars, using the most updated DLA catalog and the Planck 2018 CMB lensing convergence field. Our measurement suggests that the DLA bias b DLA is smaller than 3.1, corresponding to log (M/M ⊙ h -1 ) ⩽ 12.3 at a confidence of 90%. These constraints are broadly consistent with Alonso et al. and previous measurements by cross-correlation between DLAs and the Lyα forest (e.g., Font-Ribera et al.; Prez-Rfols et al.). Further, our results demonstrate the potential of obtaining a more precise measurement of the halo mass of the high-redshift sources using next generation CMB experiments with a higher angular resolution. The python-based codes and data products of our analysis are available at https://github.com/LittleLin1999/CMB-lensingxDLA.

79 ASTRONOMY AND ASTROPHYSICS↗

Calibrating radar wind profiler reflectivity factor using surface disdrometer observations

Abstract. This study uses surface disdrometer reflectivity factor estimates to calibrate the vertical and off-vertical pointing radar beams produced by an ultra high frequency (UHF) band radar wind profiler (RWP) deployed at the US Department of Energy (DOE) Atmospheric Radiation Measurement (ARM) program Southern Great Plains (SGP) Central Facility in northern Oklahoma from April 2011 through July 2019. The methodology consists of five steps. First, the recorded Doppler velocity power spectra are adjusted to account for Nyquist velocity aliasing and coherent integration filtering effects. Second, the spectrum moments are calculated. The third step increases the signal-to-noise ratio (SNR) due to inflated noise power estimates during convective rain events that cause SNR to be biased low. The fourth step determines the RWP calibration constant for one radar beam (called the “reference” beam) by comparing uncalibrated RWP reflectivity factors at 500 m above the ground to 1 min resolution surface disdrometer reflectivity factors. The last step uses the calibrated reference beam reflectivity factor to calibrate the other radar beams during precipitation. There are two key findings. The RWP sensitivity decreased by approximately 3 to 4 dB yr−1 as the hardware aged. This drift was slow enough that the reference calibration constant can be estimated over 3-month intervals using episodic rain events. The calibrated moments are available on the DOE ARM data archive, and the Python processing code is available on public repositories.

54 ENVIRONMENTAL SCIENCES↗

"Source Term Modeling for Advanced Gas Micro-Reactors"

Maintaining the safety of the public, environment, and operating personnel is the most important factor in designing, operating, maintaining, and decommissioning nuclear reactors. In recent years, there has been a growing interest in the development of micro-reactors employing TRi-structural ISOtropic (TRISO)-coated particle fuel. In gas reactors, TRISO fuel plays an important role in the safety case for high temperature reactors because of the fission product retention properties of the fuel. This ability enables the use of a functional containment strategy for the reactor where multiple barriers are used to prevent fission product release to the environment. Part of the safety analysis of these advanced reactors is the assessment of radionuclide releases under normal and accident conditions through the multiple credited safety barriers. Using conservative assumptions, a mechanistic analysis can be performed to quantify these releases that combines the probabilistic assessment of failure with analytic solutions to radionuclide transport equations. Source term modeling for TRISO fuel has been performed for previous reactor designs; however, these models are outdated, in many cases proprietary, and need updates to be applied to the current state of TRISO fuel technology and alternative gas reactor core configurations [1]. Currently, the only publicly available source term assessment for gas reactors is an expert-based Monte Carlo simulation based on the effectiveness of the fuel kernel, coating layers, and graphite block in a modular high temperature gas reactor [2]. Thus, there is a need to develop a simple, versatile, and mechanistic model of fission product release and transport in gas reactor cores that could be applied to a variety of reactors through user inputs and reactor-specific radionuclide inventories. The release is calculated by the diffusion of the key safety important fission products through the kernel, silicon carbide (SiC), graphite for both intact and defective TRISO particles based on fuel and graphite temperatures in the reactor under normal operation. These releases from the fuel enter the coolant where they can plate-out on cooler surfaces. A clean-up model is included for designs with a coolant purification system to remove fission gases. This initial distribution of fission products in the reactor serves as an initial condition for potential releases under postulated accident conditions. The model then can calculate the fission product release for any transient temperature profile and fission product releases can then be used to assess radiological dose to the workers and the public using conventional dose tools. Data on the diffusion of fission products is based on historic German TRISO experiments and the more current Department of Energy (DOE) Advanced Gas Reactor (AGR) TRISO fuel development program. The model is coded in python with inputs and outputs in excel spreadsheets, as well as python plotting utilities to aid in the interpretation of the results. References: [1] INL, NGNP Mechanistic Source Term White Paper, INL-10-17997, July 2010. [2] David A. Petti, Richard R. Hobbins, Peter Lowry, Hans Gougar, “Representative Source Terms and The Influence of Reactor Attributes on Functional Containment in Modular High Temperature Gas-cooled Reactors,” Nuclear Technology, Vol. 184, p. 181-197, Nov. 2013.

07 ISOTOPE AND RADIATION SOURCES↗

Low-Temperature Geothermal Play Fairway Analysis for the Denver Basin

This project is part of a national initiative to showcase the benefits of incorporating low-temperature geothermal resource assessment into the deployment of geothermal heating, combined heat and power (CHP), and geothermal direct-use (GDU) technologies. The initiative was established to accelerate the country's decarbonization efforts by identifying potential for low-temperature geothermal resource utilization (<150 degrees C, e.g., CHP and GDU) in selected sedimentary basins with numerous population centers. The play fairway analysis (PFA) methodologies in this study were adapted from previous PFA investigations of sedimentary basin geothermal play types (SBGPTs) that evaluated the potential for low-temperature resources (<150 degrees C). Workflows, relevant datasets, a new Python library, and common and composite geological criteria maps are utilized to develop low-temperature geothermal resource favorability maps for the Denver Basin, a sedimentary basin spanning Colorado, Nebraska, and Wyoming. The replication of these methodologies in other SBGPTs can evaluate potential for low-temperature resources. To facilitate future assessment of low-temperature geothermal resources in SBGPTs, this project provides PFA workflows, data, tools, and favorability maps that will ultimately support the utilization of low-temperature geothermal resources in sedimentary basins.

combined heat and power↗

Advancing 1D thermo-hydraulic tools for large cryogenic facilities

The Cryogenic Division at Fermilab develops large-scale cryogenic systems for particle accelerators and superconducting magnet test facilities. To support design and diagnostics, a Python-based code was created to calculate pressure drops in components such as valves and pipes. This paper presents recent enhancements to the code, including new heat transfer functions that improve the accuracy of thermal and hydraulic predictions. The first application models pressure and temperature changes in Proton Improvement Plant PIP-II relief pipes, aiding pipe sizing and protecting relief valves. The second example analyses heat load evolution in a pipe carrying sub-atmospheric helium, helping interpret temperature sensor data and understand gas return behavior to cold compressors. These improvements significantly expand the tool's capabilities, offering a practical resource for designing and troubleshooting cryogenic systems under dynamic thermal and flow conditions.

Beckwith, R. [Fermilab]↗

Tiered Energy Use in Buildings (TEB)

This tool creates a set of building energy simulations and organizes them according to a tier-based model representing circuits that will be on or off depending on a microgrid controller (not included in this software). This Python based code uses the open-source RCBuildingSimulator that is under an amended MIT license. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525. SAND2021-2528 O

Villa, Daniel↗

SPISEA: A Python-based Simple Stellar Population Synthesis Code for Star Clusters

We present Stellar Population Interface for Stellar Evolution and Atmospheres (SPISEA), an open-source Python package that simulates simple stellar populations. The strength of SPISEA is its modular interface which offers the user control of 13 input properties including (but not limited to) the initial mass function, stellar multiplicity, extinction law, and the metallicity-dependent stellar evolution and atmosphere model grids used. The user also has control over the initial–final mass relation in order to produce compact stellar remnants (black holes, neutron stars, and white dwarfs). We demonstrate several outputs produced by the code, including color–magnitude diagrams, HR-diagrams, luminosity functions, and mass functions. SPISEA is object-oriented and extensible, and we welcome contributions from the community. The code and documentation are available on GitHub (https://github.com/astropy/SPISEA) and ReadtheDocs (https://spisea.readthedocs.io/en/latest/), respectively.

79 ASTRONOMY AND ASTROPHYSICS↗

Dataset for 'Stream Temperature Predictions for River Basin Management in the Pacific Northwest and Mid-Atlantic Regions Using Machine Learning', Water 2022

This data package presents forcing data, model code, and model output for classical machine learning models that predict monthly stream water temperature as presented in the manuscript ‘Stream Temperature Predictions for River Basin Management in the Pacific Northwest and Mid-Atlantic Regions Using Machine Learning’, Water (Weierbach et al., 2022). Specifically, for input forcing datasets we include two files each generated using the BASIN-3D data integration tool (Varadharajan et al., 2022) for stations in the Pacific Northwest and Mid Atlantic Hydrologic regions. Model code (written in python with the use of jupyter notebooks) includes codes for data preprocessing, training Multiple Linear Regression, Support Vector Regression, and Extreme Gradient Boosted Tree models, and additional notebooks for analysis of model output. We include specific model output files which represent modeling configurations presented in the manuscript also presented in an hdf5 format. Together, these data make up the workflow for predictions across three scenarios (single station, regional, and predictions in unmonitored basins) presented in the manuscript and allow for reproducibility of modeling procedures.

54 ENVIRONMENTAL SCIENCES↗

A2E2G (Atmosphere to Electrons to the Grid platform) [SWR-23-22]

A2E2G is a platform that integrates 1) forecasting tools to account for weather uncertainty, with 2) aerodynamic wind plant models to account for wake dynamics and wind plant operation, and 3) economic models to advise on operation for a wind power plant that offers grid services in addition to energy. The A2E2G platform can be used as a high-level controller for a wind plant for market participation and real-time wind plant control. The A2E2g platform is a holistic Python tool with modules that can be run to 1) advise on market participation and 2) control and operate a wind power plant in real time. The A2E2g framework assumes two stages: the first stage is in day-ahead and the second stage is in real-time. Managing uncertainty is key in the first stage and managing variability is key in the second stage. The different components have models written and developed in the Python programming language. The code is assembled into a Python package and can be easily downloaded and installed from the A2E2g repository (https://github.com/NREL/a2e2g).

Sinner, Michael↗

Strategic Petroleum Reserve Cavern Leaching Monitoring CY24

This report provides an analysis of the effects of raw water leaching at the U.S. SPR using the Sandia Solution Mining Code (SANSMIC). A new version of the code has been established in the past year (implemented in Python and C++ code) and was used for this annual report. Additionally, the setup, running, and post-processing of leaching modeling has now been streamlined into a single Python notebook environment for each cavern run.

58 GEOSCIENCES↗

Divertor heat load estimates on NSTX and DIII-D using new and open-source 2D inversion analysis code

A thermography inversion algorithm has been developed in the open-source Python-based computer code, HYPERION, to calculate the heat flux incident on plasma-facing components (PFCs) in axisymmetric tokamaks. The chosen mesh size at the surface significantly affects the calculated transient heat flux results. The calculated transient heat flux will exceed the real value when the mesh size tends to zero but will underestimate the real value when the mesh size is large. A criterion for determining the appropriate mesh size for the transient heat flux calculation will be discussed. The numerical scheme for HYPERION uses a 2D fully implicit finite-difference approach, allowing temperature-dependent thermal properties of PFC materials. The inversion algorithm is benchmarked against established heat flux calculation codes, TACO and THEODOR, based on thermography data from NSTX and DIII-D respectively. The primary benefits of HYPERION compared to TACO and THEODOR are that it is open-source and it allows for the optimization of mesh thickness along the substrate. The algorithm also accounts for the thermal properties of thin surface layers that characteristically form on PFCs due to plasma-material interactions. The agreement between HYPERION and THEODOR is excellent, as the percent difference between the codes is ~5% on average in the case of the DIII-D data for moderate to high heat flux. Verification tests with TACO show slightly higher average percent differences of 8% and 12%. In using HYPERION to study filaments in heat flux, the initial results indicate that small ELMs filaments significantly broaden the divertor heat flux, and decrease divertor peak flux. Compared to the inter-ELM, the small ELM filaments decrease the divertor peak surface temperature. With intermittent divertor filaments, the divertor heat flux width is comparable with that found in L-mode.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

ExactPack

A new version of the verification tool ExactPack, 1.7.0, includes three new solvers: A Radshocks solver, Riemann solver and an Elastic-Plastic Piston problem solver. The code has been refactored to work with Python 3. All Fortran code has been removed and solvers implemented in Fortran have been re-implemented in Python where necessary. All unit tests have been converted to use the Pytest format and all the GUI, CLI and verification analysis code has been removed.

Thrussell, Jasper↗

Code Artifact for: Clustering Analysis of Commercial Vehicles Using Automatically Extracted Features from Time Series Data [SWR-21-96]

This repository contains data ingestion, feature extraction, and analysis code used in NREL Technical report "Clustering Analysis of Commercial Vehicles Using Automatically Extracted Features from Time Series Data." The code is written in Python. The ETL and feature extraction code must be run in a Spark context. The analysis code can be run without Spark, provided you have pre-computed features in a CSV file. Analysis code related to the NREL Technical Report NREL/TP-2C00-74212. Includes PySpark functions to perform trip segmentation and feature extraction over big time series data in Apache Spark. Includes "domain specific" features such as Aerodynamic Speed (ft/s), Characteristic Acceleration (ft/s2), Percent Below 55 (%), Percent Zero (%), Stops Per Mile, Average Speed (mph), Maximum Speed (mph), and Speed Standard Deviation (mph). Includes Pyspark UDF to compute "domain agnostic" features using the TSFresh library. This software record also includes the analysis notebooks and code to generate the results in the previously mentioned technical report.

Perr-Sauer, Jordan↗

Feature Interpretability

The feature interpretability code is a python module that interprets and analyzes neural networks trained on hydrodynamic simulation output in the form of numpy arrays. The code takes trained neural networks and extracts internal model states in the form of images. Additionally, tools for covariance analysis of network weights and predictions are provided. This code is built on the TensorFlow and PyTorch python libraries, and includes trained networks and example input data for demonstration purposes.

Callis, Skylar↗

EDAT

SAND2022-13281 O EDAT is a suite of tools for analyzing time-dependent electron densities produced by time-dependent density functional theory (TDDFT) simulations of ion-irradiated materials and surfaces. The code’s key capabilities include various routines to extract the number of electrons emitted from a surface, the energy spectrum of these emitted electrons, and the number of electrons captured by the ion. The code is written in Python and can interface with multiple TDDFT codes. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.

Kononov, Alina↗

Comparing the Performance of Julia on CPUs versus GPUs and Julia-MPI versus Fortran-MPI: a case study with MPAS-Ocean (Version 7.1)

Abstract. Some programming languages are easy to develop at the cost of slow execution, while others are fast at runtime but much more difficult to write. Julia is a programming language that aims to be the best of both worlds – a development and production language at the same time. To test Julia's utility in scientific high-performance computing (HPC), we built an unstructured-mesh shallow water model in Julia and compared it against an established Fortran-MPI ocean model, the Model for Prediction Across Scales–Ocean (MPAS-Ocean), as well as a Python shallow water code. Three versions of the Julia shallow water code were created: for single-core CPU, graphics processing unit (GPU), and Message Passing Interface (MPI) CPU clusters. Comparing identical simulations revealed that our first version of the Julia model was 13 times faster than Python using NumPy, where both used an unthreaded single-core CPU. Further Julia optimizations, including static typing and removing implicit memory allocations, provided an additional 10–20× speed-up of the single-core CPU Julia model. The GPU-accelerated Julia code was almost identical in terms of performance to the MPI parallelized code on 64 processes, an unexpected result for such different architectures. Parallelized Julia-MPI performance was identical to Fortran-MPI MPAS-Ocean for low processor counts and ranges from 2× faster to 2× slower for higher processor counts. Our experience is that Julia development is fast and convenient for prototyping but that Julia requires further investment and expertise to be competitive with compiled codes. We provide advice on Julia code optimization for HPC systems.

54 ENVIRONMENTAL SCIENCES↗

Python-Cubit ® Enhancement Scripts: 16.14

The Python-Cubit ® enhancement code base is intended to be used as an extension to already existing Cubit ® functionality. It provides the user with a number of functionalities that are either currently outside the realm of the python functions which Cubit ® supplies internally (such as vector math), or that are comprised of commonly used combinations of already existing python functionalities (such as removing a full round from a slot cut). The foreseen style of use for many of these scripts is to utilize volume names and geometric data such as surface area, surface type, etc. as a way to filter out geometries, and provide a powerful id-less method. These filters combined with a number of already existing python functionalities such as the set() operator and zip() function can be used to operate on many geometries at a single time without a need for the user to manually select them or use their ids. Please refer to the example given in the documents examples section for a demonstration of the work flow.

97 MATHEMATICS AND COMPUTING↗

Python-Cubit® Enhancement Scripts: 16.18

The Python-Cubit® enhancement code base is intended to be used as an extension to already existing Cubit® functionality. It provides the user with a number of functionalities that are either currently outside the realm of the python functions which Cubit® supplies internally (such as vector math), or that are comprised of commonly used combinations of already existing python functionalities (such as removing a full round from a slot cut).

97 MATHEMATICS AND COMPUTING↗