Search NASA⌕ Search

SEARCH · Search NASA

Results for “SUBROUTINE”

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 235 records · Page 13

Unification of finite symmetries in the simulation of many-body systems on quantum computers

Symmetry is fundamental in the description and simulation of quantum systems. Leveraging symmetries in classical simulations of many-body quantum systems can result in significant overhead due to the exponentially growing size of some symmetry groups as the number of particles increases. Quantum computers hold the promise of achieving exponential speedup in simulating quantum many-body systems; however, a general method for utilizing symmetries in quantum simulations has not yet been established. In this work, we present a unified framework for incorporating symmetry group transforms on quantum computers to simulate many-body systems. The core of our approach lies in the development of efficient quantum circuits for symmetry-adapted projection onto irreducible representations of a group or pairs of commuting groups. We provide resource estimations for common groups, including the cyclic and permutation groups. Our algorithms demonstrate the capability to prepare coherent superpositions of symmetry-adapted states and to perform quantum evolution across a wide range of models in condensed-matter physics and ab initio electronic structure in quantum chemistry. Specifically, we execute a symmetry-adapted quantum subroutine for small molecules in first-quantization on noisy hardware and demonstrate the emulation of symmetry-adapted quantum phase estimation for preparing coherent superpositions of quantum states in various irreducible representations of a symmetry group. In addition, we present a discussion of open problems regarding treating symmetries in digital quantum simulations of many-body systems, paving the way for future systematic investigations into leveraging symmetries quantumly for practical quantum advantage. The broad applicability and rigorous resource estimation for symmetry transformations make our framework appealing for achieving provable quantum advantage on fault-tolerant quantum computers, especially for symmetry-related properties.

quantum algorithms↗

Nonvariational ADAPT algorithm for quantum simulations

We explore a nonvariational quantum state preparation approach combined with the ADAPT operator selection strategy in the application of preparing the ground state of a desired target Hamiltonian. In this algorithm, energy gradient measurements determine both the operators and the gate parameters in the quantum circuit construction. We compare this nonvariational algorithm with ADAPT-VQE and with feedback-based quantum algorithms in terms of the rate of energy reduction, the circuit depth, and the measurement cost in molecular simulation. We find that, despite using deeper circuits, this new algorithm reaches chemical accuracy at a similar measurement cost to ADAPT-VQE. Since it does not rely on a classical optimization subroutine, it may provide robustness against circuit parameter errors due to imperfect control or gate synthesis.

Tang'S, Ho Lun [Virginia Polytechnic Inst. and Sta↗

Leveraging Qubit Loss Detection in Fault-Tolerant Quantum Algorithms

Qubit loss errors constitute a dominant source of noise in many quantum hardware systems, particularly in neutral-atom quantum computers. We develop a theoretical framework to effectively detect and correct loss errors in logical algorithms and leverage such loss information in decoding. Considering general quantum error correction codes and logical circuits, we introduce a delayed-erasure decoder for experimentally motivated error models which leverages information from delayed loss detection to accurately correct loss errors, even when the precise moment of the error is unknown. Using this decoder, we identify strategies for detecting and correcting loss errors based on the logical circuit structure. For deep circuits prior to logical measurement, we explore methods to integrate loss detection into syndrome extraction with minimal overhead, identifying optimal strategies depending on the qubit loss fraction in the noise and hardware capabilities. In contrast, we find that many key algorithmic subroutines involve frequent gate teleportation, shortening the circuit depth before logical measurement and naturally replacing qubits with no additional experimental overhead. We simulate this setting using a toy model algorithm for small-angle synthesis and find a significant performance improvement as the loss fraction increases. These results provide a path forward for advancing large-scale fault-tolerant quantum computation in systems with loss error detection.

atoms↗

Optimizing the Weather Research and Forecasting Model with OpenMP Offload and Codee

