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

problem in shape optimization test

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2014, 23:48
Smile problem in shape optimization test
  #1
New Member
 
Yibin Dou
Join Date: Dec 2009
Posts: 13
Rep Power: 17
adam_annie is on a distinguished road
hello

I also have problem in runing shape_optimization(tutorial 7 in su2 website). I install the SU2-3.0.000-32-bit-Single-threaded.exe, python 2.6.6,scipy 0.11.0 and numpy 1.6.2 with windows 7 os.

When I tried to run the test case of rotating airfoil at command prompt:

python "D:\Program Files\SU2\shape_optimization.py" -f rot_NACA0012.cfg

Follwing error displayed:

found: mesh_NACA0012_rot.su2
New Project: ./
Warning, removing old designs... now
New Design: DESIGNS/DSN_001
./DESIGNS/DSN_001
./DESIGNS/DSN_001
NIT FC OBJFUN GNORM
./DESIGNS/DSN_001
Evaluate Objectives
Drag... Traceback (most recent call last):
File "D:\Program Files\SU2\shape_optimization.py", line 124, in <module>
main()
File "D:\Program Files\SU2\shape_optimization.py", line 69, in main
options.step )
File "D:\Program Files\SU2\shape_optimization.py", line 107, in shape_optimization
SU2.opt.SLSQP(project,x0,xb,its)
File "D:\Program Files\SU2\SU2\opt\scipy_tools.py", line 102, in scipy_slsqp
epsilon = 1.0e-06 )
File "D:\Python26\lib\site-packages\scipy\optimize\slsqp.py", line 196, in fmi
n_slsqp
constraints=cons, **opts)
File "D:\Python26\lib\site-packages\scipy\optimize\slsqp.py", line 351, in _mi
nimize_slsqp
fx = func(x)
File "D:\Python26\lib\site-packages\scipy\optimize\optimize.py", line 268, in
function_wrapper
return function(x, *args)
File "D:\Program Files\SU2\SU2\opt\scipy_tools.py", line 120, in obj_f
obj = project.obj_f(x)
File "D:\Program Files\SU2\SU2\opt\project.py", line 203, in obj_f
return self._eval(konfig, func,dvs)
File "D:\Program Files\SU2\SU2\opt\project.py", line 172, in _eval
vals = design._eval(func,*args)
File "D:\Program Files\SU2\SU2\eval\design.py", line 132, in _eval
vals = eval_func(*inputs)
File "D:\Program Files\SU2\SU2\eval\design.py", line 230, in obj_f
func = su2func(this_obj,config,state)
File "D:\Program Files\SU2\SU2\eval\functions.py", line 75, in function
aerodynamics( config, state )
File "D:\Program Files\SU2\SU2\eval\functions.py", line 200, in aerodynamics
info = su2run.direct(config)
File "D:\Program Files\SU2\SU2\run\direct.py", line 75, in direct
SU2_CFD(konfig)
File "D:\Program Files\SU2\SU2\run\interface.py", line 92, in CFD
the_Command = build_command( the_Command , processes )
File "D:\Program Files\SU2\SU2\run\interface.py", line 255, in build_command
raise RuntimeError , 'could not find an mpi interface'
RuntimeError: could not find an mpi interface
E:\su2\case\naca0012>

///////////////////////////////////////////////////////////////////////////////
if I use following command
python "D:\Program Files\SU2\shape_optimization.py" f rot_NACA0012.cfg
Follwing error displayed:

Traceback (most recent call last):
File "D:\Program Files\SU2\shape_optimization.py", line 124, in <module>
main()
File "D:\Program Files\SU2\shape_optimization.py", line 69, in main
options.step )
File "D:\Program Files\SU2\shape_optimization.py", line 85, in shape_optimization
config = SU2.io.Config(filename)
File "D:\Program Files\SU2\SU2\io\config.py", line 84, in __init__
super(Config,self).__init__(*args,**kwarg)
File "D:\Program Files\SU2\SU2\util\ordered_bunch.py", line 83, in __init__
super(OrderedBunch,self).__init__(*args,**kwarg)
File "D:\Program Files\SU2\SU2\util\ordered_dict.py", line 44, in __init__
self.__update(*args, **kwds)
File "D:\Program Files\SU2\SU2\util\ordered_dict.py", line 170, in update
for key, value in other:
TypeError: 'NoneType' object is not iterable

