Search NASA⌕ Search

SEARCH · Search NASA

Results for “Code Generation”

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 307 records · Page 17

Generating log-normal mock catalog of galaxies in redshift space

We present a public code to generate a mock galaxy catalog in redshift space assuming a log-normal probability density function (PDF) of galaxy and matter density fields. We draw galaxies by Poisson-sampling the log-normal field, and calculate the velocity field from the linearised continuity equation of matter fields, assuming zero vorticity. This procedure yields a PDF of the pairwise velocity fields that is qualitatively similar to that of N-body simulations. We check fidelity of the catalog, showing that the measured two-point correlation function and power spectrum in real space agree with the input precisely. We find that a linear bias relation in the power spectrum does not guarantee a linear bias relation in the density contrasts, leading to a cross-correlation coefficient of matter and galaxies deviating from unity on small scales. We also find that linearising the Jacobian of the real-to-redshift space mapping provides a poor model for the two-point statistics in redshift space. That is, non-linear redshift-space distortion is dominated by non-linearity in the Jacobian. The power spectrum in redshift space shows a damping on small scales that is qualitatively similar to that of the well-known Fingers-of-God (FoG) effect due to random velocities, except that the log-normal mock does not include random velocities. This damping is a consequence of non-linearity in the Jacobian, and thus attributing the damping of the power spectrum solely to FoG, as commonly done in the literature, is misleading.

79 ASTRONOMY AND ASTROPHYSICS↗

A universal implementation of radiative effects in neutrino event generators

Due to the similarities between electron-nucleus (eA) and neutrino-nucleus scattering (νA), eA data can contribute key information to improve cross-section modeling in eA and hence in νA event generators. However, to compare data and generated events, either the data must be radiatively corrected or radiative effects need to be included in the event generators. We implemented a universal radiative corrections program that can be used with all reaction mechanisms and any eA event generator. Our program includes real photon radiation by the incident and scattered electrons, and virtual photon exchange and photon vacuum polarization diagrams. It uses the “extended peaking” approximation for electron radiation and neglects charged hadron radiation. This method, validated with GENIE, can also be extended to simulate νA radiative effects. This work facilitates data-event-generator comparisons used to improve νA event generators for the next-generation of neutrino experiments. Program Title: emMCRadCorr CPC Library link to program files:https://doi.org/10.17632/hmsxg82vnf.1 Developer's repository link:https://github.com/e4nu/emMCRadCorr Licensing provisions: AGPLv3 Programming language:C++ Nature of problem: Radiative effects can significantly modify the event kinematics and the resulting cross-sections. Such effects must be accounted for when comparing event generators to eA data. Existing radiative correction codes are tailored to specific processes and topologies, and are limited to a restricted phase space defined by the spectrometer acceptance. Therefore, a more general approach is required to apply radiative corrections to semi-inclusive and exclusive eA measurements. Solution method: Our program incorporates real photon radiation from both the incident and scattered electrons, as well as virtual photon exchange and photon vacuum polarization effects. It employs the “extended peaking” approximation for electron radiation while neglecting contributions from charged hadron radiation. The code is fully decoupled from event generator codes and can be used for all event generators in the market.

72 PHYSICS OF ELEMENTARY PARTICLES AND FIELDS↗

Near-field models and simulations of pellet ablation in tokamaks

Here, detailed numerical studies of the ablation of a single neon pellet in the plasma disruption mitigation parameter space have been performed. Simulations were carried out using FronTier, a hydrodynamic/low magnetic Reynolds number MHD code with explicit tracking of material interfaces. FronTier's physics models resolve the pellet surface ablation and the formation of a dense, cold cloud of ablated material, the deposition of energy from hot plasma electrons, the expansion of the ablation cloud along magnetic field lines, and the radiation losses. A local thermodynamic equilibrium model based on Saha equations has been used to resolve atomic processes in the cloud and Redlich–Kwong corrections to the ideal gas equation of state for cold and dense gases, which have been used near the pellet surface. The FronTier pellet code is a next generation of the code described. It has been validated against the semi-analytic improved neutral gas shielding model in the 1D spherically symmetric approximation. Main results include quantification of the influence of atomic processes and Redlich–Kwong corrections on the pellet ablation in spherically symmetric approximation and verification of analytic scaling laws in a broad range of pellet and plasma parameters. Using axially symmetric MHD simulations, the properties of ablation channels and the reduction of pellet ablation rates in magnetic fields of increasing strength have been studied. While the main emphasis has been given to neon pellets for the plasma disruption mitigation, selected results on deuterium fueling pellets have also been presented.

