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 397 records · Page 22

Bingo: A Customizable Framework for Symbolic Regression with Genetic Programming

In this paper, we introduce Bingo, a flexible and customizable yet performant Python framework for symbolic regression with genetic programming. Bingo maintains a modular code structure for simple abstraction and easily swappable components. Fitness functions, selection methods, and constant optimization methods allow for easy problem-specific customization. Bingo also maintains several features for increased efficiency such as parallelism, equation simplification, and a C++ backend. We compare Bingo’s performance to other genetic programming for symbolic regression (GPSR) methods to show that it is both competitive and flexible.

David Randall↗

Kosh

Kosh allows codes to store, query, share data via an easy-to-use Python API. Kosh lies on top of Sina and as a result can use any database backend supported by Sina. In adition Kosh aims to make data access and sharing as simple as possible. Via "loaders" kosh can open files associated with datasets in a seemless fashion independently of the actual file format. Kosh's loader can also load data in different format, although numpy is the most usual output type. Once loaded data from sources, data can be further processed via "transformers"

Doutriaux, Charles↗

DayCent data and results for "Robust paths to net greenhouse gas mitigation and negative emissions via advanced biofuels"

DayCent data and results for:J. L. Field, T. L. Richard, E. A. Smithwick, H. Cai, M. S. Laser, D. S. LeBauer, S. P. Long, K. Paustian, Z. Qin, J. J. Sheehan, P. Smith, M. Q. Wang, L. R. Lynd, Robust paths to net greenhouse gas mitigation and negative emissions via advanced biofuels. Proceedings of the National Academy of Sciences (2020). https://doi.org/10.1073/pnas.1920877117 This zip file contains a UNIX-format DayCent model executable, input files, automation code, and associated directory structure necessary to re-produce the DayCent analysis underlying the manuscript. The main script 'autodaycent.py' (written for Python 2.7) opens an interactive command line routine that facilitates:* Calibrating the DayCent pine growth model.* Initializing DayCent for a set of case studies sites.* Executing an ensemble of model runs representing case study site reforestation, grassland restoration, or conversion to switchgrass cultivation. * Results analysis & generation of manuscript Fig. 3. Note that the interactive analysis code requires that all input files to be contained in the directory structure as uploaded, without modification. Executable versions of the DayCent model (https://www.nrel.colostate.edu/projects/daycent/) compatible with other operating systems are available upon request.Please send questions/comments to John.L.Field@gmail.com

Agro-ecosystem function and prediction↗

MontePy: a Python library for reading, editing, and writing MCNP input files.

The Monte Carlo N-Particle (MCNP) radiation transport code is a highly capable and accurate code with a long legacy. MCNP uses the Monte Carlo simulation process to simulate the path of particles (e.g., neutrons, photons, charged particles, etc.), and their interaction with materials. It is widely used in nuclear engineering, high-energy physics, and other fields. Its origins in the mid-twentieth century predate many modern software conventions. MCNP users provide an input file to MCNP, which it then uses to create an internal representation of the simulation problem. These input files originally had to be stored as punchcard decks, and the user manual still uses the terminology of cards and decks, despite moving beyond punchcards. MCNP predates nearly all modern human readable markup or data serialization languages, such as the extensible Markup Language (XML), the Standard Generalized Markup Language (SGML), YAML (YAML Ain’t Markup Language), and Javascript Object Notation (JSON). Due to this, MCNP uses an entirely custom defined syntax language for its input, making off-the-shelf libraries for XML, YAML, and JSON impossible to use for scripting various operations on MCNP input files (Kulesza et al., 2022).

97 - MATHEMATICS AND COMPUTING↗

PhyML

