Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “python, computer programming”

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

PythonFOAM: In-situ data analyses with OpenFOAM and Python

Here, we outline the development of a general-purpose Python-based data analysis tool for OpenFOAM. Our implementation relies on the construction of OpenFOAM applications that have bindings to data analysis libraries in Python. Double precision data in OpenFOAM is cast to a NumPy array using the NumPy C-API and Python modules may then be used for arbitrary data analysis and manipulation on flow-field information. We highlight how the proposed wrapper may be used for an in-situ online singular value decomposition (SVD) implemented in Python and accessed from the OpenFOAM solver PimpleFOAM. Here, 'in-situ' refers to a programming paradigm that allows for a concurrent computation of the data analysis on the same computational resources utilized for the partial differential equation solver. In addition, to demonstrate parallel deployments, we deploy a distributed SVD, which collects snapshot data across the ranks of a distributed simulation to compute the global left singular vectors. Crucially, both OpenFOAM and Python share the same message passing interface (MPI) communicator for this deployment which allows Python objects and functions to exchange NumPy arrays across ranks. Subsequently, we provide scaling assessments of this distributed SVD on multiple nodes of Intel Broadwell and KNL architectures for canonical test cases such as the large eddy simulations of a backward facing step and a channel flow at friction Reynolds number of 395. Finally, we demonstrate the deployment of a deep neural network for compressing the flow-field information using an autoencoder to demonstrate an ability to use state-of-the-art machine learning tools in the Python ecosystem.

97 MATHEMATICS AND COMPUTING↗

Improved Verification and Validation Testing and Tools [Slides]

All MCNP team supported V&V test suites are now developed in a separate repository from the MCNP source code within a Python-based framework. This entire framework will be distributed with the upcoming MCNP6.3 release. Most V&V test suites distributed with MCNP6.2 will be distributed in new framework. New V&V test suites are done or being worked on for the MCNP6.3 release.

97 MATHEMATICS AND COMPUTING↗

MLtool Python Code

Machine Learning (ML) is a subfield of Artificial Intelligence that gives computers the ability to learn from past data without being explicitly programmed. The predictive capabilities of ML models have already been used to facilitate several scientific breakthroughs. However, the practical application of ML is often limited due to the gaps in technical knowledge of its users. The common issue faced by many scientific researchers is the inability to choose the appropriate ML pipelines that are needed to treat real-world data, which is often sparse and noisy. To solve this problem, we have developed an automated Machine Learning tool (MLtool) that includes a set of ML algorithms and approaches to aid scientific researchers. The current version of MLtool is implemented as an object-oriented Python code that is easily extensible. It includes 44 different regression algorithms used to model data. MLtool helps users select the best model for their data, based on the scoring metrics used. Besides regression algorithms, MLtool also includes a suite of pre- and post-processing techniques such as missing value imputation, categorical variable encoding, input feature normalization, uncertainty quantification, exploratory data analysis (EDA), etc. MLtool was tested on several publicly available multi-dimensional data sets and was found capable of making accurate predictions.

Machine Learning↗

Generating Models of the Flattop Critical Assembly for Benchmark Experiments with Python

Los Alamos National Laboratory has been performing nuclear criticality experiments since 1946 at the Pajarito site, starting the Los Alamos Critical Experiments Facility in 1948. A transition period occurred between 2004 and 2011 as operations moved to the National Criticality Experiments Research Center (NCERC), where criticality experiments are now performed. Criticality experiments are essential for determination and verification of nuclear data used in calculations and modeling—such as radiation transport codes—throughout the industry, enhancing nuclear criticality safety. In addition to nuclear data validation and benchmarking, the remotely operated critical assemblies at NCERC are used for a variety of experiments and training classes supporting criticality safety.

46 INSTRUMENTATION RELATED TO NUCLEAR SCIENCE AND ↗

Library for Evolutionary Algorithms in Python (LEAP)