97 MATHEMATICS AND COMPUTING↗

Nuclear data uncertainty propagation in a lattice physics code using stochastic sampling

A methodology is presented for 'black box' nuclear data uncertainty propagation in a lattice physics code using stochastic sampling. The methodology has 4 components: i) processing nuclear data variance/covariance matrices including converting the native group structure to a group structure 'compatible' with the lattice physics code, ii) generating (relative) random samples of nuclear data, iii) perturbing the lattice physics code nuclear data according to the random samples, and iv) analyzing the distribution of outputs to estimate the uncertainty. The scheme is described as implemented at PSI, in a modified version of the lattice physics code CASMO-5M, including all relevant practical details. Uncertainty results are presented for a BWR pin-cell at hot zero power conditions and a PWR assembly at hot full power conditions with depletion. Results are presented for uncertainties in eigenvalue, 1-group microscopic cross sections, 2-group macroscopic cross sections, and isotopics. Interesting behavior is observed with burnup, including a minimum uncertainty due to the presence of fertile U-238 and a global effect described as 'synergy', observed when comparing the uncertainty resulting from simultaneous and one-at-a-time variations of nuclear data. (authors)

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Integrated circuit test-port architecture and method and apparatus of test-port generation

A method and apparatus are provided for generating RTL code for a test-port interface of an integrated circuit. In an embodiment, a test-port table is provided as input data. A computer automatically parses the test-port table into data structures and analyzes it to determine input, output, local, and output-enable port names. The computer generates address-detect and test-enable logic constructed from combinational functions. The computer generates one-hot multiplexer logic for at least some of the output ports. The one-hot multiplexer logic for each port is generated so as to enable the port to toggle between data signals and test signals. The computer then completes the generation of the RTL code.

97 MATHEMATICS AND COMPUTING↗

Composing Data Parallel Code for a SPARQL Graph Engine

Big data analytics process large amount of data to extract knowledge from them. Semantic databases are big data applications that adopt the Resource Description Framework (RDF) to structure metadata through a graph-based representation. The graph based representation provides several benefits, such as the possibility to perform in memory processing with large amounts of parallelism. SPARQL is a language used to perform queries on RDF-structured data through graph matching. In this paper we present a tool that automatically translates SPARQL queries to parallel graph crawling and graph matching operations. The tool also supports complex SPARQL constructs, which requires more than basic graph matching for their implementation. The tool generates parallel code annotated with OpenMP pragmas for x86 Shared-memory Multiprocessors (SMPs). With respect to commercial database systems such as Virtuoso, our approach reduces memory occupation due to join operations and provides higher performance. We show the scaling of the automatically generated graph-matching code on a 48-core SMP.

Big data↗

An information theoretic approach to use high-fidelity codes to calibrate low-fidelity codes

For many simulation models, it can be prohibitively expensive or physically infeasible to obtain a complete set of experimental data to calibrate model parameters. In such cases, one can alternatively employ validated higher-fidelity codes to generate simulated data, which can be used to calibrate the lower-fidelity code. In this paper, we employ an information-theoretic framework to determine the reduction in parameter uncertainty that is obtained by evaluating the high-fidelity code at a specific set of design conditions. These conditions are chosen sequentially, based on the amount of information that they contribute to the low-fidelity model parameters. The goal is to employ Bayesian experimental design techniques to minimize the number of high-fidelity code evaluations required to accurately calibrate the low-fidelity model. We illustrate the performance of this framework using heat and diffusion examples, a 1-D kinetic neutron diffusion equation, and a particle transport model, and include initial results from the integration of the high-fidelity thermal-hydraulics code Hydra-TH with a low-fidelity exponential model for the friction correlation factor.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

Numerical Model of IProTech PIP WEC Device

iProTech PIP wave energy converter (WEC) is a slack moored, single hull device with no moving parts in the water, joints or bearings. This submission includes data of the simulation, reports, and code for the iProTech PIP (WEC) project. The organization of the data included in the provided archive is detailed below and in the data description of the archive. The data teamer-iprotech-nrel folder includes and explains matlab and python code developed to hydrodynamically model the PIP WEC device in WEC-Sim. The subfolders cover the following steps: 1) report: explanatory information on device geometry 2) pip_mesher: python code to generate mesh panels from device profile data 3) wec-sim_models: matlab code to run WEC-Sim The data uploaded is a snapshot as of 11/02/2121 of code residing in a Github repository administered by David Ogden of NREL.

