Engineering Papers⌕ Search

SEARCH · Engineering Papers

Results for “code validation”

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 649 records · Page 36

Do Programmers Prefer Predictable Expressions in Code?

Source code is a form of human communication, albeit one where the information shared between the programmers reading and writing the code is constrained by the requirement that the code executes correctly. Programming languages are more syntactically constrained than natural languages, but they are also very expressive, allowing a great many different ways to express even very simple computations. Still, code written by developers is highly predictable, and many programming tools have taken advantage of this phenomenon, relying on language model surprisal as a guiding mechanism. Additionally, while surprisal has been validated as a measure of cognitive load in natural language, its relation to human cognitive processes in code is still poorly understood. In this paper, we explore the relationship between surprisal and programmer preference at a small granularity—do programmers prefer more predictable expressions in code? Using meaning-preserving transformations, we produce equivalent alternatives to developer-written code expressions and run a corpus study on Java and Python projects. In general, language models rate the code expressions developers choose to write as more predictable than these transformed alternatives. Then, we perform two human subject studies asking participants to choose between two equivalent snippets of Java code with different surprisal scores (one original and transformed). We find that programmers do prefer more predictable variants, and that stronger language models like the transformer align more often and more consistently with these preferences.

97 MATHEMATICS AND COMPUTING↗

Uncertainty propagation in pore water chemical composition calculation using surrogate models

Performance assessment in deep geological nuclear waste repository systems necessitates an extended knowledge of the pore water chemical conditions prevailing in host-rock formations. In the last two decades, important progress has been made in the experimental characterization and thermodynamic modeling of pore water speciation, but the influence of experimental artifacts and uncertainties of thermodynamic input parameters are seldom evaluated. In this respect, we conducted an uncertainty propagation study in a reference geochemical model describing the pore water chemistry of the Callovian-Oxfordian clay formation. Nineteen model input parameters were perturbed, including those associated to experimental characterization (leached anions, exchanged cations, cation exchange selectivity coefficients) and those associated to generic thermodynamic databases (solubilities). A set of 13 quantities of interest were studied by the use of polynomial chaos expansions built non-intrusively with a least-squares forward stepwise regression approach. Training and validation sets of simulations were carried out using the geochemical speciation code PHREEQC. The statistical results explored the marginal distribution of each quantity of interest, their bivariate correlations as well as their global sensitivity indices. The influence of the assumed distributions for input parameters uncertainties was evaluated by considering two parametric domain sizes.

37 INORGANIC, ORGANIC, PHYSICAL, AND ANALYTICAL CH↗

Ponderomotive electron physics captured in a single-fluid extended magnetohydrodynamics model

The ponderomotive force, arising from the interaction between electromagnetic waves and plasma, plays a critical role in laser fusion, astrophysical plasmas, and laser diagnostics. Traditionally, modeling this force requires multi-fluid or particle-in-cell simulations due to its strong coupling to electron-scale dynamics. In this work, we demonstrate that a one-fluid, two-temperature extended magnetohydrodynamics (XMHD) model—augmented with a generalized Ohm's law (GOL) including electron inertia—can accurately reproduce key ponderomotive effects. We derive the ponderomotive force within this framework using a phasor-based approach and then validate its nonlinear manifestations through direct numerical simulations in the PERSEUS code, where steepening and density modulation phenomena typically associated with kinetic-scale models are reproduced. These results and prior work establish XMHD as a robust and efficient alternative for modeling nonlinear laser–plasma dynamics, bridging the gap between ideal MHD and fully kinetic approaches.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

The Sensitivity of GPz Estimates of Photo-z Posterior PDFs to Realistically Complex Training Set Imperfections

