# Algorithms for Computing the Magnetic Field, Vector Potential, and Field Derivatives for Circular Current Loops in Cylindrical Coordinates

## Abstract

A numerical algorithm for computing the field components B _{r} and B _{z} and their r and z derivatives with open boundaries in cylindrical coordinates for circular current loops is described. An algorithm for computing the vector potential is also described. For the convenience of the reader, derivations of the final expressions from their defining integrals are given in detail, since their derivations (especially for the field derivatives) are not all easily found in textbooks. Numerical calculations are based on evaluation of complete elliptic integrals using the Bulirsch algorithm cel. Since cel can evaluate complete elliptic integrals of a fairly general type, in some cases the elliptic integrals can be evaluated without first reducing them to forms containing standard Legendre forms. The algorithms avoid the numerical difficulties that many of the textbook solutions have for points near the axis because of explicit factors of 1=r or 1=r ^{2} in the some of the expressions.

- Authors:

- Los Alamos National Lab. (LANL), Los Alamos, NM (United States)

- Publication Date:

- Research Org.:
- Los Alamos National Lab. (LANL), Los Alamos, NM (United States)

- Sponsoring Org.:
- USDOE

- OSTI Identifier:
- 1377379

- Report Number(s):
- LA-UR-17-27619

- DOE Contract Number:
- AC52-06NA25396

- Resource Type:
- Technical Report

- Country of Publication:
- United States

- Language:
- English

- Subject:
- 97 MATHEMATICS AND COMPUTING; Mathematics; Magnetic field computation

### Citation Formats

```
Walstrom, Peter Lowell.
```*Algorithms for Computing the Magnetic Field, Vector Potential, and Field Derivatives for Circular Current Loops in Cylindrical Coordinates*. United States: N. p., 2017.
Web. doi:10.2172/1377379.

```
Walstrom, Peter Lowell.
```*Algorithms for Computing the Magnetic Field, Vector Potential, and Field Derivatives for Circular Current Loops in Cylindrical Coordinates*. United States. doi:10.2172/1377379.

```
Walstrom, Peter Lowell. Thu .
"Algorithms for Computing the Magnetic Field, Vector Potential, and Field Derivatives for Circular Current Loops in Cylindrical Coordinates". United States.
doi:10.2172/1377379. https://www.osti.gov/servlets/purl/1377379.
```

```
@article{osti_1377379,
```

title = {Algorithms for Computing the Magnetic Field, Vector Potential, and Field Derivatives for Circular Current Loops in Cylindrical Coordinates},

author = {Walstrom, Peter Lowell},

abstractNote = {A numerical algorithm for computing the field components Br and Bz and their r and z derivatives with open boundaries in cylindrical coordinates for circular current loops is described. An algorithm for computing the vector potential is also described. For the convenience of the reader, derivations of the final expressions from their defining integrals are given in detail, since their derivations (especially for the field derivatives) are not all easily found in textbooks. Numerical calculations are based on evaluation of complete elliptic integrals using the Bulirsch algorithm cel. Since cel can evaluate complete elliptic integrals of a fairly general type, in some cases the elliptic integrals can be evaluated without first reducing them to forms containing standard Legendre forms. The algorithms avoid the numerical difficulties that many of the textbook solutions have for points near the axis because of explicit factors of 1=r or 1=r2 in the some of the expressions.},

doi = {10.2172/1377379},

journal = {},

number = ,

volume = ,

place = {United States},

year = {Thu Aug 24 00:00:00 EDT 2017},

month = {Thu Aug 24 00:00:00 EDT 2017}

}