Search NASA⌕ Search

SEARCH · Search NASA

Results for “code requirements”

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 397 records · Page 22

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↗

Energy Savings Analysis of the Proposed NYStretch-Energy Code 2018

This study was conducted by the Pacific Northwest National Laboratory (PNNL) in support of the stretch energy code development led by the New York State Energy Research and Development Authority (NYSERDA). In 2017 NYSERDA developed its 2016 Stretch Code Supplement to the 2016 New York State Energy Conservation Construction Code (hereinafter referred to as “NYStretch-Energy”). NYStretch-Energy is intended as a model energy code for statewide voluntary adoption that anticipates other code advancements culminating in the goal of a statewide Net Zero Energy Code by 2028. Since then, NYSERDA continues to develop the NYStretch-Energy Code 2018 edition. To support the effort, PNNL conducted energy simulation analysis to quantify the energy savings of proposed commercial provisions of the NYStretch-Energy Code (2018) in New York. The focus of this project is the 20% improvement over existing commercial model energy codes. A key requirement of the proposed stretch code is that it be ‘adoptable’ as an energy code, meaning that it must align with current code scope and limitations, and primarily impact building components that are currently regulated by local building departments. It is largely limited to prescriptive measures, which are what most building departments and design projects are most familiar with. This report describes a set of energy-efficiency measures (EEMs) that demonstrate 20% energy savings over ANSI/ASHRAE/IES Standard 90.1-2013 (ASHRAE 2013) across a broad range of commercial building types and all three climate zones in New York. In collaboration with New Building Institute, the EEMs were developed from national model codes and standards, high-performance building codes and standards, regional energy codes, and measures being proposed as part of the on-going code development process. PNNL analyzed these measures using whole building energy models for selected prototype commercial buildings and multifamily buildings representing buildings in New York. Section 2 of this report describes the analysis methodology, including the building types and construction area weights update for this analysis, the baseline, and the method to conduct the energy saving analysis. Section 3 provides detailed specifications of the EEMs and bundles. Section 4 summarizes the results of individual EEMs and EEM bundles by building type, energy end-use and climate zone. Appendix A documents detailed descriptions of the selected prototype buildings. Appendix B provides energy end-use breakdown results by building type for both the baseline code and stretch code in all climate zones.

29 ENERGY PLANNING, POLICY, AND ECONOMY↗

Final Energy Savings Analysis of the Proposed NYStretch-Energy Code 2018

This study was conducted by the Pacific Northwest National Laboratory (PNNL) in support of the stretch energy code development led by the New York State Energy Research and Development Authority (NYSERDA). In 2017 NYSERDA developed its 2016 Stretch Code Supplement to the 2016 New York State Energy Conservation Construction Code (hereinafter referred to as “NYStretch-Energy”). NYStretch-Energy is intended as a model energy code for statewide voluntary adoption that anticipates other code advancements culminating in the goal of a statewide Net Zero Energy Code by 2028. Since then, NYSERDA continues to develop the NYStretch-Energy Code 2018 edition (NYSERDA 2018). To support the effort, PNNL conducted energy simulation analysis to quantify the energy savings of proposed commercial provisions of the NYStretch-Energy Code 2018 in New York. The focus of this project is to significantly improve the energy efficiency over existing commercial model energy codes. A key requirement of the proposed stretch code is that it be ‘adoptable’ as an energy code, meaning that it must align with current code scope and limitations, and primarily impact building components that are currently regulated by local building departments. It is largely limited to prescriptive measures, which are what most building departments and design projects are most familiar with. This report describes a set of energy-efficiency measures (EEMs) that demonstrate significant energy savings over ANSI/ASHRAE/IES Standard 90.1-2013 (ASHRAE 2013) across a broad range of commercial building types and all three climate zones in New York. In collaboration with New Building Institute, the EEMs were developed from national model codes and standards, high-performance building codes and standards, regional energy codes, and measures being proposed as part of the on-going code development process. PNNL analyzed these measures using whole building energy models for selected prototype commercial buildings and multifamily buildings representing buildings in New York.

29 ENERGY PLANNING, POLICY, AND ECONOMY↗

Experiences on p-Version Time-Discontinuous Galerkin's Method for Nonlinear Heat Transfer Analysis and Sensitivity Analysis

The focus of this research is on the development of analysis and sensitivity analysis equations for nonlinear, transient heat transfer problems modeled by p-version, time discontinuous finite element approximation. The resulting matrix equation of the state equation is simply in the form ofA(x)x = c, representing a single step, time marching scheme. The Newton-Raphson's method is used to solve the nonlinear equation. Examples are first provided to demonstrate the accuracy characteristics of the resultant finite element approximation. A direct differentiation approach is then used to compute the thermal sensitivities of a nonlinear heat transfer problem. The report shows that only minimal coding effort is required to enhance the analysis code with the sensitivity analysis capability.

Hou, Gene↗

Towards Generic Parallel Programming in Computer Science Education with Kokkos

Parallel patterns, views, and spaces are promising abstractions to capture the programmer's intent as well as the contextual information that can be used by an underlying runtime to efficiently map software to parallel hardware. These abstractions can be valuable in cases where an algorithm must accommodate requirements of code and performance portability across hardware architectures and vendor programming models. Kokkos is a parallel programming model for host- and accelerator architectures that relies on these abstractions and targets these requirements. It consists of a pure C++ interface, a specification, and a programming library. The programming library exposes patterns and types and maps them to an underlying abstract machine model. The abstract machine model offers a generic view of parallel hardware. While Kokkos is gaining popularity in large-scale HPC applications at some DOE laboratories, we believe that the implemented concepts are of interest to a broader audience including academia as they may contribute to a generic, vendor, and architecture-independent education of parallel programming. In this work, we give an insight into the design considerations of this programming model and list important abstractions. Further, we document best practices obtained from giving virtual classes on Kokkos and give pointers to resources that the reader may consider valuable for a lecture on generic parallel programming for students with preexisting knowledge on this matter.

Ciesko, Jan↗

An analysis of defect densities found during software inspections

Software inspection is a technical evaluation process for finding and removing defects in requirements, design, code, and tests. Detailed data was collected during the first three years of experience at JPL on 203 inspections. Statistics are discussed for this set of inspections. Included, on a per inspection basis, are averages of: staff time expended, pages covered, major defects found, minor defects found, and inspection team size. Analysis of variance showed a significantly higher density of defects during requirements inspections. It was also observed, that the defect densities found decreased exponentially as the work products approached the coding phase. Increasing the pace of the inspection meeting decreased the density of defects found. This relationship was observed to hold for both major and minor defect densities, although it was more pronounced for minor defects. Guidelines are provided for conducting successful software inspections based upon three years of JPL experience.

Kelly, John C.↗

Future requirements of wind tunnels for Computational Fluid Dynamics code verification

The role of experiment in the development of Computational Fluid Dynamics (CFD) for external aerodynamic flow-field prediction is discussed. Requirements for code verification from two sources pacing the development of CFD are described: (1) the need for developing adequate flow modeling, and (2) the need for establishing confidence in the use of CFD for predicting complex flows. The type of data needed to meet these needs differs in detail and scope and leads to definite wind tunnel requirements. Recent examples of testing to assess and develop turbulence models, and to verify code development are used to establish future requirements of wind tunnel testing for CFD verification.

Marvin, J. G.↗

Development of the MPACT 69-group Library for Magnox Reactor Analysis using CASL VERA

The Consortium for Advanced Simulation of Light Water Reactors (CASL) has developed the CASL toolset, Virtual Environment for Reactor Analysis (VERA), for pressurized water reactor (PWR) analysis. Recently the CASL VERA was improved for Magnox reactor analysis, which required the development of a new cross section library and new geometrical and thermal feedback capabilities for graphite-moderated Magnoxreactors. The MPACT neutronics module of the CASL core simulator is a 3D whole core transport code, which requires a new cross section library with a different energy group structure due to the different neutronic characteristics of Magnox compared with PWR. A new 69-group structure was developed based on the MPACT 51-group structure to have more thermal energy groups and to be a subset of the SCALE 252-group structure. The ENDF/B-VII.1 MPACT 69-group library was developed for Magnox reactor analysis using the SCALE/AMPX and VERA-XSTools for which a super-homogenization method was applied, and transport cross sections were generated for graphite using a neutron leakage conservation method. Benchmark results show that new MPACT 69-group library works reasonably well for Magnox reactor analysis.

