mesh dependence of numerical adjoint solution

I am solving the steady, two-dimensional adjoint Euler equations, $$A_x^T \partial_x \Psi + A_y^T \partial_y \Psi = 0$$, where $$A_x = \partial F_x/\partial U$$ and $$A_y= \partial F_y/\partial U$$ are the Flux Jacobians and $$\Psi = (\psi_1,\psi_2,\psi_3,\psi_4)^T$$ is the adjoint state. $$F_x=(\rho v_x,\rho v_x^2+p,\rho v_x v_y, \rho v_x H)^T$$ and $$F_y=(\rho v_y,\rho v_x v_y, \rho v_y^2+p, \rho v_y H)^T$$. For external flows (flow around an airfoil, for example) $$\Psi$$ obeys dual characteristic b.c. at the far-field (whereby the outgoing characteristic components of the adjoint field are set to zero), while at solid walls the b.c. is of the form $$(\psi_2,\psi_3)\cdot (n_x,n_y)=f(p)$$ where $$(n_x,n_y)$$ is the normal vector to the surface and $$f(p)$$ is a function that depends on the choice of cost function. This type of problem is relevant for the computation of sensititivities of the cost function with respect to perturbations of the flow.

For practical applications, the above equations are solved on a computational mesh with (typically) a finite-volume discretization. Now it turns out that, for various solvers and depending on the choice of flow regime and cost function, the adjoint solution is strongly mesh-dependent near solid walls, i.e., the values of the adjoint fields at and near the wall grow continually as the mesh is refined. Besides, such mesh-dependence seems to be strongly correlated with the presence of singularities at the forward stagnation streamline and at the trailing edge / rear stagnation point [see https://www.eucass.eu/doi/EUCASS2019-0291.pdf ]. I would like to know if someone has experienced the same or a similar phenomenon.

• Are you asking if other people have had the same issue as Lozano in his paper you linked above? Have you been experiencing it? I would argue it's not actually a problem, but the adjoint telling you the answer to the question you asked. I'm running a non singularity case right now with my code to see if I get any pathologies, so I can give a more complete answer.
– EMP
Jan 9, 2020 at 21:00
• Thanks, EMP. Since the issue with the adjoint seems to be more or less clear (although the actual mechanism of the mesh dependence is still missing) I am actually trying to know if someone has experienced similar mesh-dependence problems in other cases (for other equations, say) or may have some insight into the actual cause of the issue.
– CLR
Jan 10, 2020 at 7:34
• Let me ellaborate on this. Numerical solutions can be mesh-dependent (1) locally near singularities where the value of the solution diverges; adding points near the singularity yields larger and larger values of the field. (2) if the problem is not well-posed or some boundary condition is missing, such as for adjoints at shocks (3) the analytic solution to the problem is multivalued (4) the analytic solution has an extra degree of freedom, akin to circulation in potential flow problems, so the numerical solution has several possible solutions to choose among (such as in flows past cylinders)
– CLR
Jan 10, 2020 at 7:49

So I ran with my adjoint solver, but without a singularity on a sequence of refined meshes, and didn't see that behavior, as expected.

My guess is as follows:

If you think of the adjoint vector as a green's function, relating perturbations in the residual operator to a delta in the objective function (in this case weighted projections of pressure), I think the answer becomes clearer. The location of the trailing edge singularity is tremendously important for lift and drag computation, as stated in the paper, and in cases where we have a singularity, perturbations in the residual vector can change the location of the singularity, thus changing the lift and drag greatly. I think the explanation for the lack of the lack of mesh convergence is because of the way the adjoint works. The singularity at the trailing edge can cause a lack of mesh convergence in the objective function (Lozano did not plot the objective functions at different levels of mesh refinement), and the adjoint problem propagates that to the adjoint field around the airfoil. I wish he had provided mesh convergence or divergence of the objective functional as that would provide some insight. If anyone else has anything to add or correct me on I'd greatly appreciate it.

• Hi EMP, and thanks for your reply and insights. I think your negative result is quite interesting. Could you give more details about your code and the case you tested?
– CLR
Jan 10, 2020 at 22:22
• I have a second order euler FV code with adjoint based AMR and sensitivities. I just tested a subsonic case without a singularity. And used the AMR tool to refine the mesh a couple times. Subeonic or transonic makes no difference for this case. I think the real issue is that singularity causes the mesh dependence for the reason I have.
– EMP
Jan 11, 2020 at 15:36
• Ah, I guess I misunderstood you. I thought you had not observed the mesh dependence in one of the cases with t.e. singularity.
– CLR
Jan 13, 2020 at 7:43

The issue has been finally settled in https://arxiv.org/abs/2201.08128 https://arxiv.org/abs/2201.08129

It turns out that there is a singularity of the analytic adjoint solution at the wall, which extends the well-known Giles-Pierce singularity along the incoming stagnation streamline to the whole dividing streamline upstream of the trailing edge/rear stagnation point.