Make plot_wing callable from the file directly and document this
Make it easier for users to call plot_wing from the file directly instead of from the command line
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.
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.
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.