Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Atmospheric Cooling Solver

General-purpose radiative-cooling energy-balance solver: any material, any climate, interactive. Two-band (8-13 µm atmospheric window vs rest of spectrum) Stefan-Boltzmann balance, solved with SciPy brentq root-finding — the standard formulation used across the radiative-cooling literature (e.g. Raman et al., Nature 2014; Zhai et al., Science 2017).

Python Streamlit

Why this exists

Every input is a free parameter — solar reflectance, window/broadband emissivity, ambient temperature, humidity, cloud cover, solar irradiance, convective coefficient. No material dataset or location climatology baked in (contrast with bangkok-weather-aqi, which applies the same physics to one fixed monthly climatology). This is the general solver: pick any point in parameter space and get the physics.

What it computes

  • P_cool at ambient — net radiative cooling power if the surface were held at ambient temperature (the standard headline RC metric)
  • Equilibrium surface temperature — solving the full radiative + convective balance for the actual steady-state T_s
  • Sensitivity sweep — vary any one parameter across a range, see P_cool's response
  • Sky window emissivity from humidity + cloud cover (linear model anchored to ε=0.84 at RH=80%, the tropical-humid baseline used consistently across this portfolio — see bangkok-weather-aqi)

Validation

tests/test_solver.py includes:

  • Thermodynamic identity check — an ideal blackbody facing an identical-temperature blackbody sky has exactly zero net radiative exchange (not a fitted result, a physical law)
  • Monotonicity check — higher solar reflectance can only increase daytime cooling power, all else equal
  • Order-of-magnitude reproduction of the headline result in Raman et al. 2014: ~40 W/m² net cooling power under ~850-900 W/m² sun with R_solar≈0.97, ε_window≈0.96-0.97. This solver reproduces the right order of magnitude and sign given approximate inputs — not an exact match, since the paper doesn't publish exact test-day RH/cloud to the precision this solver needs. Stated explicitly rather than overclaiming precision.

Run it

pip install -r requirements.txt
pytest tests/          # 7 tests, all analytic/literature sanity checks
streamlit run app.py

Project structure

atmospheric_cooling_solver/
├── solver.py               # physics: Planck window fraction, energy balance, equilibrium solve, sweep
├── app.py                  # Streamlit UI — sliders, metrics, sweep chart, equations, validation
├── tests/test_solver.py    # analytic identities + monotonicity + literature order-of-magnitude check
└── requirements.txt

Model equations

P_cool = P_rad(T_amb) - P_atm(T_amb) - (1 - R_solar) * G_solar

P_rad(T)   = [eps_win * f(T)     + eps_out * (1 - f(T))]     * sigma * T^4
P_atm(T)   = [eps_win * f(T) * eps_sky_win
              + eps_out * (1 - f(T)) * eps_sky_out]           * sigma * T^4

f(T) = fraction of blackbody power inside the 8-13 µm window at temperature T (Planck-integrated, precomputed as a lookup table). Equilibrium surface temperature adds a convective term h_conv * (T_amb - T_s) and solves the full balance for T_s via scipy.optimize.brentq.

About

Interactive radiative-cooling energy-balance solver (SciPy brentq) -- any material, any climate, sensitivity sweep, validated against Raman et al. 2014

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages