This is hard. Check out 5R1C repo
https://github.com/architecture-building-systems/RC_BuildingSimulator/blob/master/rc_simulator/radiation.py