예제 #1
0
def zf_shear_film(run, should_normalize):
    """
    Make film of zonal flow velocity as a function of x and t.
    """

    run.calculate_zf_shear()

    plot_options = {}
    options = {'file_name':'zf_shear',
               'film_dir':run.run_dir + 'analysis/moments',
               'frame_dir':run.run_dir + 'analysis/moments/film_frames',
               'xlabel':r'$R (m)$',
               'ylabel':r"$v'_{ZF} / v_{th,i}$",
               'bbox_inches':'tight',
               'fps':30}

    options['title'] = []
    for it in range(run.nt):
        options['title'].append(r'Time = {0:04d} $\mu s$'.format(
                                int(np.round((run.t[it]-run.t[0])*1e6))))

    pf.make_film_1d(run.r, run.zf_shear, plot_options=plot_options,
                    options=options)

    run.v_zf = None
    gc.collect()
예제 #2
0
def radial_heat_flux_film(run, should_normalize):
    """
    Make film of the radial heat flux.
    """

    run.calculate_q()
    run.q_rad = np.mean(run.q, axis=2)

    plot_options = {}
    options = {'file_name':'q_i_rad',
               'film_dir':run.run_dir + 'analysis/moments',
               'frame_dir':run.run_dir + 'analysis/moments/film_frames',
               'xlabel':r'$R (m)$',
               'ylabel':r'$\left<Q_{i}(x)\right>_y / Q_{gB}$',
               'ylim':0,
               'bbox_inches':'tight',
               'fps':30}

    options['title'] = []
    for it in range(run.nt):
        options['title'].append(r'Time = {0:04d} $\mu s$'.format(
                                int(np.round((run.t[it]-run.t[0])*1e6))))

    pf.make_film_1d(run.r, run.q_rad, plot_options=plot_options,
                    options=options)

    run.q = None
    run.q_rad = None
    gc.collect()