def special_fixed_Ye(EOSlist,temps,yes,mytype): for ieos in range(len(EOSlist)): myeos = eosDriver(EOSlist[ieos][1]) rhomax = (10.0e0**max(myeos.h5file['logrho']))*0.995 for jj in range(len(yes)): par1 = 0.0 par2 = yes[jj] print "Y_e: %15.6E" % (par2) print "Preparing EOS table: ",EOSlist[ieos][0], mytype makeeostable.makeeostable(\ nrhos,rhomin,rhomax,myeos,EOSlist[ieos][0],\ mytype,par1,par2) del myeos
def fixed_temp_betaeq(EOSlist,temps): for ieos in range(len(EOSlist)): myeos = eosDriver(EOSlist[ieos][1]) rhomax = (10.0e0**max(myeos.h5file['logrho']))*0.995 for ii in range(len(temps)): mytype = "fixed_temp_betaeq" par1 = temps[ii] par2 = 0.0 print "T = %5.2f, betaeq" % (par1) print "Preparing EOS table: ",EOSlist[ieos][0], mytype makeeostable.makeeostable(\ nrhos,rhomin,rhomax,myeos,EOSlist[ieos][0],\ mytype,par1,par2) del myeos
for i in range(ntemp): temps[i] = 0.5 + dtemp*i for ii in range(len(temps)): for jj in range(len(yes)): mytype = "fixed_ye_temp" par1 = temps[ii] par2 = yes[jj] print "T = %5.2f, Y_e = %5.2f" % (par1,par2) print "Preparing EOS table: ",mytype rhomin = 1.0e6 rhomax = 8.0e15 tovinfo.eoslrhomin = log10(rhomin*rho_gf) tovinfo.eoslrhomax = log10(rhomax*rho_gf) (tovinfo.eostable,tovinfo.eosepsshift,dlrho,tovinfo.logrhos) \ = makeeostable.makeeostable(\ tovinfo.nrhos,rhomin,rhomax,myeos,mytype,par1,par2) tovinfo.eosdlrho = dlrho tovinfo.eosdlrhoi = 1.0/dlrho (tovinfo.minpress,bogus) = tabeos_press_eps(rho_gf*rhomin,tovinfo) outdata = tov_sequence(3.0e14,7.0e15,50,tovinfo) filename = mytype+"_T%06.3f_Ye%06.3f.dat" % (par1, par2) outfile=open(filename,"w") for i in range(len(outdata[:,0])): line = "%15.6E %15.6E\n" % (outdata[i,3]*inv_length_gf,outdata[i,1]) outfile.write(line) outfile.close() # Look where baryonic mass is maximal, not gravitational
tovinfo.polyG = 2.0 tovinfo.nzones = 50000 tovinfo.rmax = 50.0 tovinfo.eostype = 3 mytype = "fixed_ye_entropy" par1 = 3.0 par2 = 0.15 rhomin = 1.0e6 rhomax = 8.0e15 tovinfo.eoslrhomin = log10(rhomin * rho_gf) tovinfo.eoslrhomax = log10(rhomax * rho_gf) (tovinfo.eostable, tovinfo.eosepsshift, dlrho, tovinfo.logrhos) = makeeostable.makeeostable( tovinfo.nrhos, rhomin, rhomax, myeos, mytype, par1, par2 ) tovinfo.eosdlrho = dlrho tovinfo.eosdlrhoi = 1.0 / dlrho (tovinfo.minpress, bogus) = tabeos_press_eps(rho_gf * rhomin, tovinfo) rho_c = 4.717563e-04 rho_c = 2.0e14 * rho_gf rho_c = 8.615461e-04 rho_c = 4.0e14 * rho_gf rho_c = 6.864997e-04 rho_c = 7.705537e-3 rho_c = 2.457988871e15 * rho_gf rho_c = 5.179065137e-04