Currently, the Weather Research and Forecasting model (WRF) utilizes shared memory (OpenMP) and distributed memory (MPI) parallelisms. To take advantage of GPU resources on the Perlmutter supercomputer at NERSC, we port parts of the computationally expensive routine Fast Spectral Bin Microphysics (FSBM) to NVIDIA GPUs using OpenMP device offloading directives. To facilitate this process, we explore a workflow for optimization which uses both runtime profilers and a static code inspection tool Codee to refactor the subroutine. We observe an 2.24x overall speedup for the CONUS-12km storm test case.

Wichitrnithed, Chayanon (Namo) [Odin Institute]↗

Coupled Multiphysics Modeling of Lithium-Ion Batteries for Automotive Crashworthiness Applications

Considerable advances have been made in battery safety models, but achieving predictive accuracy across a wide range of conditions continues to be challenging. Interactions between dynamically evolving mechanical, electrical, and thermal state variables make model prediction difficult during mechanical abuse scenarios. In this study, we develop a physics-based modeling approach that allows for choosing between different mechanical and electrochemical models depending on the required level of analysis. We demonstrate the use of this approach to connect cell-level abuse response to electrode-level and particle-level transport phenomena. A pseudo-two-dimensional model and simplified single-particle models are calibrated to electrical-thermal cycling data and applied to mechanically induced short-circuit scenarios to understand how the choice of electrochemical model affects the model prediction under abuse scenarios. These models are implemented using user-defined subroutines on ls-dyna finite element software and can be coupled with existing automotive crash safety models.

analysis and design of components↗

Remark on Algorithm 1012: Computing Projections with Large Datasets

In ACM TOMS Algorithm 1012, the DELAUNAYSPARSE software is given for performing Delaunay interpolation in medium to high dimensions. When extrapolating outside the convex hull of the training set, DELAUNAYSPARSE calls the nonnegative least squares solver DWNNLS to compute projections onto the convex hull. However, DWNNLS and many other available sum-of-squares optimization solvers were not intended for usage with many variable problems, which result from the large training sets that are typical in machine learning applications. Thus, a new PROJECT subroutine is given, based on the highly customizable quadratic program solver BQPD. This solution is shown to be as robust as DELAUNAYSPARSE for projection onto both synthetic and real-world datasets, where other available solvers frequently fail. Although it is intended as an update for DELAUNAYSPARSE, due to the difficulty and prevalence of the problem, this solution is likely to be of external interest as well.

97 MATHEMATICS AND COMPUTING↗

Communication Lower Bounds and Optimal Algorithms for Symmetric Matrix Computations

In this article, we focus on the communication costs of three symmetric matrix computations: (i) multiplying a matrix with its transpose, known as a symmetric rank-k update (SYRK) (ii) adding the result of the multiplication of a matrix with the transpose of another matrix and the transpose of that result, known as a symmetric rank-2k update (SYR2K) (iii) performing matrix multiplication with a symmetric input matrix (SYMM). All three computations appear in the Level 3 Basic Linear Algebra Subroutines (BLAS) and have wide use in applications involving symmetric matrices. We establish communication lower bounds for these kernels using sequential and distributed-memory parallel computational models, and we show that our bounds are tight by presenting communication-optimal algorithms for each setting. Our lower bound proofs rely on applying a geometric inequality for symmetric computations and analytically solving constrained nonlinear optimization problems. As a result, the symmetric matrix and its corresponding computations are accessed and performed according to a triangular block partitioning scheme in the optimal algorithms.

