Search NASA⌕ Search

SEARCH · Search NASA

Results for “Python”

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

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

At least 343 records · Page 19

Revisiting the Anisotropic Complex Refractive Indices of Sodium Nitrate for Interpretation of the Reflectance Spectrum of Pressed Pellets

Reflectance spectroscopy is notoriously confounding in that the measured spectral response is highly dependent upon the morphology of the sample. Fortunately, all such perturbations are neatly encoded by the complex refractive index of the sample. Herein, we seek to quantitatively model the measured infrared reflectance spectrum of a specularly flat pressed pellet sample of the birefringent compound, sodium nitrate. Single crystals of sodium nitrate were synthesized via a slow evaporation process and spectroscopically analyzed using polarization-dependent infrared single-angle reflectance spectroscopy. The anisotropic complex refractive index was measured from 7500 to 300 cm-1 (1.33 to 33.33 µm). The deduced anisotropic optical constants were found to be consistent with those previously reported. Once measured and validated, the optical constants were applied to model the pressed pellet reflectance spectrum. It was evident that an average of the anisotropic refractive indices was insufficient to account for the measured pellet reflectance. In order to account for contributions of all possible microcrystalline orientations within the pellet, the Python package PYELLI was used to calculate a basis set of orientation-dependent reflection spectra spanning the distinct ? and ? Euler rotations of the uniaxial crystal. When the population of orientations was allowed to vary freely in a spectral fit analysis, the fit-deduced orientations were tightly clustered along f = 45º, hinting at residual anisotropy in the pressed pellet sample. Conversely, an equally valid spectral fit (with marginally worse fit metric) was obtained when the population was constrained to an isotropic distribution of orientations. Subsequent non-zero cross-polarization reflectance measurements likewise suggested anisotropy in the pellet. However, both grazing incidence wide-angle x-ray scattering and scanning electron microscopy measurements revealed that the microcrystal orientations at the surface of the pressed pellet sample were isotropically distributed (and that the average crystallite size was larger than ?/10). Application of the measured complex refractive indices for modeling the reflectance spectrum of the pressed pellet, and rectification of these seemingly contradictory observations will be discussed.

Wilhelm, Michael J.↗

Design and performance of AI agents interfacing with an atomic layer deposition tool

In this work, we introduce the design of an atomic layer deposition (ALD) reactor augmented with an AI interface for autonomous materials synthesis. Our modular design encapsulates the particularities of the hardware behind a Python interface that communicates with the ALD control software via transmission control protocol. This interface is compatible with model context protocol interfaces used in agentic frameworks. We have integrated our tool with a simple AI agent that leverages a large language model to transform user-supplied queries into ALD processes that are then run in our reactor. Our approach uses a JavaScript object notation schema to encode ALD processes. Our experimental results show that the AI interface does not impose a significant overhead to our control software, at least within our fastest 10 ms scale. We also carried out a detailed evaluation of the agent performance using leading models in two classes of tasks: basic instruction and process discovery tasks, where the agent is presented with a target material and needs to identify the correct ALD process compatible with the reactor configuration. Despite the simplicity of our agent design, we observed that most of the advanced models excelled at the instruction tasks. However, only recent models, such as o1, o3, GPT-5, and Claude Opus 4, performed well in process discovery tasks. We also observed significant variability in the response for the hardest challenges. While the results obtained are promising, we identify areas where AI research could improve the performance of agents for ALD.

47 OTHER INSTRUMENTATION↗

Quasiclassical sampling and Wigner sampling of initial vibrational coordinates and momenta for polyatomic molecules in Monte Carlo molecular dynamics simulations

In a quasiclassical trajectory simulation, the vibrational modes are initialised with quantised vibrational energies, but vibrational phases are sampled by Monte Carlo. This requires an algorithm to assign coordinates and momenta to the various atoms. In this work, we present two methods for implementing this for nonrotating polyatomic molecules, namely, fixed-energy vibrational-state-selected initial conditions and thermal initial conditions. We also present a method for initiating classical trajectories with a ground-state Wigner distribution. These vibrational treatments are sufficient to initialise trajectories for unimolecular processes, and we also show how they can be applied to simulate bimolecular collision processes. The treatments of unimolecular and bimolecular collision processes are available in two Python codes called wigner_state_selected.py and bimolecular_collision.py, respectively, which will generate initial condition files that are recognisable by the SHARC and SHARC-MN computer programs for dynamics calculations. Both codes are available as standalone programs, as well as being included in SHARC-MN, and they will be included in future versions of SHARC. Here, the methods implemented in these codes are mostly also available in the ANT computer program, and those that are not available in ANT will be incorporated in future versions of ANT.

Wigner distribution↗

Balance of Plant Modeling and Real-Time Hardware-in-the-Loop Integration with the Microreactor Automated Control System

The advent of novel microreactor technology has driven a focused effort to explore safety and efficiency improvements that can be achieved through the use of automated system control. Development of control strategies, especially for initial demonstration, requires an adequate surrogate environment to safely research failure modes and control integration with realistic hardware delay. However, efficiency gains from control strategies are improved when the scope of controller action is expanded to include system-level dynamics such as downstream heat extraction and mass flow. For this reason, a balance-of-plant (BOP) model of a representative microreactor system has been developed using the TRANsient Simulation Framework of Reconfigurable Models library in Modelica. This model captures a reactor and primary NaK coolant loop that represent corresponding system components of the Microreactor Applications Research Validation and EvaLuation (MARVEL) design as well as a secondary coolant loop and heat extraction representative of the Microreactor Agile Non-Nuclear Experimental Test Bed (MAGNET). This model configuration allows for hardware-in-the-loop (HIL) integration with microreactor automated control system (MACS) hardware in real time through a Python-based gRPC client. Real-time simulation of model performance with emulated hardware and communication delay suggests that under independent proportional-integral-derivative control of BOP model drum dynamics and downstream heat extraction, stable power load following is achievable. A slight delay in load following, filtering of high-frequency dynamics, and localized temperature fluctation suggest room for improvement through the development of higher-level control strategies. The simulated coupling of the MAGNET facility lays the groundwork for future digital twin analysis with a coupled MACS-MAGNET HIL demonstration.

McConnell, Jono [ORNL] (ORCID:0000000238984741)↗

Demonstration of TOFFEE: A Response Uncertainty Quantification Tool

A key characteristic in neutron transport is nuclear data. Cross-section uncertainty is not used in MCNP6.3 to propagate response uncertainty without external analysis. Here, the TOol For Fast Error Estimation (TOFFEE) is a Python-based code developed to automate the propagation of cross-section uncertainty for MCNP evaluations. TOFFEE implements the sandwich rule to calculate the uncertainty from cross sections with sensitivity coefficients from MCNP6.3 and ENDF/B covariance data. In this paper, TOFFEE has been tested with benchmark experiments, and it has been compared to the uncertainty quantification capabilities of Sampler and TSUNAMI, within SCALE, to verify the application’s capabilities.

97 MATHEMATICS AND COMPUTING↗

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↗

High-accuracy method for modeling nucleation and growth of particles

State-of-the-art numerical models describing the kinetics of aerosol particle nucleation and growth from a cooling vapor primarily use a nodal method, in which particles that are smaller than the critical size are omitted from consideration because they are thermodynamically unfavorable. This omission is based on the assumption that most newly formed particles are above the critical size, so that subcritical-size particles are not important to take into account. Due to the nature of the nodal method, it suffers from numerical diffusion, which can cause an artificial broadening of the cluster size distribution leading to a significant overestimation of the number of large-size particles. To address these issues, we propose a more accurate numerical method that explicitly models particles of all sizes, and uses a special numerical scheme that substantially reduces the numerical diffusion and provides high solution accuracy and numerical stability. We extensively compare this novel method to the commonly used nodal solver of the general dynamic equation (GDE) for particle growth and demonstrate that it offers GDE solutions with higher accuracy with low numerical diffusion. Incorporating small subcritical clusters into the solution is crucial for: 1) more precise determination of the entire particle size distribution function and 2) wider applicability of the model to experimental studies with non-monotonic temperature variations leading to particle evaporation. The computational code implementing this numerical method in Python is available upon request.

42 ENGINEERING↗

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↗

Open-source simulation platform for air source heat pump integrated with thermal energy storage

Here, this article introduces a modular simulation platform for assessing thermal energy storage (TES) integrated with air source heat pumps (ASHP). The Python platform is an open-source library that includes classes for modeling air-air and air-water heat pumps, TES devices, and the heating load of residential buildings. To validate the ASHP model, the study utilized experimental data obtained from a commercial heat pump evaluated at the National Renewable Energy Laboratory (NREL). The results indicate a mean deviation of 0.7% for COP across the operating range, with a maximum relative deviation of 12.6%. In terms of system heating capacity, the model had an average deviation of 4.3% compared to experimental results, with a maximum deviation of 8.2%. Three classes were implemented for modeling distinct types of TES devices: a generic TES based on energy balances, a sensible isothermal water tank, and a stratified water tank. Details of the mathematical models are provided, along with their respective strengths and limitations. An example is provided showcasing the integration of a residential 10 kWh thermal storage unit with an ASHP operating in Denver, CO. The comparison of two different discharge criteria for the TES unit highlights the importance of control strategies in the system performance.

25 ENERGY STORAGE↗

Machine learning analysis of high-repetition-rate two-dimensional Thomson scattering spectra from laser-produced plasmas