16 TIDAL AND WAVE POWER↗

CTF (Subchannel) Calculations and Validation L3:VVI.H2L.P15.01

The goal of the Verification and Validation Implementation (VVI) High to Low (Hi2Lo) process is utilizing a validated model in a high resolution code to generate synthetic data for improvement of the same model in a lower resolution code. This process is useful in circumstances where experimental data does not exist or it is not sufficient in quantity or resolution. Data from the high-fidelity code is treated as calibration data (with appropriate uncertainties and error bounds) which can be used to train parameters that affect solution accuracy in the lower-fidelity code model, thereby reducing uncertainty. This milestone presents a demonstration of the Hi2Lo process derived in the VVI focus area. The majority of the work performed herein describes the steps of the low-fidelity code used in the process with references to the work detailed in the companion high-fidelity code milestone (Reference 1). The CASL low-fidelity code used to perform this work was Cobra Thermal Fluid (CTF) and the high-fidelity code was STAR-CCM+ (STAR). The master branch version of CTF (pulled May 5, 2017 – Reference 2) was utilized for all CTF analyses performed as part of this milestone. The statistical and VVUQ components of the Hi2Lo framework were performed using Dakota version 6.6 (release date May 15, 2017 – Reference 3). Experimental data from Westinghouse Electric Company (WEC – Reference 4) was used throughout the demonstrated process to compare with the high-fidelity STAR results. A CTF parameter called Beta was chosen as the calibration parameter for this work. By default, Beta is defined as a constant mixing coefficient in CTF and is essentially a tuning parameter for mixing between subchannels. Since CTF does not have turbulence models like STAR, Beta is the parameter that performs the most similar function to the turbulence models in STAR. The purpose of the work performed in this milestone is to tune Beta to an optimal value that brings the CTF results closer to those measured in the WEC experiments.

97 MATHEMATICS AND COMPUTING↗

Investigation of Frozen Chemistry for Molten Salt Reactors (MSRs)

Understanding accident progression and the potential/conditions for fission product release from fuel is necessary to evaluate safety for any nuclear reactor system. Molten Salt Reactors (MSRs) under development need such analysis to support safety evaluations. Fission product chemistry specific to MSR concepts is a critical area that introduces distinct considerations relative to the current state-of-knowledge in reactor safety, primarily developed for water-moderated nuclear reactor systems. In Light Water Reactor (LWR) systems, it is necessary to capture the chemical interaction of fission products with the reactor evironment, containment and confinement systems. The overall effects at this point are relatively well understood for the purposes of performing safety evaluations. A key insight from LWR studies is that fission product chemical behavior can be reasonably captured by modeling approaches where the chemistry is "frozen". These modeling approaches assume that radionuclide reaction and speciation can be represented by chemical classes, each with characteristic transport behavior that is invariant under a broad range of thermochemical conditions. However, radionuclides can exhibit a range of behavior in the liquid salt-melt phase of the coolant used in MSRs. Radionuclides, salt, and the metal containment surfaces (i.e. pipes) can co-exist in dynamic equilibrium that could evolve with small system mass changes. A detailed investigation to the degree the equilibrium state can dynamically evolve with changes in the conditions of the molten salt mixture has not been previously conducted. It is currently not well understood where frozen chemistry assumptions are valid. Expanding the state-of-knowledge in this regard is relevant to better assessing the range of chemical effects that should be incorporated as part of MSR safety assessments. This investigation used the Oak Ridge Isotope GENeration (ORIGEN) module of the Standardized Computer-Analysis for Licensing Evaluation (SCALE) code to generate simulated radionuclide inventories for the MSR Experiment (MSRE) and then modeled reactor chemical speciation using the Molten Salt Thermodynamic Database – Thermochemical (MSTDB-TC) coupled with Thermochimica. The effect of composition variation during decay of fission product inventory in a molten salt over a period of 500 days prolonged post- at multiple temperatures was studied. Mass fractions for fluorine and berilium were varied in order to probe the effects of free fluorine control. Finally, speciation of fluoride reactors were showed by comparing MSRE readionuclide inventories with a FLiBe based molten salt breeder reactor (MSBR). The results showed that fission product mass change has little effect on phase mass changes and vapor pressures for fluoride species, but differ with varying carrier and fuel salt compositions. However, iodine species were found to have a vapor pressure not only dependent on temperature, but also the free fluorine potential, releasing iodine when the free fluorine potential is equal to the iodine inventory. This observation, however, arose under free fluorine potentials that are very unlikely to be realized in typical molten salt mixtures. Despite this observation, temperature was found to be the dominant parameter that drove phase change and fission product species vapor pressure. The results indicate that the current frozen chemistry approach is adequate for MSR analysis.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Calibration of COBRA-TF and STAR-CCM+ with Dakota 6.5 for CASL

