# 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 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 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 at 7:49