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

thickness constraint error in unsteady optimization

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 18, 2022, 14:01
Default thickness constraint error in unsteady optimization
  #1
zjj
New Member
 
Jianjun Zhou
Join Date: Jul 2020
Posts: 5
Rep Power: 6
zjj is on a distinguished road
hello. i found when i deal with the unsteady shape optimization in naca0012 cases, the code can't run correctly with a thickness constraint. The message is shown as below.

Traceback (most recent call last):
File "/usr/local/bin/shape_optimization.py", line 183, in <module>
main()
File "/usr/local/bin/shape_optimization.py", line 92, in main
shape_optimization( options.filename ,
File "/usr/local/bin/shape_optimization.py", line 110, in shape_optimization
config = SU2.io.Config(filename)
File "/usr/local/bin/SU2/io/config.py", line 123, in __init__
tavg_keyGroup = "TAVG_" + historyOutFields[key_inner]["GROUP"]
KeyError: 'AIRFOIL_THICKNESS'


then i found the reason is that the 'if sentence' in below. thickness constraints is not in [historyOutFields]. who can tell me the reason ? thank you in advance!




if self.get("TIME_DOMAIN") == "YES":
objFuncsFields = self.get("OPT_OBJECTIVE")
histFields = self.get("HISTORY_OUTPUT")
diff_objective = self.get("OBJECTIVE_FUNCTION")
constrFuncFields = self.get("OPT_CONSTRAINT")

#OPT_OBJECTIVES
if bool (objFuncsFields):
for key in objFuncsFields:
tavg_keyGroup = "TAVG_" + historyOutFields[key]["GROUP"]
if not tavg_keyGroup in histFields:
histFields.append(tavg_keyGroup)

dtavg_keyGroup = "D_TAVG_" + historyOutFields[key]["GROUP"]
if not dtavg_keyGroup in histFields:
histFields.append(dtavg_keyGroup)

#OPT_CONSTRAINTS
if bool (constrFuncFields):
for key in constrFuncFields:
eqIneqConstrFunc = constrFuncFields.get(key)
for key_inner in eqIneqConstrFunc:
tavg_keyGroup = "TAVG_" + historyOutFields[key_inner]["GROUP"]
if not tavg_keyGroup in histFields:
histFields.append(tavg_keyGroup)
zjj is offline   Reply With Quote

Reply

Tags
shape optimization, thickness, unsteady flow

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
shape optimization for RAE2822 with constraint on area Mengmeng SU2 Shape Design 3 September 29, 2019 19:23
what are the scaling factors of Optimization objective and constraint functions ? mechy SU2 Shape Design 4 September 22, 2017 04:23
unsteady rans optimization of NACA64A010 hejiandong SU2 Shape Design 9 April 24, 2014 10:21
Anyone has realized optimization for unsteady flows? hejiandong SU2 Shape Design 3 November 29, 2013 02:44
COMSOL: optimization applied to a laminar flow tdh89 COMSOL 0 April 30, 2012 09:57


All times are GMT -4. The time now is 23:35.