Abstract
A method of simulating both linear and nonlinear 3D magnetostatic field with open boundary is described. It is based on the integration with total scalar potential on the surface (linear problems) or in the volume (nonlinear problems) of magnetic materials. For nonlinear problems, this procedure can avoid the cancellation errors and is convenient because of the use of total scalar potential and the volume integration only. It was tested by a given example and was applied to a deflection field calculation of multipole yoke