Python scripts for physics informed machine learning for time-dependent problems. The code implements hard constrained sequential physics-informed neural networks (HCSPINNs) using JAX library. The details of the method and implementation can be found in the following paper: Roy, P., & Castonguay, S. (2024). Exact Enforcement of Temporal Continuity in Sequential Physics- Informed Neural Networks. arXiv preprint arXiv:2403.03223. (https://arxiv.org/abs/2403.03223)

Roy, Pratanu↗

Black Box Equations of State: Creating Semi-analytic Solutions to the Noh Problem and Verifying Equation of State Interfaces

The objective of this report is threefold. First, it details a method for deriving a semi-analytic solution to the Noh Problem when using a “black-box” equation of state. Such capability allows us to perform verification on complicated, more realistic equations of state. Examples include Steinberg equations of state for materials and tabulated equations of state. The second objective is to apply the methodology to verify the singularity-eos equation of state library. We do so by solving the Rankine-Hugoinot jump conditions for the Noh Problem, ensuring singularity derives the correct solution and comparing the error to an exact implementation of the equation of state. The third objective is to perform verification of the xRAGE Eulerian hydrodynamics code when interfaced with singularity. We provide the theory, analysis, documentation for a python implementation of the proposed solver, and verification results.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

Integration of Information Management System, Workflow and Computational Tools Enabling Multiscale Modeling Within an ICME Paradigm

With the increased emphasis on reducing the cost and time to market of new materials, the need for analytical tools that enable the virtual design and optimization of materials throughout their processing - internal structure - property - performance envelope, along with the capturing and storing of the associated material and model information across its lifecycle, has become critical. This need is also fueled by the demands for higher efficiency in material testing; consistency, quality and traceability of data; product design; engineering analysis; as well as control of access to proprietary or sensitive information. Fortunately, material information management systems and physics-based multiscale modeling methods have kept pace with the growing user demands. Herein, recent efforts to develop a set of Python functions that exchange information between NASA GRC's Integrated multiscale Micromechanics Analysis Code (ImMAC) software toolset and its Integrated Computational Materials Engineering (ICME), Granta MI® database schema is presented. The goal is to enable seamless coupling between both test data and simulation data, which is captured and tracked automatically within Granta MI®, with full model pedigree information. These tools, and this type of linkage, are foundational to realizing the full potential of ICME, in which materials processing, microstructure, properties, and performance are coupled to enable application-driven design and optimization of materials and structures.

multiscale modeling; Micromechanics; Computational↗

Application of an Empirical Density Law via Python for Aqueous Plutonium Chloride Systems in MCNP6

Current aqueous plutonium processing models for criticality safety often contain significant bias due to material modeling assumptions. These solutions include plutonium chloride solutions, which are modeled as fictitious plutonium metal-water mixtures because little is known about the actual density of the solution. Furthermore, there is no current predictive capability for modeling plutonium metal-water mixtures that is approved for use at Los Alamos National Laboratory (LANL). Recent density measurements for aqueous plutonium chloride systems (PuCl 3 -HCl-H 2 O) now allow for the development and application of a more realistic density law. This work develops a Python-based density law for this ternary solution using an empirical method. This code can be used in conjunction with an MCNP6 input to determine the density and composition of a solution based upon user inputs of plutonium concentration, hydrochloric acid concentration, and temperature. The tool allows users to input plutonium and acid content of a solution in terms of molality, molarity, or concentration, and predicts density within the current data range within 1.4% of experimental data. Current preliminary MCNP6 calculations utilizing this tool have demonstrated a minimum decrease in system reactivity of 5% in comparison to the current modeling conventions. Thus, this tool enables more accurate criticality safety operational limits by better crediting chorine content while still maintaining necessary conservatism.

Density Law↗

An Open-Source Python Package for CFD Solution Verification

Informed decision-making using computational fluid dynamics (CFD) results requires quantifying the errors and uncertainties of a simulation. Verification, validation, and uncertainty quantification (VVUQ) methods were developed to address this need and have matured. However, these VVUQ analyses are often non-trivial and require CFD analysts and practitioners to have specific skill sets. This has led to the uneven adoption of VVUQ analyses, in part, based on the availability of software tools to aid CFD analysts and practitioners. Solution verification, a procedure to evaluate the accuracy of a simulation by estimating potential errors arising from the computational model and computing the uncertainties without comparing to results from a physical system, is one of the lagging VVUQ analyses as the absence of software has forced CFD analysts and practitioners to develop their own codes or piece together incomplete software from across the internet. This work presents an opensource Python package, CFDverify, to lower the barrier of entry and fill in the technological gap in solution verification. CFDverify also provides a streamlined framework to remove some potential errors in post-processing CFD results. The hope is that CFDverify can improve the quality and quantity of CFD solution verification in scientific and research studies and attract interest in developing a communal tool. This paper describes the design, features, and an example use of CFDverify.

Weinmeister, Justin [ORNL] (ORCID:0000000160090237↗

LIM1TR: Lithium-Ion Modeling with 1-D Thermal Runaway (V.1.0)

LIM1TR (Lithium-Ion Modeling with 1-D Thermal Runaway) is an open-source code that uses the finite volume method to simulate heat transfer and chemical kinetics on a quasi 1-D domain. The target application of this software is to simulate thermal runaway in systems of lithium-ion batteries. The source code for LIM1TR can be found at https://github.com/ajkur/lim1tr. This user guide details the steps required to create and run simulations with LIM1TR starting with setting up the Python environment, generating an input file, and running a simulation. Additional details are provided on the output of LIM1TR as well as extending the code with custom reaction models. This user guide concludes with simple example analyses of common battery thermal runaway scenarios. The corresponding input files and processing scripts can be found in the “Examples” folder in the on-line repository, with select input files included in the appendix of this document.

25 ENERGY STORAGE↗

Field and Model Data Associated with the Manuscript “Drivers of Streamflow Intermittency in Humid Regions: 1. Evaluating Above- and Below-ground Controls of Flow Persistence in a Forested Catchment”

This package contains field data, modeling files, and scripts supporting the investigation of the drivers of streamflow intermittency in a forested catchment. It includes the field data collected from electrical resistivity tomography (ERT) surveys, ground penetrating radar (GPR), continuous self-potential (SP) monitoring, electromagnetic (EM) imaging, groundwater and stilling well. In addition, it contains the data and results of the coupled water- and electrical-flow model developed using the COMSOL Multiphysics and Advanced Terrestrial Simulator (ATS), as well as software files and Jupyter notebooks used to process the data and generate figures in the manuscript submitted for peer review. The data archive is organized in the following directories: 1) Climate Includes hourly precipitation and daily evapotranspiration time series (2024 – 2025) provided as CSV files, alongside a text file detailing dataset units. 2) Coupled_model Contains two subfolders: Synthetic and Field_Application subfolder. Synthetic subfolder contains the ATS XML input script (can be opened using any code editor) for the four synthetic hydrological cases tested (Connected and gaining, Connected and losing, Disconnected and losing, and dry stream). It also includes other experimental cases to test the influence of precipitation and concentration gradient. For each synthetic case, the flow model simulation is executed using the ATS XML scripts and the included Python script (generate_data_set.py) to convert ATS output to COMSOL-ready input. COMSOL Multiphysics template (.mph can be opened with the commercial software COMSOL and requires a license) is executed using the ATS output data to simulate the potential field. It also includes the Synthetic_model_plot.ipynb (can be opened using any code editor) to visualize the SP result and generate manuscript figures. The data subfolder contains mesh files to run both the ATS (.exo and .stl files can be viewed using Paraview; .h5 files can be opened using HDFView software and h5py Python package) and COMSOL models. Field_Application subfolder contains two subfolders: ES_MDA_inversion and Final_Model. ES_MDA_inversion contains the Python script (.py can be opened using any code editor) and SP observation data used to run the Ensemble Smoother with Multiple Data Assimilation (ES-MDA) inversion sequence to get the optimal model parameters. The Final_model subfolder contains the ATS XML input scripts, data files, output data for the two SP sites. The same workflow steps outlined for the Synthetic subfolder apply here. It also contains the Jupyter notebook (Plot_final_calib.ipynb) to visualize the results of the modeled SP, stream-groundwater exchange and moisture content. 3) Discharge Includes the electrical conductivity (EC) time series (provided as CSV files) from salt slug injections. It also includes the Jupyter notebook (Discharge_process.ipynyb) used to estimate discharge. All discharge measurements collated into rating_curve_processed.csv 4) EM Contains the CSV file of the EM data from the DUALEM-42, including spatial coordinates (x, y, z), apparent conductivity, and in-phase measurements at 2 m coil separations for horizontal coplanar (HCP) and perpendicular (PRP) geometries. 5) ERT Contains raw resistivity data (provided as CSV files), spatial location of each of the electrodes (provided as CSV files), and files used for the resistivity inversion (.resipy can be opened with the open-source ResIPy software). 6) GPR Includes GPR field datasets collected at 100 MHz and 250 MHz antenna frequencies, along with the processing/interpretation project file (GPR_process.gpz can be viewed using EKKO_Project 6, a commercial software by Sensors & Software that requires a license). 7) Slug_test Includes the slug test data at all the groundwater wells provided as CSV files, as well as the Jupyter notebook (Slug_test.ipynb) for calculating hydraulic conductivity. 8) SP Contains the SP data collected in field at the two SP sites (one in the perennial reach and the other in the intermittent reach), provided as DAT files. 9) Well_data Contains two subfolders: 1) Raw, which provides unprocessed pressure, electrical conductivity and temperature timeseries downloaded from the loggers in all the groundwater and stilling wells, and 2) Processed, which contains sorted, QA/QC timeseries data for each well. The data archive also contains data_process.ipynb, a Jupyter notebook used for field data analysis and generating figures (plotting well, SP, climate, and discharge data, as well as calculating head gradient at sites with nested groundwater wells). It also includes DTW.ipynb, a Jupyter notebook containing the code for the dynamic time warping (DTW) with sliding window to evaluate SP signal synchronicity.

