diff --git a/pypk/solution.py b/pypk/solution.py index d2c9c7cf1d127750b4acce63ecaf6ab9dc43fa86..90805758716e4a13b875ac6673b3d1f2bae597c7 100644 --- a/pypk/solution.py +++ b/pypk/solution.py @@ -62,8 +62,8 @@ class Solution: """Find the flutter speed and display it """ found = False - self.f_speed = np.inf - self.f_mode = np.inf + self.f_speed = -1. + self.f_mode = -1 for ivel in range(len(self.speed) - 1): if (found): break @@ -82,9 +82,8 @@ class Solution: """Write results to disk sfx : filename suffix """ - hdr = '{:>8s}, {:>10s}, {:>10s}, {:>10s}'.format('Mach', 'u_f', 'mode', 'AGG(g)') - np.savetxt(f'results_{self._name}{sfx}.dat', np.array([self._mach, self.f_speed, self.f_mode, self.damp_agg]).reshape(1,4), fmt='%10.4f', delimiter=', ', header=hdr) - hdr = '{:>9s}'.format('u_inf') + hdr = 'Mach={:.2f}, u_f={:.2f}, mode={:d}, AGG(g)={:.2f}\n'.format(self._mach, self.f_speed, self.f_mode, self.damp_agg) + hdr += '{:>9s}'.format('u_inf') for j in range(self.n_modes): hdr += ', {:>11s}'.format(f'f_{j}') for j in range(self.n_modes):