def efficiency(params): a=params[0]*1e-6 albedo,beta=dmrtml.albedobeta(freq*1e9,density,a,temp,grodyapproach=False) f=density/917.0 Qe=(beta*a*4) / (3*f) Qs=albedo*Qe return Qs-2
def coefficients(medium): x=[] scatt=[] abso=[] for d in arange(0,917,10,dtype=float32): density=array([d]) #albedo,beta=dmrtml.albedobeta(freq,density,radius*1e-6,temp,grodyapproach=False,medium=medium) albedo,beta=dmrtml.albedobeta(freq,density,radius*1e-6,temp,grodyapproach=True,medium=medium) x.append(d) scatt.append(beta*albedo) # /temp[0]) for emissivity calculation abso.append(beta*(1-albedo)) return array(x),array(scatt),array(abso)
shift = 0 for (density, color, label) in [(200, 'r', 'DMRT 200 kg m$^{-3}$'), (300, 'k', 'DMRT 300 kg m$^{-3}$'), (1, 'b', 'DMRT 0 kg m$^{-3}$ (indep.)')]: f = density / 917.0 radii = arange(0, 3500.0, 10.0) x = [] y = [] for radius in radii: a = radius * 1e-6 albedo, beta = dmrtml.albedobeta(freq, density, a, temp, grodyapproach=False) x.append(radius * 1e-3) # compute efficiency from coefficient Qe = (beta * a * 4) / (3 * f) Qs = albedo * Qe y.append(Qs) radii = arange(0, 3500.0, 100.0) + shift shift += 33 xgrody = [] ygrody = [] yabsgrody = []