Skip to content

Optimisation of tower with less sections in WEIS #451

@maucollu

Description

@maucollu

Description

I would like to run an optimisation of the tower for the IEA15MW UMaine, rectangular, but with less sections than the 11 of the original IEA-15-240-RWT_VolturnUS-S_rectangular.yaml file.

Anyway, I receive an nlopt.invalid_argument error, as if there is the 11 tower sections hard-coded somewhere in the scripts performing the optimisation?
It happens even switching off all the tower-related constraints.

Steps to reproduce issue

Startgin from the basic WEIS configuration.

  1. Modify the file IEA-15-240-RWT_VolturnUS-S_rectangular.yaml as it follows, saving the file as IEA-15-240-RWT_VolturnUS-S_rectangular_sparsetower_6sec.yaml:
tower:
        outer_shape:
            outer_diameter:
                grid: [0.0, 0.200949, 0.401898, 0.602847, 0.803796, 1.0]
                values: [10.0, 10.0, 10.0, 10.0, 10.0, 6.5]
            cd:
                grid: [0.0, 1.0]
                values: [0.5, 0.5]
        structure:
            outfitting_factor: 1.07
            layers:
               -  name: tower_wall
                  material: steel
                  thickness:
                      grid: [0.0, 0.200949, 0.401898, 0.602847, 0.803796, 1.0]
                      values: [0.09, 0.06969791129654272, 0.048969783194233195, 0.028128174258004363, 0.009881156462835017, 0.005931142626464429]
        reference_axis:
            x:
                grid: [0.0, 0.200949, 0.401898, 0.602847, 0.803796, 1.0]
                values: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
            y:
                grid: [0.0, 0.200949, 0.401898, 0.602847, 0.803796, 1.0]
                values: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
            z:
                grid: [0.0, 0.200949, 0.401898, 0.602847, 0.803796, 1.0]
                values: [15.0, 41.0, 67.0, 93.0, 119.0, 144.386]
  1. Modify the fname_wt_input in umaine_semi_raft_opt_driver.py, to point to the new yaml file
  2. Run optimisation python umaine_semi_raft_opt_driver.py

Current behavior

It runs once the analyses, then when it arrives at the step of modifying the design variables (I believe), it gives the following error:

(weis-env-rir) C:\Users\mauri\WEIS\examples\04_rir>python umaine_semi_raft_opt_driver.py
DeprecationWarning: C:\Users\mauri\miniforge3\envs\weis-env-rir\Lib\site-packages\jsonmerge\__init__.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: C:\Users\mauri\miniforge3\envs\weis-env-rir\Lib\site-packages\jsonmerge\__init__.py:27
Accessing Draft4Validator.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.DeprecationWarning: <frozen importlib._bootstrap>:488
builtin type SwigPyPacked has no __module__ attributeDeprecationWarning: <frozen importlib._bootstrap>:488
builtin type SwigPyObject has no __module__ attributeWARNING: AggregatedJoints hasn't included rectangular yet
WARNING: AggregatedJoints hasn't included rectangular yet
WARNING: AggregatedJoints hasn't included rectangular yet
The ROSCO (modeling) ps_percent does not match the WindIO (geometry) ps_percent.  Using the ROSCO value of 0.85.
C:\Users\mauri\miniforge3\envs\weis-env-rir\Lib\site-packages\openmdao\core\driver.py:776: OpenMDAOWarning:NLoptDriver: No matches for pattern '*_df' in recording_options['excludes'].
C:\Users\mauri\miniforge3\envs\weis-env-rir\Lib\site-packages\openmdao\visualization\n2_viewer\n2_viewer.py:115: OpenMDAOWarning:attempt to get argmin of an empty sequence
Driver debug print for iter coord: rank0:NLopt_LN_COBYLA|0
----------------------------------------------------------
Design Vars
{'tower.diameter': array([10. , 10. , 10. , 10. , 10. ,  6.5]),
 'tower.layer_thickness': array([[0.09      , 0.06969791, 0.04896978, 0.02812817, 0.00988116,
        0.00593114]])}


