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 37 records · Page 2

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↗

Coupled Time-Lapse Full-Waveform Inversion for Subsurface Flow Problems Using Intrusive Automatic Differentiation

We describe a novel framework for estimating subsurface properties, such as rock permeability and porosity, from time-lapse observed seismic data by coupling full-waveform inversion (FWI), subsurface flow processes, and rock physics models. For the inverse modeling, we handle the back propagation of gradients by an intrusive automatic differentiation strategy that offers three levels of user control: (1) At the wave physics level, we adopted the discrete adjoint method in order to use our existing high-performance FWI code; (2) at the rock physics level, we used built-in automatic differentiation operators from the TensorFlow backend; (3) at the flow physics level, we implemented customized partial differential equation (PDE) operators for the multiphase flow equations. The three-level coupled inversion strategy strikes a good balance between computational efficiency and programming efforts, and when the gradients are chained together, it constitutes a coupled inverse system. Our numerical experiments demonstrate that the three-level coupled inverse problem is superior in terms of accuracy to a traditional decoupled inversion strategy. Additionally, our method is able to simultaneously invert for parameters in empirical relationships such as the rock physics models. Our proposed inverted model can be used for reservoir performance prediction and reservoir management/optimization purposes.

54 ENVIRONMENTAL SCIENCES↗

A general approach to seismic inversion with automatic differentiation

Imaging Earth structure or seismic sources from seismic data involves minimizing a target misfit function, and is commonly solved through gradient-based optimization. The adjoint-state method has been developed to compute the gradient efficiently; however, its implementation can be time-consuming and difficult. We develop a general seismic inversion framework to calculate gradients using reverse-mode automatic differentiation. The central idea is that adjoint-state methods and reverse-mode automatic differentiation are mathematically equivalent. Here, the mapping between numerical PDE simulation and deep learning allows us to build a seismic inverse modeling library, ADSeismic, based on deep learning frameworks, which supports high performance reverse-mode automatic differentiation on CPUs and GPUs. We demonstrate the performance of ADSeismic on inverse problems related to velocity model estimation, rupture imaging, earthquake location, and source time function retrieval. ADSeismic has the potential to solve a wide variety of inverse modeling applications within a unified framework.

58 GEOSCIENCES↗

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↗

A practical discrete-adjoint method for high-fidelity compressible turbulence simulations

Methods and computing hardware advances have enabled accurate predictions of complex compressible turbulence phenomena, such as the generation of jet noise that motivates the present effort. However, limited understanding of underlying physical mechanisms restricts the utility of such predictions since they do not, by themselves, indicate a route to design improvements. Gradient-based optimization using adjoints can circumvent the flow complexity to guide designs, though this is predicated on the availability of a sufficiently accurate solution of the forward and adjoint systems. These are challenging to obtain, since both the chaotic character of the turbulence and the typical use of discretizations near their resolution limits in order to efficiently represent its smaller scales will amplify any approximation errors made in the adjoint formulation. Formulating a practical exact adjoint that avoids such errors is especially challenging if it is to be compatible with state-of-the-art simulation methods used for the turbulent flow itself. Automatic differentiation (AD) can provide code to calculate a nominally exact adjoint, but existing general-purpose AD codes are inefficient to the point of being prohibitive for large-scale turbulence simulations. Here, we analyze the compressible flow equations as discretized using the same high-order workhorse methods used for many high-fidelity compressible turbulence simulations, and formulate a practical space–time discrete-adjoint method without changing the basic discretization. A key step is the definition of a particular discrete analog of the continuous norm that defines our cost functional; our selection leads directly to an efficient Runge–Kutta-like scheme, though it would be just first-order accurate if used outside the adjoint formulation for time integration, with finite-difference spatial operators for the adjoint system. Its computational cost only modestly exceeds that of the flow equations. We confirm that its accuracy is limited by computing precision, and we demonstrate it on the aeroacoustic control of a mixing layer with a challengingly broad range of turbulence scales. For comparison, the error from a corresponding discretization of the continuous-adjoint equations is quantified to potentially explain its limited success in past efforts to control jet noise. The differences are illuminating: the continuous-adjoint is shown to suffer from exponential error growth in (reverse) time even for the best-resolved largest turbulence scales. Implications for jet noise reduction and turbulence control in general are discussed.

