def plot_cooling(slab):
    # Look at cooling properties
    T_atm = datalib.ATData(slab.lambda_array)
    AM = datalib.AM(slab.lambda_array)
    #    BBamb = datalib.BB(slab.lambda_array, slab.T_amb)
    #    BBml = datalib.BB(slab.lambda_array, slab.T_ml)

    #    plt.figure()
    #    mask = (slab.lambda_array >= 3000e-9) & (slab.lambda_array <= 30000e-9)
    #    plt.plot(slab.lambda_array[mask]*1e6, T_atm[mask]*100, 'k', alpha = 0.1, label = 'AM1.5 or \n Atmospheric \n transmittance')
    #    plt.plot(slab.lambda_array[mask]*1e6, slab.emissivity_array[mask]*100, 'r', label = 'Structure \n absorption')
    #    #plt.plot(np_slab.lambda_array[mask]*1e6, np_slab.thermal_emission_array[mask], 'red')
    #    plt.xlabel('Wavelength (nm)')
    #    plt.ylabel('Absorption (%)')
    #    plt.tight_layout(rect=[-0.10,0,0.75,1])
    #    plt.legend(bbox_to_anchor=(1.04, 1))
    #    plt.show()
    #
    #    plt.figure()
    #    mask = (slab.lambda_array >= 250e-9) & (slab.lambda_array <= 3000e-9)
    #    plt.plot(slab.lambda_array[mask]*1e6, slab.emissivity_array[mask]*100, 'r', label = 'Structure \n absorption')
    #    plt.plot(slab.lambda_array[mask]*1e6, 100*AM[mask]/(1.4*1e9), 'k', alpha = 0.1, label = 'AM1.5 or \n Atmospheric \n transmittance')
    #    plt.xlabel('Wavelength (um)')
    #    plt.ylabel('Absorption (%)')
    #    plt.tight_layout(rect=[-0.10,0,0.75,1])
    #    plt.legend(bbox_to_anchor=(1.04, 1))
    #    plt.show()

    print("Radiative Power (cooling) is ", slab.radiative_power_val, "W/m^2")
    print("Absorbed Solar Power (warming) is ", slab.solar_power_val, "W/m^2")
    print("Absorbed Atmospheric Radiation (warming) is ",
          slab.atmospheric_power_val, "W/m^2")
    print("Net Power flux out of the structure is ", slab.cooling_power_val,
          "W/m^2")
Beispiel #2
0
    def inc_T(self, sun=False):
        # EULER METHOD TIME DEPENDENT INCREMENT OF THE STRUCTURES TEMPERATURE
        # Tn = Tn-1+(Q-Qrad)dt/C (FROM CIRCUIT DIAGRAM)
        # USER DEFINED INPUTS:
        # 1) IN OR OUR OF THE SUN
        # 2) TEMPERATURE OF THE STRUCTURE AT T-1
        # 3) SPECTRAL EMISSIVITY PROFILE
        # CURRENT HARD WIRED INPUTS
        # 1) INTERNAL HEATING
        # 2) % SOLAR ABSORPTION

        Ti = self.T_ml
        Qrad = self.radiative_power_val
        C = self.C
        dt = self.dt
        Q = 50  # Some number to represent internal heating from ship

        if (sun == True):
            dl = self.lambda_array[1] - self.lambda_array[0]
            am15 = datalib.AM(self.lambda_array)  #*self.emissivity_array
            am15_integral = am15.sum() * dl
            Q = Q + am15_integral * 0.2
            #Q = Q+self.solar_power_val

        Tf = Ti + (Q - Qrad) * dt / C
        self.Q = Q
        self.T_ml = Tf
        self.update()
        self.cooling_power()
