Esempio n. 1
0
def stpv_pv_filter_fom(trans, ref, lam):
    ### set lambda_bg to 750 nm
    lbg = 750e-9
    ### get AM1.5 spectrum
    AM = datalib.AM(lam)
    ### get BB spectrum at 440 K
    BBs = datalib.BB(lam, 440)

    ### There are three different integrands for numerator
    num_integrand_1 = np.copy(AM * trans * lam / lbg)
    num_integrand_2 = np.copy(AM * trans)
    num_integrand_3 = np.copy(BBs * ref)

    num1 = numlib.Integrate(num_integrand_1, lam, 300e-9, lbg)
    num2 = numlib.Integrate(num_integrand_2, lam, lbg, 3200e-9)
    num3 = numlib.Integrate(num_integrand_3, lam, 3200e-9, 3700e-9)

    ### denominator 1 comes from lam/lbg * AM1.5
    den_integrand_1 = np.copy(AM * lam / lbg)
    den1 = numlib.Integrate(den_integrand_1, lam, 300e-9, lbg)

    ### denominator 2 comes from AM1.5
    den2 = numlib.Integrate(AM, lam, lbg, 3200e-9)

    ### denominator 3 comes from BB spectrum
    return 0.5 * num1 / den1 + 0.5 * num2 / den2 + 2 * num2 / den2
Esempio n. 2
0
def Abs_eff(lam, EM, solarconc, T):
    AM = datalib.AM(lam)
    upper = np.amax(lam)
    BBs = datalib.BB(lam, T)
    TE = BBs * EM
    alpha = solarconc * (numlib.Integrate(AM * EM, lam, 100e-9, upper))
    beta = np.pi * numlib.Integrate(TE, lam, 100e-9, upper)
    return (alpha - beta) / (alpha)
Esempio n. 3
0
def IdealSource(lam, T):
    ### compute blackbody spectrum at current T
    rho = datalib.BB(lam, T)
    ### get photopic luminosity function
    ph = datalib.PhLum(lam)
    ### ideal thermal emission is product of the two
    TE_ideal = ph * rho
    return TE_ideal
Esempio n. 4
0
 def thermal_emission_ea(self):
     
     ### Temperature might change, update BB spectrum
     self.BBs = datalib.BB(self.lambda_array, self.T_ml)
     #temp = np.zeros(len(self.lambda_array))
     
     for i in range(0,len(self.t)):
         ### Thermal emission goes like BBs(lambda) * eps(theta, lambda) * cos(theta)
         for j in range(0,len(self.lambda_array)):
             self.thermal_emission_array_p[i][j] = self.BBs[j] * self.emissivity_array_p[i][j] * np.cos(self.t[i])
             self.thermal_emission_array_s[i][j] = self.BBs[j] * self.emissivity_array_s[i][j] * np.cos(self.t[i])
         
     return 1
Esempio n. 5
0
def Patm(EPS_P, EPS_S, T_amb, lam, theta, w):

    dlam = np.abs(lam[0] - lam[1])
    ### Get normal atmospheric transmissivity
    atm_T = datalib.ATData(lam)
    ### Get BB spectrum associated with ambient temperature
    BBs = datalib.BB(lam, T_amb)

    x = 0
    for i in range(0, len(w)):
        patm_som = 0
        angular_mod = 1. / np.cos(theta[i])
        for j in range(0, len(lam)):
            patm_som = patm_som + (
                0.5 * EPS_P[i][j] + 0.5 * EPS_S[i][j]) * BBs[j] * np.cos(
                    theta[i]) * (1 - atm_T[j]**angular_mod) * dlam
        x = x + patm_som * np.sin(theta[i]) * w[i]
    return 2 * np.pi * x
Esempio n. 6
0
def stpv_pv_filter_grad(dim, trans_prime, ref_prime, lam):
    lbg = 750e-9
    grad = np.zeros(dim)
    AM = datalib.AM(lam)
    BBs = datalib.BB(lam, 440)

    den_integrand_1 = np.copy(AM * lam / lbg)
    den1 = numlib.Integrate(den_integrand_1, lam, 300e-9, lbg)
    den2 = numlib.Integrate(AM, lam, lbg, 3200e-9)
    den3 = numlib.Integrate(BBs, lam, 3200e-9, 3700e-9)

    for i in range(0, dim):
        integrand_1 = np.copy(trans_prime[i, :] * AM * lam / lbg)
        integrand_2 = np.copy(trans_prime[i, :] * AM)
        integrand_3 = np.copy(ref_prime[i, :] * BBs)
        num_prime_1 = numlib.Integrate(integrand_1, lam, 300e-9, lbg)
        num_prime_2 = numlib.Integrate(integrand_2, lam, lbg, 3200e-9)
        num_prime_3 = numlib.Integrate(integrand_3, lam, 3200e-9, 3700e-9)

        grad[
            i] = 0.5 * num_prime_1 / den1 + 0.5 * num_prime_2 / den2 + 2 * num_prime_3 / den3

    return grad
Esempio n. 7
0
def Patm_prime(dim, eps_prime_p, eps_prime_s, T_amb, lam, theta, w):

    dlam = np.abs(lam[1] - lam[0])
    ### get normal atmospheric transmissivity
    atm_T = datalib.ATData(lam)
    ### get BB spectrum associated with ambient temperature
    BBs = datalib.BB(lam, T_amb)
    ### initialize grad
    grad = np.zeros(dim)

    for i in range(0, dim):
        x = 0
        for j in range(0, len(w)):
            patm_prime = 0
            angular_mod = 1. / np.cos(theta[j])
            for k in range(0, len(lam)):
                patm_prime = patm_prime + 0.5 * (eps_prime_p[
                    i, j, k] + eps_prime_s[i, j, k]) * BBs[k] * np.cos(
                        theta[j]) * (1 - atm_T[k]**angular_mod) * dlam
            x = x + patm_prime * np.sin(theta[j]) * w[j]
        grad[i] = 2 * np.pi * x

    return grad
Esempio n. 8
0
 def thermal_emission(self):
     ### Temperature might change, update BB spectrum
     self.BBs = datalib.BB(self.lambda_array, self.T_ml)
     ### Emissivity doesn't change unless structure changes
     self.thermal_emission_array = self.BBs * self.emissivity_array
     return 1
Esempio n. 9
0
layer = 1
np_slab.layer_alloy(layer,
                    fill_fraction,
                    'Air',
                    'SiO2',
                    'Bruggeman',
                    plot=True)
#np_slab.layer_alloy(layer,fill_fraction,'Air','SiO2','MG', plot = False)
np_slab.thermal_emission_ea()
np_slab.cooling_power()

#%%
# Calculate standard spectra related to radiative cooling
AM = datalib.AM(np_slab.lambda_array)
T_atm = datalib.ATData(np_slab.lambda_array)
BB = datalib.BB(np_slab.lambda_array, np_slab.T_ml)

### plot results!
plt.figure()
mask = (np_slab.lambda_array >= 3000e-9) & (np_slab.lambda_array <= 30000e-9)
plt.plot(np_slab.lambda_array[mask] * 1e6, T_atm[mask], 'cyan')
plt.plot(np_slab.lambda_array[mask] * 1e6, np_slab.emissivity_array[mask],
         'red')
#plt.plot(np_slab.lambda_array[mask]*1e6, np_slab.thermal_emission_array[mask], 'red')

plt.figure()
mask = (np_slab.lambda_array >= 250e-9) & (np_slab.lambda_array <= 3000e-9)
plt.plot(np_slab.lambda_array[mask] * 1e6, np_slab.emissivity_array[mask],
         'blue')
plt.plot(np_slab.lambda_array[mask] * 1e6, AM[mask] / (1.4 * 1e9), 'red')