Engineering Papers⌕ Search

SEARCH · Engineering Papers

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 1,063 records · Page 59

A model investigation of the impact of lower hybrid wave scattering angle on current drive profile in EAST and Alcator C-Mod

Lower hybrid current drive (LHCD) is beneficial for developing a steady-state operation scenario in a tokamak. This paper conducts a modeling investigation to identify an optimum rotation angle of the initial lower hybrid perpendicular (to the background magnetic field $\overrightarrow{B}$) wavevector for best matching the experimental RF current profile. It is hypothesized that central RF power deposition widely observed in the present-day LHCD experiments arises from wave scattering by turbulence. In a standard model without considering such interactions, the predicted power deposition profile is generally broad with off-axis peaking, not in agreement with experimental observations. A heuristic approach is adopted by introducing a spectral broadening mechanism by modifying the initial orientation of the perpendicular wavevector. The ray-tracing/Fokker–Planck solver GENRAY/CQL3D is utilized within the python-based π-scope framework. A focus is given to identify the perpendicular wavenumber orientation angle with respect to the magnetic surface normal vector at the initial ray location. Our modeling study shows that rotating the perpendicular wavevector in such a way as to increase the initial poloidal component is effective in reproducing the centrally peaked current profile observed in normal shear plasmas on both EAST and C-Mod. These waves can readily be absorbed to the central plasma, which reduces the sensitivity of the power deposition profile to a slight change of the plasma condition. The same approach is also found to help broaden the off-axis power deposition profile in a reverse-shear EAST plasma, leading to a better agreement with the experiment. The results presented here suggest that spectral modification arising from edge density fluctuations in a tokamak may need to be considered in understanding wave propagation and absorption. A further experimental and theoretical/modeling study is vital as a reverse approach is adopted in this study. Finally, our work suggests that mitigation or control measures are critical for parasitic effects occurring on the first pass in a reactor regime.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

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)↗

Developments in SRW Code and Sirepo Framework Supporting Simulation of Time-Dependent Coherent X-ray Scattering Experiments

Physical optics simulations for beamlines and experiments are essential for the effective use of synchrotron light source facilities such as NSLS-II at BNL. The SRW software package supports such source-to-detector simulations for coherent X-ray scattering and imaging experiments through its Python interface and Sirepo browser-based graphical user interface. This allows one to define custom sample models, assess the feasibility of an experiment, and estimate most appropriate beamline settings before using valuable beamtime. We discuss the recent use of general-purpose GPU resources and coherent mode decomposition algorithms in SRW to accelerate physical optics simulations with partially coherent X-rays. To illustrate these new capabilities, we describe simulations of typical time series of partially coherent scattering images used in X-ray Photon Correlation Spectroscopy (XPCS) experiments; aiming to characterize the nanoscale dynamics of a disordered sample, representing a solution of nanoparticles undergoing Brownian diffusion.

36 MATERIALS SCIENCE↗

Evaluating Awkward Arrays, uproot, and coffea as a query platform for High Energy Physics Data

Query languages for High Energy Physics (HEP) are an ever present topic within the field. A query language that can efficiently represent the nested data structures that encode the statistical and physical meaning of HEP data will help analysts by ensuring their code is more clear and pertinent. As the result of a multi-year effort to develop an in-memory columnar representation of high energy physics data, the NumPy, Awkward Array, and uproot Python packages present a mature and efficient interface to HEP data. Atop that base, the coffea package adds functionality to launch queries at scale, manage and apply experiment-specific transformations to data, and present a rich object-oriented columnar data representation to the analyst. Recently, a set of Analysis Description Language (ADL) benchmarks has been established to compare HEP queries in multiple languages and frameworks. In this paper we present these benchmark queries implemented within the coffea framework and discuss their readability and performance characteristics. We find that the columnar queries perform as well or better than the implementations given in previous studies.

Gray, L.↗

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↗

SHADOW4: the popular ray tracing revived for evolving synchrotron sources in fourth-generation storage rings