There are generally three types of scientific software users: users that solve problems using existing science software tools, researchers that explore new approaches by extending existing code, and educators that teach students scientific concepts. Python is a general-purpose programming language that is accessible to beginners, such as students, but also as a language that has a rich scientific programming ecosystem that facilitates writing research software. Additionally, as high-performance computing (HPC) resources become more readily available, software support for parallel processing becomes more relevant to scientific software.There currently are no Python-based evolutionary computation frameworks that support all three types of scientific software users. Moreover, some support synchronous concurrent fitness evaluation that do not efficiently use HPC resources. We pose here a new Python-based EC framework that uses an established generalized unified approach to EA concepts to provide an easy to use toolkit for users wishing to use an EA to solve a problem, for researchers to implement novel approaches, and for providing a low-bar to entry to EA concepts for students. Additionally, this toolkit provides a scalable asynchronous fitness evaluation implementation friendly to HPC that has been vetted on hardware ranging from laptops to the world’s fastest supercomputer, Summit.

Coletti, Mark↗

Using Parameter Sweep in WaterTAP to Analyze New Water Treatment Technologies

We describe a powerful and generalized parameter sweep tool in this report that was originally developed to analyze the performance of existing and novel water treatment models being developed in WaterTAP. Since WaterTAP is built upon IDAES and Pyomo, the parameter sweep tool can be used to systematically explore and debug the behavior of most Pyomo and IDAES numerical models. In order to enable meaningful analyses, the parameter sweep tool has been designed with the following features: 1) Model flexibility: The parameter sweep tool does not enforce any restrictions on the types of models that can be used with it. As long as a Pyomo model can be solved and the parameter is active and mutable, the tool only needs functions that describe how to run the model, the sweep parameters, and the output quantities of interest. 2) Flexible sampling: The parameter sweep tool has inbuilt functions to generate samples from a random distribution or a multidimensional Euclidean space. Furthermore, the users have to ability to supply samples generated from a tool of their choice. 3) Multiple sweep types: A user can choose from one of 3 types of parameter sweeps depending on their needs. 4) Detailed outputs: Outputs generated by the parameter sweep tool can be stored in detailed H5 file or user-friendly CSV files for post processing. 5) Parallel computing: The parameter sweep supports shared and distributed memory parallel computing to enable the use of high performance computers (HPC) for large-scale analyses. 6) Modular: The parameter sweep tool is self-contained and can easily be integrated within an outer-loop analysis or as desired by the user. 7) Ease of use: The tool is well documented and a simple sweep can be easily executed by following the online documentation in a few lines of code. We demonstrate the use of the parameter sweep tool on a simple water treatment system from the WaterTAP repository and show its parallel scaling performance on an Apple laptop and NREL's Eagle HPC. The parameter sweep tool is actively being used with models currently being developed within WaterTAP and we expect its use to grow beyond it to other IDAES and Pyomo models.

97 MATHEMATICS AND COMPUTING↗

VENTSAR V3.0: A Python GUI for Estimating Contaminant Concentrations on or Near Buildings Due to Building Effects and Plume Rise and For Calculating Inhalation and Plume Shine Doses

