# COMSOL Blog

## Simulating Helmholtz Coils in COMSOL Multiphysics

##### Alexandra Foley | April 23, 2014

Magnetic fields are fundamental forces in the universe. Without them, planetary orbits, electricity, and elementary particles could not exist. Helmholtz coils are used by scientists to generate uniform magnetic fields to study electromagnetism and its characteristics. They are used in MRI, spectroscopy, magnetoresistance measurements, and equipment calibrations. Here, we’ll look at what Helmholtz coils are, why they are important, and how can they be modeled.

### What is a Magnetic Field?

Before we delve into what Helmholtz coils are, let’s first define what a magnetic field is and how it is created.

A magnetic field is a force created by moving electrical charges and can be established when a charge is moving in space or when it is spinning in place. In general, there are two ways to create a magnetic field: with a magnet in which spinning unpaired electrons generate a magnetic field, or by passing a current through a conducting material. Below, iron fillings were used to visualize the magnetic field surrounding a bar magnet.

Iron filings used to reveal the magnetic field of a bar magnet. A sheet of paper is laid over a bar magnet with iron fillings sprinkled on top. The filings align parallel to the magnetic field and clump together in long strings, showing the direction of the magnetic field lines.

As depicted in the image, the magnetic field lines are arcs (from the north pole of the magnet to the south), showing the area where the magnetic field is present. It is not hard to recognize that this field isn’t uniform: objects present nearer to the end of the magnet will experience a different strength and direction of the magnetic field than objects positioned close to the bar magnet’s center. Even with magnetic fields created by current carrying conductors, the field lines will arc to form a non-uniform magnetic field that decreases with distance from the conductor. However, the special arrangement of two identical coils — known as Helmholtz coils — can be used to produce uniform magnetic fields.

Helmholtz coils are used to create a uniform magnetic field, in experiments that require a known magnetic field, or to cancel an external magnetic field, such as Earth’s. Additionally, they can be used in applications such as determining magnetic shielding effectiveness, quantifying the susceptibility of electronic equipment to magnetic fields, calibrating navigational equipment, and biomagnetic studies.

When designing Helmholtz coils, the question “How uniform is the magnetic field created, and over what distance?” naturally arises. To answer this, we can turn to COMSOL Multiphysics.

### Simulating a Helmholtz Coil

The geometry of a Helmholtz coil is composed of two identical circular coils positioned parallel to one another and spaced one radius apart. Current flows through both coils in the same direction, creating a uniform magnetic field between the coils where the primary component is parallel to the axes of the two coils.

The geometry of the Helmholtz coils modeled in the COMSOL software. Two identical coils are positioned parallel to one another at one radius apart.

The coils are modeled in COMSOL Multiphysics using the built-in 3D Magnetic Fields interface, which is available in the AC/DC Module. In this model, the coils are created by 10 wire turns and a current of 0.25 mA passes through them. As seen in the figure below, the magnetic flux is mostly uniform in the center of the two coils, but there is a region close to the edges of the coil where the magnetic field is non-uniform. The uniform field results because the field components perpendicular to the coils axis cancel each other out, resulting in a net field of zero, while the field components parallel to the axis of the coils combine with one another.

The slice plot shows the magnetic flux density. The arrows indicate the magnetic field (H) strength and direction.

Using postprocessing techniques, we can visualize the uniformity of the magnetic field. Again, we see the uniform parallel magnetic flux in the interior of the coils and the inhomogeneities close to the coils themselves. Helmholtz coils can be easily constructed and their fields can be easily calculated. This makes them especially useful for calibrating sensors and numerous other low-frequency magnetic-field testing applications.

Simulation of a parallel pair of identical circular coils which are spaced one radius apart. They are wound so that the current flows through both coils in the same direction. Results show the uniform magnetic field between the coils with the primary component parallel to the axes of the two coils.