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 577 records · Page 32

Magnetic Mapping in the Inner Magnetosphere using Kamodo

Many models require specialized access and interpolation schemes to effectively extract and interpolate their outputs. In particular, the Block-Adaptive Tree Solarwind Roe Upwind Scheme (BATSRUS) component of the Space Weather Modeling Framework (SWMF) requires Kamodo to take advantage of its block-based adaptive grid structure, and the Lyon-Fedder Mobarry magnetosphere model (or its successor GAMERA) needs a scheme that appreciates the distorted spherical arrangement of grid vertices on a non-orthogonal grid. With the flythrough layer developed by Ringuette et al. (SH42E-2337), the underlying model readers have been adapted to use multiple time steps in a single Python session to perform 4- dimensional interpolations in time and space. Kamodo now utilizes lazy interpolation that loads data only when needed. We present the successful integration of SWMF/BATSRUS magnetosphere access and interpolation into the new 4D Kamodo framework utilizing an external library of C code. Through function composition, Kamodo facilitates the calculation of derived quantities and the transformation of positions and vectors into different coordinate systems. This work is a significant step towards performing field line tracing in Kamodo with SWMF magnetosphere outputs.

Lutz Rastaetter↗

LCA-PyTorch

LCA-PyTorch is a code repository which contains PyTorch implementations of the Locally Competitive Algorithm (LCA), which is a biologically-plausible sparse coding model. LCA-PyTorch allows for the training, testing, and analysis of single layer LCA networks, multi-layer LCA networks, and hybrid LCA-based deep neural network models on a wide variety of applications and data types. LCA-PyTorch was developed in Python, a high-level programming language that takes advantage of the Python ecosystem of high-quality open-source packages for machine learning. LCA-PyTorch interfaces heavily with the open-source PyTorch Python package.

Teti, Michael↗

SimpleMass (Version 2.0.1 Report)

SimpleMass v2 is an updated GUI version of the SimpleMass Excel spreadsheet. It was developed using Python 3.7 and wxPython, a cross-platform GUI toolkit. The program was developed on Windows 10 and tested on macOS Catalina. In theory, the program should work on Linux based operating systems such as Ubuntu, but this has not been tested. Executable versions of the code were built using PyInstaller. The version described in this report is an alpha version that is still in development. It has only been tested by the developer.

97 MATHEMATICS AND COMPUTING↗

Noodles: Cooking Up Collaborative Visualization

NOODLES is a new cross-domain collaborative visualization and analysis capability being developed at NREL. The NOODLES specification is a minimal protocol that can tie different software packages and platforms together. As an example, a simulation code that speaks this protocol could stream iso-surfaces to an immersive VR space and a web browser. Another example is a team (with some members across the country) classifying and discovering features in a statistical data plot, driven from a researcher's existing Python-based workflow. In this talk, we will discuss some background on the problems that this protocol intends to solve, basic principles of the specification, the current state of supporting libraries, and some demonstrations of the protocol in action.

3D↗

NRAP-Open-IAM: NRAP Open Source Integrated Assessment Model

