The aim of this work is to assess the influence of a magnetic sample on the applied magnetic field inside the air gap of a magnetic circuit. Different magnetic sources including an electromagnet, a permanent magnet in a soft ferromagnetic toroidal yoke, as well as 2D and 3D Halbach cylinders are considered, using a numerical model. Gadolinium is chosen as magnetic material for the sample, due to its strong magnetocaloric properties and its wide use in magnetic refrigeration prototypes. We find that using uniform theoretical demagnetizing factors for cylinders or spheres results in a deviation of less than 2% in the calculation of internal magnetic fields at temperatures above the Curie point of gadolinium. Below the Curie point, a stronger magnetization of the cylinders and spheres leads to a larger deviation which can reach 8% when using uniform demagnetizing factors for internal magnetic field calculations.