Search NASASearch

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 325 records · Page 18

Coupling Noah-Multiparameterization land-surface Model with Energy Research and Forecasting Model

The Energy Research and Forecasting (ERF) model is a high-performance atmospheric model built on the AMReX adaptive mesh refinement (AMR) framework, enabling efficient simulations on heterogeneous computing platforms that combine multicore processors with hardware accelerators. To support land–atmosphere interactions within ERF’s AMR-based environment, a land-surface model must be capable of operating directly on hierarchically refined meshes. In this work, we present a methodology for coupling the Fortran-based Noah-Multiparameterization (Noah-MP) land-surface model with ERF’s C++ codebase. Rather than rewriting Noah-MP, we construct a Fortran–C interoperability layer using CodeScribe, a tool that leverages large language models (LLMs) to automate the generation of interface code. CodeScribe applies structured prompting techniques to generate bindings that support efficient data exchange and function calls between ERF and Noah-MP. The coupling framework also incorporates AMR-aware data handling strategies, allowing NoahMP to operate seamlessly within ERF’s hierarchical mesh structure. This work provides a structured approach for integrating legacy Fortran models into modern C++-based modeling systems using LLM-assisted code generation.

54 ENVIRONMENTAL SCIENCES

RGM: Random Geological Model Generation Package

This Fortran code is to accompany a manuscript to be submitted to Computers & Geosciences, a high-impact, peer-reviewed journal in computer methods for geosciences research. This Fortran code focuses on generation of synthetic geological models using a multi-randomization strategy. Generating high-fidelity synthetic geological models, including realistic seismic reflector migration images, faults, salt bodies, and relative geological time images, is the key for many supervised machine learning methods that aim to delineate faults and other geological properties of interest from seismic migration images. Our package contains two major functionalities: generating 2D synthetic random geological models and generating 3D synthetic random geological models. In each step of the generation process, we set random values for key properties of a geological model to improve the fidelity of the resulting geological model. The package also includes example codes on how to use the random geological model generation subroutines. We name this package RGM – Random Geological Model generation package.

Gao, Kai

Data compression system

A data compression system is described in which TV PCM data for each line scan is received in the form of a succession of multibit pixel words. All or selected bits of each word are compressed by providing difference values between successive pixel words and coding the difference values of a selected number of pixel words forming a block into a fundamental sequence (FS). The FS, based on its length and the number of words per block, is either transmitted as the compressed data or is used to generate a code FS or its complement is used to generate a code FS bar. When the code FS is generated, its length is compared with the original block PCM and only if the former is the shorter of the two is the code transmitted. Selected bits per pixel word may be compressed, while the remaining bits may be transmitted directly, or some of them may be omitted altogether.

Rice, R. F.

TIGGERC: Turbomachinery interactive grid generator energy distributor and restart code

A two dimensional multi-block grid generator was developed for a new design and analysis system for studying multi-blade row turbomachinery problems with an axisymmetric viscous/inviscid 'average passage' through flow code. TIGGERC is a mouse driven, fully interactive grid generation program which can be used to modify boundary coordinates and grid packing. TIGGERC generates grids using a hyperbolic tangent or algebraic distribution of grid points on the block boundaries and the interior points of each block grid are distributed using a transfinite interpolation approach. TIGGERC generates a blocked axisymmetric H grid, C grid, I grid, or O grid for studying turbomachinery flow problems. TIGGERC was developed for operation on small high speed graphic workstations.

Miller, David P.

Seismic Contingency Auto Generator

This code takes in premade earthquake scenario XML files from USGS, power grid data, and converts them into a contingency file (.con file) that can be used by power grid solvers. Within the .con file are a number (Specified by the user) of contingencies that have randomly failed power transformers based on their likelihood of failure and peak ground acceleration (PGA) value around the transformer. The transformers' likelihood of failure was calculated based on a variety of finite element modeling on various transformer designed for specific transformer voltage classes. Parameters from these FEM were used to create generic fragility curves for transformers within a specific voltage class, which correspond with earthquake PGA values to produced a probability of failure for a given earthquake scenario. More refined versions of this process, such as specifying specific transformer design categories within a voltage class, could also be applied in future iterations of the software.