ATS↗

PBjam: A Python Package for Automating Asteroseismology of Solar-like Oscillators

Asteroseismology is an exceptional tool for studying stars using the properties of observed modes of oscillation. So far the process of performing an asteroseismic analysis of a star has remained somewhat esoteric and inaccessible to nonexperts. In this software paper we describe PBjam, an open-source Python package for analyzing the frequency spectra of solar-like oscillators in a simple but principled and automated way. The aim of PBjam is to provide a set of easy-to-use tools to extract information about the radial and quadropole oscillations in stars that oscillate like the Sun, which may then be used to infer bulk properties such as stellar mass, radius, age, or even structure. Asteroseismology and its data analysis methods are becoming increasingly important as space-based photometric observatories are producing a wealth of new data, allowing asteroseismology to be applied in a wide range of contexts such as exoplanet, stellar structure and evolution, and Galactic population studies.

79 ASTRONOMY AND ASTROPHYSICS↗

Depletion capabilities in the OpenMC Monte Carlo particle transport code

A depletion solver has been implemented in OpenMC and is described herein. The depletion solver is implemented in Python and interfaces with OpenMC’s transport solver through a C++ application programming interface, which enables an in-memory transport-depletion coupling. Multiple integration methods for advancing in time have been implemented and exhibit tradeoffs in cost, accuracy, and memory use. For all time integration methods, evaluation of the matrix exponential is performed by using the incomplete partial fraction form of the Chebyshev rational approximation method. Simulations of a pressurized water reactor (PWR) pincell and a sodium-cooled fast reactor (SFR) assembly were carried out with OpenMC and Serpent. For both problems, the use of a high-fidelity depletion chain results in predictions of k eff that agree within 20–30 pcm between OpenMC and Serpent. Predicted actinide concentrations were found to agree to a fraction of a percent, and most fission product concentrations were found to agree within 1%. Here, the few cases where larger differences were observed can be attributed either to differences in how the energy dependence of fission product yields is handled or deficiencies in the nuclear data used. OpenMC simulations of the PWR and SFR problems using a simplified 228-nuclide depletion chain demonstrate that it achieves accuracy close to that of the full, high-fidelity depletion chain with respect to the studied responses.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

