Modeling far-infrared observations of young stellar objects