def __init__(self, structure): self.slab = multilayer(structure) self.slab.tmm() self.T_atm = datalib.ATData(self.slab.lambda_array) self.BBamb = datalib.BB(self.slab.lambda_array, self.slab.T_amb) self.e_amb = self.BBamb * (1 - self.T_atm) #self.e_struct = self.slab.thermal_emission_array #self.BBml = datalib.BB(self.slab.lambda_array, self.slab.T_ml) self.lda = self.slab.lambda_array
def do_loop(HT): start_time = time.time() nm = 1e-9 um = 1e-6 structure = { ### computation mode - inline means the structure and calculation ### type will be determined from the values of this dictionary 'mode': 'Inline', ### temperature of the structure - relevant for all thermal applications ### value is stored in attribute self.T 'Temperature': 300, ### actual materials the structure is made from ### values are stored in the attribute self.n #'Material_List': ['Air','SiO2', 'SiO2','Si3N4','Ag', 'Air'], 'Material_List': ['Air', 'SiO2', 'Si3N4', 'Ag', 'Air'], ### thickness of each layer... terminal layers must be set to zero ### values are stored in attribute self.d 'Thickness_List': [0, 100 * nm, 100 * nm, 200 * nm, 0], # You can not have the back reflector as the last layer!!! ### range of wavelengths optical properties will be calculated for ### values are stored in the array self.lam 'Lambda_List': [250 * nm, 30 * um, 2000], ## Calculate for explicit angular dependence 'EXPLICIT_ANGLE': 1, ## Calculate quantities related to radiative cooling 'COOLING': 1 } slab = multilayer(structure) mat_list = structure['Material_List'] # slab.lambda_array = lda*nm FF = np.array([0, 20, 25, 30, 35, 40]) / 100 T = np.array([300, 290, 280, 270]) H_fine = np.linspace(0, 75, num=4) #25nm resolution H_med = np.linspace(100, 1900, num=19) #100nm resolution H_coarse = np.linspace(2000, 3000, num=5) #250nm resolution H = np.concatenate((H_fine, H_med, H_coarse), axis=0) * nm cp = np.zeros((len(T), len(H), len(FF), len(FF))) for idx_T in range(0, len(T)): # Change temperature print("--- %s seconds ---" % (time.time() - start_time)) print("Temp: %s" % (T[idx_T])) for idx_HB in range(0, len(H)): # Change the top layer thickness for idx_FFT in range(0, len(FF)): # Change the bottom layer thickness for idx_FFB in range( 0, len(FF)): # Change the top layer fill fraction cp[idx_T, idx_HB, idx_FFT, idx_FFB] = get_cp(slab, mat_list, T[idx_T], HT, H[idx_HB], FF[idx_FFT], FF[idx_FFB]) return cp
def __init__(self, structure): self.slab = multilayer(structure) self.slab.tmm() self.T_atm = datalib.ATData(self.slab.lambda_array) self.BBamb = datalib.BB(self.slab.lambda_array, self.slab.T_amb) self.e_amb = np.empty([len(self.slab.t),len(self.slab.lambda_array)]) for i in range(0,len(self.slab.t)): for j in range(0,len(self.slab.lambda_array)): angular_mod = 1./np.cos(self.slab.t[i]) self.e_amb[i][j] = self.BBamb[j]*(1-self.T_atm[j]**angular_mod) #self.e_struct = self.slab.thermal_emission_array #self.BBml = datalib.BB(self.slab.lambda_array, self.slab.T_ml) self.lda = self.slab.lambda_array
'Thickness_List': [0, 100 * nm, 100 * nm, 200 * nm, 0], # You can not have the back reflector as the last layer!!! ### range of wavelengths optical properties will be calculated for ### values are stored in the array self.lam 'Lambda_List': [250 * nm, 30 * um, 2], ## Calculate for explicit angular dependence 'EXPLICIT_ANGLE': 1, ## Calculate quantities related to radiative cooling 'COOLING': 1 } structure_sin_sio2 = structure_sio2_sin structure_sin_sio2['Material_List'] = ['Air', 'Si3N4', 'SiO2', 'Ag', 'Air'] slab_sio2_sin_np = multilayer(structure_sio2_sin) slab_sin_sio2_np = multilayer(structure_sin_sio2) T = 300 #np.array([300, 290]) # 280, 270, 260, 250]) lda_uv = np.linspace(251, 370, num=120) lda_vis = np.linspace(373, 1000, num=210) # 3nm resolution lda_ir = np.linspace(1100, 30000, num=290) # 100nm resolution lda = np.concatenate((lda_uv, lda_vis, lda_ir), axis=0) slab_sio2_sin_np.lam = lda * nm slab_sin_sio2_np.lam = lda * nm #H = np.linspace(500, 2000, num = 2)*nm
'Material_List': ['Air','Si3N4 in Air (30% FF)','SiO2 in Air (30%FF)','Ag', 'Air'], ### thickness of each layer... terminal layers must be set to zero ### values are stored in attribute self.d 'Thickness_List': [0, 0.8*um, 2000*nm, 200*nm, 0], # You can not have the back reflector as the last layer!!! ### range of wavelengths optical properties will be calculated for ### values are stored in the array self.lam 'Lambda_List': [3*um, 30*um, 1000], ## Calculate for explicit angular dependence 'EXPLICIT_ANGLE': 1, ## Calculate quantities related to radiative cooling 'COOLING': 1 } c_list = ['i','c','c','c','i'] # Initialize the layer slab np_slab = multilayer(structure) # Change one of the layers to an effective index fill_fraction = 0.3 layer = 1 np_slab.layer_alloy(layer,0.3,'Air','Si3N4','Bruggeman', plot = False) layer = 2 np_slab.layer_alloy(layer,0.3,'Air','RC0_1B_SiO2','Bruggeman', plot = False) ############################################################################## ############################################################################## #%% ### Plot the emission properties if calc_cooling: np_slab.tmm()