I tried testing my optical thin film structure and ran into errors when using TiO2 and PDMS. I'd like to simulate their emissivity, transmittance, and reflectivity in the 250-1800nm and 3μm-20μm regions. I believe the TiO2 error may be due to the data type. Formula 3 and 4 type data are contained in the TiO2 nk folder. I attempted to resolve this by editing the library.yml file, but I was unsuccessful...
Traceback (most recent call last):
File "c:\Users\jaehyeonshin\Desktop\EMCL\EMCL\PSC radiative cooler\radiative\RCWA\rcwa\rcwa\examples\5_layer.py", line 45, in
results = solve_system()
^^^^^^^^^^^^^^
File "c:\Users\jaehyeonshin\Desktop\EMCL\EMCL\PSC radiative cooler\radiative\RCWA\rcwa\rcwa\examples\5_layer.py", line 19, in solve_system
tiO2 = Material(name = 'TiO2')
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jaehyeonshin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rcwa\material.py", line 41, in init
self._load_from_database(name, filename=database_path)
File "C:\Users\jaehyeonshin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rcwa\material.py", line 100, in _load_from_database
data_dict = self.database.load(file_to_load)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jaehyeonshin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rcwa\utils\nk_loaders.py", line 83, in load
data = self.load_nk_formula_data(material_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jaehyeonshin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rcwa\utils\nk_loaders.py", line 93, in load_nk_formula_data
raise ValueError(f'Formula type {data_dict["type"]} not supported. Please submit a bug report with this message and the specific material you are trying to use')
ValueError: Formula type formula 4 not supported. Please submit a bug report with this message and the specific material you are trying to use
for PDMS)
Traceback (most recent call last):
File "c:\Users\jaehyeonshin\Desktop\EMCL\EMCL\PSC radiative cooler\radiative\RCWA\rcwa\rcwa\examples\5_layer.py", line 45, in
results = solve_system()
^^^^^^^^^^^^^^
File "c:\Users\jaehyeonshin\Desktop\EMCL\EMCL\PSC radiative cooler\radiative\RCWA\rcwa\rcwa\examples\5_layer.py", line 20, in solve_system
PDMS = Material('polydimethylsiloxane')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jaehyeonshin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rcwa\material.py", line 41, in init
self._load_from_database(name, filename=database_path)
File "C:\Users\jaehyeonshin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rcwa\material.py", line 100, in _load_from_database
data_dict = self.database.load(file_to_load)
^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'file_to_load' where it is not associated with a value
I tried testing my optical thin film structure and ran into errors when using TiO2 and PDMS. I'd like to simulate their emissivity, transmittance, and reflectivity in the 250-1800nm and 3μm-20μm regions. I believe the TiO2 error may be due to the data type. Formula 3 and 4 type data are contained in the TiO2 nk folder. I attempted to resolve this by editing the library.yml file, but I was unsuccessful...
My code:
Error message:
for TiO2)
Traceback (most recent call last): File "c:\Users\jaehyeonshin\Desktop\EMCL\EMCL\PSC radiative cooler\radiative\RCWA\rcwa\rcwa\examples\5_layer.py", line 45, in
results = solve_system()
^^^^^^^^^^^^^^
File "c:\Users\jaehyeonshin\Desktop\EMCL\EMCL\PSC radiative cooler\radiative\RCWA\rcwa\rcwa\examples\5_layer.py", line 19, in solve_system
tiO2 = Material(name = 'TiO2')
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jaehyeonshin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rcwa\material.py", line 41, in init
self._load_from_database(name, filename=database_path)
File "C:\Users\jaehyeonshin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rcwa\material.py", line 100, in _load_from_database
data_dict = self.database.load(file_to_load)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jaehyeonshin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rcwa\utils\nk_loaders.py", line 83, in load
data = self.load_nk_formula_data(material_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jaehyeonshin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rcwa\utils\nk_loaders.py", line 93, in load_nk_formula_data
raise ValueError(f'Formula type {data_dict["type"]} not supported. Please submit a bug report with this message and the specific material you are trying to use')
ValueError: Formula type formula 4 not supported. Please submit a bug report with this message and the specific material you are trying to use
for PDMS)
Traceback (most recent call last): File "c:\Users\jaehyeonshin\Desktop\EMCL\EMCL\PSC radiative cooler\radiative\RCWA\rcwa\rcwa\examples\5_layer.py", line 45, in
results = solve_system()
^^^^^^^^^^^^^^
File "c:\Users\jaehyeonshin\Desktop\EMCL\EMCL\PSC radiative cooler\radiative\RCWA\rcwa\rcwa\examples\5_layer.py", line 20, in solve_system
PDMS = Material('polydimethylsiloxane')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\jaehyeonshin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rcwa\material.py", line 41, in init
self._load_from_database(name, filename=database_path)
File "C:\Users\jaehyeonshin\AppData\Local\Programs\Python\Python312\Lib\site-packages\rcwa\material.py", line 100, in _load_from_database
data_dict = self.database.load(file_to_load)
^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'file_to_load' where it is not associated with a value