We present SHADOW4, a new version of the popular ray tracing code. The SHADOW kernel has been completely rewritten in Python applying modern concepts of software engineering. A new user interface is available in the OASYS ecosystem. The new tool has been designed and implemented preparing the future needs both in computing (cloud computing, AI integration) and in the transit to fourth generation sources and beyond.

Sanchez del Rio, Manuel↗

Parametrizations of coupled betatron motion for strongly coupled lattices

The coupling of transverse motion is a natural occurrence in particle accelerators, either in the form of a residual coupling arising from imperfections or originating by design from strong systematic coupling fields. While the first can be treated perturbatively, the latter requires a robust approach adapted to strongly coupled optics, and a parametrization of the linear optics must be performed to explore beam dynamics in such peculiar lattices. This work highlights the key physical interpretations of the main parametrization formalisms to describe linear coupled optics, along with explicit links and comparisons of these parametrizations. Concepts rarely illustrated in other works, such as forced mode flips and local coupling, are explored in detail, clarifying some anomalies that can arise in lattice functions. The analytical methods have been implemented in a reference Python package and connected with ray-tracing and integration codes to explore examples of strongly coupled lattices, which are discussed in detail to highlight the key physical interpretations of the parametrizations and characteristics of the lattices.

47 OTHER INSTRUMENTATION↗

Tools for unbinned unfolding

Machine learning has enabled differential cross section measurements that are not discretized. Going beyond the traditional histogram-based paradigm, these unbinned unfolding methods are rapidly being integrated into experimental workflows. Here, in order to enable widespread adaptation and standardization, we develop methods, benchmarks, and software for unbinned unfolding. For methodology, we demonstrate the utility of boosted decision trees for unfolding with a relatively small number of high-level features. This complements state-of-the-art deep learning models capable of unfolding the full phase space. To benchmark unbinned unfolding methods, we develop an extension of existing dataset to include acceptance effects, a necessary challenge for real measurements. Additionally, we directly compare binned and unbinned methods using discretized inputs for the latter in order to control for the binning itself. Lastly, we have assembled two software packages for the OmniFold unbinned unfolding method that should serve as the starting point for any future analyses using this technique. One package is based on the widely-used RooUnfold framework and the other is a standalone package available through the Python Package Index (PyPI).

47 OTHER INSTRUMENTATION↗

Neural posterior unfolding

