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

Wrong adjoint solution ONERA M6 euler test case

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 26, 2015, 13:50
Default Wrong adjoint solution ONERA M6 euler test case
  #1
New Member
 
Join Date: Nov 2014
Posts: 12
Rep Power: 12
JanH is on a distinguished road
Hello all,

I am using SU2 3.2.3 for my master thesis. However, I am experiencing some difficulties with regard to obtaining surface sensitivities.
In order to make sure I am running SU2 in the right way I went back to the test cases. I took the ONERA M6 euler optimization test case and compared my results with the reference results on the SU2 website. The direct flow solution I obtain is a match with the reference, but the adjoint solution is off and I cannot find why.. I am using the test case config file and mesh.

Any help is greatly appreciated.

I added the config file, the mesh, my adjoint solution, the convergence history and the adjoint plots (the reference plot and my solution) in the following dropbox link:
https://www.dropbox.com/sh/vnbfma5tp...NY4qu8zea?dl=0

Thanks in advance!

Last edited by JanH; February 27, 2015 at 03:54.
JanH is offline   Reply With Quote

Old   March 1, 2015, 18:34
Default
  #2
hlk
Senior Member
 
Heather Kline
Join Date: Jun 2013
Posts: 309
Rep Power: 14
hlk is on a distinguished road
Quote:
Originally Posted by JanH View Post
Hello all,

I am using SU2 3.2.3 for my master thesis. However, I am experiencing some difficulties with regard to obtaining surface sensitivities.
In order to make sure I am running SU2 in the right way I went back to the test cases. I took the ONERA M6 euler optimization test case and compared my results with the reference results on the SU2 website. The direct flow solution I obtain is a match with the reference, but the adjoint solution is off and I cannot find why.. I am using the test case config file and mesh.

Any help is greatly appreciated.

I added the config file, the mesh, my adjoint solution, the convergence history and the adjoint plots (the reference plot and my solution) in the following dropbox link:
https://www.dropbox.com/sh/vnbfma5tp...NY4qu8zea?dl=0

Thanks in advance!

Thank you for your question.
The first thing to try is to make sure that your testcases directory and su2 directory are updated to the master branch of the same SU2 version. Occasionally code changes require the settings to be tweaked, so if the versions do not match they are not guaranteed to work ideally. You will also want to check the convergence parameters - the test case may be set up to run only a few iterations and thus not be converged fully.

Since the optimization_euler/steady_oneram6 case is not included in the automatic regression tests, if the above does not work you may also try using the config file from cont_adj_euler/oneram6 (which IS included in the automated regression tests) with the modifications needed to do optimization. (But try the above first).
hlk is offline   Reply With Quote

Old   March 2, 2015, 05:19
Default
  #3
New Member
 
Join Date: Nov 2014
Posts: 12
Rep Power: 12
JanH is on a distinguished road
Quote:
Originally Posted by hlk View Post
Thank you for your question.
The first thing to try is to make sure that your testcases directory and su2 directory are updated to the master branch of the same SU2 version. Occasionally code changes require the settings to be tweaked, so if the versions do not match they are not guaranteed to work ideally. You will also want to check the convergence parameters - the test case may be set up to run only a few iterations and thus not be converged fully.

Since the optimization_euler/steady_oneram6 case is not included in the automatic regression tests, if the above does not work you may also try using the config file from cont_adj_euler/oneram6 (which IS included in the automated regression tests) with the modifications needed to do optimization. (But try the above first).
Hi hlk,

thank you for your reply and help. I installed SU2v3.2.8 (I redirected the pythonpath to the new version and I ran "make clean" to be sure I removed all links to the old version) and I used the latest optimization_euler/steady_oneram6 test case (also v3.2.8).

The flow solution is again a perfect match but the adjoint solution is still off. (I let it converge until 1000 iter). This time the .vtk plot of the adjoint solution gives extreme surface sensitivities of <-50 and >10, and the .csv gives approximately the same surface sensitivities as when I ran the ONERMA M6 adjoint solver using SU2v3.2.3 (The difference between the .vtk and .csv files given by v3.2.8 is also very strange to me)

Afterwards I ran the cont_adj_euler/oneram6test case and it resulted in the same results as I described above.

I added the cont_adj_euler/oneram6 output files in the following dropbox link:
https://www.dropbox.com/sh/2qmljtdq1...pR3LNTyCa?dl=0

Thanks again,

JanH
JanH is offline   Reply With Quote

Old   March 2, 2015, 14:44
Default
  #4
hlk
Senior Member
 
Heather Kline
Join Date: Jun 2013
Posts: 309
Rep Power: 14
hlk is on a distinguished road
Quote:
Originally Posted by JanH View Post
Hi hlk,

