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 1,459 records · Page 81

LeWRON: Agentic Analysis of Electroweak Phase Transitions

The electroweak phase transition (EWPT) is a central topic in particle physics and cosmology, connecting collider phenomenology, baryogenesis, and gravitational-wave observatories. Its analysis requires a technically demanding, convention-sensitive, and model-dependent pipeline, from constructing the finite-temperature effective potential to tracking thermal histories, computing bubble nucleation rates, and predicting gravitational-wave spectra. We present LeWRON (Learning ElectroWeak phase tRansitiON), an agentic framework that orchestrates this pipeline starting from an input Lagrangian. LeWRON combines audited toolbox construction with an Explorer module that uses the generated model-specific code for further analysis, including scans and plots. Intermediate analytic outputs are checked by auditor agents and stored as structured artifacts, enabling reproducible human inspection and downstream use through both a command-line interface and a public Python API. The framework supports a reproduction mode, which infers conventions from the literature and reproduces published results, and a discovery mode, which guides users through structured checkpoints for new models. We demonstrate LeWRON across representative beyond-the-Standard-Model scenarios and release the code on GitHub.

Wang, Isaac R. [Fermilab] (ORCID:000000030789218X)↗

A user guide for the EMTAC-MZ CFD code

The computer code (EMTAC-MZ) was applied to investigate the flow field over a variety of very complex three-dimensional (3-D) configurations across the Mach number range (subsonic, transonic, supersonic, and hypersonic flow). In the code, a finite volume, multizone implementation of high accuracy, total variation diminishing (TVD) formulation (based on Roe's scheme) is used to solve the unsteady Euler equations. In the supersonic regions of the flow, an infinitely large time step and a space-marching scheme is employed. A finite time step and a relaxation or 3-D approximate factorization method is used in subsonic flow regions. The multizone technique allows very complicated configurations to be modeled without geometry modifications, and can easily handle combined internal and external flow problems. An elliptic grid generation package is built into the EMTAC-MZ code. To generate the computational grid, only the surface geometry data are required. Results obtained for a variety of configurations, such as fighter-like configurations (F-14, AVSTOL), flow through inlet, multi-bodies (shuttle with external tank and SRBs), are reported and shown to be in good agreement with available experimental data.

Szema, Kuo-Yen↗

statusMessageReporting

Unlike computer languages like C++ which has throw/catch, Python which has try/except and other newer computer languages, C has no built-in mechanism for handling exceptions (e.g., memory allocate failure or a divide by zero exceptions). While simple exception handling in the form of an integer parameter (e.g, errno) or an enum are often implemented in C programs, the richer types of exception reporting possible with newer computer languages are rarely implemented in C. The statusMessageReporting package was created to facilitate rich exception reporting by C functions to their calling functions. The statusMessageReporting (smr) package allows a function, called the generator, to communicate an exception to its calling function using a statusMessageReporting report. The main parts of a report are: 1)the level of the report called the status (valid levels are smr_status_Ok, smr_status_Info, smr_statusWarning and smr_status_Error) 2) a string called the report's message and 3) two integer values, one representing the generator's ID, called the libraryID, and the other is the library's specific integer, called the code, that represents the type of exception the generator is reporting. The code is similar to the errno for the C standard library. Since libraries are often developed independent of one another, they often use the same code values to represent different exceptions (e.g., one library may define the code 3 to be an error opening a file while another library may define the code 3 to be a divide-by-zero error) which is why the libraryID is needed. That is, the equivalent of errno is the combination libraryID:code. To insure that each library's libraryID is unique, libraryIDs must be obtained from the function smr_registerLibrary.

Beck, Bret↗

Application of artificial neural networks to the design optimization of aerospace structural components

The application of artificial neural networks to capture structural design expertise is demonstrated. The principal advantage of a trained neural network is that it requires trivial computational effort to produce an acceptable new design. For the class of problems addressed, the development of a conventional expert system would be extremely difficult. In the present effort, a structural optimization code with multiple nonlinear programming algorithms and an artificial neural network code NETS were used. A set of optimum designs for a ring and two aircraft wings for static and dynamic constraints were generated by using the optimization codes. The optimum design data were processed to obtain input and output pairs, which were used to develop a trained artificial neural network with the code NETS. Optimum designs for new design conditions were predicted by using the trained network. Neural net prediction of optimum designs was found to be satisfactory for most of the output design parameters. However, results from the present study indicate that caution must be exercised to ensure that all design variables are within selected error bounds.

