Esempio n. 1
0
    def execute(self, IEC_WindType, Uref, ver='Turbsim'):
        self.IEC_WindType = IEC_WindType
        self.Uref = Uref

        turbsim_vt = self.setup()
        writer = TurbsimBuilder()
        if ver.lower() == 'turbsim':
            wrapper = Turbsim_wrapper()
        if ver.lower() =='pyturbsim':
            wrapper = pyTurbsim_wrapper()

        # if self.case_name[-3:] != '.in':
        #     self.case_name = self.case_name + '.in'
        # self.case_name += '_U%1.1f'%self.Uref + '_Seed%1.1f'%self.seed
        # self.case_name += '_U%d'%self.Uref + '_Seed%d.in'%self.seed

        case_name = self.case_name + '_U%1.6f'%self.Uref + '_Seed%1.1f'%self.seed
        tsim_input_file = case_name + '.in'
        wind_file_out   = case_name + '.bts'

        # If wind file already exists and overwriting is turned off, skip wind file write
        if os.path.exists(os.path.join(self.outdir, wind_file_out)) and not self.overwrite:
            return wind_file_out, 3

        # Run wind file generation
        else:
            writer.turbsim_vt = turbsim_vt
            writer.run_dir = self.outdir
            writer.tsim_input_file = tsim_input_file
            writer.execute()

            wrapper.turbsim_input = os.path.realpath(os.path.join(writer.run_dir, writer.tsim_input_file))
            wrapper.run_dir = writer.run_dir
            wrapper.turbsim_exe = self.Turbsim_exe
            wrapper.debug_level = self.debug_level
            wrapper.execute()

            return wind_file_out, 3
from AeroelasticSE.Turbsim_mdao.turbsim_writer import TurbsimBuilder
from AeroelasticSE.Turbsim_mdao.turbsim_wrapper import Turbsim_wrapper
from AeroelasticSE.Turbsim_mdao.turbsim_reader import turbsimReader

reader = turbsimReader()
writer = TurbsimBuilder()
wrapper = Turbsim_wrapper()

reader.read_input_file('TurbsimInputFiles/test01.inp')

writer.turbsim_vt = reader.turbsim_vt
writer.turbsim_vt.spatialcoherance.CohExp = 0.1
writer.turbulence_template = 'TurbsimInputFiles/turbulence_user.inp'
writer.run_dir = 'test'
writer.execute()

wrapper.run_dir = writer.run_dir
wrapper.turbsim_exe = 'TurbSim_x64.exe'
wrapper.execute()
from AeroelasticSE.Turbsim_mdao.turbsim_writer import TurbsimBuilder
from AeroelasticSE.Turbsim_mdao.turbsim_wrapper import Turbsim_wrapper
from AeroelasticSE.Turbsim_mdao.turbsim_reader import turbsimReader

reader = turbsimReader()
writer = TurbsimBuilder()
wrapper = Turbsim_wrapper()

reader.read_input_file('TurbsimInputFiles/test01.inp')

writer.turbsim_vt = reader.turbsim_vt
writer.turbsim_vt.spatialcoherance.CohExp = 0.1
writer.turbulence_template = 'TurbsimInputFiles/turbulence_user.inp'
writer.run_dir = 'test'
writer.execute()

wrapper.run_dir = writer.run_dir
wrapper.turbsim_exe = '/Users/jquick/SE/TurbSim/bin/TurbSim_glin64'
wrapper.execute()