Skip to content

Commit

Permalink
Move example 08 output to folder
Browse files Browse the repository at this point in the history
  • Loading branch information
dzalkind committed Feb 9, 2021
1 parent 7d181e6 commit b7439ad
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Examples/example_08.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@
import os

this_dir = os.path.dirname(os.path.abspath(__file__))
example_out_dir = os.path.join(this_dir,'examples_out')
if not os.path.isdir(example_out_dir):
os.makedirs(example_out_dir)

# Define openfast output filenames
filenames = ["../Test_Cases/NREL-5MW/NREL-5MW.outb"]
filenames = ["../Test_Cases/IEA-15-240-RWT-UMaineSemi/IEA-15-240-RWT-UMaineSemi.outb"]
# ---- Note: Could load and plot multiple cases, textfiles, and binaries...
# filenames = ["../Test_Cases/NREL-5MW/NREL-5MW.outb",
# "../Test_Cases/NREL-5MW/NREL-5MW_ex8.outb"]
Expand All @@ -33,7 +36,9 @@
# --- Comment,uncomment, create, and change these as desired...
cases = {}
cases['Baseline'] = ['Wind1VelX', 'BldPitch1', 'GenTq', 'RotSpeed']
cases['Rotor'] = ['BldPitch1', 'GenTq', 'GenPwr']
# cases['Rotor'] = ['BldPitch1', 'GenTq', 'GenPwr']
# cases['Platform Motion'] = ['PtfmSurge', 'PtfmSway', 'PtfmHeave', 'PtfmPitch','PtfmRoll','PtfmYaw']


# Instantiate fast_IO
fast_out = output_processing.output_processing()
Expand All @@ -43,4 +48,8 @@

# Load and plot
fastout = fast_out.load_fast_out(filenames, tmin=10)
fast_out.plot_fast_out(cases=cases)
fast_out.plot_fast_out(cases=cases,showplot=False)

plt.savefig(os.path.join(example_out_dir,'08_IEA-15MW_Semi_Out.png'))


0 comments on commit b7439ad

Please sign in to comment.