Kim, Kang Seog↗

Status of Metallic Structural Materials for Molten Salt Reactors

In the US and around the world, significant interest surrounds development and deployment of nuclear systems using molten salts to transfer heat. Several configurations are being explored, including the use of fluoride salts either as the primary coolant of a reactor with solid fuel or with the fissile material dissolved in the salt. Molten Salt Reactors (MSRs) with fluoride salt typically have a thermal neutron spectrum. There are also fast-spectrum reactors that could use chloride salts to transfer heat. As a result of operation of the Molten Salt Reactor Experiment (MSRE) at Oak Ridge National Laboratory during the 1960s, a system with uranium fuel dissolved in a fluoride-salt medium is the most well-established technology. A nickel alloy with about 6%Cr and molybdenum as a solid solution strengthening agent was developed and deployed for all structural applications in this reactor. The alloy was commercialized as Hastelloy N. During these experiments and in post-decommissioning characterization of material behavior, it was determined that the most significant challenges for structural materials are embrittlement, from helium introduced by transmutation of Ni, and corrosion and grain boundary embrittlement from the fission product tellurium. The MSRE had an outlet temperature of approximately 650°C. The mechanical properties of Hastelloy N are not sufficient to support long-term operation of an MSR above this temperature. Qualification of a material for use in the ASME Boiler and Pressure Vessel Code, Section III, “Rules for Construction of Nuclear Facility Components,” Division 5, “High Temperature Reactors,” will facilitate licensing with the Nuclear Regulatory Commission. Hastelloy N has not been qualified for use in nuclear construction, and significant additional characterization would be required for Code qualification. Given that this alloy is susceptible to He embrittlement and has limited high-temperature strength, it is not recommended that Code qualification be pursued. Instead, it is recommended that a systematic development program be initiated to develop new nickel alloys that contain a fine, stable dispersion of intermetallic particles to trap He at the interface between the matrix and particle and with increased solid solution strengthening from addition of refractory elements. Extensive screening of attractive alloy compositions for elevated temperature strength, microstructural stability, weldability, and resistance to He embrittlement (characterized using ion implantation) will lead to an alloy down-selection for commercialization and Code qualification.

11 NUCLEAR FUEL CYCLE AND FUEL MATERIALS↗

Measure Guideline: Buried and/or Encapsulated Ducts

Buried and/or encapsulated ducts (BEDs) are a class of advanced, energy-efficiency strategies intended to address the significant ductwork thermal losses associated with ducts installed in unconditioned attics. BEDs are ducts installed in unconditioned attics that are covered in loose-fill insulation and/or encapsulated in closed cell polyurethane spray foam insulation. This Measure Guideline covers the technical aspects of BEDs as well as the advantages, disadvantages, and risks of BEDs compared to other alternative strategies. This guideline also provides detailed guidance on installation of BEDs strategies in new and existing homes through step-by-step installation procedures. This Building America Measure Guideline synthesizes previously published research on BEDs and provides practical information to builders, contractors, homeowners, policy analysts, building professions, and building scientists. Some of the procedures presented here, however, require specialized equipment or expertise. In addition, some alterations to duct systems may require a specialized license. Persons implementing duct system improvements should not go beyond their expertise or qualifications. This guideline provides valuable information for a building industry that has struggled to address ductwork thermal losses in new and existing homes. As building codes strengthen requirements for duct air sealing and insulation, flexibility is needed to address energy efficiency goals. While ductwork in conditioned spaces has been promoted as the panacea for addressing ductwork thermal losses, BEDs installations approach - and sometimes exceed - the performance of ductwork in conditioned spaces.

32 ENERGY CONSERVATION, CONSUMPTION, AND UTILIZATI↗

Parallelization of ARC3D with Computer-Aided Tools

