WISDEM / WEIS

Wind Energy with Integrated Servo-controls Toolset
https://weis.readthedocs.io/en/latest/
Apache License 2.0
53 stars 40 forks source link

Error in Example 02 when AEP is selected for merit figure #226

Closed HCKimDaniel closed 1 year ago

HCKimDaniel commented 1 year ago

Hello,

I am running Example 02 for controller optimization. I wanted to compare the optimization results between three merit figures, which are AEP, DEL_RootMyb, and DEL_TwrBsMyt. If I select DEL_RootMyb or DEL_TwrBsMyt, it works well, but if I select AEP, it has an error as below. Can you help me for removing this error? Thank you for your time.

-----------------------------------------------------------------------------
Loading wind turbine data for NREL's ROSCO tuning and simulation processeses
-----------------------------------------------------------------------------
Loading FAST model: IEA-15-240-RWT-UMaineSemi.fst
Loading rotor performace data from text file: /home/hkim/WEIS/examples/01_aeroelasticse/OpenFAST_models/IEA-15-240-RWT/IEA-15-240-RWT/Cp_Ct_Cq.IEA15MW.txt
Traceback (most recent call last):
  File "/home/hkim/WEIS/examples/02_control_opt/weis_driver.py", line 15, in <module>
    wt_opt, modeling_options, opt_options = run_weis(fname_wt_input, fname_modeling_options, fname_analysis_options)
  File "/home/hkim/WEIS/weis/glue_code/runWEIS.py", line 147, in run_weis
    wt_opt.setup()
  File "/home/hkim/anaconda3/envs/weis-env/lib/python3.10/site-packages/openmdao/core/problem.py", line 958, in setup
    self._check_collected_errors()
  File "/home/hkim/anaconda3/envs/weis-env/lib/python3.10/site-packages/openmdao/core/problem.py", line 585, in _check_collected_errors
    raise exc_type('\n'.join(final_msg)).with_traceback(tback)
  File "/home/hkim/anaconda3/envs/weis-env/lib/python3.10/site-packages/openmdao/core/system.py", line 1500, in _setup
    self._problem_meta['relevant'] = self._init_relevance(mode)
  File "/home/hkim/anaconda3/envs/weis-env/lib/python3.10/site-packages/openmdao/core/system.py", line 2271, in _init_relevance
    responses = self.get_responses(recurse=True, get_sizes=False, use_prom_ivc=False)
  File "/home/hkim/anaconda3/envs/weis-env/lib/python3.10/site-packages/openmdao/core/system.py", line 3929, in get_responses
    raise RuntimeError(msg.format(self.msginfo, str(err)))
RuntimeError:
Collected errors for problem 'weis_driver':
   <model> <class Group>: Output not found for response 'rotorse.rp.AEP'.
dzalkind commented 1 year ago

This example does not use much of WISDEM, including the rotorse module. That is why the response is missing.

You will need to add the objective, like it is here, on the weis pose optimization method, with aeroelastic.AEP as the objective. It's probable that you'll also need logic to detect which objective to actually use within openmdao, or it will try to have both.

It's also likely that using AEP as a merit figure, without constraints on loading, will give you a controller that does not work well and may be unstable. Though if you keep the constraint on the generator speed, that should keep things somewhat stable.

HCKimDaniel commented 1 year ago

Thank you for your answer. I will try it.

HCKimDaniel commented 1 year ago

@dzalkind Thank you! It works well with aeroelastic.AEP