Implementation of the analytical expression for the magnetic field ... (2024)

18 Ansichten (letzte 30 Tage)

Ältere Kommentare anzeigen

Florian G am 2 Aug. 2024 um 6:53

  • Verknüpfen

    Direkter Link zu dieser Frage

    https://de.mathworks.com/matlabcentral/answers/2142316-implementation-of-the-analytical-expression-for-the-magnetic-field-of-a-circular-current-loop-and-in

  • Verknüpfen

    Direkter Link zu dieser Frage

    https://de.mathworks.com/matlabcentral/answers/2142316-implementation-of-the-analytical-expression-for-the-magnetic-field-of-a-circular-current-loop-and-in

Beantwortet: Alan Stevens am 2 Aug. 2024 um 8:48

In MATLAB Online öffnen

I want to analytically approximate the magnetic field of a few coil arrangements. For this purpose i found a very helpful paper: 20140002333.pdf (nasa.gov). On page 8 of the PDF document are the analytic expressions for the field components of the magnetic field in spherical coordinates:

Implementation of the analytical expression for the magnetic field ... (2)

This is my implementation:

function [B_r,B_theta] = magneticField_circularCoil(I,N,a,r,theta)

%MAGNETICFIELDCOMPONENTS Calculates the magnetic field components B_r and

%B_theta (spherical coordinates)

% B_r: B component in r direction

% B_theta: B component in theta direction

% I: current through conductor

% N: number of coil windings

% a: radius of the coil

% r: distance from the origin (spherical coordinates)

% theta: angle to z-axis (spherical coordinates) IN DEGREES

%

% Source for used analytic formula:

% https://ntrs.nasa.gov/api/citations/20140002333/downloads/20140002333.pdf

mu0 = 4.*pi.*1e-7;

alpha2 = a.^2 + r.^2 - 2.*a.*r.*sind(theta);

beta2 = a.^2 + r.^2 + 2.*a.*r.*sind(theta);

k2 = 1 - alpha2./beta2;

C = mu0 * I./pi;

[K_k2,E_k2] = ellipke(k2);

B_r = N.*(C.*a.^2.*cosd(theta))./(alpha2.*sqrt(beta2)) .* E_k2;

B_theta = N.*C./(2.*alpha2.*sqrt(beta2).*sind(theta)) .* ((r.^2+a.^2.*cosd(2.*theta)).*E_k2 - alpha2.*K_k2);

B_phi = 0;

To test the function, I wrote the following code:

%% Analytical calculation of the magnetic field of the Helmholtz coil arrangement %%

% Approximation: The coil diameter is neglected. All windings "in one

% place"

% approximation: The magnetic table top is assumed to act as a perfect

% magnetic "mirror" is assumed.

%

format compact;

% Radius of the Coil in meters:

a = 0.2;

% Current through Coil in amperes:

I = 5.0;

% Number of Coil windings:

N = 154; % source: datasheet Helmholtz coils

r_test = sqrt(0.2.^2+0.2.^2);

[B_r1,B_theta1] = magneticField_circularCoil(I,N,a,r_test,45.0)

[B_r2,B_theta2] = magneticField_circularCoil(I,N,a,r_test,135.0)

