CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > SU2

The adjoint equation in the discrete adjoint solver

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   July 16, 2021, 04:47
Default The adjoint equation in the discrete adjoint solver
  #1
Member
 
Zhen ZHANG
Join Date: Jun 2018
Location: Beijing, China
Posts: 56
Rep Power: 7
Zhen ZHANG is on a distinguished road
Hi all,
I recently studied the discrete adjoint solver because I want to add some space varying design variables. I also learned the CoDi package. Here are my
understanding and questions.
Assuming f is the objective function, g is the control equation, p is the design variable, and x is the flow variable.
In an adjoint problem, we want to get df/dp. Let f_p be the partial derivative (f_p=partial f/partial p). We get

df/dp=f_p+lambda^T*g_p

where lambda is the adjoint variable and satisfies

(g_x)^T*lambda=-(f_x)^T

But in the solver, after starting recording, we register the solution and variables as the input, set dependencies, direct run, register the solution and the objective function as the output, and stop recording.

Q1: why do we need to register the solution of the direct solver as the output? Now they are both input and output.

And then in CDiscAdjSinglezoneDriver::Run(), we initialize the adjoint of the direct solver using the adjoint solver solution of the last step, set the derivative of the objective function as 1.0, compute the adjoint, extract derivatives of the solution and variables.

Q2: What are the derivatives of the solution and variables here? In the reverse mode and with the obj func derivative set to 1.0, they should be partial f/partial(). Is that right?

Q3: What does this iteration do? How does it solve the above adjoint equation?

Maybe there are some mistakes in the statement due to my limited understanding. I am grateful if you point them out.
Thank you!
Zhen ZHANG is offline   Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fail to converge when solving with a fabricated solution zizhou FLUENT 0 March 22, 2021 06:33
RANS discrete adjoint oscillating pgdelaserna SU2 3 August 25, 2019 04:32
[ANSYS Meshing] Help with element size sandri_92 ANSYS Meshing & Geometry 14 November 14, 2018 07:54
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 00:01
A question about discrete adjoint method Thomas Main CFD Forum 3 August 9, 2006 12:37


All times are GMT -4. The time now is 22:25.