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

Trouble in running discrete adjoint turbomachinery testcase

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

Like Tree1Likes
  • 1 Post By bigfootedrockmidget

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 14, 2024, 07:37
Question Trouble in running discrete adjoint turbomachinery testcase
  #1
New Member
 
Join Date: May 2024
Posts: 3
Rep Power: 2
Xikii is on a distinguished road
Nice to me you!

I'm totally beginer using SU2 for shape optimization, when I run the testcase 'disc_adj_turbomachinery/transonic_stator_2D returns: Exception: unknown function name, FLOW_ANGLE_OUT. Please check config_template.cfg for updated list of function names.

I look it up in github issue and discussion, and changed the OPT_OBJECTIVE to ENTROPY_GENERATION, then it returns: KeyError: 'ENTROPY_GENERATION'. The solution in github seems to be using FADO, but the tutorial is very hard for me, I wonder is there any more specific tutorial or guidence about FADO or is there any way that can run the testcases without using FADO.

I'm using SU2 8.0.1 and python 3.9.13 running in Windows Powershell.

It would be very greatful if you can offer some help! Thank you!
Xikii is offline   Reply With Quote

Old   May 16, 2024, 18:51
Default
  #2
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 670
Rep Power: 21
bigfootedrockmidget is on a distinguished road
What is the exact command that you are using? I could use SU2_CFD as well as SU2_CFD_AD with the testcase and they both run fine. So I guess you are using maybe the shape_optimization.py scripts?


Remember that all these scripts are just automating the optimization for you, they are still doing basically
SU2_DEF -> deforming the mesh, for instance with an FFD box

SU2_CFD -> computing CFD solution
SU2_CFD_AD -> computing adjoint solution
SU2_DOT_AD -> computing dot product
Now you have a bunch of sensitivities at e.g. the nodes of your FFD box. You can feed them to SU2_DEF to deform your mesh again.
Xikii likes this.
bigfootedrockmidget is offline   Reply With Quote

Old   May 17, 2024, 05:23
Smile
  #3
New Member
 
Join Date: May 2024
Posts: 3
Rep Power: 2
Xikii is on a distinguished road
Thanks very much for your reply!

Affirmative!I‘m using shape_optimization.py script, and I found that using FADO may solve this but its too hard for me, so I still have no progress by now.

In your means that I can manually run the SU2_DEF>SU2_CFD>SU2_CFD_AD>SU2_DOT_AD repeatly and evey time means finish a iteration right? And I should run SU2_CFD>SU2_CFD_AD>SU2_DOT_AD before first SU2_DEF right?

I had switch my work enviroment into linux which may help my work.

Apologize for my ignorance
THANKS AGAIN for your help!
Xikii is offline   Reply With Quote

Old   May 17, 2024, 08:44
Default
  #4
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 670
Rep Power: 21
bigfootedrockmidget is on a distinguished road
yes, in principle you can do a 'manual' optimization. But if you can get FADO to work that would be better. The FADO tutorial on the website is a good starting point.
bigfootedrockmidget is offline   Reply With Quote

Old   May 20, 2024, 03:26
Default
  #5
New Member
 
Join Date: May 2024
Posts: 3
Rep Power: 2
Xikii is on a distinguished road
Thanks for your reply!

I think I'd like to do it manually first to check the result and try the FADO later for futher learning.
Xikii is offline   Reply With Quote

Old   July 9, 2024, 10:08
Default
  #6
New Member
 
Tongtong
Join Date: Jan 2024
Posts: 24
Rep Power: 2
Tongtong1919 is on a distinguished road
Thank you Xikii and bigfootedrockmidget,

I have carefully read your conversation, and the content discussed is exactly what I am interested in. Following the process SU2_DEF > SU2_CFD > SU2_CFD_AD > SU2_DOT_AD, I finally obtained some results.



I offset (deformed) five control points (the deformation is quite exaggerated just to verify each step of the process), and the control points and grid are shown in the figure below.



Through the SU2_DOT_AD process, I finally obtained the SURFACE PRESSURE DROP gradient at the five control points. Literally, it seems to be a gradient (like df/dx, can anyone confirm if this is indeed the case?). Judging by the numerical values, the SURFACE PRESSURE DROP gradient seems more like the pressure drop itself (i.e., df), which confuses me a bit.


Assuming I have obtained the sensitivity of the objective function to the design variables, according to the common optimization framework, the next step should be to transmit these sensitivities to the optimization algorithm to obtain the next set of shape offsets (i.e., mesh updates), which is what bigfootedrockmidget mentioned as “Now you have a bunch of sensitivities at e.g. the nodes of your FFD box. You can feed them to SU2_DEF to deform your mesh again.” I don’t quite understand “feed them to SU2_DEF.” How is this step specifically implemented? Do you have any good suggestions?
Tongtong1919 is offline   Reply With Quote

Old   July 9, 2024, 11:49
Default
  #7
Senior Member
 
bigfoot
Join Date: Dec 2011
Location: Netherlands
Posts: 670
Rep Power: 21
bigfootedrockmidget is on a distinguished road
Hi Tongtong, SU2_DEF uses the keyword DV_VALUE to deform the mesh. So you copy the projected sensitivities coming from SU2_DOT_AD and give them as values to SU2_DEF.
bigfootedrockmidget is offline   Reply With Quote

Old   July 11, 2024, 22:47
Default
  #8
New Member
 
Tongtong
Join Date: Jan 2024
Posts: 24
Rep Power: 2
Tongtong1919 is on a distinguished road
Hello, bigfootedrockmidget,
Thank you for your response. I have been delayed in discussing this question due to some issues over the past few days. As you mentioned, running SU2_DOT_AD will yield the projected sensitivities result file. I believe that this result cannot be used directly as the input for SU2_DEF DV_VALUE. Instead, it should first go through the optimization algorithm, which will determine the geometric design variables. These variables will then be used as the input for DV_VALUE. Does this explanation sound more reasonable?
Tongtong1919 is offline   Reply With Quote

Reply

Tags
discrete adjoint, fado, shape optimization, turbo machinery

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
Fixed CL Mode and Discrete Adjoint Question Parth Kumar SU2 0 January 29, 2020 23:30
License trouble: ANSLIC_ADMIN, FLEXlm not running, but two lmgrd processes running! dancoz87 ANSYS 17 November 14, 2016 02:10
parallel error with cyclic BCs for pimpleDyMFoam and trouble in resuming running sunliming OpenFOAM Bugs 21 November 22, 2013 04:38
Statically Compiling OpenFOAM Issues herzfeldd OpenFOAM Installation 21 January 6, 2009 10:38
Kubuntu uses dash breaks All scripts in tutorials platopus OpenFOAM Bugs 8 April 15, 2008 08:52


All times are GMT -4. The time now is 01:57.