# Iron Loss Models


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Executive Summary

**Purpose:** Estimate power dissipation in motor cores

**What it does:** Calculate core (iron) losses in magnetic materials.

### Why It Matters

Thermal analysis needs core loss to calculate motor temperature rise and
cooling requirements.

### Quick Start

**Inputs:** Flux density, frequency, material (steel grade or fitted
parameters)

**Outputs:** Core loss in W/kg, decomposed into hysteresis and eddy
current components

## How It Fits Into the Motor Design Workflow

**Upstream (depends on):** Used by thermal and efficiency analysis
modules

**Downstream (used by):** See notebook connections

## Theory: Core Loss Decomposition

Core loss arises from three mechanisms: 1. **Hysteresis loss** — Domain
wall friction 2. **Eddy current loss** — Induced currents 3. **Excess
loss** — Domain wall dynamics

### Steinmetz Model

*P* = *k* ⋅ *f*<sup>*α*</sup> ⋅ *B̂*<sup>*β*</sup>

Simple two-exponent fit for sinusoidal excitation.

### Bertotti Three-Term

*P*<sub>*t**o**t**a**l*</sub> = *k*<sub>*h*</sub>*f**B̂*<sup>*β*</sup> + *k*<sub>*e*</sub>(*f**B̂*)<sup>2</sup> + *k*<sub>*a*</sub>(*f**B̂*)<sup>1.5</sup>

Physically-based separation into components. Separating the three terms
needs data at **at least two frequencies**: at a single frequency the
hysteresis, eddy and excess terms cannot be told apart. The fit keeps
all three coefficients non-negative.

**Not included:** waveform-based models for non-sinusoidal (PWM) flux,
such as the modified Steinmetz equation (MSE) or iGSE. They need the
flux-density waveform B(t), not just f and B̂. An earlier
`modified_steinmetz(f, B)` was removed: written as
k·f<sup>(α−1)·(f·B)</sup>β it is algebraically the Steinmetz formula
with a different frequency exponent, so it could not represent PWM
effects.

------------------------------------------------------------------------

### steinmetz

``` python
def steinmetz(
    f:float | np.ndarray, B_peak:float | np.ndarray, k:float, alpha:float, beta:float
)->float | np.ndarray:
```

*Classical Steinmetz core loss model.* P = k \* f^alpha \* B^beta Args:
f: Frequency (Hz) B_peak: Peak flux density (T) k: Material constant
alpha: Frequency exponent (1.0–1.6) beta: Flux density exponent
(1.6–2.2) Returns: Core loss (W/kg)

------------------------------------------------------------------------

### bertotti

``` python
def bertotti(
    f:float | np.ndarray, B_peak:float | np.ndarray, k_h:float, k_e:float, k_a:float, alpha:float=1.0,
    beta:float=2.0
)->dict[str, float | np.ndarray]:
```

*Bertotti three-term iron loss separation.* Separates into hysteresis,
eddy, and excess components. Args: f: Frequency (Hz) B_peak: Peak flux
density (T) k_h: Hysteresis coefficient k_e: Eddy current coefficient
k_a: Excess coefficient alpha: Frequency exponent (default 1.0) beta:
Flux density exponent (default 2.0) Returns: Dict with ‘hysteresis’,
‘eddy’, ‘excess’, ‘total’ (W/kg)

------------------------------------------------------------------------

### fit_steinmetz

``` python
def fit_steinmetz(
    f_arr:np.ndarray, B_arr:np.ndarray, loss_arr:np.ndarray
)->dict:
```

*Fit Steinmetz parameters (k, α, β) to measured data.*

------------------------------------------------------------------------

### fit_bertotti

``` python
def fit_bertotti(
    f_arr:np.ndarray, B_arr:np.ndarray, loss_arr:np.ndarray
)->dict:
```

*Fit Bertotti three-term parameters (kh, ke, ka), all constrained to be
\>= 0.*

## Raises

ValueError If the data contain fewer than two distinct frequencies: the
three loss terms cannot be separated from a single frequency.

------------------------------------------------------------------------

### fit_loss_model

``` python
def fit_loss_model(
    f_arr:np.ndarray, B_arr:np.ndarray, loss_arr:np.ndarray, model:str='Bertotti'
)->dict:
```

*Fit a named core loss model. model must be one of MODEL_NAMES.*

## Tests

Iron loss models and coefficient fitting validated against synthetic
data.
