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

Transition between Direct and Adjoint

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 13, 2015, 09:21
Default Transition between Direct and Adjoint
  #1
New Member
 
Ross
Join Date: Oct 2012
Posts: 8
Rep Power: 13
RonSwanson is on a distinguished road
I am using version 3.2.9 and there is an issue transferring between the direct flow solver and the adjoint.

My understanding of the process is as follows:
-Run Direct and converge solution
-Save restart file
-Start adjoint solver
-Open restart and read restart
-Run a single iteration and temporarily store data, printing residuals to screen *****
-Run adjoint and converge

My solution will converge log10 to -6 in the flow solver. However upon entering the adjoint the residual at stage **** is 10^-2.5 and subsequently my adjoint performs poorly.

I have looked at the iteration_structure.cpp file to try and force the solver to do for example 10000 iterations in place of one with the intention to return to 10^-6. To see if this is the root cause of my poor adjoint performance. However my lack of programming skills is limiting.

Is there something I am doing incorrectly? or is there a reasonably simple way to implement what I previously suggest? This occurs with both the continuous_adjoint.py script and manually.

Regards,
Ross
RonSwanson is offline   Reply With Quote

Old   May 19, 2015, 17:34
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,

Can you please clarify whether this is the direct residual in both instances, i.e., is the direct residual jumping from 10^-6 to 10^-2.5 after the single iteration of the direct solver?

Can you please provide a case that causes this issue, so that we can recreate it to check for a problem?

Thanks!
Tom
economon is offline   Reply With Quote

Old   May 21, 2015, 09:57
Default
  #3
New Member
 
Ross
Join Date: Oct 2012
Posts: 8
Rep Power: 13
RonSwanson is on a distinguished road
Tom,

Thanks for getting back to me. I am referring to the direct residual only when discussing iterations above.

The 10^6 appears every 40 iteration in the terminal when executing SU2_CFD in direct flow solving mode. The Direct residual 10^-2.5 appears in location XXXX, which I take from the introductory data print in terminal when the adjoint is executed and initialising:

------------------------------ Begin Solver -----------------------------
Begin direct solver to store flow data (single iteration).
Compute residuals to check the convergence of the direct problem.
log10[Maximum residual]: -XXXX, located at point 6437.
End direct solver, begin adjoint problem.


Maybe I have misunderstood the software but the problem almost certainly lies in my choice of turbulence model. A quick summary is SST causes a jump, SA doesn't. The single iteration at adjoint initialization is likely performed with SA each time.

I'm running an external aerodynamics problem, our preferred turbulence model is SST and this is what I use to solve flow, this works and provides good agreement with experimental data and almost identical results with a commercial CFD package. When transferring to adjoint I see a residual jump in XXXX, from 10^-6 to 10^-2.5.

However if I run the problem with Spal-Al I see a minimal change in the Direct residual between the direct flow solver and when printed in the adjoint at XXXX. Unfortunately I still see poor performance in the adjoint, so I'll continue to work at this.


I won't be able to provide a mesh of my problem unfortunately. However using the Flat plate RANS testcase, I did the following.

-Ran both SST and SA for direct flow solving to 1000 iterations, recorded last direct residual printed in both.

-Ran the adjoint for both seperately, SA produced no jump, SST produces jump at XXXX

-So I then restarted the SST case in the direct solver, but changed the turbulence model to SA. The direct residual print here in the direct solver upon restart is identical to XXXX when running SST in adjoint.


So it would appear in the initial single iteration ran in the adjoint it defaults to SA, this maybe intentional or not but the overall consequence was negligible. I assumed as I was using frozen viscosity in the adjoint my choice of turbulence model was mostly irrelevant.


Cheers,
Ross
RonSwanson is offline   Reply With Quote

Old   April 27, 2017, 05:58
Default
  #4
New Member
 
Mary Claire
Join Date: Mar 2015
Posts: 9
Rep Power: 11
Silver Silhouette is on a distinguished road
Hello

I am currently running an airfoil optimization case using adjoint solver.
What I do is iteratively run the flow solver and adjoint solver without initializing. Is this correct?
Also after a certain number of iterations the adjoint solver or the flow solver doesn;t seem to converge. Initially i try to bring down the under relaxation factor. This converges the case up to a few more iterations then starts diverging again. However the mesh doesnt seem to have failed or there doesn't seem to a flow separation. Can i drive my solution to convergence using any other methods??
Or since it is an optimization problem should i stop when the solution diverges?
Silver Silhouette is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
SU2 AOA optimization 454514566@qq.com SU2 9 March 7, 2022 17:17
wrong SU2 calculation for lift and drag coefficient for NAC4421 mechy SU2 7 January 9, 2017 06:18
Wrong adjoint solution ONERA M6 euler test case JanH SU2 6 March 6, 2015 12:58
best setting for SU2 mechy SU2 3 April 20, 2014 20:13
Adjoint simulation samiam1000 SU2 Shape Design 2 March 20, 2013 12:03


All times are GMT -4. The time now is 04:27.