I'm looking for an algorithmic model which will gives rough estimate of the average temperature of a planet's atmosphere (good enough to say whether there will be liquid water anywhere, or if metals and plastics will melt/ignite) based on the luminosity of its star, the radius of its orbit, the constituents of its atmosphere, the mass of the planet, and the surface area of the planet.
Specifically, I figure I need two mathematical models. The first would simulate the incoming thermal energy from the star, and the second would calculate how much is lost as blackbody radiation by the planet, taking into account the effects of the 'greenhouse effect'.
Does anyone know how to model these things?