178 research outputs found

    On high-order pressure-robust space discretisations, their advantages for incompressible high Reynolds number generalised Beltrami flows and beyond

    Get PDF
    An improved understanding of the divergence-free constraint for the incompressible Navier--Stokes equations leads to the observation that a semi-norm and corresponding equivalence classes of forces are fundamental for their nonlinear dynamics. The recent concept of {\em pressure-robustness} allows to distinguish between space discretisations that discretise these equivalence classes appropriately or not. This contribution compares the accuracy of pressure-robust and non-pressure-robust space discretisations for transient high Reynolds number flows, starting from the observation that in generalised Beltrami flows the nonlinear convection term is balanced by a strong pressure gradient. Then, pressure-robust methods are shown to outperform comparable non-pressure-robust space discretisations. Indeed, pressure-robust methods of formal order kk are comparably accurate than non-pressure-robust methods of formal order 2k2k on coarse meshes. Investigating the material derivative of incompressible Euler flows, it is conjectured that strong pressure gradients are typical for non-trivial high Reynolds number flows. Connections to vortex-dominated flows are established. Thus, pressure-robustness appears to be a prerequisite for accurate incompressible flow solvers at high Reynolds numbers. The arguments are supported by numerical analysis and numerical experiments.Comment: 43 pages, 18 figures, 2 table

    Simultaneous single-step one-shot optimization with unsteady PDEs

    Get PDF
    The single-step one-shot method has proven to be very efficient for PDE-constrained optimization where the partial differential equation (PDE) is solved by an iterative fixed point solver. In this approach, the simulation and optimization tasks are performed simultaneously in a single iteration. If the PDE is unsteady, finding an appropriate fixed point iteration is non-trivial. In this paper, we provide a framework that makes the single-step one-shot method applicable for unsteady PDEs that are solved by classical time-marching schemes. The one-shot method is applied to an optimal control problem with unsteady incompressible Navier-Stokes equations that are solved by an industry standard simulation code. With the Van-der-Pol oscillator as a generic model problem, the modified simulation scheme is further improved using adaptive time scales. Finally, numerical results for the advection-diffusion equation are presented. Keywords: Simultaneous optimization; One-shot method; PDE-constrained optimization; Unsteady PDE; Adaptive time scal

    Index handling and assign optimization for Algorithmic Differentiation reuse index managers

    Full text link
    For operator overloading Algorithmic Differentiation tools, the identification of primal variables and adjoint variables is usually done via indices. Two common schemes exist for their management and distribution. The linear approach is easy to implement and supports memory optimization with respect to copy statements. On the other hand, the reuse approach requires more implementation effort but results in much smaller adjoint vectors, which are more suitable for the vector mode of Algorithmic Differentiation. In this paper, we present both approaches, how to implement them, and discuss their advantages, disadvantages and properties of the resulting Algorithmic Differentiation type. In addition, a new management scheme is presented which supports copy optimizations and the reuse of indices, thus combining the advantages of the other two. The implementations of all three schemes are compared on a simple synthetic example and on a real world example using the computational fluid dynamics solver in SU2.Comment: 20 pages, 14 figures, 4 table

    Reverse-Mode Automatic Differentiation of Compiled Programs

    Full text link
    Tools for algorithmic differentiation (AD) provide accurate derivatives of computer-implemented functions for use in, e. g., optimization and machine learning (ML). However, they often require the source code of the function to be available in a restricted set of programming languages. As a step towards making AD accessible for code bases with cross-language or closed-source components, we recently presented the forward-mode AD tool Derivgrind. It inserts forward-mode AD logic into the machine code of a compiled program using the Valgrind dynamic binary instrumentation framework. This work extends Derivgrind, adding the capability to record the real-arithmetic evaluation tree, and thus enabling operator overloading style reverse-mode AD for compiled programs. We maintain the high level of correctness reported for Derivgrind's forward mode, failing the same few testcases in an extensive test suite for the same well-understood reasons. Runtime-wise, the recording slows down the execution of a compiled 64-bit benchmark program by a factor of about 180.Comment: 17 pages, 5 figures, 1 listin

    Forward-Mode Automatic Differentiation of Compiled Programs

    Full text link
    Algorithmic differentiation (AD) is a set of techniques that provide partial derivatives of computer-implemented functions. Such a function can be supplied to state-of-the-art AD tools via its source code, or via an intermediate representation produced while compiling its source code. We present the novel AD tool Derivgrind, which augments the machine code of compiled programs with forward-mode AD logic. Derivgrind leverages the Valgrind instrumentation framework for a structured access to the machine code, and a shadow memory tool to store dot values. Access to the source code is required at most for the files in which input and output variables are defined. Derivgrind's versatility comes at the price of scaling the run-time by a factor between 30 and 75, measured on a benchmark based on a numerical solver for a partial differential equation. Results of our extensive regression test suite indicate that Derivgrind produces correct results on GCC- and Clang-compiled programs, including a Python interpreter, with a small number of exceptions. While we provide a list of scenarios that Derivgrind does not handle correctly, nearly all of them are academic counterexamples or originate from highly optimized math libraries. As long as differentiating those is avoided, Derivgrind can be applied to an unprecedentedly wide range of cross-language or partially closed-source software with little integration efforts.Comment: 21 pages, 3 figures, 3 tables, 5 listing
    corecore