thank you for your reply and help. I installed SU2v3.2.8 (I redirected the pythonpath to the new version and I ran "make clean" to be sure I removed all links to the old version) and I used the latest optimization_euler/steady_oneram6 test case (also v3.2.8).

The flow solution is again a perfect match but the adjoint solution is still off. (I let it converge until 1000 iter). This time the .vtk plot of the adjoint solution gives extreme surface sensitivities of <-50 and >10, and the .csv gives approximately the same surface sensitivities as when I ran the ONERMA M6 adjoint solver using SU2v3.2.3 (The difference between the .vtk and .csv files given by v3.2.8 is also very strange to me)

Afterwards I ran the cont_adj_euler/oneram6test case and it resulted in the same results as I described above.

I added the cont_adj_euler/oneram6 output files in the following dropbox link:
https://www.dropbox.com/sh/2qmljtdq1...pR3LNTyCa?dl=0

Thanks again,

JanH
Ok, this is most likely the problem:
A few months ago, for visualization only, the output sensitivities were changed to be the change in objective function per meter - which explains why the magnitudes are so different. This should not effect the optimization, it just means that we forgot to update the picture.
For your optimization, I recommend increasing the number of iterations (more than 1000 - you should set it high enough that it exits due to reaching the min residual bound), and adjusting the optimization settings such as the objective function scale. The first of these will help make sure that the solution converges, and the second will help make sure that the first few optimization steps do not take too large of a step.
If you are using RESTART_SOL=YES you might also consider changing it to "no" - this will require more iterations per solution but ensure that you are converging a solution for the deformed geometry (especially if the geometry changes by a large amount).
hlk is offline   Reply With Quote

Old   March 5, 2015, 05:03
Default
  #5
New Member
 
Join Date: Nov 2014
Posts: 12
Rep Power: 12
JanH is on a distinguished road
I tried running the adjoint solver all night, it did 49000 iter and converged to a residual [Psi_Rho] of -5.273990. Is it useful to run it for an ever longer time? Maybe with a change in CFL coefficient to increase the convergence rate?

Is there a way I can verify the .csv file I obtained using my last run with a reference solution?
JanH is offline   Reply With Quote

Old   March 5, 2015, 05:08
Default
  #6
hlk
Senior Member
 
Heather Kline
Join Date: Jun 2013
Posts: 309
Rep Power: 14
hlk is on a distinguished road
Quote:
Originally Posted by JanH View Post
I tried running the adjoint solver all night, it did 49000 iter and converged to a residual [Psi_Rho] of -5.273990. Is it useful to run it for an ever longer time? Maybe with a change in CFL coefficient to increase the convergence rate?

Is there a way I can verify the .csv file I obtained using my last run with a reference solution?
That's probably fine, depending on how accurate you need it to be.
For more examples of running CFD and convergence parameters, please go through the tutorials available on github.
https://github.com/su2code/SU2/wiki
hlk is offline   Reply With Quote

Old   March 6, 2015, 12:58
Default
  #7
New Member
 
Join Date: Nov 2014
Posts: 12
Rep Power: 12
JanH is on a distinguished road
I tested the last gained surface sensitivities by using SU2_DOT to get the sensitivity of lift w.r.t. the z-motion of one FFD control point. I checked if it corresponds to the sensitivity gained by finite differencing of that same control point. The solution is plotted in the attached file and is off by around 25%. When I let the adjoint solution run for 500 i.s.o 49000 iter the sensitivity is off with around 28%. This makes me think that running the adjoint solution for an even longer time will not help. It seems to be converging to an incorrect solution.

The FFD box I used and the control point I displaced are visible in the other file I attached (I displaced FFD control point x_index=1, y_index=1, z_index=2, hence the middle upper one).

Are there more settings I can change to make the adjoint solution converge to the correct solution?
Attached Images
File Type: png plot_ONERA M6_ dcL_dZ.png (14.1 KB, 23 views)
File Type: jpg plot_ONERA M6_FFD box.jpg (10.1 KB, 21 views)
JanH 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[DesignModeler] DesignModeler Scripting: How to get Full Command Access ANT ANSYS Meshing & Geometry 53 February 16, 2020 16:13
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 15:53
[stressAnalysis] Problems with simple test case matthiass OpenFOAM CC Toolkits for Fluid-Structure Interaction 19 April 20, 2012 13:44
Interfoam Droplet under shear test case adona058 OpenFOAM Running, Solving & CFD 3 May 3, 2010 19:46
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 03:58


All times are GMT -4. The time now is 15:09.