Hello everybody.
I am optimizing a monopile offshore wind turbine in two steps: first the rotor and then the tower/monopile.
The output of the rotor optimization becomes the input geometry for the tower/monopile optimization.
In the latter optimization, I would like to set a user-defined constraint to keep fixed the diameter of the tower top, while having all the others variable.
My analysis_options.yaml looks like this:
design_variables:
tower:
outer_diameter:
flag: True
lower_bound: 7.7300
upper_bound: 15.0
...
constraints:
...
user:
- name: tower.diameter
upper_bound: [7.7508]
lower_bound: [7.7308]
indices: [-1]
The optimization starts without any warning or error and completes successfully.
When I inspect the outputFileName-analysis.yaml in the folder of the optimization outputs, I can see my user-defined constraint:
constraints:
user:
- name: tower.diameter
upper_bound: [7.7508]
lower_bound: [7.7308]
indices: [-1]
but when I inspect the tower-height vs tower-diameter plot I see the top diameter changed like all the others.
I tried also the following variables as user-defined constraint :
towerse.tower_outer_diameter, drivese.D_top, fixedse.monopile.monopile_tower_d_full, towerse.member.d_eff
and the result has been always the same as for tower.diameter. All the variables tried are WISDEM Output Variables as per the instruction in WISDEM documentation .
Then, to be sure that my settings are really read, I also set a non-existent variable as user-defined constraint:
design_variables:
tower:
outer_diameter:
flag: True
lower_bound: 7.7300
upper_bound: 15.0
...
constraints:
...
user:
- name: tower.ciccio
upper_bound: [7.7508]
lower_bound: [7.7308]
indices: [-1]
and the optimization started without any error or warning…
Then it really seems that WISDEM simply ignores my user-defined constraint, even if it is reported in the outputFileName-analysis.yaml.
Can someone help me understand why my setting is ignored?
I am using WISDEM 3-10-1 development version
Thank you for your time and attention
You cannot set the same variable to be both a design variable and a constraint. That is a poorly posed optimization problem. I see we have not enabled an indices
input for the tower design variables, which is probably something to add to the to-do list. Nevertheless, I would suggest setting your design variable lower bound to be the tower top diameter you desire, and also adjust your initial condition to be the same. So, in the analysis options file you have:
design_variables:
tower:
outer_diameter:
flag: True
lower_bound: 7.74
upper_bound: 15.0
And you don’t have a user-specified constraint on the tower diameter. It may help to turn on the slope
constraint for the tower to ensure a smooth, monotonic diameter profile. In the geometry file, you have:
tower:
outer_shape_bem:
reference_axis: &ref_axis_tower
x:
grid: [0.0, 1.0]
values: [0.0, 0.0]
y:
grid: [0.0, 1.0]
values: [0.0, 0.0]
z:
grid: &grid_tower [0., ... 1.]
values: [...]
outer_diameter:
grid: *grid_tower
values: [15.0, ..., 7.74]
I tried what you suggest about the lower bound, but the tower-top diameter of the optimized design gets anyway 25 cm larger than the initial configuration value.
The slope
constraint is turned on.
I also tried to replace the default design-variable setting for the tower diameters with a user-defined design variable that would allow the use of indices
that you mentioned. Then I set the upper bound equal to the lower bound only for the index of the tower top:
design_variables:
tower:
outer_diameter:
flag: False
lower_bound: 7.7300
upper_bound: 15.0
...
user:
- name: towerse.tower_outer_diameter_in
lower_bound: [7.7300]
upper_bound: [7.7300, 15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 15.0 , 15.0]
The optimization ran without any warning and completed successfully, but the results was exactly the same as with the default design variable: the optimized tower top is larger than 7.73 m.
Instead of towerse.tower_outer_diameter_in
I also tried tower.diameter
, but I got the very same result.
This time my user-defined design variable seems to be ignored…
Thank you Garret for your time and attention
Setting the tower diameter as a design variable twice is also likely to cause problems, so I wouldn’t recommend that approach. If the optimized value of the tower top comes out larger than the initial condition, there may be other stress or frequency constraints that are pushing the optimizer in that direction. You may also want to experiment with lower convergence tolerance or other optimization algorithms, as it sounds like your problem is quite sensitive to small changes.
I flagged the default tower outer_diameter design variable to False: doesn’t this left only the user-defined design variable active?
I’ll experiment with your other suggestions and report on the results.
Thank you again.
Have a nice weekend
The tower-top diameter is kept constant with the following settings:
design_variables:
tower:
outer_diameter:
flag: True
lower_bound: 7.7300
upper_bound: 15.0
...
user:
- name: towerse.tower_outer_diameter_in
lower_bound: [7.7000]
upper_bound: [7.7600, 15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 15.0, 15.0 , 15.0]
and in modeling_options:
TowerSE:
...
n_refine: 1
I found this combination by pure chance, since we wanted to play with the number of calculation points along the tower and monopile (as reported in my other post). And we are OK with a reduction of calculation points if we can have the constraint on the tower-top diameter.