示例#1
0
def event_by_event(fname_partons, fout):
    if not os.path.exists(fout):
        os.mkdir(fout)
    cfg.NX = 201
    cfg.NY = 201
    cfg.NZ = 81

    cfg.DT = 0.005
    cfg.DX = 0.16
    cfg.DY = 0.16
    cfg.IEOS = 2
    cfg.ntskip = 60

    cfg.TAU0 = 0.4
    cfg.ETAOS = 0.16
    cfg.fPathOut = fout

    t0 = time()
    visc = CLVisc(cfg)
    visc.create_ini_from_partons(fname_partons,
                                 SIGR=0.6,
                                 SIGZ=0.6,
                                 KFACTOR=1.2)
    visc.evolve(max_loops=4000, save_hypersf=True, save_bulk=False)
    t1 = time()
    print('finished. Total time: {dtime}'.format(dtime=t1 - t0))
示例#2
0
def event_by_event(fname_partons, fout, etaos=0.0):
    if not os.path.exists(fout):
        os.mkdir(fout)
    cfg.NX = 301
    cfg.NY = 301
    cfg.NZ = 101

    cfg.DT = 0.005
    cfg.DX = 0.1
    cfg.DY = 0.1
    cfg.DZ = 0.15
    cfg.IEOS = 4
    cfg.TFRZ = 0.136

    cfg.ntskip = 60
    cfg.nzskip = 2

    cfg.TAU0 = 0.4
    cfg.ETAOS = etaos
    cfg.fPathOut = fout

    write_config(cfg)

    t0 = time()
    visc = CLVisc(cfg, gpu_id=3)
    visc.create_ini_from_partons(fname_partons, SIGR=0.6, SIGZ=0.6, KFACTOR=1.3)
    visc.evolve(max_loops=4000, save_hypersf=True, save_bulk=True, save_vorticity=True)
    t1 = time()
    print('finished. Total time: {dtime}'.format(dtime = t1-t0))
示例#3
0
def get_orbital_angular_momentum(fname_partons):
    '''calculate the initial orbital angular momentum
    for minimum bias Au+Au 200 GeV collisions
    return:
        jy = -tau0 * \int dx dy deta x * sinh(eta) * ed(x,y,eta)
        in units of hbar; where GeV*fm = 5 hbar'''
    cfg.NX = 301
    cfg.NY = 301
    cfg.NZ = 61

    cfg.DT = 0.005
    cfg.DX = 0.1
    cfg.DY = 0.1
    cfg.IEOS = 0
    cfg.ntskip = 60

    cfg.TAU0 = 0.4
    cfg.ETAOS = 0.0

    write_config(cfg)

    t0 = time()
    visc = CLVisc(cfg, gpu_id=1)
    visc.create_ini_from_partons(fname_partons, SIGR=0.6, SIGZ=0.6, KFACTOR=1.3)
    visc.ideal.ev_to_host()
    ed = visc.ideal.h_ev1[:,0].reshape(cfg.NX, cfg.NY, cfg.NZ)
    x = np.linspace(-15, 15, cfg.NX, endpoint=True)
    y = np.ones(cfg.NY)
    eta_s = np.linspace(-9, 9, cfg.NZ, endpoint=True)

    xx, yy, hh = np.meshgrid(x, y, eta_s, indexing='ij')

    jy = - xx * np.sinh(hh) * ed * cfg.TAU0 * cfg.DX * cfg.DY * cfg.DZ

    #plt.imshow(xx[:,cfg.NY/2,:], origin='lower')
    #plt.colorbar()
    #plt.show()
    return jy.sum()*5.0