Lossy compression techniques supporting unsteady adjoint on 2D/3D unstructured grids

https://doi.org/10.1016/j.cma.2021.114152Get rights and content

Highlights

  • Memory demands of unsteady adjoint in optimization prevent wide industrial use.

  • Storage of unsteady flowfields can be relaxed using lossy compression techniques.

  • ZFP, Incremental Proper Generalized Decomposition incl. hybridization are proposed.

  • Storage reduced by more than 2 orders of magnitude in shape optimization.

  • Course of the optimization in fluid mechanics unaffected by the compression error.

Abstract

This paper proposes and assesses remedies to the significant storage requirements of unsteady adjoint methods used in gradient-based optimization, in multi-dimensional problems modeled by unsteady PDEs. Even if the application domain of the proposed technique(s) is wide, these remedies are herein demonstrated in shape optimization problems with unsteady fluid flows. In these cases, the adjoint equations are integrated backwards in time, requiring the instantaneous flow fields to be available at each time-step of the adjoint solver, and this noticeably increases storage requirements. To avoid extreme treatments, such as the full storage of the computed instantaneous flow fields or their recomputations from scratch during the solution of the adjoint equations, or even the widely used check-pointing technique, lossy compression techniques are proposed. These are implemented within OpenFOAM, which is used to solve the flow and adjoint equations and conduct the optimization. In this paper, (a) the ZFP compression library, (b) the incremental Proper Generalized Decomposition (iPGD) algorithm and (c) an efficient hybridization of them are used. The compression strategies are assessed on aerodynamic shape optimization problems. Their effectiveness in data reduction, computational overhead and representation accuracy is considered, in relation to the continuous adjoint method which uses the decompressed fields to compute the gradient of objective functions as the reference method.

Introduction

In many applications in fluid mechanics, Computational Fluid Dynamics (CFD) solvers are used to predict time-varying flows. In gradient-based shape optimization with this kind of flows, an adjoint problem must additionally be solved within each optimization cycle. By using the adjoint approach, the gradient of an objective function can be computed at a cost that is independent of the number of design variables. Working with unsteady flows, the adjoint equations must be integrated backwards in time, which requires the instantaneous flow fields to be available at each time-step of the adjoint solver. The two “extreme solutions” to this problem are either (a) the full storage of the flow field time-series or (b) a zero-storage policy combined with flow recomputations starting always from the initial state, to get each instantaneous field required by the adjoint method. Middle ground solutions include check-pointing [1], [2] and the use of reduced-order models [3]. The former belongs to the “exact” techniques, being able to relax the memory requirements of the adjoint computation, while retrieving the exact flow solution at each time-step of the adjoint solver, at the expense of a controllable computational overhead. To do so, the flow solution is stored at a number of check-points along the time-span. To retrieve the flow solution at any time-step other than a check-point, the flow solver starts integrating forward from the nearest check-point. On the other hand, reduced-order models belong to the “approximate” techniques, storing an approximation to the flow time-history based on linear interpolation, cubic-splines, the Proper Orthogonal Decomposition (POD) etc. [4], [5], [6]. Alternative approaches to reduce the computational cost associated with unsteady adjoint might also include spatial and temporal coarsening [7] or basing the adjoint solution on the time-averaged flow solution [8], [9]. From a general point of view, the herein proposed techniques fall into the “approximate” category of methods.

In this paper, a compressed full storage strategy for unsteady adjoint-based shape optimization problems is implemented and assessed. The compression of the computed flow fields at each time-step is performed using (a) the ZFP algorithm [10], [11], (b) the incremental Proper Generalized Decomposition (iPGD) algorithm proposed by the group of authors [12] and (c) an efficient hybridization of them. Among the purposes of this study is to assess the lossy compression trade-off between data reduction and compression accuracy, since the adjoint method is always sensitive to the accuracy of the flow solutions it is based upon, and evaluate the computational overhead that may arise due to the compression (and decompression). It must be noted that the development of the compressed full storage strategy does not make any assumption regarding periodicity in time and is, thus, applicable to both periodic and non-periodic unsteady flows.

The ZFP [10], [11] is a compression algorithm developed by the Lawrence Livermore National Laboratory to compress integer and floating-point data stored in d-dimensional arrays, with d1,4. These arrays are partitioned into independent blocks of 4d values each and, then, compressed independently. ZFP follows the typical structure of lossy compressors, including decorrelation, quantization, and encoding stages. A thorough analysis of the ZFP algorithm can be found in [10], [13]. ZFP supports both lossless and lossy, optionally error-bounded, compression. According to its designers, ZFP is optimized for the compression of structured data stored in multidimensional arrays, but it also provides a 1D array class which can be used to compress 1D data. The use of the optimized multidimensional classes of the ZFP for fields computed on 2D/3D unstructured grids, which this paper is exclusively dealing with, is analyzed in Section 3.1. ZFP has been used along with other lossy compression techniques to support adjoint-based optimization problems in other scientific fields [14], [15]. To our knowledge, its usage in the adjoint CFD-based optimization on unstructured grids is examined, for the first time in the literature.

