Antoine Collet , Irina Sin , Hervé Chauris , Valérie Langlais , Olivier Regnault
{"title":"时间和空间离散化对伴随算子的影响:平稳和瞬态饱和流的例子","authors":"Antoine Collet , Irina Sin , Hervé Chauris , Valérie Langlais , Olivier Regnault","doi":"10.1016/j.advwatres.2025.105070","DOIUrl":null,"url":null,"abstract":"<div><div>This study compares the continuous (<em>differentiate - then - discretize</em>) and discrete (<em>discretize - then - differentiate</em>) 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 finite volume method, showing it on the example of Voronoi type mesh. 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. 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 <em>discretize-then-differentiate</em> approach is constrained on the discretized space contrary to the <em>differentiate-then-discretize</em> as the former integrates the discretization of the forward problem. The <em>discretize-then-differentiate</em> approach makes the derivation more explicit, particularly with respect to boundary conditions, and it is therefore advised regardless of the problem at hand.</div></div>","PeriodicalId":7614,"journal":{"name":"Advances in Water Resources","volume":"205 ","pages":"Article 105070"},"PeriodicalIF":4.2000,"publicationDate":"2025-08-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Impact of time and spatial discretization on adjoint operators: Example of stationary and transient saturated flows\",\"authors\":\"Antoine Collet , Irina Sin , Hervé Chauris , Valérie Langlais , Olivier Regnault\",\"doi\":\"10.1016/j.advwatres.2025.105070\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>This study compares the continuous (<em>differentiate - then - discretize</em>) and discrete (<em>discretize - then - differentiate</em>) 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 finite volume method, showing it on the example of Voronoi type mesh. 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. 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 <em>discretize-then-differentiate</em> approach is constrained on the discretized space contrary to the <em>differentiate-then-discretize</em> as the former integrates the discretization of the forward problem. The <em>discretize-then-differentiate</em> approach makes the derivation more explicit, particularly with respect to boundary conditions, and it is therefore advised regardless of the problem at hand.</div></div>\",\"PeriodicalId\":7614,\"journal\":{\"name\":\"Advances in Water Resources\",\"volume\":\"205 \",\"pages\":\"Article 105070\"},\"PeriodicalIF\":4.2000,\"publicationDate\":\"2025-08-29\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Advances in Water Resources\",\"FirstCategoryId\":\"93\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0309170825001848\",\"RegionNum\":2,\"RegionCategory\":\"环境科学与生态学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q1\",\"JCRName\":\"WATER RESOURCES\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Advances in Water Resources","FirstCategoryId":"93","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0309170825001848","RegionNum":2,"RegionCategory":"环境科学与生态学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"WATER RESOURCES","Score":null,"Total":0}
Impact of time and spatial discretization on adjoint operators: Example of stationary and transient saturated flows
This study 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 finite volume method, showing it on the example of Voronoi type mesh. 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. 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 constrained on the discretized space contrary to the differentiate-then-discretize as the former integrates the discretization of the forward problem. The discretize-then-differentiate approach makes the derivation more explicit, particularly with respect to boundary conditions, and it is therefore advised regardless of the problem at hand.
期刊介绍:
Advances in Water Resources provides a forum for the presentation of fundamental scientific advances in the understanding of water resources systems. The scope of Advances in Water Resources includes any combination of theoretical, computational, and experimental approaches used to advance fundamental understanding of surface or subsurface water resources systems or the interaction of these systems with the atmosphere, geosphere, biosphere, and human societies. Manuscripts involving case studies that do not attempt to reach broader conclusions, research on engineering design, applied hydraulics, or water quality and treatment, as well as applications of existing knowledge that do not advance fundamental understanding of hydrological processes, are not appropriate for Advances in Water Resources.
Examples of appropriate topical areas that will be considered include the following:
• Surface and subsurface hydrology
• Hydrometeorology
• Environmental fluid dynamics
• Ecohydrology and ecohydrodynamics
• Multiphase transport phenomena in porous media
• Fluid flow and species transport and reaction processes