Beispiel #3
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)
    def define_Qinput(self):
        # DEFINE THE PULSE SHAPE FOR THE INPUT EXCITATION. THIS IS ASSUMED TO BE
        # A CONSTANT "CURRENT = POWER" SOURCE. I.E., dT/dt.
        # THE PURPOSE OF THIS FUNCTION IS TO EXPAND IT TO ENABLE ARBITRATY INPUT
        # WAVEFORMS THAT CAN REPRESENT ORBITAL DYNAMICS.

        dl = self.lambda_array[1] - self.lambda_array[0]
        am15 = datalib.AM(self.lambda_array)  #*self.emissivity_array
        am15_integral = am15.sum() * dl
        self.Qsolar = am15_integral * 0.6  #0.1 For 3-11 window

        self.Qinput_array = self.Qload + self.Qsolar * self.sun_mask
Beispiel #5
0
def ambient_jsc(eps, lam, lbg):
    ### get upper bound of integral
    upper = np.amax(lam)
    ### get AM1.5 spectrum
    AM = datalib.AM(lam)
    ### get spectral response function (currently only Si supported for
    ### traditional PV... more to come soon)
    SR = datalib.SR_Si(lam)
    ### jsc integrand
    integrand = AM * SR * eps
    ### integrate it!
    jsc = numlib.Integrate(integrand, lam, 1e-9, upper)
    return jsc
#    plt.plot(lda*1e-3, (1-Tideal-Rideal)*100, 'k:', label = 'Total absorption \n (simulated)')
#    plt.plot(lda*1e-3, Aideal[:,1]*100,'b:', label = 'Roughness layer \n (9% $SiO_{2}$ Brugg.)')
#    plt.plot(lda*1e-3, Aideal[:,2]*100,'r:', label = 'Nanoparticle layer \n (15% $SiO_2$ Brugg.)')
#    plt.plot(lda*1e-3, Aideal[:,4]*100,'m:', label = 'Si Substrate')
#    #plt.plot(lda, Aideal[:,3]*100,'y:', label = 'SiO2 native oxide absorption')
#
#    plt.xlabel('Wavelength (um)')
#    plt.ylabel('Absorption (%)')
#    #plt.title('Absorption at normal incidence')
#    #ax.legend().draggable()

#    plt.tight_layout(rect=[-0.10,0,0.75,1])
#    plt.legend(bbox_to_anchor=(1.04, 1))
#    plt.show()
else:
    AM1p5 = datalib.AM(lda * 1e-9)
    fig = plt.figure()
    plt.plot(lda, (AM1p5 / (1.4 * 1e9)) * 100, 'k', alpha=0.1, label='AM1.5')
    #    plt.plot(lda, T*100,'b:', label = 'Transmission')
    #    plt.plot(lda, R*100,'k:', label = 'Reflection')
    plt.plot(lda, (1 - T - R) * 100, 'r', label='Device absorption')
    plt.plot(lda,
             A[:, 1] * 100,
             ':',
             label='Abs. $Si_{3}N_{4}$ NP \n (30%, Brugg.)')
    plt.plot(lda,
             A[:, 1] * 100,
             ':',
             label='Abs. $SiO_{2}$ NP \n (30%, Brugg.)')
    plt.plot(lda, A[:, 1] * 100, ':', label='Abs. $SiO_{2}$')
    plt.plot(lda, A[:, 1] * 100, ':', label='Abs. $Si_{3}N_{4}$')
