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 19 records

Development of a point kinetics subroutine for Molten Salt reactors in RELAP5-3D

RELAP5-3D has historically focused on accurate modeling of design-basis and beyond-design-basis accidents in solid fuel light-water reactors. The assumption used in solid fuel reactors that delayed neutron precursors remain at the location in which they were produced is inherently incorrect for a molten salt reactor with flowing fuel. Therefore, new methods for modeling MSR kinetics were required. Subroutine used in RELAP5-3D were updated to analyze point kinetics in a molten salt reactor during both steady state and transient analyses. The phenomena related to MSR kinetics that were added to RELAP5-3D include arrays to store previous values for independent and dependent variables, arrays to add terms to existing kinetics equations, and a new reactivity bias term. A custom MATLAB assessment code was used to establish a suite of verification tests. This capability is undergoing final documentation and testing for public release with a future version of RELAP5-3D.

21 SPECIFIC NUCLEAR REACTORS AND ASSOCIATED PLANTS↗

Assessment of Long Term Creep Using Strain Rate Matching From the Stepped Isostress Method

Creep testing is an ongoing need, particularly with the development of new candidate alloy systems for advanced energy systems. The conventional creep test (CT) is regarded as a proven method to gather creep data however, the test is impractical due to being real-time: lasting up to 105 hours to characterize the service of long-lived turbomachinery components. Accelerated methods to gather the long-term creep properties of materials are needed to reduce the time to qualification of new materials. The time-temperature-stress-superposition principle (TTSSP) and the derivative time-temperature superposition principle (TTSP), time-stress superposition principle (TSSP), stepped isothermal method (SIM), and stepped isostress method (SSM) are accelerated creep tests (ACT) commonly used to predict the long-term creep behaviors of polymers and composites. The TTSP and TSSP tests require multiple specimen tested at various temperatures/stresses whereas the SIM and SSM tests employ a single specimen where temperature/stress are periodically step increased until rupture. The stepped creep deformation curve can then be time and strain shifted to produce a master creep curve. While these ACTs are useful tools to predict long-term creep, the drawback is the lack of mathematical laws to determine the virtual start time and time shift factors, especially for different materials. In this paper, a new self-calibration approach is developed and compared to existing SSM data for Kevlar 49. This new approach focuses on matching the creep strain rates between stress steps and fitting the data to a master curve using a modified theta projection model. This is performed using a MATLAB code consisting of five subroutines. The first subroutine takes the stress, time, and creep strain from SSM/SIM tests, and segregates the data intro arrays corresponding to each stress level. The second subroutine finds the constants for the modified theta projection model for each stress level. The third subroutine performs a time shift adjustment using creep strain rate matching. The fourth subroutine calculates the accelerated time of rupture. The last subroutine generates accelerated creep versus time plots. Kevlar 49 SSM data is gathered from literature and run through the MATLAB code. The master curves generated from the MATLAB are compared to the conventional creep curve of Kevlar 49 as well as the master curve gathered from literature in order to validate the feasibility of this new approach. The goal of this project is to vet if the self-calibration approach can produce results similar to the reference calibration approach.

36 MATERIALS SCIENCE↗

Two-Tower Quantum Matrix Chain Multiplication: Trading Qubits for Depth

Matrix chain multiplication -- computing $\mathcal{W} = M^{(0)}\cdots M^{(K-1)}$ where $M^{(k)} \in \mathbb{R}^{P_k \times P_{k+1}}$-- arises in scientific computing, machine learning, and graph analysis. Despite the importance of this problem, for chains of distinct matrices, the classical number of operations grows linearly with the chain length $K$ and polynomially in the matrix dimensions. We present \emph{Two-Tower Matrix Multiplication}, a quantum subroutine that encodes the product $\mathcal{W}$ of the $K$ matrices into a quantum state in circuit depth $\mathcal{O}(\max_{k} \mathrm{polylog} (P_k P_{k+1}))$, which is independent of~$K$ within the QRAM-based state-preparation model, whereas the qubit count is $\mathcal{O}\bigl(\sum_{k} \log P_k \bigr)$; the total gate count remains linear in $K$, so the gain is in the circuit depth. The construction interleaves state-preparation operators across two layers; within each layer, all operators act on disjoint registers and execute in parallel. This subroutine can be specialized for the chain-vector case, which computes the product of $K-1$ matrices applied to a vector. We prove the correctness of the subroutine for all $K$ and provide two implementations using the Qiskit and QCLAB frameworks. The subroutine is applicable to any downstream quantum algorithm that operates on a matrix encoded in the statevector, including norm estimation, graph-matrix powers, linear system solving, and quantum machine learning kernels.

