Search NASA⌕ Search

SEARCH · Search NASA

Results for “code optimization”

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 487 records · Page 27

Phase-engineered bosonic quantum codes

Continuous-variable systems protected by bosonic quantum codes have emerged as a promising platform for quantum information. To date, the design of code words has centered on optimizing the state occupation in the relevant basis to generate the distance needed for error correction. Here, we show tuning the phase degree of freedom in the design of code words can affect, and potentially enhance, the protection against Markovian errors that involve excitation exchange with the environment. As illustrations, we first consider phase engineering bosonic codes with uniform spacing in the Fock basis that correct excitation loss with a Kerr unitary and show that these modified codes feature destructive interference between error code words and, with an adapted “two-level” recovery, the error protection is significantly enhanced. We then study protection against energy decay with the presence of mode nonlinearities and analyze the role of phase for optimal code designs. As a result, we extend the principle of phase engineering to bosonic codes defined in other bases and multiqubit codes, demonstrating its broad applicability in quantum error correction.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

An Algorithm for the Optimization of Insertion Devices to Increase Useful Flux and to Decrease Useless Radiation Power

A continuous spectrum of synchrotron radiation in the hard x-ray region, 5-20 keV, is necessary for the special demand of users, but the high radiation power in that continuous spectrum adversely affects the design of optical components in the beam line. A compromise between photon flux and radiation power of insertion devices should hence be considered. An algorithm and code for spectrum optimization was hence developed using program Mathematica. A wiggler-like undulator with a continuous spectrum was investigated with this code. An optimization algorithm for continuous spectra in the energy range 5-20 keV is presented, and features of the wiggler-like undulator with a continuous spectrum are discussed herein.

43 PARTICLE ACCELERATORS↗

Topology-Aware Performance Optimization and Modeling of Adaptive Mesh Refinement Codes for Exascale

Here, we introduce a topology-aware performance optimization and modeling workflow for AMR simulation that includes two new modeling tools, ProgrAMR and Mota Mapper, which interface with the BoxLib AMR framework and the SSTmacro network simulator. ProgrAMR allows us to generate and model the execution of task dependency graphs from high-level specifications of AMR-based applications, which we demonstrate by analyzing two example AMR-based multigrid solvers with varying degrees of asynchrony. Mota Mapper generates multiobjective, network topology-aware box mappings, which we apply to optimize the data layout for the example multigrid solvers. While the sensitivity of these solvers to layout and execution strategy appears to be modest for balanced scenarios, the impact of better mapping algorithms can be significant when performance is highly constrained by network hop latency. Furthermore, we show that network latency in the multigrid bottom solve is the main contributing factor preventing good scaling on exascale-class machines.

97 MATHEMATICS AND COMPUTING↗

The Analysis and Design of Low Boom Configurations Using CFD and Numerical Optimization Techniques

The use of computational fluid dynamics (CFD) for the analysis of sonic booms generated by aircraft has been shown to increase the accuracy and reliability of predictions. CFD takes into account important three-dimensional and nonlinear effects that are generally neglected by modified linear theory (MLT) methods. Up to the present time, CFD methods have been primarily used for analysis or prediction. Some investigators have used CFD to impact the design of low boom configurations using trial and error methods. One investigator developed a hybrid design method using a combination of Modified Linear Theory (e.g. F-functions) and CFD to provide equivalent area due to lift driven by a numerical optimizer to redesign or modify an existing configuration to achieve a shaped sonic boom signature. A three-dimensional design methodology has not yet been developed that completely uses nonlinear methods or CFD. Constrained numerical optimization techniques have existed for some time. Many of these methods use gradients to search for the minimum of a specified objective function subject to a variety of design variable bounds, linear and nonlinear constraints. Gradient based design optimization methods require the determination of the objective function gradients with respect to each of the design variables. These optimization methods are efficient and work well if the gradients can be obtained analytically. If analytical gradients are not available, the objective gradients or derivatives with respect to the design variables must be obtained numerically. To obtain numerical gradients, say, for 10 design variables, might require anywhere from 10 to 20 objective function evaluations. Typically, 5-10 global iterations of the optimizer are required to minimize the objective function. In terms of using CFD as a design optimization tool, the numerical evaluation of gradients can require anywhere from 100 to 200 CFD computations per design for only 10 design variables. If one CFD computation requires an hour of computational time on a Cray computer, one can see that the use of constrained numerical optimization quickly becomes impractical.Hence, in order to practically couple a numerical design optimization technique with a CFD method, the CFD method must be extremely efficient with running times on the order of only minutes. The CFD Euler code developed under NASA sponsorship and referred to as MIM3D-SB for the most part fulfills these efficiency requirements. Analysis of wing- body configurations can be computed in a matter of a few minutes. The present study will concentrate on the feasibility of the use of this CFD code in conjunction with a numerical design optimization technique for the sonic boom reduction of candidate HSCT configurations. A preliminary supersonic aircraft design system has been established that utilizes the numerical design optimization code NPSOL developed at Stanford University coupled with the supersonic NUM3D-SB CFD code. Many questions still need to be answered in regard to using CFD and numerical optimizers as design tools. There are difficulties related to both the CFD codes and the numerical optimizers. Numerical optimizers can converge to a local minima rather than a global minima. This behavior is largely a function of the initial guess in the design space. The optimizer also is searching for a minimum of the function in terms of its derivative without any regard to the actual function value. Numerically (i.e. CFD) determined gradients can also generate spurious numerical local minima. In addition, for the sonic boom problem, grid fineness will also determine the accuracy of the final design solution. Design optimization methods work well on problems defined by continuous objective functions. The sonic boom signature design problem is not necessarily defined by a continuous objective function. The signature can have a variety of shapes; i.e. from N-wave to multiple shocks. The far-field or ground signature may not transition continuously from one shape to another and hence, may exhibit discontinuous behavior. This is also a source of difficulty in using design optimization methods.In the following sections, several low boom and one reference aircraft configuration will be analyzed to predict their sonic boom signature characteristics. Modifications to some of these designs will also be presented to demonstrate the feasibility of using CFD as a design tool and to demonstrate the feasibility of designing shaped sonic boom signatures. Design modifications to some configurations will be presented to demonstrate the feasibility of achieving shaped signatures with reduced levels and not necessarily to represent realistic or aerodynamically efficient design modifications. Fuselage volume or camber are used as design variables in order to have a minimal effect on the primary wing aerodynamics. The paper will also seek to demonstrate whether a hybrid or ramped signature is feasible to achieve. For the low-boom configurations, the CFD predicted signatures will be compared qualitatively to their MLT design signatures.