VENTSAR: Originated as VENTAX (Smith and Weber 1983) on the IBM Mainframe at the Savannah River Site (SRS) as a Fortran program. Updated to VENTSAR XL V1.0 (Simpkins 1997) as a spreadsheet version using macros created in Microsoft Excel. Later updated to VENTSAR XL V2.0 (Dixon 2018) as a spreadsheet executing a modified version of the original VENTAX Fortran code. Estimates contaminant concentrations on or near a building from a release at a nearby location. Calculates concentrations for a given meteorological exceedance probability or for a given stability and wind speed combination. Can model a single building with or without a penthouse on top or a ground location from either a stack or ground release. Plume rise can be considered. Contaminant releases can be chemical or radioactive with downwind concentrations determined at user-specified distances. Wind passing over and around buildings creates a complicated dispersion pattern. Air-intake vents may be located on building roofs or near the ground downwind of a release source. An estimation of pollutant concentrations on or near a structure is important in determining expected pollutant levels. Meteorological data are selected based on a specific area of the site. Fortran-based VENTAX able to make fast, complex mathematical calculations. Not user-friendly VENTSAR XL V1.0 no longer supported due to obsolete Excel macros. VENTSAR XL V2.0 an interim solution using an Excel spreadsheet to interface with the modified VENTAX Fortran code. Requires user to have Microsoft Excel. Not an intuitive interface for someone unfamiliar with VENTSAR. Does not perform dose calculations. VENTSAR V3.0 goal to combine the strengths of previous versions of VENTSAR into a single, powerful yet user-friendly program with a Graphical User Interface (GUI). Not dependent upon a specific program or plug-ins. Self-contained package to be used on any computer running Microsoft Windows. User-friendly, intuitive GUI created in Python for parameter input. Executes same modified VENTAX Fortran code as VENTSAR XL V2.0. Outputs formatted text file of completed calculations for easy review and dissemination. Performs inhalation and plume shine dose calculations for up to 11 user-selected nuclides from a nuclide dose factor library of almost 500 nuclides. 12 test cases were created for verification of V1.0 and V2.0. Same test cases run in V3.0 to verify correct performance. V3.0 produced similar results to V1.0. Confirmed GUI did not alter calculations in any way. Comparisons of the test case results confirm the V3.0 GUI does not influence the VENTSAR calculations. Simply passes same input parameters to VENTAX Fortran code for execution. Provides end user an easy-to-use, intuitive tool to quickly make building effect and plume rise calculations, as well as, inhalation and plume shine dose calculations. No experience with or working knowledge of Fortran, Excel, command line, or macros required. Self-contained package allows VENTSAR be deployed to any Windows computer without the need for specific programs or plug-ins.

12 MANAGEMENT OF RADIOACTIVE AND NON-RADIOACTIVE W↗

MONTE Python for Deep Space Navigation

The Mission Analysis, Operations, and Navigation Toolkit Environment (MONTE) is the Jet Propulsion Laboratory’s (JPL) signature astrodynamic computing platform. It was built to support JPL’s deep space exploration program, and has been used to fly robotic spacecraft to Mars, Jupiter, Saturn, Ceres, and many solar system small bodies. At its core, MONTE consists of low-level astrodynamic libraries that are written in C++ and presented to the end user as an importable Python language module. These libraries form the basis on which Python-language applications are built for specific astrodynamic applications, such as trajectory design and optimization, orbit determination, flight path control, and more. The first half of this paper gives context to the MONTE project by outlining its history, the field of deep space navigation and where MONTE fits into the current Python landscape. The second half gives an overview of the main MONTE libraries and provides a narrative example of how it can be used for astrodynamic analysis.

aerospace↗

MILK : a Python scripting interface to MAUD for automation of Rietveld analysis

Modern diffraction experiments ( e.g. in situ parametric studies) present scientists with many diffraction patterns to analyze. Interactive analyses via graphical user interfaces tend to slow down obtaining quantitative results such as lattice parameters and phase fractions. Furthermore, Rietveld refinement strategies ( i.e. the parameter turn-on-off sequences) tend to be instrument specific or even specific to a given dataset, such that selection of strategies can become a bottleneck for efficient data analysis. Managing multi-histogram datasets such as from multi-bank neutron diffractometers or caked 2D synchrotron data presents additional challenges due to the large number of histogram-specific parameters. To overcome these challenges in the Rietveld software Material Analysis Using Diffraction ( MAUD ), the MAUD Interface Language Kit ( MILK ) is developed along with an updated text batch interface for MAUD . The open-source software MILK is computer-platform independent and is packaged as a Python library that interfaces with MAUD . Using MILK , model selection ( e.g. various texture or peak-broadening models), Rietveld parameter manipulation and distributed parallel batch computing can be performed through a high-level Python interface. A high-level interface enables analysis workflows to be easily programmed, shared and applied to large datasets, and external tools to be integrated with MAUD . Through modification to the MAUD batch interface, plot and data exports have been improved. The resulting hierarchical folders from Rietveld refinements with MILK are compatible with Cinema: Debye–Scherrer , a tool for visualizing and inspecting the results of multi-parameter analyses of large quantities of diffraction data. In this manuscript, the combined Python scripting and visualization capability of MILK is demonstrated with a quantitative texture and phase analysis of data collected at the HIPPO neutron diffractometer.

