Magnetic Field Diagnostics Based on Far-Infrared Polarimetry: Tests Using Numerical Simulations