High-to-low (Hi2Lo) is utilizing a validated model in a high resolution code to generate synthetic data for improvement of the same model in a lower resolution code. This process is useful in cases where experimental data does not exist or is not sufficient. Data from the high resolution code is treated as calibration data (with appropriate uncertainties and error bounds) which can be used to train parameters that affect solution accuracy in the lower resolution code model and reduce uncertainty. Implementing the Hi2Lo process between COBRA-TF (CTF) and STAR-CCM+ (STAR) within a Dakota 6.5 framework is the goal of this work. High resolution results provided by STAR will eventually be used in addition to experimental data from Westinghouse Electric Company (WEC) to reduce uncertainty in the CTF model. The scope of the work presented herein is a proof of concept for deterministic calibration using Dakota and is not a demonstration of the Hi2Lo process. CTF temperatures will be calibrated to WEC experimental data as a first demonstration of the calibration process. Validation of the CTF model with experimental data was performed previously.

42 ENGINEERING↗

Pseudospectral Maxwell solvers for an accurate modeling of Doppler harmonic generation on plasma mirrors with particle-in-cell codes

With the advent of petawatt class lasers, the very large laser intensities attainable on target should enable the production of intense high-order Doppler harmonics from relativistic laser-plasma mirror interactions. At present, the modeling of these harmonics with particle-in-cell (PIC) codes is extremely challenging as it implies an accurate description of tens to hundreds of harmonic orders on a broad range of angles. In particular, we show here that due to the numerical dispersion of waves they induce in vacuum, standard finite difference time domain (FDTD) Maxwell solvers employed in most PIC codes can induce a spurious angular deviation of harmonic beams potentially degrading simulation results. This effect was extensively studied and a simple toy model based on the Snell-Descartes law was developed that allows us to finely predict the angular deviation of harmonics depending on the spatiotemporal resolution and the Maxwell solver used in the simulations. Our model demonstrates that the mitigation of this numerical artifact with FDTD solvers mandates very high spatiotemporal resolution preventing realistic three-dimensional (3D) simulations even on the largest computers available at the time of writing. Finally, we finally show that nondispersive pseudospectral analytical time domain solvers can considerably reduce the spatiotemporal resolution required to mitigate this spurious deviation and should enable in the near future 3D accurate modeling on supercomputers in a realistic time to solution.

70 PLASMA PHYSICS AND FUSION TECHNOLOGY↗

Simulation of Boiling Two-Phase Flow in a Helical Coil Steam Generator Using the Spectral Element Code Nek-2P

To enable the design of a light water small modular reactor, the boiling flow inside a helical coil steam generator has been simulated with the two-fluid model in Nek-2P. Nek-2P is the multiphase branch of the spectral element code Nek5000. Details of the implementation of the two-fluid model and the included closure models are discussed. The presented closure models include interactions for momentum, heat, and mass transfer between phases. Models for the drag, lift, and turbulent dispersion forces are included. The complete model is fully consistent in the limits of both phasic volume fractions approaching zero and is able to simulate flows of dispersed vapor, continuous liquid, dispersed liquid, continuous vapor, or any combination thereof. The closure models and their implementation in Nek-2P have been validated by comparing to experimental data for a boiling flow, demonstrating excellent agreement. Results from the simulation of the helical coil indicate strong phasic separation driven by the effects of buoyancy and inertia. Finally, significant differences were observed in the results compared to simulations performed using Star-CCM+, although these differences were somewhat expected.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Sandia Hyperspectral Upper-Bound Spectrum Version 1.0

The Sandia hyperspectral upper-bound spectrum algorithm (hyper-UBS) is a cosmic ray despiking algorithm for hyperspectral data sets. When naturally-occurring, high-energy (gigaelectronvolt) cosmic rays impact the earth’s atmosphere, they create an avalanche of secondary particles which will register as a large, positive spike on any spectroscopic detector they hit. Cosmic ray spikes are therefore an unavoidable spectroscopic contaminant which can interfere with subsequent analysis. A variety of cosmic ray despiking algorithms already exist and can potentially be applied to hyperspectral data matrices, most notably the upper-bound spectrum data matrices (UBS-DM) algorithm by Dongmao Zhang and Dor Ben-Amotz which served as the basis for the hyper-UBS algorithm. However, the existing algorithms either cannot be applied to hyperspectral data, require information that is not always available, introduce undesired spectral bias, or have otherwise limited effectiveness for some experimentally relevant conditions. Hyper-UBS is more effective at removing a wider variety of cosmic ray spikes from hyperspectral data without introducing undesired spectral bias. In addition to the core algorithm the Sandia hyper-UBS software package includes additional source code useful in evaluating the effectiveness of the hyper-UBS algorithm. The accompanying source code includes code to generate simulated hyperspectral data contaminated by cosmic ray spikes, several existing despiking algorithms, and code to evaluate the performance of the despiking algorithms on simulated data.

