CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   SU2 (https://www.cfd-online.com/Forums/su2/)
-   -   SU2 violates the lower bound of the FFD design variables (https://www.cfd-online.com/Forums/su2/221007-su2-violates-lower-bound-ffd-design-variables.html)

cfdjetman September 30, 2019 14:22

SU2 violates the lower bound of the FFD design variables
 
I am trying to optimize the NACA 0012 airfoil (2D) in SU2 6.2 using FFD control points.



I only simulate half plane as the angle of attack is 0 degrees. I have set up the FFD box as follows


FFD_DEFINITION= (FOIL,-0.04, 0, 0, 1.04, 0, 0, 1.04, 0.075, 0, -0.04, 0.075, 0, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 0, 0)


The FFD_DEGREE= (7, 1, 0)



I then set DV_KIND= FFD_SETTING and generate the mesh along with the FFD box using SU2_DEF naca0012.cfg.


I use only the upper control points as design variables.
DEFINITION_DV= ( 15, 1.0 | AIRFOIL | FOIL, 0, 1, 0.0, 1.0 );( 15, 1.0 | AIRFOIL | FOIL, 1, 1, 0.0, 1.0 );( 15, 1.0 | AIRFOIL | FOIL, 2, 1, 0.0, 1.0 );( 15, 1.0 | AIRFOIL | FOIL, 3, 1, 0.0, 1.0 );( 15, 1.0 | AIRFOIL | FOIL, 4, 1, 0.0, 1.0 );( 15, 1.0 | AIRFOIL | FOIL, 5, 1, 0.0, 1.0 );( 15, 1.0 | AIRFOIL | FOIL, 6, 1, 0.0, 1.0 );( 15, 1.0 | AIRFOIL | FOIL, 7, 1, 0.0, 1.0 )


Note, I am using FFD_CONTROL_POINT_2D as my design variables during my optimization process. I change DV_KIND=FFD_CONTROL_POINT_2D before running the optimizer.



I then set OPT_RELAX_FACTOR= 1E3

and OPT_BOUND_UPPER= 1E4
and OPT_BOUND_LOWER= 75


So when I start my optimizer, it shows

Lower and upper bound for each independent variable: [(0.075, 10.0), (0.075, 10.0), (0.075, 10.0), (0.075, 10.0), (0.075, 10.0), (0.075, 10.0), (0.075, 10.0), (0.075, 10.0)]


The lower bound corresponds to the current location of the design variables, I have selected. This is because, I want my design variables to only move in the positive Y direction from its current location. However, during the optimization process, this lower bounds is violated by some of the design variables.



What am I doing wrong? Is there something wrong with my setting? I haven't scaled my OPT_OBJECTIVE= DRAG function. Would this help?


Also, how do I view the design variables in tecplot?

jayantmukho September 30, 2019 14:41

So from what I understand, 0.075 is the original position of the FFD control points that you are trying to move (only the upper control points)? And you are trying to constrain it so that the control points only move in the positive y-direction.

In general, the original location of the control point corresponds to a DV value of 0, not 0.075. I would think that changing the lower bound to be 0 should prevent it from moving in the negative y-direction.

That being said, since your bounds are from 0.075 to 10, this should still constrain it to only move in the positive y-direction.

Could you upload the mesh and config file that you are using? I can try running it and checking what exactly is happening.

Cheers,
Jayant

cfdjetman September 30, 2019 14:56

I'm simulating the upper half of the airfoil, as the flow is symmetric. The control points I am using have an initial Y location of 0.075. I want these control point to move in the positive Y direction from this current location i.e Y >0.075. Therefore, I set the lower bounds to 0.075. However, during the optimization process, it ends up with Y< 0.075 for some of the control points.

jayantmukho September 30, 2019 18:52

Could you upload the mesh and config file? It'll make it easier to check what is happening.

cfdjetman October 2, 2019 16:15

1 Attachment(s)
My mesh file is to big to upload. I have already emailed it to you. If you would like me to send it any other way, please let me know.



I've run the following commands


shape_optimization.py -g DISCRETE_ADJOINT -o SLSQP -f naca0012_case5.cfg -n 32
and
shape_optimization.py -g DISCRETE_ADJOINT -o BFGS -f naca0012_case5.cfg -n 32.


For the BFGS optimizer, the optimizer violates my lower bounds. For the SLSQP optimizer, it only runs a single iteration and outputs that the convergence has been met. I'm using SU2 v6.2.


Let me know if you are able to get my setup to work and what changes I need to make.


All times are GMT -4. The time now is 11:32.