def produce_ADMR_object(self): ## Update bandObject for param_name in self.ranges_dict.keys(): if hasattr(self.bandObject, param_name): setattr(self.bandObject, param_name, self.member_dict[self.data_T_list[0]][param_name]) if param_name in self.bandObject._band_params.keys(): self.bandObject[param_name] = self.member_dict[ self.data_T_list[0]]["band_params"][param_name] ## Adjust the doping if need be if self.member_dict[ self.data_T_list[0]]["fixdoping"] >= -1 and self.member_dict[ self.data_T_list[0]]["fixdoping"] <= 1: self.bandObject.setMuToDoping( self.member_dict[self.data_T_list[0]]["fixdoping"]) for T in self.data_T_list: self.member_dict[T]["band_params"]["mu"] = self.bandObject[ "mu"] self.bandObject.runBandStructure() for T in self.data_T_list: self.condObject_dict[T] = Conductivity(self.bandObject, **self.member_dict[T]) self.admrObject_dict[T] = ADMR([self.condObject_dict[T]], **self.member_dict[T]) self.admrObject_dict[T].Btheta_array = self.Btheta_dict[T] self.admrObject_dict[T].Bphi_array = self.Bphi_dict[T]
def residualFunc(pars, hPocket, ePocket, rzz_0, rzz_15, rzz_30, rzz_45): h_gamma_0 = pars["h_gamma_0"].value e_gamma_0 = pars["e_gamma_0"].value gamma_dos = pars["gamma_dos"].value gamma_k = pars["gamma_k"].value power = pars["power"].value mu = pars["mu"].value M = pars["M"].value print("h_gamma_0 = ", h_gamma_0) print("e_gamma_0 = ", e_gamma_0) print("gamma_dos = ", gamma_dos) print("gamma_k = ", gamma_k) print("power = ", power) print("mu = ", mu) print("M = ", M) power = int(power) if power % 2 == 1: power += 1 start_total_time = time.time() # hPocket hPocket.mu = mu hPocket.M = M hPocket.discretize_FS(mesh_xy_rough=501) hPocket.dos_k_func() hPocket.doping() hPocketCondObject = Conductivity(hPocket, Bamp=45, gamma_0=h_gamma_0, gamma_k=gamma_k, power=power, gamma_dos=gamma_dos) # ePocket ePocket.mu = mu ePocket.M = M ePocket.discretize_FS(mesh_xy_rough=501) ePocket.dos_k_func() ePocket.doping() ePocketCondObject = Conductivity(ePocket, Bamp=45, gamma_0=e_gamma_0, gamma_k=gamma_k, power=power, gamma_dos=gamma_dos) ADMRObject = ADMR([hPocketCondObject, ePocketCondObject]) ADMRObject.Btheta_array = Btheta_array ADMRObject.runADMR() print("ADMR time : %.6s seconds \n" % (time.time() - start_total_time)) diff_0 = rzz_0 - ADMRObject.rzz_array[0, :] diff_15 = rzz_15 - ADMRObject.rzz_array[1, :] diff_30 = rzz_30 - ADMRObject.rzz_array[2, :] diff_45 = rzz_45 - ADMRObject.rzz_array[3, :] return np.concatenate((diff_0, diff_15, diff_30, diff_45))
def residualFunc(pars, bandObject, rzz_0, rzz_15, rzz_30, rzz_45): gamma_0 = pars["gamma_0"].value gamma_dos = pars["gamma_dos"].value gamma_k = pars["gamma_k"].value power = pars["power"].value mu = pars["mu"].value M = pars["M"].value print("gamma_0 = ", gamma_0) print("gamma_dos = ", gamma_dos) print("gamma_k = ", gamma_k) print("power = ", power) print("mu = ", mu) print("M = ", M) power = int(power) if power % 2 == 1: power += 1 start_total_time = time.time() bandObject.mu = mu bandObject.M = M bandObject.discretize_FS() bandObject.dos_k_func() bandObject.doping() condObject = Conductivity(bandObject, Bamp=45, gamma_0=gamma_0, gamma_k=gamma_k, power=power, gamma_dos=gamma_dos) ADMRObject = ADMR([condObject]) ADMRObject.Btheta_array = Btheta_array ADMRObject.runADMR() print("ADMR time : %.6s seconds" % (time.time() - start_total_time)) diff_0 = rzz_0 - ADMRObject.rzz_array[0, :] diff_15 = rzz_15 - ADMRObject.rzz_array[1, :] diff_30 = rzz_30 - ADMRObject.rzz_array[2, :] diff_45 = rzz_45 - ADMRObject.rzz_array[3, :] return np.concatenate((diff_0, diff_15, diff_30, diff_45))
gamma_k = out.params["gamma_k"].value power = out.params["power"].value mu = out.params["mu"].value ## Compute ADMR with final parameters from the fit bandObject.mu = mu bandObject.discretize_FS() bandObject.dos_k_func() bandObject.doping() condObject = Conductivity(bandObject, Bamp=45, gamma_0=gamma_0, gamma_k=gamma_k, power=power, gamma_dos=gamma_dos) ADMRObject = ADMR([condObject]) ADMRObject.Btheta_array = Btheta_array ADMRObject.runADMR() ADMRObject.fileADMR(folder="data_NdLSCO_0p21") #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<# ## Figures ////////////////////////////////////////////////////////////////# #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>># #///// RC Parameters //////# mpl.rcdefaults() mpl.rcParams['font.size'] = 24. # change the size of the font in every figure mpl.rcParams['font.family'] = 'Arial' # font Arial in every figure mpl.rcParams['axes.labelsize'] = 24. mpl.rcParams['xtick.labelsize'] = 24 mpl.rcParams['ytick.labelsize'] = 24
hPocket.discretize_FS() hPocket.dos_k_func() hPocket.doping() hPocketCondObject = Conductivity(hPocket, Bamp=45, gamma_0=h_gamma_0, gamma_k=gamma_k, power=power, gamma_dos=gamma_dos) # ePocket ePocket.mu = mu ePocket.M = M ePocket.discretize_FS() ePocket.dos_k_func() ePocket.doping() ePocketCondObject = Conductivity(ePocket, Bamp=45, gamma_0=e_gamma_0, gamma_k=gamma_k, power=power, gamma_dos=gamma_dos) ADMRObject = ADMR([hPocketCondObject, ePocketCondObject]) ADMRObject.Btheta_array = Btheta_array ADMRObject.runADMR() ADMRObject.fileADMR(folder="data_NdLSCO_0p21") #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<# ## Figures ////////////////////////////////////////////////////////////////# #>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>># #///// RC Parameters //////# mpl.rcdefaults() mpl.rcParams['font.size'] = 24. # change the size of the font in every figure mpl.rcParams['font.family'] = 'Arial' # font Arial in every figure mpl.rcParams['axes.labelsize'] = 24. mpl.rcParams['xtick.labelsize'] = 24 mpl.rcParams['ytick.labelsize'] = 24
")", } ## ONE BAND Horio et al. ///////////////////////////////////////////////////////// bandObject = BandStructure(**params) ## Discretize bandObject.setMuToDoping(0.30) bandObject.runBandStructure(printDoping=True) # bandObject.mc_func() # print("mc = " + "{:.3f}".format(bandObject.mc)) # bandObject.figDiscretizeFS2D() # bandObject.figMultipleFS2D() ## Conductivity condObject = Conductivity(bandObject, **params) # condObject.figdfdE() # condObject.runTransport() # condObject.omegac_tau_func() # print("omega_c * tau = " + "{:.3f}".format(condObject.omegac_tau)) # condObject.figScatteringPhi(kz=0) # condObject.solveMovementFunc() # condObject.figCumulativevft() ## ADMR amro1band = ADMR([condObject], **params) amro1band.runADMR() amro1band.fileADMR(folder="sim/Tl2201_Tc_20K/") amro1band.figADMR(folder="sim/Tl2201_Tc_20K/")
sigma_zz = hPocketCondObject.sigma[2, 2] rhoxx = sigma_xx / (sigma_xx**2 + sigma_xy**2) # Ohm.m rhoxy = sigma_xy / (sigma_xx**2 + sigma_xy**2) # Ohm.m rhozz = 1 / sigma_zz # Ohm.m RH = rhoxy / B # m^3/C rhoxx_array[i] = rhoxx rhoxy_array[i] = rhoxy rhozz_array[i] = rhozz RH_array[i] = RH print("{0:.0f}".format(i + 1) + " / " + "{0:.0f}".format(len(B_array))) ## Doping dummy = ADMR([hPocketCondObject]) dummy.totalHoleDoping = doping([hPocket, ePocket]) ## Info results ---------------------- nH = 1 / (RH_array[-1] * e) d = c / 2 V = a**2 * d n = V * nH p = n - 1 print("p = " + "{0:.3f}".format(dummy.totalHoleDoping)) print("1 - n = ", np.round(p, 3)) ## Fig / File name ------------------- file_name = "results_sim/FS_Rxx_xy_zz" + dummy.fileNameFunc()[3:] ## Save Data -------------------------
RH_array[i] = RH rhozy_array[i] = rhozy ## Info results ---------------------- nH = 1 / (RH_array[-1] * e) d = c / 2 V = a**2 * d n = V * nH p = n - 1 print("p = " + "{0:.3f}".format(bandObject.p)) print("1 - n = ", np.round(p, 3)) ## Fig / File name ------------------- dummy = ADMR([condObject], Bphi_array=[0]) file_name = "sim/NdLSCO_0p24/TS_Rxx_xy_zz" + dummy.fileNameFunc()[3:] ## Save Data ------------------------- Data = np.vstack((T_array, rhoxx_array*1e8, rhoxy_array*1e8, rhozz_array*1e8, RH_array*1e9)) Data = Data.transpose() np.savetxt(file_name + ".dat", Data, fmt='%.7e', header="T[K]\trhoxx[microOhm.cm]\trhoxy[microOhm.cm]\trhozz[microOhm.cm]\tRH[mm^3/C]", comments="#")