Skip to content

Commit

Permalink
Clean up example 26
Browse files Browse the repository at this point in the history
  • Loading branch information
dzalkind committed Oct 7, 2024
1 parent 39d7e84 commit 7e42a6a
Showing 1 changed file with 2 additions and 31 deletions.
33 changes: 2 additions & 31 deletions Examples/26_marine_hydro.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
import os
from rosco.toolbox.ofTools.case_gen.run_FAST import run_FAST_ROSCO
from rosco.toolbox.ofTools.case_gen import CaseLibrary as cl
#from rosco.toolbox.ofTools.fast_io import output_processing
#from rosco.toolbox.ofTools.fast_io.FAST_reader import InputReader_OpenFAST
#from rosco.toolbox.inputs.validation import load_rosco_yaml
#import matplotlib.pyplot as plt
#from rosco.toolbox.controller import OpenLoopControl


def main():
#directories
Expand Down Expand Up @@ -40,35 +36,10 @@ def main():
# r.controller_params = controller_params
r.save_dir = run_dir
r.rosco_dir = rosco_dir
# r.rosco_dll = '/Users/dzalkind/Tools/ROSCO-PRC/rosco/controller/build/libdiscon.dylib'

r.run_FAST()

print('here')


# op = output_processing.output_processing()
# op2 = output_processing.output_processing()

# md_out = op.load_fast_out([os.path.join(run_dir,'IEA15MW_cable/power_curve/base/IEA15MW_cable_0.MD.Line1.out')], tmin=0)
# local_vars = op2.load_fast_out([os.path.join(run_dir,'IEA15MW_cable/power_curve/base/IEA15MW_cable_0.RO.dbg2')], tmin=0)

# fig, axs = plt.subplots(4,1)
# axs[0].plot(local_vars[0]['Time'],local_vars[0]['CC_DesiredL'],label='CC_DesiredL')
# axs[1].plot(local_vars[0]['Time'],local_vars[0]['CC_ActuatedL'],label='CC_ActuatedL')
# axs[2].plot(local_vars[0]['Time'],local_vars[0]['CC_ActuatedDL'],label='CC_ActuatedDL')
# axs[3].plot(md_out[0]['Time'],md_out[0]['Seg20Lst'],label='Seg20Lst')

# [a.legend() for a in axs]
# [a.grid() for a in axs]

# if False:
# plt.show()
# else:
# plt.savefig(os.path.join(example_out_dir,'22_cable_control.png'))

# Check that the last segment of line 1 shrinks by 10 m
# np.testing.assert_almost_equal(md_out[0]['Seg20Lst'][-1] - md_out[0]['Seg20Lst'][0], line_ends[0], 2)



if __name__=="__main__":
Expand Down

0 comments on commit 7e42a6a

Please sign in to comment.