Differential cross section measurements are the currency of scientific exchange in particle and nuclear physics. A key challenge for these analyses is the correction for detector distortions, known as deconvolution or unfolding. Binned unfolding of cross section measurements traditionally rely on the regularized inversion of the response matrix that represents the detector response, mapping pre-detector (`particle level') observables to post-detector (`detector level') observables. In this paper we introduce Neural Posterior Unfolding, a modern, Bayesian approach that leverages normalizing flows for unfolding. By using normalizing flows for neural posterior estimation, NPU offers several key advantages including implicit regularization through the neural network architecture, fast amortized inference that eliminates the need for repeated retraining, and direct access to the full uncertainty in the unfolded result. In addition to introducing NPU, we implement a classical Bayesian unfolding method called Fully Bayesian Unfolding (FBU) in modern Python so it can also be studied. These tools are validated on simple Gaussian examples and then tested on simulated jet substructure examples from the Large Hadron Collider (LHC). We find that the Bayesian methods are effective and worth additional development to be analysis ready for cross section measurements at the LHC and beyond.

Analysis and statistical methods↗

Heat load measurements for the PIP-II pHB650 cryomodule

Phase-3 testing of the pHB650 cryomodule at the PIP-II Injector Test Facility was conducted to evaluate the effectiveness of heat load mitigations performed after earlier phases of testing and to continue pinpointing any sources of unexpectedly high heat loads.. The programme measured HTTS, LTTS, and 2 K isothermal/non-isothermal loads under "standard", "linac", and "simulated dynamic" operating modes, recording data both inside the cryomodule and across the bayonet can circuits. Thermal-acoustic oscillations were eliminated by replacing the original G10 cooldown-valve stem with a stainless-steel stem fitted with wipers. A newly developed Python script automated acquisition of ACNET data, performed real-time heat-load calculations, and generated plots and tables that were posted to the electronic logbook within minutes, vastly reducing manual effort and accelerating feedback between SRF and cryogenics teams. Analysis showed that JT heat-exchanger effectiveness and temperature stratification in the two-phase and relief piping strongly influence the observed loads and helped isolate sources of excess heat. The campaign demonstrates that rigorous pre-test planning, real-time diagnostics, and automated reporting can improve both accuracy and efficiency, providing a template for future PIP-II cryomodule tests and for implementing targeted heat-load mitigations.

Porwisiak, D. [Fermilab; Wroclaw Tech. U.] (ORCID:↗

Probing quantum processor performance with pyGSTi

PyGSTi is a Python software package for assessing and characterizing the performance of quantum computing processors. It can be used as a standalone application, or as a library, to perform a wide variety of quantum characterization, verification, and validation (QCVV) protocols on as-built quantum processors. In this work, we outline pyGSTi's structure, and what it can do, using multiple examples. We cover its main characterization protocols with end-to-end implementations. These include gate set tomography, randomized benchmarking on one or many qubits, and several specialized techniques. We also discuss and demonstrate how power users can customize pyGSTi and leverage its components to create specialized QCVV protocols and solve user-specific problems.

97 MATHEMATICS AND COMPUTING↗

TEQUILA: a platform for rapid development of quantum algorithms

Variational quantum algorithms are currently the most promising class of algorithms for deployment on near-term quantum computers. In contrast to classical algorithms, there are almost no standardized methods in quantum algorithmic development yet, and the field continues to evolve rapidly. As in classical computing, heuristics play a crucial role in the development of new quantum algorithms, resulting in a high demand for flexible and reliable ways to implement, test, and share new ideas. In this paper, inspired by this demand, we introduce TEQUILA, a development package for quantum algorithms in PYTHON, designed for fast and flexible implementation, prototyping and deployment of novel quantum algorithms in electronic structure and other fields. TEQUILA operates with abstract expectation values which can be combined, transformed, differentiated, and optimized. On evaluation, the abstract data structures are compiled to run on state of the art quantum simulators or interfaces.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

Computation of the expectation value of the spin operator S^ 2 for the spin-flip Bethe–Salpeter equation

Spin-flip (SF) methods applied to excited-state approaches like the Bethe–Salpeter equation allow access to the excitation energies of open-shell systems, such as molecules and defects in solids. The eigenstates of these solutions, however, are generally not eigenstates of the spin operator S^ 2 . Even for simple cases where the excitation vector is expected to be, for example, a triplet state, the value of S^ 2 may be found to differ from 2.00; this difference is called 'spin contamination'. The expectation values S^ 2 must be computed for each excitation vector, to assist with the characterization of the particular excitation and to determine the amount of spin contamination of the state. Here, our aim is to provide for the first time in the SF methods literature a comprehensive resource on the derivation of the formulas for S^ 2 as well as its computational implementation. After a brief discussion of the theory of the SF Bethe–Salpeter equation (BSE) and some examples further illustrating the need for calculating S^ 2 , we present the derivation for the general equation for computing S^ 2 with the eigenvectors from an SF-BSE calculation, how it is implemented in a Python script, and timing information on how this calculation scales with the size of the SF-BSE Hamiltonian.

75 CONDENSED MATTER PHYSICS, SUPERCONDUCTIVITY AND↗

i- flow: High-dimensional integration and sampling with normalizing flows

In many fields of science, high-dimensional integration is required. Numerical methods have been developed to evaluate these complex integrals. We introduce the code i-flow, a python package that performs high-dimensional numerical integration utilizing normalizing flows. Normalizing flows are machine-learned, bijective mappings between two distributions. i-flow can also be used to sample random points according to complicated distributions in high dimensions. We compare i-flow to other algorithms for high-dimensional numerical integration and show that i-flow outperforms them for high dimensional correlated integrals. The i-flow code is publicly available on gitlab at https://gitlab.com/i-flow/i-flow.

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