Antonioli, Giacomo [Pisa U.] (ORCID:00090000668703↗

A high-performance implementation of atomistic spin dynamics simulations on x86 CPUs

Atomistic spin dynamics simulations provide valuable information about the energy spectrum of magnetic materials in different phases, allowing one to identify instabilities and the nature of their excitations. However, the time cost of evaluating the dynamical correlation function S(q,t) increases quadratically as the number of spins N, leading to significant computational effort, making the simulation of large spin systems very challenging. In this work, here, we propose to use a highly optimized general matrix multiply (GEMM) subroutine to calculate the dynamical spin-spin correlation function that can achieve near-optimal hardware utilization. Furthermore, we fuse the element-wise operations in the calculation of S(q,t) into the in-house GEMM kernel, which results in further performance improvements of 44\% - 71\% on several relatively large lattice sizes when compared to the implementation that uses the GEMM subroutine in OpenBLAS, which is the state-of-the-art open source library for Basic Linear Algebra Subroutine (BLAS).

97 MATHEMATICS AND COMPUTING↗

Kernel fusion in atomistic spin dynamics simulations on Nvidia GPUs using tensor core

In atomistic spin dynamics simulations, the time cost of constructing the space- and time-displaced pair correlation function in real space increases quadratically as the number of spins N, leading to significant computational effort. The GEMM subroutine can be adopted to accelerate the calculation of the dynamical spin-spin correlation function, but the computational cost of simulating large spin systems (>40000 spins) on CPUs remains expensive. In this work, we perform the simulation on the graphics processing unit (GPU), a hardware solution widely used as an accelerator for scientific computing and deep learning. Here we show that GPUs can accelerate the simulation up to 25-fold compared to multi-core CPUs when using the GEMM subroutine on both. To hide memory latency, we fuse the element-wise operation into the GEMM kernel using CUTLASS that can improve the performance by 26% ~ 33% compared to implementation based on cuBLAS. Furthermore, we perform the on-the-fly calculation in the epilogue of the GEMM subroutine to avoid saving intermediate results on global memory, which makes the large-scale atomistic spin dynamics simulation feasible and affordable.

97 MATHEMATICS AND COMPUTING↗

Graph decomposition techniques for solving combinatorial optimization problems with variational quantum algorithms

The quantum approximate optimization algorithm (QAOA) has the potential to approximately solve complex combinatorial optimization problems in polynomial time. However, current noisy quantum devices cannot solve large problems due to hardware constraints. In this work, we develop an algorithm that decomposes the QAOA input problem graph into a smaller problem and solves MaxCut using QAOA on the reduced graph. The algorithm requires a subroutine that can be classical or quantum—in this work, we implement the algorithm twice on each graph. One implementation uses the classical solver Gurobi in the subroutine and the other uses QAOA. We solve these reduced problems with QAOA. On average, the reduced problems require only approximately 1/10 of the number of vertices than the original MaxCut instances. Furthermore, the average approximation ratio of the original MaxCut problems is 0.75, while the approximation ratios of the decomposed graphs are on average of 0.96 for both Gurobi and QAOA. With this decomposition, we are able to measure optimal solutions for ten 100-vertex graphs by running single-layer QAOA circuits on the Quantinuum trapped-ion quantum computer H1-1, sampling each circuit only 500 times. This approach is best suited for sparse, particularly k-regular graphs, as k-regular graphs on n vertices can be decomposed into a graph with at most $\frac{nk}{k+1}$ vertices in polynomial time. Further reductions can be obtained with a potential trade-off in computational time. In conclusion, while this paper applies the decomposition method to the MaxCut problem, it can be applied to more general classes of combinatorial optimization problems.

97 MATHEMATICS AND COMPUTING↗

Algorithm 1028: VTMOP: Solver for Blackbox Multiobjective Optimization Problems

VTMOP is a Fortran 2008 software package containing two Fortran modules for solving computationally expensive bound-constrained blackbox multiobjective optimization problems. VTMOP implements the algorithm of [32], which handles two or more objectives, does not require any derivatives, and produces well-distributed points over the Pareto front. The first module contains a general framework for solving multiobjective optimization problems by combining response surface methodology, trust region methodology, and an adaptive weighting scheme. The second module features a driver subroutine that implements this framework when the objective functions can be wrapped as a Fortran subroutine. Lastly, support is provided for both serial and parallel execution paradigms, and VTMOP is demonstrated on several test problems as well as one real-world problem in the area of particle accelerator optimization.

97 MATHEMATICS AND COMPUTING↗

Real-time time-dependent density functional theory in Quantum Espresso and related codes

A set of subroutines that interact with an existing computer program, Quantum Espresso (QE), that takes a set of electronic orbitals from QE and propagates them forward in time in response to a number of perturbations. These perturbations include the motion of ions and a wide spectrum of applied electromagnetic fields (e.g., static magnetic fields, slowly-varying electric fields, x-rays, etc.). From the time evolution of the electronic orbitals comes time-varying values of physical observables like the electronic charge and current densities and atomic forces. These are further post-processed to yield properties of interest like stopping powers, conductivities, and the dynamic structure factor. The electronic orbitals are described in a plane wave basis and the equations of motion are carried out using a unitary or approximately unitary time propagation algorithm. Related work will include subroutines for interfacing this capability, as well as others that already exist within QE, with a fork of QE that is more extensible and modular.SAND2019-12611 M 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.

Baczewski, Andrew↗

Optimization performance, fidelity, and cost: SIAM VQE

This dataset contains files storing results from classically-simulated quantum subroutines within a dynamical mean-field theory workflow, and jupyter notebooks processing the data in these files to generate plots. The files store: (1) Results from variational quantum eigensolver (VQE) simulations searching for optimal parameters allowing parametrized quantum circuits to prepare approximations to ground states of different Anderson impurity models (AIMs) (2) Results from simulations of a quantum Lanczos algorithm (QLA) estimating the Lanczos coefficients defining the continued-fraction representation of an (AIM) Green’s function Description: Any file named vqe_gs_results* stores approximations to the ground state and energy of a given AIM estimated using three different methods: (1) Numerical diagonalization (2) Ideal VQE simulation (3) VQE simulation with sampling noise For each VQE simulations metadata about the optimization (optimization results plus number of quantum circuits that would have been executed on real hardware) is also stored. Any file named qla_dos_results* estimations for the Lanczos coefficients defining the Green’s function of an AIM. The stored estimations are achieved using different methods: (1) Numerical Lanczos algorithm from initial states obtained from numerical diagonalization (2) Simulated quantum Lanczos algorithm from initial states prepared from parametrized quantum circuits yielded by corresponding ideal and noisy VQE subroutines. The dataset is used and described in M. Karabin et al., "Quantum solver for single-impurity Anderson models with particle-hole symmetry", Phys. Rev. Research 8, 033066 (2026). DOI: https://doi.org/10.1103/7ys3-tl4l

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

Reverse annealing for nonnegative/binary matrix factorization

It was recently shown that quantum annealing can be used as an effective, fast subroutine in certain types of matrix factorization algorithms. The quantum annealing algorithm performed best for quick, approximate answers, but performance rapidly plateaued. In this paper, we utilize reverse annealing instead of forward annealing in the quantum annealing subroutine for nonnegative/binary matrix factorization problems. After an initial global search with forward annealing, reverse annealing performs a series of local searches that refine existing solutions. The combination of forward and reverse annealing significantly improves performance compared to forward annealing alone for all but the shortest run times.

97 MATHEMATICS AND COMPUTING↗

SI Toolbox - Full documentation

SI Toolbox is a package for estimating the isotropy violation in the CMB sky. It can be used for estimating the BipoSH coefficients, Dipole modulation, and Doppler boost parameters etc. Different Fortran subroutines, provided with this package, can help the users to develop their independent Fortran codes. This document is an overview of the SI Toolbox installation guide, standalone facilities, and Fortran subroutines. The SI Toolbox package can be downloaded from https://github.com/SIToolBox/SIToolBox.

46 INSTRUMENTATION RELATED TO NUCLEAR SCIENCE AND ↗

Feasibility of an Accelerometer-Based Structural Health Monitoring System for the LANL Blast Tube

A modeling- and simulation-based study was conducted on the feasibility of implementing an accelerometer-based SHM system on the Los Alamos National Laboratory blast tube. A blast tube experiment was modeled using the Abaqus explicit finite element solver. A custom user subroutine was written to apply test-like pressure loading to the inside surface of the blast tube. The subroutine applies analytically defined pressure loads derived from tracer output taken from a Compressible Flow Computational Fluid Dynamics Solver model of the blast tube. Five unique versions of the model were created: an undamaged reference model at 65°F was used as the baseline and compared to equivalent models at 10°F and 100°F. These three models were compared to models with small damage at the reference temperature. The two types of damage considered were a radial (circumferential) crack in the main tube body and a longitudinal crack in the supports. Acceleration outputs were extracted from accelerometer bodies included in the model and were post processed using a variety of standard SHM techniques. Different potential features signaling failure were extracted and compared using statistical methods in the time and frequency domains. A method was identified that clearly shows that differences in structural response resulting from the modeled damage can be differentiated from the structural response resulting from changing environmental conditions. However, the amount of damage applied to create observable differences in the accelerometer data was so large that simpler methods of damage detection would be more cost effective in locating damage.

42 ENGINEERING↗

Parallel Runtime Interface for Fortran (PRIF) Specification (Rev. 0.5)

This document specifies an interface to support the parallel features of Fortran, named the Parallel Runtime Interface for Fortran (PRIF). PRIF is a proposed solution in which the runtime library is primarily responsible for implementing coarray allocation, deallocation and accesses, image synchronization, atomic operations, events, teams and collective subroutines. In this interface, the compiler is responsible for transforming the invocation of Fortran-level parallel features into procedure calls to the necessary PRIF subroutines. The interface is designed for portability across shared- and distributed-memory machines, different operating systems, and multiple architectures. Implementations of this interface are intended as an augmentation for the compiler's own runtime library. With an implementation-agnostic interface, alternative parallel runtime libraries may be developed that support the same interface. One benefit of this approach is the ability to vary the communication substrate. A central aim of this document is to define a parallel runtime interface in standard Fortran syntax, which enables us to leverage Fortran to succinctly express various properties of the procedure interfaces, including argument attributes.

97 MATHEMATICS AND COMPUTING↗

Parallel Runtime Interface for Fortran (PRIF) Specification (Rev. 0.6)

This document specifies an interface to support the multi-image parallelism features of Fortran, named the Parallel Runtime Interface for Fortran (PRIF). PRIF is a solution in which a runtime library is primarily responsible for implementing coarray allocation, deallocation and accesses, image synchronization, atomic operations, events, teams and collective subroutines. The Fortran compiler is responsible for transforming the invocation of Fortran-level multi-image parallelism features into procedure calls to the necessary PRIF subroutines. The interface is designed for portability across shared- and distributed-memory machines, different operating systems, and multiple architectures. Implementations of this interface are intended as an augmentation for the compiler's own runtime library. With an implementation-agnostic interface, alternative parallel runtime libraries may be developed that support the same interface. One benefit of this approach is the ability to vary the communication substrate. A central aim of this document is to define a parallel runtime interface in standard Fortran syntax, which enables us to leverage Fortran to succinctly express various properties of the procedure interfaces, including argument attributes.

97 MATHEMATICS AND COMPUTING↗

A publicly available PyTorch-$\mathrm{ABAQUS}$ $\mathrm{UMAT}$ deep-learning framework for level-set plasticity

Here this paper introduces a publicly available PyTorch-ABAQUS deep-learning framework of a family of plasticity models where the yield surface is implicitly represented by a scalar-valued function. In particular, our focus is to introduce a practical framework that can be deployed for engineering analysis that employs a user-defined material subroutine (UMAT/VUMAT) for ABAQUS, which is written in FORTRAN. To accomplish this task while leveraging the back-propagation learning algorithm to speed up the neural-network training, we introduce an interface code where the weights and biases of the trained neural networks obtained via the PyTorch library can be automatically converted into a generic FORTRAN code that can be a part of the UMAT/VUMAT algorithm. To enable third-party validation, we purposely make all the data sets, source code used to train the neural-network-based constitutive models, and the trained models available in a public repository. Furthermore, the practicality of the workflow is then further tested on a dataset for anisotropic yield function to showcase the extensibility of the proposed framework. A number of representative numerical experiments are used to examine the accuracy, robustness and reproducibility of the results generated by the neural network models.

36 MATERIALS SCIENCE↗

An anisotropic viscoplasticity model for shale based on layered microstructure homogenization

Viscoplastic deformation of shale is frequently observed in many subsurface applications. Many studies have suggested that this viscoplastic behavior is anisotropic—specifically, transversely isotropic—and closely linked to the layered composite structure at the microscale. In this work, we develop a two-scale constitutive model for shale in which anisotropic viscoplastic behavior naturally emerges from semianalytical homogenization of a bilayer microstructure. The microstructure is modeled as a composite of soft layers, representing a ductile matrix formed by clay and organics, and hard layers, corresponding to a brittle matrix composed of stiff minerals. This layered microstructure renders the macroscopic behavior anisotropic, even when the individual layers are modeled with isotropic constitutive laws. Using a common correlation between clay and organic content and magnitude of creep, we apply a viscoplastic modified Cam-Clay plasticity model to the soft layers, while treating the hard layers as a linear elastic material to minimize the number of calibration parameters. We then describe the implementation of the proposed model in a standard material update subroutine. The model is validated with laboratory creep data on samples from three gas shale formations. We also demonstrate the computational behavior of the proposed model through simulation of time-dependent borehole closure in a shale formation with different bedding plane directions.

58 GEOSCIENCES↗

Implementation and verification of a user-defined element (UEL) for coupled thermal-hydraulic-mechanical-chemical (THMC) processes in saturated geological media

Efficient and accurate modeling of the coupled thermal-hydraulic-mechanical-chemical (THMC) processes in various rock formations is indispensable for designing energy geo-structures such as underground repositories for high-level nuclear wastes. Here, this work focuses on developing and verifying an implicit finite element solver for generic coupled THMC problems in geological settings. Starting from the mass, momentum, and energy balance laws, a specialized set of governing equations and a thermoporoelastic constitutive model is derived. This system is then solved by an implicit finite element (FE) scheme. Specifically, the residuals and the Jacobians are scripted in a user-defined element (UEL) subroutine which is then combined with the general-purpose FE software Abaqus Standard to solve initial-boundary value problems. Considering the complexity of the system, the UEL development follows a stepwise manner by first solving the coupled hydraulic-mechanical (HM) and thermal-hydraulic-mechanical (THM) equations before moving on to the full THMC problem. Each implementation step consists of at least one verification test by comparing computed results with closed-form analytical solutions to ensure that the various coupling effects are correctly realized. To demonstrate the robustness of the algorithm and to validate the UEL, a three-dimensional case study is performed with reference to the in-situ heating test of ATLAS at Belgium in 1980s. A hypothetical radionuclide leakage event is then simulated by activating the chemical-concentration degree of freedom and prescribing a constant high concentration at the heater's surface. The model predicts a limited contaminated regime after six years considering both diffusion and advection effects on species transport.

12 MANAGEMENT OF RADIOACTIVE AND NON-RADIOACTIVE W↗