Esempio n. 1
0
def printAnalyticalSizes(r, isMVD):
	T = 300.0
	mu = 1.0

	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{5}{*}{\\num{" + str(mass) + "}} & {$D_\mathrm{s}(\\frac{\\pi}{2})$}"
		for col in range(5):
			tableline = tableline + " & "
			tableline = tableline + str(r[col][row])
		print tableline + " \\\\"

		tableline = "& {$R_\\mathrm{s}^\\mathrm{RB}$}"
		for col in range(5):
			tableline = tableline + " & "
			R = koo.calcFinalRadiusRB(mdot, vinf, mh*nh[col][row], T, mu) * CM2PC
			tableline = tableline + str(R)
		print tableline + " \\\\"

		tableline = "& {$R_\\mathrm{s}^\\mathrm{PRB}$}"
		for col in range(5):
			tableline = tableline + " & "
			R = koo.calcFinalRadiusPRB(mdot, vinf, mh*nh[col][row], T, mu) * CM2PC
			tableline = tableline + str(R)
		print tableline + " \\\\"

		tableline = "& {$R_\\mathrm{s}^\\mathrm{FAB}$}"
		for col in range(5):
			tableline = tableline + " & "
			R = koo.calcFinalRadiusFAB(mdot, vinf, mh*nh[col][row], T, mu) * CM2PC
			tableline = tableline + str(R)
		print tableline + " \\\\"

		tableline = "& {$R_\\mathrm{s}^\\mathrm{PAB}$}"
		for col in range(5):
			tableline = tableline + " & "
			R = koo.calcFinalRadiusPAB(mdot, vinf, mh*nh[col][row], T, mu) * CM2PC
			tableline = tableline + str(R)
		print tableline + " \\\\"

		if row != 8:
			print "& & & & & & \\\\"
Esempio n. 2
0
def printAdiabaticTable(r, isMVD):
	T = 300.0
	mu = 1.0

	diststr = "D_\\mathrm{s}"
	numstr = "2"

	for row in range(9):
		mass = massList[row]
		mdot = mdotList[row]
		vinf = vinfList[row]
		logQ = logQList[row]
		nhs_hii = mvd_iden if isMVD else  mvt_iden
		times = mvd_times if isMVD else mvt_times
		nhs_init = mvd_nhs if isMVD else mvt_nhs
		inj = mvd_inj if isMVD else mvt_inj

		tableline = "\multirow{" + numstr + "}{*}{\\num{" + str(mass) + "}} & {$" + diststr + "(\\frac{\\pi}{2})$}"
		for col in range(5):
			tableline = tableline + " & "
			tableline = tableline + str(r[col][row])
		print tableline + " \\\\"

		tableline = "& {$R_\\mathrm{P}^\\mathrm{PAB}$}"
		for col in range(5):
			tableline = tableline + " & "
			tinj = koo.calcInjectionTimeAB(mdot, vinf, mh*nhs_init[col], inj[col][row] / CM2PC)
			tinj = 0
			#print tinj * S2YR
			t = (koo.calcConfineTimeAB(mdot, vinf, mh*nhs_init[col], T, mu) - tinj) * S2YR
			if times[col] <= t:
				R = koo.calcBubbleRadiusFAB(mdot, vinf, mh*nhs_init[col], times[col] * YR2S + tinj) * CM2PC
			else:
				R = koo.calcFinalRadiusFAB(mdot, vinf, mh*nhs_init[col], T, mu) * CM2PC
			tableline = tableline + str(R)
		print tableline + " \\\\"

		if row != 8:
			print "& & & & & & \\\\"
Esempio n. 3
0
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)

		print id + " & " + lower + " & " +\
			  vin_vcr + " & " + tp_rb + " & " + rfinal_rb + " & " + tp_prb + " & " +\