Ejemplo n.º 1
0
def thermal_time_years(density, temperature, Av, D):
    """
    P / (g -1) (L - H)
    """
    return boltzman*temperature/(
	(gamma-1.0)*(
	    density*cool(density, temperature, thousandK=True) - heat(density, Av, D, newvalues=True)
	    )*year)
Ejemplo n.º 2
0
def func(x):
    "Heating = Cooling"
    return heat(dens, Av, D, newvalues=True) - dens*cool(dens, x, True)
Ejemplo n.º 3
0
def cooling_time_years(density, temperature):
    """
    P / (g -1) L
    """
    return boltzman*temperature/((gamma-1.0)*density*cool(density, temperature, True)*year)
Ejemplo n.º 4
0
	    Cool = 10**(dataset.grabcolumn('Htot') - 2.0*dataset.grabcolumn('hden'))
	    if first_in_batch:
		title = r"Cloudy models: \(n = 10^{%d}~\mathrm{cm}^{-3}\)" % (logden)
		first_in_batch = False
	    else:
		title = None
	    cloudylines.append(
		pyx.graph.data.values(x=Temperature, y=Cool, title=title)
		)
    # plot all the same density in the same style
    gleft.plot( cloudylines, 
		[pyx.graph.style.line(cloudy_linestyles + density_colorstyles[logden])] 
		)

    Temperature = N.logspace(1.2, 4.0, num=50)
    Cool = heatcool.cool(10**logden, Temperature)
    fitline = pyx.graph.data.values(x=Temperature, y=Cool, title=r"Fit: \(n = 10^{%d}~\mathrm{cm}^{-3}\)" % (logden))
    gright.plot(fitline,  [ 
	    pyx.graph.style.line(fit_linestyles + density_colorstyles[logden]),
	    ] )


# Finally, plot the KI2002 curve
Temperature = N.logspace(1.2, 4.0, num=50)
Cool = heatcool.coolKI(Temperature)
fitline = pyx.graph.data.values(x=Temperature, y=Cool, title=r"Koyama \& Inutsuka (2002)")
gright.plot(fitline,  [ 
	pyx.graph.style.line(fit_linestyles + [pyx.color.cmyk.Lavender, pyx.style.linestyle.dashed]),
	] )

c = pyx.canvas.canvas()