code: def calc_power_density(self):
          
          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")
docs: 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].