I am creating this post in the aim to find understand a strange behavior that I noticed when I am trying to use the optimizer COBYLA from the driver ScipyOptimizeDriver. Indeed, when I am trying to solve the Betz limit (which is one the OpenMDAO proposed examples https://openmdao.org/newdocs/versions/latest/examples/betz_limit.html), it sometimes exceeds the boundaries that I set for the design variable "a".
Normally, the variable "a" should always be between 0 and 1. However, by using the same Betz Limit example code and by printing the design variable "a" at each iteration, this is what I get:
Design iteration number: 1
Input a: [0.5]
Output Cp: [0.5]
Design iteration number: 2
Input a: [0.5]
Output Cp: [0.5]
Design iteration number: 3
Input a: [1.5]
Output Cp: [1.5]
Design iteration number: 4
Input a: [1.]
Output Cp: [0.]
Design iteration number: 5
Input a: [1.]
Output Cp: [0.]
Design iteration number: 6
Input a: [1.0625]
Output Cp: [0.01660156]
Design iteration number: 7
Input a: [1.0078125]
Output Cp: [0.00024605]
Design iteration number: 8
Input a: [1.00097656]
Output Cp: [3.81842256e-06]
Design iteration number: 9
Input a: [1.00012207]
Output Cp: [5.96119207e-08]
Design iteration number: 10
Input a: [1.00001526]
Output Cp: [9.31336785e-10]
Design iteration number: 11
Input a: [1.00000191]
Output Cp: [1.4551943e-11]
Normal return from subroutine COBYLA
NFVALS = 10 F =-0.000000E+00 MAXCV = 0.000000E+00
X = 1.000000E+00
Optimization Complete
-----------------------------------
Now if you look some iterations: the input a is set to very high value (example: iteration 3 , a=1.5), but the value a should be between 0 and 1 according to the design variable range definition that I set before to launch the optimization. Therefore, I don't understand why I am getting these values when I am selecting COBYLA to solve the Betz Limit problem. Is it part of the COBYLA optimization process, or did I miss something?
Many thanks in advance for your help