# directories = [directories[0]] for directory in directories: paths_simulations += sorted( glob(os.path.join(path_root, directory, "NS2D*"))) # Define lists froudes = [] reynoldsb = [] reynolds8 = [] anisotropies = [] dissipations = [] markers = [] for path in paths_simulations: anisotropy, ratio_diss, F_h, Re_8, R_b, l_x, l_z = get_features_from_sim( path) res = _get_resolution_from_dir(path) # Append data to lists if res == "960": markers.append("o") elif res == "1920": markers.append("s") elif res == "3840": markers.append("^") elif res == "7680": markers.append("d") froudes.append(F_h) reynoldsb.append(R_b) reynolds8.append(Re_8)
# ax.text(0.6, 2e-12, r"$\log_{10} \left(\frac{k_{x, 1/2}}{k_{x, f}}\right)$", fontsize=16) ax.tick_params(axis="x", labelsize=18) ax.tick_params(axis="y", labelsize=18) # ax.set_xlim([0.003, 1]) # ax.set_ylim([1e-9, 10]) for path in paths_simulations: gamma_str = _get_gamma_str_from_path(path) if gamma_str.startswith("2"): continue else: # F_h, Re_8, R_b = compute_buoyancy_reynolds(path) # anisotropy = compute_anisotropy(path) # dissipation = compute_ratio_dissipation(path) anisotropy, dissipation, F_h, Re_8, R_b = get_features_from_sim(path) res = _get_resolution_from_dir(path) lx, lz = compute_length_scales(path) # Compute ux_rms = [] path_phys_files = glob(path + "/state_phys_t*") for path_file in path_phys_files[-10:]: with h5py.File(path_file, "r") as f: ux = f["state_phys"]["ux"][...] ux_rms.append(np.sqrt(np.mean(ux**2))) # Load parameters params = load_params_simul(path) lzs_billant.append(lz * params.N / np.mean(ux_rms))