# Solve a PDE on boundary

Dear all,

I have a 2D axisymmetric mesh on which I am solving the optimality system. Now to update the control variable on a boundary I need to solve a PDE with some conditions. I dont know how to do that while I am on 2D mesh. on the weak form formula below I know S but I want g.

g, S, and nu are vectors and the gradient is in the direction of S?
I guess personally I would just do it all in cartesian coords like
any other problem. You have just two unknowns g.x and g.y right?
Probably just search the documentation for the â€śvarfâ€ť examples
although â€śsolveâ€ť and â€śproblemâ€ť examples may be easier the varf may be more useful for now.
You can make a varf with the 2 components of g and nu as parameters and
it just uses S in the varf body. To get the value zero on boundary something like
â€śonâ€ť which should be in most of the varf examples. Using varf you can
extract the matrix and rhs and then dump them to see if they make sense.

1 Like

Thanks for your answer. S and g are vectors but nu and alpha and beta are constants.
I know I should solve it but I have to solve it on line not 2D mesh. I dont know how to do that. I have my system of equation on 2d surface below but this integral is on the inlet boundary.

I thick, you can see example :

https://www.ljll.math.upmc.fr/hecht/ftp/ff++/2019-Kenitra/Cours-Kenitra-2019.pdf

page 161 (Ground water) it is no axis but you have 2 Boundary condition on top border.

and the associated examples is:

https://www.ljll.math.upmc.fr/hecht/ftp/ff++/2019-Kenitra/edp/freeboundary.edp