Molecular clouds are complex magnetized structures, with variations over a broad range of length scales. Ionization in dense, shielded clumps and cores of molecular clouds is thought to be caused by charged cosmic rays (CRs). These CRs can also contribute to heating the gas deep within molecular clouds, and their effect can be substantial in environments where CRs are abundant. CRs propagate predominantly by diffusion in media with disordered magnetic fields. The complex magnetic structures in molecular clouds therefore determine the propagation and spatial distribution of CRs within them, and hence regulate their local ionization and heating patterns.
Optical and near-infrared (NIR) polarization of starlight through molecular clouds is often used to trace magnetic fields. The coefficients of CR diffusion in magnetized molecular cloud complexes can be inferred from the observed fluctuations in these optical/NIR starlight polarisations. Here, we present calculations of the expected CR heating patterns in the star-forming filaments of IC 5146, determined from optical/NIR observations. Our calculations show that local conditions give rise to substantial variation in CR propagation. This affects the local CR heating power. Such effects are expected to be severe in star-forming galaxies rich in CRs. The molecular clouds in these galaxies could evolve differently to those in galaxies where CRs are less abundant.