Siclari, Michael J.↗

Topology Optimization for Porous Electrodes

This code is for the topology optimization of porous electrodes. It was used to produce the results in Roy, T., Salazar de Troya, M.A., Worsley, M.A. and Beck, V.A., 2021. Topology optimization for the design of porous electrodes. arXiv preprint arXiv:2111.12059.

Roy, Thomas↗

Performance Optimization of a Beam Dynamics PIC Code On Hybrid Computer Architectures

The self-consistent multi-particle tracking based on particle-in-cell method (PIC) has been widely used in particle accelerator beam dynamics study. However, the PIC simulation is time-consuming and needs to use modern parallel computers for high resolution applications. In this paper, we implemented and optimized a parallel beam dynamics PIC code on two types of hybrid parallel computer architectures: one is the GPU and GPU cluster, while the other is the "Knight Landing" CPU cluster.

Liu, Zhicong↗

TU-AB-BRC-12: Optimized Parallel MonteCarlo Dose Calculations for Secondary MU Checks

Purpose: Secondary MU checks are an important tool used during a physics review of a treatment plan. Commercial software packages offer varying degrees of theoretical dose calculation accuracy, depending on the modality involved. Dose calculations of VMAT plans are especially prone to error due to the large approximations involved. Monte Carlo (MC) methods are not commonly used due to their long run times. We investigated two methods to increase the computational efficiency of MC dose simulations with the BEAMnrc code. Distributed computing resources, along with optimized code compilation, will allow for accurate and efficient VMAT dose calculations. Methods: The BEAMnrc package was installed on a high performance computing cluster accessible to our clinic. MATLAB and PYTHON scripts were developed to convert a clinical VMAT DICOM plan into BEAMnrc input files. The BEAMnrc installation was optimized by running the VMAT simulations through profiling tools which indicated the behavior of the constituent routines in the code, e.g. the bremsstrahlung splitting routine, and the specified random number generator. This information aided in determining the most efficient compiling parallel configuration for the specific CPU’s available on our cluster, resulting in the fastest VMAT simulation times. Our method was evaluated with calculations involving 10{sup 8} – 10{sup 9} particle histories which are sufficient to verify patient dose using VMAT. Results: Parallelization allowed the calculation of patient dose on the order of 10 – 15 hours with 100 parallel jobs. Due to the compiler optimization process, further speed increases of 23% were achieved when compared with the open-source compiler BEAMnrc packages. Conclusion: Analysis of the BEAMnrc code allowed us to optimize the compiler configuration for VMAT dose calculations. In future work, the optimized MC code, in conjunction with the parallel processing capabilities of BEAMnrc, will be applied to provide accurate and efficient secondary MU checks.

60 APPLIED LIFE SCIENCES↗

Optimization of artificial viscosity in production codes based on Gaussian Regression surrogate models

