The method presented here is applicable in a wide variety of environments, and it is particularly suited for modeling protostar formation and protoplanetary disks. At later stages of the star formation process, or in the presence of nearby massive stars, photoionization by UV or X-rays may become relevant [1]}. In this case, their ionization rate can simply be added to the cosmic-ray ionization rate \(\zeta \)  in the system of equations (REF )-(REF ).
