option to generate aero in initialaeroelasticloader
@@ -29,6 +29,10 @@ class InitialAeroelasticLoader(BaseSolver):
settings_default['include_forces'] = True
settings_description['include_forces'] = 'Map the forces'
+ settings_types['generate_aero'] = 'bool'
+ settings_default['generate_aero'] = False
+ settings_description['generate_aero'] = 'Generate the aerodynamics grids from scratch'
+
settings_table = su.SettingsTable()
__doc__ += settings_table.generate(settings_types, settings_default, settings_description)
@@ -78,6 +82,20 @@ class InitialAeroelasticLoader(BaseSolver):
exceptions.NotValidInputFile(error_msg)
# Copy aero information
+ if self.settings['generate_aero']:
+ # Generate aerodynamic surface
+ self.data.aero.generate_zeta_timestep_info(structural_step,
+ aero_step,
+ self.data.structure,
+ self.data.aero.aero_settings)
+ # generate the wake because the solid shape might change
+ self.data.aero.wake_shape_generator.generate({'zeta': aero_step.zeta,
+ 'zeta_star': aero_step.zeta_star,
+ 'gamma': aero_step.gamma,
+ 'gamma_star': aero_step.gamma_star,
+ 'dist_to_orig': aero_step.dist_to_orig})
+
+ else:
attributes = ['zeta', 'zeta_star', 'normals',
'gamma', 'gamma_star',
'u_ext', 'u_ext_star',]
