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

Make plot_wing callable from the file directly and document this #281

Open
johnjasa opened this issue Mar 6, 2019 · 3 comments
Open

Make plot_wing callable from the file directly and document this #281

johnjasa opened this issue Mar 6, 2019 · 3 comments

Comments

@johnjasa
Copy link
Member

johnjasa commented Mar 6, 2019

Make it easier for users to call plot_wing from the file directly instead of from the command line

@marcovanderbijl
Copy link

I failed in getting this to work, I tried;

added
from openaerostruct.utils.plot_wing import Display
Display("aero.db")
to my OAS_run_script

and got an error on import sqlitedict. This is not in the anaconda repository, but I found it at https://pypi.org/project/sqlitedict/
I installed it by opening a anaconda environment terminal and did a $pip install -U sqlitedict

running the OAS_run_script did produce the aero.db and opened a window, but failed on showing anything, claiming it was not a valid database.

@johnjasa
Copy link
Member Author

johnjasa commented Apr 19, 2019

This should work for you:

from openaerostruct.utils.plot_wing import disp_plot

args = [[], []]
args[1] = 'aero.db'
disp_plot(args=args)

Make sure you're trying to view an optimization case, not an analysis case.

Edited: changed code to reflect your suggestion.

@marcovanderbijl
Copy link

yes! success! thanks a bunch!
if someone tries to replicate, this is the complete solution:
add

from openaerostruct.utils.plot_wing import disp_plot
args = [[], []]
args[1] = 'aero.db'
disp_plot(args=args)

to your optimization case OAS_run_file
as I am only today started to try to use OAS I used this to get the https://mdolab.github.io/OpenAeroStruct/aero_walkthrough.html completely working.

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

No branches or pull requests

2 participants