To accurately model flows with shock waves using staggered-grid Lagrangian hydrodynamics, artificial viscosity has to be introduced to convert kinetic energy into internal energy, thereby increasing the entropy across shocks. Determining the appropriate strength of the artificial viscosity is an art and strongly depends on the particular problem and experience of the researcher. The objective of this study is to pose the problem of finding the appropriate strength of artificial viscosity as an optimization problem and solve this problem using machine learning (ML) tools, specifically using surrogate models based on Gaussian Process regression and Bayesian analysis. We describe the optimization method and discuss various practical details of its implementation. The shock-containing problems for which we apply this method all have been implemented in the LANL code FLAG. First, we apply ML to find optimal values to isolated shock problems of different strengths. Second, we apply ML to optimize viscosity for a 1D propagating detonation problem based on Zel’dovich-von Neumann-Doring (ZND) detonation theory using a reactive burn model. We compare results for default (currently used values in FLAG) and optimized values of artificial viscosity for these problems demonstrating the potential for significant improvement in the accuracy of computations.

42 ENGINEERING↗

rlmolecule: A library for general-purpose material and molecular optimization using AlphaZero-style reinforcement learning

This library includes in-progress code for the optimization of materials and molecules using reinforcement learning. This project seeks to develop a generalized machine learning approach for optimizing targeted, and often complex, functional properties over the space of possible material structures, allowing faster identification of promising candidates. Electronic and transport properties of materials are determined by their molecular structure (for molecules) or their crystal structure (for in-organic crystalline materials). The atomic composition, bonding, and 3-D-spatial arrangement in these systems therefore represent a vast, discontinuous search space for optimal candidates. This library implements AlphaZero style reinforcement learning applied to two worked examples: the optimization of stable organic radicals for redox flow batteries, and the determination of stable electrolyte species for solid state batteries. The current code contains proof-of-concept results run on the Eagle HPC system, while the completed package will be a flexible tool for material optimization across of number of energy-relevant fields, which leverages cloud compute resources for the majority of the computational heavy lifting.

Biagioni, David↗

Design optimization of axisymmetric bodies in nonuniform transonic flow

An inviscid transonic code capable of designing an axisymmetric body in a uniform or nonuniform flow was developed. The design was achieved by direct optimiation by coupling an analysis code with an optimizer. Design examples were provided for axisymmetric bodies with fineness ratios of 8.33 and 5 at different Mach numbers. It was shown that by reducing the nose radius and increasing the afterbody thickness of initial shapes obtained from symmetric NACA four-digit airfoil contours, wave drag could be reduced by 29 percent for a body of fineness ratio 8.33 in a nonuniform transonic flow of M = 0.98 to 0.995. The reduction was 41 percent for a body of fineness ratio 5 in a uniform transonic flow of M = 0.925 and 65 percent for the same body but in a nonuniform transonic flow of M = 0.90 to 0.95.

Lan, C. Edward↗

PolyMat: an efficient Matlab code for multi-material topology optimization

We introduce a Matlab implementation of topology optimization for compliance minimization on unstructured polygonal finite element meshes that efficiently accommodates many materials and many volume constraints. Leveraging the modular structure of the educational code, PolyTop, we extend it to the multi-material version, PolyMat, with only a few modifications. First, a design variable for each candidate material is defined in each finite element. Next, we couple a Discrete Material Optimization interpolation with the existing penalization and introduce a new parameter such that we can employ continuation and smoothly transition from a convex problem without any penalization to a non-convex problem in which material mixing and intermediate densities are penalized. Mixing that remains due to the density filter operation is eliminated via continuation on the filter radius. To accommodate flexibility in the volume constraint definition, the constraint function is modified to compute multiple volume constraints and the design variable update is modified in accordance with the Zhang-Paulino-Ramos Jr. (ZPR) update scheme, which updates the design variables associated with each constraint independently. The formulation allows for volume constraints controlling any subset of the design variables, i.e., they can be defined globally or locally for any subset of the candidate materials. Borrowing ideas for mesh generation on complex domains from PolyMesher, we conclude which design variables are associated with each local constraint of arbitrary geometry. A number of examples are presented to demonstrate the many material capability, the flexibility of the volume constraint definition, the ease with which we can accommodate passive regions, and how we may use local constraints to break symmetries or achieve graded geometries.

79 ASTRONOMY AND ASTROPHYSICS↗

High-order finite-element seismic wave propagation modeling with MPI on a large GPU cluster

