Search NASA⌕ Search

SEARCH · Search NASA

Results for “automatic adjoint”

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 19 records

Demonstration of Automatically-Generated Adjoint Code for Use in Aerodynamic Shape Optimization

Gradient-based optimization requires accurate derivatives of the objective function and constraints. These gradients may have previously been obtained by manual differentiation of analysis codes, symbolic manipulators, finite-difference approximations, or existing automatic differentiation (AD) tools such as ADIFOR (Automatic Differentiation in FORTRAN). Each of these methods has certain deficiencies, particularly when applied to complex, coupled analyses with many design variables. Recently, a new AD tool called ADJIFOR (Automatic Adjoint Generation in FORTRAN), based upon ADIFOR, was developed and demonstrated. Whereas ADIFOR implements forward-mode (direct) differentiation throughout an analysis program to obtain exact derivatives via the chain rule of calculus, ADJIFOR implements the reverse-mode counterpart of the chain rule to obtain exact adjoint form derivatives from FORTRAN code. Automatically-generated adjoint versions of the widely-used CFL3D computational fluid dynamics (CFD) code and an algebraic wing grid generation code were obtained with just a few hours processing time using the ADJIFOR tool. The codes were verified for accuracy and were shown to compute the exact gradient of the wing lift-to-drag ratio, with respect to any number of shape parameters, in about the time required for 7 to 20 function evaluations. The codes have now been executed on various computers with typical memory and disk space for problems with up to 129 x 65 x 33 grid points, and for hundreds to thousands of independent variables. These adjoint codes are now used in a gradient-based aerodynamic shape optimization problem for a swept, tapered wing. For each design iteration, the optimization package constructs an approximate, linear optimization problem, based upon the current objective function, constraints, and gradient values. The optimizer subroutines are called within a design loop employing the approximate linear problem until an optimum shape is found, the design loop limit is reached, or no further design improvement is possible due to active design variable bounds and/or constraints. The resulting shape parameters are then used by the grid generation code to define a new wing surface and computational grid. The lift-to-drag ratio and its gradient are computed for the new design by the automatically-generated adjoint codes. Several optimization iterations may be required to find an optimum wing shape. Results from two sample cases will be discussed. The reader should note that this work primarily represents a demonstration of use of automatically- generated adjoint code within an aerodynamic shape optimization. As such, little significance is placed upon the actual optimization results, relative to the method for obtaining the results.

Green, Lawrence↗

Experimenting with the GMAO 4D Data Assimilation

