CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   SU2 Installation (http://www.cfd-online.com/Forums/su2-installation/)
-   -   problem with running shape_optimization modul (http://www.cfd-online.com/Forums/su2-installation/125936-problem-running-shape_optimization-modul.html)

Edris November 4, 2013 12:20

problem with running shape_optimization modul
 
Hi every one.
I was trying to run one of the test-cases of shape optimization but I don't understand why when I used "shape_optimization.py module" the following errors appeared.


G:\naca0012>shape_optimization.py -f rot_NACA0012.cfg


-------------------------------------------------------------------------
| SU2 Suite (Shape Optimization Script) |
-------------------------------------------------------------------------


DRAG objective function with a scale factor of 1.0

NIT FC OBJFUN GNORM
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
File "C:\Program Files\Stanford ADL\SU2\bin\shape_optimization.py", line 678,
in <module>
acc=1e-12, iprint=2, full_output=1, epsilon=1.0e-10)
File "C:\Python27\lib\site-packages\scipy\optimize\slsqp.py", line 198, in fmi
n_slsqp
constraints=cons, **opts)
File "C:\Python27\lib\site-packages\scipy\optimize\slsqp.py", line 354, in _mi
nimize_slsqp
fx = func(x)
File "C:\Python27\lib\site-packages\scipy\optimize\optimize.py", line 261, in
function_wrapper
return function(x, *args)
File "C:\Program Files\Stanford ADL\SU2\bin\shape_optimization.py", line 246,
in f
logfile = 'SU2_CFD.out' )
File "C:\Program Files\Stanford ADL\SU2\bin\continuous_adjoint.py", line 205,
in continuous_adjoint
ObjFun_Dict = libSU2.get_ObjFunVals( History_filename_CFD+plotfile_ext , spe
cial_cases )
File "C:\Program Files\Stanford ADL\SU2\bin\libSU2.py", line 495, in get_ObjFu
nVals
history_data = read_History(History_filename)
File "C:\Program Files\Stanford ADL\SU2\bin\libSU2.py", line 404, in read_Hist
ory
history_file = open(History_filename)
IOError: [Errno 2] No such file or directory: 'history_opt_rot_NACA0012_cfd.plt'

How can I fix this problem?
please help me.
THANKs.

rktchip November 5, 2013 19:34

It looks like you are running this in windows, and SU2 is installed under Program Files. The command line call to the SU2 solver is failing because there is a space in the file path (Program Files). Try installing SU2 in a filepath with no spaces.
- Trent

Edris November 8, 2013 11:36

Quote:

Originally Posted by rktchip (Post 460752)
It looks like you are running this in windows, and SU2 is installed under Program Files. The command line call to the SU2 solver is failing because there is a space in the file path (Program Files). Try installing SU2 in a filepath with no spaces.
- Trent

Hi Trent.
Thank you. After installing SU2 in another location, It did worked, but I faced another errors.
First of all two warnings appeared at the beginning of the program, and after that the magnitude of res(Rho) started to increase (Is this increase of res(Rho) rational?). and after 327 iterations another errors appeared and the program stopped.

Please help me.
Thank you.

------------------------- Exit Success (SU2_MDC) ------------------------

WARNING: unrecognized option in the config. file: MG_RESTART_CYCLE.
WARNING: unrecognized option in the config. file: GRID_DEFORM_SOLVER.


-------------------------------------------------------------------------
| SU2 Suite (Computational Fluid Dynamics Code) |
-------------------------------------------------------------------------
.
.
.

------------------------------ Begin solver -----------------------------

Iter Time(s) Res[Rho] Res[RhoE] CLift(Total) CDrag(Total)
1 0.265500 -0.917870 4.515178 0.000003 0.000037
2 0.271000 -0.452282 4.977257 -0.000001 0.000028
3 0.273500 -0.353749 5.108401 -0.000003 0.000029
4 0.272000 -0.232687 5.215336 -0.000004 0.000028
.
.
.
.

325 0.264552 -5.266695 0.215158 -0.000020 0.000002
326 0.264413 -5.288482 0.192382 -0.000020 0.000002
327 0.264320 -5.312114 0.167788 -0.000020 0.000002

------------------------- Exit Success (SU2_CFD) ------------------------

Traceback (most recent call last):
File "C:\SU2\bin\shape_optimization.py", line 678, in <module>
acc=1e-12, iprint=2, full_output=1, epsilon=1.0e-10)
File "C:\Python27\lib\site-packages\scipy\optimize\slsqp.py", line 198, in fmi
n_slsqp
constraints=cons, **opts)
File "C:\Python27\lib\site-packages\scipy\optimize\slsqp.py", line 354, in _mi
nimize_slsqp
fx = func(x)
File "C:\Python27\lib\site-packages\scipy\optimize\optimize.py", line 261, in
function_wrapper
return function(x, *args)
File "C:\SU2\bin\shape_optimization.py", line 256, in f
rename_data()
File "C:\SU2\bin\shape_optimization.py", line 613, in rename_data
add_tecplot_iter( output_names[key][1] , counter )
File "C:\SU2\bin\shape_optimization.py", line 638, in add_tecplot_iter
os.rename("temp_file.plt",filename)
WindowsError: [Error 183] Cannot create a file when that file already exists

rktchip February 12, 2014 14:52

You can ignore the warnings, they are referring to extra config options that the C++ side doesn't know about. Your log shows that the solution converged (it is reporting an exponent of 10 - i.e 10^-5.3 - so you want to see the residuals go to larger negative numbers)

The python error is a bit strange, it looks windows is having trouble renaming a file. Could you try deleting the DESIGNS folder, and any .plt files in your working directory for this problem, and try again? If you still get an error, please post the full log, and your version of windows and python.

- trent


All times are GMT -4. The time now is 07:51.