The accurate estimation of photometric redshifts is crucial to many upcoming galaxy surveys, for example, the Vera C. Rubin Observatory Legacy Survey of Space and Time (LSST). Almost all Rubin extragalactic and cosmological science requires accurate and precise calculation of photometric redshifts; many diverse approaches to this problem are currently in the process of being developed, validated, and tested. In this work, we use the photometric redshift code GPz to examine two realistically complex training set imperfections scenarios for machine learning based photometric redshift calculation: (i) where the spectroscopic training set has a very different distribution in color–magnitude space to the test set, and (ii) where the effect of emission line confusion causes a fraction of the training spectroscopic sample to not have the true redshift. By evaluating the sensitivity of GPz to a range of increasingly severe imperfections, with a range of metrics (both of photo-z point estimates as well as posterior probability distribution functions, PDFs), we quantify the degree to which predictions get worse with higher degrees of degradation. In particular, we find that there is a substantial drop-off in photo-z quality when line-confusion goes above ~1%, and sample incompleteness below a redshift of 1.5, for an experimental setup using data from the Buzzard Flock synthetic sky catalogs.

79 ASTRONOMY AND ASTROPHYSICS↗

Benchmark for Fuel Shuffling and Depletion for Pebble-Bed Reactors

Pebble bed reactors have specific operational characteristics when their fuel-cycle and fueling operations are considered. They are specifically distinguished by other type of nuclear reactor designs by their online fuel recycling scheme, where the fuel elements that have not yet reached discharge burnup can be reloaded and recycled continuously during normal operation. The fuel in a pebble bed reactor is not stationary and stochastically moves through the core once or several times during its lifetime, which allows them to operate without requiring a large excess reactivity hold for the burnup. However, this characteristic of pebble bed reactors introduces challenges in simulation, as each pebble can take many different trajectories through the core, its composition depends on the details of the irradiation history that is unique to its aggregated path through the core. For predicting the safety performance characteristics, such as source term, maximum fuel temperatures and fuel failure rates, etc., it is important to accurately incorporate the movement of pebbles through the core during their lifetime in a multi-physics simulation together with other phenomena. The equilibrium core analysis for pebble bed reactors are performed with multi-physics tools including fuel depletion in a multi pass reload coupled to the fuel movement. Currently, there are only a few legacy multi-physics simulation tools that can implement the pebble flow characteristics and perform equilibrium core analysis for pebble bed reactors. However, there are development efforts on-going under Department of Energy's Nuclear Energy Advanced Modelling and Simulation program and also in private industry for including these capabilities into their modelling and simulation tools. Any new development in the modelling and simulation tools needs to be validated by using tools such as experiments, analytical solutions or code-to-code benchmarks. In this work, a code-to-code benchmark for the equilibrium core analysis capability of pebble bed reactors was developed. Multiple cases were identified to capture different fuel cycle strategies that can be used in PBRs. The results of each case are presented in terms of overall equilibrium core characteristics: the discharge burnup; spatial burnup distribution; spatial isotopic distributions; axial and radial neutron flux distributions and power history of fuel elements per pass through the core for both a prototypical pebble bed High Temperature Gas-cooled Reactor and a prototypical pebble bed Fluoride-salt cooled High temperature Reactor.

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

Data-driven Alignment of the Tracker for the Mu2e Experiment