71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSIC↗

A non-intrusive parallel-in-time adjoint solver with the XBraid library

In this paper, an adjoint solver for the multigrid-in-time software library XBraid is presented. XBraid provides a non-intrusive approach for simulating unsteady dynamics on multiple processors while parallelizing not only in space but also in the time domain (XBraid: Parallel multigrid in time, http://llnl.gov/casc/xbraid). It applies an iterative multigrid reduction in time algorithm to existing spatially parallel classical time propagators and computes the unsteady solution parallel in time. Techniques from Automatic Differentiation are used to develop a consistent discrete adjoint solver which provides sensitivity information of output quantities with respect to design parameter changes. The adjoint code runs backwards through the primal XBraid actions and accumulates gradient information parallel in time. It is highly non-intrusive as existing adjoint time propagators can easily be integrated through the adjoint interface. The adjoint code is validated on advection-dominated flow with periodic upstream boundary condition. We report it provides similar strong scaling results as the primal XBraid solver and offers great potential for speeding up the overall computational costs for sensitivity analysis using multiple processors.

97 MATHEMATICS AND COMPUTING↗

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↗

DPFEHM: a differentiable subsurface physics simulator

The Earth’s subsurface is a key resource that provides energy via fossil fuels and geothermal sources, stores drinking water, and is used in the fight against climate change via carbon sequestration. Simulating the physical processes that occur in the Earth’s subsurface with computers enables better use of this resource. DPFEHM is a Julia package that includes computer models with a focus on the Earth’s subsurface, especially fluid flow, which is critical for the aforementioned applications. DPFEHM is able to solve the groundwater flow equations (single phase flow), Richards equation (air/water), the advection-dispersion equation, and the 2d wave equation. One of the key features of DPFEHM is that it supports automatic differentiation, so it can be integrated into machine learning workflows using frameworks such as Flux or PyTorch. The automatic differentiation capabilities give it the same performance as adjoint methods.

54 ENVIRONMENTAL SCIENCES↗

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 programming for online training of a neural artificial viscosity function within a staggered grid Lagrangian hydrodynamics scheme

Lagrangian methods to solve the inviscid Euler equations produce numerical oscillations near shock waves. A common approach to reducing these oscillations is to add artificial viscosity (AV) to the discrete equations. The AV term acts as a dissipative mechanism that attenuates oscillations by smearing the shock across a finite number of computational cells. However, AV introduces several control parameters that are not determined by the underlying physical model, and hence, in practice are tuned to the characteristics of a given problem. We seek to improve the standard quadratic-linear AV form by replacing it with a learned neural function that reduces oscillations relative to exact solutions of the Euler equations, resulting in a hybrid numerical-neural hydrodynamic solver. Because AV is an artificial construct that exists solely to improve the numerical properties of a hydrodynamic code, there is no offline ‘viscosity data’ against which a neural network can be trained before inserting into a numerical simulation, thus requiring online training. We achieve this via differentiable programming, i.e. end-to-end backpropagation or adjoint solution through both the neural and differential equation code, using automatic differentiation of the hybrid code in the Julia programming language to calculate the necessary loss function gradients. A novel offline pre-training step accelerates training by initializing the neural network to the default numerical AV scheme, which can be learned rapidly by space-filling sampling over the AV input space. We find that online training over early time steps of simulation is sufficient to learn a neural AV function that reduces numerical oscillations in long-term hydrodynamic shock simulations. These results offer an early proof-of-principle that online differentiable training of hybrid numerical schemes with novel neural network components can improve certain performance aspects existing in purely numerical schemes.

97 MATHEMATICS AND COMPUTING↗

Constitutive Models via Automatic Differentiation v.1.0.0

SAND2024-00905O Constitutive Models via Automatic Differentiation (CMAD) provides a software framework for solving constitutive or material model calibration problems. It relies on JAX's automatic differentiation capabilities to compute the derivatives needed for both forward and adjoint sensitivity analyses. The software can be used to implement constitutive models and calibrate the parameters from experimental data. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525.

Seidl, Daniel↗

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↗

Comparison of ADVANTG Simulations to Simple Shielding Measurements - Paper 36

Monte Carlo (MC) radiation transport simulations, like those performed using Monte Carlo N-Particle (MCNP), can be highly accurate but require time to reduce the statistical uncertainties in the calculated detector response(s). Many different 'variance reduction' techniques devised over the years increase the efficiency of MC calculations, but these methods can be more art than science. Many of these methods are problem specific or require careful tuning of parameters for good performance. One of the best variance reduction methods, in terms of both reliable performance increases and ease of use, is the use of weight windows. Weight windows are derived from an importance map in space and energy that allows the transport code to focus more simulation time on particles that have a higher likelihood of being important to the final detector response. Less time is spent simulating particles that have little chance of making a contribution to the detector response. MCNP already includes the abilities to generate and use weight windows. Unfortunately, generating weight windows can take a very long time, perhaps longer than the original problem. Oak Ridge National Laboratory has led the development of hybrid methods using a discrete ordinates adjoint calculation to quickly develop an importance map (weight windows) for use in a Monte Carlo code. The Consistent Adjoint Driven Importance Sampling (CADIS) method uses an adjoint calculation to develop both an importance map and a biased source distribution that work together. This method is reasonably automatic, is easy to use, and has been implemented in the Automated Variance reduction Generator (ADVANTG) package that works with MCNP5. ADVANTG reads an MCNP input file and a small amount of extra user information and then runs an adjoint deterministic calculation using Denovo. The importance map and biased source distribution derived from the CADIS method can then be incorporated back into the original MCNP input file to enhance the figure-of-merit (FOM) of the calculation. The FOM is a measure of the efficiency of the calculation using the amount of run time and corresponding level of statistical uncertainty in the detector result. ADVANTG-enhanced MCNP input files have been shown to increase the FOM of many types of problems, obtaining the same level of statistical uncertainty in a shorter time compared to standard MCNP. ADVANTG can also generate variance reduction parameters (importance map and biased source) using the Forward-Weighted CADIS (FW-CADIS) method for optimizing mesh tallies. The CADIS method creates variance reduction parameters that optimize a tally's total quantity (flux, dose rate, interaction rate, etc.) and will not generally increase performance for all parts of a segmented tally. To optimize a segmented tally, the FW-CADIS method uses two discrete ordinates calculations to make variance reduction parameters that help compute a segmented tally with uniform relative uncertainties in each bin. This report will demonstrate that using ADVANTG for neutron and photon radiation shielding problems will (1) preserve the standard MCNP results and (2) obtain those results either with less statistical uncertainty or in shorter times than the standard MCNP calculation. The four demonstration problems in this report are based on simple neutron or photon transmission measurements through different materials. All of the problems here used the CADIS method and still saw improvement across the flux tallies segmented by particle energy. (authors)

61 RADIATION PROTECTION AND DOSIMETRY↗

Calibr8 v.1.0

Calibr8 provides an application to rapidly prototype and perform material model calibration for complex plasticity models using advanced adjoint or forward sensitivity analyses for execution on massively parallel machines. These techniques can be orders of magnitude faster than traditional finite difference approaches for material model calibration. The underlying technology used in Calibr8 is automatic differentiation, which allows for the rapid implementation and testing of new plasticity models within its framework. Additionally, Calibr8 can perform adjoint-based error estimation to approximate discretization errors for user-implemented plasticity models. Sandia National Laboratories is a multimission laboratory managed and operated by National Technology & Engineering Solutions of Sandia, LLC, a wholly owned subsidiary of Honeywell International Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA0003525. SAND2021-10630 O

Granzow, BrianN.↗