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 271 records · Page 15

cymyc: $\underline{C}$alabi-$\underline{Y}$au $\underline{M}$etrics, $\underline{Y}$ukawas, and $\underline{C}$urvature

We introduce cymyc, a high-performance Python library for numerical investigation of the geometry of a large class of string compactification manifolds and their associated moduli spaces. We develop a well-defined geometric ansatz to numerically model tensor fields of arbitrary degree on a large class of Calabi-Yau manifolds. cymyc includes a machine learning component which incorporates this ansatz to model tensor fields of interest on these spaces by finding an approximate solution to the system of partial differential equations they should satisfy.

differential and algebraic geometry↗

Implementing the finite-volume three-pion scattering formalism across all non-maximal isospins

We present a numerical exploration of the relativistic-field-theory (RFT) formalism for three pions with all possible values of non-maximal isospin, I πππ = 2, 1 and 0. Using the generic-isospin extension of the RFT formalism [1] and applying our open-source Python library to implement the framework, we predict a range of three-pion energies for illustrative values of the two-to-two scattering amplitudes for various finite-volume irreps also with non-zero total momentum P in the finite-volume frame. The results restrict attention to the case of a vanishing intrinsic three-body interaction so that the spectra can be understood as a baseline. In future lattice QCD calculations, deviations from these values will be translated into evidence for intrinsic three-body effects in the various scattering channels.

hadronic spectroscopy↗

Effective theory tower for μ → e conversion

We present theoretical predictions for μ → e conversion rates using a tower of effective field theories connecting the UV to nuclear physics scales. The interactions in nuclei are described using a recently developed nonrelativistic effective theory (NRET) that organizes contributions according to bound nucleon and muon velocities, ${\overrightarrow{v}}_N$ and ${\overrightarrow{v}}_μ$, with |${\overrightarrow{v}}_N$| > |${\overrightarrow{v}}_μ$|. To facilitate the top-down matching, we enlarge the set of Lorentz covariant nucleon-level interactions mapped onto the NRET operators to include those mediated by tensor interactions, in addition to the scalar and vector interactions already considered previously, and then match NRET nonperturbatively onto the Weak Effective Theory (WET). At the scale μ ≈ 2 GeV WET is formulated in terms of u, d, s quarks, gluons and photons as the light degrees of freedom, along with the flavor-violating leptonic current. We retain contributions from WET operators up to dimension 7, which requires the full set of 26 NRET operators. The results are encoded in the open-source Python- and Mathematica-based software suite MuonBridge, which we make available to the theoretical and experimental communities interested in μ → e conversion.

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

Efficient estimation of the modified Gromov–Hausdorff distance between unweighted graphs

Abstract Gromov–Hausdorff distances measure shape difference between the objects representable as compact metric spaces, e.g. point clouds, manifolds, or graphs. Computing any Gromov–Hausdorff distance is equivalent to solving an NP-hard optimization problem, deeming the notion impractical for applications. In this paper we propose a polynomial algorithm for estimating the so-called modified Gromov–Hausdorff (mGH) distance, a relaxation of the standard Gromov–Hausdorff (GH) distance with similar topological properties. We implement the algorithm for the case of compact metric spaces induced by unweighted graphs as part of Python library , and demonstrate its performance on real-world and synthetic networks. The algorithm finds the mGH distances exactly on most graphs with the scale-free property. We use the computed mGH distances to successfully detect outliers in real-world social and computer networks.

Oles, Vladyslav (ORCID:0000000188727463)↗

Calculation of machine precision second order derivatives using dual-complex numbers

It is well known that both complex and dual numbers can be employed to obtain machine precision first-order derivatives; however, neither, on their own, can compute machine precision 2nd order derivatives. To address this limitation, it is demonstrated in this paper that combined dual-complex numbers can be used to compute machine precision 1st and 2nd order derivatives. The dual-complex approach is simpler than utilizing multicomplex or hyper-dual numbers as existing dual libraries can be used as is or easily augmented to accept complex numbers, and the complexity of developing, integrating, and deploying multicomplex or hyper-dual libraries is avoided. The efficacy of this approach is demonstrated for both univariate and multivariate functions. Finally, source code examples using the Python, Julia, and Mathematica languages are provided as supplemental material.

97 MATHEMATICS AND COMPUTING↗

Implementing a unified solver for nonlinearly constrained optimization