Berke, Laszlo↗

The navigation toolkit

This report summarizes the experience of the authors in managing, designing, and implementing an object-oriented applications framework for orbital navigation analysis for the Flight Design and Dynamics Department of the Rockwell Space Operations Company in Houston, in support of the Mission Operations Directorate of NASA's Johnson Space Center. The 8 person year project spanned 1.5 years and produced 30,000 lines of C++ code, replacing 150,000 lines of Fortran/C. We believe that our experience is important because it represents a 'second project' experience and generated real production-quality code - it was not a pilot. The project successfully demonstrated the use of 'continuous development' or rapid prototyping techniques. Use of formal methods and executable models contributed to the quality of the code. Keys to the success of the project were a strong architectural vision and highly skilled workers. This report focuses on process and methodology, and not on a detailed design description of the product. But the true importance of the object-oriented paradigm is its liberation of the developer to focus on the problem rather than the means used to solve the problem.

Rich, William F.↗

Monte Carlo simulation for excessive Balmer line broadening generated by transport of fast H Atoms in an abnormal glow discharge

Monte Carlo code for fast hydrogen atom transport and generating of excessively Doppler broadened profiles based on the collision model is presented. Results for the initial monoenergetic atom beam and for a more realistic energy distribution of H atoms are reported. Line profiles obtained from the simulation are compared to our experimentally obtained data. Initial energy distribution for atoms is approximately calculated from the measured line profiles while the initial angle distribution was taken to be cosine. Balmer alpha intensity was found to exponentially decay in the negative glow region, which concurs with the experimental results. These agreements between the simulation and experiment support the collision model for excessive line broadening.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

Atmospheric Correction of Satellite Imagery Using Modtran 3.5 Code

When performing satellite remote sensing of the earth in the solar spectrum, atmospheric scattering and absorption effects provide the sensors corrupted information about the target's radiance characteristics. We are faced with the problem of reconstructing the signal that was reflected from the target, from the data sensed by the remote sensing instrument. This article presents a method for simulating radiance characteristic curves of satellite images using a MODTRAN 3.5 band model (BM) code to solve the radiative transfer equation (RTE), and proposes a method for the implementation of an adaptive system for automated atmospheric corrections. The simulation procedure is carried out as follows: (1) for each satellite digital image a radiance characteristic curve is obtained by performing a digital number (DN) to radiance conversion, (2) using MODTRAN 3.5 a simulation of the images characteristic curves is generated, (3) the output of the code is processed to generate radiance characteristic curves for the simulated cases. The simulation algorithm was used to simulate Landsat Thematic Mapper (TM) images for two types of locations: the ocean surface, and a forest surface. The simulation procedure was validated by computing the error between the empirical and simulated radiance curves. While results in the visible region of the spectrum where not very accurate, those for the infrared region of the spectrum were encouraging. This information can be used for correction of the atmospheric effects. For the simulation over ocean, the lowest error produced in this region was of the order of 105 and up to 14 times smaller than errors in the visible region. For the same spectral region on the forest case, the lowest error produced was of the order of 10-4, and up to 41 times smaller than errors in the visible region,

Gonzales, Fabian O.↗

Reassessing the MCNP Random Number Generator

Random number generators are integral components to Monte Carlo codes. They provide the pseudorandom number sequence used to actually sample the distributions of interest. As a result, they are one of the most important components to the software. The current recommended MCNP random number generator is a 63-bit linear congruential generator (LCG). This generator is quite fast, but it has some drawbacks. First, it only has a period of 2 63 . Due to the necessarily non-optimal usage of random numbers to ensure parallel reproducibility, this amount is too few to guarantee random number sequences are not reused in all configurations the code runs under. As simulation size increases, users will need to be aware of the limitations of the generator and tune configuration variables to best suit their simulations, or they will need to assume that reuse is not negatively affecting their answers. Neither of these are optimal. Second, small LCGs are fairly weak in bit generation quality, and this can have an unknown impact on the quality of the simulation. This paper is an investigation into whether or not more modern random number generators can supersede the current ones. The goal is to find a generator that is similar or superior in speed to the LCGs, has a state space large enough to make strong guarantees about random number reuse, and passes all modern random number test suites. If such a generator is found, it would eliminate the need for the user to even be aware of the limitations of the random number generator and would simplify the use of the code. This paper will be broken into several parts. Sec. 2 will discuss the evolution of the random number generator within the MCNP code. Sec. 3 will go over what a Monte Carlo code needs from a generator to be reproducible and portable and how the current generator behaves in that light. Sec. 4 goes through how each generator was tested. Finally, Sec. 5 will discuss improvements that could be made to the code.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

