Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “C CODES”

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 109 records · Page 6

Development of Accelerated Kinetic Monte Carlo Code for Simulation of Helium Bubble Evolution

A mesoscale model to predict helium bubble evolution is needed for tritium applications. Such a model requires that the conventional kinetic Monte Carlo (kMC) simulations be significantly accelerated. The objective of this report is to (a) highlight the concepts and mathematical expressions of the accelerated method for defect implementation that have not been published, (b) show an example input file to run the kMC code, and (c) provide suggestions on future improvement following my retirement.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗

Investigation of the OECD/NEA PWR MOX/UO{sub 2} core transient benchmark using a coupled whole core pin-by-pin route in WIMS

This paper investigates the new CAMELOT coupling route developed in WIMS, which uses prepared tabulated cross-sections combined with the flux solver MERLIN module and the integrated sub-channel thermal hydraulics solver ARTHUR module to solve for the coupled core state. This coupling route is applied to the OECD/NEA pressurized water reactor (PWR) core transient benchmark exercise, involving 3-D neutronics and thermal-hydraulics analysis of a full-sized PWR core featuring MOX fuel at various core states, as well as simulating a control rod ejection transient. Analysis of the results for each part of the benchmark demonstrate that the high-resolution pin-by-pin analysis used in WIMS closely matches the other participants in the benchmark, with differences of between 20-200 pcm for k-effective, 1-2.5% RMS difference for assembly-averaged powers, 2-8% difference in rod worth calculations, < 200 ppm for calculations of critical boron concentration, zero difference in delayed neutron fraction calculation and a very close match for power response to the rod ejection transient. This is the first application of the WIMS-CAMELOT approach for the transient analysis of a full-sized reactor and as such further improvements such as reducing computational cost through parallelization, optimisation and memory reduction, are currently in active development. This paper demonstrates the accuracy and flexibility of the CAMELOT coupling route, providing a straightforward and consistent user image that can be easily used for a variety of modelling problems involving coupled neutronics and thermal-hydraulics. (authors)

21 SPECIFIC NUCLEAR REACTORS AND ASSOCIATED PLANTS↗

Application of linear prolongation to coarse mesh finite difference acceleration in CASMO5

The Coarse-Mesh Finite Difference (CMFD) method has been used for over a decade to accelerate the convergence of the Method of Characteristics (MOC) solution to the two- dimensional particle transport equation in CASMO5. Numerical testing, along with widespread use in production-level calculations, have shown that the current CMFD implementation provides stability and robustness for a wide range of realistic reactor physics problems. However, the recent development of linear prolongation has attracted attention from the community as a way to further improve the performance and stability of CMFD. Two interpolation methods for linear prolongation are presented in this work and implemented into a test version of CASMO5. The performance of the proposed interpolations, referred to as the bilinear and linear directional schemes, is evaluated in terms of runtime relative to the default constant or uniform scaling update. Numerical results indicate that the use of linear prolongation can reduce the transport solver runtime on average by approximately 10% when tested with two hundred randomly selected cases. The new directional linear interpolation, combined with default constant boundary updates, is found to provide the highest reduction in runtime for the cases analyzed. (authors)

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

An influence of manufacturing tolerances on Pin-Cell k-infinity of MOX fuel using data from the FUBILA experiment program

An influence of manufacturing tolerances (MTs) was evaluated on the pin-cell k-infinity of MOX fuel through the random sampling of CASMO5 calculations. The data from the FUBILA experiment program was used as the manufacturing parameters. For the uncertainties of element/isotope mass fractions, their covariance matrices were calculated by the generalized least square method. The total k-infinity uncertainty was 120-250 pcm (percent mille). From the breakdown of k-infinity uncertainty per materials, the MTs of fuel pellet had a dominant influence. The individual influences were also evaluated for element/isotope mass fractions, an inner/outer diameter, and a density. Those of element/isotope mass fractions were less than a few dozen pcm. Since the perturbations of fuel pellet diameter and density caused large variations to the total amount of heavy metals and effect of spatial self-shielding, they had a negative correlation with the k-infinity perturbation. On the AG3 (Al-Mg alloy) over-cladding, the inner/outer diameter perturbations had both negative and positive correlations. The negative one was due to decrease in amount of light water and the positive one was due to increase in amount of AG3. Since the effect of neutron slowing-down by light water had a dominant influence, the influence of the former negative correlation was larger than that of the latter positive correlation. It is, therefore, concluded that the consideration of the MTs that had a large influence on the effect of neutron slowing-down is important for precise quantification of the pin-cell k-infinity uncertainty of MOX fuel. (author)

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