A series of efforts have been devoted to investigating methods of porting and parallelizing applications quickly and efficiently for new architectures, such as the SCSI Origin 2000 and Cray T3E. This report presents the parallelization of a CFD application, ARC3D, using the computer-aided tools, Cesspools. Steps of parallelizing this code and requirements of achieving better performance are discussed. The generated parallel version has achieved reasonably well performance, for example, having a speedup of 30 for 36 Cray T3E processors. However, this performance could not be obtained without modification of the original serial code. It is suggested that in many cases improving serial code and performing necessary code transformations are important parts for the automated parallelization process although user intervention in many of these parts are still necessary. Nevertheless, development and improvement of useful software tools, such as Cesspools, can help trim down many tedious parallelization details and improve the processing efficiency.

Jin, Haoqiang↗

dc-free coset codes

A class of block coset codes with disparity and run-length constraints are studied. They are particularly well suited for high-speed optical fiber links and similar channels, where dc-free pulse formats, channel error control, and low-complexity encoder-decoder implementations are required. The codes are derived by partitioning linear block codes. The encoder and decoder structures are the same as those of linear block codes with only slight modifications. A special class of dc-free coset block codes are derived from BCH codes with specified bounds on minimum distance, disparity, and run length. The codes have low disparity levels (a small running digital sum) and good error-correcting capabilities.

Deng, Robert H.↗

A maximum likelihood approach to estimating correlation functions

We define a maximum likelihood (ML for short) estimator for the correlation function, ξ, that uses the same pair counting observables (D, R, DD, DR, RR) as the standard Landy and Szalay (LS for short) estimator. The ML estimator outperforms the LS estimator in that it results in smaller measurement errors at any fixed random point density. Put another way, the ML estimator can reach the same precision as the LS estimator with a significantly smaller random point catalog. Moreover, these gains are achieved without significantly increasing the computational requirements for estimating ξ. We quantify the relative improvement of the ML estimator over the LS estimator and discuss the regimes under which these improvements are most significant. We present a short guide on how to implement the ML estimator and emphasize that the code alterations required to switch from an LS to an ML estimator are minimal.

79 ASTRONOMY AND ASTROPHYSICS↗

Adding linear kinetic effects to existing finite-difference simulations

We present the proof-of-principle KINETIC-J module for iterative addition of all-order kinetic effects (parallel and perpendicular) in both the IC and EC frequency ranges, to any existing FD or FE frequency-domain full-wave RF simulation. The module calculates the linear, kinetic plasma current, such that given f 0 (r,v) and the cold plasma solution as an initial guess at the wave electric field, iterating the KINETIC-J module and the existing code (its internal plasma current replaced with the output of the module) converges to the kinetic solution. Since KINETIC-J does not use the k-space representation of the hot plasma dielectric, in favor of data parallel numeric integrals, implementing the module requires minimal code changes.

Green, David L↗

Calculation of damage, He and H production using SPECTER

This document explains the procedure to compute gas production in fuel and structural materials using SPECTER from neutronics calculations provided by J. Latkowski using MCNP. The gas production cross sections (four channels are considered: (n, {sub 1}{sup 1,2,3}H) and (n,{sub 2}{sup 4}He)) for each isotope are taken from the cross-section library ENDF/B-V (we refer the reader to the SPECTER manual for more details). Therein, one can see flux data from, approximately, 0 (BOL) to 50 (EOL) years (cut after 7 columns for clarity). In order to compute damage and gas production with SPECTER, one needs to provide the flux group data expressed in a maximum of 100 energy groups (a SPECTER requirement). The flux data structure provided by J. Latkowski using MCNP consists of 616 groups spanning the 10{sup -9} < E < 20 MeV energy range. The first thing that needs to be done is to collapse these data into a format consisting of 100 groups suitable for SPECTER. As we can see, our (arbitrarily chosen) group structure covers the same energy range as the flux data from MCNP. A simple code (multgrp.c) has been written using the C programming language to do the collapse. This code only requires the desired output group structure as input (just shown above), and the flux data from MCNP. Note that the input flux group structure (from MCNP) can be any, as the code is not limited to the specific one of 616 groups used by Latkowski et al.

