Search NASA⌕ Search

SEARCH · Search NASA

Results for “python code”

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 685 records · Page 38

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↗

Automated Algorithms for Quantum-Level Accuracy in Atomistic Simulations: LDRD Final Report.

This report summarizes the result of LDRD project 12-0395, titled "Automated Algorithms for Quantum-level Accuracy in Atomistic Simulations." During the course of this LDRD, we have developed an interatomic potential for solids and liquids called Spectral Neighbor Analysis Poten- tial (SNAP). The SNAP potential has a very general form and uses machine-learning techniques to reproduce the energies, forces, and stress tensors of a large set of small configurations of atoms, which are obtained using high-accuracy quantum electronic structure (QM) calculations. The local environment of each atom is characterized by a set of bispectrum components of the local neighbor density projected on to a basis of hyperspherical harmonics in four dimensions. The SNAP coef- ficients are determined using weighted least-squares linear regression against the full QM training set. This allows the SNAP potential to be fit in a robust, automated manner to large QM data sets using many bispectrum components. The calculation of the bispectrum components and the SNAP potential are implemented in the LAMMPS parallel molecular dynamics code. Global optimization methods in the DAKOTA software package are used to seek out good choices of hyperparameters that define the overall structure of the SNAP potential. FitSnap.py, a Python-based software pack- age interfacing to both LAMMPS and DAKOTA is used to formulate the linear regression problem, solve it, and analyze the accuracy of the resultant SNAP potential. We describe a SNAP potential for tantalum that accurately reproduces a variety of solid and liquid properties. Most significantly, in contrast to existing tantalum potentials, SNAP correctly predicts the Peierls barrier for screw dislocation motion. We also present results from SNAP potentials generated for indium phosphide (InP) and silica (SiO 2 ). We describe efficient algorithms for calculating SNAP forces and energies in molecular dynamics simulations using massively parallel computers and advanced processor ar- chitectures. Finally, we briefly describe the MSM method for efficient calculation of electrostatic interactions on massively parallel computers.

Thompson, Aidan Patrick↗

ARES Modeling of High-foot Implosions (NNSA Milestone #5466)

ARES “capsule only” simulations demonstrated results of applying an ASC code to a suite of high-foot ICF implosion experiments. While a capability to apply an asymmetric FDS drive to the capsule-only model using add-on Python routines exists, it was not exercised here. The ARES simulation results resemble the results from HYDRA simulations documented in A. Kritcher, et al., Phys. Plasmas, 23, 052709 (2016); namely, 1D simulation and data are in reasonable agreement for the lowest velocity experiments, but diverge from each other at higher velocities.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Using the Global Arrays Toolkit to Reimplement NumPy for Distributed Computation

Global Arrays (GA) is a software system from Pacific Northwest National Laboratory that enables an efficient, portable, and parallel shared memory programming interface to manipulate distributed defense arrays. Using a combination of GA and NumPy, we have reimplemented NumPy as a distributed drop-in replacement called Global Arrays in NumPy (GAiN). Scalability studies will be presented showing the utility of developing serial NumPy codes which can later run on more capable clusters or supercomputers.

Global Arrays↗

Analysis of the Space Propulsion System Problem Using RAVEN

This paper presents the solution of the space propulsion problem using a PRA code currently under development at Idaho National Laboratory (INL). RAVEN (Reactor Analysis and Virtual control ENviroment) is a multi-purpose Probabilistic Risk Assessment (PRA) software framework that allows dispatching different functionalities. It is designed to derive and actuate the control logic required to simulate the plant control system and operator actions (guided procedures) and to perform both Monte- Carlo sampling of random distributed events and Event Tree based analysis. In order to facilitate the input/output handling, a Graphical User Interface (GUI) and a post-processing data-mining module are available. RAVEN allows also to interface with several numerical codes such as RELAP5 and RELAP-7 and ad-hoc system simulators. For the space propulsion system problem, an ad-hoc simulator has been developed and written in python language and then interfaced to RAVEN. Such simulator fully models both deterministic (e.g., system dynamics and interactions between system components) and stochastic behaviors (i.e., failures of components/systems such as distribution lines and thrusters). Stochastic analysis is performed using random sampling based methodologies (i.e., Monte-Carlo). Such analysis is accomplished to determine both the reliability of the space propulsion system and to propagate the uncertainties associated to a specific set of parameters. As also indicated in the scope of the benchmark problem, the results generated by the stochastic analysis are used to generate risk-informed insights such as conditions under witch different strategy can be followed.

97 MATHEMATICS AND COMPUTING↗

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)↗

Summary of Documentation for DYNA3D-ParaDyn's Software Quality Assurance Regression Test Problems

