# Lift maximization Drag constrained problem.

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 24, 2014, 11:45 Lift maximization Drag constrained problem. #1 Member   Antoni Alexander Join Date: Nov 2009 Posts: 43 Rep Power: 16 Hi, I am using version 3.2.3 both SU2 codes and Testcases. Recently I want to do a Lift maximization Drag constrained optimization of a single foil. That means to increase the lift as high as possible, meantime keep the drag under a certain level. So I practiced on the case of TestCases-master/optimization_euler/steady_naca0012 , in which the configuration file was modified as below: Code: `OBJECTIVE_FUNCTION= LIFT` ... Code: ```OPT_OBJECTIVE= LIFT * 0.01 % % Optimization constraint functions with scaling factors, separated by semicolons % ex= (Objective = Value ) * Scale, use '>','<','=' OPT_CONSTRAINT= ( DRAG < 0.3 ) * 0.01; ( MOMENT_Z > 0.0 ) * 0.01; ( MAX_THICKNESS > 0.12 ) * 0.01``` However, after the modification, the case only run a few steps then collapsed. Code: ```------------------------------ Begin Solver ----------------------------- The solution contains 333 non-physical points. Min Delta Time: 0.123883. Max Delta Time: 1.44516. Maximum residual: -0.372488, located at point 1284. Iter Time(s) Res[Rho] Res[RhoE] CLift(Total) CDrag(Total) 0 0.095575 -1.586022 -0.966313 -0.233561 14.293142 The solution contains 564 non-physical points. 1 0.095075 -0.287745 0.470576 -12.467302 35.049694 The solution contains 597 non-physical points. 2 0.094813 1.181535 1.911802 -15.029912 25.895173 ...``` Then I change the scale to 0.001 and 0.0001, but still no good. Any suggestion about this?

 January 16, 2015, 02:46 #2 Super Moderator   Thomas D. Economon Join Date: Jan 2013 Location: Stanford, CA Posts: 271 Rep Power: 14 Hi Antoni, Is the failure that you are seeing occurring after the first step of the optimizer (i.e., after it chooses the first step for the design variables and then perturbs the airfoil shape and mesh)? If so, please check the resulting mesh/solution files after the deformation to see whether or not it has taken a non-physical step. We often find that the shape design process is incredibly sensitive to the scale factors, like you mention adjusting. Typically, we will run the continuous_adjoint.py script and then adjust the scale factors for our design variables such that the gradient (which becomes the first step with the default optimizer) has a magnitude that is reasonable given the mesh units of the current problem, i.e., if the chord of the airfoil is 1, the gradient should be scaled to an order of magnitude or smaller than 1 to give a reasonable first set of deformations. Lastly, you may want to simplify the optimization problem to start and then add more complexity once you are confident that it is working. For instance, you might first remove all constraints and then add them back in one by one (drag, moment, thickness) as you feel confident in the results and understand the particular problem better. Hope this helps, Thomas D. Economon SU2 lead developer beatlejuice likes this.