With the emergence of high-repetition-rate two-dimensional Thomson scattering (TS) measurements, improving spectral data analysis is a key area of interest. Here, we present a new way to derive the electron temperature and density of laser-driven blast waves in plasmas from their TS spectra with machine learning (ML). This analysis occurs in both the non-collective (α < 1) and collective (α > 1) scattering regimes with the goal of autonomously and more accurately determining T c and n e both where spectral data has been collected and to give the ability to predict these attributes in regions where data has not been collected. We introduce three ML models, one trained only on experimental data, one only on synthetic data, and one using transfer learning, and compare their speed and accuracy with the conventional TS inversion algorithms in the open source PlasmaPy python package.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Galaxy cluster profiles: a Gaussian mixture model approach to halo miscentering

Measurements of the galaxy density and weak-lensing profiles of galaxy clusters typically rely on an assumed cluster center, which is taken to be the brightest cluster galaxy or other proxies for the true halo center defined as the minimum in the potential well. Departure of the assumed cluster center from the true halo center bias the resultant profile measurements, an effect known as miscentering bias. Currently, miscentering is typically modeled in stacked profiles of clusters with a two parameter model. We use an alternate approach in which the profiles of individual clusters are used with the corresponding likelihood computed using a Gaussian mixture model. We test the approach using halos and the corresponding subhalo profiles from the IllustrisTNG hydrodynamic simulations. We obtain significantly improved estimates of the miscentering parameters for both 3D and projected 2D profiles relevant for imaging surveys. We discuss applications to upcoming cosmological surveys. Our Python package for the Gaussian mixture model is publicly available at https://github.com/KyleMiller1/Halo-Miscentering-Mixture-Model.

Bayesian reasoning↗

Fast and flexible neutrino decoupling. Part I. The Standard Model

Cosmological determinations of the number of relativistic neutrino species, N eff , are becoming increasingly accurate, and further improvements are expected both from CMB and BBN data. Given this context, we update the evaluation of N eff and the current entropy density via the momentum-averaged approach. This allows for a numerically fast description of neutrino decoupling, easily portable to an array of new physics scenarios. We revisit all aspects of this approach, including collision terms with full electron mass dependence, finite temperature QED corrections to the equation of state, neutrino oscillations, and the modelling of neutrino ensembles with effective chemical potentials. For integrated observables, our results differ by less than 0.04% from the solution of the momentum-dependent evolution equation. We outline how to extend the approach to BSM settings, and will highlight its power in Part II. To facilitate the practical implementation, we release a Mathematica and python code within nudec_BSM_v2, easily linkable to BBN codes.

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

Divertor heat load estimates on NSTX and DIII-D using new and open-source 2D inversion analysis code

A thermography inversion algorithm has been developed in the open-source Python-based computer code, HYPERION, to calculate the heat flux incident on plasma-facing components (PFCs) in axisymmetric tokamaks. The chosen mesh size at the surface significantly affects the calculated transient heat flux results. The calculated transient heat flux will exceed the real value when the mesh size tends to zero but will underestimate the real value when the mesh size is large. A criterion for determining the appropriate mesh size for the transient heat flux calculation will be discussed. The numerical scheme for HYPERION uses a 2D fully implicit finite-difference approach, allowing temperature-dependent thermal properties of PFC materials. The inversion algorithm is benchmarked against established heat flux calculation codes, TACO and THEODOR, based on thermography data from NSTX and DIII-D respectively. The primary benefits of HYPERION compared to TACO and THEODOR are that it is open-source and it allows for the optimization of mesh thickness along the substrate. The algorithm also accounts for the thermal properties of thin surface layers that characteristically form on PFCs due to plasma-material interactions. The agreement between HYPERION and THEODOR is excellent, as the percent difference between the codes is ~5% on average in the case of the DIII-D data for moderate to high heat flux. Verification tests with TACO show slightly higher average percent differences of 8% and 12%. In using HYPERION to study filaments in heat flux, the initial results indicate that small ELMs filaments significantly broaden the divertor heat flux, and decrease divertor peak flux. Compared to the inter-ELM, the small ELM filaments decrease the divertor peak surface temperature. With intermittent divertor filaments, the divertor heat flux width is comparable with that found in L-mode.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

FLARE: field line analysis and reconstruction for 3D boundary plasma modeling