On a Simplified Approach to Achieve Parallel Performance and Portability Across CPU and GPU Architectures

This paper presents software advances to easily exploit computer architectures consisting of a multi-core CPU and CPU+GPU to accelerate diverse types of high-performance computing (HPC) applications using a single code implementation. The paper describes and demonstrates the performance of the open-source C++ matrix and array (MATAR) library that uniquely offers: (1) a straightforward syntax for programming productivity, (2) usable data structures for data-oriented programming (DOP) for performance, and (3) a simple interface to the open-source C++ Kokkos library for portability and memory management across CPUs and GPUs. The portability across architectures with a single code implementation is achieved by automatically switching between diverse fine-grained parallelism backends (e.g., CUDA, HIP, OpenMP, pthreads, etc.) at compile time. The MATAR library solves many longstanding challenges associated with easily writing software that can run in parallel on any computer architecture. This work benefits projects seeking to write new C++ codes while also addressing the challenges of quickly making existing Fortran codes performant and portable over modern computer architectures with minimal syntactical changes from Fortran to C++. We demonstrate the feasibility of readily writing new C++ codes and modernizing existing codes with MATAR to be performant, parallel, and portable across diverse computer architectures.

97 MATHEMATICS AND COMPUTING↗

Fast BLT Code

This note discusses numerical algorithmic software design considerations and performance estimates for a fast BLT coupling code [1] written in c++. The aim of this code is to conduct faster parameter studies over line orientations. The original matlab code was written by Mike Rivera. Art Barnes ported this code to julia. I rewrote portions of the code for speed improvement, mainly to eliminate some redundant computation when calculating many line orientations. But this code is still far from optimal.

97 MATHEMATICS AND COMPUTING↗

Axisymmetric simulations of vertical displacement events in tokamaks: A benchmark of M3D-C 1 , NIMROD, and JOREK

A benchmark exercise for the modeling of vertical displacement events (VDEs) is presented and applied to the 3D nonlinear magnetohydrodynamic codes M3D-C 1 , JOREK, and NIMROD. The simulations are based on a vertically unstable NSTX equilibrium enclosed by an axisymmetric resistive wall with a rectangular cross section. A linear dependence of the linear VDE growth rates on the resistivity of the wall is recovered for sufficiently large wall conductivity and small temperatures in the open field line region. We report the benchmark results show good agreement between the VDE growth rates obtained from linear NIMROD and M3D-C 1 simulations and from the linear phase of axisymmetric nonlinear JOREK, NIMROD, and M3D-C 1 simulations. Axisymmetric nonlinear simulations of a full VDE performed with the three codes are compared, and an excellent agreement is found regarding the plasma location and plasma currents, as well as eddy and halo currents in the wall.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

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↗

SurFE-XD (Surface curvature-driven Finite Elements model for Diffusion under eXtreme conditions)

SurFE-XD is a mesoscale finite element framework to model surface diffusion under mutliphysics environments. The code uses legacy C++ library dolphin wrapped with python in a FEniCS driven unified form language and just-in-time (JIT) compilation setting. The purpose of the release is to attract wide-ranging usage of the code along with publication supplementation to support reproducibility of scientific data. SurFE-XD has been originally conceived under the LDRD-DR funding for “High-Gradient (C-BAND) Breakdown tolerant accelerator materials project. Currently SrFE-XD support electrostatics and Thermo-elasticity driven surface diffusion kernels. Releasing the code will also enable to include contributions from other physical regimes e.g., plasticity and electrodynamics etc as well portability to GPU-based platforms.

Bagchi, Soumendu↗