Latent uncertainties of the precalculated track Monte Carlo method

Purpose: While significant progress has been made in speeding up Monte Carlo (MC) dose calculation methods, they remain too time-consuming for the purpose of inverse planning. To achieve clinically usable calculation speeds, a precalculated Monte Carlo (PMC) algorithm for proton and electron transport was developed to run on graphics processing units (GPUs). The algorithm utilizes pregenerated particle track data from conventional MC codes for different materials such as water, bone, and lung to produce dose distributions in voxelized phantoms. While PMC methods have been described in the past, an explicit quantification of the latent uncertainty arising from the limited number of unique tracks in the pregenerated track bank is missing from the paper. With a proper uncertainty analysis, an optimal number of tracks in the pregenerated track bank can be selected for a desired dose calculation uncertainty. Methods: Particle tracks were pregenerated for electrons and protons using EGSnrc and GEANT4 and saved in a database. The PMC algorithm for track selection, rotation, and transport was implemented on the Compute Unified Device Architecture (CUDA) 4.0 programming framework. PMC dose distributions were calculated in a variety of media and compared to benchmark dose distributions simulated from the corresponding general-purpose MC codes in the same conditions. A latent uncertainty metric was defined and analysis was performed by varying the pregenerated track bank size and the number of simulated primary particle histories and comparing dose values to a “ground truth” benchmark dose distribution calculated to 0.04% average uncertainty in voxels with dose greater than 20% of D{sub max}. Efficiency metrics were calculated against benchmark MC codes on a single CPU core with no variance reduction. Results: Dose distributions generated using PMC and benchmark MC codes were compared and found to be within 2% of each other in voxels with dose values greater than 20% of the maximum dose. In proton calculations, a small (≤1 mm) distance-to-agreement error was observed at the Bragg peak. Latent uncertainty was characterized for electrons and found to follow a Poisson distribution with the number of unique tracks per energy. A track bank of 12 energies and 60000 unique tracks per pregenerated energy in water had a size of 2.4 GB and achieved a latent uncertainty of approximately 1% at an optimal efficiency gain over DOSXYZnrc. Larger track banks produced a lower latent uncertainty at the cost of increased memory consumption. Using an NVIDIA GTX 590, efficiency analysis showed a 807 × efficiency increase over DOSXYZnrc for 16 MeV electrons in water and 508 × for 16 MeV electrons in bone. Conclusions: The PMC method can calculate dose distributions for electrons and protons to a statistical uncertainty of 1% with a large efficiency gain over conventional MC codes. Before performing clinical dose calculations, models to calculate dose contributions from uncharged particles must be implemented. Following the successful implementation of these models, the PMC method will be evaluated as a candidate for inverse planning of modulated electron radiation therapy and scanned proton beams.

07 ISOTOPE AND RADIATION SOURCES↗

Dual Event Generator IOC (siocDualTiming) v1.0

Dual Timing IOC is an EPICS IOC that uses the "Dual Event Generator Support (dual-evg-support) v1.0" (track code: 2026-009) module to perform control and status of the "Dual Event Generator (dual-evg) v1.0" (track code: 2023-012) project, both of them previously disclosed.

