Skip to content

Derive exact radial-slotted coil pack area from slot geometry without FEA #5

Description

@crobarcro

Context

This issue records a deferred architectural/geometry task discovered while starting Milestone 2A of the classdef electrical-machines refactor.

Milestones 1A/1B established that the canonical winding geometry must contain an explicit, exact coil pack area (CoilGeometry.PackArea). In particular, the optimisation-stage envelope Hc * Wc is not an acceptable canonical pack area; it is only used by the legacy optimiser as a conductor-sizing approximation before exact geometry/FEA information is available.

The legacy radial-slotted FEA path currently obtains design.CoilArea during the first magnetic solve with a FEMM block-area integral, approximately:

design.CoilArea = session.blockintegral( ...
    5, ...
    design.StatorDrawingInfo.CoilLabelLocations(1,1), ...
    design.StatorDrawingInfo.CoilLabelLocations(1,2));

This creates an undesirable dependency/circularity for the modern architecture:

candidate
  -> canonical machine requires exact PackArea
  -> legacy exact CoilArea is obtained from FEA
  -> FEA nominally consumes the canonical machine

The likely clean solution is to calculate the coil-region area directly from the deterministic slot geometry in MATLAB/Octave, with no magnetic solve and ideally no FEM mesh dependency.

This work is intentionally deferred from Milestone 2A / PR #4 and should be implemented/reviewed separately.

Related Milestone 2A PR:
#4

Relevant existing geometry path

The radial-slotted FEA drawing is already constructed deterministically before FEMM solves anything:

slottedfemmprob_radial
  -> radialfluxstator2dfemmprob
  -> radialfluxstatorhalf2dfemmprob
  -> curvedstatorhalf2dfemmproblem
  -> internalslotnodelinks

internalslotnodelinks is particularly important because it generates the low-level slot boundary nodes, links, layer divisions and coil-label locations before the geometry is transformed into radial Cartesian coordinates.

Relevant files include:

common/electrical/matlab-octave/permanent_magnet_machines_tools/
  rotary_machines/radial_flux/slotted/slottedfemmprob_radial.m
  rotary_machines/radial_flux/common/radialfluxstator2dfemmprob.m
  rotary_machines/radial_flux/common/radialfluxstatorhalf2dfemmprob.m
  rotary_machines/radial_flux/common/geometry/curvedstatorhalf2dfemmproblem.m
  common/geometries/2d/internalslotnodelinks.m

Modern canonical geometry currently includes:

+rnfoundry/+em/+winding/RadialSlottedCoilGeometry.m

Important winding/layer cases

The implementation must not assume that total slot area / CoilLayers is always the correct answer.

1. Single-layer winding

One coil region occupies the slot cross-section (subject to insulation/geometry rules).

2. Ordinary double-layer winding

With NWindingLayers = 2, the slot is normally subdivided into two coil regions through the slot depth. Because this is a radial geometry, equal local layer depths do not necessarily imply equal physical Cartesian areas after radial mapping.

The implementation should calculate/return the actual area of each resulting coil region rather than assuming equality.

3. SplitSlot / tooth-wound special case

The current radial-slotted drawing selects:

SplitSlot = (CoilLayers == 2) && (yd == 1)

In that case, the drawing logic effectively creates one nominal layer and passes SplitX=true, causing internalslotnodelinks to split the slot in the alternate direction so the two coil sides are side-by-side rather than radially stacked.

This geometry must be handled explicitly and tested independently from ordinary double-layer winding.

4. Internal vs external armature

The local slot geometry is mirrored/transformed depending on whether the armature faces inward or outward. The area calculation should be invariant to rigid transformations/reflections, but both orientations need regression tests because the existing drawing path performs different transforms.

5. Tapered/two-section slot geometry

The modern/legacy model preserves the two-section slot geometry represented by quantities including:

tc / tcb
Rci / Rco / Rcb
thetacg / thetacy

The area calculation must reflect the same actual slot boundary used by the drawing code, including the curved slot base and any shoe transition geometry.

6. Coil insulation

If DrawCoilInsulation / CoilInsulationThickness changes the actual conductor-pack region used by FEMM, the non-FEA calculation must distinguish:

  • geometric slot void area;
  • insulation region area;
  • actual winding pack area.

Do not silently conflate these concepts.

Legacy semantic question that must be resolved

The legacy FEA code queries the block area containing the first coil label rather than obviously summing all coil-layer regions.

Before defining the modern result, determine exactly what legacy design.CoilArea means for:

  • single layer;
  • ordinary two radial layers;
  • SplitSlot two-layer geometry;
  • internal and external armatures.

It may turn out that legacy uses one representative layer area even when two physical layer regions have different areas. If so, initial parity should be characterised explicitly before deciding whether the modern API should expose richer information such as:

