Numerically Stable and Computationally Efficient Expression for the Magnetic Field of a Current Loop
In this work, it is demonstrated that straightforward implementations of the well-known textbook expressions of the off-axis magnetic field of a current loop are numerically unstable in a large region of interest. Specifically, close to the axis of symmetry and at large distances from the loop, comp...
Main Authors: | , , |
---|---|
Format: | Article |
Language: | English |
Published: |
MDPI AG
2022-12-01
|
Series: | Magnetism |
Subjects: | |
Online Access: | https://www.mdpi.com/2673-8724/3/1/2 |
_version_ | 1797610546756845568 |
---|---|
author | Michael Ortner Peter Leitner Florian Slanovc |
author_facet | Michael Ortner Peter Leitner Florian Slanovc |
author_sort | Michael Ortner |
collection | DOAJ |
description | In this work, it is demonstrated that straightforward implementations of the well-known textbook expressions of the off-axis magnetic field of a current loop are numerically unstable in a large region of interest. Specifically, close to the axis of symmetry and at large distances from the loop, complete loss of accuracy happens surprisingly fast. The origin of the instability is catastrophic numerical cancellation, which cannot be avoided with algebraic transformations. All exact expressions found in the literature exhibit similar instabilities. We propose a novel exact analytic expression, based on Bulirsch’s complete elliptic integral, which is numerically stable (15–16 significant figures in 64 bit floating point arithmetic) everywhere. Several field approximation methods (dipole, Taylor expansions, Binomial series) are studied in comparison with respect to accuracy, numerical stability and computation performance. In addition to its accuracy and global validity, the proposed method outperforms the classical solution, and even most approximation schemes in terms of computational efficiency. |
first_indexed | 2024-03-11T06:16:47Z |
format | Article |
id | doaj.art-ed739aaa35be483a9156822f9a9255bc |
institution | Directory Open Access Journal |
issn | 2673-8724 |
language | English |
last_indexed | 2024-03-11T06:16:47Z |
publishDate | 2022-12-01 |
publisher | MDPI AG |
record_format | Article |
series | Magnetism |
spelling | doaj.art-ed739aaa35be483a9156822f9a9255bc2023-11-17T12:16:15ZengMDPI AGMagnetism2673-87242022-12-0131113110.3390/magnetism3010002Numerically Stable and Computationally Efficient Expression for the Magnetic Field of a Current LoopMichael Ortner0Peter Leitner1Florian Slanovc2Magnetic Microsystem Technologies, Silicon Austria Labs, 9500 Villach, AustriaMagnetic Microsystem Technologies, Silicon Austria Labs, 9500 Villach, AustriaMagnetic Microsystem Technologies, Silicon Austria Labs, 9500 Villach, AustriaIn this work, it is demonstrated that straightforward implementations of the well-known textbook expressions of the off-axis magnetic field of a current loop are numerically unstable in a large region of interest. Specifically, close to the axis of symmetry and at large distances from the loop, complete loss of accuracy happens surprisingly fast. The origin of the instability is catastrophic numerical cancellation, which cannot be avoided with algebraic transformations. All exact expressions found in the literature exhibit similar instabilities. We propose a novel exact analytic expression, based on Bulirsch’s complete elliptic integral, which is numerically stable (15–16 significant figures in 64 bit floating point arithmetic) everywhere. Several field approximation methods (dipole, Taylor expansions, Binomial series) are studied in comparison with respect to accuracy, numerical stability and computation performance. In addition to its accuracy and global validity, the proposed method outperforms the classical solution, and even most approximation schemes in terms of computational efficiency.https://www.mdpi.com/2673-8724/3/1/2magnetic fieldcurrent loopanalytic solutionnumerical stabilitycomputation performance |
spellingShingle | Michael Ortner Peter Leitner Florian Slanovc Numerically Stable and Computationally Efficient Expression for the Magnetic Field of a Current Loop Magnetism magnetic field current loop analytic solution numerical stability computation performance |
title | Numerically Stable and Computationally Efficient Expression for the Magnetic Field of a Current Loop |
title_full | Numerically Stable and Computationally Efficient Expression for the Magnetic Field of a Current Loop |
title_fullStr | Numerically Stable and Computationally Efficient Expression for the Magnetic Field of a Current Loop |
title_full_unstemmed | Numerically Stable and Computationally Efficient Expression for the Magnetic Field of a Current Loop |
title_short | Numerically Stable and Computationally Efficient Expression for the Magnetic Field of a Current Loop |
title_sort | numerically stable and computationally efficient expression for the magnetic field of a current loop |
topic | magnetic field current loop analytic solution numerical stability computation performance |
url | https://www.mdpi.com/2673-8724/3/1/2 |
work_keys_str_mv | AT michaelortner numericallystableandcomputationallyefficientexpressionforthemagneticfieldofacurrentloop AT peterleitner numericallystableandcomputationallyefficientexpressionforthemagneticfieldofacurrentloop AT florianslanovc numericallystableandcomputationallyefficientexpressionforthemagneticfieldofacurrentloop |