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

19vues (au cours des 30derniers jours)

Afficher commentaires plus anciens

Florian G le 2 Août 2024 à 6:53

  • Lien

    Utiliser le lien direct vers cette question

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

  • Lien

    Utiliser le lien direct vers cette question

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

Réponse apportée: Alan Stevens le 2 Août 2024 à 8:48

Ouvrir dans MATLAB Online

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!

2commentaires

Afficher AucuneMasquer Aucune

Alan Stevens le 2 Août 2024 à 7:38

Utiliser le lien direct vers ce commentaire

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

  • Lien

    Utiliser le lien direct vers ce commentaire

    https://fr.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 le 2 Août 2024 à 7:45

Utiliser le lien direct vers ce commentaire

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

  • Lien

    Utiliser le lien direct vers ce commentaire

    https://fr.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!

Connectez-vous pour commenter.

Connectez-vous pour répondre à cette question.

Réponses (1)

Alan Stevens le 2 Août 2024 à 8:48

  • Lien

    Utiliser le lien direct vers cette réponse

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

  • Lien

    Utiliser le lien direct vers cette réponse

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

Ouvrir dans MATLAB Online

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

0commentaires

Afficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

Connectez-vous pour répondre à cette question.

Voir également

Tags

  • electromagnetism
  • magnetic field
  • coil

Produits

  • MATLAB

Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Une erreur s'est produite

Impossible de terminer l’action en raison de modifications de la page. Rechargez la page pour voir sa mise à jour.


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

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

Sélectionner un site web

Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .

Vous pouvez également sélectionner un site web dans la liste suivante :

Amériques

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

Europe

  • 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)

Asie-Pacifique

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

Contactez votre bureau local

Implementation of the analytical expression for the magnetic field ... (2024)
Top Articles
Wave Osaka 6-person Rigid Foam hot tub review – tried and tested
Atlantic | 6-Person Inflatable Hot Tub | Built-In Integrated Heater | Navy
It’s Time to Answer Your Questions About Super Bowl LVII (Published 2023)
Top 11 Best Bloxburg House Ideas in Roblox - NeuralGamer
Global Foods Trading GmbH, Biebesheim a. Rhein
Canya 7 Drawer Dresser
Koordinaten w43/b14 mit Umrechner in alle Koordinatensysteme
Poe Pohx Profile
Dr Klabzuba Okc
Nc Maxpreps
Dityship
Guardians Of The Galaxy Vol 3 Full Movie 123Movies
Newgate Honda
6th gen chevy camaro forumCamaro ZL1 Z28 SS LT Camaro forums, news, blog, reviews, wallpapers, pricing – Camaro5.com
Byte Delta Dental
Webcentral Cuny
Puretalkusa.com/Amac
Hanger Clinic/Billpay
Www Craigslist Milwaukee Wi
Zalog Forum
Van Buren County Arrests.org
Rugged Gentleman Barber Shop Martinsburg Wv
Robin D Bullock Family Photos
Decosmo Industrial Auctions
Catherine Christiane Cruz
Ahn Waterworks Urgent Care
A Person That Creates Movie Basis Figgerits
Lost Pizza Nutrition
Danielle Ranslow Obituary
Things to do in Pearl City: Honolulu, HI Travel Guide by 10Best
+18886727547
1475 Akron Way Forney Tx 75126
Metro By T Mobile Sign In
The Hoplite Revolution and the Rise of the Polis
Royal Caribbean Luggage Tags Pending
Cruise Ships Archives
Covalen hiring Ai Annotator - Dutch , Finnish, Japanese , Polish , Swedish in Dublin, County Dublin, Ireland | LinkedIn
Muma Eric Rice San Mateo
Zero Sievert Coop
Honda Ruckus Fuse Box Diagram
Noaa Marine Weather Forecast By Zone
Doordash Promo Code Generator
Bunkr Public Albums
Traumasoft Butler
Celsius Claims Agent
Avance Primary Care Morrisville
White County
Chubbs Canton Il
Fluffy Jacket Walmart
Sinai Sdn 2023
Here’s What Goes on at a Gentlemen’s Club – Crafternoon Cabaret Club
Where and How to Watch Sound of Freedom | Angel Studios
Latest Posts
Article information

Author: Corie Satterfield

Last Updated:

Views: 6066

Rating: 4.1 / 5 (42 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Corie Satterfield

Birthday: 1992-08-19

Address: 850 Benjamin Bridge, Dickinsonchester, CO 68572-0542

Phone: +26813599986666

Job: Sales Manager

Hobby: Table tennis, Soapmaking, Flower arranging, amateur radio, Rock climbing, scrapbook, Horseback riding

Introduction: My name is Corie Satterfield, I am a fancy, perfect, spotless, quaint, fantastic, funny, lucky person who loves writing and wants to share my knowledge and understanding with you.