Note: This is the last version (a2.6.1) of NRAP-Open-IAM released during NRAP Phase II in 2022. The latest version of NRAP-Open-IAM is available here: https://edx.netl.doe.gov/dataset/phase-iii-nrap-open-iam NRAP-Open-IAM is an open-source software product that enables quantification of containment effectiveness and leakage risk at storage sites in the context of system uncertainties and variability. NRAP-Open-IAM represents the next-generation in a line of systems-based computational models developed for quantitative geological carbon storage (GCS) risk assessment. The model comprises a set of reduced-order and analytical models of various components of the GCS system, potential leakage pathways, receptors of concern including impact to groundwater resources and the atmosphere, a framework to support stochastic simulation, time stepping, uncertainty quantification, other analytical functionality for scenario and risk-performance evaluation, and a basic graphical user interface to support scenario development, data input simulation definition, and basic post-processing and results display. As the NRAP Open-IAM functionality continues to evolve, we continue to add to its capability to develop quantitative, probabilistic, and time-dependent profiles of the evolution of risk at a GCS site and evaluate the influence of uncertain parameters on uncertainty in predicted risk. It can be used to quantify the dynamics of reservoir saturation plume and pressure-affected area, for evaluation of the area of potential groundwater impact (i.e., Area of Review) and monitoring requirements to support cost and regulatory analysis, and for consideration of different post-injection site care and closure scenarios. This submission contains the current version of NRAP-Open-IAM available for evaluation and testing. To use the NRAP-Open-IAM, download the source code (https://edx.netl.doe.gov/dataset/08f396c8-bc5f-44ad-a028-6e98a6ea6d70/resource/4c24a3da-3b40-4ffe-9892-c807ae9f8760) then open the NRAP-Open-IAM user's guide (https://edx.netl.doe.gov/dataset/08f396c8-bc5f-44ad-a028-6e98a6ea6d70/resource/8b27335a-343c-4836-b8a3-3ad0bdc9e669) to read more about the tool. Installation instructions for Windows, Mac, and Linux can be found in the "installers" folder of the extracted NRAP-Open-IAM folder and describe setup of environment (e.g., Python libraries) needed for proper work of the tool. Test of installation can be done by running "python openiam_setup_tests.py" in the "setup" folder. The installation test also runs a test suite to see if the NRAP-Open-IAM has been installed correctly. To run the test suite separately, run "python iam_test.py" in the "test" folder. User's guide: https://edx.netl.doe.gov/dataset/08f396c8-bc5f-44ad-a028-6e98a6ea6d70/resource/8b27335a-343c-4836-b8a3-3ad0bdc9e669 Developer's guide: https://edx.netl.doe.gov/dataset/08f396c8-bc5f-44ad-a028-6e98a6ea6d70/resource/3bc6ee7d-609d-4eb6-80ba-fa6130ee0313 Reservoir simulation data used in some examples distributed with NRAP-Open-IAM: - Kimberlina: https://edx.netl.doe.gov/dataset/08f396c8-bc5f-44ad-a028-6e98a6ea6d70/resource/eb62cece-61b2-4037-9b6d-32407dde2ab8 - Kimberlina (compartmentalized): https://edx.netl.doe.gov/dataset/08f396c8-bc5f-44ad-a028-6e98a6ea6d70/resource/366f9530-3b32-4b84-affe-ab2df1d9a8b5 - FutureGen 2.0: https://edx.netl.doe.gov/dataset/futuregen-2-0-1008-simulation-reservoir-lookup-table NRAP-Open-IAM GitLab repository: https://gitlab.com/NRAP/OpenIAM Related publications: - Bacon, D., Yonkofski, C., Brown, C., Demirkanli, D. and Whiting, J., 2019. Risk-based post injection site care and monitoring for commercial-scale carbon storage: Reevaluation of the FutureGen 2.0 site using NRAP-Open-IAM and DREAM. International Journal of Greenhouse Gas Control 90: 102784. - Bacon, D. Demirkanli, D., and White, S., 2020. Probabilistic risk-based Area of Review (AoR) determination for a deep-saline carbon storage site. International Journal of Greenhouse Gas Control 102: 103153. - Harp, D., Oldenburg, C., and Pawar, R., 2019. A metric for evaluating conformance robustness during geologic CO2 sequestration operations. International Journal of Greenhouse Gas Control 85: 100-108. - Lackey, G., Vasylkivska, V., Huerta, N., King, S., and Dilmore, R., 2019. Managing well leakage risks at a geologic carbon storage site with many wells, International Journal of Greenhouse Gas Control, 88 :182-194. - Vasylkivska, V., Dilmore, R., Lackey, G., Zhang, Y., King, S., Bacon, D., Chen, B., Mansoor, K., and Harp, D., 2021. NRAP-Open-IAM: A flexible open-source integrated assessment model for geologic carbon storage risk assessment and management, Environmental Modelling & Software, 143: 105114. Presentations: - Chen, B., Harp, D., and Pawar, R., A data assimilation approach (ES-MDA) coupling with NRAP-Open-IAM for quantifying uncertainty reduction in geological CO2 sequestration. AGUFM 2019: T44A-02. - Chen, B., and Harp, D., Improving risk analysis precision for geologic CO2 sequestration by quantifying the uncertainty reduction before and after acquiring monitoring data. 14th Greenhouse Gas Control Technologies Conference, Melbourne, Australia, 2018, pp. 21-26. - Harp, D., National Risk Assessment Partnership Task 2: Containment Assurance. No. LA-UR-19-28654, Los Alamos National Laboratory (LANL), Los Alamos, NM (United States), 2019. - Vasylkivska, V., King, S., Bacon, D., Harp, D., Chen, B., Mansoor, K., Onishi, T., Yang, Y., Zhang, Y., and Keating, E., NRAP-Open-IAM: An open-source integrated assessment model, poster, Mastering the Subsurface Through Technology Innovation, Partnerships and Collaboration: Carbon Storage and Oil and Natural Gas Technologies Review Meeting, Pittsburgh, PA, August 13-16, 2018. - Vasylkivska, V., Lackey, G., King, S., Wentworth, A., Huerta, N., Creason, C., DiGiulio, J., Yang, Y., and Dilmore, R., Long-term risk analysis of a geologic CO2 storage project during the post-injection period, SIAM Conference on Computational Science and Engineering, Spokane, WA, February 25-March 1, 2019. - Vasylkivska, V., Overview of the NRAP-Open-IAM tool for carbon storage (beta release), 2019 Annual NRAP Tool Users Meeting, Pittsburgh, PA, August 27, 2019. - Vasylkivska, V., Bacon, D., Chen, B., Dilmore, R., Harp, D., King, S., Lackey, G., Lindner, E., Liu, G., Mansoor, K. and Zhang, Y., NRAP-Open-IAM: A new, open-source code for integrated assessment of geologic carbon storage containment effectiveness and leakage risk, poster, American Geophysical Union Fall Meeting 2020 (virtual meeting), December 2020. - Vasylkivska, V., NRAP open-source integrated assessment model and relevant application, oral presentation, NRAP workshop "NRAP Tools for Geologic Carbon Storage Risk-Based Decision Making" held in conjunction with Groundwater Protection Council (GWPC) 2021 Annual Forum (virtual meeting), Salt Lake City, UT, September 2021. - Vasylkivska, V., NRAP-Open-IAM: open-source integrated assessment model, digital poster/demonstration, software demonstration session, 2022 Carbon Management Project Review Meeting, August 16, 2022

