
[Sponsors] 
October 20, 2018, 12:47 
Benchmark Optimization Study for SU2

#1 
New Member
EamonnC
Join Date: Oct 2018
Location: Ireland
Posts: 8
Rep Power: 4 
Hi there,
My names Eamonn, I'm a student in University doing a thesis on the aerodynamic optimization of airborne wind energy systems (AWES) using SU2. As part of the thesis I must conduct a benchmark optimization study for the software. I am very new to the CFD world and would regard myself as a beginner in the area, and am looking for a bit of guidance on where I should start with this. Are there any particular test cases / V&V cases that I should be using as part of this study? Also, further down the line (a few months from now) I will have to design a basic mesh for an AWES in Ansys or another similar CFD software and import this mesh onto SU2 to run an optimization simulation on it. Does this sound like an achievable objective for someone with little experience in the field but is willing to work hard and learn? I have about 6 months from now to complete by the way! Apologies for asking more than one question here, but I'd appreciate any help! Thanks, Eamonn 

March 5, 2019, 13:53 
Good Luck to you

#2 
Member
Will Kernkamp
Join Date: Jun 2014
Posts: 37
Rep Power: 8 
Just came across your post. The six months are almost over. Hope you made good progress! Don't be discouraged if you didn't. It looks like the plan was too ambitious. When I was your age, I was supposed to carry out my thesis mission. However, I explored the wonderful capabilities in CFD available to me at NLR in Amsterdam (in 1987). My thesis advisor was unhappy, but I did the right thing for my career.


March 7, 2019, 15:06 

#3 
New Member
EamonnC
Join Date: Oct 2018
Location: Ireland
Posts: 8
Rep Power: 4 
Hi Will, thanks for your reply and encouragement! Yes the scope of the project was far too ambitious and I have since redefined my goals  only a few weeks out now! I have learned an awful lot in the past couple of months and it has definitely sparked a newfound interest for me in the area.
I'm currently trying to complete the Pitching NACA Optimization Test Case and am wondering if you might be able to help me with regards to an error that I keep getting. The case will not go through the first design iteration for the Test Case with all settings kept unchanged from those given in GitHub repository. The error I am receiving is: File "/usr/local/bin/shape_optimization.py", line 163, in shape_optimization SU2.opt.SLSQP(project,x0,xb,its,accu) File "/usr/local/bin/SU2/opt/scipy_tools.py", line 143, in scipy_slsqp epsilon = eps ) File "/usr/lib/python2.7/distpackages/scipy/optimize/slsqp.py", line 207, in fmin_slsqp constraints=cons, **opts) File "/usr/lib/python2.7/distpackages/scipy/optimize/slsqp.py", line 390, in _minimize_slsqp g = append(fprime(x),0.0) File "/usr/lib/python2.7/distpackages/scipy/optimize/optimize.py", line 292, in function_wrapper return function(*(wrapper_args + args)) File "/usr/local/bin/SU2/opt/scipy_tools.py", line 410, in obj_df dobj_list = project.obj_df(x) File "/usr/local/bin/SU2/opt/project.py", line 241, in obj_df return self._eval(konfig, func,dvs) File "/usr/local/bin/SU2/opt/project.py", line 205, in _eval vals = design._eval(func,*args) File "/usr/local/bin/SU2/eval/design.py", line 146, in _eval vals = eval_func(*inputs) File "/usr/local/bin/SU2/eval/design.py", line 379, in obj_df grad = su2grad(this_obj,grad_method,config,state) File "/usr/local/bin/SU2/eval/gradients.py", line 105, in gradient grads = adjoint( func_name, config, state ) File "/usr/local/bin/SU2/eval/gradients.py", line 280, in adjoint info = su2run.adjoint(config) File "/usr/local/bin/SU2/run/adjoint.py", line 89, in adjoint SU2_CFD(konfig) File "/usr/local/bin/SU2/run/interface.py", line 122, in CFD run_command( the_Command ) File "/usr/local/bin/SU2/run/interface.py", line 302, in run_command raise exception(message) SU2.EvaluationFailure: Path = /home/buxwax/Documents/SU2/SU26.2.0/My_Optimization_Cases/Case_2_pitching/opt/DESIGNS/DSN_001/ADJOINT_DRAG/, Command = /bin/SU2_CFD_AD config_CFD_AD.cfg SU2 process returned error '1' When I open the log_Adjoint.out it reads the following: Error in "void CConfig::SetPostprocessing(short unsigned int, short unsigned int, short unsigned int)":  Dynamic mesh movement currently not supported for the discrete adjoint solver.  Error Exit  I have compiled the solver for AD Support using the SU2 AD Build instructions, but I do not think those instructions compile the AD Build with all features included! For example, when I check in the SU2_AD folder in my root directory and check the config.log file I see that some of the modules have not been configured: Build Configuration Summary: Source code location: /home/buxwax/Documents/SU2/SU26.2.0 Install location: Version: 6.2.0 C++ Compiler: mpicxx C Compiler: mpicc Preprocessor flags: DHAVE_MPI Compiler flags: O3 Wall Linker flags: MPI support: yes Metis support: yes Parmetis support: yes TecIO support: yes CGNS support: yes Mutation++ support: no MKL support: no Datatype support: double no codi_reverse yes codi_forward no External includes: DHAVE_CGNS I$(top_srcdir)/externals/cgns I$(top_srcdir)/externals/cgns/adf DHAVE_PARMETIS I$(top_srcdir)/externals/parmetis/include DHAVE_METIS I$(top_srcdir)/externals/metis/include DHAVE_TECIO I$(top_srcdir)/externals/tecio/teciosrc External libs: $(top_builddir)/externals/cgns/libcgns.a $(top_builddir)/externals/parmetis/libparmetis.a $(top_builddir)/externals/metis/libmetis.a $(top_builddir)/externals/tecio/libtecio.a External libpthreads: lpthread Build SU2_CFD: yes Build SU2_DOT: yes Build SU2_MSH: no Build SU2_DEF: no Build SU2_SOL: no Build SU2_GEO: no Build Py Wrapper: no Do you know what my problem is here? Do you know how I can compile the with all AD features enabled? I have a feeling this will solve my problem with this Test Case!! Thanks, Eamonn 

