Exemplo n.º 1
0
def pbpb_collisions(fout,
                    cent_min=0,
                    cent_max=5,
                    edmax=85,
                    idx=0,
                    etaos=0.0,
                    gpu_id=3):
    ''' Run event_by_event hydro, with initial condition 
    from smearing on the particle list'''
    if not os.path.exists(fout):
        os.mkdir(fout)
    cfg.NX = 361
    cfg.NY = 361
    cfg.NZ = 121
    cfg.SQRT = 2760

    cfg.DT = 0.01
    cfg.DX = 0.08
    cfg.DY = 0.08
    cfg.DZ = 0.15
    cfg.IEOS = 1
    cfg.TFRZ = 0.137

    cfg.A = 208
    cfg.Ra = 6.62
    cfg.Edmax = edmax
    cfg.Eta = 0.546
    cfg.Si0 = 6.4
    cfg.ImpactParameter = 2.65
    cfg.Eta_gw = 1.8
    cfg.Eta_flat = 2.0

    cfg.ntskip = 30
    cfg.nxskip = 4
    cfg.nyskip = 4
    cfg.nzskip = 2

    cfg.Hwn = 0.95

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

    cfg.save_to_hdf5 = True

    comments = 'pb+pb test, cent_min=%s, cent_max=%s, etaos=%s' % (
        cent_min, cent_max, etaos)

    t0 = time()

    visc = CLVisc(cfg, gpu_id=gpu_id)

    visc.optical_glauber_ini(system='Pb+Pb',
                             cent_min=cent_min,
                             cent_max=cent_max,
                             save_binary_collisions=True)

    visc.evolve(max_loops=4000,
                save_hypersf=True,
                save_bulk=True,
                save_vorticity=False)

    write_config(cfg, comments)
    t1 = time()
    print('finished. Total time: {dtime}'.format(dtime=t1 - t0))
Exemplo n.º 2
0
    cfg.sz_real = np.dtype('float32').itemsize   #==sizeof(float) in c
    cfg.sz_real4 = array.vec.float4.itemsize
    cfg.sz_real8 = array.vec.float8.itemsize
else :
    cfg.real = np.float64
    cfg.real4 = array.vec.double4
    cfg.real8 = array.vec.double8
    cfg.sz_real = np.dtype('float64').itemsize   #==sizeof(double) in c
    cfg.sz_real4= array.vec.double4.itemsize
    cfg.sz_real8= array.vec.double8.itemsize


visc = CLVisc(cfg, gpu_id=cfg.GPU_ID)

if cfg.initial_condition == 'Glauber':
    visc.optical_glauber_ini()

visc.evolve(max_loops=2000, save_hypersf=True, save_bulk=False,
        force_run_to_maxloop=False, save_vorticity=False)

t1 = time()
print('finished. Total time: {dtime}'.format(dtime = t1-t0), file=sys.stdout)

from subprocess import call

# get particle spectra from MC sampling and force decay
call(['python', 'spec.py', '--event_dir', cfg.fPathOut,
  '--viscous_on', "false", "--reso_decay", "true", "--nsampling", "2000",
  '--mode', 'mc'])

 # calc the smooth particle spectra