Beispiel #7
0
def absorbed_power_ea(lam, n, d, solarconc):
    ### get AM1.5 spectrum ... scale by concentration factor
    ### Note that Eq. (2) in Raphaeli and Fan does not explicitly indicate
    ### the AM1.5 spectrum should be scaled by the concentration factor, they
    ### only explicitly indicate that it should impact the angle integration range
    ### through the relation thetaC = asin( sqrt ( Ns * Omega_S / pi) )
    ### where Ns is concentration factor (number of suns), Omega_S is solid
    ### angle subtended by sun (68.5 microsteridians)
    ### However, if one does not scale the AM1.5 spectrum by Ns, then
    ### The absorbed power is far too low to make any sense.
    ### Some sanity checks are as follows:
    ### Assuming Absorber and Emitter are both blackbodies and have the same area,
    ### The following equilibrium temperatures are found as a function of concentration
    ### when the AM1.5 is scaled (unscaled) by Ns, respectively:
    '''
    Ns     Temp_in_K   (Temp_in_K)
    100    694         (219)
    200    901         (239)   
    300    1048        (252)
    400    1168        (261)
    500    1270        (268)
    600    1359        (274)
    700    1440        (280)
    800    1514        (284)
    900    1582        (288)
    1000   1646        (292)
    
    from the above, 
    '''
    AM = datalib.AM(lam) * solarconc

    ### array for storing refractive index values
    nc = np.zeros(len(d), dtype=complex)
    ### get maximum angle for theta integration
    thetaC = np.arcsin(np.sqrt(solarconc * 68.5e-6 / np.pi))
    #print("thetaC is ",thetaC)
    ### in essence we want to generate the absorbance for s- and p-
    ### polarized light between theta=0 and theta=thetaC
    ### and integrate over those absorbances to get total absorbed power

    ### set degree of polynomial - 7 seems to work well for 0 - pi/2
    ### should be very adequate here as well
    deg = 7
    ### range is 0 to thetaC
    a = 0
    b = thetaC
    x, w = np.polynomial.legendre.leggauss(deg)
    t = 0.5 * (x + 1) * (b - a) + a
    w = w * 0.5 * (b - a)
    #print(t, w)
    osom = 0
    ### outter loop to integrate over theta
    dl = abs(lam[1] - lam[0])
    for th, we in zip(t, w):

        ###
        isom = 0.
        #for l, inc in zip(lam,AM):
        for i in range(0, len(lam)):
            ### wavenumber at current lambda
            k0 = np.pi * 2 / lam[i]

            for j in range(0, len(d)):
                nc[j] = n[j][i]
            ### get s and p absorbance at current wavelength
            As = tmm.Abs(k0, th, 's', nc, d)
            Ap = tmm.Abs(k0, th, 'p', nc, d)
            ### add contributions from s- and p-polarization
            isom = isom + 0.5 * As * AM[i] * dl + 0.5 * Ap * AM[i] * dl
            ### Uncomment below for BB absorbed power
            #isom = isom + 0.5 * 1 * AM[i] * dl + 0.5 * 1 * AM[i] * dl
        ### add inner sum to outter sum
        osom = osom + we * isom * np.sin(th) * np.cos(th)

    ### the integral over phi can be taken analytically since it will not impact emissivity
    ### and just gives a factor of 2*pi
    return 2 * np.pi * osom
Beispiel #8
0
def integrated_solar_power(lam):
    AM = datalib.AM(lam)
    upper = np.amax(lam)

    p_in = numlib.Integrate(AM, lam, 1e-9, upper)
    return p_in
Beispiel #9
0
    ## Calculate quantities related to radiative cooling
    'COOLING': 1
}
#
rad = IdealRadiator(structure)
T = [300, 290, 280, 270, 260, 250, 240, 230]
cps = []
temps = []
#am_3p = []
#am_5p = []
#am_10p = []
#am_1p = []

lam = np.linspace(250 * 1e-9, 2500 * 1e-9, 1000)
dl = lam[1] - lam[0]
am15 = datalib.AM(lam)
am15_integral = am15.sum() * dl
##
for i in range(0, len(T)):
    rad.optimal_spectrum(T[i])
    cps0, temps0 = rad.power_vs_temp_curve(300, 220)
    cps.append(cps0)
    temps.append(temps0)
#    am_1p.append(0.01*am15_integral)
#    am_3p.append(0.03*am15_integral)
#    am_5p.append(0.05*am15_integral)
#    am_10p.append(0.1*am15_integral)

#%%

#plt.plot(lam, am15*1e-6)
Beispiel #10
0
plt.plot(thickness / um, CP)
plt.ylabel('Net power flux (W/m^2)')
plt.xlabel('SiO2 nanoparticle film thickness (um)')
plt.title('30% F.F. NP SiO2 Film on 900nm Si3N4 on 200nm Ag')

#%%

plt.figure()
plt.plot(thickness / um, CP)
plt.ylabel('Net power flux (W/m^2)')
plt.xlabel('SiO2 nanoparticle film thickness (um)')
plt.title('35% F.F. NP SiO2 Film on 900nm Si3N4 on 200nm Ag')

#%%
# 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')