Ejemplo n.º 1
0
def printAnalyticalTimes(isMVD):
	T = 8000.0
	mu = 0.5

	for row in range(9):
		mass = massList[row]
		mdot = mdotList[row]
		vinf = vinfList[row]
		nh = mvd_iden if isMVD else  mvt_iden
		times = mvd_times if isMVD else mvt_times

		tableline = "\multirow{3}{*}{\\num{" + str(mass) + "}} & {$t_\\mathrm{P}^\\mathrm{RB}$}"
		for col in range(5):
			tableline = tableline + " & "
			R = koo.calcConfineTimeRB(mdot, vinf, mh*nh[col][row], T, mu) * S2YR / 1000.0
			tableline = tableline + str(R)
		print tableline + " \\\\"

		tableline = "& {$t_\\mathrm{P}^\\mathrm{PRB}$}"
		for col in range(5):
			tableline = tableline + " & "
			R = koo.calcConfineTimePRB(mdot, vinf, mh*nh[col][row], T, mu) * S2YR / 1000.0
			tableline = tableline + str(R)
		print tableline + " \\\\"

		tableline = "& {$t_\\mathrm{P}^\\mathrm{AB}$}"
		for col in range(5):
			tableline = tableline + " & "
			R = koo.calcConfineTimeAB(mdot, vinf, mh*nh[col][row], T, mu) * S2YR / 1000.0
			tableline = tableline + str(R)
		print tableline + " \\\\"

		if row != 8:
			print "& & & & & & \\\\"
Ejemplo n.º 2
0
rstar = data[:,3] # [Rsun]

den = mp1_data.densities

cloud_dist = 0.35 * PC2CM

for i in range(len(den)):
	for j in range(len(mass)):
		index = 9*i + j + 1
		id = "{:2d}".format(index)
		lower = "{:3.2f}".format(koo.calcLowerPRB(vinf[j]))

		vin_vcr = "{:6.3f}".format(vinf[j] / koo.calcCritVel(mdot[j], vinf[j], mh * mvd_iden[i][0]))
		tp_rb = "{:5.2f}".format(koo.calcConfineTimeRB(mdot[j], vinf[j], mh * mvd_iden[i][0], 8000.0, 0.5) * S2YR / 1000.0)
		rfinal_rb = "{:4.3f}".format(koo.calcFinalRadiusRB(mdot[j], vinf[j], mh * mvd_iden[i][0], 8000.0, 0.5) * CM2PC)
		tp_prb = "{:5.2f}".format(koo.calcConfineTimePRB(mdot[j], vinf[j], mh * mvd_iden[i][0], 8000.0, 0.5) * S2YR / 1000.0)
		rfinal_prb = "{:4.3f}".format(koo.calcFinalRadiusPRB(mdot[j], vinf[j], mh * mvd_iden[i][0], 8000.0, 0.5) * CM2PC)
		tp_ab = "{:5.2f}".format(koo.calcConfineTimeAB(mdot[j], vinf[j], mh * mvd_iden[i][0], 8000.0, 0.5) * S2YR / 1000.0)
		rfinal_fab = "{:4.3f}".format(koo.calcFinalRadiusFAB(mdot[j], vinf[j], mh * mvd_iden[i][0], 8000.0, 0.5) * CM2PC)
		rfinal_pab = "{:4.3f}".format(koo.calcFinalRadiusPAB(mdot[j], vinf[j], mh * mvd_iden[i][0], 8000.0, 0.5) * CM2PC)

		vin_vcr2 = "{:6.3f}".format(vinf[j] / koo.calcCritVel(mdot[j], vinf[j], mh * den[i]))
		tp_rb2 = "{:5.2f}".format(koo.calcConfineTimeRB(mdot[j], vinf[j], mh * den[i], 300.0, 1.0) * S2YR / 1000.0)
		rfinal_rb2 = "{:4.3f}".format(koo.calcFinalRadiusRB(mdot[j], vinf[j], mh * den[i], 300.0, 1.0) * CM2PC)
		tp_prb2 = "{:5.2f}".format(koo.calcConfineTimePRB(mdot[j], vinf[j], mh * den[i], 300.0, 1.0) * S2YR / 1000.0)
		rfinal_prb2 = "{:4.3f}".format(koo.calcFinalRadiusPRB(mdot[j], vinf[j], mh * den[i], 300.0, 1.0) * CM2PC)
		tp_ab2 = "{:5.2f}".format(koo.calcConfineTimeAB(mdot[j], vinf[j], mh * den[i], 300.0, 1.0) * S2YR / 1000.0)
		rfinal_fab2 = "{:4.3f}".format(koo.calcFinalRadiusFAB(mdot[j], vinf[j], mh * den[i], 300.0, 1.0) * CM2PC)
		rfinal_pab2 = "{:4.3f}".format(koo.calcFinalRadiusPAB(mdot[j], vinf[j], mh * den[i], 300.0, 1.0) * CM2PC)

		t_start = str(koo.calcStartTime(mdot[j], vinf[j], mh * den[i], 8000.0, 0.5, mp1_data.injection_radii[index-1] * PC2CM) * S2YR / 1000.0)