We model the thermal effect of young stars on their surrounding environment in order to understand clustered star formation. We take radiative heating of dust, dust-gas collisional heating, cosmic-ray heating, and molecular cooling into account. Using Dusty, a spherical continuum radiative transfer code, we model the dust temperature distribution around young stellar objects with various luminosities and surrounding gas and dust density distributions. We have created a grid of dust temperature models, based on our modeling with Dusty, which we can use to calculate the dust temperature in a field of stars with various parameters. We then determine the gas temperature assuming energy balance. Our models can be used to make large-scale simulations of clustered star formation more realistic.