This repository contains the source code, material database, spectral data, and FDTD assets used to reproduce the radiative-cooling simulations in this project. It is intended to be shared with reviewers as a fully open reproducibility package.
main_app.py: main PySide2 desktop entry point; loads the material/spectral managers, creates the five-tab main window, and supports runtime language switchingmain_app_en.py: thin English launcher that starts the sameMainWindowwithLANGUAGE_ENmain_app.spec: PyInstaller spec file for packaging the desktop applicationvision.py: standalone material-preview script that interpolates every material file and savesn/kcomparison plots to_material_previews/test_efield.py: standalone PySide2 + pyqtgraph tool for visualizing the 2D internal electric-field intensity map of a multilayer stack while sweeping the MgF2 thicknesstest_integration_limits.py: diagnostic script for overriding solar/thermal integration limits and checking howP_sum,P_atm, and equilibrium temperature changecore/constants.py: shared physical constants, wavelength grid definition, and canonicaldata/andmaterials/pathscore/material_manager.py: loads optical-constant text files, validates/parses them, supports adding new material files, and interpolates complex refractive indices onto the simulation gridcore/spectral_manager.py: loads the solar spectrum and atmospheric transmittance data, interpolates them onto the common wavelength grid, builds blackbody spectra, and prepares the default solar/thermal integration windowscore/tmm_core.py: vectorized transfer-matrix implementation for spectral scans and angle scans, returningR_sandR_pcore/cooling_calculator.py: radiative-cooling post-processing routines forP_sum,P_rad,P_atm, non-radiative loss, temperature sweeps, and equilibrium-temperature solvingcore/utils.py: helper functions for parsing compact layer-stack strings and computing weighted emissivity/reflectance averagescore/__init__.py: package marker for the numerical coreui/material_viewer_widget.py: materials tab for browsing loaded materials, plottingn/k, and importing additional.txtoptical-constant filesui/tmm_simulator_widget.py: main TMM workflow tab for defining multilayer stacks, running spectral calculations, and displaying reflectance/emissivity resultsui/tmm_simulator_layout.py: layout builder used by the TMM simulator tabui/layer_widget.py: reusable single-layer row widget with material selection, thickness entry, and add/remove controlsui/sweep_widget.py: parameter-sweep tab for single-layer thickness scans, 2D heatmaps, and slider-driven exploration of stack responseui/angle_scan_widget.py: angle-scan tab that reuses the structure from the TMM tab and evaluates angular optical response for different polarizationsui/cooling_widget.py: radiative-cooling tab for loading a structure, computingP_atm/P_sum, sweepingT_sample, and reporting equilibrium temperatureui/i18n.py: minimal language-switch helper withzh/ennormalization and text selectionui/reviewer_english.py: helper that forces a window into English review modeui/styles.py: application-wide Qt stylesheet and pyqtgraph theme setupui/__init__.py: package marker for the UI modulematerials/*.txt: plain-text optical constants for the materials used by the simulator, typically stored as wavelength withnand optionalkdata/solar_spectrum.txt: solar irradiance input used for the solar-band weighting andP_sumcalculationdata/atm_transmittance.txt: atmospheric transmittance input used for the atmospheric-window weighting andP_atmcalculationFDTD/ALL.fsp: FDTD project file for the complementary full-wave simulation case
Recommended Python version:
- Python 3.9 to 3.12
Main Python dependencies:
numpyscipyPySide2pyqtgraphmatplotlibfor auxiliary plotting scripts
Example installation:
pip install numpy scipy PySide2 pyqtgraph matplotlibChinese/default interface:
python main_app.pyEnglish interface:
python main_app_en.pyThe application supports runtime language switching from the Language menu.
- Open
main_app.pyormain_app_en.py. - In the TMM tab, define the multilayer stack and click the calculation button.
- Use the Sweep tab for thickness sweeps and 2D heatmaps.
- Use the Angle tab for angle-dependent weighted optical response.
- Use the Cooling tab to load the TMM spectrum and compute
P_coolandT_eq.
Default example stack currently preloaded in the GUI:
PMMA (1068 nm)SiO2 (6749 nm)TiO2 (4675 nm)Ag (200 nm)Si substrate
The FDTD/ALL.fsp file is included as the corresponding FDTD project for full-wave reproduction. Open it with your FDTD software environment and run it using the solver settings stored in the project file.
Because the FDTD project is large, this repository stores it with Git LFS.
- Material files are plain text and can be inspected directly.
- Solar and atmospheric input spectra are included locally in
data/. - The English GUI now covers both static labels and dynamic runtime text.
- No external web service is required to run the numerical core.
This repository is intended to be made public for peer-review reproducibility. Local IDE files, caches, and generated preview artifacts are intentionally excluded.