97 MATHEMATICS AND COMPUTING↗

Equilipy: a python package for calculating phase equilibria

The CALPHAD (CALculation of PHAse Diagram) approach (Nigel Saunders & Miodownik, 1998) provides predictions for thermodynamically stable phases in multicomponent-multiphase materials across a wide range of temperatures. Consequently, the CALPHAD calculations became an essential tool in materials and process design (Luo, 2015). Such design tasks frequently require navigating a high-dimensional space due to multiple components involved in the system. This increasing complexity demands high-throughput CALPHAD calculations, especially in the rapidly evolving field of alloy design. In response to the need, we developed Equilipy an open-source Python package designed for calculating phase equilibria of multicomponent-multiphase systems. Equilipy is specifically tailored for high-throughput CALPHAD calculations, offering parallel computations across multiple processors and nodes with the given NPT input conditions namely elemental compositions (N), pressure (P), and temperature (T). Equilipy utilizes the program structure and Gibbs energy functions from the Fortran-based program, Thermochimica (Piro et al., 2013), with incorporating a new Gibbs energy minimization algorithm. This algorithm, originally developed by Capitani and Brown in 1987 (Capitani & Brown, 1987), has been revised and implemented to enhance the stability and performance of calculations. The Fortran codes are precompiled and interfaced with Python via F2PY, ensuring high computation speed. Benchmark tests shown in Figure 1 demonstrate that Equilipy’s computation speed is comparable to those of established commercial software, TC-Python and PanPython. This result highlights its efficiency and potential applications in various scientific and industrial fields.

97 MATHEMATICS AND COMPUTING↗

Utilizing Commercial Hardware and Open Source Computer Vision Software to Perform Motion Capture for Reduced Gravity Flight

Long duration space travel to Mars or to an asteroid will expose astronauts to extended periods of reduced gravity. Since gravity is not present to aid loading, astronauts will use resistive and aerobic exercise regimes for the duration of the space flight to minimize the loss of bone density, muscle mass and aerobic capacity that occurs during exposure to a reduced gravity environment. Unlike the International Space Station (ISS), the area available for an exercise device in the next generation of spacecraft is limited. Therefore, compact resistance exercise device prototypes are being developed. The NASA Digital Astronaut Project (DAP) is supporting the Advanced Exercise Concepts (AEC) Project, Exercise Physiology and Countermeasures (ExPC) project and the National Space Biomedical Research Institute (NSBRI) funded researchers by developing computational models of exercising with these new advanced exercise device concepts. To perform validation of these models and to support the Advanced Exercise Concepts Project, several candidate devices have been flown onboard NASAs Reduced Gravity Aircraft. In terrestrial laboratories, researchers typically have available to them motion capture systems for the measurement of subject kinematics. Onboard the parabolic flight aircraft it is not practical to utilize the traditional motion capture systems due to the large working volume they require and their relatively high replacement cost if damaged. To support measuring kinematics on board parabolic aircraft, a motion capture system is being developed utilizing open source computer vision code with commercial off the shelf (COTS) video camera hardware. While the systems accuracy is lower than lab setups, it provides a means to produce quantitative comparison motion capture kinematic data. Additionally, data such as required exercise volume for small spaces such as the Orion capsule can be determined. METHODS: OpenCV is an open source computer vision library that provides the ability to perform multi-camera 3 dimensional reconstruction. Utilizing OpenCV, via the Python programming language, a set of tools has been developed to perform motion capture in confined spaces using commercial cameras. Four Sony Video Cameras were intrinsically calibrated prior to flight. Intrinsic calibration provides a set of camera specific parameters to remove geometric distortion of the lens and sensor (specific to each individual camera). A set of high contrast markers were placed on the exercising subject (safety also necessitated that they be soft in case they become detached during parabolic flight); small yarn balls were used. Extrinsic calibration, the determination of camera location and orientation parameters, is performed using fixed landmark markers shared by the camera scenes. Additionally a wand calibration, the sweeping of the camera scenes simultaneously, was also performed. Techniques have been developed to perform intrinsic calibration, extrinsic calibration, isolation of the markers in the scene, calculation of marker 2D centroids, and 3D reconstruction from multiple cameras. These methods have been tested in the laboratory side-by-side comparison to a traditional motion capture system and also on a parabolic flight.

