CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   SU2 (http://www.cfd-online.com/Forums/su2/)
-   -   Creating a custom objective function (http://www.cfd-online.com/Forums/su2/117368-creating-custom-objective-function.html)

viit3 May 7, 2013 08:02

Creating a custom objective function
 
Through a cursory glance at the code, I can see that objective functions go into the adjoint implementation in adjoint_solution_mean. Is that the only place where objective functions go/

I wanted to implement a custom objective function for pressure recovery for internal flows. How would I go about doing that?

fpalacios May 12, 2013 11:04

Quote:

Originally Posted by viit3 (Post 425822)
Through a cursory glance at the code, I can see that objective functions go into the adjoint implementation in adjoint_solution_mean. Is that the only place where objective functions go/

I wanted to implement a custom objective function for pressure recovery for internal flows. How would I go about doing that?

Hi,
As you know, SU2 design uses the continuous adjoint methodology, more details in:
http://www.stanford.edu/~fasispg/art...-2013-0287.pdf
http://adl.stanford.edu/papers/AIAA-2012-3018.pdf
http://www.stanford.edu/~fasispg/art..._March2012.pdf
http://www.stanford.edu/~fasispg/art...urnal_2009.pdf
http://www.stanford.edu/~fasispg/art...urnal_2007.pdf

A new objective function will require changes in the adjoint boundary conditions:
void CAdjEulerSolution::SetForceProj_Vector(CGeometry *geometry, CSolution **solution_container, CConfig *config)

and in the formula for computing the surface sensitivity.
void CAdjEulerSolution::Inviscid_Sensitivity(CGeometry *geometry, CSolution **solution_container, CNumerics *solver, CConfig *config)

Currently we are working on a discrete and a hybrid adjoint (it will be finished at the end of the year).

Thank you for you interest in SU2,
Best,
Francisco

viit3 July 3, 2013 07:22

I was going through some of the literature.

From what I understand, the formulation only takes surface integrals as an objective which is specified in

void CAdjEulerSolution::SetForceProj_Vector(CGeometry *geometry, CSolution **solution_container, CConfig *config)

Is that correct?

I don't understand what I have to change in

void CAdjEulerSolution::Inviscid_Sensitivity(CGeometry *geometry, CSolution **solution_container, CNumerics *solver, CConfig *config)

since the only term related to the objective function is d which is coming from SetForceProj_Vector.

Again, is this statement correct?

For an initial attempt, I want to do an incompressible Euler optimization. Is that possible?

Thank you for all the help.


All times are GMT -4. The time now is 08:24.