Abstraction of a luminescent solar concentrator. This is intended to be a high-level API to easy use.
| 87 | |
| 88 | |
| 89 | class LSC(object): |
| 90 | """Abstraction of a luminescent solar concentrator. |
| 91 | |
| 92 | This is intended to be a high-level API to easy use. |
| 93 | """ |
| 94 | |
| 95 | def __init__(self, size, wavelength_range=None, n0=1.0, n1=1.5): |
| 96 | super(LSC, self).__init__() |
| 97 | if wavelength_range is None: |
| 98 | self.wavelength_range = np.arange(400, 800) |
| 99 | |
| 100 | self.size = size # centimetres |
| 101 | self.n0 = n0 |
| 102 | self.n1 = n1 |
| 103 | |
| 104 | self._solar_cell_surfaces = set() |
| 105 | self._back_surface_mirror_info = {"want_back_surface_mirror": False} |
| 106 | self._air_gap_mirror_info = {"want_air_gap_mirror": False, "lambertian": False} |
| 107 | self._scene = None |
| 108 | self._renderer = None |
| 109 | self._store = None |
| 110 | self._df = None |
| 111 | self._counts = None |
| 112 | self._user_lights = [] |
| 113 | self._user_components = [] |
| 114 | |
| 115 | def _make_default_components(self): |
| 116 | """ Default LSC contains Lumogen F Red 305. With concentration such that |
| 117 | the absorption coefficient at peak is 10 cm-1. |
| 118 | """ |
| 119 | x = self.wavelength_range |
| 120 | coefficient = lumogen_f_red_305.absorption(x) * 10.0 # cm-1 |
| 121 | emission = lumogen_f_red_305.emission(x) |
| 122 | coefficient = np.column_stack((x, coefficient)) |
| 123 | emission = np.column_stack((x, emission)) |
| 124 | lumogen = { |
| 125 | "cls": Luminophore, |
| 126 | "name": "Lumogen F Red 305", |
| 127 | "coefficient": coefficient, |
| 128 | "emission": emission, |
| 129 | "quantum_yield": 1.0, |
| 130 | "phase_function": None, # will select isotropic |
| 131 | } |
| 132 | background = {"cls": Absorber, "coefficient": 0.1, "name": "Background"} # cm-1 |
| 133 | return [lumogen, background] |
| 134 | |
| 135 | def _make_default_lights(self): |
| 136 | """ Default light is a spotlight (cone of 20-deg) of single wavelength 555nm. |
| 137 | """ |
| 138 | light = { |
| 139 | "name": "Light", |
| 140 | "location": (0.0, 0.0, self.size[-1] * 5), |
| 141 | "rotation": (np.radians(180), (1, 0, 0)), |
| 142 | "direction": functools.partial(cone, np.radians(20)), |
| 143 | "wavelength": None, |
| 144 | "position": None, |
| 145 | } |
| 146 | return [light] |