Work

Impact of time and spatial discretization on adjoint operators: Example of stationary and transient saturated flows

Year: 2025
Type: article
Abstract: This paper compares the continuous (differentiate - then - discretize) and discrete (discretize - then - differentiate) adjoint derivation approaches in the context of adjoint-based automatic optimization. The objective is to study some of the pitfalls associated with spatial and temporal discretization of the adjoint state method, the accuracy of the resulting gradient estimate, and its impact on the convergence cost to reach the optimum solution. It is illustrated in the context of a classical and well documented saturated flow problem. We first present insights of the complete formulations and discretizations of the saturated transient and stationary flow equations, the continuous adjoint equations and their counterparts the discrete adjoint equations for the Voronoï-based finite volume method. The reference gradient to check both derivation and implementation is computed by finite difference approximation. The consistency between the continuous and discrete adjoint methods is found to depend on the discretization scheme used to solve the forward problem. The time discretization scheme used in the forward problem is preserved in the adjoint equations, and affects both the adjoint terminal condition and the gradient expressions. This is not apparent in the continuous approach. Reproductible numerical applications are provided through the PyRTID python code. It shows that small errors in the discrete implementation of the adjoint can lead to significant gradient errors and slower convergence. Similarly, the use of a variable time step affects the time derivative of the adjoint equations, and also impacts the analytical expression of the gradient with respect to the initial hydraulic head (initial state). The discretization of the adjoint sources is also critical when simulated values are interpolated both spatially and temporally to match observations. The derivations become more complex when observation errors are correlated and when the observation sampler is non-linear. Numerical experiments show that the use of an incorrect adjoint formulation can lead to incorrect gradients with shifts in both amplitude and localization. Investigation of agreement with the finite difference approximation shows that, if implemented correctly, the residuals between the adjoint state method and the finite difference gradients must be white noise following a zero-centered Gaussian distribution with a standard deviation several orders of magnitude smaller than the gradient values. Mesh refinement has no effect on the gradient accuracy. The main conclusion is that the discretize-then-differentiate approach is superior and must be used regardless of the problem at hand.p, li { white-space: pre-wrap; }
Language: English
Open Access status: hybrid
Estimated APC paid: $3,840
OpenAlex ID: W4413826356
FWCI: 0.287
Cites: 63
Cited by: 2
Related to: 10