An alignment of the Mu2e Tracker is investigated using the Mu2e Offline Software and Millepede-II. Simulated misalignments of Tracker planes were inserted between Monte-Carlo event generation and before reconstruction using randomly generated $(x,y,z)$-translations and rotations of the rigid-body planes in the detector model. Cosmic ray muons, with no magnetic field present in the Detector Solenoid, will follow a straight-line trajectory. A maximum-likelihood fit is used to reconstruct a track and determine its parameters. Tracks traversing at least four planes, with ten registered straw hits, and a maximum time residual of $20$ ns are selected to be used in an alignment sample. The cuts were chosen to discard tracks with low information content, such as those with high levels of multiple scattering or those with low numbers of measurements contributing to a single track fit. Millepede-II produces the resulting alignment constants according to a simultaneous least-squares fit of the alignment parameters and the track parameters for all input tracks. The improved alignment constants are used to repeat the process and recover an increased number of suitable tracks, further improving the estimate of the alignment constants in subsequent iterations. A performance study of the process was conducted on a misaligned Tracker in the case of translation-only, and translation plus rotational misalignments. In both cases, the correct alignment constants were recovered to within statistical error after three global fit iterations. Additionally, a continuous integration system was developed for the \texttt{Mu2e/Offline} GitHub repository, introducing a convenient automated testing process for all proposed changes (``pull requests"). The tests developed included a full build of the software, followed by tests of the validation routines, geometry overlap checking, and multi-threading mode. Additionally, code quality checks and low-statistics physics comparison checks a re also available.

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

X-ray Source Characteristics from July 2020 SGEMP Experiments at the National Ignition Facility

This report details the measured x-ray characteristics radiating from laser targets on 7 shots at Lawrence Livermore National Laboratory's National Ignition Facility performed June 30 - July 2, 2020. Generally, the x-ray sources were designed to serve as meaningful drivers of a variety of Radiation Effects Sciences response experiments. Specifically, on these 7 shots, the measured x-ray output characteristics and the response experiments serve as a useful data set for validating performance and informing further development of Sandia National Laboratories' EMPIRE code. We present x-ray measurements and analyses relevant to simulating the System-Generated Electro Magnetic Pulse experiments that also occurred on these shots (described elsewhere). Sufficient detail is provided so that a motivated, but novice, x-ray source user could produce some of these analysis results from raw data on similar x-ray shots.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

Multiphysics Simulations of MSRE with NEAMS Thermal Hydraulics Tools

This report documents the benchmarks being developed and simulations performed using tools and codes developed under the Nuclear Energy Advanced Modeling and Simulation (NEAMS) program, utilizing MSRE experimental data. In FY23, three main work scopes were investigated under the NEAMS MSR work package at ANL. The first scope investigated the Griffin-SAM coupling model for simulating the pump startup transient experiment of MSRE. The analyses start with a simple model (single-channel, single-lattice), gradually adding more details (multi-channel, full-core) into the model. The results show that the reactivity loss curve is very sensitive to the axial boundary conditions and the radial core discretization. The simple model can predict a similar reactivity trend as that of the more sophisticated model, which is likely due to error cancellation. Accurately modeling the axial boundary condition may further improve the reactivity trend but would require significant efforts to generate the mesh of the MSRE inlet and upper plenum. The core channel radial discretization for the Griffin-SAM coupled model also depends on the flow distribution. Given the complex geometry in the inlet plenum, the flow distribution needed to be calculated from CFD analysis, which was performed using the NekRS code. This analysis employed a MSRE CAD model developed by Copenhagen Atomics. The CAD model was disassembled to keep the inlet plenum region only, which was subsequently cleaned and modified so that the mesh generated is under the memory limit. The results are merged to a few radial regions to show that the flow rate is highest in the central region. This would be useful for future improvement of the Griffin-SAM coupling model of the MSRE core. The last task investigated is tritium transport modeling using the standalone SAM code. This task aimed to initiate the effort to demonstrate and validate the tritium transport model implemented in SAM. The preliminary investigation employed an MSRE model consisting of the primary loop. Three tritium transport pathways were examined including the retention in the graphite, the permeation through the HX tube wall, and the removal from the off-gas system. The results compare well with the MSRE data, but improvements are still needed on the initial conditions (i.e., the present state may not have reached equilibrium), the boundary conditions, the off-gas system modeling, and a better numerical strategy to reach the equilibrium state.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

FEM Analysis of Hybrid LTS/HTS Cos-Theta Dipole Magnet

After the recent results on Bi-2212 superconductive magnets realized and tested in canted cosine-theta and solenoid designs, respectively, at Lawrence Berkeley National Laboratory (LBNL) and NHMFL, the first Bi-2212 stress-managed cosine-theta insert magnet is in the assembly phase at Fermilab. This insert will be part of the first hybrid cosine-theta magnet made of Nb3Sn outer layers within the US-MDP effort to reach 20 T bore field. This paper reports the analytical analysis of the cosine-theta Nb3Sn/Bi-2212 hybrid magnet. As an introduction, it shows the validation of the finalized HTS coils' design optimized using the ROXIE code. Subsequently, it reports the parameters, logic, and implementation method of the 2D electromagnetic and mechanical FEM analysis of the LTS/HTS hybrid magnet. Results from the ANSYS detailed model made with sub-modeling geometry are compared with the homogeneous model implemented in the past. Moreover, a Python code was implemented to simulate the current degradation due to stresses in the detail-modeled conductor areas. The current degradation is introduced in the simulation dynamics for both conductors as an iteration process during the energization load step only after applying pre-stress and thermal loads. The numerical and graphic results of the 2D cosine-theta LTS/HTS magnet cross-section will be described and analyzed.

D'Agliano, A.↗

GH Induction System 1B (BR-105) & MRF System 6 (BR-120) in B226

The purpose of the attached calculations and detail sketches is to document conformance with the requirements of DOE-STD-1020-2016 for the subject project. The calculations have been reviewed for technical accuracy, appropriate methodology, and completeness using the "Document Review Method." The reviewer confirms that the stated purpose has been met. This package does not constitute a construction permit. The enclosed calculations are valid for 2 years from signed date or expiration of listed code cycles, whichever occurs first. Licensed civil or structural engineer is to be contacted for calculations application following expiration of calculations package.

42 ENGINEERING↗

Neutronics analysis of Full Size Plate–1 Experiment using MC21

Qualification and testing of Low Enriched Uranium fuel is desired so that it can be used in research reactors instead of High Enriched Uranium. The Full Size Plate - 1 (FSP-1) experiment involves irradiating a low enriched metallic fuel in the Advanced Test Reactor to assist in this general qualification. Prior to irradiation, an in-depth neutronics analysis is needed to ensure the safety requirements of the Advanced Test Reactor are met. To accomplish this, the MC21 software was used to analyze the FSP-1 experiment, which will allow a test run to be performed with this new fuel in the Advanced Test Reactor Critical facility. By verifying and validating the results of the MC21 software with comparisons to other codes and the preliminary irradiation in the Advanced Test Reactor Critical facility, the FSP-1 experiment will be ready to irradiate using the Advanced Test Reactor. This work is concerned with the neutronics analysis of the FSP-1 experiment using the MC21 software.

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

The Verification and Validation of a Magnetic Plasma Fluid Model Utilizing the MOOSE (Multiphysics Object Oriented Simulation Environment) Framework

As the goal of achieving fusion power on the grid comes closer to fruition, fully coupled multiphysics models of fusion devices will be crucial. Currently, there are two main approaches to developing these platforms: (1) loosely coupled, where one couples existing codes and solvers together through input and output parameters and data, and (2) tightly coupled, where one develops the necessary models within a singular, integrated framework. This work focuses on the latter approach for magnetically confined fusion devices by developing a fluid-based plasma-edge model within the Multiphysics Object Oriented Simulation Environment (MOOSE) Framework. This effort is coordinated with other efforts to develop, test, demonstrate, and deploy fusion relevant multiphysics capabilities including electromagnetics, particle-in-cell plasma, tritium transport, and fusion blanket design. This new model is an expansion of the MOOSE-based plasma application, Zapdos, which was originally formulated to model low-temperature, non-magnetized plasma processes. Verification, benchmarking, and validation studies have been conducted. Verification studies involved utilizing the method of manufactured solutions and comparing the convergence slope of a known solution to the theoretical slope. Benchmarking consists of comparisons to existing edge codes, namely BOUT++ and SOLEDGE3X. Validation efforts focused on comparisons against open-source data from the TCV tokamak.

70 - PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Validation and application of a multiphase CFD model for hydrodynamics, temperature field and RTD simulation in a pilot-scale biomass pyrolysis vapor phase upgrading reactor

Accurate prediction of transport phenomena is critical for VPU reactor design, optimization, and scale-up. The current study focused on the validation and application of a multiphase CFD model within an open-source code MFiX for hydrodynamics, temperature field, and residence time distribution (RTD) simulation in a non-reacting circulating fluidized bed riser for biomass pyrolysis vapor phase upgrading (VPU). First, an Eulerian-Eulerian approach three-dimensional CFD model was employed to simulate the pilot-scale VPU riser on the supercomputer Joule. Excellent quantitative agreement between experimental and simulated results was achieved for pressure drops and temperature field in a range of operating conditions. Then the validated multiphase CFD model was applied to predict gas and solid residence time distributions (RTDs) since prediction and analysis of RTD is an important tool to study the complex multiphase flow behavior and mixing inside chemical reactors. The predictions show that solid mean residence time is 3.5 times the gas residence time; the solid RTD is more sensitive to the process gas flow rate than the solids circulation rate.

09 BIOMASS FUELS↗

OC6 Project Phase IV: Validation of Numerical Models for Novel Floating Offshore Wind Support Structures

The fourth phase of the Offshore Code Comparison, Collaboration, Continued, with Correlation and unCertainty (OC6) aims to assess the ability of the tools to model a novel floating wind design. The design that was selected for this project is the TetraSpar designed by Stiesdal Offshore Technologies. The platform is a unique design that features a spar like stability with a very low center of gravity, but does not require deep-water ports. This combination is achieved with a system made of two separate steel structures, a hull at the water’s surface that supports the wind turbine tower, and a keel that is suspended below the main body. This lower keel has a very high density and drives the total platform’s low center of gravity. Scaled model tests of the TetraSpar design were performed in 2018-2019 by the University of Maine. The tests were performed with 1:43 Froude scaling. The data collected in the model tests provide a detailed description of the response of the platform in various controlled and relatively well understood conditions. Comparison with these data provides a good opportunity for validation of numerical models. The OC6 Phase IV work will focus on the specific parameters used in these scaled model tests. The load cases (LC) considered in this project are as follows: LC 1.X - Equilibrium and Static Offset Tests LC 2.X - Platform Free Decays LC 3.X - Turbine Thrust (Wind Only) LC 4.X - Regular and Irregular Waves (Wave only) LC 5.X - Combined Wind and Wave Loading

17 WIND ENERGY↗

Magnetohydrodynamics in free surface liquid metal flow relevant to plasma-facing components

Abstract While flowing Liquid Metal (LM) Plasma-Facing Components (PFCs) represent a potentially transformative technology to enable long-pulse operation with high-power exhaust for fusion reactors, Magnetohydrodynamic (MHD) drag in the conducting LM will reduce the flow speed. Experiments have been completed in the linear open-channel LMX-U device [Hvasta et al 2018 Nucl. Fusion 58 01602] for validation of MHD drag calculations with either insulating or conducting walls, with codes similar to those used to design flowing LM PFCs for a Fusion Nuclear Science Facility [Kessel et al 2019 Fusion Sci. Technol . 75 886]. We observe that the average channel flow speed decreased with the use of conducting walls and the strength of the applied transverse magnetic field. The MHD drag from the retarding Lorentz force resulted in an increase of the LM depth in the channel that ‘piled up’ near the inlet, but not the outlet. As reproduced by OpenFOAM and ANSYS CFX calculations, the magnitude and characteristics of the pileup in the flow direction increased with the applied traverse magnetic field by up to 120%, as compared to the case without an applied magnetic field, corresponding to an average velocity reduction of ∼45%. Particle tracking measurements confirmed a predicted shear in the flow speed, with the surface velocity increasing by 300%, despite the 45% drop in the average bulk speed. The MHD effect makes the bulk flow laminarized but keeps surface waves aligned along the magnetic field lines due to the anisotropy of MHD drag. The 3D fringe field and high surface velocity generate ripples around the outlet region. It was also confirmed that the MHD drag strongly depends on the conductivity of the channel walls, magnetic field, and volumetric flow rate, in agreement with the simulations and a developed analytical model. These validated models are now available to begin to determine the conditions under which the ideal LM channel design of a constant flow speed and fluid depth could be attained.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Best practices in software development for robust and reproducible geoscientific models based on insights from the Global Carbon Budget's dynamic vegetation models

Computational models play an increasingly vital role in scientific research by enabling the numerical simulation of complex processes. Such models are also fundamental in geosciences. For instance, they offer critical insights into the impacts of global change on the Earth system today and in the future. Beyond their value as research tools, models are also software products and should therefore adhere to certain established software engineering standards. However, scientists are rarely trained as software developers, which can lead to potential deficiencies in software quality like unreadable, inefficient, or erroneous code. The complexity of models, coupled with their integration into broader workflows, also often makes it challenging to reproduce results, evaluate processes, and build upon them. In this paper, we review the state and current practices of the development processes of the state-of-the-art land surface models used by the Global Carbon Budget. We combine the experience of modelers from the respective research groups with the expertise of software engineers from tech companies to outline key principles and tools for improving software quality in research. We explore four main areas: (1) model testing and validation, (2) scientific, technical, and user documentation, (3) version control, continuous integration, and code review, and (4) the portability and reproducibility of workflows. Our review reveals that while modeling communities are incorporating many best practices, significant room for improvement remains in areas such as automated testing, automated documentation, and reproducibility. Therefore, we here identify and promote essential software engineering practices, including numerous examples of practices from within the community that can serve as guidelines for other models and could help streamline processes across the entire community. We conclude with an open-source example implementation of these principles, demonstrating portable and reproducible data flows, a continuous integration setup, and web-based visualizations. This example may serve as a practical resource for model developers, users, and all scientists engaged in scientific programming.

Gregor, Konstantin [Technical Univ. of Munich (Ger↗

Comparative Analysis of HEATNETS for Geothermal Network Performance

Thermal energy networks (TENs), also known as 5th generation district energy systems, or more specifically geothermal networks when exchanging heat with geothermal boreholes, are an important technology for decarbonization. In these networks an ambient loop connects buildings and thermal sources, such as a borehole field, to exchange energy and maintain a desired loop temperature. Water-source heat pumps are used at the buildings to connect to the ambient or thermal loop to meet to the building heating and cooling loads and maintain comfort. A semi-transient, reduced-order technical model and techno-economic model, called HEATNETS, has been developed at NREL that captures the flow of energy around a TEN. In this work, a comparison of the HEATNETS technical model and a well-known coding platform used for modeling geothermal networks, TRNSYS, has been completed for a proposed geothermal network as a verification and validation process. Hourly data provided from the TRNSYS simulation included building loads, pumping power, heat pump power, temperature entering and leaving the borehole field, and mass flow rates. The hourly borehole temperatures were used to create a linear regression model utilized in HEATNETS to estimate the borehole field heat exchange. The building loads and mass flow rates were direct inputs to HEATNETS while the pumping power, heat pump power, borehole temperatures, and coefficients of performance were all simulated and calculated by HEATNETS, allowing for direct comparison of the thermal energy transfer HEATNETS considers the full process from design inputs to economic outputs and can provide modeling options for high-level initial system design and operational optimization. This study focuses on a validation of HEATNETS using results from TRNSYS. HEATNETS is not intended to replace other modeling tools, but this work demonstrates, via a comparison with an industry standard code, that HEATNETS can be a unique, high-level and rapid modeling tool for estimating the performance of a full geothermal network system.

15 GEOTHERMAL ENERGY↗

SAM: A Modern System Code for Advanced Non-LWR Safety Analysis

The System Analysis Module (SAM), developed at Argonne National Laboratory and by collaborators at other organizations, is for advanced non–light water reactor safety analysis. SAM aims to provide fast-running, modest-fidelity, whole-plant transient analysis capabilities that are essential for fast-turnaround design scoping and engineering analyses of advanced reactor concepts. To facilitate code development, SAM utilizes the MOOSE object-oriented application framework, its underlying finite element library, and linear and nonlinear solvers to leverage modern advanced software environments and numerical methods. SAM aims to solve tightly coupled physical phenomena, including fission reaction, heat transfer, fluid dynamics, and thermal-mechanical responses in advanced reactor structures, systems, and components with high accuracy and efficiency. Finally, this paper gives an overview of the SAM code development, including goals and functional requirements, physical models, current capabilities, verification and validation, software quality assurance, and examples of simulations for advanced nuclear reactor applications.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