Induction heating of a steel billet: eddy currents and a conductivity that falls
FEM induction_heating_billet.py
A coil of eight copper turns carries a 10 kHz current around a round steel billet. The alternating field drives eddy currents in the billet, crowded into a skin of a few millimetres at the surface, and that skin is where the heat is made. The heat flows inward; it also lowers the steel's conductivity, which changes the field, which changes the heat.

The billet's temperature (inferno) and \(|A|\) in the air (BuPu), mirrored about the axis. Below: the radial profiles at mid-length.
The problem
The azimuthal vector potential \(A_\theta(r,z)\), a complex amplitude, and the temperature in the billet, axisymmetric:
The billet is a non-magnetic austenitic steel, so the skin depth \(\delta=\sqrt{2/(\omega\mu_0\sigma)}\) is 4.25 mm cold. A long cylinder of radius \(a\) in a uniform axial field \(H_0\) has the exact field
The jNO code
The billet, the coil and the air are regions of one mesh, each carrying its own properties:
billet = jno.shape.rect(0, -ZB, RB, ZB, size=0.0015).name("billet").attach(chi=1.0, js=0.0)
...
coil = coil.sized(0.002).name("coil").attach(chi=0.0, js=J0)
\(A=A_r+iA_i\) is two P2 unknowns on the whole domain; the temperature lives in the billet only:
Ar, Ai = d.unknown.scalar(order=2, name="Ar"), d.unknown.scalar(order=2, name="Ai") # A_theta = Ar + i Ai, everywhere
T = d.unknown.scalar(name="T", region="billet") # the temperature, in the billet only
The field equation in a body of revolution, with \(D(A)=\partial_rA+A/r=B_z\) and the ring measure \(r\), written once for the problem and the check:
def eddy(Ar, Ai, vr, vi, r, z, sigma, js):
"""curl curl A - i W sigma A = J for A = (Ar + i Ai) e_theta(r, z): the real and imaginary weak forms, ring measure r."""
(ar, ai, wr, wi) = (f.bind(x=r, y=z) for f in (Ar, Ai, vr, vi))
D = lambda f: f.x + f / r # (1/r) d(rA)/dr = B_z
curl2 = lambda a, w: (a.y * w.y + D(a) * D(w)) * r / MU0
return [curl2(ar, wr) + sigma * W * ai * wr * r - js * wr * r, curl2(ai, wi) - sigma * W * ar * wi * r]
The conductivity is an expression of the temperature unknown, used in the field equation and in the Joule heat. Every step solves both together by Newton, so the field follows the warming billet:
sigma = d.chi * SIG0 / (1 + ALPHA * (Tb - T0)) # conductivity: falls as the billet heats
Q = 0.5 * sigma * W**2 * (Arb**2 + Aib**2) # Joule heat sigma |E|^2 / 2 with E = i W A, W/m^3
fem = jno.fem(
[
*eddy(Ar, Ai, vr, vi, r, z, sigma, d.js),
Ar(*fixed) - 0.0,
Ai(*fixed) - 0.0,
d.chi * (RHO_C * Tb.t * sb * r + K_TH * dot(Tb, sb) * r) - Q * sb * r, # rho c T_t = div(k grad T) + Q
H_LOSS * (Tw - T0) * sw * wet[0], # heat lost through the billet's surface
T(*ci) - T0,
],
quad_degree=4,
)
Result
45,716 unknowns, 60 steps to 120 s:
| check | result |
|---|---|
| heat balance: absorbed = stored + lost, every step | \(2.9\times10^{-9}\) |
| coil's power \(\tfrac12\omega\int J\,\mathrm{Im}A\) against the Joule power | \(2.4\times10^{-11}\) |
| rod in a uniform field against the Bessel solution | rel. \(L^2\) \(1.5\times10^{-5}\) |
| rod: Joule power against the Poynting flux | \(9.0\times10^{-7}\) |
The coil delivers 5015 W at the start and 5760 W at the end: as the steel warms its conductivity falls, the skin deepens and the surface resistance grows. The surface at mid-length reaches 640 °C and the axis 521 °C in 120 s.
Full script
The whole script, as it runs in the tests
"""Induction heating of a steel billet: a coil's eddy currents heat it, the heat lowers its conductivity, the field follows."""
import jax
import numpy as np
from scipy.special import jv
import jno
jax.config.update("jax_enable_x64", True)
run = jno.setup(__file__)
MU0 = 4e-7 * np.pi # SI units: m, s, A, W, J, K
F = 10e3 # the coil current oscillates as exp(-i W t) at 10 kHz
W = 2 * np.pi * F
RB, ZB = 0.025, 0.075 # the billet: radius and half length (m)
N_TURNS, PITCH, SIDE, R_IN, I_PEAK = (
8,
0.02,
0.008,
0.040,
1200.0,
) # the coil: turns, pitch, side of a turn, inner radius, current
J0 = I_PEAK / SIDE**2 # current density in a turn (A/m^2)
SIG0, ALPHA = 1.4e6, 7e-4 # austenitic steel: sigma = SIG0 / (1 + ALPHA (T - T0))
RHO_C, K_TH, H_LOSS = 3.95e6, 20.0, 25.0 # heat capacity (J/(m^3 K)), conductivity (W/(m K)), loss to the air (W/(m^2 K))
T0, T_END, STEPS = 293.15, 120.0, 60
RO, ZO = 0.20, 0.25 # the air box: A = 0 on its outer edge
def eddy(Ar, Ai, vr, vi, r, z, sigma, js):
"""curl curl A - i W sigma A = J for A = (Ar + i Ai) e_theta(r, z): the real and imaginary weak forms, ring measure r."""
(ar, ai, wr, wi) = (f.bind(x=r, y=z) for f in (Ar, Ai, vr, vi))
D = lambda f: f.x + f / r # (1/r) d(rA)/dr = B_z
curl2 = lambda a, w: (a.y * w.y + D(a) * D(w)) * r / MU0
return [curl2(ar, wr) + sigma * W * ai * wr * r - js * wr * r, curl2(ai, wi) - sigma * W * ar * wi * r]
# the meridian half-plane (r, z): billet, the coil's turns, the air around them and the far air
billet = jno.shape.rect(0, -ZB, RB, ZB, size=0.0015).name("billet").attach(chi=1.0, js=0.0)
z_turns = (np.arange(N_TURNS) - (N_TURNS - 1) / 2) * PITCH
coil = jno.shape.rect(R_IN, z_turns[0] - SIDE / 2, R_IN + SIDE, z_turns[0] + SIDE / 2)
for zc in z_turns[1:]:
coil = coil | jno.shape.rect(R_IN, zc - SIDE / 2, R_IN + SIDE, zc + SIDE / 2)
coil = coil.sized(0.002).name("coil").attach(chi=0.0, js=J0)
near = jno.shape.rect(0, -0.1, 0.06, 0.1) # the neighbourhood of the coil, meshed finer than the far air
air = (near - billet - coil).sized(0.004).name("air").attach(chi=0.0, js=0.0)
far = (jno.shape.rect(0, -ZO, RO, ZO) - near).sized(0.02).name("far").attach(chi=0.0, js=0.0)
d = (billet + coil + air + far).domain(time=(0.0, T_END, STEPS + 1))
r, z, t = d.variable("interior", split=True)
wet, ci = d.variable("air|billet", split=True), d.variable("initial", split=True)
fixed = d.variable(
"fixed", where=lambda x, y: (x < 1e-9) | (x > RO - 1e-9) | (abs(y) > ZO - 1e-9), split=True
) # axis, far edge
Ar, Ai = d.unknown.scalar(order=2, name="Ar"), d.unknown.scalar(order=2, name="Ai") # A_theta = Ar + i Ai, everywhere
T = d.unknown.scalar(name="T", region="billet") # the temperature, in the billet only
vr, vi, s = Ar.test(), Ai.test(), T.test()
Tb, sb, Tw, sw = T.bind(x=r, y=z, t=t), s.bind(x=r, y=z), T.bind(x=wet[0], y=wet[1]), s.bind(x=wet[0], y=wet[1])
Arb, Aib = Ar.bind(x=r, y=z), Ai.bind(x=r, y=z)
dot = lambda f, g: f.x * g.x + f.y * g.y
sigma = d.chi * SIG0 / (1 + ALPHA * (Tb - T0)) # conductivity: falls as the billet heats
Q = 0.5 * sigma * W**2 * (Arb**2 + Aib**2) # Joule heat sigma |E|^2 / 2 with E = i W A, W/m^3
fem = jno.fem(
[
*eddy(Ar, Ai, vr, vi, r, z, sigma, d.js),
Ar(*fixed) - 0.0,
Ai(*fixed) - 0.0,
d.chi * (RHO_C * Tb.t * sb * r + K_TH * dot(Tb, sb) * r) - Q * sb * r, # rho c T_t = div(k grad T) + Q
H_LOSS * (Tw - T0) * sw * wet[0], # heat lost through the billet's surface
T(*ci) - T0,
],
quad_degree=4,
)
traj = np.asarray(fem.solve(nonlinear=jno.solve.newton(direct=True), linear=jno.solve.lu(backend="host")).eval())
Are, Aim, temp = (traj[:, fem.blocks[fem.block_index(f)]] for f in (Ar, Ai, T))
# the checks: the rows of a weak term sum to its integral (the test functions sum to one); 2 pi closes the ring
row = lambda e, k: 2 * np.pi * np.asarray(fem.eval(e, traj[k])).sum()
absorbed = lambda k: row(Q * sb * r, k)
stored = lambda k: row(d.chi * RHO_C * (Tb - T0) * sb * r, k)
lost = lambda k: row(H_LOSS * (Tw - T0) * sw * wet[0], k)
delivered = lambda k: row(0.5 * W * d.js * vi.bind(x=r, y=z) * Aib * r, k) # the coil's power: (1/2) W int J Im(A) dV
dt = T_END / STEPS
heat_err = max(abs(absorbed(k) - (stored(k) - stored(k - 1)) / dt - lost(k)) / absorbed(k) for k in range(1, STEPS + 1))
coil_err = max(abs(absorbed(k) - delivered(k)) / absorbed(k) for k in range(1, STEPS + 1))
print(f"{fem.dofs} DOFs, {STEPS} steps of {dt:g} s; coil current {I_PEAK:.0f} A in {N_TURNS} turns at {F / 1e3:g} kHz")
print(
f"absorbed {absorbed(1):.0f} -> {absorbed(STEPS):.0f} W; hottest node {temp[0].max() - 273.15:.0f} -> {temp[STEPS].max() - 273.15:.0f} C"
)
e_abs, e_lost = sum(absorbed(k) for k in range(1, STEPS + 1)) * dt, sum(lost(k) for k in range(1, STEPS + 1)) * dt
print(f"absorbed {e_abs / 1e3:.0f} kJ = stored {stored(STEPS) / 1e3:.0f} kJ + lost {e_lost / 1e3:.1f} kJ")
print(f"heat balance {heat_err:.1e}, coil power balance {coil_err:.1e}")
assert heat_err < 1e-6 and coil_err < 1e-6
# the reference: the same terms for a long rod in a uniform axial field H0, where A_theta = mu0 H0 J1(k r) / (k J0(k a)) with
# k = (1 + i) / delta exactly; the field enters as the surface condition (1/r) d(rA)/dr = mu0 H0
H0, delta = 5e4, np.sqrt(2 / (W * MU0 * SIG0))
rod = jno.shape.rect(0, 0, RB, 0.004, size=0.0008).name("rod").attach(chi=1.0)
g = rod.domain()
gr, gz, _ = g.variable("interior", split=True)
axis, skin = (
g.variable(n, where=w, split=True) for n, w in (("axis", lambda x, y: x < 1e-9), ("skin", lambda x, y: x > RB - 1e-9))
)
a, b = g.unknown.scalar(order=2, name="a"), g.unknown.scalar(order=2, name="b")
va, vb = a.test(), b.test()
ref = jno.fem(
[*eddy(a, b, va, vb, gr, gz, SIG0, 0.0), a(*axis) - 0.0, b(*axis) - 0.0, -H0 * RB * va.bind(x=skin[0], y=skin[1])],
quad_degree=4,
)
sol = np.asarray(ref.solve(linear=jno.solve.lu(backend="host")))
Ah = sol[ref.blocks[0]] + 1j * sol[ref.blocks[1]]
rn, k = np.asarray(ref.field_points[0])[:, 0], (1 + 1j) / delta
Ax = lambda r: MU0 * H0 * jv(1, k * r) / (k * jv(0, k * RB))
field_err = np.linalg.norm(Ah - Ax(rn)) / np.linalg.norm(Ax(rn))
joule = (
2
* np.pi
* np.asarray(ref.eval(0.5 * SIG0 * W**2 * (a.bind(x=gr, y=gz) ** 2 + b.bind(x=gr, y=gz) ** 2) * gr, sol)).sum()
)
poynting = (
np.pi * RB * W * H0 * Ax(RB).imag * 0.004
) # the power flowing in at the surface, 2 pi a (1/2) Re(E H*) over the slice height
print(
f"rod in an axial field, a / delta = {RB / delta:.1f}: field error {field_err:.1e}, power vs Poynting {joule / poynting - 1:+.1e}"
)
assert field_err < 1e-3 and abs(joule / poynting - 1) < 1e-2