cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c df_main.f version 1.0 c c Steffen A. Bass 4/2008 c c This program reads in the (Lagrangian) 3D Hydro evolution c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc program df_main implicit none include 'df_coms.f' integer nevent,iret,i,j real*8 deltat,energ ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c open hydro files #1 ccccccccccccccccccccccccccccccccccccccccccccc OPEN(UNIT=30,FILE='T1X',STATUS='old') OPEN(UNIT=31,FILE='T1V',STATUS='old') OPEN(UNIT=32,FILE='T1T',STATUS='old') ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c loop over timesteps 0 to 500 cccccccccccccccccccccccccccccccccccc do 22 tstep=0,500,MABIKT call read_hydrostep c do physics here... call do_physics c close timeteps #1 cccccccccccccccccccccccccccccccccccccccccccccccc 22 continue close(30) close(31) close(32) cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cdebug c write(6,*) ' terminating after 5 fm/c ' c goto 30 c open hydro files #2 ccccccccccccccccccccccccccccccccccccccccccccc OPEN(UNIT=30,FILE='T2X',STATUS='old') OPEN(UNIT=31,FILE='T2V',STATUS='old') OPEN(UNIT=32,FILE='T2T',STATUS='old') ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c loop over timesteps 500 to 1000 ccccccccccccccccccccccccccccccccc do 23 tstep=500+MABIKT,1000,MABIKT call read_hydrostep c do physics (make subroutine for that...) call do_physics c close timeteps #2 cccccccccccccccccccccccccccccccccccccccccccccccc 23 continue close(30) close(31) close(32) cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc cdebug write(6,*) ' terminating after 10 fm/c ' goto 30 c open hydro files #3 ccccccccccccccccccccccccccccccccccccccccccccc OPEN(UNIT=30,FILE='T3X',STATUS='old') OPEN(UNIT=31,FILE='T3V',STATUS='old') OPEN(UNIT=32,FILE='T3T',STATUS='old') ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c loop over timesteps 1000 to 2000 ccccccccccccccccccccccccccccccccc do 24 tstep=1000+MABIKT,2000,MABIKT call read_hydrostep c do physics (make subroutine for that...) call do_physics c close timeteps #3 cccccccccccccccccccccccccccccccccccccccccccccccc 24 continue close(30) close(31) close(32) cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc 30 continue end cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c SUBROUTINES cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc subroutine read_hydrostep implicit none include 'df_coms.f' integer icell,tstep_f1,tstep_f2,tstep_f3,ierror write(6,*) write(6,*) '-> reading hydro: timestep # ',tstep ierror=0 c read in timestep do 31 icell=1,maxn read(30,990) tstep_f1,h_rx(icell),h_ry(icell),h_reta(icell) read(31,990) tstep_f2,h_vx(icell),h_vy(icell),h_veta(icell) read(32,991) tstep_f3,temp(icell),mu(icell),h_rqgp(icell), & iphase(icell) cdebug c write(6,*) icell,tstep_f2,temp(icell),h_vx(icell) c write(6,*) icell,h_vx(icell),h_vy(icell),h_veta(icell) 31 continue if(tstep_f1.ne.tstep) then write(6,*) 'input mismatch error T*X! - terminating...' ierror=1 endif if(tstep_f2.ne.tstep) then write(6,*) 'input mismatch error T*V! - terminating...' ierror=1 endif if(tstep_f1.ne.tstep) then write(6,*) 'input mismatch error T*T! - terminating...' ierror=1 endif if(ierror.eq.1) stop 990 FORMAT(I5,E15.6,E15.6,E15.6) 991 FORMAT(I5,E15.6,E15.6,E15.6,I5) return end cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc subroutine do_physics implicit none include 'df_coms.f' real*8 tau,deltat,energ,betax,betay,betaz integer icell,i,j,k real*8 T real*8 theta,phi,rr,dum c set deltat deltat = (dt*MABIKT) tau=initt+dt*tstep write(6,*) ' time : ',tau do 10 icell=1,maxn write(6,*) ' icell = ',icell write(6,*) ' phase-tag ', & iphase(icell) write(6,*) ' temperature [GeV] = ', & temp(icell)*inv_fm_to_GeV write(6,*) ' chem. pot. [GeV] = ', & mu(icell)*inv_fm_to_GeV write(6,*) ' QGP ratio ', & h_rqgp(icell) 10 continue return end cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc subroutine cell_to_grid(icell,ix,iy,iz) c converts a given cell# into grid coordinates ix,iy,iz implicit none include 'df_coms.f' integer icell,ix,iy,iz if(icell.lt.1.or.icell.gt.maxn) then write(6,*) ' ERROR - cell_to_grid: icell out of bounds ',icell stop endif IX = ICELL - INT((ICELL-1)/MAXX)*MAXX-1 IY = INT((ICELL-1)/MAXX) IZ = INT((ICELL-1)/MAXX/MAXY) return end cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc subroutine grid_to_cell(icell,ix,iy,iz) c converts a given set of grid coordinates ix,iy,iz to a cell# implicit none include 'df_coms.f' integer icell,ix,iy,iz,iix,iiy,iiz c if(ix.lt.0.or.iy.lt.0.or.iz.lt.0.or.ix.gt.maxx.or.iy.gt.maxy c & .or.iz.gt.maxz) then c write(6,*) 'ERROR - grid_to_cell: out of bounds ',ix,iz,iz c stop c endif c truncate grid coordinates iix=max(0,min(maxx,ix)) iiy=max(0,min(maxy,iy)) iiz=max(0,min(maxz,iz)) ICELL = 1 + IIX + (MAXX*(IIY + MAXY*IIZ) ) return end