================
wisdem.wt.wt_rna
================
NL: NLBGS 1 ; 4.83665354e+11 1
NL: NLBGS 2 ; 68270.0163 1.41151347e-07
NL: NLBGS 3 ; 0 0
NL: NLBGS Converged
DeprecationWarning: C:\Users\mauri\miniforge3\envs\weis-env-rir\Lib\site-packages\wisdem\commonse\cylinder_member.py:2451
Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)DeprecationWarning: C:\Users\mauri\miniforge3\envs\weis-env-rir\Lib\site-packages\wisdem\commonse\cylinder_member.py:2452
Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)DeprecationWarning: C:\Users\mauri\miniforge3\envs\weis-env-rir\Lib\site-packages\wisdem\commonse\cylinder_member.py:1978
Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)DeprecationWarning: C:\Users\mauri\miniforge3\envs\weis-env-rir\Lib\site-packages\wisdem\commonse\cylinder_member.py:1979
Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)UHC input: [0.] -- Mass: [0.]
ORBIT library intialized at 'C:\Users\mauri\miniforge3\envs\weis-env-rir\Lib\site-packages\library'
Cp-Ct-Cq surfaces completed at 5 %
Cp-Ct-Cq surfaces completed at 10 %
Cp-Ct-Cq surfaces completed at 15 %
Cp-Ct-Cq surfaces completed at 20 %
Cp-Ct-Cq surfaces completed at 25 %
Cp-Ct-Cq surfaces completed at 30 %
Cp-Ct-Cq surfaces completed at 35 %
Cp-Ct-Cq surfaces completed at 40 %
Cp-Ct-Cq surfaces completed at 45 %
Cp-Ct-Cq surfaces completed at 50 %
Cp-Ct-Cq surfaces completed at 55 %
Cp-Ct-Cq surfaces completed at 60 %
Cp-Ct-Cq surfaces completed at 65 %
Cp-Ct-Cq surfaces completed at 70 %
Cp-Ct-Cq surfaces completed at 75 %
Cp-Ct-Cq surfaces completed at 80 %
Cp-Ct-Cq surfaces completed at 85 %
Cp-Ct-Cq surfaces completed at 90 %
Cp-Ct-Cq surfaces completed at 95 %
Cp-Ct-Cq surfaces completed at 100 %
-----------------------------------------------------------------------------
   Tuning a reference wind turbine controller using NREL's ROSCO toolbox
-----------------------------------------------------------------------------
WARNING: twr_freq and ptfm_freq should be defined for floating turbine control!!
Making FOWT
Mesh characteristic lengths: min=1.0, max=3.0
adjusting ballast densities
Adjusting ballast to trim heave.
 Original sumFz is 8535 kN and heave is ~1.900 m
 Adjusting fill density by 92.312 kg/m over 9425.273 m3 of ballast
 New sumFz is 0 kN and heave is ~0.000 m
Found mean offets of FOWT 1 with surge =  0.41 m,  sway  = -0.00,  and heave = -0.00 m
                                 roll  =  0.00 deg, pitch = -2.24 deg, and yaw   = -0.00 deg
Wind speed: 3.00 m/s, Omega: 5.00 rpm, Cp: 0.072, T: 201 kN
Found mean offets of FOWT 1 with surge =  2.34 m,  sway  =  0.01,  and heave = -0.01 m
                                 roll  = -0.00 deg, pitch = -1.52 deg, and yaw   = -0.00 deg
Wind speed: 5.00 m/s, Omega: 5.00 rpm, Cp: 0.416, T: 548 kN
Found mean offets of FOWT 1 with surge =  5.48 m,  sway  =  0.07,  and heave = -0.02 m
                                 roll  =  0.05 deg, pitch = -0.30 deg, and yaw   = -0.04 deg
Wind speed: 7.00 m/s, Omega: 5.05 rpm, Cp: 0.457, T: 1062 kN
Found mean offets of FOWT 1 with surge =  9.66 m,  sway  =  0.19,  and heave = -0.04 m
                                 roll  =  0.16 deg, pitch =  1.47 deg, and yaw   = -0.06 deg
Wind speed: 9.00 m/s, Omega: 6.39 rpm, Cp: 0.458, T: 1747 kN
Found mean offets of FOWT 1 with surge =  14.28 m,  sway  =  0.34,  and heave = -0.08 m
                                 roll  =  0.28 deg, pitch =  3.82 deg, and yaw   = -0.08 deg
Wind speed: 11.00 m/s, Omega: 7.50 rpm, Cp: 0.448, T: 2332 kN
Found mean offets of FOWT 1 with surge =  17.59 m,  sway  =  0.48,  and heave = -0.11 m
                                 roll  =  0.43 deg, pitch =  5.79 deg, and yaw   = -0.11 deg
Wind speed: 13.00 m/s, Omega: 7.50 rpm, Cp: 0.270, T: 1600 kN
Found mean offets of FOWT 1 with surge =  13.35 m,  sway  =  0.49,  and heave = -0.07 m
                                 roll  =  0.41 deg, pitch =  3.39 deg, and yaw   = -0.36 deg
Wind speed: 15.00 m/s, Omega: 7.50 rpm, Cp: 0.176, T: 1324 kN
Found mean offets of FOWT 1 with surge =  11.50 m,  sway  =  0.57,  and heave = -0.05 m
                                 roll  =  0.38 deg, pitch =  2.49 deg, and yaw   = -0.56 deg
Wind speed: 17.00 m/s, Omega: 7.50 rpm, Cp: 0.120, T: 1148 kN
Found mean offets of FOWT 1 with surge =  10.27 m,  sway  =  0.67,  and heave = -0.04 m
                                 roll  =  0.34 deg, pitch =  1.93 deg, and yaw   = -0.77 deg
Wind speed: 19.00 m/s, Omega: 7.50 rpm, Cp: 0.086, T: 1022 kN
Found mean offets of FOWT 1 with surge =  9.31 m,  sway  =  0.78,  and heave = -0.04 m
                                 roll  =  0.30 deg, pitch =  1.54 deg, and yaw   = -0.99 deg
