Biot-Savart integration on a generic curve, by numerical integration.
You can insert the points of a generic curve and the script will calculate the B induction field everywhere.
You can choose between three test cases: simple straight wire, bent wire or solenoid, or you can insert the coordinates of your generic curve.
The script will also plot the quiver3 of the field.
Image in the screenshot has been simply taken using streamtube() function:
[xm, ym] = meshgrid(linspace(Dom(1,1), Dom(1,2), ND), linspace(Dom(2,1), Dom(2,2), ND));
zm = xm * 0;
You can find more info (in Italian) here:
Alessandro Masullo (2020). Biot-Savart direct integration on a generic curve (https://www.mathworks.com/matlabcentral/fileexchange/42237-biot-savart-direct-integration-on-a-generic-curve), MATLAB Central File Exchange. Retrieved .
It is not clear what the units are for the field and for the dimensions. The documentation in the code is light. It is also written as a script which impacts the workspace especially with all of the clear commands.
There is a little bug @ line 43:
linspace(Dom(2,1), Dom(3,2), ND));
linspace(Dom(3,1), Dom(3,2), ND));
Inspired: Biot Savart magnetic Toolbox
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!