Engineering Papers⌕ Search

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 55 records · Page 3

Another Set of Python Tools for Visualizing and Manipulating Small-Angle Neutron Scattering Data: Descriptions and Examples

The GP-SANS, Bio-SANS and EQ-SANS instruments at ORNL utilize drtsans for data reduction. drtsans is built on Python, and it can be run using python scripts and Jupyter notebooks. The flexibility afforded by Python makes it possible to incorporate additional actions into the scripts used for data reduction, such as analysis and visualization. Here, a new set of tools for visualizing and manipulating SANS data that can be incorporated into the data reduction scripts for the ORNL SANS instruments, or employed during post–processing, is presented that expands the capabilities of the two previously-released tool sets.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

A Python Tool for Reconstructing MCNP6 Particle Histories from an HDF5 PTRAC File [Slides]

A Python tool for converting the MCNP6 HDF5 PTRAC file to a list of Python trees is presented. The particle trees store MCNP6 simulated events for each history using parent-child relationships, which ensures that branching processes are accurately reproduced. A variety of post-processing scripts are presented and used in conjunction with the Python particle trees to make special tallies that are currently not available in the MCNP6 software and visualize the particle tracks.

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↗

A Python Library for Radiance Matrix-based Simulation Control and EnergyPlus Integration

Radiance matrix-based methods enable efficient parametric simulations, allowing users to vary sky conditions, fenestration systems, and other model parameters at a minimal cost to computation. However, the steep learning curve and complex workflow hinder the widespread adoption of matrix-based methods. The frads Python library with a series of command-line tools was developed to automate the entire matrix-based simulation process, lowering entry barriers and reducing human error. Co-simulation between EnergyPlus and Radiance was also enabled using the Python library from EnergyPlus. Key Innovations • Command-line based automation of Radiance matrix-based simulation methods • Python library facilitates broader adoption of Radiance matrix-based simulation methods • Radiance EnergyPlus run-time integration enabling the modeling of advanced control systems Practical Implications The frads library, with associated command-line tools, provides practitioners with the capability to easily adopt and use Radiance matrix-based simulation methods for various daylighting, solar control, and energy-related evaluations. Frads' current form is designed for 1) users familiar with a command-line interface and 2) software developers to integrate the matrix-based methods into existing software packages.

Wang, Taoning↗

Application of a Density Law via Python for Aqueous Plutonium Nitrate

A predictive density tool has been developed in Python to reduce bias and uncertainty in nuclear criticality safety calculations for plutonium nitrate systems. The Pitzer Method and an empirical method were implemented into the tool, allowing for plutonium nitrate density calculations. Additionally, the Python tool can generate atom densities for a MCNP6.2 material card using the density from the selected method and directly the densities into a prepared MCNP6 input text file. The material card and density are calculated based on customizable user inputs of plutonium content, nitric acid content, temperature, plutonium isotope weight percentages and impurity concentrations. The Python tool has been validated and verified against the International Handbook of Evaluated Criticality Safety Benchmark Experiments to predict densities within a root mean square error of 1.0% for the Pitzer method and 1.8% for the empirical method. These errors in density were shown to lead to a ±0.5% error in MCNP6.2 calculated k effective for the Pitzer method and a ±1.7% error for the Empirical method. Simultaneous work is also being done at the University of New Mexico and Los Alamos National Laboratory to create a similar tool for plutonium chloride solutions, which aims to provide the accreditation of the chlorine absorption. These capabilities will not only provide more accurate models but also lead the way towards a better understanding of solution systems and potential relaxation in the conservatism of the current aqueous plutonium processing limits.

97 MATHEMATICS AND COMPUTING↗

PyAlbany: A Python interface to the C++ multiphysics solver Albany

Albany is a parallel C++ finite element library for solving forward and inverse problems involving partial differential equations (PDEs). In this paper we introduce PyAlbany, a newly developed Python interface to the Albany library. PyAlbany can be used to effectively drive Albany enabling fast and easy analysis and post-processing of applications based on PDEs that are pre-implemented in Albany. PyAlbany relies on the library PyBind11 to bind Python with C++ Albany code. Here we detail the implementation of PyAlbany and showcase its capabilities through a number of examples targeting a heat-diffusion problem. In particular we consider the following: (1) the generation of samples for a Monte Carlo application, (2) a scalability study, (3) a study of parameters on the performance of a linear solver, and finally (4) a tool for performing eigenvalue decompositions of matrix-free operators for a Bayesian inference application.

97 MATHEMATICS AND COMPUTING↗