Cost-Benefit Analysis of the 2021 Washington State Energy Code – Commercial Provisions

The state of Washington recently updated their current state commercial energy code, which is the 2018 Washington State Energy Code (2018 WSEC-C) to an updated version named the 2021 WSEC-C. This report assesses the life cycle costs and savings and greenhouse gas emissions impacts of the 2021 WSEC-C compared to the 2018 WSEC-C, as requested by the Washington State Building Code Council (SBCC).

32 ENERGY CONSERVATION, CONSUMPTION, AND UTILIZATI↗

PyOMP: Multithreaded Parallel Programming in Python

We know that Python is a widely used language in scientific computing. When the goal is high performance, however, Python lags far behind low-level languages such as C and Fortran. To support applications that stress performance, Python needs to access the full capabilities of modern CPUs. That means support for parallel multithreading. In this paper, we describe PyOMP, a system that enables OpenMP in Python. Programmers write code in Python with OpenMP, Numba generates code that compiles to LLVM, and the resulting programs run with performance that approaches that from code written with C and OpenMP. In this paper we provide an update on the PyOMP project and explain how to install it and use it to write parallel multithreaded code in Python.

97 MATHEMATICS AND COMPUTING↗

Edaphic controls on genome size and GC content of bacteria in soil microbial communities

Nutrient limitation has been shown to reduce bacterial genome size and influence nucleotide composition; however, much of this work has been conducted in marine systems and the factors which shape soil bacterial genomic traits remain largely unknown. Here, for this work, we determined average genome size, GC content, codon usage, and amino acid content from 398 soil metagenomes across a broad geographic range and used machine-learning to determine the environmental parameters that most strongly explain the distribution of these traits. We found that genomic trait averages were most related to pH, which we suggest is primarily due to the correlation of pH with several environmental parameters, particularly soil carbon content. Low pH soils had higher carbon to nitrogen ratios (C:N) and tended to have communities with lower GC content and larger genomes, potentially a response to increased physiological stress and a requirement for metabolic diversity. Conversely, communities in high pH and low soil C:N had smaller genomes and higher GC content—indicating potential resource driven selection against AT base pairs, which have a higher C:N than GC base pairs. Similarly, we found that nutrient conservation also applied to amino acid stoichiometry, where bacteria in soils with low C:N ratios tended to code for amino acids with lower C:N. Together, these relationships point towards fundamental mechanisms that underpin genome size, and nucleotide and amino acid selection in soil bacteria.

54 ENVIRONMENTAL SCIENCES↗

Graphite Oxidation Studies Irradiated Graphite, GIF Summary, ASME Task Force, ASTM Activities

Introduction Comparison of Graphite Oxidation Rates for Irradiated and Unirradiated NBG-25 (Rebecca Smith and Austin Matthews, INL) Annealing effect over range of oxidation temperatures Irradiation effect (~6.5 dpa) over range of oxidation temperatures Dose dependency of irradiation effect Generation IV International Forum High Level Deliverable Summary of DOE ART Historic Oxidation Research (Cristian Contescu, ORNL) Publications issued over the last ~10 years Acute and chronic oxidation ASME Graphite Oxidation Task Force (C. Contescu, Paul Ryan, ORNL, Joe Bass, A. Matthews, R. Smith, INL) Collaborative effort headed by ORNL and engaging INL and others Initial review of relevant oxidation discussion in ASME code ASTM Activities (C. Contescu) Virtual Meetings New and Revised Standards

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

Toucan: A performance portable, scalable implementation of the DECA algorithm

