image thumbnail

magnetic field simulator

version 1.0.0.0 (3.23 KB) by yoash levron
computes the magnetic field induced by a given conductor geometry

3.1K Downloads

Updated 09 Jan 2015

View License

The function computes the magnetic field H induced by a given conductors geometry. The geometry is represented by straight conductors ("current sticks"). Theory of this numerical technique may be found in "Electromagnetic fields and Energy" by Hermann A. Haus, page 322.
Written by Prof. Yoash Levron, Technion, Israel, 2014.
FUNCTION INPUTS
The shape of conductors is represented by "current sticks". For example, a square conductor is represented by four sticks.
FROM - an array of vector points indicating where each current stick starts. FROM(i,:) is a raw vector (x,y,z), indicating a point in 3-D space. Units in meters [m]
TO - same as FROM. Indicating where each current stick ends.
CUR - Column Vector representing the current of each stick. CUR(i) is a scalar. Units in Amperes [A]
R - Observation points. An array of vector points in which the magnetic field is to be calculated. R(i,:) is a raw vector (x,y,z), indicating a point in 3-D space. Units in meters [m].

FUNCTION OUTPUT
Hmat - the magnetic field H at the observation points. Hmat(i,:) is a raw vector (Hx,Hy,Hz), indicating the magnetic field vector in Cartesian coordinates. Units are [A/m].

Cite As

yoash levron (2021). magnetic field simulator (https://www.mathworks.com/matlabcentral/fileexchange/48990-magnetic-field-simulator), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!