I have set PYTHONPATH enviroment variable including "D:\Program Files\SU2"; can you give me some help?

Best wish
adam_annie is offline   Reply With Quote

Old   February 15, 2014, 23:50
Default problem in shape optimization test
  #2
New Member
 
Yibin Dou
Join Date: Dec 2009
Posts: 13
Rep Power: 17
adam_annie is on a distinguished road
hello

I also have problem in runing shape_optimization(tutorial 7 in su2 website). I install the SU2-3.0.000-32-bit-Single-threaded.exe, python 2.6.6,scipy 0.11.0 and numpy 1.6.2 with windows 7 os.

When I tried to run the test case of rotating airfoil at command prompt:

python "D:\Program Files\SU2\shape_optimization.py" -f rot_NACA0012.cfg

Follwing error displayed:

found: mesh_NACA0012_rot.su2
New Project: ./
Warning, removing old designs... now
New Design: DESIGNS/DSN_001
./DESIGNS/DSN_001
./DESIGNS/DSN_001
NIT FC OBJFUN GNORM
./DESIGNS/DSN_001
Evaluate Objectives
Drag... Traceback (most recent call last):
File "D:\Program Files\SU2\shape_optimization.py", line 124, in <module>
main()
File "D:\Program Files\SU2\shape_optimization.py", line 69, in main
options.step )
File "D:\Program Files\SU2\shape_optimization.py", line 107, in shape_optimization
SU2.opt.SLSQP(project,x0,xb,its)
File "D:\Program Files\SU2\SU2\opt\scipy_tools.py", line 102, in scipy_slsqp
epsilon = 1.0e-06 )
File "D:\Python26\lib\site-packages\scipy\optimize\slsqp.py", line 196, in fmi
n_slsqp
constraints=cons, **opts)
File "D:\Python26\lib\site-packages\scipy\optimize\slsqp.py", line 351, in _mi
nimize_slsqp
fx = func(x)
File "D:\Python26\lib\site-packages\scipy\optimize\optimize.py", line 268, in
function_wrapper
return function(x, *args)
File "D:\Program Files\SU2\SU2\opt\scipy_tools.py", line 120, in obj_f
obj = project.obj_f(x)
File "D:\Program Files\SU2\SU2\opt\project.py", line 203, in obj_f
return self._eval(konfig, func,dvs)
File "D:\Program Files\SU2\SU2\opt\project.py", line 172, in _eval
vals = design._eval(func,*args)
File "D:\Program Files\SU2\SU2\eval\design.py", line 132, in _eval
vals = eval_func(*inputs)
File "D:\Program Files\SU2\SU2\eval\design.py", line 230, in obj_f
func = su2func(this_obj,config,state)
File "D:\Program Files\SU2\SU2\eval\functions.py", line 75, in function
aerodynamics( config, state )
File "D:\Program Files\SU2\SU2\eval\functions.py", line 200, in aerodynamics
info = su2run.direct(config)
File "D:\Program Files\SU2\SU2\run\direct.py", line 75, in direct
SU2_CFD(konfig)
File "D:\Program Files\SU2\SU2\run\interface.py", line 92, in CFD
the_Command = build_command( the_Command , processes )
File "D:\Program Files\SU2\SU2\run\interface.py", line 255, in build_command
raise RuntimeError , 'could not find an mpi interface'
RuntimeError: could not find an mpi interface
E:\su2\case\naca0012>

///////////////////////////////////////////////////////////////////////////////
if I use following command
python "D:\Program Files\SU2\shape_optimization.py" f rot_NACA0012.cfg
Follwing error displayed:

Traceback (most recent call last):
File "D:\Program Files\SU2\shape_optimization.py", line 124, in <module>
main()
File "D:\Program Files\SU2\shape_optimization.py", line 69, in main
options.step )
File "D:\Program Files\SU2\shape_optimization.py", line 85, in shape_optimization
config = SU2.io.Config(filename)
File "D:\Program Files\SU2\SU2\io\config.py", line 84, in __init__
super(Config,self).__init__(*args,**kwarg)
File "D:\Program Files\SU2\SU2\util\ordered_bunch.py", line 83, in __init__
super(OrderedBunch,self).__init__(*args,**kwarg)
File "D:\Program Files\SU2\SU2\util\ordered_dict.py", line 44, in __init__
self.__update(*args, **kwds)
File "D:\Program Files\SU2\SU2\util\ordered_dict.py", line 170, in update
for key, value in other:
TypeError: 'NoneType' object is not iterable

I have set PYTHONPATH enviroment variable including "D:\Program Files\SU2"; can you give me some help?

Best wish
adam_annie is offline   Reply With Quote

Old   February 16, 2014, 17:36
Default
  #3
Member
 
Trent Lukaczyk
Join Date: Feb 2011
Location: Stanford, CA
Posts: 75
Rep Power: 15
rktchip is on a distinguished road
Hi Yibin,

Shape optimization defaults to a 1-processor mpi call, which is why you are getting that error message. Please add the option -p 0 to your command call, to run this command in serial mode.

Best,
- rkchip
rktchip is offline   Reply With Quote

Old   February 18, 2014, 09:07
Default
  #4
New Member
 
Yibin Dou
Join Date: Dec 2009
Posts: 13
Rep Power: 17
adam_annie is on a distinguished road
hi rkchip

Thanks for your help. Following your suggestion and I reinstall the su2 in C:\SU2 path, then everything is ok!

thank you

best wish

Quote:
Originally Posted by rktchip View Post
Hi Yibin,

Shape optimization defaults to a 1-processor mpi call, which is why you are getting that error message. Please add the option -p 0 to your command call, to run this command in serial mode.

Best,
- rkchip
adam_annie is offline   Reply With Quote

Old   April 15, 2014, 04:27
Default
  #5
New Member
 
Khiem Pham
Join Date: Nov 2013
Posts: 23
Rep Power: 13
Bachduong is on a distinguished road
Dear sirs
I also have problem while trying to run shape_optimization.py (tutorial 7 in test case). I install SU2-3.0.000-64-bit-parallel-threaded.exe, python 2.7.6, scipy 0.13.0-py27 and numpy MKL 1.8 –py27
I set my SU2_HOME=C:\SU2;SU2_RUN=C:\SU2;C:\SU2\SU2;PYTHONPA TH=C:\SU2;
I also add C:\SU2 in path environment.
What is wrong?

Thanks for your answers.
su2.jpg

su22.jpg
Attached Images
File Type: jpg su2a.JPG (82.8 KB, 29 views)

Last edited by Bachduong; April 20, 2014 at 04:34.
Bachduong is offline   Reply With Quote

Old   April 23, 2014, 15:32
Default
  #6
New Member
 
Marco C.
Join Date: Nov 2013
Posts: 4
Rep Power: 13
Tsiolkovsky is on a distinguished road
I have the same problem, but since I am a complete novice in python I haven't been able to understand the reason.

I'm trying to run the rotating NACA 0012 tutorial and I'm getting this error:

TypeError: 'NoneType' object is not iterable

Thanks in advance for your help!
Tsiolkovsky is offline   Reply With Quote

Old   May 3, 2014, 01:41
Default add -p 0, still error
  #7
New Member
 
WangJianliang
Join Date: Aug 2010
Posts: 4
Rep Power: 16
wangjl is on a distinguished road
C:\work\su2\naca0012>shape_optimization.py f rot_NACA0012.cfg -p 0

Traceback (most recent call last):
File "D:\SU2\shape_optimization.py", line 124, in <module>
main()
File "D:\SU2\shape_optimization.py", line 69, in main
options.step )
File "D:\SU2\shape_optimization.py", line 85, in shape_optimization
config = SU2.io.Config(filename)
File "D:\SU2\SU2\io\config.py", line 84, in __init__
super(Config,self).__init__(*args,**kwarg)
File "D:\SU2\SU2\util\ordered_bunch.py", line 83, in __init__
super(OrderedBunch,self).__init__(*args,**kwarg)
File "D:\SU2\SU2\util\ordered_dict.py", line 44, in __init__
self.__update(*args, **kwds)
File "D:\SU2\SU2\util\ordered_dict.py", line 170, in update
for key, value in other:
TypeError: 'NoneType' object is not iterable


