示例#1
0
def printCritVel(isMVD):
	for row in range(9):
		mdot = mdotList[row]
		vinf = vinfList[row]

		tableline =  str(massList[row])
		for col in range(5):
			nh = mvd_iden[col][row] if isMVD else  mvt_iden[col][row]
			nh = mvd_nhs[col] if isMVD else  mvt_nhs[col]

			tableline = tableline + " & "
			R = vinf / koo.calcCritVel(mdot, vinf, mh * nh)
			tableline = tableline + str(R)
		print tableline + " \\\\"
示例#2
0
mdot = data[:,8] # [g.s-1]
vinf = data[:,9] # [cm.s-1]
logL = data[:,2] # log[L / Lsun]
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)