  We implement a Monte Carlo radiative transfer method, that uses a large
number of monochromatic luminosity packets to represent the radiation
transported through a system. These packets are injected into the system and
interact stochastically with it. We test our code against various benchmark
calculations and determine the number of packets required to obtain accurate
results under different circumstances. We then use this method to study cores
that are directly exposed to the interstellar radiation field (non-embedded
cores) and find similar results with previous studies. We also explore a large
number of models of cores that are embedded in the centre of a molecular cloud.
Our study indicates that the temperature profiles in embedded cores are less
steep than those in non-embedded cores. Deeply embedded cores (ambient cloud
with visual extinction larger than 15-25) are almost isothermal at around 7-8
K. The temperature inside cores surrounded by an ambient cloud of even moderate
thickness (Av~5) is less than 12 K, which is lower than previous studies have
assumed. Thus, previous mass calculations of embedded cores (for example in the
rho Ophiuchi protocluster), based on mm continuum observations, may
underestimate core masses by up to a factor of 2. Our study shows that the best
wavelength region to observe embedded cores is between 400 and 500 microns,
where the core is quite distinct from the background. We also predict that very
sensitive observations (~1-3 MJy/sr) at 170-200 microns can be used to estimate
how deeply a core is embedded in its parent molecular cloud. The upcoming
HERSCHEL mission (ESA, 2007) will, in principle, be able to detect these
features and test our models.