Quote:
Originally Posted by rktchip View Post
Hi Yibin,

Shape optimization defaults to a 1-processor mpi call, which is why you are getting that error message. Please add the option -p 0 to your command call, to run this command in serial mode.

Best,
- rkchip
wangjl is offline   Reply With Quote

Old   May 7, 2014, 04:08
Default
  #8
New Member
 
Khiem Pham
Join Date: Nov 2013
Posts: 23
Rep Power: 13
Bachduong is on a distinguished road
Quote:
Originally Posted by wangjl View Post
C:\work\su2\naca0012>shape_optimization.py f rot_NACA0012.cfg -p 0

Traceback (most recent call last):
File "D:\SU2\shape_optimization.py", line 124, in <module>
main()
File "D:\SU2\shape_optimization.py", line 69, in main
options.step )
File "D:\SU2\shape_optimization.py", line 85, in shape_optimization
config = SU2.io.Config(filename)
File "D:\SU2\SU2\io\config.py", line 84, in __init__
super(Config,self).__init__(*args,**kwarg)
File "D:\SU2\SU2\util\ordered_bunch.py", line 83, in __init__
super(OrderedBunch,self).__init__(*args,**kwarg)
File "D:\SU2\SU2\util\ordered_dict.py", line 44, in __init__
self.__update(*args, **kwds)
File "D:\SU2\SU2\util\ordered_dict.py", line 170, in update
for key, value in other:
TypeError: 'NoneType' object is not iterable
Hi
You need write
C:\work\su2\naca0012>shape_optimization.py -f rot_NACA0012.cfg -p 0
rather than
C:\work\su2\naca0012>shape_optimization.py f rot_NACA0012.cfg -p 0
Bachduong is offline   Reply With Quote

Old   May 7, 2014, 04:32
Thumbs up yes you are right
  #9
New Member
 
Wang Jianliang
Join Date: Jul 2012
Posts: 1
Rep Power: 0
alljoyland is on a distinguished road
Thank you very much, the tutorial manual was error miss the "-" before the f
and if is on windows, earlier version python have the NodeType error, should to change the __ini__ file

Thanks

Quote:
Originally Posted by Bachduong View Post
Hi
You need write
C:\work\su2\naca0012>shape_optimization.py -f rot_NACA0012.cfg -p 0
rather than
C:\work\su2\naca0012>shape_optimization.py f rot_NACA0012.cfg -p 0
alljoyland is offline   Reply With Quote

Old   June 5, 2014, 15:56
Default
  #10
Member
 
Trent Lukaczyk
Join Date: Feb 2011
Location: Stanford, CA
Posts: 75
Rep Power: 15
rktchip is on a distinguished road
Thanks everyone, we fixed the tutorial
rktchip is offline   Reply With Quote

Old   October 14, 2014, 19:41
Default
  #11
Member
 
Join Date: May 2013
Posts: 61
Rep Power: 13
novedevon is on a distinguished road
I had the same problem with the inv_oneram6_adv.cfg (Optimized_euler/steady_oneram6). I noted that you said you fixed the tutorial and wanted to make sure that this one also got fixed.
novedevon 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
Test case for rans optimization? hejiandong SU2 Shape Design 6 March 3, 2014 22:06
Multiple FFD box definition for shape optimization study diwakaranant SU2 1 November 5, 2013 18:46
Error in optimization of the RAE2822 airfoil with the mesh in the test case Tommy Chen SU2 Shape Design 26 May 30, 2013 06:37
Problem with plasma test case: residuals are NAN rafpepe SU2 2 January 20, 2013 10:37
SQP method for adjoint based aerodynamic shape optimization cfdbooks Main CFD Forum 2 May 26, 2009 11:40


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