diff --git a/TurTLE/DNS_statistics.py b/TurTLE/DNS_statistics.py index 3a82e55165dddc38269495f5b18da0e579aa6b62..59f2300ea464852a9e92c433bce7f5718261978e 100644 --- a/TurTLE/DNS_statistics.py +++ b/TurTLE/DNS_statistics.py @@ -460,8 +460,14 @@ def plot_basic_stats( with self.get_data_file() as data_file: if 'CFL_velocity' in data_file['statistics'].keys(): self.statistics['CFL_velocity(t)'] = data_file['statistics/CFL_velocity'][ii0:ii1+1] + dx = ((2*np.pi/self.parameters['dkx'])/self.parameters['nx']) # Lx / nx + dy = ((2*np.pi/self.parameters['dky'])/self.parameters['ny']) + dz = ((2*np.pi/self.parameters['dkz'])/self.parameters['nz']) + if ((np.round(dx, 5) != np.round(dy, 5)) + or (np.round(dx, 5) != np.round(dz, 5))): + print('WARNING: CFL computation does not make sense for non-isotropic grids') tresolution2 = (self.parameters['dt'] * self.statistics['CFL_velocity(t)'] - / (2*np.pi/self.parameters['nx'])) + / dx) a.plot(self.statistics['t'] / self.statistics['Tint'], tresolution2, label = '$\\frac{\\Delta t}{\\Delta x} \\| u \\|_{CFL}$')