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

Shape optimization not working

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 27, 2020, 13:51
Default Shape optimization not working
  #1
New Member
 
Michalis Hadjiandreou
Join Date: Feb 2020
Posts: 3
Rep Power: 6
michalish is on a distinguished road
Dear Community,


I have managed to build and compile the source code enabling:
  1. autodiff
  2. directdiff
  3. pywrapper
as well as the default ones. During the meson build there were no warnings. Additionally, the environment variables were set as required on the installation page.


When I try to run the design features tutorial 1(https://su2code.github.io/tutorials/...ined_NACA0012/ ) apart from the fact that I have to manually specify the location of shape_optimization.py, the code does not work.



Running
Code:
$ python3 $SU2_RUN/shape_optimization.py -g CONTINUOUS_ADJOINT -o SLSQP -f inv_NACA0012_basic.cfg
in the corresponding tutorial folder the output I get is shown below:


Quote:
Found: mesh_NACA0012_inv.su2 Found: solution_flow.dat Found: solution_adj_cd.dat New Project: ./ Removing old designs in 10s. Done! Sequential Least SQuares Programming (SLSQP) parameters: Number of design variables: 38 ( 38 ) Objective function scaling factor: [1.0] Maximum number of iterations: 100 Requested accuracy: 1e-16 Initial guess for the independent variable(s): [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] Lower and upper bound for each independent variable: [(-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001), (-0.0001, 0.0001)] NIT FC OBJFUN GNORM Traceback (most recent call last): File "/usr/local/bin/shape_optimization.py", line 176, in <module> main() File "/usr/local/bin/shape_optimization.py", line 108, in main options.nzones ) File "/usr/local/bin/shape_optimization.py", line 152, in shape_optimization SU2.opt.SLSQP(project,x0,xb,its,accu) File "/usr/local/bin/SU2/opt/scipy_tools.py", line 133, in scipy_slsqp epsilon = eps ) File "/usr/lib/python3/dist-packages/scipy/optimize/slsqp.py", line 208, in fmin_slsqp constraints=cons, **opts) File "/usr/lib/python3/dist-packages/scipy/optimize/slsqp.py", line 403, in _minimize_slsqp g = append(fprime(x), 0.0) File "/usr/lib/python3/dist-packages/scipy/optimize/optimize.py", line 293, in function_wrapper return function(*(wrapper_args + args)) File "/usr/local/bin/SU2/opt/scipy_tools.py", line 400, in obj_df dobj_list = project.obj_df(x) File "/usr/local/bin/SU2/opt/project.py", line 238, in obj_df return self._eval(konfig, func,dvs) File "/usr/local/bin/SU2/opt/project.py", line 202, in _eval vals = design._eval(func,*args) File "/usr/local/bin/SU2/eval/design.py", line 147, in _eval vals = eval_func(*inputs) File "/usr/local/bin/SU2/eval/design.py", line 380, in obj_df grad = su2grad(this_obj,grad_method,config,state) File "/usr/local/bin/SU2/eval/gradients.py", line 96, in gradient grads = adjoint( func_name, config, state ) File "/usr/local/bin/SU2/eval/gradients.py", line 299, in adjoint info = su2run.projection(konfig,state) File "/usr/local/bin/SU2/run/projection.py", line 93, in projection SU2_DOT(konfig) File "/usr/local/bin/SU2/run/interface.py", line 187, in DOT run_command( the_Command ) File "/usr/local/bin/SU2/run/interface.py", line 292, in run_command raise exception(message) SU2.EvaluationFailure: Path = /home/michalish/SU2/sims/Inviscid_2D_Unconstrained_NACA0012/DESIGNS/DSN_001/ADJOINT_DRAG/, Command = /usr/local/bin/SU2_DOT config_DOT.cfg SU2 process returned error '1' -------------------------------------------------------------------------- MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD with errorcode 1. NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes. You may or may not see output from other processes, depending on exactly when Open MPI kills them. --------------------------------------------------------------------------
I would deeply appreciate any form of help and advise and I apologize if this is considered a rookie error but I have no experience on both SU2 and Linux as well. Thank you in advance.

Last edited by michalish; February 28, 2020 at 09:54.
michalish 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
How to restart an unsteady shape optimization Eduardo Carvalho SU2 Shape Design 0 February 20, 2020 15:19
Adjoint Shape Optimization of Axis-symmetric Nozzle in Star-ccm+ Rajit_Sanghvi STAR-CCM+ 0 June 17, 2019 13:50
Can SU2 shape optimization function get the minimum value of Lift? lbfhappy SU2 Shape Design 0 April 5, 2018 01:39
Shape Optimization: How to export optimized geometry? macRC STAR-CCM+ 1 October 16, 2017 00:38
Multiple FFD box definition for shape optimization study diwakaranant SU2 1 November 5, 2013 18:46


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