SQP and interior-point methods (also referred to as Lagrange-Newton methods) typically share key algorithmic components, such as strategies for computing descent directions and mechanisms that promote global convergence. Building on this insight, we introduce a unifying framework with eight building blocks that abstracts the workflows of Lagrange-Newton methods. We then present Uno, a modular C++ solver that implements our unifying framework and allows the automatic combination of a wide range of strategies with no programming effort from the user. Uno is meant to (1) organize mathematical optimization strategies into a coherent hierarchy; (2) offer a wide range of efficient and robust methods that can be compared for a given instance; (3) enable researchers to experiment with novel optimization strategies; and (4) reduce the cost of development and maintenance of multiple optimization solvers. Uno’s software design allows user to compose new customized solvers for emerging optimization areas such as robust optimization or optimization problems with complementarity constraints, while building on reliable nonlinear optimization techniques. We demonstrate that Uno is highly competitive against state-of-the-art solvers filterSQP, IPOPT, SNOPT, MINOS, LANCELOT, LOQO, and CONOPT on a subset of 429 small problems from the CUTE collection. Uno is available as open-source software under the MIT license at https://github.com/cvanaret/Uno and via its C, Julia, Python, Fortran, and AMPL interfaces.

97 MATHEMATICS AND COMPUTING↗

Adiabatic quantum support vector machines

Adiabatic quantum computers can solve difficult optimization problems (e.g., the quadratic unconstrained binary optimization problem), and they seem well suited to train machine learning models. In this paper, we describe an adiabatic quantum approach for training support vector machines. We show that the time complexity of our quantum approach is an order of magnitude better than the classical approach. Next, we compare the test accuracy of our quantum approach against a classical approach that uses the Scikit-learn library in Python across five benchmark datasets (Iris, Wisconsin Breast Cancer (WBC), Wine, Digits, and Lambeq). We show that our quantum approach obtains accuracies on par with the classical approach. Finally, we perform a scalability study in which we compute the total training times of the quantum approach and the classical approach with an increasing number of features and an increasing number of data points in the training dataset. In conclusion, our scalability results show that the quantum approach obtains a 3.5–4.5x speedup over the classical approach on datasets with many (millions of) features.

Computational Complexity↗

Machine learning-driven descriptions of protein dynamics at solid-liquid interfaces

This chapter has described how ML has enabled quantitative analysis of HS-AFM data to discover the physical phenomena governing protein dynamics and ordering at solid-liquid interfaces. The research detailed in this chapter modeled the rotation models of protein nanorods, the discovery of which would otherwise not be possible. By tracking the trajectories of individual protein rods from frame to frame, it was possible to model Brownian type motion and behaviors and Levy-flight dynamics that had not previously been shown. We also described the application of the Python package AtomAI, which has been developed specifically to analyze and extract physical phenomena, providing exemplar code for training an ensemble of deep neural networks to produce the semantic segmentation of AFM data and functions for encoding and decoding local environments. We last described a combinatorial approach to analyze very noisy data with a densely covered substrate where the emergence of order for the protein liquid crystals could be elucidated. By combining the methods from Case 1 and 2, it was possible to obtain the center of mass and angle for each rod in the images and track the assembly of the rods over time into a 2D liquid crystal array on the surface of mica.

protein dynamics, solid-liquid interfaces, atomic ↗

Progressive Hedging Decomposition for Solutions of Large-Scale Process Family Design Problems

Rapid, wide-scale deployment of green process systems, such as carbon capture or water desalination systems, is essential for combatting climate change. Methods relying on traditional design or modularity fail to capture the benefits of both economies of numbers and economies of scale. We have proposed process family design, which designs a family of processes simultaneously exploiting opportunities for common elements. In previous work, we explored different optimization formulations to solve this problem. In this work, we develop a decomposition approach to tackle larger problems efficiently. We solve a water desalination case study, which is too large to solve within a reasonable timeframe with the discretization formulation. We exploit the block angular structure of the discretization problem to decompose and solve using Progressive Hedging (PH). We use the open-source Python package mpi-sppy to execute PH which allows us to leverage parallelization and a HPC cluster to further improve solution time.

Stinchfield, Georgia↗

Development of a Griffin model of the advanced test reactor

In the pursuit of a higher fidelity deterministic simulation capability of the Advanced Test Reactor, it is important to have a fast yet accurate deterministic neutronics model. Here, to achieve this, we employed an advanced two-step method. The first step involves generating homogenized cross sections using OpenMC, a cutting-edge Monte Carlo neutron transport code. OpenMC offers excellent modular capabilities, allowing for easy component integration and flexibility in incorporating new designs into the model. The second step involves deterministic transport calculations, which are performed using Griffin, a reactor physics application based on the Multiphysics Object-Oriented Simulation Environment (MOOSE). To ensure the accurate spatial resolution and assignment of material cross sections, a Cubit-generated mesh for the Advanced Test Reactor is utilized as an intermediate step between the OpenMC and Griffin models; Griffin utilizes the mesh for its finite element solution, while OpenMC material identifications are written to the mesh file to be used in Griffin material assignments. Additionally, a Python-based script converts the cross sections generated by OpenMC into the ISOXML format required by Griffin. Initial comparisons using the Griffin diffusion solver indicated good agreement between the neutron multiplication factors obtained from the standalone OpenMC model and the Griffin model, with differences of less than 10 pcm in the 2D geometry configuration; it was later determined that this agreement was likely due to compensating effect and was more likely on the order of –700 pcm relative to the OpenMC solution. However, in three-dimensional calculations, an unacceptably large error (almost 8,000 pcm) was found in the Griffin solution with the diffusion solver. Subsequent calculations using Griffin’s discrete ordinates solver demonstrated substantially improved agreement, within 116 pcm of the OpenMC solution used to generate the cross sections for Griffin. Building on this capability, future work will seek to perform more detailed validation calculations. The ultimate goal is to evaluate both transient and multiphysics simulations of the reactor.