Biodynamics↗

Thermal Energy Storage Model Development within the Integrated Energy Systems Hybrid Repository

This publication details newly created energy storage models developed within the HYBRID Modelica repository as part of the Department of Energy Office of Nuclear Energy (DOE-NE) Integrated Energy Systems (IES) program, led by Idaho National Laboratory (INL). Model development to-date includes creation of dynamic systems-level models of concrete, latent heat, and packed-bed thermocline energy storage technologies for deployment in the IES-based HYBRID repository. Models are developed using the latest publicly available data and incorporate the possibility of control strategy inclusion for use with the existing IES modeling, analysis, and optimization toolset. Simulations showcase the abilities of each technology to cyclically charge and discharge when exposed to time-varying boundary conditions. In addition, low-level surrogate models for some of the thermal energy storage technologies were created using Python. These lower order Python files are much cheaper to run (i.e., computationally faster) and thus operate well when incorporated within the stochastic optimization problems run for the IES program. Moreover, economic data was collected for use within the INL-developed Framework for Optimization of ResourCes and Economics (FORCE). This information is incorporated within the FORCE platform. This work has resulted in creation of systems-level models for concrete, latent heat, and thermocline thermal energy storage systems with associated control systems. Now that these models are available, they can be utilized within different integrated energy park concepts to understand optimal system operation, control, and dispatching. Moreover, given the generic nature of the models, industrial partner technologies (e.g., Storworks Power, EnergyNest) can be quickly added to the repository using the existing models as a basis. Additional dynamic models for thermal energy storage concepts can be developed and added to the HYBRID repository as needed.

25 ENERGY STORAGE↗

GPR_calculator: An on-the-fly surrogate model to accelerate massive nudged elastic band calculations

We present GPR_calculator, a package based on Python and C++ programming languages to build an on-the-fly surrogate model using Gaussian Process Regression (GPR) to approximate computationally expensive electronic structure calculations. The key idea is to dynamically train a GPR model during the simulation that can accurately predict energies and forces with uncertainty quantification. When the uncertainty is high, the costly electronic structure calculation is performed to obtain the ground truth data, which is then used to update the GPR model. To illustrate the effectiveness of GPR_calculator, we demonstrate its application in Nudged Elastic Band (NEB) simulations of surface diffusion and reactions, achieving 3-10 times acceleration compared to pure ab initio calculations. The source code is available at https://github.com/MaterSim/GPR_calculator.

Gaussian process regression↗

Service-Oriented Architecture for NVO and TeraGrid Computing

The National Virtual Observatory (NVO) Extensible Secure Scalable Service Infrastructure (NESSSI) is a Web service architecture and software framework that enables Web-based astronomical data publishing and processing on grid computers such as the National Science Foundation's TeraGrid. Characteristics of this architecture include the following: (1) Services are created, managed, and upgraded by their developers, who are trusted users of computing platforms on which the services are deployed. (2) Service jobs can be initiated by means of Java or Python client programs run on a command line or with Web portals. (3) Access is granted within a graduated security scheme in which the size of a job that can be initiated depends on the level of authentication of the user.

Jacob, Joseph↗

PY4 Four-CubeSat Swarm of PyCubed-Based Spacecraft

PY4 is a low-cost, rapid-turn-around, four-satellite technology demonstration based on the open-source PyCubed avionics framework. PyCubed is an open-source, radiation-tested CubeSat avionics platform that integrates power, computing, communication, and attitude determination and control functionality into a single low-cost module programmable entirely in the programming language Python.

Jan Michael Stupl↗