March 7, 2019, 15:25 
Update

#4 
New Member
EamonnC
Join Date: Oct 2018
Location: Ireland
Posts: 8
Rep Power: 4 
It is also worth mentioning that when I try to run the Test Case using CONTINUOUS ADJOINT, I receive the following in the log_Adjoint.out file:
WARNING: The adjoint solver should use a nondimensional flow solution. WARNING: The adjoint solver should use a nondimensional flow solution. WARNING: The adjoint solver should use a nondimensional flow solution.   ___ _ _ ___   / __   _ ) Release 6.2.0 "Falcon"   \__ \ _ / /   ___/\___//___ Suite (Computational Fluid Dynamics Code)      The current SU2 release has been coordinated by the   SU2 International Developers Society <www.su2devsociety.org>   with selected contributions from the opensource community.    The main research teams contributing to the current release are:    Prof. Juan J. Alonso's group at Stanford University.    Prof. Piero Colonna's group at Delft University of Technology.    Prof. Nicolas R. Gauger's group at Kaiserslautern U. of Technology.    Prof. Alberto Guardone's group at Polytechnic University of Milan.    Prof. Rafael Palacios' group at Imperial College London.    Prof. Vincent Terrapon's group at the University of Liege.    Prof. Edwin van der Weide's group at the University of Twente.    Lab. of New Concepts in Aeronautics at Tech. Inst. of Aeronautics.    Copyright 20122019, Francisco D. Palacios, Thomas D. Economon,   Tim Albring, and the SU2 contributors.     SU2 is free software; you can redistribute it and/or   modify it under the terms of the GNU Lesser General Public   License as published by the Free Software Foundation; either   version 2.1 of the License, or (at your option) any later version.     SU2 is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   Lesser General Public License for more details.     You should have received a copy of the GNU Lesser General Public   License along with SU2. If not, see <http://www.gnu.org/licenses/>.    Physical Case Definition  Continuous Euler adjoint equations. Mach number: 0.796. Angle of attack (AoA): 0 deg, and angle of sideslip (AoS): 0 deg. Performing a dynamic mesh simulation: rigid mesh motion. No restart solution, use the values at infinity (freestream). Read flow solution from: restart_flow.dat. Dimensional simulation. The reference area is 1 m^2. The semispan will be computed using the max y(3D) value. The reference length is 1 m. Reference origin for moment evaluation is (0.248, 0, 0). Surface(s) where the force coefficients are evaluated: airfoil. Surface(s) where the objective function is evaluated: airfoil. Surface(s) plotted in the output file: airfoil. Surface(s) affected by the design variables: airfoil. Input mesh file name: mesh_optimization.su2  Design problem definition  CD objective function.  Space Numerical Integration  JamesonSchmidtTurkel scheme for the adjoint inviscid terms. JST viscous coefficients (1st, 2nd, & 4th): 0.15, 0, 0.02. The method includes a grid stretching correction (p = 0.3). Second order integration. The reference sharp edge distance is: 0.3. Gradient Computation using weighted LeastSquares method.  Time Numerical Integration  Unsteady simulation, dual time stepping strategy (second order in time). Unsteady time step provided by the user (s): 0.023555. Total number of internal Dual Time iterations: 110. Euler implicit method for the adjoint equations. W Multigrid Cycle, with 3 multigrid levels. Damping factor for the residual restriction: 0.9. Damping factor for the correction prolongation: 0.9. No CFL adaptation. ++  MG Level PresmoothPostSmoothCorrectSmo ++  0 1 0 0  1 2 0 0  2 3 0 0  3 3 0 0 ++ CourantFriedrichsLewy number: 5  Convergence Criteria  Maximum number of iterations: 99999. Reduce the adjoint density residual 3 orders of magnitude. The minimum value for the adjoint density residual is 10^(10).  Output Information  Writing a solution file every 250 iterations. Writing the convergence history every 1 iterations. Writing the dual time flow solution every 1 iterations. Writing the dual time convergence history every 10 iterations. The output file format is Tecplot ASCII (.dat). Convergence history file name: history_adjoint. Forces breakdown file name: forces_breakdown.dat. Adjoint solution file name: solution_adj.dat. Restart adjoint file name: restart_adj.dat. Adjoint variables file name: adjoint. Surface adjoint coefficients file name: surface_adjoint.  Config File Boundary Information  ++  Marker Type Marker Name ++  Euler wall airfoil ++  Farfield farfield ++  Read Grid File Information  Two dimensional problem. 8606 points. 2 surface markers. ++  Index Marker Elements ++  0 airfoil 200  1 farfield 75 ++ 16937 triangles.  Geometry Preprocessing  Setting point connectivity. Renumbering points (Reverse Cuthill McKee Ordering). Recomputing point connectivity. Setting element connectivity. Checking the numerical grid orientation. Identifying edges and vertices. Computing centers of gravity. Setting the control volume structure. Area of the computational grid: 1.26e+03. Finding max control volume width. Searching for the closest normal neighbors to the surfaces. Storing a mapping from global to local point index. Compute the surface curvature. Max K: 1.99e+03. Mean K: 17.3. Standard deviation K: 126. Checking for periodicity. Setting the multigrid structure. ++  MG Level CVsAggl. Rate CFL ++  0 8606 1/1.00 5  1 2442 1/3.52 4  2 699 1/3.49 3.21  3 189 1/3.7 2.5 ++ Wetted area = 2.02 m. Area projection in the xplane = 0.0996 m, yplane = 0.999 m. Max. coordinate in the xdirection = 1 m, ydirection = 0.0499 m. Min coordinate in the xdirection = 0 m, ydirection = 0.0499 m.  Driver information  A Fluid driver has been instantiated.  Iteration Preprocessing  Zone 1: adjoint Euler/NavierStokes/RANS fluid iteration.  Solver Preprocessing  Inviscid flow: Computing density based on freestream temperature and pressure using the ideal gas law. Force coefficients computed using MACH_MOTION.  Models: ++  Viscosity Model Conductivity Model Fluid Model ++    STANDARD_AIR ++  Fluid properties: ++  Name Dim. value Ref. value UnitNondim. value ++  Gas Constant 287.058 1 N.m/kg.K 287.058  Spec. Heat Ratio    1.4 ++  Initial and freestream conditions: ++  Name Dim. value Ref. value UnitNondim. value ++  Static Pressure 101325 1 Pa 101325  Density 1.22498 1 kg/m^3 1.22498  Temperature 288.15 1 K 288.15  Total Energy 243476 1 m^2/s^2 243476  VelocityX 270.876 1 m/s 270.876  VelocityY 0 1 m/s 0  Velocity Magnitude 270.876 1 m/s 270.876 ++  Mach Number    0.796 ++ ++  Name Dim. value Ref. value UnitNondim. value ++  Unsteady conditions  Total Time 0.59 1 s 0.59  Time Step 0.023555 1 s 0.023555 ++ Initialize Jacobian structure (Euler). MG level: 0. Initialize Jacobian structure (Adjoint Euler). MG level: 0. Initialize Jacobian structure (Euler). MG level: 1. Initialize Jacobian structure (Adjoint Euler). MG level: 1. Initialize Jacobian structure (Euler). MG level: 2. Initialize Jacobian structure (Adjoint Euler). MG level: 2. Initialize Jacobian structure (Euler). MG level: 3. Initialize Jacobian structure (Adjoint Euler). MG level: 3. Error in "std::__cxx11::string CConfig::GetUnsteady_FileName(std::__cxx11::string , int)":  Requesting a negative iteration number for the restart file!!  Error Exit   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.  