LayerPackAreas
TotalSlotPackArea
PackArea   % clearly defined representative/per-coil-side quantity

Do not change legacy numerical semantics silently.

Preferred implementation direction

Prefer extracting/reusing a pure slot-region geometry kernel rather than requiring a magnetic solve merely to obtain area.

A possible conceptual API is:

geom = radialSlottedCoilRegions(...);

with data such as:

geom.Region(k).Boundary
geom.Region(k).Area
geom.Region(k).LabelPoint

The same geometric definition should ideally be usable by both:

canonical winding construction
            \
             shared slot-region geometry
            /
FEA drawing

rather than allowing the FEMM drawing to remain the only authoritative representation of the slot region.

Area calculation approaches to investigate

Preferred: direct geometry/boundary integration

The slot is initially generated in a local radial/angular-style geometry and later transformed using pol2cart. Consider computing the area directly from this representation using the radial Jacobian:

dA = r dr dtheta

or using an exact/near-exact Green's-theorem boundary integral after transformation.

Straight segments and circular arcs can be integrated analytically. Curved base/shoe sections should ideally use their underlying curve representation rather than arbitrary FEM mesh resolution.

Acceptable alternative: deterministic constrained triangulation

If the existing geometry representation makes direct integration unnecessarily complex, generate a purely geometric constrained triangulation of each closed coil region in MATLAB/Octave and sum triangle areas.

This must not require a FEMM solve.

Less desirable: polygonise curves and use polyarea

This is possible but introduces a discretisation/sampling tolerance into a canonical physical quantity. Use only if a controlled error bound and MATLAB/Octave parity can be demonstrated.

Do not do

Do not resolve this issue by:

  • setting canonical PackArea = Hc * Wc;
  • inventing an arbitrary area;
  • storing NaN/zero in an otherwise valid canonical machine;
  • requiring a magnetic FEA solve solely to construct the canonical winding;
  • mutating SlottedPMMachine after FEA to insert the pack area;
  • assuming all double-layer coil regions have equal area without proof;
  • duplicating the slot drawing geometry independently in a second implementation that can drift from FEMM geometry.

Suggested implementation stages

  1. Characterise legacy CoilArea semantics for all winding-layer cases.
  2. Extract or expose the closed coil-region boundary data from the existing slot geometry generator.
  3. Implement a pure MATLAB/Octave area calculation for each coil region.
  4. Integrate the calculation into modern canonical winding construction at the appropriate boundary.
  5. Keep the old FEA block-integral measurement temporarily as a regression oracle.
  6. Once parity is demonstrated, remove the architectural need for FEA-derived CoilArea during canonical construction (without necessarily removing legacy diagnostics).

Required characterization fixtures

At minimum cover:

  • external armature, single layer;
  • internal armature, single layer;
  • external armature, ordinary double layer;
  • internal armature, ordinary double layer;
  • CoilLayers = 2, yd = 1, SplitSlot case;
  • tapered thetacg/thetacy / tc/tcb geometry;
  • shoe and no-shoe cases;
  • nonzero coil-insulation thickness if insulation changes the pack region.

Where practical include a fractional-slot fixture already supported by Milestones 1A/1B.

Regression/parity tests

For each representative fixture:

  1. construct the exact same slot geometry used by the FEA drawing;
  2. calculate each coil-region area without FEA;
  3. perform a femmsession solve only as a regression oracle;
  4. compare the pure geometry area against:
session.blockintegral(5, labelX, labelY)

for each applicable coil-region label, not merely the first one;
5. use tight tolerances consistent with the geometry representation;
6. verify internal/external mirroring does not change corresponding physical areas;
7. verify the SplitSlot partition is represented correctly;
8. verify canonical PackArea semantics are explicitly documented and match the chosen physical quantity.

Acceptance criteria

This issue is complete when:

  • exact/controlled-accuracy radial-slotted coil-region areas can be obtained in MATLAB/Octave without solving FEA;
  • the calculation uses/reuses the authoritative slot geometry rather than an unrelated approximation;
  • single-layer, ordinary double-layer and SplitSlot cases are handled explicitly;
  • per-layer differences in radial double-layer geometry are characterised rather than assumed away;
  • internal/external armature cases are covered;
  • coil insulation semantics are clear;
  • pure geometry results match FEMM block-integral areas for representative fixtures within justified tolerances;
  • modern PackArea semantics are documented unambiguously;
  • no Hc*Wc approximation is introduced as canonical state;
  • Milestone 1A/1B tests remain green;
  • MATLAB and GNU Octave compatibility is preserved.

Architectural outcome

The desired final construction flow is:

candidate
   -> repair
   -> exact slot/coil-region geometry
   -> exact PackArea
   -> canonical SlottedPMMachine
   -> FEA/preparation

rather than requiring an FEA solve to make the physical machine definition complete.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions