Prediction of DC magnetic fields for magnetic cleanliness on spacecraft