March 7, 2019, 15:55 
Try docker with SU2

#5 
Member
Will Kernkamp
Join Date: Jun 2014
Posts: 37
Rep Power: 8 
Looks like you have components that did not get compiled. Have you tried to just recompile the whole thing requesting everything? Do steady test cases run?
There are dockers available with SU2. Search online. When you run a docker it has everything installed and running. Does not depend on your own system and libraries. Same for openfoam6. Easy. 

March 7, 2019, 17:37 

#6 
New Member
EamonnC
Join Date: Oct 2018
Location: Ireland
Posts: 8
Rep Power: 4 
Thanks for the reply and suggestion!
Yes steady optimization cases work just fine. I have just downloaded Docker and am trying to figure out how to run SU2 on it  hopefully I manage to get it to work! 

March 28, 2019, 09:10 

#7 
New Member
na
Join Date: Jul 2018
Posts: 28
Rep Power: 4 
Hi Eamonn,
Concerning the Discrete Adjoint: HTML Code:
Dynamic mesh movement currently not supported for the discrete adjoint solver. The AD build looks good at least from what I can see, only SU2_CFD and SU2_DOT are the only modules build with the codi reverse datatype. And as steady optimization using the Discrete Adjoint solver works, i see no issue with the build. I would also say that the given error message is quite clear For the continuous Adjoint: HTML Code:
Requesting a negative iteration number for the restart file!! Sorry that no one answered you earlier than march. I hope you do well with your thesis and stay around CFD and of course SU2! Cheers, Tobi 

Tags 
help needed, optimization, su2, thesis 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
ANSYS Optimization failing to update Results component.  harmollo1  ANSYS  1  March 21, 2019 16:30 
Optimization study with ANSYS CFX (FLUENT) and MATLAB  rusham  ANSYS  0  January 25, 2018 05:54 
(Failed) Use of optimisation with FLUENT study  mrb93  ANSYS  0  December 12, 2017 05:39 
Multiple FFD box definition for shape optimization study  diwakaranant  SU2  1  November 5, 2013 18:46 
COMSOL: optimization applied to a laminar flow  tdh89  Main CFD Forum  0  April 30, 2012 09:57 