예제 #1
0
def run_project(args):

    opt = options.Options()

    parsed_args = opt.parse(args[1:])

    y = parsed_args.slice_yplus

    if y:
        print('Hello! ', y)

    in_dir = "/home/mknorps/Projects/ForPhD/SPECTRAL_from2011/FRACTAL/"
    out_dir = "/home/mknorps/Projects/ForPhD/SPECTRAL_from2011/FRACTAL/slices/"
    f_min = 880
    f_max = 900
    for ptype in range(4):
        for i in range(f_min, f_max):
            input_file = 'particles_0{}'.format(i)
            output_file_core = "slice_FRACTAL_center_{}_{}".format(
                p.StList2[ptype], i)
            cut_with_halo(in_dir,
                          out_dir,
                          input_file,
                          output_file_core,
                          ptype,
                          yplus=145)
예제 #2
0
def run_project(args):

    opt = options.Options()

    parsed_args = opt.parse(args[1:])

    y = parsed_args.slice_yplus

    if y:
        print('Hello! ', y)

    s.write_to_file(f.file_path_write)
    s.symmetrise(f.file_path_write, f.file_path_symm)

    d.draw_diss_tot(f.file_path_symm, f.file_path_main + "diss.pdf")
    d.draw_diss_model(f.file_path_symm, f.file_path_main + "diss_model.pdf")
예제 #3
0
def run_project(args):

    opt = options.Options()

    parsed_args = opt.parse(args[1:])

    y = parsed_args.slice_yplus

    if y:
        print('Hello! ', y)

    #s.write_to_file(f.file_path_write)

    data = d.DrawU2sgs()
    data.draw_u2sgs(f.file_path_main + "u2sgs.pdf")
    data.draw_ksgs(f.file_path_main + "ksgs.pdf")
    data.draw_sigma_check(f.file_path_main + "sigma_check.pdf")
예제 #4
0
def run_project(args):

    opt = options.Options()

    parsed_args = opt.parse(args[1:])

    #    ct = parsed_args.particle_type

    #ts.write_to_file(f.file_path_write, symm=False)
    #ts.write_to_file(f.file_path_write_symm)

    data = pd.read_csv(f.file_path_write)
    data_symm = pd.read_csv(f.file_path_write_symm)

    td.draw_tau(data, f.data_path + "test.pdf")
    td.draw_tau_symm(data_symm, f.data_path + "model_tausg_symm.pdf")

    optimal = ts.optimize_tau_fluid(f.file_path_write_symm)
예제 #5
0
def run_project(args):

    opt = options.Options()

    parsed_args = opt.parse(args[1:])

    y = parsed_args.slice_yplus

    if y:
        print('Hello! ', y)


#    for key in f.prange.keys():
#        c.write_to_file(f.file_path_write+key+".csv",key)

    data = draw.Draw()
    #    data.draw_ur(f.file_path_main + "ur.pdf")
    #    data.draw_urnorm2(f.file_path_main + "urnorm2.pdf")
    data.draw_alpha(f.file_path_main + "alpha.pdf")
예제 #6
0
def run_project(args):

    opt = options.Options()

    parsed_args = opt.parse(args[1:])

    y = parsed_args.slice_yplus

    d1 = 2**(-1 / 3)
    d2 = -2**(-1 / 3)

    w3_LES = fractal_interpolation(at.w(Ufx, d1, d2, 3), len(Ufx))
    w3_from_resampled = fractal_interpolation(at.w(Ux_resampled, d1, d2, 3),
                                              len(Ufx))
    label = {0: '$W^{3}$: filtered DNS', 1: '$W^{3}$: resampled DNS'}

    draw_fractal('LES_and_resampled.pdf',
                 w3_LES,
                 w3_from_resampled,
                 label=label)
    draw_fractal('LES_and_DNS.pdf')

    ek = kinetic_energy(Ux, Ufx, Ux_resampled, w3_LES['y'],
                        w3_from_resampled['y'])
    fft = fourier_transform(Ux, Ufx, Ux_resampled, w3_LES['y'],
                            w3_from_resampled['y'])

    plt.figure(figsize=(8, 4))
    sns.violinplot(data=list(fft.values())[:3])
    plt.xticks(plt.xticks()[0], fft.keys())
    plt.tight_layout()
    plt.savefig("fractal_violinplot_ftt.pdf")

    for_box = {
        'DNS': Ux,
        'filtered DNS': Ufx,
        '$W^{3}$: filtered': w3_LES['y'],
        'resampled DNS': Ux_resampled,
        '$W^{3}$: resampled': w3_from_resampled['y']
    }

    colors = {
        i: v
        for i, v in enumerate(
            ['lightgrey', 'lightgrey', 'darkorange', 'lightgrey', 'slateblue'])
    }
    plt.figure(figsize=(8, 4))
    sns.violinplot(data=list(for_box.values()),
                   orient='v',
                   palette=colors,
                   inner='quartile',
                   bw='silverman')
    plt.xticks(plt.xticks()[0], for_box.keys())
    plt.tight_layout()
    plt.savefig("fractal_violinplot.pdf")

    plt.figure(figsize=(8, 4))
    sns.boxplot(data=list(for_box.values()))
    plt.xticks(plt.xticks()[0], for_box.keys())
    plt.tight_layout()
    plt.savefig("fractal_boxplot.pdf")