コード例 #1
0
ファイル: test_uiebi.py プロジェクト: jrsmith3/ibei
 def test_issue_4(self):
     """
     uibei shouldn't fail when energy_lo == chem_potential
     """
     try:
         ibei.uibei(2, 1., 300., 1.)
     except:
         self.fail("uibei fails when energy_lo == chem_potential")
コード例 #2
0
ファイル: test_uiebi.py プロジェクト: jrsmith3/ibei
 def test_issue_2_uibei(self):
     """
     Refactor of issue 2 focusing on uibei
     """
     try:
         ibei.uibei(2, bandgap, temp_sun, 1.2)
     except:
         self.fail("Error raised with arguments.")
コード例 #3
0
ファイル: metal.py プロジェクト: jrsmith3/tec
    def photon_flux(self):
        """
        Number of photons per unit time per unit area

        :returns: `astropy.units.Quantity` in units of :math:`s^{-1} cm^{-2}`.
        """
        photon_flux = self.emissivity * uibei(2, 0, self.temp, 0)
        return photon_flux.to("1/(s*cm2)")
コード例 #4
0
    def photon_flux(self):
        """
        Number of photons per unit time per unit area

        :returns: `astropy.units.Quantity` in units of :math:`s^{-1} cm^{-2}`.
        """
        photon_flux = self.emissivity * uibei(2, self.bandgap, self.temp, 0)
        return photon_flux.to("1/(s*cm2)")
コード例 #5
0
ファイル: devossolarcell.py プロジェクト: jrsmith3/ibei
    def calc_power_density(self):
        """
        Solar cell power density

        The output power density is calculated according to DeVos's :cite:`9780198513926` Eq. 6.4. Note that this expression assumes fully concentrated sunlight and is therefore not completely general.

        This method returns values of type :class:`astropy.units.Quantity` with units of [W m^-2].
        """
        electron_energy = constants.e.si * self.voltage

        if self.bandgap == 0:
            solar_flux = units.Quantity(0., "1/(m2*s)")
            solar_cell_flux = units.Quantity(0., "1/(m2*s)")
        else:
            solar_flux = uibei(2, self.bandgap, self.temp_sun, 0)
            solar_cell_flux = uibei(2, self.bandgap, self.temp_planet, electron_energy)
        power_density = electron_energy * (solar_flux - solar_cell_flux)

        return power_density.to("W/m^2")
コード例 #6
0
ファイル: sqsolarcell.py プロジェクト: jrsmith3/ibei
    def calc_power_density(self):
        """
        Solar cell power density

        The output power density is calculated according to a slight modification of Shockley & Queisser's :cite:`10.1063/1.1736034` Eq. 2.4. This method returns values of type :class:`astropy.units.Quantity` with units of [W m^-2].
        """
        if self.bandgap == 0:
            solar_flux = units.Quantity(0., "1/(m2*s)")
        else:
            solar_flux = uibei(2, self.bandgap, self.temp_sun, 0)
        power_density = self.bandgap * solar_flux

        return power_density.to("W/m^2")
コード例 #7
0
ファイル: metal.py プロジェクト: jrsmith3/tec
    def photon_energy_flux(self):
        """
        Energy flux emitted by Stefan-Boltzmann radiation

        The energy flux (or power density) of Stefan-Boltzmann photons is given by

        .. math::

            j = \\frac{2 \pi^{5} k^{4}}{15 c^{2} h^{3}} T^{4}

        :returns: `astropy.units.Quantity` in units of :math:`W cm^{-2}`.
        """
        energy_flux = self.emissivity * uibei(3, 0, self.temp, 0)
        return energy_flux.to("W/cm2")
コード例 #8
0
    def photon_energy_flux(self):
        """
        Energy flux emitted by Stefan-Boltzmann radiation

        The energy flux (or power density) of Stefan-Boltzmann photons is given by

        .. math::

            j = \\frac{2 \pi^{5} k^{4}}{15 c^{2} h^{3}} T^{4}

        :returns: `astropy.units.Quantity` in units of :math:`W cm^{-2}`.
        """
        energy_flux = self.emissivity * uibei(3, self.bandgap, self.temp, 0)
        return energy_flux.to("W/cm2")
コード例 #9
0
ファイル: test_uiebi.py プロジェクト: jrsmith3/ibei
 def test_issue_31(self):
     """
     Passing `energy_lo=0` with `chem_potential=0` should yield nonzero result
     """
     energy_flux = ibei.uibei(3, 0., 300., 0.)
     self.assertGreater(energy_flux, 0)