Data and scripts associated with the manuscript "Encoding Diel Hysteresis and the Birch Effect in Dryland Soil Respiration Models through Knowledge-Guided Deep Learning"

This package contains the data and scripts used in "Encoding Diel Hysteresis and the Birch Effect in Dryland Soil Respiration Models through Knowledge-Guided Deep Learning" (Jiang et al., 2022). The data.zip file contains the flux tower and automated chamber observations used for developing the deep learning model for modeling soil respiration. The scripts.zip file contains the Jupyter notebooks and python scripts for preprocessing the data, training the deep learning models, and postprocessing the results. The src.zip contains the source code for training the deep learning model, performing mutual information analysis, and plotting functions. The trained_models.zip contains multiple folders used for hosting the trained deep-learning models and the associated soil respiration predictions. The whole process is performed using python. We include the REAMD.md to document the python package requirements.Soil respiration in dryland ecosystems is challenging to model due to its complex interactions with environmental drivers. Knowledge-guided deep learning provides a much more effective means of accurately representing these complex interactions than traditional Q10-based models. Mutual information analysis revealed that future soil temperature shares more information with soil respiration than past soil temperature, consistent with their clockwise diel hysteresis. We explicitly encoded diel hysteresis, soil drying, and soil rewetting effects on soil respiration dynamics in a newly designed Long Short Term Memory (LSTM) model. The model takes both past and future environmental drivers as inputs to predict soil respiration. The new LSTM model substantially outperformed three Q10-based models and the Community Land Model when reproducing the observed soil respiration dynamics in a semi-arid ecosystem. The new LSTM model clearly demonstrated its superiority for temporally extrapolating soil respiration dynamics, such that the resulting correlation with observational data is up to 0.7 while the correlations of both Q10-based models and the Community Land Model (CLM) are less than 0.4. Our results underscore the high potential for knowledge-guided deep learning to replace Q10-based soil respiration modules in Earth system models.