ZERNIPAX: A fast and accurate Zernike polynomial calculator in Python

Zernike polynomials serve as an orthogonal basis on the unit disc, and have proven to be effective in optics simulations, astrophysics, and more recently in plasma simulations. Unlike Bessel functions, Zernike polynomials are inherently finite and smooth at the disc center (r=0), ensuring continuous differentiability along the axis. This property makes them particularly suitable for simulations, requiring no additional handling at the origin. We developed ZERNIPAX, an open-source Python package capable of utilizing CPU/GPUs, leveraging Google's JAX package and available on GitHub as well as the Python software repository PyPI. Furthermore, our implementation of the recursion relation between Jacobi polynomials significantly improves computation time compared to alternative methods by use of parallel computing while still performing more accurately for high-mode numbers.

Astrophysics↗

Python Group Additivity (pGrAdd) software for estimating species thermochemical properties

ncreasingly complex chemistry models require thermochemical data for many species often estimated from costly first-principles DFT computations. Here we introduce the Python Group Additivity software (pGrAdd) that implements comprehensive group additivity in a simple, modular, lightweight Python package that is extensible and easy to implement. It includes 6 group additivity databases for gas species and Pt(111) adsorbates allowing users to immediately compute thermochemical properties for a wide range of molecules and build new databases.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

QuantImPy: Minkowski functionals and functions with Python

The Minkowski functionals and functions are a family of morphological measures and can be used to describe both the morphology (shape) and topology (connectedness) of a system. This paper presents the QuantImPy Python package which can compute both the Minkowski functionals and functions. In addition, this package can efficiently perform basic morphological operations and compute their distance maps. QuantImPy is easy to install, well documented, integrated with existing Python packages, and open source.

97 MATHEMATICS AND COMPUTING↗

mzapy : An Open-Source Python Library Enabling Efficient Extraction and Processing of Ion Mobility Spectrometry-Mass Spectrometry Data in the MZA File Format

We have recently reported MZA, a new and simple mass spectrometry data structure based on the broadly supported HDF5 format and created to facilitate software development. While this format is inherently supportive of application development, the availability of a core library with standard mass spectrometry utilities greatly facilitates fast software development. Here, we present a Python library, mzapy, for efficient extraction and processing of mass spectrometry data in the MZA format. In addition to raw data extraction, mzapy contains supporting utilities enabling tasks including calibration, signal processing, peak finding, and generating plots. Being implemented in pure Python with minimal and largely standardized dependencies makes mzapy uniquely suited to application development in the multi-omics domain. The free and open source mzapy is built with extensibility in mind, and future development will support cloud computing and artificial intelligence/machine learning applications. The software source code is freely available at https://github.com/PNNL-m-q/mzapy.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗

bmdrc: Python package for quantifying phenotypes from chemical exposures with benchmark dose modeling