42 ENGINEERING↗

Data-driven backward chaining

The C Language Integrated Production System (CLIPS) cannot effectively perform sound and complete logical inference in most real-world contexts. The problem facing CLIPS is its lack of goal generation. Without automatic goal generation and maintenance, forward chaining can only deduce all instances of a relationship. Backward chaining, which requires goal generation, allows deduction of only that subset of what is logically true which is also relevant to ongoing problem solving. Goal generation can be mimicked in simple cases using forward chaining. However, such mimicry requires manual coding of additional rules which can assert an inadequate goal representation for every condition in every rule that can have corresponding facts derived by backward chaining. In general, for N rules with an average of M conditions per rule the number of goal generation rules required is on the order of N*M. This is clearly intractable from a program maintenance perspective. We describe the support in Eclipse for backward chaining which it automatically asserts as it checks rule conditions. Important characteristics of this extension are that it does not assert goals which cannot match any rule conditions, that 2 equivalent goals are never asserted, and that goals persist as long as, but no longer than, they remain relevant.

Haley, Paul↗

Extension of Generalized Fluid System Simulation Program's Fluid Property Database

This internship focused on the development of additional capabilities for the General Fluid Systems Simulation Program (GFSSP). GFSSP is a thermo-fluid code used to evaluate system performance by a finite volume-based network analysis method. The program was developed primarily to analyze the complex internal flow of propulsion systems and is capable of solving many problems related to thermodynamics and fluid mechanics. GFSSP is integrated with thermodynamic programs that provide fluid properties for sub-cooled, superheated, and saturation states. For fluids that are not included in the thermodynamic property program, look-up property tables can be provided. The look-up property tables of the current release version can only handle sub-cooled and superheated states. The primary purpose of the internship was to extend the look-up tables to handle saturated states. This involves a) generation of a property table using REFPROP, a thermodynamic property program that is widely used, and b) modifications of the Fortran source code to read in an additional property table containing saturation data for both saturated liquid and saturated vapor states. Also, a method was implemented to calculate the thermodynamic properties of user-fluids within the saturation region, given values of pressure and enthalpy. These additions required new code to be written, and older code had to be adjusted to accommodate the new capabilities. Ultimately, the changes will lead to the incorporation of this new capability in future versions of GFSSP. This paper describes the development and validation of the new capability.

Patel, Kishan↗

MCNP6 Gets Correlated with CGM 3.4 - Paper 41

Version 3.4 of the Cascading Gamma-ray Multiplicity (CGM) code has been integrated into version 6 of the Monte Carlo radiation transport code MCNP. The current release is MCNP6 which is the merger of MCNPX 2.7.0 and MCNP5. MCNP6 is a general purpose Monte Carlo radiation transport code that can transport 34 different particles and heavy ions. CGM was originally integrated into MCNPX 2.7.0 as an undocumented feature, but was never released to the public. With the integration of CGM into MCNP6 the code now has the capability of producing correlated secondary particle/gamma emissions and should be available in future release of MCNP. Before the integration of CGM, MCNP only used libraries that contain the total multiplicity but not the multiplicity distribution or the correlations. Lacking this information requires the code to use integer sampling to determine the multiplicity. In the example of thermal neutron capture on Cl-35, presented in the results section, MCNP does integer sampling. This means MCNP would produce one gamma 17% of the time and two gammas 82% giving a mean multiplicity of 1.83. Using CGM, MCNP can now produce a spectrum of multiplicities. The use of CGM has several advantages over the use of ACE data libraries in MCNP6: 1) it has correlated gamma production, 2) it produces a distribution of gamma multiplicities per interaction, whereas ACE produces an average between two integer multiplicities, 3) it is a theoretical model that may predict experimentally unmeasured physical quantities that may not be in experimental based data libraries. CGM conserves energy and angular momentum internally to CGM; however, angular emission information is not currently sent back to MCNP6. Future work will include the integration of correlated neutrons from CGM. Also, the reaction type will be passed to CGM to set the spin and parity for a particular reaction when possible. (authors)

61 RADIATION PROTECTION AND DOSIMETRY↗