# Discrete adjoint - Derivatives of the target function w.r.t. boundary conditions

 Register Blogs Members List Search Today's Posts Mark Forums Read

 February 14, 2020, 14:05 Discrete adjoint - Derivatives of the target function w.r.t. boundary conditions #1 New Member   Aldo Serafino Join Date: Feb 2020 Location: Paris Posts: 2 Rep Power: 0 Hi everyone. I'm definitely a new user of SU2 v7.0.1 and I'm considering the idea to use it for my PhD thesis. For the moment, I've been working on a linear cascade of NACA 0012 airfoils. I model my domain with an INLET, an OUTLET, two periodic surfaces (low and top) and a FIXED WALL (which is the airfoil). As boundary conditions, I impose the inlet total pressure, the inlet total temperature and the outlet static pressure. I have two doubts about the discrete adjoint problem. 1) Can I use the discrete adjoint to obtain the gradient of my target function (which is the lift) with respect to my three boundary conditions? In my case, can I get the derivative of the lift with respect to the inlet total pressure, to the inlet total temperature and to the outlet static pressure? 2) For the discrete adjoint problem, instead of using the built-in target functions (i.e. lift or draft), can I define some custom target functions (for instance, the difference of entropy between the outlet and the inlet sections)? Thank you for your time and have a nice day. Best regards.

 February 17, 2020, 12:35 #2 Member   Pedro Gomes Join Date: Dec 2017 Posts: 87 Rep Power: 4 Yes, you can. But it will require some coding, for boundary conditions something similar is already done for angle of attack and other variables, see: CDiscAdjSolver::RegisterVariables(...) and CDiscAdjSolver::ExtractAdjoint_Variables(...) You can register/extract other variables in those methods. To define new objectives functions start at CDiscAdjSinglezoneDriver::SetObjFunction() And follow the methods called from there (highly recommended to setup an IDE for that...). By the way I think at Dirichlet boundaries the adjoint variables are the sensitivities.

February 19, 2020, 11:39
#3
New Member

Aldo Serafino
Join Date: Feb 2020
Location: Paris
Posts: 2
Rep Power: 0
Quote:
 Originally Posted by pcg Yes, you can. But it will require some coding, for boundary conditions something similar is already done for angle of attack and other variables, see: CDiscAdjSolver::RegisterVariables(...) and CDiscAdjSolver::ExtractAdjoint_Variables(...) You can register/extract other variables in those methods. To define new objectives functions start at CDiscAdjSinglezoneDriver::SetObjFunction() And follow the methods called from there (highly recommended to setup an IDE for that...). By the way I think at Dirichlet boundaries the adjoint variables are the sensitivities.

Regards.

 Tags derivatives, discrete adjoint, target function