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

Can SU2 do the inverse design?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 25, 2015, 01:07
Default Can SU2 do the inverse design?
  #1
New Member
 
Zhang Rui
Join Date: Oct 2014
Posts: 15
Rep Power: 12
gina07 is on a distinguished road
Hi,everyone!
Could you tell me if SU2 source code can do the inverse design now? If so, where should I provide the target pressure ? And which part in the configuration file and source code should I change?

Many thanks~
gina07 is offline   Reply With Quote

Old   March 5, 2015, 20:30
Default
  #2
Super Moderator
 
Francisco Palacios
Join Date: Jan 2013
Location: Long Beach, CA
Posts: 404
Rep Power: 15
fpalacios is on a distinguished road
Quote:
Originally Posted by gina07 View Post
Hi,everyone!
Could you tell me if SU2 source code can do the inverse design now? If so, where should I provide the target pressure ? And which part in the configuration file and source code should I change?

Many thanks~
There is a inverse design example in this folder:

https://github.com/su2code/TestCases...inverse_design

Best Regards,
Francisco Palacios
SU2 lead developer
fpalacios is offline   Reply With Quote

Old   March 8, 2016, 23:38
Default
  #3
New Member
 
Jason Shih
Join Date: Jan 2015
Location: Xi'an China
Posts: 26
Rep Power: 11
dasssj is on a distinguished road
I can't find inverse design example with RANS, and here are the messeage show when I tried to make a inverse design with RANS:

21 NIT FC OBJFUN GNORM
22 Traceback (most recent call last):
23 File "/vol-th/home/SSTworkgroup1/SSJ/SU2/bin/shape_optimization.py", line 154, in <module>
24 main()
25 File "/vol-th/home/SSTworkgroup1/SSJ/SU2/bin/shape_optimization.py", line 99, in main
26 options.quiet )
27 File "/vol-th/home/SSTworkgroup1/SSJ/SU2/bin/shape_optimization.py", line 137, in shape_optimization
28 SU2.opt.SLSQP(project,x0,xb,its,accu)
29 File "/vol-th/home/SSTworkgroup1/SSJ/SU2/bin/SU2/opt/scipy_tools.py", line 128, in scipy_slsqp
30 epsilon = eps )
31 File "/vol-th/home/SSTworkgroup1/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/scipy/optimize/slsqp.py", line 206, in fmin_slsqp
32 constraints=cons, **opts)
33 File "/vol-th/home/SSTworkgroup1/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/scipy/optimize/slsqp.py", line 360, in _minimize_slsqp
34 fx = func(x)
35 File "/vol-th/home/SSTworkgroup1/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/scipy/optimize/optimize.py", line 281, in function_wrapper
36 return function(*(wrapper_args + args))
37 File "/vol-th/home/SSTworkgroup1/SSJ/SU2/bin/SU2/opt/scipy_tools.py", line 144, in obj_f
38 obj = project.obj_f(x)
39 File "/vol-th/home/SSTworkgroup1/SSJ/SU2/bin/SU2/opt/project.py", line 213, in obj_f
40 return self._eval(konfig, func,dvs)
41 File "/vol-th/home/SSTworkgroup1/SSJ/SU2/bin/SU2/opt/project.py", line 182, in _eval
42 vals = design._eval(func,*args)
43 File "/vol-th/home/SSTworkgroup1/SSJ/SU2/bin/SU2/eval/design.py", line 142, in _eval
44 vals = eval_func(*inputs)
45 File "/vol-th/home/SSTworkgroup1/SSJ/SU2/bin/SU2/eval/design.py", line 240, in obj_f
46 func = su2func(this_obj,config,state)
47 File "/vol-th/home/SSTworkgroup1/SSJ/SU2/bin/SU2/eval/functions.py", line 104, in function
48 func_out = state['FUNCTIONS'][func_name]
49 KeyError: 'INVERSE_DESIGN_PRESSURE'

Is that mean the SU2 can not do inverse design with RANS now? The version is 4.0.2.

Best,
Jason Shih
dasssj is offline   Reply With Quote

Old   March 9, 2016, 03:32
Default
  #4
New Member
 