Russo, Lucas [Lawrence Berkeley National Laborator↗

AstraAI v1

AstraAI is an open-source, structure-aware AI coding agent designed for large scientific and DOE-HPC codebases such as AMReX-based applications. Unlike general-purpose coding assistants, AstraAI combines retrieval-augmented generation (RAG) with compiler-level Abstract Syntax Tree (AST) analysis to perform precise, scope-constrained code modifications. It identifies exact function spans, enforces locality of edits, and maintains cross-file invariants, enabling deterministic and build-safe transformations in complex C++/GPU environments. AstraAI is intended for developers working on large, evolving HPC frameworks where correctness, reproducibility, and structural integrity are critical. Typical use cases include modifying physics kernels, updating GPU device lambdas, and performing multi-file refactors without breaking compilation or runtime semantics. Compared to conventional LLM-based coding agents - even those with repository access - AstraAI provides structural guarantees rather than free-form text patches. It minimizes unintended diffs, prevents scope drift, preserves formatting and build stability, and reduces structural hallucinations. By integrating compiler tooling directly into the generation loop, AstraAI transforms AI-assisted coding from probabilistic text editing into deterministic, structure-preserving program transformation suitable for mission-critical scientific software.

Natarajan, Mahesh [Lawrence Berkeley National Labo↗

Generation of topologically diverse acoustic vortex beams using a compact metamaterial aperture

Here, we present a class of metamaterial-based acoustic vortex generators which are both geometrically simple and broadly tunable. The aperture overcomes the significant limitations of both active phasing systems and existing passive coded apertures. The metamaterial approach generates topologically diverse acoustic vortex waves motivated by recent advances in leaky wave antennas by wrapping the antenna back upon itself to produce an acoustic vortex wave antenna. We demonstrate both experimentally and analytically that this single analog structure is capable of creating multiple orthogonal orbital angular momentum modes using only a single transducer. The metamaterial design makes the aperture compact, with a diameter nearly equal to the excitation wavelength and can thus be easily integrated into high-density systems. Applications range from acoustic communications for high bit-rate multiplexing to biomedical devices such as microfluidic mixers.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

Deductive Glue Code Synthesis for Embedded Software Systems Based on Code Patterns

Automated code synthesis is a constructive process that can be used to generate programs from specifications. It can, thus, greatly reduce the software development cost and time. The use of formal code synthesis approach for software generation further increases the dependability of the system. Though code synthesis has many potential benefits, the synthesis techniques are still limited. Meanwhile, components are widely used in embedded system development. Applying code synthesis to component based software development (CBSD) process can greatly enhance the capability of code synthesis while reducing the component composition efforts. In this paper, we discuss the issues and techniques for applying deductive code synthesis techniques to CBSD. For deductive synthesis in CBSD, a rule base is the key for inferring appropriate component composition. We use the code patterns to guide the development of rules. Code patterns have been proposed to capture the typical usages of the components. Several general composition operations have been identified to facilitate systematic composition. We present the technique for rule development and automated generation of new patterns from existing code patterns. A case study of using this method in building a real-time control system is also presented.

automated code synthesis↗

Implementation of DOWTHERM A Properties into RELAP5-3D/ATHENA

DOWTHERM A oil is being considered for use as a heat transfer fluid in experiments to help in the design of heat transfer components for the Next Generation Nuclear Plant (NGNP). In conjection with the experiments RELAP5-3D/ATHENA will be used to help design and analyzed the data generated by the experiments. Inorder to use RELAP5-3D the thermophysical properties of DOWTHERM A were implemented into the fluids package of the RELAP5-3D/ATHENA computer propgram. DOWTHERM A properties were implemented in RELAP5-3D/ATHENA using thermophysical property data obtain from a Dow Chemical Company brochure. The data were curve fit and the polynomial equations developed for each required property were input into a fluid property generator. The generated data was then compared to the orginal DOWTHERM A data to verify that the fluid property data generated by the RELAP5-3D/ATHENA code was representitive of the original input data to the generator.

22 GENERAL STUDIES OF NUCLEAR REACTORS↗

Sonic boom predictions using a modified Euler code

The environmental impact of a next generation fleet of high-speed civil transports (HSCT) is of great concern in the evaluation of the commercial development of such a transport. One of the potential environmental impacts of a high speed civilian transport is the sonic boom generated by the aircraft and its effects on the population, wildlife, and structures in the vicinity of its flight path. If an HSCT aircraft is restricted from flying overland routes due to excessive booms, the commercial feasibility of such a venture may be questionable. NASA has taken the lead in evaluating and resolving the issues surrounding the development of a high speed civilian transport through its High-Speed Research Program (HSRP). The present paper discusses the usage of a Computational Fluid Dynamics (CFD) nonlinear code in predicting the pressure signature and ultimately the sonic boom generated by a high speed civilian transport. NASA had designed, built, and wind tunnel tested two low boom configurations for flight at Mach 2 and Mach 3. Experimental data was taken at several distances from these models up to a body length from the axis of the aircraft. The near field experimental data serves as a test bed for computational fluid dynamic codes in evaluating their accuracy and reliability for predicting the behavior of future HSCT designs. Sonic boom prediction methodology exists which is based on modified linear theory. These methods can be used reliably if near field signatures are available at distances from the aircraft where nonlinear and three dimensional effects have diminished in importance. Up to the present time, the only reliable method to obtain this data was via the wind tunnel with costly model construction and testing. It is the intent of the present paper to apply a modified three dimensional Euler code to predict the near field signatures of the two low boom configurations recently tested by NASA.

Siclari, Michael J.↗

Improved MPACT energy deposition and explicit heat generation coupling with CTF

The CASL neutronics code MPACT assumes local energy deposition with equilibrium delayed energy for steady-state and transient calculations. These approximations limit the accurate representation of the heat generation in space and its variations over time, both of which are essential for power distribution and thermal–hydraulic coupling analyses. This paper presents an explicit energy deposition model considering the neutron and gamma heating of all regions and the time-dependent delayed energy. The MPACT/CTF interfaces are updated to transfer the explicit heat sources. The new model agrees well with MCNP for problems without thermal–hydraulic feedback. The MPACT/CTF coupled calculation for a hot-full-power quarter-core case using the new model exhibits a reduction of peak pin power by 2.3% and fuel centerline temperature by 17 K. The new model also shows a keff difference up to -100 pcm in depletion and a 30 K peak fuel temperature reduction in a reactivity-initiated-accident problem.

21 SPECIFIC NUCLEAR REACTORS AND ASSOCIATED PLANTS↗

Codes and Standards Assessment for Hydrogen Blends into the Natural Gas Infrastructure

Energy utilities are evaluating emerging energy technologies to reduce reliance on carbon as an energy carrier. Hydrogen has been identified as a potential substitute for carbon-based fuels that can be blended into other gaseous energy carriers, such as natural gas. However, hydrogen blending into natural gas has important implications on safety which need to be evaluated. Designers and installers of systems that utilize hydrogen gas blending into natural gas distribution systems need to adhere to local building codes and engage with the authority having jurisdiction (AHJ) for safety and permitting approvals. These codes and standards must be considered to understand where safety gaps might be apparent when injecting hydrogen into the natural gas infrastructure. This report generates a list of relevant codes and standards for hydrogen blending on existing, upgraded, or new pipelines. Additionally, a preliminary assessment was made to identify the codes and standards that need to be modified to enable this technology as well as potential gaps due to the unique nature and safety concerns of gaseous hydrogen.

03 NATURAL GAS↗

Mechanism of Supercooled Water Droplet Breakup near the Leading Edge of an Airfoil

This work presents the results of an experimental study on supercooled droplet deformation and breakup near the leading edge of an airfoil. The results are compared to prior room temperature droplet deformation results to explore the effects of droplet supercooling. The experiments were conducted in the Adverse Environment Rotor Test Stand (AERTS) at The Pennsylvania State University. An airfoil model placed at the end of the rotor blades mounted onto the hub in the AERTS chamber was moved at speeds ranging between 50 and 80 m/sec. The temperature of the chamber was set at -20˚C. A monotonic droplet generator was used to produce droplets that fell from above, perpendicular to the path of the airfoil. The supercooled state of the droplets was determined by measurement of the temperature of the drops at various locations below the droplet generator exit. A temperature prediction code was also used to estimate the temperature of the droplets based on vertical velocity and the distance traveled by droplets from the droplet generator to the airfoil stagnation line. High speed imaging was employed to observe the interaction between the droplets and the airfoil. The high speed imaging provided droplet deformation information as the droplet approached the airfoil near the stagnation line. A tracking software program was used to measure the horizontal and vertical displacement of the droplet against time. It was demonstrated that to compare the effects of water supercooling on droplet deformation, the ratio of the slip velocity and the initial droplet velocity must be equal. A case with equal slip velocity to initial velocity ratios was selected for room temperature and supercooled droplet conditions. The airfoil velocity was 60 m/s and the slip velocity for both sets of data was 40 m/s. In these cases, the deformation of the weakly supercooled and warm droplets did not present different trends. The similar behavior for both environmental conditions indicates that water supercooling has no effect on particle deformation for the limited range of the weak supercooling of the droplets tested and the selected impact velocity. The assumption of a constant surface tension value was further supported by the equal trend of the Bond number obtained for supercooled and room temperature droplets.

in-flight icing↗