Search NASA⌕ Search

SEARCH · Search NASA

Results for “python code”

Search indexed NASA NTRS and DOE OSTI research on propulsion, heat transfer, battery materials and energy systems. Follow report and document links to the original sources.

Quote a phrase for an exact phrase match. Source license links do not imply unrestricted reuse.

At least 343 records · Page 19

DeepLensSBI: Deep inference of simulated strong lenses in ground-based surveys

This code is used to train and test machine learning models and generate results and plots presented in 2501.08524 [astro-ph.IM]. The code is written in python. The goal of this work is to train ML models trained on simulated images of strong gravitational lenses. The trained model can then quickly infer properties of the lensed objects with uncertainty quantification.

Poh, Jason [Univ. of Chicago, IL (United States)] ↗

BEST USE OF BIOMASS

SF-25-046 Biomass resources are widely available in United States, however to utilize the resources we need to assess the bioenergy pathways per their economic and environmental performance. The framework combines several developments in the research field and integrates into a software easy to use and expand upon to study various bioenergy pathways.The software code is developed in Python language and works with an Excel based dashboard.

Saurajyoti, Kar [Argonne National Laboratory (ANL)↗

A Data Processing Pipeline To Extract A Knowledge Graph From Heterogeneous Data For Socio-technical Analysis Of Critical Infrastructure Influence

The code is written in Python and consists of the following pipeline that is implemented in Apache Airflow. This pipeline intends to understand the companies that are directly or indirectly involved with a type of critical infrastructure system at some point in that system's lifecycle. The pipeline takes a configuration file that specifies a list of initial companies to consider, a geographic region of interest, and a set of SEC form types as well as other data sources (e.g. CrunchBase) from which to extract entities and relations. There are four main components to this pipeline as currently implemented: Entity Extraction, Network Construction, Analysis, and Visualization. First, Entity Extraction, is implemented as the `topear-extract_organizations` Apache Airflow workflow. Given an initial query that specifies a geographic region of interest and a time interval, the software will extract CI facilities of interest and organizations that have a direct influence relationship to those facilities (e.g. ownership). During the course of the LDRD, we focused on Electric Vehicle charging stations and this information is available via the Department of Energy (DOE) database on fueling stations maintained by NREL. Within the context of the DOE CESER project, we have focused on Battery Energy Storage Systems (BESS). Second, the Network Extraction component will iteratively construct a social network graph given the set of organizations and people extracted in the previous step. Organizations (and eventually People if desired) are then fed as a query to the `topgear-construct_social_network` Apache Airflow workflow which given a set of initial companies and data sets (e.g. SEC EDGAR form types, OpenCorporates, Crunchbase). This Airflow workflow will iteratively query such data sources to discover relationships with new organizations and people. For example, this module can iteratively query SEC EDGAR for metadata that documents the number of each type of form for the given set of companies and their location. This forms metadata represents a catalog of data sources from SEC EDGAR for the extracted social network knowledge graph. The pipeline then downloads these forms from the website and saves them in a build directory for further processing. These documents are then parsed for entities and relations. Again, we note that in additional to SEC data sources, this step can also pull in information on organizations via API services such as CrunchBase and OpenCorporates or bulk data sources. At the end of this step, the resultant social network, the Critical Infrastructure network, and the edges that encode relationships between organizations and CI facilities, form the Adversarial Socio-Technical Network (ASTN) that informs the analysis. Third, the Analysis component processes these generated ASTN. Previously, that has included the ability to compare prevalence of different vendors for a given infrastructure component type across different regions as well as identify common public and private investors across those vendors. This was demonstrated for EV Charging Stations across several different metropolitan areas within an IEEE PES GridEdge publication. More recently, we have looked at ways to identify infrastructure owners and operators of BESS with the most nameplate capacity across different states as well as other indictors of risk resulting from changes in ownership over time. Finally, the Visualization component consists of an HTML/CSS/JS framework by which users can interact geospatial, operational, and organizational relationships across a given portfolio of Critical Infrastructure facilities. The objective is to provide a library of UI/UX modules that can be repurposed for stakeholder-specific dashboards. All of the modules are related via a common event model that enables UI actions in one view to percolate across the other views.

Weaver, Gabriel [Idaho National Laboratory (INL), ↗

Estimating soil thermal inertia profiles from the passive equilibration of a temperature probe: Supporting data and code

This dataset contains measurements of soil thermal properties and organic layer thickness at three field sites on the Seward Peninsula near Nome, Alaska, USA. Code is also provided for estimation of soil thermal properties from temperature data, including a forward heat transfer mode, a library of simulated temperature data, and an inversion scheme to retrieve thermal properties from temperature measurements (Lamb et al., 2025). This dataset and code is published in support of the manuscript “Estimating Soil Thermal Inertia Profiles from the Passive Equilibration of a Temperature Probe” by Lamb et al., 2025, in which an experimental thermal measurements technique is developed. The dataset contains measurements of soil thermal properties and organic layer thickness obtained with an industry standard thermal properties analyzer and direct observations, as well as data generated using the experimental technique to estimate thermal properties and soil structure from temperature observations. All data is reported in .csv format, and all code is written in Python 3.7 using standard packages. This research was performed as a part of the NGEE Arctic project, which aims to advance model predictions of arctic carbon cycle responses to a changing climate over the 21st Century.The Next-Generation Ecosystem Experiments: Arctic (NGEE Arctic), was a research effort to reduce uncertainty in Earth System Models by developing a predictive understanding of carbon-rich Arctic ecosystems and feedbacks to climate. NGEE Arctic was supported by the Department of Energy's Office of Biological and Environmental Research. The NGEE Arctic project had two field research sites: 1) located within the Arctic polygonal tundra coastal region on the Barrow Environmental Observatory (BEO) and the North Slope near Utqiagvik (Barrow), Alaska and 2) multiple areas on the discontinuous permafrost region of the Seward Peninsula north of Nome, Alaska. Through observations, experiments, and synthesis with existing datasets, NGEE Arctic provided an enhanced knowledge base for multi-scale modeling and contributed to improved process representation at global pan-Arctic scales within the Department of Energy's Earth system Model (the Energy Exascale Earth System Model, or E3SM), and specifically within the E3SM Land Model component (ELM).

54 ENVIRONMENTAL SCIENCES↗

Validation Study of the Spacecraft Background Activation using RHESSI Data

This document serves as a brief writeup of the work done to validate CINDER2008 and the Activation Analysis Tools in the Activation in Accelerator Radiation Environments (AARE) distribution that are used to calculate the activation of spacecraft material while in orbit [1{3]. The validation study involves replicating the decay gamma spectrum as observed onboard the RHESSI spacecraft in the high-purity germanium (HPGe) detectors after crossing the South Atlantic Anomaly (SAA) [4]. The tools involved are a suite of Python scripts, the transmutation code CINDER2008 accompanied with a suite of scripts distributed with AARE,MCNPX, and MCNP6.2 [2,5{7]. Figure 1 shows the gamma ray spectrum this study replicates as the spectrum designated \Difference".

42 ENGINEERING↗

Seascape Interface Control Document (V.1)

This paper serves as the Interface Control Document (ICD) for the Seascape automated test harness developed at Sandia National Laboratories. The primary purposes of the Seascape system are: (1) provide a place for accruing large, curated, labeled data sets useful for developing and evaluating detection and classification algorithms (including, but not limited to, supervised machine learning applications) (2) provide an automated structure for specifying, running and generating reports on algorithm performance. Seascape uses GitLab, Nexus, Solr, and Banana, open source codes, together with code written in the Python language, to automatically provision and configure computational nodes, queue up jobs to accomplish algorithms test runs against the stored data sets, gather the results and generate reports which are then stored in the Nexus artifact server.

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↗

Seascape Interface Control Document (V. 2)

This paper serves as the Interface Control Document (ICD) for the Seascape automated test harness developed at Sandia National Laboratories. The primary purposes of the Seascape system are: (1) provide a place for accruing large, curated, labeled data sets useful for developing and evaluating detection and classification algorithms (including, but not limited to, supervised machine learning applications) (2) provide an automated structure for specifying, running and generating reports on algorithm performance. Seascape uses GitLab, Nexus, Solr, and Banana, open source codes, together with code written in the Python language, to automatically provision and configure computational nodes, queue up jobs to accomplish algorithms test runs against the stored data sets, gather the results and generate reports which are then stored in the Nexus artifact server.

97 MATHEMATICS AND COMPUTING↗

Seascape Interface Control Document

This paper serves as the Interface Control Document (ICD) for the Seascape automated test harness developed at Sandia National Laboratories. The primary purposes of the Seascape system are: (1) provide a place for accruing large, curated, labeled data sets useful for developing and evaluating detection and classification algorithms (including, but not limited to, supervised machine learning applications) (2) provide an automated structure for specifying, running and generating reports on algorithm performance. Seascape uses GitLab, Nexus, Solr, and Banana, open source software, together with code written in the Python language, to automatically provision and configure computational nodes, queue up jobs to accomplish algorithms test runs against the stored data sets, gather the results and generate reports which are then stored in the Nexus artifact server.

97 MATHEMATICS AND COMPUTING↗

Laser-Induced Polarization for the Electron-Ion Collider

The use of an intense ultrashort laser pulse to induce electron polarization has been proposed in existing literature. Utilizing the Python programming language, a code has been developed to recreate the local constant crossed field approximation (LCFA) with the aim of determining values for transverse polarization given a nonzero initial polarization. It has been shown that over multiple laser shots, lower values of the quantum efficiency parameter are associated with higher transverse polarization output, yet require a greater number of shots to attain maximal polarization. Moreover, the quantum efficiency parameter has been rede fined as a function of intensity for Ti:sapphire laser necessary to induce polarization in the Electron-Ion Collider.

43 PARTICLE ACCELERATORS↗

NeuralMie (v1.0): an aerosol optics emulator

The direct interactions of atmospheric aerosols with radiation significantly impact the Earth's climate and weather and are important to represent accurately in simulations of the atmosphere. This work introduces two contributions to enable a more accurate representation of aerosol optics in atmosphere models: (1) NeuralMie, a neural network Mie scattering emulator that can directly compute the bulk optical properties of a diverse range of aerosol populations and is appropriate for use in atmosphere simulations where aerosol optical properties are parameterized, and (2) TAMie, a fast Python-based Mie scattering code based on the Toon and Ackerman (1981) Mie scattering algorithm that can represent both homogeneous and coated particles. TAMie achieves speed and accuracy comparable to established Fortran Mie codes and is used to produce training data for NeuralMie. NeuralMie is highly flexible and can be used for a wide range of particle types, wavelengths, and mixing assumptions. It can represent core-shell scattering and, by directly estimating bulk optical properties, is more efficient than existing Mie code and Mie code emulators while incurring negligible error compared to existing aerosol optics parameterization schemes (0.08 % mean absolute percentage error).

54 ENVIRONMENTAL SCIENCES↗

Computational Workbench for Multibody Dynamics

PyCraft is a computer program that provides an interactive, workbenchlike computing environment for developing and testing algorithms for multibody dynamics. Examples of multibody dynamic systems amenable to analysis with the help of PyCraft include land vehicles, spacecraft, robots, and molecular models. PyCraft is based on the Spatial-Operator- Algebra (SOA) formulation for multibody dynamics. The SOA operators enable construction of simple and compact representations of complex multibody dynamical equations. Within the Py-Craft computational workbench, users can, essentially, use the high-level SOA operator notation to represent the variety of dynamical quantities and algorithms and to perform computations interactively. PyCraft provides a Python-language interface to underlying C++ code. Working with SOA concepts, a user can create and manipulate Python-level operator classes in order to implement and evaluate new dynamical quantities and algorithms. During use of PyCraft, virtually all SOA-based algorithms are available for computational experiments.

Edmonds, Karina↗

Variable-Depth Liner Evaluation Using Two NASA Flow Ducts

Four liners are investigated experimentally via tests in the NASA Langley Grazing Flow Impedance Tube. These include an axially-segmented liner and three liners that use reordering of the chambers. Chamber reordering is shown to have a strong effect on the axial sound pressure level profiles, but a limited effect on the overall attenuation. It is also shown that bent chambers can be used to reduce the liner depth with minimal effects on the attenuation. A numerical study is also conducted to explore the effects of a planar and three higher-order mode sources based on the NASA Langley Curved Duct Test Rig geometry. A four-segment liner is designed using the NASA Langley CDL code with a Python-based optimizer. Five additional liner designs, four with rearrangements of the first liner segments and one with a redistribution of the individual chambers, are evaluated for each of the four sources. The liner configuration affects the sound pressure level profile much more than the attenuation spectra for the planar and first two higher-order mode sources, but has a much larger effect on the SPL profiles and attenuation spectra for the last higher-order mode source. Overall, axially variable-depth liners offer the potential to provide improved fan noise reduction, regardless of whether the axially variable depths are achieved via a distributed array of chambers (depths vary from chamber to chamber) or a group of zones (groups of chambers for which the depth is constant).

Jones, M. G.↗

A Modified Algorithm and Open-Source Computational Package for the Determination of Infrared Optical Constants Relevant to Astrophysics

Infrared (IR) telescopes, such as Spitzer and SOFIA, have revealed a rich variety of chemical species trapped in interstellar ices. The most fundamental parameters to be derived from observed IR spectra are the identity and abundance of each component. Several compounds have been conclusively or tentatively identified, but the band strengths and optical constants needed to derive accurate abundances for many of these are poorly constrained. We have developed a modified approach to the extraction of the real and imaginary parts of the refractive index (optical constants) of a thin film from a single transmission spectrum measured in the IR spectral range. Our algorithm is similar to those implemented by previous authors, with some major changes that yield results for strong absorptions where previous approaches fail: (1) an adaptive k-correction step size, (2) the use of a root-finding algorithm to obtain a more accurate k-correction at each iteration, and (3) a k-correction step that prevents non-physical results such as negative n-values that prevent convergence in the calculation algorithm. The algorithm is presented and described, with examples to show agreement with some existing results and improvements upon others. New optical-constants calculations for CH3OH, CO2, N2O, and CH4 are presented, and potential implications for the modeling of interstellar and planetary ice data from space telescopes are discussed. With the objective of being open-source and transparent, the full source code in the free Python programming language is made available along with the compiled version and the laboratory data used to produce the results shown.

Perry A. Gerakines↗

ARM Data Integrator

The Atmospheric Radiation Measurement (ARM) Data Integrator (ADI) streamlines the development of scientific algorithms and analysis of time-series NetCDF data, and improves the content and consistency of the output data products produced by these algorithms. The framework automates the process of retrieving and preparing data for analysis, and allows users to design output data products through a graphical interface. It also provides a modular, flexible software development architecture that scientists can use to generate C, Python, and IDL source code templates that embed the pre and post processing logic allowing the scientist to focus on only their science. The input data, preprocessing, and output data specifications of algorithms are defined through a graphical interface and stored in a database. ADI implements workflow for data integration and supports user access to data through a library of software modules. Data preprocess capabilities supported include automated retrieval of data from input files, merging the retrieved data into appropriately sized chunks, and transformation of the data onto a common coordinate system grid. Through the graphical interface, users can view the details of both their data products and those in the ARM catalog and allows developers to use existing data product to build new data products. Views of the output data products include an overlay of how the design meets ARM archive's data standards providing the user with a visual cue indicating where their output violates an archive standard. The ADI libraries access the information provided through the GUI via a Postgres database. The ADI framework and its supporting components can significantly decrease the time and cost of implementing scientific algorithms while improving the ability of scientists to disseminate their results.

Source record↗

Introducing GEOPHIRES v2.0: Updated Geothermal Techno-Economic Simulation Tool: Preprint

This paper presents an updated version of the geothermal techno-economic simulation tool GEOPHIRES (GEOthermal Energy for Production of Heat and electricity (IR) Economically Simulated). GEOPHIRES combines reservoir, wellbore, surface plant and economic models to estimate the capital, and operation and maintenance costs, lifetime energy production, and overall levelized cost of energy of a geothermal plant. The available end-use options are electricity, direct-use heat and cogeneration. The main updates in the new version include conversion of the source code from FORTRAN to Python, the option to couple to an external reservoir simulator, updated cost correlations, and more flexibility in selecting the time step and number of injection and production wells. An overview of all the updates and two case-studies to illustrate the tool's new capabilities are provided in this paper.

15 GEOTHERMAL ENERGY↗

Introducing GEOPHIRES v2.0: Updated Geothermal Techno-Economic Simulation Tool

This paper presents an updated version of the geothermal techno-economic simulation tool GEOPHIRES (GEOthermal energy for Production of Heat and electricity ('IR') Economically Simulated). GEOPHIRES combines engineering models of the reservoir, wellbores, and surface plant facilities of a geothermal plant with an economic model to estimate the capital and operation and maintenance costs, lifetime energy production, and overall levelized cost of energy. The available end-use options are electricity, direct-use heat, and cogeneration. The main updates in the new version include conversion of the source code from FORTRAN to Python, the option to import temperature data (e.g., measured or from stand-alone reservoir simulator), updated cost correlations, and more flexibility in selecting the time step and number of injection and production wells. In this paper, we provide an overview of all the updates and two case studies to illustrate the tool's new capabilities.

15 GEOTHERMAL ENERGY↗

MCNP AND CFD MODELING OF A SODIUM FAST REACTOR SUB-ASSEMBLY CHANNEL TO CAPTURE LOCALIZED TEMPERATURE PEAKING

Typical evaluation tools for sodium-cooled fast reactors (SFR) use simplified neutronic/thermal models to efficiently compute the power and temperature distributions within the core. However, their modeling capability can be limited in extreme cases such as when sharp inter-assembly power gradients occur, or for non-standard SFR assembly geometries. Higher fidelity tools that rely on Monte Carlo methods for neutron transport, and Computational Fluid Dynamics (CFD) for thermal analysis, are better suited in these instances. The higher accuracy comes at the cost of higher computational expense. MCNP and STAR CCM+ were selected for this analysis. While MCNP is capable of generating pin-level power distributions for a whole-core SFR model, it is prohibitively expensive to then conduct CFD analysis for every single assembly. A semi-empirical model was therefore developed to rapidly estimate pin temperature distributions throughout the whole core. It relies on a geometric correction factor for turbulent flow-mixing. The correction factor is obtained from a CFD simulation of a single fuel assembly with a uniform power distribution and an adiabatic boundary condition. Without using CFD, each sub-channel outlet temperature is calculated separately using 1-D heat-balance and Nusselt number correlations and the MCNP calculated pin-powers. The rudimentary 1-D model is then corrected for the flow-mixing effect based on the CFD data. The temperature calculation is performed by a code written in the Python language called CFD Monte-Carlo Developed Reconstruction of Sub-channel at a Quasi-Representative Level (CMDR-SQRL). CMDR-SQRL was shown to adequately predict CFD evaluated temperature distribution for a wide range of SFR configurations, including an extreme case with fuel assemblies nearby containing moderating material. The agreement demonstrates how geometric and power-driven effects can be decoupled within an SFR assembly. CMDR-SQRL is intended to be mainly used for scoping studies to provide core-wide evaluations efficiently.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