AoR↗

Robust Machine Learning

UQ4ML is a code repository for a set of tools for the development of robust machine learning methods, uncertainty quantification and explainability of machine learning methods. The goal of these tools is to develop more robust and statistically rigorous machine learning methods for scientific applications. These tools are developed in Python, a high-level programming language that takes advantage of the Python ecosystem of high-quality open-source packages for machine learning.

Oyen, Diane↗

Access Capabilities Through Ccs Communications Protocol (acccs)

AcCCS is a collection of scripts that leverage open-source code, off-the-shelf hardware, and published protocol specifications to create a flexible and inexpensive test and evaluation device for the Electric Vehicle industry. AcCCS is capable of emulating either an Electric Vehicle (EV) or Electric Vehicle Supply Equipment (EVSE). It provides a flexible set of Python scripts to test and evaluate the various communication protocols between the Electric Vehicle Communication Controller (EVCC) and Supply Equipment Communication Controller (SECC). This capability is useful for cybersecurity researchers, automotive OEMs, and EVSE manufactures.

Rohde, KennethW [Idaho National Laboratory (INL), ↗

Demonstration of Optimal Benchmark Selection Website and Validation of the q c Coverage Metric Using HEU-SOL-THERM-013-003 Experiment

In the work documented in this interim report, the experiment selection toolkit web site was demonstrated and q C coverage metric methodology was validated for IEU-MET-FAST-002-001, MIX-COMP-THERM 004-004, and HEU-SOL-THERM-013-003 experiments. 𝑞 𝐶 is an information-theoretic measure based on mutual information that quantifies the ability of candidate benchmark experiments to reduce the bias and uncertainty of a target criticality safety application. The metric and an accompanying open-source Python toolkit with a web-based interface were tested against a benchmark set of 425 experiments drawn from the International Criticality Safety Benchmark Evaluation Project Handbook. The interface is hosted at https://edim.covdef.com. It accepts sensitivity data files produced by the TSUNAMI-IP module of the SCALE code system and supports both (i) deterministic analysis using the ENDF/B-VII.0 covariance library and (ii) stochastic analysis based on user-supplied keff samples. Demonstrations on representative applications across a range of material composition, spectrum, and form show that q C -guided benchmark selection achieves greater uncertainty reduction with fewer experiments and yields more stable posterior bias and uncertainty estimates than traditional similarity coefficient ( c k )–based selection, while also capturing valuable low-ck experiments that one-to-one metrics overlook.

Abdel-khalik, Hany S. [Indiana Univ.-Purdue Univ. ↗

PandAna: A Python Analysis Framework for Scalable High Performance Computing in High Energy Physics

Modern experiments in high energy physics analyze millions of events recorded in particle detectors to select the events of interest and make measurements of physics parameters. These data can often be stored as tabular data in files with detector information and reconstructed quantities. Current techniques for event selection in these files lack the scalability needed for high performance computing environments. We describe our work to develop a high energy physics analysis framework suitable for high performance computing. This new framework utilizes modern tools for reading files and implicit data parallelism. Framework users analyze tabular data using standard, easy-to-use data analysis techniques in Python while the framework handles the file manipulations and parallelism without the user needing advanced experience in parallel programming. In future versions, we hope to provide a framework that can be utilized on a personal computer or a high performance computing cluster with little change to the user code.

Groh, Micah↗

Collision Tracking in OpenMC: Methods and Applications in Neutron Noise, Neutron Imaging, Time-of-Flight, and Multiplicity Counting

We present the development and application of a collision tracking feature within the OpenMC Monte Carlo particle transport code, designed for diverse applications such as neutron spectroscopy, scatter camera system, neutron noise, and multiplicity counting simulations. This feature enables the tracking of individual particle collisions, with potential applications in nuclear nonproliferation, reactor physics, and nuclear security. Additionally, the feature holds potential for the calibration of neutron detectors, specifically in converting light output into energy deposited within the detectors. The implementation consists of a set of filters—such as reaction type, energy, cell, and material—that constrain the set of collisions that are tracked, extensions to the Python API to enable simple input specification, and support for writing either OpenMC’s native HDF5-based format or the Monte Carlo particle list format. This feature was added to the official OpenMC release in version 0.15.3. In this work, the feature will be applied to showcase scenarios such as time-of-flight simulations, scatter-camera imaging for neutron source localization, neutron-noise analysis to extract integral kinetic parameters such as the prompt decay constant α, and multiplicity counting to estimate the mass of special nuclear materials. Ultimately, this feature aims to expand the application scope of open-source Monte Carlo particle transport codes such as OpenMC.

Monte Carlo code↗

Implementation of the D1S Methodology for Shutdown Dose Rate Calculations in the OpenMC Monte Carlo Particle Transport Code

We present an implementation of the direct one-step (D1S) methodology for shutdown dose rate (SDR) calculations in the OpenMC Monte Carlo particle transport code. In addition to being the first fully open-source D1S implementation, it is also the first to require no ad hoc source code or nuclear data library modifications. The code can seamlessly switch between production of prompt and decay photons based on a user input parameter, and the decay data needed for decay photon generation are made available through a depletion chain file, which is already used for OpenMC’s built-in depletion/activation solver. A set of Python functions significantly eases the burden of computing and applying time correction factors needed to properly account for the time dependence of radionuclide activity. To assess the accuracy of the D1S implementation, SDR calculations have been carried out for three problems: a prism of iron irradiated by 14-MeV neutrons, the ITER port plug computational benchmark, and the Frascati Neutron Generator (FNG) ITER dose rate benchmark problem from the Shielding INtegral Benchmark Archive and Database (SINBAD). For each of these problems, comparisons were made to calculations using the rigorous two-step (R2S) method. The results on the iron prism problem illustrate how the D1S method achieves superior spatial resolution compared to the R2S method without the need for spatial discretization of the activation regions. The D1S and R2S results for the ITER port plug benchmark agree well with previously reported results in the literature. While the D1S results are 10% to 15% lower than the R2S results, this may be due to stochastic uncertainty and/or spatial discretization in the R2S calculations. On the FNG dose rate benchmark problem, the D1S method produces dose rate estimates that are within 4% of the dose rates predicted using a cell-based R2S workflow. The D1S estimates of the SDR are also in reasonable agreement with the experimental measurements and show the same basic trends that have been observed in previous works. A qualitative analysis of the execution time and uncertainty for the R2S and D1S workflows suggests that the D1S method would attain a higher figure of merit.

D1S method↗

CosTuuM: Polarized Thermal Dust Emission by Magnetically Oriented Spheroidal Grains

We present the new open-source C++-based Python library CosTuuM that can be used to generate infrared absorption and emission coefficients for arbitrary mixtures of spheroidal dust grains that are (partially) aligned with a magnetic field. We outline the algorithms underlying the software, demonstrate the accuracy of our results using benchmarks from literature, and use our tool to investigate some commonly used approximative recipes. We find that the linear polarization fraction for a partially aligned dust grain mixture can be accurately represented by an appropriate linear combination of perfectly aligned grains and grains that are randomly oriented, but that the commonly used picket fence alignment breaks down for short wavelengths. We also find that for a fixed dust grain size, the absorption coefficients and linear polarization fraction for a realistic mixture of grains with various shapes cannot both be accurately represented by a single representative grain with a fixed shape, but that instead an average over an appropriate shape distribution should be used. Insufficient knowledge of an appropriate shape distribution is the main obstacle in obtaining accurate optical properties. CosTuuM is available as a standalone Python library and can be used to generate optical properties to be used in radiative transfer applications.

79 ASTRONOMY AND ASTROPHYSICS↗

Dispatch Optimization Variable Engine

The Dispatch Optimization Variable Engine (DOVE) is software tool written in python, developed at Idaho National Laboratory (INL) that provides an easily accessible application-programming-interface (API) to performing resource dispatch optimization analysis for integrated energy system (IES) configurations. DOVE is an integral part of the Framework for Optimization of Resources and Economics (FORCE) software suite and is leveraged by codes such as the Holistic Energy Resource Optimization Network (HERON) and the Optimization of Real-Time Capacity Allocation (ORCA). The philosophy behind DOVE is to provide a modular software solution to IES planning and operation by utilizing state-of-the-art algorithms and machine learning. The goal is to accurately capture the dispatching behavior of a complex energy system given varying time-dependent signals for demand and commodity pricing.

McDowell, DylanJ. [Idaho National Laboratory (INL)↗

Programs and Code for Geothermal Exploration Artificial Intelligence

The scripts below are used to run the Geothermal Exploration Artificial Intelligence developed within the "Detection of Potential Geothermal Exploration Sites from Hyperspectral Images via Deep Learning" project. It includes all scripts for pre-processing and processing, including: - Land Surface Temperature K-Means classifier - Labeling AI using Self Organizing Maps (SOM) - Post-processing for Permanent Scatterer InSAR (PSInSAR) analysis with SOM - Mineral marker summarizing - Artificial Intelligence (AI) Data splitting: creates data set from a single raster file - Artificial Intelligence Model: creates AI from a single data set, after splitting in Train, Validation and Test subsets - AI Mapper: creates a classification map based on a raster file

15 GEOTHERMAL ENERGY↗

Catalyst Design in Nitrate Removal

Based on the volcano plot developed by Dr. Goldsmith group (Report linked in submission), we utilized DFT (density functional theory) calculations to search for bimetallic materials in the application of catalysts in aqueous nitrate removal. The calculations are conducted via the high-throughput automated workflow package developed by our group (Github linked in submission) using VASP commercial first-principles calculation software.

29 ENERGY PLANNING, POLICY, AND ECONOMY↗

Coffea -- Columnar Object Framework For Effective Analysis

The coffea framework provides a new approach to High-Energy Physics analysis, via columnar operations, that improves time-to-insight, scalability, portability, and reproducibility of analysis. It is implemented with the Python programming language, the scientific python package ecosystem, and commodity big data technologies. To achieve this suite of improvements across many use cases, coffea takes a factorized approach, separating the analysis implementation and data delivery scheme. All analysis operations are implemented using the NumPy or awkward-array packages which are wrapped to yield user code whose purpose is quickly intuited. Various data delivery schemes are wrapped into a common front-end which accepts user inputs and code, and returns user defined outputs. We will discuss our experience in implementing analysis of CMS data using the coffea framework along with a discussion of the user experience and future directions.

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

PlantCV v4: Image analysis software for high‐throughput plant phenotyping

PlantCV is an open-source Python project aimed at developing tools to address a range of image-based, plant phenotyping questions. PlantCV has been used for more than 10 years to automate trait collection from image data, and the newest release, PlantCV version 4, continues to lower the barrier to entry for users without substantial coding experience through extensive example use-case tutorials and simplified installation. In addition to usability, we document added functionality since the release of PlantCV v2, including support for more image types such as fluorescence, thermal, and hyperspectral data. Finally, we describe the development of a new subpackage focused on morphological trait measurements like leaf angle, and demonstrate its utility as compared to more manual methods of data collection.

Schuhl, Haley [Donald Danforth Plant Science Cente↗

Fox Trails

1. This software utilizes python pandas to pull data from P6 databases or XER files. The software transforms the datasets into multiple main tables by joining, filtering, iteratively flattening hierarchical structured data, and pivoting datasets to give simple flat output tables. The activity table includes all of the information related to an activity including activity codes, global, EPS, and project codes, UDFs, and WBS information as separate columns. This includes the code id, code value and sequence number for all levels in hierarchical codes. The resource table is similar to the activity table and includes all of the information related to resources on activities including UPFs and resource codes. The resource time phased table takes the resource information and time phases it for the budget, forecast, late, and actual dates/units/costs that closely matches P6's user interface's values as it implements the resource curve and calendars. The wbs table contains the WBS structure broken out by levels and includes UDFs, codes, and notebook topics. The final P6 data table is the relationships table which simply contains the relationships. 2. When a user updates the tool with data (via giving it P6 project names with database username/password information or XER files) the system creates the data in #1, then creates a networkx graph with the activity data imbedded in the node data and the relationships added as edges. Each edge also has it's float calculated (working time distance between the predecessor and successor) and attached to the edge. Activities are also tagged as a potential start of a path based on their constraints, constraint dates, remaining start date, and activity status. When a user enters an activity ID into the UI, it runs a shortest path calculation on the network graph between each node tagged as potential start to the entered activity id based on the float tagged on the edge. Each path returned by the algorithm contains all of the nodes on the path in order, as well as the total float of the edges that make the path. This data is then collected and returned to the user in the form of a gantt chart with groupings for each path that includes the total float for each group. 3. Similar to 2, if the user passes through a reference dataset each activity set in the path is checked to see if it had a path in the reference dataset, if that path was the primary path between the start and end activities, and what has changed regarding logic and durations. These changes are color coded and summarized before sent to the user to be displayed by the UI for simple discovery. 4. Utilizing the data from #1, the user can submit desired grouping code(s) and filters to the system. The system will then pull the activities, resources, and relationships and create a gantt chart based on the groupings sent and filtered based on the filters sent. 5. The system will produce a gantt chart in a similar method to #4, but allows interactivity with the data. As the user interacts with the gantt chart, the software captures the changes and stores it with the user making the change so that project controls and implement those changes in P6.

Fox, Ben↗