54 ENVIRONMENTAL SCIENCES↗

Developing a Multilingual Auto-coding Interface Control for the MAVERIC-II Dynamics Simulator

Simulation model development in certain high-level languages such as Python, MATLAB, or Simulink are unparalleled by their convenience and rapid turnover time. However, legacy simulation engines often depend on more traditional languages such as FORTRAN or C/C++. The NASA Marshall Aerospace Vehicle Representation in C version II (MAVERIC-II) is a modular, legacy-derived computer program used for high-fidelity, 6 degree-of-freedom (6DOF) simulation for aerospace vehicle flights and analyses of guidance and control performance with built-in mathematical modeling of environmental effects such as wind, atmosphere, and gravity as well as dispersion capability for Monte Carlo analysis. MAVERIC-II is modular in the sense that each component software element of the simulation engine may be supplanted for a higher or lower fidelity version. The design flow of the development of these models is often performed in high-level languages as mentioned previously, which must then be translated into C or C++ code to be integrated into MAVERIC-II. Using principles of model-based design, we propose a unified method of auto-coding and interfacing between several languages and MAVERIC-II, which may be generalized further to any type of 6DOF simulation engine.

Mason Nixon↗

STM/S Grid LDOS Data and Analysis Code for Deciphering Majorana Zero Modes in Topological Superconductor

