Fix simulation time steps
@@ -182,14 +182,14 @@ class LinDynamicSim(BaseSolver):
dt = self.settings['dt']
# Total time to run
- T = n_steps*dt
+ T = (n_steps - 1) * dt
u_ref = self.settings['reference_velocity']
# If the system is scaled:
if u_ref != 1.:
scaling_factors = self.data.linear.linear_system.uvlm.sys.ScalingFacts
dt_dimensional = scaling_factors['length'] / u_ref
- T_dimensional = n_steps * dt_dimensional
+ T_dimensional = (n_steps - 1) * dt_dimensional
T = T_dimensional / scaling_factors['time']
ss = self.data.linear.linear_system.update(self.settings['reference_velocity'])
t_dom = np.linspace(0, T, n_steps)
