PCB Drone Motor - 02
Computational Estimation of Magnetic Flux Density for Layered Annular Sector Coils
This post details my vision for a first attempt at estimating the airgap flux density generated by the stator coils in an axial flux motor topology using Python. Future iterations will include a grid-based Biot-Savart approach (calculating the field over an area) and eventually leveraging open-source 2D/3D FEA tools. I know there are many excellent commercial and open-source programs that perform these calculations already, but my primary motivation here was to further understand the underlying physics and calculation methods from first principles, specifically as applied to axial flux machines.
(The Python notebook can be downloaded at the bottom of the page)
Example of my Prototype from Post 01
In axial flux motors, the magnetic flux primarily travels parallel to the axis of rotation, crossing a flat air gap between stator and rotor disks. The stator coils are typically arranged as flat windings on the surface of the stator disk. This Python project focuses on modeling these coils and calculating their magnetic field contribution in the airgap on my prototype.
This script demonstrates a workflow integrating geometric analysis with fundamental physics:
Geometric Foundation: Using numpy, the code precisely defines the 2D cross-section of an annular sector (a "doughnut slice"), representing the physical space for the windings. Parameters like radii and arc angle define the core geometry.
Centroid & Characteristic Dimension: The geometric centroid of the sector is calculated. Following this, a characteristic "average distance" from this centroid to the sector's perimeter is determined. This metric provides a basis for positioning the current elements in the model.
Coil Representation & Layering: The core of the model represents the winding pack. Instead of discretizing a potentially complex spiral path, this implementation utilizes concentric circular current loops centered at the geometric centroid.
The radii of these loops are derived from the calculated "average distance," stepping inwards with a defined TRACE_DISTANCE. This structured approach creates a model of the current distribution intended to capture the primary magnetic contributions within the sector.
The model effectively handles multiple layers stacked vertically (NUM_LAYERS), incorporating the specified LAYER_SPACING between them.
Physics Engine - Biot-Savart Law: The magnetic field calculation leverages the Biot-Savart Law directly. A dedicated function (biot_savart_loop_at_point) numerically integrates the field contributions from infinitesimal current segments (dl) around each modeled circular loop to determine the magnetic field vector (B) produced at any target point in space.
Targeted Field Evaluation: The script computes the total B-field by vectorially summing the contributions from all modeled loops across all layers. This calculation is performed at a user-defined point, typically located in the 'airgap' region relevant to the device's operation (e.g., a specific distance above the top layer's centroid).
Visualization with Plotly: Interactive plots generated using plotly are used throughout. They visualize the defined geometry, centroid, average distance metric, the positions of the modeled current loops, and the field evaluation point, providing crucial validation and insight into the model setup.
Advantages of this Method:
Direct Physics Implementation: Applies the Biot-Savart law directly to the defined current sources, offering a clear link between the model geometry and the resulting field.
Model Transparency & Control: Python implementation allows full control over the geometric parameters and the current loop representation.
Computational Speed: For field calculations at specific points arising from known currents in linear media (like air), this direct summation is generally significantly faster than setting up, meshing, and solving a full FEA domain.
Educational Insight: Provides a practical platform for exploring how different coil parameters and layering strategies influence the magnetic field.
The output of my script from a 3-layer design
Considerations:
This method models the current distribution using defined circular elements. It's most suited for problems where the field is primarily determined by the source currents in air or linear materials.
It doesn't inherently include the effects of complex magnetic cores (saturation, hysteresis) or solve for fields within those materials, which are strengths of FEA.
Consequently, while this direct calculation approach offers compelling speed advantages for rapid estimations, it may not achieve the same level of accuracy as a detailed FEA model, particularly for complex geometries or when material effects are dominant. The trade-off is speed for potentially reduced precision