21 SPECIFIC NUCLEAR REACTORS AND ASSOCIATED PLANTS↗

SAXS Assistant: Automated SAXS analysis for structural discovery in biologics and polymeric nanoparticles

Small-angle x-ray scattering (SAXS) is a powerful technique for assessing macromolecular structure. High-throughput SAXS is limited by the time-consuming and, at times, subjective nature of SAXS data interpretation. Here, we present SAXS Assistant, a Python-based script that streamlines SAXS data analysis to extract features for machine learning (ML) and key structural parameters, including the Guinier radius of gyration (R g ), pair distance distribution function (PDDF)-derived R g , maximum particle dimension (D max ), and Kratky plots. The script builds upon BioXTAS RAW and validates reliability via Guinier/PDDF R g agreement, an important indicator of well-measured data sets. For assistance in D max estimation, a multilayer perceptron regressor was trained with 1940 data files from the Small Angle Scattering Biological Data Bank. The model achieved a test set performance R 2 = 0.90 and mean absolute error = 11.7 Å. Training exclusively with experimental data translates analyses from researchers, including experts in the field, to the ML model, which helps assess D max estimations from PDDF. Gaussian mixture model clustering was implemented to classify profiles into structural classes based on entries in the Small Angle Scattering Biological Data Bank. Users may therefore assess the similarity between experimental samples and known biomolecular shapes within the mapped repository entries. This probabilistic clustering aids in quantifying information from Kratky and generating shape-descriptive features. SAXS Assistant accelerates SAXS data analysis through enforced quality control, ML-ready outputs, and flags for low-confidence results. In addition to providing the ability to analyze large data sets at high throughput, this tool is versatile and may serve researchers in both biological and synthetic polymer research fields.

36 MATERIALS SCIENCE↗

HTESP (High-throughput electronic structure package): A package for high-throughput ab initio calculations

High-throughput ab initio calculations are the indispensable parts of data-driven discovery of new materials with desirable properties, as reflected in the establishment of several online material databases. The accumulation of extensive theoretical data through computations enables data-driven discovery by constructing machine learning and artificial intelligence models to predict novel compounds and forecast their properties. Efficient usage and extraction of data from these existing online material databases can accelerate the next stage materials discovery that targets different and more advanced properties, such as electron–phonon coupling for phonon-mediated superconductivity. However, extracting data from these databases, generating tailored input files for different ab initio calculations, performing such calculations, and analyzing new results can be demanding tasks. Here, in this work, we introduce a software package named “HTESP” (High-Throughput Electronic Structure Package) written in Python and Bash languages, which automates the entire workflow including data extraction, input file generation, calculation submission, result collection and plotting. Our HTESP will help speed up future computational materials discovery processes.

36 MATERIALS SCIENCE↗

Graph neural networks for CO 2 solubility predictions in Deep Eutectic Solvents

Deep Eutectic Solvents (DESs) are a promising class of solvents for CO 2 capture. DESs are complex mixtures that can be designed to optimize CO solubility and overall capture process efficiency. However, the vast design landscape of DES mixtures makes experimental investigation prohibitive; as such, there is a need for computational models that can quickly and efficiently navigate the design space and inform data collection efforts. In this work, we propose Graph Neural Network (GNN) models for predicting CO 2 solubility for DESs; the GNN leverages a mixture graph representation that captures the molecular structure of the DES components as well as their intermolecular interactions. Here, we compare the GNN framework against alternative architectures (neural networks, graph convolution networks, and random forests) and data representations (molecular fingerprints, sigma profiles, and graphs). We show that the proposed approach offers superior predictive performance; specifically, we show that solubility can be predicted reliably directly from molecular structure (without the need of using sigma profiles as proposed in previous studies). This result is important, as obtaining sigma profiles requires expensive density functional theory computations. We also explored the ability of GNNs to predict solubility for new DES mixtures and operating conditions. We found that the model extrapolates across temperature reliably. However, we also found deficiencies in the ability of the model to predict solubility for DES mixtures, pressures, and molar ratio not included in the training sets; we show that this is due to an inherent lack of chemical diversity in datasets available in the literature. The proposed computational capabilities can thus help navigate the design space of DES and inform data collection efforts. Our models, data, and benchmarks are shared as Python code implemented in Jupyter notebooks.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗

Phenomena-based graph representations and applications to chemical process simulation

Rapid and robust simulation of chemical processes is critical to conduct process design, optimization, techno-economic analysis, and sustainability analysis. Yet, efficiently solving simulation models remains a challenge due to the highly coupled and nonlinear nature of the underlying algebraic equations that capture the physical phenomena taking place in the process (e.g., material and energy conservation, phase equilibrium, reactions). In this work, we show that graph-theoretic representations of the physical phenomena within unit operations can help navigate and decompose equations to systematically identify alternative approaches for fast and robust numerical solutions. Specifically, we present a graph-theoretic abstraction that captures the connectivity between the model variables/equations and use this abstraction to group variables/equations into fundamental phenomena. We show that phenomena-based decomposition of the underlying equations can help decouple nonlinearities and enforce material/energy conservation at the process level to accelerate convergence. The proposed decomposition approach differs from the more traditional sequential modular simulation approach, in which equations are grouped and decomposed by unit operations. We implemented the phenomena-based decomposition in BioSTEAM—an open-source process simulation platform in Python—and demonstrated that this approach can converge a variety of separation process models. Compared to sequential modular simulation, the phenomena-based approach can converge idealized systems faster, but it can be slower for (or even fail to converge) highly coupled and nonideal process systems.

Convergence↗

Bridging semantics, control specifications and assessment: A library for scalable demand flexibility controls

There is growing recognition that Demand Flexibility (DF) can play a major role in enhancing grid reliability, with building control applications emerging as key enablers for DF. However, the traditional approach to deploying new control applications in buildings, including those for DF, remains largely manual and tailored to individual buildings, making it difficult to scale. While research efforts have explored semantics-driven portability, DF controls specification, and assessment approaches, these initiatives are fragmented and limited in scope. This paper proposes a novel methodology, grounded in design science research, to integrate these elements and create a comprehensive DF controls library for both industry and academia. This approach is applied to develop the Demand FLEXibility controls LIBrary using Semantics (DFLEXLIBS), an extensible open-source library that provides DF controls for HVAC systems in Python. DFLEXLIBS enables portable, easy-to-deploy controls that abstract building-specific data points, facilitating assessment across diverse buildings. DFLEXLIBS features nine different control applications, and it is successfully implemented and tested across four virtual and two real buildings, bridging the gap between semantics-driven portability, DF controls specification, and rigorous performance assessment. Its benefits are measured by a reusability ratio greater than 90% and a functional overlap ratio of around 70% for the most common functions used in the library, significantly reducing time for deploying new controls.

Controls library↗

ThinCurr: An open-source 3D thin-wall eddy current modeling code for the analysis of large-scale systems of conducting structures

In this paper we present a new thin-wall eddy current modeling code, ThinCurr, for studying inductively-coupled currents in 3D conducting structures -- with primary application focused on the interaction between currents flowing in coils, plasma, and conducting structures of magnetically-confined plasma devices. The code utilizes a boundary finite element method on an unstructured, triangular grid to accurately capture device structures. The new code, part of the broader Open FUSION Toolkit, is open-source and designed for ease of use without sacrificing capability and speed through a combination of Python, Fortran, and C/C++ components. Scalability to large models is enabled through use of hierarchical off-diagonal low-rank compression of the inductance matrix, which is otherwise dense. Ease of handling large models of complicated geometry is further supported by automatic determination of supplemental elements through a greedy homology approach. Here, a detailed description of the numerical methods of the code and verification of the implementation of those methods using cross-code comparisons against the VALEN code and Ansys commercial analysis software is shown.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

High-performance data format for scientific data storage and analysis

Here, in this article, we present the High-Performance Output (HiPO) data format developed at Jefferson Laboratory for storing and analyzing data from Nuclear Physics experiments. The format was designed to efficiently store large amounts of experimental data, utilizing modern fast compression algorithms. The purpose of this development was to provide organized data in the output, facilitating access to relevant information within the large data files. The HiPO data format has features that are suited for storing raw detector data, reconstruction data, and the final physics analysis data efficiently, eliminating the need to do data conversions through the lifecycle of experimental data. The HiPO data format is implemented in C++ and JAVA, and provides bindings to FORTRAN, Python, and Julia, providing users with the choice of data analysis frameworks to use. In this paper, we will present the general design and functionalities of the HiPO library and compare the performance of the library with more established data formats used in data analysis in High Energy and Nuclear Physics (such as ROOT and Parquete). In columnar data analysis, HiPO surpasses established data formats in performance and can be effectively applied to data analysis in other scientific fields.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

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↗