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

Gradient Computation: finite differences and adjoint method

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By doan.nak
  • 1 Post By economon

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 10, 2014, 10:25
Default Gradient Computation: finite differences and adjoint method
  #1
New Member
 
Join Date: May 2014
Posts: 3
Rep Power: 12
doan.nak is on a distinguished road
Dear all,

I have been trying to compare the different gradient computation methods in SU2 for a NACA0012 airfoil with Hicks-Henne bumps as design variable (the test case provided).
Comparing the results obtained with the Adjoint methods (and SU2_GPC) with the results obtained with the finite_differences.py script, I have observed that values can be quite different between the two ways to obtain the gradient.

The difference is especially big when the bumps are located near the leading edge. Is there any reason why it should be the case ?

I thought that it could be due to the way the gradient is computed with the adjoint method.
As the continuous adjoint method is used, after an adjoint computation, we have
dF/ dSn which is the sensitivity of F for an infinitesimal displacement of the surface in the direction of the local normal to the surface.
In the SU2_GPC file, (and in the files computing the deformation of the surface), one compute (D is the "deformation")
dD/dPm ~= (delta x, delta y, delta z) / Pm where delta x, delta y, delta z are the displacement of a surface point due to the m-th Hicks-Henne bump of amplitude Pm.
Thus, the gradient computed is given by the projection of the displacement over the local normal direction (1n) summed over the whole surface :
dF / dPm = sum_(points of the surface) dF/dSn * 1n * dD/dPm

However, in reality, the total displacement also has a tangential component, so isn't there an approximation which is made there which could explain the discrepancy between the gradient computed near the leading edge (as there the local normal is really different from the direction of deformation of the Hicks-Henne bump which is done perpendicularly to the chord) ?
The gradient would be exact if the Hicks-Henne bump was applied normally to the surface right ?

Can someone tell me if I understood the way the gradient is computed correctly ?

Thank you very much for your answer.
EMolina likes this.
doan.nak is offline   Reply With Quote

Old   June 24, 2014, 17:37
Default
  #2
Super Moderator
 
Thomas D. Economon
Join Date: Jan 2013
Location: Stanford, CA
Posts: 271
Rep Power: 14
economon is on a distinguished road
Hi,

Thanks for a great question. The type of continuous adjoint formulation in SU2 takes advantage of shape calculus in order to find analytic expressions for the surface sensitivity. This is done assuming small perturbations in the local normal direction alone, without loss of generality. Tangential and normal components can be taken into account (and have been in previous work), but this is not necessary.

Please see the attached description of how we compute gradients using projection for some more information.

Hope this helps clear things up,
Tom

p.s. Don't forget that finite differencing is prone to truncation/subtractive cancelation error.. it can often take a few tries to find the appropriate step size. It is typical that we find some discrepancy between the two gradients.
Attached Images
File Type: jpeg gradient_projection.jpeg (55.6 KB, 156 views)
bornax likes this.
economon is offline   Reply With Quote

Old   November 17, 2017, 08:59
Default
  #3
New Member
 
Kemas Zakaria
Join Date: Nov 2017
Posts: 1
Rep Power: 0
Kemas_Zack is on a distinguished road
Quote:
Originally Posted by economon View Post
Hi,

Thanks for a great question. The type of continuous adjoint formulation in SU2 takes advantage of shape calculus in order to find analytic expressions for the surface sensitivity. This is done assuming small perturbations in the local normal direction alone, without loss of generality. Tangential and normal components can be taken into account (and have been in previous work), but this is not necessary.

Please see the attached description of how we compute gradients using projection for some more information.

Hope this helps clear things up,
Tom

p.s. Don't forget that finite differencing is prone to truncation/subtractive cancelation error.. it can often take a few tries to find the appropriate step size. It is typical that we find some discrepancy between the two gradients.

Dear,

I am a new user in using SU2 and right now i want to use the surface sensitivity computed by SU2 to calculate the gradient of the objective function with respect to my own design variables. From the image attached in your reply, can you explain more in detail about the term deltaSi ("area of the surface control volume surrounding node i").

Any reply would be highly appreciated
Best regards,
Kemas
Kemas_Zack is offline   Reply With Quote

Old   November 22, 2017, 06:37
Default
  #4
Zen
Member
 
Zeno
Join Date: Sep 2013
Location: Delft, The Netherlands
Posts: 63
Rep Power: 13
Zen is on a distinguished road
Hi Kemas,

I think reading the first 2-3 chapters of Thomas Economon's dissertation will give you all the info you are looking for for the mathematical insights of the SU2 adjoint formulation.

Best,

Z
Zen is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 02:29.