Beispiel #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)
Beispiel #2
0
def func(x):
    "Heating = Cooling"
    return heat(dens, Av, D, newvalues=True) - dens*cool(dens, x, True)
Beispiel #3
0
	    else:
		title = None
	    cloudy_file = cloudy_file_template % (D, logden, radstring)
	    dataset = cloudy.datasetfile(cloudy_file)
	    Av = dataset.grabcolumn('AV(point)')
	    Heat = 10**(dataset.grabcolumn('Htot') - dataset.grabcolumn('hden'))
	    cloudyline = pyx.graph.data.values(x=Av, y=Heat, title=title)
	    gleft.plot( cloudyline, 
			[pyx.graph.style.line(cloudy_linestyles 
					      + D_styles[D] 
					      + X_styles[radstring]
					      + density_colorstyles[logden]
					      )] 
			)
	    Av = N.linspace(0.0, 20.0, num=50)
	    Heat = heatcool.heat(10**logden, Av, D, radiation=radstring)
	    fitline = pyx.graph.data.values(x=Av, y=Heat, title=title)
	    gright.plot(fitline,  
		    [pyx.graph.style.line(fit_linestyles 
					  + D_styles[D] 
					  + X_styles[radstring]
					  + density_colorstyles[logden]
					  )] 
		    )

c = pyx.canvas.canvas()
c.insert(gleft)
c.insert(gright, [pyx.trafo.translate(figwidth + margin, 0)])

c.writePDFfile("%s-heat" % (basename))