Though chemical exposures are known to potentially have negative impacts on health, including contributing to chronic diseases such as cancer, the quantitative contribution of risk is not fully understood for every chemical. A commonly used approach to quantify levels of risk is to measure the proportion of organisms (such as a total number of zebrafish on a plate or mice in a cage) with abnormal behavioral responses or morphology at increasing concentrations of chemical exposure. A particular challenge with processing the proportional data from these assays is the appropriate estimation of chemical concentration levels that result in malformations or acute toxicity, as these values typically vary between experimental measurements. The recommended approach by the Environmental Protection Agency (EPA) is to fit benchmark dose curves with specific filters and model fitting steps, which are crucial to properly processing the proportional data. Several tools exist for the fitting of benchmark dose response curves, but none are standalone Python libraries built to process both morphological and behavioral data as proportions with all the EPA recommended filters, filter parameters, models, and model parameters. Thus, here we present the benchmark dose response curve (bmdrc) Python library, which was built to closely follow these EPA guidelines with helpful visualizations of filters and fitted model curves, and reports for reproducibility purposes. bmdrc is open-source and has demonstrated utility as a support package to an existing web portal for information on chemicals (https://srp.pnnl.gov). Our package will support any toxicology analysis where the response is a proportional value at increasing levels of a concentration of a chemical or chemical mixture.

Superfund↗

Automating Log Synthesis and Visualization with Python and Splunk

The goal of this project is to automate log analysis by utilizing Splunk, Bash, and Python together. Simplifying the monitoring and analysis of network traffic was the main goal. In order to accomplish this, a Bash script was created to use 'tcpdump' to automate network sniffing. It also included a 24-hour file rotation mechanism to effectively manage the pcap files that were generated. After that, a Python script was written to read these pcap files and retrieve pertinent data about network traffic. After processing the collected data, Splunk is used to summarize the important metrics and visualize said information with relevant graphs.

99 GENERAL AND MISCELLANEOUS↗

PYSIMFRAC: A Python library for synthetic fracture generation and analysis

In this paper, we introduce PYSIMFRAC, an open-source python library for generating 3-D synthetic fracture realizations, integrating with fluid simulators, and performing analysis. PYSIMFRAC allows the user to specify one of three fracture generation techniques (Box, Gaussian, or Spectral) and perform statistical analysis including the autocorrelation, moments, and probability density functions of the fracture surfaces and aperture. This analysis and accessibility of a python library allows the user to create realistic fracture realizations and vary properties of interest. In addition, PYSIMFRAC includes integration examples to two different pore-scale simulators and the discrete fracture network simulator, dfnWorks. The capabilities developed in this work provides opportunity for quick and smooth adoption and implementation by the wider scientific community for accurate characterization of fluid transport in geologic media. We present PYSIMFRAC along with integration examples and discuss the ability to extend PYSIMFRAC from a single complex fracture to complex fracture networks.

58 GEOSCIENCES↗

UQpy v4.1: Uncertainty quantification with Python

This paper presents the latest improvements introduced in Version 4 of the UQpy, Uncertainty Quantification with Python, library. In the latest version, the code was restructured to conform with the latest Python coding conventions, refactored to simplify previous tightly coupled features, and improve its extensibility and modularity. To improve the robustness of UQpy, software engineering best practices were adopted. A new software development workflow significantly improved collaboration between team members, and continuous integration and automated testing ensured the robustness and reliability of software performance. Continuous deployment of UQpy allowed its automated packaging and distribution in system agnostic format via multiple channels, while a Docker image enables the use of the toolbox regardless of operating system limitations.

97 MATHEMATICS AND COMPUTING↗

PyKrev: A Python Library for the Analysis of Complex Mixture FT-MS Data

In this study, we present PyKrev, a Python library for the analysis of complex mixture Fourier transform mass spectrometry (FT-MS) data. PyKrev is a comprehensive suite of tools for analysis and visualization of FT-MS data after formula assignment has been performed. These comprise formula manipulation and calculation of chemical properties, intersection analysis between multiple lists of formulas, calculation of chemical diversity, assignment of compound classes to formulas, multivariate analysis, and a variety of visualization tools producing van Krevelen diagrams, class histograms, PCA score, and loading plots, biplots, scree plots, and UpSet plots. The library is showcased through analysis of hot water green tea extracts and Scotch whisky FT-ion cyclotron resonance-MS data sets. PyKrev addresses the lack of a single, cohesive toolset for researchers to perform FT-MS analysis in the Python programming environment encompassing the most recent data analysis techniques used in the field.

47 OTHER INSTRUMENTATION↗

SciPy 1.0: fundamental algorithms for scientific computing in Python

SciPy is an open-source scientific computing library for the Python programming language. Since its initial release in 2001, SciPy has become a de facto standard for leveraging scientific algorithms in Python, with over 600 unique code contributors, thousands of dependent packages, over 100,000 dependent repositories and millions of downloads per year. In this work, we provide an overview of the capabilities and development practices of SciPy 1.0 and highlight some recent technical developments.

97 MATHEMATICS AND COMPUTING↗

A world without pythons would be so simple

We show that bulk operators lying between the outermost extremal surface and the asymptotic boundary admit a simple boundary reconstruction in the classical limit. This is the converse of the Python's lunch conjecture, which proposes that operators with support between the minimal and outermost (quantum) extremal surfaces—e.g. the interior Hawking partners—are highly complex. Our procedure for reconstructing this 'simple wedge' is based on the HKLL construction, but uses causal bulk propagation of perturbed boundary conditions on Lorentzian timefolds to expand the causal wedge as far as the outermost extremal surface. As a corollary, we establish the Simple Entropy proposal for the holographic dual of the area of a marginally trapped surface as well as a similar holographic dual for the outermost extremal surface. Here, we find that the simple wedge is dual to a particular coarse-grained CFT state, obtained via averaging over all possible Python's lunches. An efficient quantum circuit converts this coarse-grained state into a 'simple state' that is indistinguishable in finite time from a state with a local modular Hamiltonian. Under certain circumstances, the simple state modular Hamiltonian generates an exactly local flow; we interpret this result as a holographic dual of black hole uniqueness.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