This dataset provides raw millikelvin scanning tunneling microscopy/spectroscopy (STM/S) grid spectroscopy data and Python analysis scripts supporting the manuscript “Deciphering Majorana Zero Modes in Topological Superconductor FeTe0.55Se0.45 with Machine-Learning-Assisted Spectral Deconvolution.” The dataset includes a raw grid spectroscopy file acquired on FeTe0.55Se0.45 at 40 mK under magnetic field, together with Python/Jupytext analysis scripts used for STM/S data processing, visualization, spectral deconvolution, Lorentzian peak fitting, feature extraction, machine-learning-assisted clustering, and figure generation. These files support the analysis of vortex-core local density of states and the identification of zero-bias-peak-related spectral components from complex in-gap states. The dataset is intended to provide a citable archival record of the data and analysis code associated with the published manuscript and to support transparency and reproducibility of the reported STM/S and machine-learning workflow.

75 CONDENSED MATTER PHYSICS, SUPERCONDUCTIVITY AND↗

IGRINS RV: A Precision Radial Velocity Pipeline for IGRINS Using Modified Forward Modeling in the Near-infrared

Application of the radial velocity (RV) technique in the near-infrared is valuable because of the diminished impact of stellar activity at longer wavelengths, making it particularly advantageous for the study of late-type stars but also for solar-type objects. In this paper, we present the IGRINS RV open-source python pipeline for computing infrared RV measurements from reduced spectra taken with IGRINS, an R ≡ λ/Δλ ∼ 45,000 spectrograph with simultaneous coverage of the H band (1.49–1.80 μm) and K band (1.96–2.46 μm). Using a modified forward-modeling technique, we construct high-resolution telluric templates from A0 standard observations on a nightly basis to provide a source of common-path wavelength calibration while mitigating the need to mask or correct for telluric absorption. Telluric standard observations are also used to model the variations in instrumental resolution across the detector, including a yearlong period when the K band was defocused. Without any additional instrument hardware, such as a gas cell or laser frequency comb, we are able to achieve precisions of 26.8 m s{sup −1} in the K band and 31.1 m s{sup −1} in the H band for narrow-line hosts. These precisions are empirically determined by a monitoring campaign of two RV standard stars, as well as the successful retrieval of planet-induced RV signals for both HD 189733 and τ Boo A; furthermore, our results affirm the presence of the Rossiter–McLaughlin effect for HD 189733. The IGRINS RV pipeline extends another important science capability to IGRINS, with publicly available software designed for widespread use.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

A discrete integral transform for rapid spectral synthesis

Accurate synthetic spectra that rely on large Line-By-Line (LBL)-databases are used in a wide range of applications such as high temperature combustion, atmospheric re-entry, planetary surveillance and laboratory plasmas. Conventionally synthetic spectra are calculated by computing a lineshape for every spectral line in the database and adding those together, which may take multiple hours for large databases. In this paper we propose a new approach for spectral synthesis based on an integral transform: the synthetic spectrum is calculated as the integral over the product of a Voigt profile and a newly proposed three-dimensional “lineshape distribution function”, which is a function of spectral position and Gaussian- & Lorentzian width coordinates. A fast discrete version of this transform based on the Fast Fourier Transform (FFT) is proposed, which improves performance compared to the conventional approach by several orders of magnitude while maintaining accuracy. Strategies that minimize the discretization error are discussed. A Python implementation of the method is compared against state-of-the-art spectral code RADIS, and is since adopted as RADIS's default synthesis method. The synthesis of a benchmark CO2 spectrum consisting of 1.8 M spectral lines and 200k spectral points took only 3.1 s using the proposed method (1011 lines × spectral points/s), a factor ~300 improvement over the state-of-the-art, with the relative improvement generally increasing for higher number of lines and/or number of spectral points. Finally, an experimental GPU-implementation of the method was also benchmarked, which demonstrated another 2~3 orders performance increase, achieving up to 5 ∙ 10 14 lines × spectral points/s.

42 ENGINEERING↗