Jason Shih
Join Date: Jan 2015
Location: Xi'an China
Posts: 26
Rep Power: 11
dasssj is on a distinguished road
Sorry, guys.

I forgot to add these line to cfg file:

% --------------------- INVERSE DESIGN SIMULATION -----------------------------%
%
% Evaluate an inverse design problem using Cp (NO, YES)
INV_DESIGN_CP= YES
%
% Evaluate an inverse design problem using heat flux (NO, YES)
INV_DESIGN_HEATFLUX= NO

Best,
Jason
dasssj is offline   Reply With Quote

Old   July 12, 2022, 12:31
Exclamation
  #5
New Member
 
Abhijith
Join Date: Nov 2020
Location: United Kingdom
Posts: 19
Rep Power: 6
abhijithmoni is on a distinguished road
Quote:
Originally Posted by dasssj View Post
Sorry, guys.

I forgot to add these line to cfg file:

% --------------------- INVERSE DESIGN SIMULATION -----------------------------%
%
% Evaluate an inverse design problem using Cp (NO, YES)
INV_DESIGN_CP= YES
%
% Evaluate an inverse design problem using heat flux (NO, YES)
INV_DESIGN_HEATFLUX= NO

Best,
Jason

Hi,

Even after adding 'INV_DESIGN_CP= YES' to the config file, I get the following error. Please help me with this.






File "C:\SU2\bin\shape_optimization.py", line 183, in <module>
main()
File "C:\SU2\bin\shape_optimization.py", line 92, in main
shape_optimization( options.filename ,
File "C:\SU2\bin\shape_optimization.py", line 159, in shape_optimization
SU2.opt.SLSQP(project,x0,xb,its,accu)
File "C:\SU2\bin\SU2\opt\scipy_tools.py", line 120, in scipy_slsqp
outputs = fmin_slsqp( x0 = x0 ,
File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\slsqp.py", line 207, in fmin_slsqp
res = _minimize_slsqp(func, x0, args, jac=fprime, bounds=bounds,
File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\slsqp.py", line 375, in _minimize_slsqp
sf = _prepare_scalar_function(func, x, jac=jac, args=args, epsilon=eps,
File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\optimize.py", line 261, in _prepare_scalar_function
sf = ScalarFunction(fun, x0, args, grad, hess,
File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_differentiable_functions. py", line 140, in __init__
self._update_fun()
File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_differentiable_functions. py", line 233, in _update_fun
self._update_fun_impl()
File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_differentiable_functions. py", line 137, in update_fun
self.f = fun_wrapped(self.x)
File "C:\ProgramData\Anaconda3\lib\site-packages\scipy\optimize\_differentiable_functions. py", line 134, in fun_wrapped
return fun(np.copy(x), *args)
File "C:\SU2\bin\SU2\opt\scipy_tools.py", line 383, in obj_f
obj_list = project.obj_f(x)
File "C:\SU2\bin\SU2\opt\project.py", line 237, in obj_f
return self._eval(konfig, func,dvs)
File "C:\SU2\bin\SU2\opt\project.py", line 206, in _eval
vals = design._eval(func,*args)
File "C:\SU2\bin\SU2\eval\design.py", line 147, in _eval
vals = eval_func(*inputs)
File "C:\SU2\bin\SU2\eval\design.py", line 244, in obj_f
func += su2func(this_obj,config,state) * sign * scale * global_factor
File "C:\SU2\bin\SU2\eval\functions.py", line 118, in function
func_out = state['FUNCTIONS'][func_name]
KeyError: 'INVERSE_DESIGN_PRESSURE'


Thanks.
Abhijith
abhijithmoni 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
Inverse design with SU2 gina07 SU2 Shape Design 2 March 25, 2015 10:01
Welcome to the Stanford University Unstructured (SU2) forum! economon SU2 0 January 7, 2013 03:48
CFD inverse design chitharenjan Main CFD Forum 0 August 13, 2010 09:38
Inverse design and Optimization of Aircraft Wings Simon Nava Main CFD Forum 8 May 22, 2007 15:55
Info: Short Course On Thermal Design of Electronic Equipment Arnold Free Main CFD Forum 0 August 10, 1999 11:18


All times are GMT -4. The time now is 12:18.