def initialise(self, data): try: self.settings = data.settings['LinearAssembler'][ 'linear_system_settings'] except KeyError: self.settings = None settings.to_custom_types(self.settings, self.settings_types, self.settings_default, no_ctype=True) if self.settings['use_euler']: self.settings['beam_settings']['use_euler'] = True # Create Linear UVLM self.uvlm = ss_interface.initialise_system('LinearUVLM') self.uvlm.initialise(data, custom_settings=self.settings['aero_settings']) if self.settings['uvlm_filename'] == '': self.uvlm.assemble(track_body=self.settings['track_body']) else: self.load_uvlm_from_file = True # Create beam self.beam = ss_interface.initialise_system('LinearBeam') self.beam.initialise(data, custom_settings=self.settings['beam_settings']) for k, v in self.uvlm.linearisation_vectors.items(): self.linearisation_vectors[k] = v for k, v in self.beam.linearisation_vectors.items(): self.linearisation_vectors[k] = v self.get_gebm2uvlm_gains(data)
def initialise(self, data, custom_settings=None): self.data = data if custom_settings: self.data.settings[self.solver_id] = custom_settings self.settings = self.data.settings[self.solver_id] # else:custom_settings else: self.settings = data.settings[self.solver_id] settings.to_custom_types(self.settings, self.settings_types, self.settings_default) # Get consistent linearisation timestep ii_step = self.settings['linearisation_tstep'] if type(ii_step) != int: ii_step = self.settings['linearisation_tstep'].value tsstruct0 = data.structure.timestep_info[ii_step] tsaero0 = data.aero.timestep_info[ii_step] # Create data.linear self.data.linear = Linear(tsaero0, tsstruct0) # Load available systems import sharpy.linear.assembler # Load roms import sharpy.rom lsys = ss_interface.initialise_system(self.settings['linear_system']) lsys.initialise(data) self.data.linear.linear_system = lsys
def initialise(self, data, custom_settings=None): self.data = data if custom_settings: self.data.settings[self.solver_id] = custom_settings self.settings = self.data.settings[self.solver_id] # else:custom_settings else: self.settings = data.settings[self.solver_id] settings.to_custom_types(self.settings, self.settings_types, self.settings_default, options=self.settings_options, no_ctype=True) # Get consistent linearisation timestep ii_step = self.settings['linearisation_tstep'] tsstruct0 = data.structure.timestep_info[ii_step] tsaero0 = data.aero.timestep_info[ii_step] try: tsstruct0.modal = data.structure.timestep_info[ self.settings['modal_tstep']].modal except AttributeError: raise AttributeError('Unable to find modal information at desired ' 'timestep {:g}'.format( self.settings['modal_tstep'])) # Create data.linear self.data.linear = Linear(tsaero0, tsstruct0) # Load available systems import sharpy.linear.assembler # Load roms import sharpy.rom lsys = ss_interface.initialise_system(self.settings['linear_system']) lsys.initialise(data) self.data.linear.linear_system = lsys