From b7439ad63f3d797ac72392c03f2adfee85a37c65 Mon Sep 17 00:00:00 2001 From: dzalkind Date: Tue, 9 Feb 2021 10:12:18 -0700 Subject: [PATCH] Move example 08 output to folder --- Examples/example_08.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Examples/example_08.py b/Examples/example_08.py index 43786e823..fa0814679 100644 --- a/Examples/example_08.py +++ b/Examples/example_08.py @@ -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"] @@ -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() @@ -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')) + +