  We present a method for modelling star-forming clouds that combines two
different models of the thermal evolution of the interstellar medium (ISM). In
the combined model, where the densities are low enough that at least some part
of the spectrum is optically thin, a model of the thermodynamics of the diffuse
ISM is more significant in setting the temperatures. Where the densities are
high enough to be optically thick across the spectrum, a model of flux limited
diffusion is more appropriate. Previous methods either model the low-density
interstellar medium and ignore the thermal behaviour at high densities (e.g.
inside collapsing molecular cloud cores), or model the thermal behaviour near
protostars but assume a fixed background temperature (e.g. approximately 10 K)
on large-scales. Our new method treats both regimes. It also captures the
different thermal evolution of the gas, dust, and radiation separately. We
compare our results with those from the literature, and investigate the
dependence of the thermal behaviour of the gas on the various model parameters.
This new method should allow us to model the ISM across a wide range of
densities and, thus, develop a more complete and consistent understanding of
the role of thermodynamics in the star formation process.
