CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   Discrete adjoint - Derivatives of the target function w.r.t. boundary conditions (https://www.cfd-online.com/Forums/su2/224346-discrete-adjoint-derivatives-target-function-w-r-t-boundary-conditions.html)

CFDEng1234 February 14, 2020 13:05

Discrete adjoint - Derivatives of the target function w.r.t. boundary conditions
 
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.

pcg February 17, 2020 11:35

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.

CFDEng1234 February 19, 2020 10:39

Quote:

Originally Posted by pcg (Post 758408)
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.

Thank you for your answer.I'll try to do what you suggest.



Regards.


All times are GMT -4. The time now is 06:30.