We implement a high-order finite-element application, which performs the numerical simulation of seismic wave propagation resulting for instance from earthquakes at the scale of a continent or from active seismic acquisition experiments in the oil industry, on a large cluster of NVIDIA Tesla graphics cards using the CUDA programming environment and non-blocking message passing based on MPI. Contrary to many finite-element implementations, ours is implemented successfully in single precision, maximizing the performance of current generation GPUs. We discuss the implementation and optimization of the code and compare it to an existing very optimized implementation in C language and MPI on a classical cluster of CPU nodes. We use mesh coloring to efficiently handle summation operations over degrees of freedom on an unstructured mesh, and non-blocking MPI messages in order to overlap the communications across the network and the data transfer to and from the device via PCIe with calculations on the GPU. We perform a number of numerical tests to validate the single-precision CUDA and MPI implementation and assess its accuracy. We then analyze performance measurements and depending on how the problem is mapped to the reference CPU cluster, we obtain a speedup of 20x or 12x.

97 MATHEMATICS AND COMPUTING↗

Modeling and Optimization for Morphing Wing Concept Generation II: Morphing Wing Modeling and Structural Sizing Techniques - Part 1

This report documents a series of investigations to develop an approach for structural sizing of various morphing wing concepts. For the purposes of this report, a morphing wing is one whose planform can make significant shape changes in flight - increasing wing area by 50% or more from the lowest possible area, changing sweep 30 or more, and / or increasing aspect ratio by as much as 200% from the lowest possible value. These significant changes in geometry mean that the underlying load-bearing structure changes geometry. While most finite element analysis packages provide some sort of structural optimization capability, these codes are not amenable to making significant changes in the stiffness matrix to reflect the large morphing wing planform changes. The investigations presented here use a finite element code capable of aeroelastic analysis in three different optimization approaches -a "simultaneous analysis" approach, a "sequential" approach, and an "aggregate" approach.

Skillen, Michael D.↗

HERCULES: A Pattern Driven Code Transformation System

New parallel computers are emerging, but developing efficient scientific code for them remains difficult. A scientist must manage not only the science-domain complexity but also the performance-optimization complexity. HERCULES is a code transformation system designed to help the scientist to separate the two concerns, which improves code maintenance, and facilitates performance optimization. The system combines three technologies, code patterns, transformation scripts and compiler plugins, to provide the scientist with an environment to quickly implement code transformations that suit his needs. Unlike existing code optimization tools, HERCULES is unique in its focus on user-level accessibility. In this paper we discuss the design, implementation and an initial evaluation of HERCULES.

99 GENERAL AND MISCELLANEOUS↗

Optimized finite-build stellarator coils using automatic differentiation

A new stellarator coil design code is introduced that optimizes the position and winding pack orientation of finite-build coils. The new code, called flexible optimized curves in space using automatic differentiation (AD) and finite build (FOCUSADD), performs gradient-based optimization in a high-dimensional, non-convex space. The derivatives with respect to parameters of finite-build coils are easily and efficiently computed using AD. FOCUSADD parametrizes coil positions in free space using a Fourier series and uses a multi-filament approximation to the coil winding pack. The orientation of the winding pack is parametrized with a Fourier series and can be optimized as well. Optimized finite-build coils for a Wendelstein 7-X (W7-X)-like stellarator are found, and compared with filamentary coil results. The final positions of optimized finite-build W7-X-like coils are shifted, on average, by approximately 2.5 mm relative to optimized filamentary coils. These results suggest that finite-build effects should be accounted for in the optimization of stellarators with low coil tolerances.

43 PARTICLE ACCELERATORS↗

HERCULES: A Pattern Driven Code Transformation System

New parallel computers are emerging, but developing efficient scientific code for them remains difficult. A scientist must manage not only the science-domain complexity but also the performance-optimization complexity. HERCULES is a code transformation system designed to help the scientist to separate the two concerns, which improves code maintenance, and facilitates performance optimization. The system combines three technologies, code patterns, transformation scripts and compiler plugins, to provide the scientist with an environment to quickly implement code transformations that suit his needs. Unlike existing code optimization tools, HERCULES is unique in its focus on user-level accessibility. In this paper we discuss the design, implementation and an initial evaluation of HERCULES.

Computer Science↗

An X-ray Intensity Operations Monitor (AXIOM) (Final LDRD Project Report)

The Saturn accelerator has historically lacked the capability to measure time-resolved spectra for its 3-ring bremsstrahlung x-ray source. This project aimed to create a spectrometer called AXIOM to provide this capability. The project had three major development pillars: hardware, simulation, and unfold code. The hardware consists of a ring of 24 detectors around an existing x-ray pinhole camera. The diagnostic was fielded on two shots at Saturn and over 100 shots at the TriMeV accelerator at Idaho Accelerator Center. A new Saturn x-ray environment simulation was created using measured data to validate. This simulation allows for timeresolved spectra computation to compare the experimental results. The AXIOM-Unfold code is a new parametric unfold code using modern global optimizers and uncertainty quantification. The code was written in Python, uses Gitlab version control and issue tracking, and has been developed with long term code support and maintenance in mind.

43 PARTICLE ACCELERATORS↗