|
[Sponsors] |
Errors when running Shape Optimization Tutorial 1 - NACA0012 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 9, 2018, 00:25 |
Errors when running Shape Optimization Tutorial 1 - NACA0012
|
#1 |
Member
David
Join Date: Feb 2013
Posts: 38
Rep Power: 13 |
I tried running the shape optimization tutorial 1: Unconstrained shape design of a transonic inviscid airfoil at a cte. AoA using the given cfg and mesh file. But it seems the process only goes for 4 steps and stop. No matter I use python2 or python3, it is the same. What could cause the problem here? Thank you very much!
when using python2: Code:
NIT FC OBJFUN GNORM 1 1 2.946447E-08 6.646259E-06 2 3 2.927194E-08 5.513828E-06 3 4 2.037004E-08 4.516896E-06 4 6 1.769283E-08 5.893302E-06 Traceback (most recent call last): File "/opt/SU2/SU2-6.0.0/build/bin/shape_optimization.py", line 187, in <module> main() File "/opt/SU2/SU2-6.0.0/build/bin/shape_optimization.py", line 118, in main options.nzones ) File "/opt/SU2/SU2-6.0.0/build/bin/shape_optimization.py", line 163, in shape_optimization SU2.opt.SLSQP(project,x0,xb,its,accu) File "/opt/SU2/SU2-6.0.0/build/bin/SU2/opt/scipy_tools.py", line 143, in scipy_slsqp epsilon = eps ) File "/usr/lib/python2.7/dist-packages/scipy/optimize/slsqp.py", line 207, in fmin_slsqp constraints=cons, **opts) File "/usr/lib/python2.7/dist-packages/scipy/optimize/slsqp.py", line 370, in _minimize_slsqp raise ValueError("Objective function must return a scalar") ValueError: Objective function must return a scalar Code:
Traceback (most recent call last): File "/usr/lib/python3.6/shutil.py", line 544, in move os.rename(src, real_dst) FileNotFoundError: [Errno 2] No such file or directory: '/home/xu/TutorialSU2/Unconstrained_Airfoil_Design_NACA0012_AOA/DESIGNS/DSN_006/DIRECT/solution_flow.dat' -> '/home/xu/TutorialSU2/Unconstrained_Shape_Design_of_a_Transonic_Inviscid_Airfoil_at_an_AOA/DESIGNS/DSN_006/solution_flow.dat' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/SU2/SU2-6.0.0/build/bin/SU2/eval/design.py", line 146, in _eval vals = eval_func(*inputs) File "/opt/SU2/SU2-6.0.0/build/bin/SU2/eval/design.py", line 243, in obj_f func += su2func(this_obj,config,state) * sign * scale * global_factor File "/opt/SU2/SU2-6.0.0/build/bin/SU2/eval/functions.py", line 98, in function aerodynamics( config, state ) File "/opt/SU2/SU2-6.0.0/build/bin/SU2/eval/functions.py", line 273, in aerodynamics push.append(info.FILES['TARGET_HEATFLUX']) File "/opt/SU2/SU2-6.0.0/build/bin/SU2/io/redirect.py", line 250, in __exit__ shutil.move(old_name,new_name) File "/usr/lib/python3.6/shutil.py", line 558, in move copy_function(src, real_dst) File "/usr/lib/python3.6/shutil.py", line 257, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "/usr/lib/python3.6/shutil.py", line 121, in copyfile with open(dst, 'wb') as fdst: FileNotFoundError: [Errno 2] No such file or directory: '/home/xu/TutorialSU2/Unconstrained_Shape_Design_of_a_Transonic_Inviscid_Airfoil_at_an_AOA/DESIGNS/DSN_006/solution_flow.dat' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/scipy/optimize/slsqp.py", line 368, in _minimize_slsqp fx = float(np.asarray(func(x))) File "/usr/lib/python3/dist-packages/scipy/optimize/optimize.py", line 292, in function_wrapper return function(*(wrapper_args + args)) File "/opt/SU2/SU2-6.0.0/build/bin/SU2/opt/scipy_tools.py", line 393, in obj_f obj_list = project.obj_f(x) File "/opt/SU2/SU2-6.0.0/build/bin/SU2/opt/project.py", line 236, in obj_f return self._eval(konfig, func,dvs) File "/opt/SU2/SU2-6.0.0/build/bin/SU2/opt/project.py", line 205, in _eval vals = design._eval(func,*args) File "/opt/SU2/SU2-6.0.0/build/bin/SU2/eval/design.py", line 150, in _eval save_data(filename,self) File "/opt/SU2/SU2-6.0.0/build/bin/SU2/io/redirect.py", line 253, in __exit__ os.chdir(origin) FileNotFoundError: [Errno 2] No such file or directory: '/home/xu/TutorialSU2/Unconstrained_Shape_Design_of_a_Transonic_Inviscid_Airfoil_at_an_AOA/' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/SU2/SU2-6.0.0/build/bin/shape_optimization.py", line 187, in <module> main() File "/opt/SU2/SU2-6.0.0/build/bin/shape_optimization.py", line 118, in main options.nzones ) File "/opt/SU2/SU2-6.0.0/build/bin/shape_optimization.py", line 163, in shape_optimization SU2.opt.SLSQP(project,x0,xb,its,accu) File "/opt/SU2/SU2-6.0.0/build/bin/SU2/opt/scipy_tools.py", line 143, in scipy_slsqp epsilon = eps ) File "/usr/lib/python3/dist-packages/scipy/optimize/slsqp.py", line 207, in fmin_slsqp constraints=cons, **opts) File "/usr/lib/python3/dist-packages/scipy/optimize/slsqp.py", line 370, in _minimize_slsqp raise ValueError("Objective function must return a scalar") ValueError: Objective function must return a scalar |
|
August 13, 2018, 06:33 |
|
#2 |
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 13 |
Hi,
The optimizer may have deformed the mesh too much and the solver diverged. Have a look inside the optimization project directories and see what the mesh looks like at the last iteration. I experienced the same problem before and adding a constraint on pitching moment helped, the shapes were more reasonable. Regards, Pedro |
|
August 13, 2018, 18:59 |
|
#3 |
Senior Member
Heather Kline
Join Date: Jun 2013
Posts: 309
Rep Power: 14 |
Hello
Thank you for your interest in SU2 Are you using the most recent version of SU2 (it would be 6.1.0 by the date of your post)? Are you also using the most recent configuration, mesh, and solution files as provided with that SU2 version or from https://su2code.github.io/, without modification? If yes, please report this as an issue at https://github.com/su2code/SU2/issues, and feel free to reference your original post as well as pcg's suggestion which sounds like it fixed the problem. Thanks for using the forum! It's exactly the right place to go to get help with using SU2, and we usually encourage people to take their questions here first where a wider audience of people can help out - but the tutorials are supposed to work without requiring the user to make any modifications, and if it's broken that's something that should be fixed on the developer end, which is what the 'issues' tab in github is for. |
|
August 15, 2018, 05:09 |
|
#4 |
Member
David
Join Date: Feb 2013
Posts: 38
Rep Power: 13 |
Thanks, PCG and HLK for your help.
It is using the newest version of code and configuration file. I already submitted the issue to the link you provided. I would try PCG's method and try more. HLK: You sounds like the code contributor/senior developer of SU2. Is it possible we write more detailed document and publish it so that more people can join in using it and starting to develop it. I could offer my labor effort, but I don't know where to start. Reading the code alone is hard. |
|
August 15, 2018, 07:17 |
|
#5 |
Senior Member
Pedro Gomes
Join Date: Dec 2017
Posts: 466
Rep Power: 13 |
Hi northfly,
The papers (https://github.com/su2code/Documentation) can give you an idea of the major software components of the SU2 suite and the major classes in SU2_CFD. The doxygen documentation can help you understand the variety of sub-classes you have for each of the major ones. Reaching out directly to the person/group that developed a feature is also one way to get some help (used to be the main one I've been told). Anyway, If you want to fix a bug yourself and need some pointers using the GitHub issues is probably the best way. If you want to develop a new feature I recommend that you register to the developer society (https://www.su2devsociety.org/) and start a thread (the society is relatively new so not much movement in the forum yet). Regards, Pedro |
|
January 30, 2019, 14:38 |
|
#6 |
New Member
Nikita Ageev
Join Date: May 2017
Posts: 11
Rep Power: 9 |
I have the same problem with tutorial (at SU2 v 6.1.0). At the same node the SU2 v 5.0.0. wirks correctly with the same tutorial.
Are there any news on these issues? Best regards |
|
February 14, 2019, 04:35 |
|
#7 |
Member
Join Date: Mar 2017
Posts: 61
Rep Power: 9 |
Any solution to this problem? I'm also working on 6.1 version.
|
|
February 14, 2019, 04:46 |
|
#8 |
New Member
Nikita Ageev
Join Date: May 2017
Posts: 11
Rep Power: 9 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error problem while running sadia d lts tutorial | kane | OpenFOAM Running, Solving & CFD | 2 | May 26, 2018 04:38 |
Segmentation fault in tutorial NACA0012 shape optimization | lazzini | SU2 Shape Design | 3 | March 16, 2018 05:41 |
Problem with running tutorial "Constrained Optimal Shape Design of a Fixed Wing" | yugang881 | SU2 | 12 | February 3, 2017 08:15 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 05:03 |
Statically Compiling OpenFOAM Issues | herzfeldd | OpenFOAM Installation | 21 | January 6, 2009 10:38 |