Wind speed: 21.00 m/s, Omega: 7.50 rpm, Cp: 0.063, T: 927 kN
Found mean offets of FOWT 1 with surge =  8.56 m,  sway  =  0.90,  and heave = -0.03 m
                                 roll  =  0.26 deg, pitch =  1.25 deg, and yaw   = -1.22 deg
Wind speed: 23.00 m/s, Omega: 7.50 rpm, Cp: 0.048, T: 852 kN
Found mean offets of FOWT 1 with surge =  7.96 m,  sway  =  1.03,  and heave = -0.03 m
                                 roll  =  0.21 deg, pitch =  1.02 deg, and yaw   = -1.47 deg
Wind speed: 25.00 m/s, Omega: 7.50 rpm, Cp: 0.037, T: 793 kN
Found mean offets of FOWT 1 with surge =  7.47 m,  sway  =  1.16,  and heave = -0.03 m
                                 roll  =  0.16 deg, pitch =  0.85 deg, and yaw   = -1.74 deg
Warning: turbine status is 'parked' so rotor fluid loads are neglected.
Found mean offets of FOWT 1 with surge =  0.41 m,  sway  = -0.00,  and heave =  0.00 m
                                 roll  = -0.00 deg, pitch = -2.24 deg, and yaw   = -0.00 deg
Warning: turbine status is 'parked' so rotor fluid loads are neglected.
Found mean offets of FOWT 1 with surge =  0.41 m,  sway  = -0.00,  and heave = -0.00 m
                                 roll  =  0.00 deg, pitch = -2.24 deg, and yaw   = -0.00 deg
Warning: turbine status is 'parked' so rotor fluid loads are neglected.
Found mean offets of FOWT 1 with surge =  0.41 m,  sway  = -0.00,  and heave = -0.00 m
                                 roll  =  0.00 deg, pitch = -2.24 deg, and yaw   = -0.00 deg
Nonlinear constraints
{'raft.Max_Offset': array([20.76289509]),
 'raft.max_nac_accel': array([1.79323889]),
 'raft.rotor_overspeed': array([-1.]),
 'sse_tune.tune_rosco.PC_Ki': array([-0.14387876]),
 'sse_tune.tune_rosco.PC_Kp': array([-1.4046555])}

Linear constraints
None

Objectives
{'floatingse.system_structural_mass': array([10171143.13687066])}

Traceback (most recent call last):
  File "C:\Users\mauri\WEIS\examples\04_rir\umaine_semi_raft_opt_driver.py", line 14, in <module>
    wt_opt, modeling_options, opt_options = weis_main(fname_wt_input,
                                            ~~~~~~~~~^^^^^^^^^^^^^^^^
                                                     fname_modeling_options,
                                                     ^^^^^^^^^^^^^^^^^^^^^^^
                                                     fname_analysis_options,
                                                     ^^^^^^^^^^^^^^^^^^^^^^^
                                                     test_run=TEST_RUN
                                                     ^^^^^^^^^^^^^^^^^
                                                     )
                                                     ^
  File "C:\Users\mauri\WEIS\weis\main.py", line 110, in weis_main
    wt_opt, modeling_options, opt_options = run_weis(fname_wt_input,
                                            ~~~~~~~~^^^^^^^^^^^^^^^^
                                                     fname_modeling_options,
                                                     ^^^^^^^^^^^^^^^^^^^^^^^
    ...<4 lines>...
                                                     prepMPI=False,
                                                     ^^^^^^^^^^^^^^
                                                     maxnP=maxnP)
                                                     ^^^^^^^^^^^^
  File "C:\Users\mauri\WEIS\weis\glue_code\runWEIS.py", line 185, in run_weis
    wt_opt.run_driver()
    ~~~~~~~~~~~~~~~~~^^
  File "C:\Users\mauri\miniforge3\envs\weis-env-rir\Lib\site-packages\openmdao\core\problem.py", line 728, in run_driver
    return driver._run()
           ~~~~~~~~~~~^^
  File "C:\Users\mauri\miniforge3\envs\weis-env-rir\Lib\site-packages\openmdao\core\driver.py", line 829, in _run
    self.result.success = not self.run()
                              ~~~~~~~~^^
  File "C:\Users\mauri\miniforge3\envs\weis-env-rir\Lib\site-packages\wisdem\optimization_drivers\nlopt_driver.py", line 382, in run
    opt_prob.optimize(x_init)
    ~~~~~~~~~~~~~~~~~^^^^^^^^
  File "C:\Users\mauri\miniforge3\envs\weis-env-rir\Lib\site-packages\nlopt.py", line 452, in optimize
    return _nlopt.opt_optimize(self, *args)
           ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
nlopt.invalid_argument

Expected behavior

Running the optimisation, changing the value of only 6 (outer_diameter) + 6 (thicknesses) of the tower.

Code versions

List versions only if relevant

  • Python 3.13
  • WEIS 2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions