WISDEM / WEIS

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

Bug / Typo in gc_PoseOptimization.py #234

Closed damien-castaignet closed 9 months ago

damien-castaignet commented 1 year ago

Small bug / typo in gc_PosOptimization: https://github.com/WISDEM/WEIS/blob/e5e124c7e2340f4392127ba40f256486d5f97d40/weis/glue_code/gc_PoseOptimization.py#L122

I believe that

upper=control_opt['servo']['torque_control']['zeta_max'])

should be

upper=control_opt['servo']['torque_control']['zeta']['max'])

dzalkind commented 1 year ago

Thanks for catching this, Damien!

We're getting read to re-start development here and this looks like a quick fix.

Best, Dan

mlidGWT commented 11 months ago

Hello, I don't know if this is a related issue, but I am also getting an error with gc_PosOptimization, but related to line 390:

File "/Users/meglidrbauch/Software/WEIS/weis/glue_code/gc_PoseOptimization.py", line 390, in set_initial_weis wt_opt["tcons_post.max_allowable_td_ratio"] = blade_constr["tip_deflection"]["margin"] File "/Users/meglidrbauch/miniconda3/envs/weis-env/lib/python3.10/site-packages/openmdao/core/problem.py", line 513, in setitem self.set_val(name, value) File "/Users/meglidrbauch/miniconda3/envs/weis-env/lib/python3.10/site-packages/openmdao/core/problem.py", line 544, in set_val self.model.set_val(name, val, units=units, indices=indices) File "/Users/meglidrbauch/miniconda3/envs/weis-env/lib/python3.10/site-packages/openmdao/core/system.py", line 5368, in set_val raise KeyError(f'{model.msginfo}: Variable "{name}" not found.') KeyError: ' : Variable "tcons_post.max_allowable_td_ratio" not found.'

I am trying to run WEIS in the style of Example 02 where I specify an openfast directory, and have been troubleshooting various errors until this point, but this one has me stumped since it seems to go into my environment's python files. For reference, example_02 did execute successfully for me on my local installation, but as far as I can tell all of my input files are setup correctly for what I'm trying to do.

The preceding lines to the error above are:

Loading wind turbine data for NREL's ROSCO tuning and simulation processeses

Loading FAST model: IEA-15-240-RWT-GWTBaseline.fst Loading rotor performace data from text file: /Users/meglidrbauch/Software/LoadsRuns/SimulationLibrary/6011_SBIR/L14_InputFiles/IEA15_GWTB_Cp_Ct_Cq.txt Traceback (most recent call last):

File "/Users/meglidrbauch/Software/LoadsRuns/SimulationLibrary/6011_SBIR/weis_driver.py", line 15, in wt_opt, modeling_options, opt_options = run_weis(fname_wt_input, fname_modeling_options, fname_analysis_options) File "/Users/meglidrbauch/Software/WEIS/weis/glue_code/runWEIS.py", line 161, in run_weis wt_opt = myopt.set_initial_weis(wt_opt) File "/Users/meglidrbauch/Software/WEIS/weis/glue_code/gc_PoseOptimization.py", line 390, in set_initial_weis wt_opt["tcons_post.max_allowable_td_ratio"] = blade_constr["tip_deflection"]["margin"]

Thanks for the help! Best, Meg

UPDATE

For anyone else having these issues... I've determined that the Cp_Ct_Cq.txt file format was different for example 2 than what I had, which got me past the error above but then gave another:

RuntimeError: Collected errors for problem 'weis_driver':

: The source and target shapes do not match or are ambiguous for the connection 'rosco_turbine.Cp_table' to 'sse_tune.tune_rosco.Cp_table'. The source shape is (72, 104) but the target shape is (5, 5).

I thought that to address these errors I only had to modify the DISCON.IN file PerfTableSize parameter to match the source shape from your the message, but I am still getting the previous error. Where are the target shapes specified?

dzalkind commented 9 months ago

Hi Meg,

I'm sorry this issue is a bit stale. I'm not sure the issues are related. If you're still having issues with your example, can you post to a new issue with your exact configuration?

Best, Dan