Landau mean-field relaxation
The relaxation of a Landau order parameter, to sqrt(a (Tc - T) / b) below Tc and to 0 above it.
- Name:
landau_relaxation - Field:
physics/statistical_mechanics - Formalism: ordinary differential equations
- References: Landau 1937; Gros 2015
Factory
@register_model(
field='physics/statistical_mechanics',
tags=('ode', 'mean field', 'phase transition', 'critical slowing down'),
references=('Landau 1937', 'Gros 2015'),
defaults={'until': 20.0, 'dt': 0.1},
)
def landau_relaxation(
phi: float = 0.1,
*,
T: float = 0.5,
Tc: float = 1.0,
a: float = 1.0,
b: float = 1.0,
h: float = 0.0,
Gamma: float = 1.0,
) -> System:
"""Return the relaxation of a Landau order parameter, to `sqrt(a (Tc - T) / b)` below `Tc` and to 0 above it.
The relaxation time `1 / (Gamma a |T - Tc|)` diverges at the critical temperature, which is critical slowing
down.
Args:
phi:
The initial order parameter.
T:
The temperature.
Tc:
The critical temperature.
a:
The coefficient of the quadratic term per unit temperature.
b:
The coefficient of the quartic term.
h:
The external field.
Gamma:
The kinetic coefficient.
Returns:
system:
The model, with the order parameter `magnet.phi`.
Examples:
>>> from skcomplex.models.physics.statistical_mechanics import landau_relaxation
>>> landau_relaxation(T=2.0).elements[0].T
2.0
"""
return System(elements=[OrderParameterElement('magnet', phi=phi, a=a, b=b, T=T, Tc=Tc, h=h, Gamma=Gamma)])
Components
class OrderParameterElement(Element):
"""Order parameter of Landau theory relaxing down its free energy, `dphi/dt = -Gamma dF/dphi`.
The free energy is `F = a (T - Tc) phi^2 / 2 + b phi^4 / 4 - h phi`.
Args:
label:
The label of the order parameter.
visual:
How the element is drawn, or `None` for `default_visual_`.
phi:
The initial order parameter.
a:
The coefficient of the quadratic term per unit temperature.
b:
The coefficient of the quartic term.
T:
The temperature.
Tc:
The critical temperature.
h:
The external field.
Gamma:
The kinetic coefficient.
Examples:
>>> from skcomplex.models.physics.statistical_mechanics import OrderParameterElement
>>> OrderParameterElement('magnet').Tc
1.0
"""
def __init__(
self,
label: str,
visual: VisualSpec | None = None,
*,
phi: Annotated[float, StateSpec()] = 0.1,
a: Annotated[float, ParameterSpec(domain=RealSet.open(0, oo))] = 1.0,
b: Annotated[float, ParameterSpec(domain=RealSet.open(0, oo))] = 1.0,
T: Annotated[float, ParameterSpec(domain=RealSet.closed_open(0, oo))] = 0.5,
Tc: Annotated[float, ParameterSpec(domain=RealSet.open(0, oo))] = 1.0,
h: Annotated[float, ParameterSpec()] = 0.0,
Gamma: Annotated[float, ParameterSpec(domain=RealSet.open(0, oo))] = 1.0,
) -> None:
super().__init__(label, visual=visual)
self.phi = phi
self.a = a
self.b = b
self.T = T
self.Tc = Tc
self.h = h
self.Gamma = Gamma
def _get_laws(self, s: SimpleNamespace) -> list[BaseLaw]:
"""Return the relaxation down the gradient of the free energy.
Args:
s:
The namespace of the symbols the laws can use.
Returns:
laws:
The laws of the component.
"""
force = s.a * (s.T - s.Tc) * s.phi + s.b * s.phi**3 - s.h
return [RateLaw(s.phi, -s.Gamma * force)]
Equations
magnet.phi: diff(phi_magnet(t), t) == -(b_magnet*phi_magnet(t)^3 + (T_magnet - Tc_magnet)*a_magnet*phi_magnet(t) - h_magnet)*Gamma_magnet