Anthony, Stephen↗

Relativistic opacities for astrophysical applications

Here, we report on the use of the Los Alamos suite of relativistic atomic physics codes to generate radiative opacities for the modeling of astrophysically relevant plasmas under local thermodynamic equilibrium (LTE) conditions. The atomic structure calculations are carried out in fine-structure detail, including full configuration interaction. Three example applications are considered: iron opacities at conditions relevant to the base of the solar convection zone, nickel opacities for the modeling of stellar envelopes, and samarium opacities for the modeling of light curves produced by neutron star mergers. In the first two examples, comparisons are made between opacities that are generated with the fully and semi-relativistic capabilities in the Los Alamos suite of codes. As expected for these highly charged, iron-peak ions, the two methods produce reasonably similar results, providing confidence that the numerical methods have been correctly implemented. However, discrepancies greater than 10% are observed for nickel and investigated in detail. In the final application, the relativistic capability is used in a preliminary investigation of the complicated absorption spectrum associated with cold lanthanide elements.

79 ASTRONOMY AND ASTROPHYSICS↗

GRChombo : Numerical relativity with adaptive mesh refinement

In this work, we introduce GRChombo: a new numerical relativity code which incorporates full adaptive mesh refinement (AMR) using block structured Berger-Rigoutsos grid generation. The code supports non-trivial 'many-boxes-in-many-boxes' mesh hierarchies and massive parallelism through the message passing interface. GRChombo evolves the Einstein equation using the standard BSSN formalism, with an option to turn on CCZ4 constraint damping if required. The AMR capability permits the study of a range of new physics which has previously been computationally infeasible in a full 3 + 1 setting, while also significantly simplifying the process of setting up the mesh for these problems. We show that GRChombo can stably and accurately evolve standard spacetimes such as binary black hole mergers and scalar collapses into black holes, demonstrate the performance characteristics of our code, and discuss various physics problems which stand to benefit from the AMR technique.

Clough, Katy (ORCID:0000000188411522)↗

General purpose steam table library :

Completion of the CASL L3 milestone THM.CFD.P7.04 provides a general purpose tabular interpolation library for material properties to support, in particular, standardized models for steam properties. The software consists of three parts, implementations of analytic steam models, a code to generate tables from those models, and an interpolation package to interface the tables to CFD codes such as Hydra-TH. Verification of the standard model is maintained through the entire train of routines. The performance of interpolation package exceeds that of freely available analytic implementation of the steam properties by over an order of magnitude.

Carpenter, John H.↗

Unified Language Frontend for Physic-Informed AI/ML

Artificial intelligence and machine learning (AI/ML) are becoming important tools for scientific modeling and simulation as in several other fields such as image analysis and natural language processing. ML techniques can leverage the computing power available in modern systems and reduce the human effort needed to configure experiments, interpret and visualize results, draw conclusions from huge quantities of raw data, and build surrogates for physics based models. Domain scientists in fields like fluid dynamics, microelectronics and chemistry can automate many of their most difficult and repetitive tasks or improve the design times by use of the faster ML-surrogates. However, modern ML and traditional scientific highperformance computing (HPC) tend to use completely different software ecosystems. While ML frameworks like PyTorch and TensorFlow provide Python APIs, most HPC applications and libraries are written in C++. Direct interoperability between the two languages is possible but is tedious and error-prone. In this work, we show that a compiler-based approach can bridge the gap between ML frameworks and scientific software with less developer effort and better efficiency. We use the MLIR (multi-level intermediate representation) ecosystem to compile a pre-trained convolutional neural network (CNN) in PyTorch to freestanding C++ source code in the Kokkos programming model. Kokkos is a programming model widely used in HPC to write portable, shared-memory parallel code that can natively target a variety of CPU and GPU architectures. Our compiler-generated source code can be directly integrated into any Kokkosbased application with no dependencies on Python or cross-language interfaces.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