Vaagensmith, Bjorn [Idaho National Laboratory (INL

Fusion Neutron Generator

The proposed code, named FROG (Fusion neutron Generator) is built upon the open-source particle transport Monte Carlo toolkit Geant4. Geant4 provides C++ classes that can be leveraged to build application-specific codes dealing with the transport of particles through matter. Geant4-based codes are applied in high-energy particle physics experiments, medical applications, shielding, and space applications for example. The FROG code allows the user to define the geometry of a neutron converter device shaped as a hollow cylinder, where a neutron breeding material such as lithium deuteride (LiD) is cladded by two concentric cylinders. Such neutron converter is then placed inside a regular nuclear fission reactor, where thermal neutrons will react with the neutron breeder material (typically, Lithium 6), and through a series of reactions, will generate high-energy neutrons – neutrons whose kinetic energy are around 14 MeV. The hollowed central portion can hold a specimen that will be bombarded by high-energy neutrons created inside the neutron breeding material. Figuratively speaking, this type of device transforms neutrons from thermal (~0.625 eV) to fusion (~14 MeV) energies and is sometimes termed “fusion-to-thermal neutron converters” in the literature. The code consists of C++ source file compiled and linked to generate an executable. The user can select the dimensions of the converter (radius, length, and thickness of the breeder material), the breeder material type, the cladding material, and the specimen material that will be activated or irradiated. As input, the neutron flux for a specific location inside a reactor, for instance, positions in ATR, is required. As output, the code predicts the number of high-energy neutrons produced, the total neutron flux and fluence as well as its detailed spectrum. The physics involved in such device is very complex, as it requires modeling neutron transport, light-ion (tritons) transport, as well as fusion reactions. The Geant4 toolkit provides the required physical models.

Martin, NicholasP. [Idaho National Laboratory (INL

Tensoral Present and Future

The coding of high-performance fluids simulations requires significant knowledge of both numerical and computational details. The magnitude and complexity of low-level details is often enough to discourage many users of turbulence data wishing to study more important, higher-level fluid dynamical questions. These same complexities are often a practical barrier to simulation experts who develop, verify and maintain the codes which generate this data. Future fluids codes, with high resolution and complex geometries, are likely to involve far more coding complexity. The research--the design and implementation of the Tensoral computer language--aims to greatly ease the coding of today's simulation and post-processing codes and at the same time provide a general computational tool for future simulations.

Dresselhaus, Eliot

A concatenated coding scheme for error control

A concatenated coding scheme for error control in data communications is analyzed. The inner code is used for both error correction and detection, however the outer code is used only for error detection. A retransmission is requested if the outer code detects the presence of errors after the inner code decoding. The probability of undetected error of the above error control scheme is derived and upper bounded. Two specific exmaples are analyzed. In the first example, the inner code is a distance-4 shortened Hamming code with generator polynomial (X+1)(X(6)+X+1) = X(7)+X(6)+X(2)+1 and the outer code is a distance-4 shortened Hamming code with generator polynomial (X+1)X(15+X(14)+X(13)+X(12)+X(4)+X(3)+X(2)+X+1) = X(16)+X(12)+X(5)+1 which is the X.25 standard for packet-switched data network. This example is proposed for error control on NASA telecommand links. In the second example, the inner code is the same as that in the first example but the outer code is a shortened Reed-Solomon code with symbols from GF(2(8)) and generator polynomial (X+1)(X+alpha) where alpha is a primitive element in GF(z(8)).

Lin, S.

CEM2k and LAQGSM Codes as Event-Generators for Space Radiation Shield and Cosmic Rays Propagation Applications

Space radiation shield applications and studies of cosmic ray propagation in the Galaxy require reliable cross sections to calculate spectra of secondary particles and yields of the isotopes produced in nuclear reactions induced both by particles and nuclei at energies from threshold to hundreds of GeV per nucleon. Since the data often exist in a very limited energy range or sometimes not at all, the only way to obtain an estimate of the production cross sections is to use theoretical models and codes. Recently, we have developed improved versions of the Cascade-Exciton Model (CEM) of nuclear reactions: the codes CEM97 and CEM2k for description of particle-nucleus reactions at energies up to about 5 GeV. In addition, we have developed a LANL version of the Quark-Gluon String Model (LAQGSM) to describe reactions induced both by particles and nuclei at energies up to hundreds of GeVhucleon. We have tested and benchmarked the CEM and LAQGSM codes against a large variety of experimental data and have compared their results with predictions by other currently available models and codes. Our benchmarks show that CEM and LAQGSM codes have predictive powers no worse than other currently used codes and describe many reactions better than other codes; therefore both our codes can be used as reliable event-generators for space radiation shield and cosmic ray propagation applications. The CEM2k code is being incorporated into the transport code MCNPX (and several other transport codes), and we plan to incorporate LAQGSM into MCNPX in the near future. Here, we present the current status of the CEM2k and LAQGSM codes, and show results and applications to studies of cosmic ray propagation in the Galaxy.

Mashnik, S. G.

An Embedded Rule-Based Diagnostic Expert System in Ada

Ada is becoming an increasingly popular programming language for large Government-funded software projects. Ada with it portability, transportability, and maintainability lends itself well to today's complex programming environment. In addition, expert systems have also assumed a growing role in providing human-like reasoning capability expertise for computer systems. The integration is discussed of expert system technology with Ada programming language, especially a rule-based expert system using an ART-Ada (Automated Reasoning Tool for Ada) system shell. NASA Lewis was chosen as a beta test site for ART-Ada. The test was conducted by implementing the existing Autonomous Power EXpert System (APEX), a Lisp-based power expert system, in ART-Ada. Three components, the rule-based expert systems, a graphics user interface, and communications software make up SMART-Ada (Systems fault Management with ART-Ada). The rules were written in the ART-Ada development environment and converted to Ada source code. The graphics interface was developed with the Transportable Application Environment (TAE) Plus, which generates Ada source code to control graphics images. SMART-Ada communicates with a remote host to obtain either simulated or real data. The Ada source code generated with ART-Ada, TAE Plus, and communications code was incorporated into an Ada expert system that reads the data from a power distribution test bed, applies the rule to determine a fault, if one exists, and graphically displays it on the screen. The main objective, to conduct a beta test on the ART-Ada rule-based expert system shell, was achieved. The system is operational. New Ada tools will assist in future successful projects. ART-Ada is one such tool and is a viable alternative to the straight Ada code when an application requires a rule-based or knowledge-based approach.

Jones, Robert E.

Synthesizing Safety Conditions for Code Certification Using Meta-Level Programming

In code certification the code consumer publishes a safety policy and the code producer generates a proof that the produced code is in compliance with the published safety policy. In this paper, a novel viewpoint approach towards an implementational re-use oriented framework for code certification is taken. It adopts ingredients from Necula's approach for proof-carrying code, but in this work safety properties can be analyzed on a higher code level than assembly language instructions. It consists of three parts: (1) The specification language is extended to include generic pre-conditions that shall ensure safety at all states that can be reached during program execution. Actual safety requirements can be expressed by providing domain-specific definitions for the generic predicates which act as interface to the environment. (2) The Floyd-Hoare inductive assertion method is refined to obtain proof rules that allow the derivation of the proof obligations in terms of the generic safety predicates. (3) A meta-interpreter is designed and experimentally implemented that enables automatic synthesis of proof obligations for submitted programs by applying the modified Floyd-Hoare rules. The proof obligations have two separate conjuncts, one for functional correctness and another for the generic safety obligations. Proof of the generic obligations, having provided the actual safety definitions as context, ensures domain-specific safety of program execution in a particular environment and is simpler than full program verification.

Eusterbrock, Jutta

Some User's Insights Into ADIFOR 2.0D

Some insights are given which were gained by one user through experience with the use of the ADIFOR 2.0D software for automatic differentiation of Fortran code. These insights are generally in the area of the user interface with the generated derivative code - particularly the actual form of the interface and the use of derivative objects, including "seed" matrices. Some remarks are given as to how to iterate application of ADIFOR in order to generate second derivative code.

Giesy, Daniel P.

Creation and Delivery of New Superpixelized DIRBE Map Products

Phase 1 called for the following tasks: (1) completion of code to generate intermediate files containing the individual DIRBE observations which would be used to make the superpixelized maps; (2) completion of code necessary to generate the maps themselves; and (3) quality control on test-case maps in the form of point-source extraction and photometry. Items 1 and 2 are well in hand and the tested code is nearly complete. A few test maps have been generated for the tests mentioned in item 3. Map generation is not in production mode yet.

Weiland, J.

Auto-Coding UML Statecharts for Flight Software

Statecharts have been used as a means to communicate behaviors in a precise manner between system engineers and software engineers. Hand-translating a statechart to code, as done on some previous space missions, introduces the possibility of errors in the transformation from chart to code. To improve auto-coding, we have developed a process that generates flight code from UML statecharts. Our process is being used for the flight software on the Space Interferometer Mission (SIM).

autocoding

Towards a Framework for Generating Tests to Satisfy Complex Code Coverage in Java Pathfinder

We present work on a prototype tool based on the JavaPathfinder (JPF) model checker for automatically generating tests satisfying the MC/DC code coverage criterion. Using the Eclipse IDE, developers and testers can quickly instrument Java source code with JPF annotations covering all MC/DC coverage obligations, and JPF can then be used to automatically generate tests that satisfy these obligations. The prototype extension to JPF enables various tasks useful in automatic test generation to be performed, such as test suite reduction and execution of generated tests.

Staats, Matt

FASOR - A second generation shell of revolution code

An integrated computer program entitled Field Analysis of Shells of Revolution (FASOR) currently under development for NASA is described. When completed, this code will treat prebuckling, buckling, initial postbuckling and vibrations under axisymmetric static loads as well as linear response and bifurcation under asymmetric static loads. Although these modes of response are treated by existing programs, FASOR extends the class of problems treated to include general anisotropy and transverse shear deformations of stiffened laminated shells. At the same time, a primary goal is to develop a program which is free of the usual problems of modeling, numerical convergence and ill-conditioning, laborious problem setup, limitations on problem size and interpretation of output. The field method is briefly described, the shell differential equations are cast in a suitable form for solution by this method and essential aspects of the input format are presented. Numerical results are given for both unstiffened and stiffened anisotropic cylindrical shells and compared with previously published analytical solutions.

Cohen, G. A.

Comparison of two and three dimensional flow computations with laser anemometer measurements in a transonic compressor rotor

A procedure for using an efficient axisymmetric code to generate downstream pressure input for more costly Euler codes is discussed. Two and three dimensional inviscid solutions for the flow within a transonic axial compressor rotor at design speed are compared to laser anemometer measurements at maximum flow and near stall operating points. Computational details of the 2-D axisymmetric stream function solution and the 3-D full Euler solution are described. Relative Mach number contours, shock location, and shock strength as measured and as predicted by the 3-D code are compared. Downstream of the rotor the inviscid computations agree with each other but predict higher pressure ratios than those measured. Euler codes require a downstream pressure as input. Since that pressure controls the computed mass flow and shock system, it must be consistent with an inviscid solution.

Chima, R. V.