The Software Quality Assurance (SQA) regression test suite for DYNA3D (Zywicz and Lin, 2015) and ParaDyn (DeGroot, et al., 2015) currently contains approximately 600 problems divided into 21 suites, and is a required component of ParaDyn’s SQA plan (Ferencz and Oliver, 2013). The regression suite allows developers to ensure that software modifications do not unintentionally alter the code response. The entire regression suite is run prior to permanently incorporating any software modification or addition. When code modifications alter test problem results, the specific cause must be determined and fully understood before the software changes and revised test answers can be incorporated. The regression suite is executed on LLNL platforms using a Python script and an associated data file. The user specifies the DYNA3D or ParaDyn executable, number of processors to use, test problems to run, and other options to the script. The data file details how each problem and its answer extraction scripts are executed. For each problem in the regression suite there exists an input deck, an eight-processor partition file, an answer file, and various extraction scripts. These scripts assemble a temporary answer file in a specific format from the simulation results. The temporary and stored answer files are compared to a specific level of numerical precision, and when differences are detected the test problem is flagged as failed. Presently, numerical results are stored and compared to 16 digits. At this accuracy level different processor types, compilers, number of partitions, etc. impact the results to various degrees. Thus, for consistency purposes the regression suite is run with ParaDyn using 8 processors on machines with a specific processor type (currently the Intel Xeon E5530 processor). For non-parallel regression problems, i.e., the two XFEM problems, DYNA3D is used instead. When environments or platforms change, executables using the current source code and the new resource are created and the regression suite is run. If differences in answers arise, the new answers are retained provided that the differences are inconsequential. This bootstrap approach allows the test suite answers to evolve in a controlled manner with a high level of confidence. Developers also run the entire regression suite with (serial) DYNA3D. While these results normally differ from the stored (parallel) answers, abnormal termination or wildly different values are strong indicators of potential issues.

42 ENGINEERING↗

Perfect crystal propagator for physical optics simulations with Synchrotron Radiation Workshop

Until now, a treatment of dynamical diffraction from perfect crystals has been missing in the "Synchrotron Radiation Workshop" (SRW) wavefront propagation computer code despite the widespread use of crystals on X-ray synchrotron beamlines. Now a special propagator" module for calculating dynamical diffraction from a perfect crystal in the Bragg case has been written in C++, integrated into the SRW C/C++ library and made available for simulations using the Python interface of SRW. The propagator performs local processing of the frequency-domain electric field in the angular representation. A 2-D Fast Fourier Transform is used for changing the field representation from/to the coordinate representation before and after applying the crystal propagator. This ensures seamless integration of the new propagator with the existing functionalities of the SRW package, allows compatibility with existing propagators for other optical elements, and enables the simulation of complex beamlines transporting partially coherent X-rays. The code has been benchmarked by comparison with predictions made by plane-wave and spherical-wave dynamical diffraction theory. Test simulations for a selection of X-ray synchrotron beamlines are also shown.

47 OTHER INSTRUMENTATION↗

The Integrated Plasma Simulator: A Flexible Python Framework for Coupled Multiphysics Simulation

High-fidelity coupled multiphysics simulations are an increasingly important aspect of computational science. In many domains, however, there has been very limited experience with simulations of this sort, therefore research in coupled multiphysics often requires computational frameworks with significant flexibility to respond to the changing directions of the physics and mathematics. This paper presents the Integrated Plasma Simulator (IPS), a framework designed for loosely coupled simulations of fusion plasmas. The IPS provides users with a simple component architecture into which a wide range of existing plasma physics codes can be inserted as components. Simulations can take advantage of multiple levels of parallelism supported in the IPS, and can be controlled by a high-level ``driver'' component, or by other coordination mechanisms, such as an asynchronous event service. We describe the requirements and design of the framework, and how they were implemented in the Python language. We also illustrate the flexibility of the framework by providing examples of different types of simulations that utilize various features of the IPS.

99 GENERAL AND MISCELLANEOUS↗

Admiralty Inlet Hub-Height Turbulence Measurements from June 2012

This data is from measurements at Admiralty Head, in Admiralty Inlet. The measurements were made using an IMU equipped ADV mounted on a mooring, the 'Tidal Turbulence Mooring' or 'TTM'. The inertial measurements from the IMU allows for removal of mooring motion in post processing. The mooring motion has been removed from the stream-wise and vertical velocity signals (u, w). The lateral (v) velocity may have some 'persistent motion contamination' due to mooring sway. The ADV was positioned 11m above the seafloor in 58m of water at 48.1515N, 122.6858W. Units ------ - Velocity data (_u, urot, uacc) is in m/s. - Acceleration (Accel) data is in m/s^2. - Angular rate (AngRt) data is in rad/s. - The components of all vectors are in 'ENU' orientation. That is, the first index is True East, the second is True North, and the third is Up (vertical). - All other quantities are in the units defined in the Nortek Manual. Motion correction and rotation into the ENU earth reference frame was performed using the Python-based open source DOLfYN library (linked in resources). Details on motion correction can be found there. For additional details on this dataset see the included Marine Energy Technology Symposium paper.

16 TIDAL AND WAVE POWER↗

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↗

PyEPANET v. 0.1.0

The PyEPANET package is a set of commands for the Python programming language that are built to wrap the EPANET toolkit library commands, without requiring the end user to program using the ctypes package. This package does not contain the EPANET code, nor does it implement the functions within the EPANET software, and it requires the separately downloaded or compiled EPANET2 toolkit dynamic library (epanet.dll, libepanet.so, or epanet.dylib) and/or the EPANET-MSX dynamic library in order to function. 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.

Hart, David↗

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↗