The Global Modeling and Assimilation Office (GMAO) has been working to promote its prototype four-dimensional variational (4DVAR) system to a version that can be exercised at operationally desirable configurations. Beyond a general circulation model (GeM) and an analysis system, traditional 4DV AR requires availability of tangent linear (TL) and adjoint (AD) models of the corresponding GeM. The GMAO prototype 4DVAR uses the finite-volume-based GEOS GeM and the Grid-point Statistical Interpolation (GSI) system for the first two, and TL and AD models derived ITom an early version of the finite-volume hydrodynamics that is scientifically equivalent to the present GEOS nonlinear GeM but computationally rather outdated. Specifically, the TL and AD models hydrodynamics uses a simple (I-dimensional) latitudinal MPI domain decomposition, which has consequent low scalability and prevents the prototype 4DV AR ITom being used in realistic applications. In the near future, GMAO will be upgrading its operational GEOS GCM (and assimilation system) to use a cubed-sphere-based hydrodynamics. This versions of the dynamics scales to thousands of processes and has led to a decision to re-derive the TL and AD models for this more modern dynamics, thus taking advantage of a two-dimensional MPI decomposition and improved scalability properties. With the aid of the Transformation of Algorithms in FORTRAN (l'AF) automatic adjoint generation tool and some hand-coding, a version of the cubed-sphere-based TL and AD models, with a simplified vertical diffusion scheme, is now available, enabling multiple configurations of standard implementations of 4DV AR in GEOS. Concurrent to this development, collaboration with the National Centers for Environmental Prediction (NCEP) and the Earth System Research Laboratory (ESRL) has allowed GMAO to implement a hybrid-ensemble capability within the GEOS data assimilation system. Both 3Dand 4D-ensemble capabilities are presently available thus allowing GMAO to now evaluate the performance and benefit of various ensemble and variational assimilation strategies. This presentation will cover the most recent developments taking place at GMAO and show results from various comparisons from traditional techniques to more recent ensemble-based ones.

Todling, R.↗

ASDF: A Compiler for Qwerty, a Basis-Oriented Quantum Programming Language

Qwerty is a high-level quantum programming language built on bases and functions rather than circuits. This new paradigm introduces new challenges in compilation, namely synthesizing circuits from basis translations and automatically specializing adjoint or predicated forms of functions. This paper presents ASDF, an open-source compiler for Qwerty that answers these challenges in compiling basis-oriented languages. Enabled with a novel high-level quantum IR implemented in the MLIR framework, our compiler produces OpenQASM 3 or QIR for either simulation or execution on hardware. Our compiler is evaluated by comparing the fault-tolerant resource requirements of generated circuits with other compilers, finding that ASDF produces circuits with comparable cost to prior circuit-oriented compilers.

Adams, Austin J [Georgia Tech]↗

MITgcm-AD v2: Open source tangent linear and adjoint modeling framework for the oceans and atmosphere enabled by the Automatic Differentiation tool Tapenade

The Massachusetts Institute of Technology General Circulation Model (MITgcm) is widely used by the climate science community to simulate planetary atmosphere and ocean circulations. A defining feature of the MITgcm is that it has been developed to be compatible with an algorithmic differentiation (AD) tool, TAF, enabling the generation of tangent-linear and adjoint models. These provide gradient information which enables dynamics-based sensitivity and attribution studies, state and parameter estimation, and rigorous uncertainty quantification. Importantly, gradient information is essential for computing comprehensive sensitivities and performing efficient large-scale data assimilation, ensuring that observations collected from satellites and in-situ measuring instruments can be effectively used to optimize a large uncertain control space. As a result, the MITgcm forms the dynamical core of a key data assimilation product employed by the physical oceanography research community: Estimating the Circulation and Climate of the Ocean (ECCO) state estimate. Although MITgcm and ECCO are used extensively within the research community, the AD tool TAF is proprietary and hence inaccessible to a large proportion of these users. The new version 2 (MITgcm-AD v2) framework introduced here is based on the source-to-source AD tool Tapenade, which has recently been open-sourced. Another feature of Tapenade is that it stores required variables by default (instead of recomputing them) which simplifies the implementation of efficient, AD-compatible code. The framework has been integrated with the MITgcm model’s main branch and is now freely available.

Adjoints↗

Introduction to Adjoint Models

In this lecture, some fundamentals of adjoint models will be described. This includes a basic derivation of tangent linear and corresponding adjoint models from a parent nonlinear model, the interpretation of adjoint-derived sensitivity fields, a description of methods of automatic differentiation, and the use of adjoint models to solve various optimization problems, including singular vectors. Concluding remarks will attempt to correct common misconceptions about adjoint models and their utilization.

EnKF↗

Retrospective Data Assimilation for GEOS-4

The NASA/Goddard Earth Observing System 3 (GEOS-3) has recently been replaced operationally by GEOS-4. One of the major components of the new system is the finite-volume general circulation model (GCM) of Lin and Rood. Updating the GEOS-3 retrospective data assimilation system of Zhu et al. to GEOS-4 requires two main steps: (i) developing the adjoint of the finite-volume GCM; and (ii) developing the adjoint of the procedures interfacing the GCM with the Physical-space Statistical Analysis System. These required adjoints are being developed automatically through the use of the Transformation of Algorithms in Fortran compiler of Giering and Kaminski. In this presentation we discuss the current status of development and plans for the near future as well as show preliminary results.

Todling, Ricardo↗

ReactionMechanismSimulator.jl: A modern approach to chemical kinetic mechanism simulation and analysis

Abstract We present ReactionMechanismSimulator.jl (RMS), a modern differentiable software for the simulation and analysis of chemical kinetic mechanisms, including multiphase systems. RMS has already been applied to problems in combustion, pyrolysis, polymers, pharmaceuticals, catalysis, and electrocatalysis. RMS is written in Julia, making it easy to develop and allowing it to take advantage of Julia's extensive numerical computing ecosystem. In addition to its extensive library of optimized analytic Jacobians, RMS can generate and use Jacobians computed using automatic differentiation and symbolically generated analytic Jacobians. RMS is demonstrated to be faster than Cantera and Chemkin in several benchmarks. RMS also implements an extensive set of features for analyzing chemical mechanisms, including a library of easy‐to‐call plotting functions, molecular structure resolved flux diagram generation, crash analysis, traditional sensitivity analysis, transitory sensitivity analysis, and an automatic mechanism analysis toolkit. RMS implements efficient adjoint and parallel forward sensitivity analyses. We also demonstrate the ease of adding new features to RMS.

Johnson, Matthew S.↗

Cart3D Simulations for the First AIAA Sonic Boom Prediction Workshop

Simulation results for the First AIAA Sonic Boom Prediction Workshop (LBW1) are presented using an inviscid, embedded-boundary Cartesian mesh method. The method employs adjoint-based error estimation and adaptive meshing to automatically determine resolution requirements of the computational domain. Results are presented for both mandatory and optional test cases. These include an axisymmetric body of revolution, a 69deg delta wing model and a complete model of the Lockheed N+2 supersonic tri-jet with V-tail and flow through nacelles. In addition to formal mesh refinement studies and examination of the adjoint-based error estimates, mesh convergence is assessed by presenting simulation results for meshes at several resolutions which are comparable in size to the unstructured grids distributed by the workshop organizers. Data provided includes both the pressure signals required by the workshop and information on code performance in both memory and processing time. Various enhanced techniques offering improved simulation efficiency will be demonstrated and discussed.

Predictions↗

Progress Towards Integrating the Finite-Volume Cubed-Sphere (FV3) Dynamical Core Tangent Linear and Adjoint Models into JEDI

The Joint Effort for Data assimilation Integration (JEDI) -- led by the Joint Center for Satellite Data Assimilation (JCSDA) -- is an inter-organizational endeavor to develop a common framework for performing data assimilation. This extensive framework will ultimately provide solvers, observation operators, interpolation and model interfaces using object oriented modeling. Two partners involved in JEDI use or plan to use the Finite Volume Cubed-Sphere (FV3) dynamical core to produce weather forecasts; these are NASA's Global Modeling and Assimilation Office and NOAA's National Center for Environment Prediction. In this work we present an update on ongoing efforts to integrate the FV3 tangent linear and adjoint models into the prototype JEDI framework. We setup and run a simple cycled data assimilation experiment using 4DVAR on the cubed sphere grid and with the FV3 tangent linear and adjoint models. Development of the observation operators for JEDI is separately underway. Instead of using real observations a simplified set of simulated observations will be used. We discuss the steps required to bring the FV3 linearized model into the object oriented framework and consider what would be the computational requirements of running this configuration for an operational system. FV3 uses a small time-step to ensure that small scales are well resolved, however this presents design challenges when running 4DVAR with the adjoint. An approach to storing the FV3 model trajectory has been developed that maintains the flexibility of using automatic differentiation. We discuss how this approach is incorporated into the framework. Other important uses of adjoint models include computing observation impacts and singular vectors, we consider how these tools can be included in JEDI.

Holdaway, Daniel↗

A direct-adjoint approach for material point model calibration with application to plasticity

Here, this paper proposes a new approach for the calibration of material parameters in local elastoplastic constitutive models. The calibration is posed as a constrained optimization problem, where the constitutive model evolution equations for a single material point serve as constraints. The objective function quantifies the mismatch between the stress predicted by the model and corresponding experimental measurements. To improve calibration efficiency, a novel direct-adjoint approach is presented to compute the Hessian of the objective function, which enables the use of second-order optimization algorithms. Automatic differentiation is used for gradient and Hessian computations. Two numerical examples are employed to validate the Hessian matrices and to demonstrate that the Newton–Raphson algorithm consistently outperforms gradient-based algorithms such as L-BFGS-B.

36 MATERIALS SCIENCE↗

Aerodynamic Shape Optimization Benchmarks with Error Control and Automatic Parameterization

Results are presented for four optimization benchmark problems posed by the AIAA Aerodynamic Design Optimization Discussion Group. The benchmarks are intended to exercise optimization frameworks on representative airfoil and wing design problems. All problems involve drag minimization subject to geometric and aerodynamic constraints. Our design approach involves two forms of adaptation. First, the shape parameterization is gradually and automatically enriched from an initially coarse search space. Second, adjoint solutions are used to drive adaptive mesh refinement to control discretization error. The error threshold is tailored so that the nest meshes, with the greatest accuracy, are used only when nearing the optimum. On the inviscid airfoil design problem, while reducing the drag by a factor of 10, we show how the combination of progressive parameterization and tiered discretization error control can dramatically accelerate the optimization. On the viscous airfoil design problem, we use inviscid analysis-driven optimization to reduce the total drag by a factor of two. Next, we improve the span efficiency factor of a wing by performing twist optimization. Finally, we optimize the Common Research Model wing, managing to hold drag roughly fixed, while targeting an initially-violated pitching moment constraint. Our approach aims to introduce greater complexity and accuracy only when necessary to improve the design, and also support a greater degree of automation.

Anderson, George R.↗

Toward Automatic Verification of Goal-Oriented Flow Simulations

We demonstrate the power of adaptive mesh refinement with adjoint-based error estimates in verification of simulations governed by the steady Euler equations. The flow equations are discretized using a finite volume scheme on a Cartesian mesh with cut cells at the wall boundaries. The discretization error in selected simulation outputs is estimated using the method of adjoint-weighted residuals. Practical aspects of the implementation are emphasized, particularly in the formulation of the refinement criterion and the mesh adaptation strategy. Following a thorough code verification example, we demonstrate simulation verification of two- and three-dimensional problems. These involve an airfoil performance database, a pressure signature of a body in supersonic flow and a launch abort with strong jet interactions. The results show reliable estimates and automatic control of discretization error in all simulations at an affordable computational cost. Moreover, the approach remains effective even when theoretical assumptions, e.g., steady-state and solution smoothness, are relaxed.

Simulations↗

Differentiable lagrangian shock hydrodynamics with application to stable shock acceleration of density interfaces

We develop a gradient based optimization approach for the equations of compressible, Lagrangian hydrodynamics and demonstrate how it can be employed to automatically uncover strategies to control hydrodynamic instabilities arising from shock acceleration of density interfaces. Strategies for controlling the Richtmyer-Meshkov instability (RMI) are of great benefit for inertial confinement fusion (ICF) where shock interactions with many small imperfections in the density interface lead to instabilities which rapidly grow over time. These instabilities lead to mixing which, in the case of laser driven ICF, quenches the runaway fusion process ruining the potential for positive energy return. Here, we demonstrate that control of these instabilities can be achieved by optimization of initial conditions with ( > 100) parameters. Optimizing over a large parameter space like this is not possible with gradient-free optimization strategies. This requires computation of the gradient of the outputs of a numerical solution to the equations of Lagrangian hydrodynamics with respect to the inputs. We show that the efficient computation of these gradients is made possible via a judicious application of (i) adjoint methods, the exact formal representation of sensitivities involving partial differential equations, and (ii) automatic differentiation (AD), the algorithmic calculation of derivatives of functions. Careful regularization of multiple operators including artificial viscosity and timestep control is required. We perform design optimization of > 100 parameter energy field driving the Richtmyer Meshkov instability showing significant suppression while simultaneously enhancing the acceleration of the interface relative to a nominal baseline case.

Hydrophysics↗

Aerodynamic Shape Optimization of the STARC-ABL Concept for Minimal Inlet Distortion

The NASA single-aisle turboelectric aircraft with an aft boundary layer propulsor (STARC-ABL) concept utilizes a novel electrically driven aft fan that ingests the fuselage boundary-layer for increased propulsive efficiency. In this paper we examine how aerodynamic shaping of the fuselage diffuser and nacelle inlet can reduce the flow distortion at the aft fan. Adjoint-based aerodynamic shape optimization with the ARP1420 distortion metric objective is used to automatically determine the optimal shapes for minimal fan-face distortion. Single and multipoint optimizations are carried out for simplified body-duct and wing-body-duct configurations. These two configurations highlight the importance of including the wing downwash effects when designing the propulsor. The optimizations showed the body-duct configuration can obtain cruise distortion values of approximately 1% while the wing-body-duct configuration can obtain distortion values of just over 2%.

Kenway, Gaetan K. W.↗

A steepest descents method for reentry optimization

A steepest descents optimization program is applied to the problem of a lifting vehicle entering the earth's atmosphere. The program employs penalty functions representing terminal conditions and inflight inequality constraints. During each iteration, it reduces a single performance measure which is the sum of the performance index and the penalty functions. Therefore, only one set of adjoint equations must be integrated per iteration. Values of weight factors, multiplying the penalty functions, are automatically adjusted before each iteration in order that the penalty functions will approach acceptable values. This method is shown to be a form of the classical Lagrange multiplier methods.

Andrus, J. F.↗