In this paper, the Proper Generalized Decomposition (PGD) algorithm [16] is used to store a highly accurate approximation to the flow solution using a finite sum decomposition. The availability of the whole time-history is a prerequisite for the standard PGD algorithm, meaning that full storage capacity would be necessary before the PGD could take over. It is though obvious that, if this storage capacity was available, there would be no reason for the fields to be compressed. Thus, the incremental PGD (iPGD) algorithm, first proposed in [12] by the group of authors, for the same application though on structured grids, is revisited and further improved in this paper, extended also to flowfields computed on unstructured grids; this particular technique, to the best of the authors’ knowledge, appears also for the first time in the literature. To reduce the computational cost associated with iPGD, the time-history of the flow problem is partitioned into time-windows that are compressed individually from each other; within each window, flow field snapshots are compressed incrementally each time the flow at a new instant is computed. To do so, the flow field computed at the current time-step and the already compressed time-series within the same time-window are processed together to update the compressed data.

The hybridization of iPGD and ZFP algorithms, being a third original contribution of this paper, is also proposed. In the hybrid algorithm, at the end of each time-window, the separated representation resulting from the iPGD algorithm is lossly compressed using the ZFP algorithm.

The performance of the proposed compression techniques is demonstrated in two shape optimization problems: (a) drag minimization of a 2D shape with an initially circular cross-section by maintaining a constant area and (b) total pressure losses minimization of a 3D S-bend duct with time-varying uniform inlet velocity profile. These techniques will be investigated and assessed by considering their effectiveness in data reduction, their computational cost and their compression accuracy; the latter is investigated by considering the effect the compression error has on the sensitivities of the objective function with respect to (w.r.t.) the design variables computed by the adjoint method. Without loss in generality, shapes to be designed are parameterized using volumetric B-Splines, as described in Section 2. However, the proposed technique(s) may equally well be applied to optimization problems with non-parameterized shapes, in which case all body surface nodes are directly controlled.

Section snippets

Flow and adjoint PDEs

This Section briefly presents the development of the unsteady adjoint method for the shape optimization of unsteady flows. The continuous adjoint method is used to compute the gradient of the objective function J w.r.t. the design variables b. In all cases of this paper, the latter stand for the Cartesian coordinates of the control points of volumetric B-Splines lattices morphing the surfaces to be optimized and the CFD grid. The objective functions used within this paper are the time-averaged

Data compression in unsteady adjoint optimization

The primal fields that must be stored at each time-step during the solution of the unsteady flow problem are p, vi, ν˜ (for turbulent flows), computed at the cell-centers, and the volume flux ϕ, computed at the cell-faces. The storage of ϕ is necessary since this is also needed during the solution of the adjoint equations and cannot be given by a closed form expression based on (p, vi) due to the use of a Rhie–Chow interpolation scheme [23]. Each scalar field p, vi, ν˜ and ϕ is compressed

Applications

In all shape optimizations presented in this Section, the compression ratio CR is primarily used to evaluate the reduction in memory size. CR is defined as the ratio of the memory size required to store all the primal fields to be compressed and that of the compressed streams including indexing lists (if needed). CR reflects the total reduction in memory footprint due to the lossy compression.

The SDs (denoted by δJ/δb) computed when the primal solution time-series are stored in full precision

Conclusions

Compressed full storage strategies have been developed to reduce the storage requirements of the backwards in time integration of the unsteady adjoint equations, in gradient-based optimization problems. Though the proposed strategies are general and independent from the underlying primal equations, the paper focuses solely on shape optimization methods in unsteady fluid mechanics. The developed strategies are based on the ZFP algorithm, the incremental Proper Generalized Decomposition (iPGD),

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgments

Part of this research was funded by the Bayerische Motoren Werke (BMW), Greece. The first author was supported by the Special Account for Research Funding (ELKE) of the National Technical University of Athens (NTUA), Greece , through a Ph.D. scholarship. The contribution of Mr. L. Kliafas in the early phase of the development of the iPGD algorithm is acknowledged.

References (30)

  • CyrE.C. et al.

    Towards efficient backward-in-time adjoint computations using data compression techniques

    Comput. Methods Appl. Mech. Engrg.

    (2014)
  • S. Nimmagadda, T. Economon, J. Alonso, C. Silva, B. Zhou, T. Albring, Low-cost unsteady discrete adjoints for...
  • OthmerC.

    Adjoint methods for car aerodynamics

    J. Math. Ind.

    (2014)
  • KrögerJ. et al.

    Adjoint volume-of-fluid approaches for the hydrodynamic optimisation of ships

    Ship Technol. Res.

    (2018)
  • LindstromP.

    Fixed-rate compressed floating-point arrays

    IEEE Trans. Vis. Comput. Graphics

    (2014)
  • Cited by (8)

    View all citing articles on Scopus
    1

    Ph.D. Student.

    2

    Postdoctoral Researcher.

    3

    Professor.

    View full text