This leads to the following expected results (the magnitude of the resulting field is the same but it's in different directions):

>> Magnetfeld_Helmholtzspule_analytisch

B_r1 =

5.2273e-04

B_theta1 =

-4.2355e-06

B_r2 =

-5.2273e-04

B_theta2 =

-4.2355e-06

Is my implementation of the field components correct?

And how could I represent the superimposed field of two (or more) coils? I would appreciate any ideas!

2 Kommentare

Keine anzeigenKeine ausblenden

Alan Stevens am 2 Aug. 2024 um 7:38

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2142316-implementation-of-the-analytical-expression-for-the-magnetic-field-of-a-circular-current-loop-and-in#comment_3227231

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2142316-implementation-of-the-analytical-expression-for-the-magnetic-field-of-a-circular-current-loop-and-in#comment_3227231

You define beta2 as a.^2 + r.^2 + 2.*a.*r, but the printed text has the 2ar term multiplied by sin(theta) in a similar manner to that for alpha2. (I've no idea if that will solve your problem though!).

Florian G am 2 Aug. 2024 um 7:45

Direkter Link zu diesem Kommentar

https://de.mathworks.com/matlabcentral/answers/2142316-implementation-of-the-analytical-expression-for-the-magnetic-field-of-a-circular-current-loop-and-in#comment_3227236

  • Verknüpfen

    Direkter Link zu diesem Kommentar

    https://de.mathworks.com/matlabcentral/answers/2142316-implementation-of-the-analytical-expression-for-the-magnetic-field-of-a-circular-current-loop-and-in#comment_3227236

Thanks, I updated the code accordingly!

Melden Sie sich an, um zu kommentieren.

Melden Sie sich an, um diese Frage zu beantworten.

Antworten (1)

Alan Stevens am 2 Aug. 2024 um 8:48

  • Verknüpfen

    Direkter Link zu dieser Antwort

    https://de.mathworks.com/matlabcentral/answers/2142316-implementation-of-the-analytical-expression-for-the-magnetic-field-of-a-circular-current-loop-and-in#answer_1493806

  • Verknüpfen

    Direkter Link zu dieser Antwort

    https://de.mathworks.com/matlabcentral/answers/2142316-implementation-of-the-analytical-expression-for-the-magnetic-field-of-a-circular-current-loop-and-in#answer_1493806

In MATLAB Online öffnen

When I run it I get different signs as well as slightly different magnitudes:

%% Analytical calculation of the magnetic field of the Helmholtz coil arrangement %%

% Approximation: The coil diameter is neglected. All windings "in one

% place"

% approximation: The magnetic table top is assumed to act as a perfect

% magnetic "mirror" is assumed.

%

format compact;

% Radius of the Coil in meters:

a = 0.2;

% Current through Coil in amperes:

I = 5.0;

% Number of Coil windings:

N = 154; % source: datasheet Helmholtz coils

r_test = sqrt(0.2.^2+0.2.^2);

[B_r1,B_theta1] = magneticField_circularCoil(I,N,a,r_test,45.0)

B_r1 = 5.7391e-04

B_theta1 = 4.8589e-05

[B_r2,B_theta2] = magneticField_circularCoil(I,N,a,r_test,135.0)

B_r2 = -5.7391e-04

B_theta2 = 4.8589e-05

function [B_r,B_theta] = magneticField_circularCoil(I,N,a,r,theta)

%MAGNETICFIELDCOMPONENTS Calculates the magnetic field components B_r and

%B_theta (spherical coordinates)

% B_r: B component in r direction

% B_theta: B component in theta direction

% I: current through conductor

% N: number of coil windings

% a: radius of the coil

% r: distance from the origin (spherical coordinates)

% theta: angle to z-axis (spherical coordinates) IN DEGREES

%

% Source for used analytic formula:

% https://ntrs.nasa.gov/api/citations/20140002333/downloads/20140002333.pdf

mu0 = 4.*pi.*1e-7;

alpha2 = a.^2 + r.^2 - 2.*a.*r.*sind(theta);

beta2 = a.^2 + r.^2 + 2.*a.*r.*sind(theta);

k2 = 1 - alpha2./beta2;

C = mu0 * I./pi;

[K_k2,E_k2] = ellipke(k2);

B_r = N.*(C.*a.^2.*cosd(theta))./(alpha2.*sqrt(beta2)) .* E_k2;

B_theta = N.*C./(2.*alpha2.*sqrt(beta2).*sind(theta)) .* ((r.^2+a.^2.*cosd(2.*theta)).*E_k2 - alpha2.*K_k2);

B_phi = 0;

end

0 Kommentare

-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

Melden Sie sich an, um diese Frage zu beantworten.

Siehe auch

Tags

  • electromagnetism
  • magnetic field
  • coil

Produkte

  • MATLAB

Version

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Es ist ein Fehler aufgetreten

Da Änderungen an der Seite vorgenommen wurden, kann diese Aktion nicht abgeschlossen werden. Laden Sie die Seite neu, um sie im aktualisierten Zustand anzuzeigen.


Translated by Implementation of the analytical expression for the magnetic field ... (6)

Implementation of the analytical expression for the magnetic field ... (7)

Website auswählen

Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .

Sie können auch eine Website aus der folgenden Liste auswählen:

Amerika

  • América Latina (Español)
  • Canada (English)
  • United States (English)

Europa

  • Belgium (English)
  • Denmark (English)
  • Deutschland (Deutsch)
  • España (Español)
  • Finland (English)
  • France (Français)
  • Ireland (English)
  • Italia (Italiano)
  • Luxembourg (English)
  • Netherlands (English)
  • Norway (English)
  • Österreich (Deutsch)
  • Portugal (English)
  • Sweden (English)
  • Switzerland
    • Deutsch
    • English
    • Français
  • United Kingdom(English)

Asien-Pazifik

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
  • 日本Japanese (日本語)
  • 한국Korean (한국어)

Kontakt zu Ihrer lokalen Niederlassung

Implementation of the analytical expression for the magnetic field ... (2024)

References

Top Articles
Wednesday, July 10th, 2024 – Page 2 – Toni's Young and Restless Spoiler Site
Given that H(s)=(s^2+αs+10^8)/(s^2+100 s+10^4), using MATLAB, (a) Plot the magnitude and phase frequency response of H(j ω) when α=10^4. Also plot the unit impulse response and the unit step response. (b) Plot the magnitude and phase frequency response of
Truist Bank Near Here
Kraziithegreat
THE 10 BEST Women's Retreats in Germany for September 2024
Santa Clara College Confidential
Us 25 Yard Sale Map
Ncaaf Reference
414-290-5379
Edgar And Herschel Trivia Questions
Select Truck Greensboro
Wunderground Huntington Beach
Slushy Beer Strain
Gas Station Drive Thru Car Wash Near Me
Beau John Maloney Houston Tx
Cbs Trade Value Chart Fantasy Football
How to find cash from balance sheet?
Wilmot Science Training Program for Deaf High School Students Expands Across the U.S.
Define Percosivism
Nesz_R Tanjiro
Silive Obituary
ELT Concourse Delta: preparing for Module Two
Robert Deshawn Swonger Net Worth
Promiseb Discontinued
Kaitlyn Katsaros Forum
Bella Bodhi [Model] - Bio, Height, Body Stats, Family, Career and Net Worth 
Stoney's Pizza & Gaming Parlor Danville Menu
Rochester Ny Missed Connections
Valic Eremit
Reviews over Supersaver - Opiness - Spreekt uit ervaring
Restored Republic June 16 2023
Anonib Oviedo
Suspiciouswetspot
55Th And Kedzie Elite Staffing
Is Light Raid Hard
Goodwill Of Central Iowa Outlet Des Moines Photos
Pokémon Unbound Starters
Restored Republic
Vadoc Gtlvisitme App
Craigslistodessa
La Qua Brothers Funeral Home
Beth Moore 2023
Lucky Larry's Latina's
Selfservice Bright Lending
Agematch Com Member Login
The Syracuse Journal-Democrat from Syracuse, Nebraska
Zasilacz Dell G3 15 3579
Bones And All Showtimes Near Johnstown Movieplex
The Listings Project New York
Sun Tracker Pontoon Wiring Diagram
Darkglass Electronics The Exponent 500 Test
All Buttons In Blox Fruits
Latest Posts
Article information

Author: Wyatt Volkman LLD

Last Updated:

Views: 5502

Rating: 4.6 / 5 (66 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Wyatt Volkman LLD

Birthday: 1992-02-16

Address: Suite 851 78549 Lubowitz Well, Wardside, TX 98080-8615

Phone: +67618977178100

Job: Manufacturing Director

Hobby: Running, Mountaineering, Inline skating, Writing, Baton twirling, Computer programming, Stone skipping

Introduction: My name is Wyatt Volkman LLD, I am a handsome, rich, comfortable, lively, zealous, graceful, gifted person who loves writing and wants to share my knowledge and understanding with you.