Al Daas, Hussam [Rutherford Appleton Laboratory, D↗

Julienne v1.0.0

Julienne is a compiler-portable unit-testing framework for Fortran software projects, including those that use the parallel/accelerator-programming features of Fortran 2023. Julienne achieves portability across compilers through minimalism and isolation. The minimal design ensures that Julienne uses only features supported by the majority of Fortran compilers. The isolation through zero dependencies ensures that no other projects block Julienne from building with a particular compiler. Julienne also contains with additional services that support its unit-testing code. These include functions for manipulating strings, command lines and input/output format strings; and a user-defined collective subroutine for verifying that all processes pass a test in parallel testing. Julienne's name derives from the term for vegetables sliced into thin strings: julienne vegetables. Julienne captures the authors' most frequently used thin slice of the Veggies and Sourcery software repositories while avoiding certain compiler limitations of the those two packages.

Rouson, Damian↗

RGM: Random Geological Model Generation Package

This Fortran code is to accompany a manuscript to be submitted to Computers & Geosciences, a high-impact, peer-reviewed journal in computer methods for geosciences research. This Fortran code focuses on generation of synthetic geological models using a multi-randomization strategy. Generating high-fidelity synthetic geological models, including realistic seismic reflector migration images, faults, salt bodies, and relative geological time images, is the key for many supervised machine learning methods that aim to delineate faults and other geological properties of interest from seismic migration images. Our package contains two major functionalities: generating 2D synthetic random geological models and generating 3D synthetic random geological models. In each step of the generation process, we set random values for key properties of a geological model to improve the fidelity of the resulting geological model. The package also includes example codes on how to use the random geological model generation subroutines. We name this package RGM – Random Geological Model generation package.

Gao, Kai↗

sinbad-dt-source

MCNP6 source subroutine for simulating D-T neutrons in Ti-T Target

Armstrong, Jerawan [Los Alamos National Laboratory↗

Goated: goal-oriented tensor decompositions in python

SAND2026-20464O Goated performs goal-oriented tensor decompositions in Python, enabling efficient compression of multi-dimensional simulation data. It extends common tensor decomposition methods by incorporating domain-specific knowledge, such as conservation laws in physics, through a penalty term in the optimization process. This approach improves data compression and modeling accuracy across various applications, including physics simulations, by using specialized algorithms and structure-aware subroutines to accelerate solver performance. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy's National Nuclear Security Administration under contract DE-NA0003525.

SciDAC↗

CodeScribe Agent

SF-26-086 CodeScribe introduces a structured, multi-stage pipeline that combines deterministic program analysis with LLM-powered translation to enable incremental, testable Fortran-to-C++ migration. First, `code-scribe index` traverses the project directory tree and produces `scribe.yaml` metadata files recording all modules, subroutines, and functions at each level, giving the LLM accurate structural context instead of a hallucinated codebase model. Second, `code-scribe draft` performs the deterministic portion of translation — converting Fortran types to C++ equivalents, replacing `use` statements with `#include` and `using namespace` directives, and detecting constructs requiring special handling — while embedding`scribe-prompt` annotations that guide the LLM through non-trivial cases such as statement-function-to-lambda conversions and `extern "C"` wrapper generation. Third, `code-scribe translate` applies project-specific TOML-based few-shot prompt templates and submits the composed prompt to a pluggable LLM backend (OpenAI, Anthropic, Argonne ARGO, any OpenAI-compatible endpoint, or local Hugging Face checkpoints), producing a C++ source file, a header, and a Fortran-C++ interface file for each translated routine so the codebase compiles and runs correctly throughout the migration. Beyond translation, CodeScribe includes a tool-using coding agent (`code-scribe agent`) with read, bash, edit, and write capabilities, and a bounded loop mode (`code-scribe loop`) that runs repeated stateless agent sessions over a task file with restricted tool access — enabling sustained, auditable software development workflows for broader scientific computing tasks.

Dhruv, Akash [Argonne National Laboratory (ANL), A↗

MPI nuts and bolts and more [Slides]

MPI (Message-Passing Interface) is a message-passing library interface specification. All parts of this definition are significant. MPI addresses primarily the message-passing parallel programming model, in which data is moved from the address space of one process to that of another process through cooperative operations on each process. . . MPI is a specification, not an implementation; there are multiple implementations of MPI. This specification is for a library interface; MPI is not a language, and all MPI operations are expressed as functions, subroutines, or methods, according to the appropriate language bindings that, for C and Fortran, are part of the MPI standard. MPI Forum is the organization which is responsible for the MPI Specification.

97 MATHEMATICS AND COMPUTING↗

Simulation Tools for Characterizing Stress Distribution in Laser Welded Dissimilar Joints

This project focuses on developing a thermo-metallurgical-mechanical modeling method to accurately predict the microstructural evolution and residual stress in laser welding between dissimilar metals, such as HSLA steel and high carbon equivalent (CE) gear steel. The method leverages a comprehensive material database to model the temperature and rate dependent phase transformations, along with their associated effects on material properties, such as thermal expansion and flow stress, throughout the welding process. A key innovation is the incorporation of phase transformation and phase-specific properties, which enhances the accuracy of residual stress predictions. The mixture material in the fusion zone due to the dissimilar metals will also be addressed in the numerical model. This is especially critical in scenarios involving phase transformations in the fusion zone and heat-affected zone (HAZ), where the phase changes can induce substantial residual stress variations. The material database has been generated using JMatPro. The modeling approach is implemented through a custom User Material (UMAT) subroutine, executed with the commercial finite element software Abaqus.

36 MATERIALS SCIENCE↗

High-Speed and High-Quality Field Welding Repair Based on Advanced Non-Destructive Evaluation and Numerical Modeling

Creep strength-enhanced ferritic (CSEF) steels such as Grade 91 (9Cr-1Mo-V) and Grade 92 (Fe-9Cr-2W-0.5Mo) steels are widely used in the fossil-fuel-fired and nuclear power plants. The weld integrity of these steels is crucial for power plants' safe and reliable operations. Due to harsh service conditions, the steel weld can become susceptible to environmental degradation. Field welding repair is used to restore the degraded weld’s performance where a controlled temper-bead welding technique is commonly used to temper the freshly formed martensite during welding. However, knowledge of weld repairability is limited and experimental trial and error optimization to achieve desired microstructure and joint properties is expensive and time-consuming. Many existing computational models, e.g., finite element models, are limited to solving heat conduction equation and ignoring convective heat transfer due to molten metal flow. These models can result in over-prediction of peak temperatures of weld pool and heat-affected zone (HAZ), which in turn can affect the accuracy of tempering prediction. Moreover, these finite element models require an input of the deposit profiles in advance and thus limits the usability of these models. Here, a molten pool-based, multi-pass multi-layer model has been developed based on computational fluid dynamics (CFD) approach with the Volume of Fluid (VOF) method. The model calculates the bead formation, thereby eliminating the need for pre-determined bead profiles required by finite element models. For computational efficiency, a coordinate system attached to the moving heat source is utilized. A subroutine is developed to convert the temperature profiles in the reference frame stationary to the heat source to that stationary to the workpiece. The converted thermal cycles are then imported into a microstructure model to compute the tempering kinetics and resultant hardness using a Johnson-Mehl-Avrami-Kolmogorov (JMAK), and modified Grange-Baughman parameter. The modeling approach is first developed and validated on single- and multi-pass deposition of stainless steel filler metal onto a SA-533 high strength steel substrate. The models are then applied to a multi-pass V-groove repair weld of Grade 91 steel plate as well as directed energy deposition of Grade 92 steel. Non-destructive characterization of microstructures was performed on Grade 91 and 92 steel welds. Two welding processes, cold metal transfer (CMT) and flux-cored arc welding (FCAW), were investigated for the Grade 91 steel weld samples. For the Grade 92 weld samples, three different heat inputs (low, medium, and high) of gas tungsten arc welding (GTAW) were utilized to replicate traditional field welding processes. The non-destructive evaluation (NDE) method used for this research was immersion ultrasonic testing (UT) using a micro-resolution ultrasonic imaging methodology specifically designed to operate in the through-transmission configuration operating at 20 MHz of frequency. The system used a focused ultrasonic beam spot size diameter between 250-300 μm, and a 6 μm laser vibrometer spot size for detection, to produce highly defined images with longitudinal and mode-converted shear waves. From the micro-resolution ultrasonic C-scan images, three microstructural regions, i.e., weld metal (WM), HAZ, and base metal (BM), were clearly identifiable. Various levels of ultrasonic amplitudes distributed over the three regions were correlated with electron beam backscattered diffraction (EBSD) images using grain size, grain boundaries, and dislocation densities. The results showed that areas with relatively higher ultrasonic amplitude levels were associated with smaller grains and higher dislocation densities, while areas with lower amplitude levels were associated with larger grains and lower dislocation densities. In addition, ultrasonic velocity data obtained across the three different weld microstructural regions of Grade 91 test samples were correlated with optical metallographic images and hardness measurements. The results showed distinctive decreases in ultrasonic velocity and hardness over the HAZ region, where weld failures often occur during service.

36 MATERIALS SCIENCE↗

An update to δ-ray production in MCNP6

As originally introduced in MCNP6.2, the δ-ray production subroutine had a number of flaws related to treatment of particle or nuclear spin contributions to the production cross section. A recent update by the author to the MCNP6 code corrects these flaws. This report documents those changes for the benefit of MCNP6 users who use the delta ray production capability. Additionally, this report aims to provide a more comprehensive documentation of the delta ray production, building on the prior documentation by C. Anderson and coworkers. On this latter point, the goal is to save future MCNP developers from a visit to the library to dig out ancient texts from 1952, or at least to provide useful points of reference should such a visit be necessary.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

Simulation Tools for Characterizing Stress Distribution in Laser Welded Dissimilar Joints

This project focuses on developing a thermo-metallurgical-mechanical modeling method to accurately predict the microstructural evolution and residual stress in laser welding between dissimilar metals, such as HSLA steel and high carbon equivalent (CE) gear steel. The method leverages a comprehensive material database to model the temperature and rate dependent phase transformations, along with their associated effects on material properties, such as thermal expansion and flow stress, throughout the welding process. A key innovation is the incorporation of phase transformation and phase-specific properties, which enhances the accuracy of residual stress predictions. The mixture material in the fusion zone due to the dissimilar metals will also be addressed in the numerical model. This is especially critical in scenarios involving phase transformations in the fusion zone and heat-affected zone (HAZ), where the phase changes can induce substantial residual stress variations. The material database has been generated using JMatPro. The modeling approach is implemented through a custom User Material (UMAT) subroutine, executed with the commercial finite element software Abaqus.

36 MATERIALS SCIENCE↗

Code Coverage Status of the ARC Code RCT

The Argonne Reactor Code (ARC) software system supports users in their fast reactor design goals by providing neutronic, thermal-hydraulic, and structural analysis capabilities. REBUS plays a pivotal role in the ARC system as the primary fuel cycle analysis capability for fast reactor problems. Over its 60 year history, ARC software usage with REBUS has been applied to numerous fast and thermal spectrum reactor analysis projects with good to excellent comparison against experiments. The RCT code is a later addition and uses the REBUS restart files to define its input. The RCT code was built to provide pin depletion details on EBR-II models and thus many features of RCT were specifically tailored to the needs of EBR-II models. Additional approximations were invoked which are likely only valid for the EBR-II reactor and the particular fuel management that was done for it. The purpose of the present work is to identify a set of test problems for RCT and assess the code coverage for those test problems. The goal is to document what parts of the existing RCT code are touched by the set of test problems and which are not. Because no detailed verification work has been done on RCT, the existing regression testing suite was chosen for the code coverage assessment. The code coverage analysis of RCT was performed with the Code Coverage Tool of the Intel Fortran compiler which requires modifications to the compilation of RCT. The detailed coverage tables are given for each part of RCT. As will be discussed and shown, some parts of the RCT capability that are known to be used by the EBR-II analysis work are not tested by the regression testing suite. These aspects should be resolved before major source code changes are taken for the RCT software. Because REBUS and DIF3D are not subroutines of RCT, the coverage changes in both of those codes is not altered by RCT. The same is true for all of the modules of DIF3D that are used by RCT such as SYSLIB and SEGLIB.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