Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug / Typo in gc_PoseOptimization.py #234

Closed
damien-castaignet opened this issue Sep 22, 2023 · 3 comments · Fixed by #251
Closed

Bug / Typo in gc_PoseOptimization.py #234

damien-castaignet opened this issue Sep 22, 2023 · 3 comments · Fixed by #251

Comments

@damien-castaignet
Copy link

Small bug / typo in gc_PosOptimization:

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

I believe that

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

should be

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

@dzalkind
Copy link
Collaborator

Thanks for catching this, Damien!

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

Best, Dan

@mlidGWT
Copy link

mlidGWT commented Oct 19, 2023

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
Copy link
Collaborator

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

@dzalkind dzalkind linked a pull request Dec 22, 2023 that will close this issue
11 tasks
@dzalkind dzalkind closed this as completed Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants