A kink and an antikink¶
A kink and an antikink of the sine-Gordon equation run into each other and pass: the turn of the field between them changes sign.
import sympy as sp
import pdemagic as pm
x, t = sp.symbols("x t", real=True)
u = sp.Function("u")(x, t)
speed = sp.Rational(1, 2)
gamma = 1 / sp.sqrt(1 - speed**2)
pair = 4 * sp.atan(sp.sinh(gamma * speed * (t - 12)) / (speed * sp.cosh(gamma * x)))
collision = pm.Problem(
sp.Eq(u.diff(t, 2), u.diff(x, 2) - sp.sin(u)),
domain=pm.Space(x, periodic={x: (-20, 20)}),
time=(t, 0, 24),
initial={u: pair.subs(t, 0), u.diff(t): pair.diff(t).subs(t, 0)},
)
pm.solve(collision).plot(time=[0, 8.4, 12, 15.6, 24])
What it shows¶
The sine-Gordon equation, \(u_{tt} = u_{xx} - \sin u\): a row of pendulums that are coupled to their neighbours. A kink is a place where the row makes one full turn, and an antikink one where it turns back, and both move like particles. Here the two start apart, with the row turned by \(-2\pi\) between them, and run towards each other with half the speed of the waves. At \(t = 12\) they meet and the row is flat for an instant, then they pass through each other, and the turn between them is \(+2\pi\). The initial state and its rate of change come from the known formula for this pair, which sympy differentiates. At the end the solution agrees with the formula to six digits.
What pdemagic decided¶
The planner solved the equation of second order as a system of first
order for u and its rate of change, by exponential time stepping of
fourth order (exponential_runge_kutta): the linear part is exact, and
the sine is stepped. The grid has 512 points, the finest that the
planner tries by itself. Its plan says that the spectrum of the initial
state has fallen to \(3\cdot10^{-10}\) there, a little short of its aim.