temporal fix runtime generator forces
@@ -540,6 +540,17 @@ class DynamicCoupled(BaseSolver):
else:
force_coeff = 1.
+ # Add external forces
+ if self.with_runtime_generators:
+ structural_kstep.runtime_generated_forces.fill(0.)
+ params = dict()
+ params['data'] = self.data
+ params['struct_tstep'] = structural_kstep
+ params['aero_tstep'] = aero_kstep
+ params['force_coeff'] = force_coeff
+ for id, runtime_generator in self.runtime_generators.items():
+ runtime_generator.generate(params)
+
# run the solver
ini_time_aero = time.perf_counter()
self.data = self.aero_solver.run(aero_kstep,
@@ -550,22 +561,12 @@ class DynamicCoupled(BaseSolver):
previous_kstep = structural_kstep.copy()
structural_kstep = controlled_structural_kstep.copy()
+ structural_kstep.runtime_generated_forces = previous_kstep.runtime_generated_forces.astype(dtype=ct.c_double, order='F', copy=True)
# move the aerodynamic surface according the the structural one
self.aero_solver.update_custom_grid(structural_kstep,
aero_kstep)
- # Add external forces
- if self.with_runtime_generators:
- structural_kstep.runtime_generated_forces.fill(0.)
- params = dict()
- params['data'] = self.data
- params['struct_tstep'] = structural_kstep
- params['aero_tstep'] = aero_kstep
- params['force_coeff'] = force_coeff
- for id, runtime_generator in self.runtime_generators.items():
- runtime_generator.generate(params)
-
self.map_forces(aero_kstep,
structural_kstep,
force_coeff)