The FLARE code is a magnetic mesh generator that is integrated within a suite of tools for the analysis of the magnetic geometry in toroidal fusion devices. A magnetic mesh is constructed from field line segments and permits fast reconstruction of field lines in 3D boundary plasma codes such as EMC3-EIRENE. Both intrinsically non-axisymmetric configurations (stellarators) and those with symmetry breaking perturbations of an axisymmetric equilibrium (tokamaks) are supported. The code itself is written in Modern Fortran with MPI support for parallel computing, and it incorporates object-oriented programming for the definition of the magnetic field and the material surface geometry. Extended derived types for a number of different magnetohydrodynamic equilibrium and plasma response models are implemented. The core element of FLARE is a field line tracer with adaptive step-size control, and this is integrated into tools for the construction of Poincaré maps and invariant manifolds of X-points. A collection of high-level procedures that generate output files for visualization is build on top of that. The analysis modules are build with Python frontends that facilitate customization of tasks and/or scripting of parameter scans.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Design workflow of a symmetric traveling wave antenna for fast ion production on DD tokamaks

Initial computational plasma physics scoping and a finite element method antenna modeling design workflow for a symmetric center-fed high-field side high harmonic fast wave traveling wave array (TWA) antenna are reported here. The TWA is designed to generate a test population of fast deuterium ions in an existing D–D tokamak by heating neutral beam deuterium ions, accelerating them from 80 keV to several hundred keV. The resulting fast particles are tailored to mimic key reactor energetic particle parameters with regards to exciting Alfven eigenmode instabilities, allowing for a D–D tokamak like DIII-D or ASDEX-U to replicate reactor-relevant conditions experimentally. Initial scenario scoping for high single-pass absorption as well as good preferential fast ion damping relative to electron damping was completed using the ray-tracing/Fokker–Planck codes GENRAY and CQL3D. Python RF network analysis packages were used to create a custom TWA optimization tool to inform a COMSOL flat antenna design, and Petra-M was used to study cold plasma effects. The TWA produced by this workflow has several novel features when compared to previous TWA studies, including symmetric center feeding, and passive end straps for image current cancellation for reduced impurity production. We show here that the antenna design workflow can readily produce TWA antennas optimized for reflection coefficient, image current cancellation, and launched power spectrum shape; and that a population of fast ions can be generated in the correct region of parameter space, warranting future more detailed studies.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Mesh-based multiphysics coupling acceleration for fusion neutronics through clustering for fusion blanket applications

Accurate modeling of particle transport within fusion blankets is essential for predicting performance metrics such as heat deposition and the tritium breeding ratio (TBR). However, high-fidelity coupling of thermal fluids from computational fluid dynamics (CFD) to neutronics simulations often incurs significant computational costs due to the complexity of surface intersection calculations in Monte Carlo codes. This paper presents an accelerated multiphysics coupling method for neutronics that utilizes hierarchical agglomerative clustering to map complex material property distributions to a neutronics model. Implemented within the fusion reactor design and assessment (FREDA) framework, the method leverages existing Python packages to automate the creation of clustered geometries for OpenMC. The approach is demonstrated on a sector model of an ARC-class tokamak with an immersion molten salt blanket, and an simple geometry with varying isotopic concentrations. Results show that the clustering method significantly reduces computational burden without compromising fidelity, providing a foundation for agile iteration of neutronics simulations involving multiple coupled material properties.

Bae, Jin Whan [ORNL] (ORCID:0000000326548907)↗

A generalized wind turbine cross section as a reduced-order model to gain insights in blade aeroelastic challenges

In this work, we present an approach to study the aeroelastic stability of a wind turbine by focusing on the dynamics of a blade cross section. We present a methodology to obtain a reduced-order model of the blade dynamics in the form of generalized cross-sectional quantities that approximates the aerodynamic and structural properties of the full blade. The motivation for the work is to gain a physical understanding of the influence of aerodynamic models such as dynamic wake and dynamic stall on the frequency and damping of the structure using a reduced-order model with low computational cost. The model may be coupled to two-dimensional computational fluid dynamics softwares or engineering unsteady airfoil aerodynamics models accounting for dynamic wake and dynamic stall. In the latter case, we can obtain monolithic state-space forms of the aeroelastic system of equations, which simplifies the determination of the modal parameters and therefore the study of stability. The work investigates wind turbines in operation or at standstill, where vortex-induced vibrations and stall-induced vibrations, respectively, might be an issue. The implementation is made available as part of the open-source Python package WELIB and as part of the open-source unsteady aerodynamic driver of OpenFAST.

17 WIND ENERGY↗

Comparison of steady-state analytical wake models implemented in wind farm analysis software

A common set of mathematical wind turbine wake models are implemented in a few, well-adopted computational tools for wind farm wake modelling. Although the referenced mathematical formulations are common, implementation details may lead to differences in results. This study presents a systematic comparison of the implementation of mathematical wake models in open source, Python-based wind turbine wake modelling software, and a set of the models are directly compared. Despite aligning only the mathematical model parameters and retaining the default computational model parameters, good agreement is found across most of the model implementations, and additional agreement is expected upon further parameters alignment.

17 WIND ENERGY↗