Skip to content

Commit

Permalink
Merge pull request WISDEM#26 from dzalkind/move_oftools
Browse files Browse the repository at this point in the history
Move ofTools
  • Loading branch information
nikhar-abbas authored Feb 3, 2021
2 parents ff4ec14 + 9540362 commit 65620c1
Show file tree
Hide file tree
Showing 32 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions Examples/ROSCO_walkthrough.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"from ROSCO_toolbox import utilities as ROSCO_utilities\n",
"from ROSCO_toolbox import controller as ROSCO_controller\n",
"from ROSCO_toolbox import control_interface as ROSCO_ci\n",
"from ofTools.fast_io.output_processing import output_processing\n"
"from ROSCO_toolbox.ofTools.fast_io.output_processing import output_processing\n"
]
},
{
Expand Down Expand Up @@ -648,4 +648,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
2 changes: 1 addition & 1 deletion Examples/example_08.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import matplotlib.pyplot as plt
# ROSCO toolbox modules
from ROSCO_toolbox import utilities as ROSCO_utilities
from ofTools.fast_io import output_processing
from ROSCO_toolbox.ofTools.fast_io import output_processing
import os

this_dir = os.path.dirname(__file__)
Expand Down
8 changes: 4 additions & 4 deletions ROSCO_testing/ROSCO_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
import glob
import multiprocessing as mp

import ofTools.fast_io.read_fast_input as fast_io
from ofTools.fast_io.FAST_reader import InputReader_OpenFAST
from ofTools.case_gen.CaseGen_IEC import CaseGen_IEC
from ofTools.case_gen.runFAST_pywrapper import runFAST_pywrapper_batch
import ROSCO_toolbox.ofTools.fast_io.read_fast_input as fast_io
from ROSCO_toolbox.ofTools.fast_io.FAST_reader import InputReader_OpenFAST
from ROSCO_toolbox.ofTools.case_gen.CaseGen_IEC import CaseGen_IEC
from ROSCO_toolbox.ofTools.case_gen.runFAST_pywrapper import runFAST_pywrapper_batch



Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os, itertools
import numpy as np
from ofTools.util.FileTools import save_yaml
from ROSCO_toolbox.ofTools.util.FileTools import save_yaml

def save_case_matrix_direct(case_list, dir_matrix):
### assumes all elements of the list are dict for that case that has the same keys!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import os, sys, copy, itertools
import multiprocessing as mp

from ofTools.case_gen.CaseGen_General import CaseGen_General, save_case_matrix, save_case_matrix_yaml
from ofTools.fast_io.pyIECWind import pyIECWind_extreme, pyIECWind_turb
from ROSCO_toolbox.ofTools.case_gen.CaseGen_General import CaseGen_General, save_case_matrix, save_case_matrix_yaml
from ROSCO_toolbox.ofTools.fast_io.pyIECWind import pyIECWind_extreme, pyIECWind_turb

try:
from mpi4py import MPI
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
import multiprocessing as mp
# sys.path.insert(0, os.path.abspath(".."))

from ofTools.fast_io.FAST_reader import InputReader_Common, InputReader_OpenFAST, InputReader_FAST7
from ofTools.fast_io.FAST_writer import InputWriter_Common, InputWriter_OpenFAST, InputWriter_FAST7
from ofTools.fast_io.FAST_wrapper import FastWrapper
from ofTools.fast_io.FAST_post import FAST_IO_timeseries
from ROSCO_toolbox.ofTools.fast_io.FAST_reader import InputReader_Common, InputReader_OpenFAST, InputReader_FAST7
from ROSCO_toolbox.ofTools.fast_io.FAST_writer import InputWriter_Common, InputWriter_OpenFAST, InputWriter_FAST7
from ROSCO_toolbox.ofTools.fast_io.FAST_wrapper import FastWrapper
from ROSCO_toolbox.ofTools.fast_io.FAST_post import FAST_IO_timeseries

import numpy as np

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from __future__ import print_function
from ofTools.fast_io.output_processing import output_processing
from ROSCO_toolbox.ofTools.fast_io.output_processing import output_processing
import ROSCO_toolbox

def FAST_IO_timeseries(fname):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from functools import reduce
import operator

from ofTools.fast_io.FAST_vars import FstModel
from ROSCO_toolbox.ofTools.fast_io.FAST_vars import FstModel
from ROSCO_toolbox.utilities import read_DISCON, load_from_txt
from ROSCO_toolbox import turbine as ROSCO_turbine
ROSCO = True
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from numpy import zeros, array
import numpy as np
from ofTools.fast_io.FAST_vars_out import FstOutput, Fst7Output
from ROSCO_toolbox.ofTools.fast_io.FAST_vars_out import FstOutput, Fst7Output

# This variable tree contains all parameters required to create a FAST model
# for FAST versions 7 and 8.
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import numpy as np
from functools import reduce

from ofTools.fast_io.FAST_reader import InputReader_Common, InputReader_OpenFAST, InputReader_FAST7
from ofTools.fast_io.FAST_vars import FstModel
from ROSCO_toolbox.ofTools.fast_io.FAST_reader import InputReader_Common, InputReader_OpenFAST, InputReader_FAST7
from ROSCO_toolbox.ofTools.fast_io.FAST_vars import FstModel

from ROSCO_toolbox.utilities import write_rotor_performance, write_DISCON
ROSCO = True
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from itertools import takewhile
import struct

from ofTools.util import spectral
from ROSCO_toolbox.ofTools.util import spectral

class output_processing():
'''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import os, sys
# import matplotlib.pyplot as plt

from ofTools.fast_io.turbsim_io.turbsim_writer import TurbsimBuilder
from ofTools.fast_io.turbsim_io.turbsim_wrapper import Turbsim_wrapper
from ofTools.fast_io.turbsim_io.turbsim_vartrees import turbsiminputs
from ROSCO_toolbox.ofTools.fast_io.turbsim_io.turbsim_writer import TurbsimBuilder
from ROSCO_toolbox.ofTools.fast_io.turbsim_io.turbsim_wrapper import Turbsim_wrapper
from ROSCO_toolbox.ofTools.fast_io.turbsim_io.turbsim_vartrees import turbsiminputs

# from AeroelasticSE.Turbsim_mdao.pyturbsim_wrapper import pyTurbsim_wrapper

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ofTools.fast_io.turbsim_io.turbsim_vartrees import turbsiminputs
from ofTools.fast_io.turbsim_io.turbulence_spectrum import turb_specs
from ofTools.fast_io.turbsim_io.wind_profile_writer import write_wind
from ROSCO_toolbox.ofTools.fast_io.turbsim_io.turbsim_vartrees import turbsiminputs
from ROSCO_toolbox.ofTools.fast_io.turbsim_io.turbulence_spectrum import turb_specs
from ROSCO_toolbox.ofTools.fast_io.turbsim_io.wind_profile_writer import write_wind
import os
import numpy as np
import random
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions ROSCO_toolbox/turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def load_from_fast(self, FAST_InputFile,FAST_directory, FAST_ver='OpenFAST',dev_
txt_filename: str, optional
filename for *.txt, only used if rot_source='txt'
"""
from ofTools.fast_io.FAST_reader import InputReader_OpenFAST
from ROSCO_toolbox.ofTools.fast_io.FAST_reader import InputReader_OpenFAST

print('Loading FAST model: %s ' % FAST_InputFile)
self.TurbineName = FAST_InputFile.strip('.fst')
Expand Down Expand Up @@ -316,8 +316,8 @@ def generate_rotperf_fast(self, openfast_path, FAST_runDirectory=None, run_BeamD
'serial' - run in serial, 'multi' - run using python multiprocessing tools,
'mpi' - run using mpi tools
'''
from ofTools.case_gen import runFAST_pywrapper, CaseGen_General
from ofTools.util import FileTools
from ROSCO_toolbox.ofTools.case_gen import runFAST_pywrapper, CaseGen_General
from ROSCO_toolbox.ofTools.util import FileTools
# Load pCrunch tools
from pCrunch import pdTools, Processing

Expand Down Expand Up @@ -499,7 +499,7 @@ def load_blade_info(self):
-----------
self - note: needs to contain fast input file info provided by load_from_fast.
'''
from ofTools.fast_io.FAST_reader import InputReader_OpenFAST
from ROSCO_toolbox.ofTools.fast_io.FAST_reader import InputReader_OpenFAST
from wisdem.ccblade.ccblade import CCAirfoil, CCBlade

# Create CC-Blade Rotor
Expand Down
2 changes: 1 addition & 1 deletion ROSCO_toolbox/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from itertools import takewhile, product
import struct

from ofTools.util import spectral
from ROSCO_toolbox.ofTools.util import spectral
# Some useful constants
now = datetime.datetime.now()
pi = np.pi
Expand Down

0 comments on commit 65620c1

Please sign in to comment.