In the field of additive manufacturing (AM), cellular automata (CA) is extensively used to simulate microstructural evolution during solidification. However, while traditional CA approaches are relatively fast, they still require a substantial number of time steps, are limited to moderate volumes, and are relatively difficult to improve through parallelism due to the highly localized nature of the solidification front. Here, to address these issues of time to solution and load balancing, we introduce Toucan, a parallel, performance-portable, and scalable code written in C++ with the Kokkos library that leverages the discrete event inspired cellular automata (DECA) algorithm to perform parallel-in-time (PinT) grain growth simulations. Toucan effectively mitigates load balancing issues by distributing the computational workload more evenly across processors, enhancing scalability and efficiency. We conduct both strong and weak scaling studies on up to 64 GPUs on the Frontier supercomputer, demonstrating that Toucan significantly outperforms the current state-of-the-art, time-stepped CA code, ExaCA, on both single and multi-GPU simulations. Even in AM-specific weak scaling scenarios, Toucan maintains near-ideal scaling, in contrast to the linear increase observed with ExaCA due to the moving laser raster pattern. This study highlights Toucan’s potential to transform microstructural simulations in AM by radically improving both efficiency and scalability over existing methods.

36 MATERIALS SCIENCE↗

Keras2c: A library for converting Keras neural networks to real-time compatible C

With the growth of machine learning models and neural networks in measurement and control systems comes the need to deploy these models in a way that is compatible with existing systems. Existing options for deploying neural networks either introduce very high latency, require expensive and time consuming work to integrate into existing code bases, or only support a very limited subset of model types. We have therefore developed a new method called Keras2c, which is a simple library for converting Keras/TensorFlow neural network models into real-time compatible C code. It supports a wide range of Keras layers and model types including multidimensional convolutions, recurrent layers, multi-input/output models, and shared layers. Keras2c re-implements the core components of Keras/TensorFlow required for predictive forward passes through neural networks in pure C, relying only on standard library functions considered safe for real-time use. The core functionality consists of ~ 1500 lines of code, making it lightweight and easy to integrate into existing codebases. Keras2c has been successfully tested in experiments and is currently in use on the plasma control system at the DIII-D National Fusion Facility at General Atomics in San Diego.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

PETSc Users Manual (Rev. 3.13)

This manual describes the use of PETSc for the numerical solution of partial differential equations and related problems on high-performance computers. The Portable, Extensible Toolkit for Scientific Computation (PETSc) is a suite of data structures and routines that provide the building blocks for the implementation of large-scale application codes on parallel (and serial) computers. PETSc uses the MPI standard for all message-passing communication. PETSc includes an expanding suite of parallel linear solvers, nonlinear solvers, and time integrators that may be used in application codes written in Fortran, C, C++, and Python. PETSc provides many of the mechanisms needed within parallel application codes, such as parallel matrix and vector assembly routines. The library is organized hierarchically, enabling users to employ the level of abstraction that is most appropriate for a particular problem. By using techniques of object-oriented programming, PETSc provides enormous flexibility for users. PETSc is a sophisticated set of software tools; as such, for some users it initially has a much steeper learning curve than a simple subroutine library. In particular, for individuals without some computer science background, experience programming in C, C++, python, or Fortran and experience using a debugger such as gdb or dbx, it may require a significant amount of time to take full advantage of the features that enable efficient software use. However, the power of the PETSc design and the algorithms it incorporates may make the efficient implementation of many application codes simpler than \rolling them" yourself.

97 MATHEMATICS AND COMPUTING↗

CI/CD Efforts for Validation, Verification and Benchmarking OpenMP Implementations

Software developers must adapt to keep up with the changing capabilities of platforms so that they can utilize the power of High-Performance Computers (HPC), including exascale systems. OpenMP, a directive-based parallel programming model, allows developers to include directives to existing C, C++, or Fortran code to allow node level parallelism without compromising performance. This paper describes our CI/CD efforts to provide easy evaluation of the support of OpenMP across different compilers using existing testsuites and benchmark suites on HPC platforms. Our main contributions include (1) the set of a Continuous Integration (CI) and Continuous Development (CD) workflow that captures bugs and provides faster feedback to compiler developers, (2) an evaluation of OpenMP (offloading) implementations supported by AMD, HPE, GNU, LLVM, and Intel, and (3) evaluation of the quality of compilers across different heterogeneous HPC platforms. With the comprehensive testing through the CI/CD workflow, we aim to provide a comprehensive understanding of the current state of OpenMP (offloading) support in different compilers and heterogeneous platforms consisting of CPUs and GPUs from NVIDIA, AMD, and Intel.

Jarmusch, Aaron↗