def parse_results_no_extopt(): ''' parse the results of an OpenWind run WITHOUT external optimization ''' self.gross_aep, self.array_aep, self.net_aep, owTurbs = utils.rdReport(rptpath, debug=self.debug) self.turbine_number = len(owTurbs) # Set the output variables self.array_efficiency = self.array_aep / self.gross_aep self.gross_aep = self.gross_aep * 1000000.0 # gWh to kWh self.array_aep = self.array_aep * 1000000.0 self.net_aep = self.net_aep * 1000000.0 # find net aep (not using openwind for these since they may be inputs from other models) self.net_aep = self.net_aep * self.availability * (1-self.other_losses) # find array efficiency self.array_losses = 1 - (self.array_aep/self.gross_aep)
def parse_results_no_extopt(): ''' parse the results of an OpenWind run WITHOUT external optimization ''' self.gross_aep, self.array_aep, self.net_aep, owTurbs = utils.rdReport( rptpath, debug=self.debug) self.turbine_number = len(owTurbs) # Set the output variables self.array_efficiency = self.array_aep / self.gross_aep self.gross_aep = self.gross_aep * 1000000.0 # gWh to kWh self.array_aep = self.array_aep * 1000000.0 self.net_aep = self.net_aep * 1000000.0 # find net aep (not using openwind for these since they may be inputs from other models) self.net_aep = self.net_aep * self.availability * (1 - self.other_losses) # find array efficiency self.array_losses = 1 - (self.array_aep / self.gross_aep)
def execute(self): """ Executes our file-wrapped component. """ if self.debug: sys.stderr.write(" In {0}.execute()...\n".format(self.__class__)) # Prepare input file here # - write a new script file? # - write a new turbine file to overwrite the one referenced # in the existing script_file? # Execute the component self.command[1] = self.script_file super(OWwrapped, self).execute() if self.debug: sys.stderr.write( 'Ran openWindExtCode: dummyVbl {:} returnCode {:}\n'.format( self.dummyVbl, self.return_code)) # Parse output file dscr = rdScript(self.command[1], debug=self.debug) # get output file name from script rptpath = dscr['rptpath'] self.gross_aep, self.array_aep, self.net_aep, owTurbs = utils.rdReport( rptpath, debug=self.debug) self.turbine_number = len(owTurbs) # Set the output variables self.array_efficiency = self.array_aep / self.gross_aep self.gross_aep = self.gross_aep * 1000000.0 # gWh to kWh self.array_aep = self.array_aep * 1000000.0 self.net_aep = self.net_aep * 1000000.0 # find net aep (not using openwind for these since they may be inputs from other models) self.net_aep = self.net_aep * self.availability * (1 - self.other_losses) # find array efficiency self.array_losses = 1 - (self.array_aep / self.gross_aep)
def execute(self): """ Executes our file-wrapped component. """ if self.debug: sys.stderr.write(" In {0}.execute()...\n".format(self.__class__)) # Prepare input file here # - write a new script file? # - write a new turbine file to overwrite the one referenced # in the existing script_file? # Execute the component self.command[1] = self.script_file super(OWwrapped, self).execute() if self.debug: sys.stderr.write('Ran openWindExtCode: dummyVbl {:} returnCode {:}\n'.format(self.dummyVbl,self.return_code)) # Parse output file dscr = rdScript(self.command[1], debug=self.debug) # get output file name from script rptpath = dscr['rptpath'] self.gross_aep, self.array_aep, self.net_aep, owTurbs = utils.rdReport(rptpath, debug=self.debug) self.turbine_number = len(owTurbs) # Set the output variables self.array_efficiency = self.array_aep / self.gross_aep self.gross_aep = self.gross_aep * 1000000.0 # gWh to kWh self.array_aep = self.array_aep * 1000000.0 self.net_aep = self.net_aep * 1000000.0 # find net aep (not using openwind for these since they may be inputs from other models) self.net_aep = self.net_aep * self.availability * (1-self.other_losses) # find array efficiency self.array_losses = 1 - (self.array_aep/self.gross_aep)